-
Notifications
You must be signed in to change notification settings - Fork 6
Comparing changes
Open a pull request
base repository: StackOneHQ/stackone-ai-node
base: main
head repository: StackOneHQ/stackone-ai-node
compare: codemode
- 15 commits
- 53 files changed
- 1 contributor
Commits on Nov 27, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 733c8f4 - Browse repository at this point
Copy the full SHA 733c8f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e2b90f - Browse repository at this point
Copy the full SHA 7e2b90fView commit details -
feat: add codegen and DynamicToolClient for typed SDK generation
Introduce core infrastructure for generating typed TypeScript SDK files: - src/codegen.ts: Code generation utilities that convert fetched tools into TypeScript interfaces and wrapper functions. Generates both types.d.ts (type definitions) and index.ts (implementation) files. - src/dynamic-client.ts: Lightweight RPC client for executing tools via the StackOne /actions/rpc endpoint. Used by generated SDK files to execute tools with proper authentication and request formatting. Key features: - JSON Schema to TypeScript type conversion - Automatic interface generation from tool parameters - PascalCase/camelCase naming conventions - Support for enum, oneOf, anyOf, allOf schemas - Optional parameter handling
Configuration menu - View commit details
-
Copy full SHA for e700e7b - Browse repository at this point
Copy the full SHA e700e7bView commit details -
feat: integrate generateTypedClient into StackOneToolSet
Add generateTypedClient() method to StackOneToolSet that fetches tools and generates typed TypeScript SDK files. This provides a convenient API for generating account-specific typed clients. Changes: - Export generateTypedClientContent, GenerateTypedClientOptions from codegen - Export DynamicToolClient, DynamicToolClientConfig from dynamic-client - Add StackOneToolSet.generateTypedClient() method that: - Fetches tools using existing fetchTools() infrastructure - Generates types.d.ts and index.ts files via writeTypedClientFiles() - Returns generated file paths and content
Configuration menu - View commit details
-
Copy full SHA for 667d1c1 - Browse repository at this point
Copy the full SHA 667d1c1View commit details -
refactor: move generate-dynamic-tools script to examples/
Relocate the dynamic tools generation script from scripts/ to examples/ to better reflect its purpose as a usage example rather than a build script. The script demonstrates how to use StackOneToolSet.generateTypedClient() to create typed TypeScript SDKs from tools fetched via MCP. It now uses the new integrated API instead of directly calling codegen functions.
Configuration menu - View commit details
-
Copy full SHA for b3fbb85 - Browse repository at this point
Copy the full SHA b3fbb85View commit details -
chore: update env example and lockfile
- Add STACKONE_ACCOUNT_IDS to .env_example for typed SDK generation - Update bun.lock with dependency changes
Configuration menu - View commit details
-
Copy full SHA for 4a4d05b - Browse repository at this point
Copy the full SHA 4a4d05bView commit details -
fix: use import type for DynamicToolClient in generated index.ts
DynamicToolClient is only used as a type annotation in generated wrapper functions, so use import type for proper type-only imports.
Configuration menu - View commit details
-
Copy full SHA for 26233ba - Browse repository at this point
Copy the full SHA 26233baView commit details -
Configuration menu - View commit details
-
Copy full SHA for f38bb35 - Browse repository at this point
Copy the full SHA f38bb35View commit details -
refactor: use untyped for TypeScript type generation
Replace custom JSON Schema to TypeScript conversion with the `untyped` library for more reliable and better-formatted type generation. Benefits: - Proper JSDoc comment formatting with multi-line support - Nested object properties get their own JSDoc descriptions - Better indentation and readability - @required tags for required properties - Maintained enum simplification (>20 values → base type) Changes: - Add untyped dependency for schema processing - Rewrite codegen.ts to convert JSON Schema to untyped input format - Make generateTypedClientContent async (untyped uses async resolution) - Update stackone.ts to await the now-async generation
Configuration menu - View commit details
-
Copy full SHA for 94744c9 - Browse repository at this point
Copy the full SHA 94744c9View commit details -
feat: add direct REST API support for unified actions in DynamicToolC…
…lient The RPC endpoint (/actions/rpc) does not support unified API actions (prefixed with 'unified_'). This change adds automatic detection and routing for unified actions to call the REST API directly instead. The parseUnifiedAction function converts action names to HTTP methods and URL paths: - unified_hris_list_employees -> GET /unified/hris/employees - unified_hris_get_employees -> GET /unified/hris/employees/{id} - unified_hris_create_employees -> POST /unified/hris/employees - unified_hris_update_employees -> PATCH /unified/hris/employees/{id} - unified_hris_list_employees_documents -> GET /unified/hris/employees/{id}/documents Non-unified actions continue to use the RPC endpoint as before.Configuration menu - View commit details
-
Copy full SHA for 799680f - Browse repository at this point
Copy the full SHA 799680fView commit details -
feat(examples): add AI-powered code generation example using typed SDK
Added ai-code-generation.ts example that demonstrates: - Generating typed client files from StackOne tool catalog via generateTypedClient() - Using Claude (Haiku 4.5) with structured output (Zod schema) for code generation - Executing generated TypeScript code against StackOne APIs Key improvements in code quality: - Uses Bun.env with type-safe module augmentation instead of process.env - Uses generateObject() from Vercel AI SDK for structured JSON output, eliminating markdown code block parsing hacks - Proper Zod schema validation for generated code structure - Cleaner environment variable handling with nullish coalescing (??) The example showcases the full workflow: typed client generation → AI code generation with structured output → code execution and result display.
Configuration menu - View commit details
-
Copy full SHA for 0f137e9 - Browse repository at this point
Copy the full SHA 0f137e9View commit details -
fix: handle nested query parameters in buildQueryString
Change buildQueryString to recursively handle nested objects like filter parameters. Instead of JSON.stringify, now uses bracket notation (e.g., filter[updated_after]=xxx) which is the expected format for the StackOne API.
Configuration menu - View commit details
-
Copy full SHA for 1b01353 - Browse repository at this point
Copy the full SHA 1b01353View commit details
Commits on Nov 28, 2025
-
feat(examples): improve ai-code-generation with caching and run history
- Add caching for typed client generation (skip if files exist) - Add --no-cache flag to force regeneration - Save run history with timestamps (generated code + output JSON) - Remove explanation field from schema (reduce tokens) - Remove baseUrl fallback from prompt (reduce tokens) - Clean up temporary _generated-code.ts after execution - Switch from Sonnet 4.5 to Haiku 4.5 for code generation - Add sample runs from test account (421095649644) - Exclude generated-dynamic-tools from biome linting
Configuration menu - View commit details
-
Copy full SHA for 6402ef7 - Browse repository at this point
Copy the full SHA 6402ef7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2336ddc - Browse repository at this point
Copy the full SHA 2336ddcView commit details -
feat(examples): add parallel API call example for ai-code-generation
Add run example demonstrating Promise.all for fetching department groups and work locations simultaneously with summary generation. Query: "Get all department groups and all work locations in parallel, then show a summary"
Configuration menu - View commit details
-
Copy full SHA for 77aa59d - Browse repository at this point
Copy the full SHA 77aa59dView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...codemode