Added Strands Agents sample#472
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wraps each Strands Agents sample with @@@SNIPSTART/@@@SNIPEND markers (typescript-strands-* labels) so the TypeScript integration guide in the documentation repo can pull snippets via snipsync. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 tasks
Switch @temporalio/strands-agents and @temporalio/workflow-streams from local tgz references to published npm packages, and bump all @temporalio/* deps from 1.17.2 to 1.21.1. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Regenerate pnpm-lock.yaml (was stale after the 1.21.1 dep bump, which failed CI's frozen-lockfile install) - Add missing shared config files (.gitignore, .npmrc, .nvmrc, .post-create, .prettierignore, .prettierrc) that the sample was created without - Run prettier over the sample source to satisfy format:check Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@strands-agents/sdk is ESM-only (every published version sets "type": "module"), which the repo's nodenext tsconfig cannot consume from a CommonJS sample. Under npm's flat node_modules this was masked, but pnpm's strict layout (used in CI) surfaces it as a build failure, and CommonJS also can't require() the SDK on Node 20. Convert the sample to ESM, following the fetch-esm template: - package.json: "type": "module"; run scripts via tsx (drop ts-node/nodemon); mocha runs under tsx; add @temporalio/common (was imported but undeclared) - tsconfig.json: module esnext / moduleResolution node / noEmit - worker.ts + tests: replace require.resolve/__dirname with import.meta.url (new src/mocha/workflows-path.ts helper for the test suite) - rename .eslintrc.js -> .eslintrc.cjs (CommonJS config under type: module) - exclude strands-agents from the shared tsconfig/eslintrc copies Also patch @temporalio/strands-agents@1.21.1 via pnpm.packageExtensions: it calls zod 4's z.toJSONSchema at runtime but only declares zod as a devDependency, so pnpm's strict layout leaves it unresolvable. Declaring the dependency links the correct zod v4 for that package only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
brianstrauch
commented
Jul 24, 2026
| }, | ||
| "@temporalio/strands-agents": { | ||
| "dependencies": { | ||
| "zod": "^4.0.0" |
Member
Author
There was a problem hiding this comment.
Compensating for temporalio/sdk-typescript#2256
THardy98
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Added a complete set of samples for the Temporal TypeScript SDK's Strands integration, mirroring the Python samples in
samples-python/strands_plugin.Features demonstrated:
TemporalAgentinvocationtool()+workflow.activityAsToolfor I/OBeforeToolCallEventhook +event.interrupt()StrandsFailureConverterAfterToolCallEventwith in-workflow and activity-dispatched callbacksTemporalMCPClientWorkflowStream🤖 Generated with Claude Code