@cursor/july 0.1.30 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/README.md +10 -5
- package/dist/bin/agent-serve.js +4 -4
- package/dist/channels/github/index.d.ts +1 -1
- package/dist/channels/github/index.js +1 -1
- package/dist/channels/slack/bot-mentions.d.ts +1 -1
- package/dist/channels/slack/bot-mentions.d.ts.map +1 -1
- package/dist/channels/slack/bot-mentions.js +1 -1
- package/dist/channels/slack/eval-directive.js +1 -1
- package/dist/channels/slack/external-policy.d.ts +1 -1
- package/dist/channels/slack/external-policy.js +1 -1
- package/dist/channels/slack/log.d.ts +1 -1
- package/dist/channels/slack/log.js +1 -1
- package/dist/channels/slack/post-update-delivery.d.ts +85 -0
- package/dist/channels/slack/post-update-delivery.d.ts.map +1 -0
- package/dist/channels/slack/setup.js +1 -1
- package/dist/channels/slack/socket-mode.js +1 -1
- package/dist/docs/404.html +3 -3
- package/dist/docs/ab.html +11 -11
- package/dist/docs/assets/{ab.md.BMCZ6Hd7.js → ab.md.DAQoJ-up.js} +6 -6
- package/dist/docs/assets/{ab.md.BMCZ6Hd7.lean.js → ab.md.DAQoJ-up.lean.js} +1 -1
- package/dist/docs/assets/{app.Cm4lsMc4.js → app.C2aVczmo.js} +1 -1
- package/dist/docs/assets/building-with-agents.md.CnHqvYDd.js +13 -0
- package/dist/docs/assets/{building-with-agents.md.CJCtZCyi.lean.js → building-with-agents.md.CnHqvYDd.lean.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.xgMnlUSO.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CYUFXspH.js → VPLocalSearchBox.DLEzetbD.js} +1 -1
- package/dist/docs/assets/chunks/{theme.CTjkX9vc.js → theme.BkOH1oMp.js} +2 -2
- package/dist/docs/assets/concepts.md.DFaQEFkA.js +4 -0
- package/dist/docs/assets/concepts.md.DFaQEFkA.lean.js +1 -0
- package/dist/docs/assets/deployment.md.9MYBuKM1.js +55 -0
- package/dist/docs/assets/deployment.md.9MYBuKM1.lean.js +1 -0
- package/dist/docs/assets/{evals.md.DYOjkRCX.js → evals.md.BIUoVZ6X.js} +13 -13
- package/dist/docs/assets/evals.md.BIUoVZ6X.lean.js +1 -0
- package/dist/docs/assets/{example-agents_approval-buddy.md.DFGBYLcc.js → example-agents_approval-buddy.md.BhEfleVx.js} +4 -4
- package/dist/docs/assets/{example-agents_approval-buddy.md.DFGBYLcc.lean.js → example-agents_approval-buddy.md.BhEfleVx.lean.js} +1 -1
- package/dist/docs/assets/example-agents_benny.md.2Et1qa8f.js +7 -0
- package/dist/docs/assets/{example-agents_bugbot.md.DelIdhxB.js → example-agents_bugbot.md.ByUexi5i.js} +5 -5
- package/dist/docs/assets/{example-agents_codebase-wiki.md.DC6sgwn0.js → example-agents_codebase-wiki.md.B4y-7ZVW.js} +6 -6
- package/dist/docs/assets/{example-agents_codebase-wiki.md.DC6sgwn0.lean.js → example-agents_codebase-wiki.md.B4y-7ZVW.lean.js} +1 -1
- package/dist/docs/assets/{example-agents_codeowners-review.md.Ku_tG2RY.js → example-agents_codeowners-review.md.D6ay4nvf.js} +6 -6
- package/dist/docs/assets/{example-agents_codeowners-review.md.Ku_tG2RY.lean.js → example-agents_codeowners-review.md.D6ay4nvf.lean.js} +1 -1
- package/dist/docs/assets/{example-agents_concierge.md.4rQTSMXt.js → example-agents_concierge.md.lL8rhYlj.js} +7 -7
- package/dist/docs/assets/{example-agents_fsd.md.CzgUrDfi.js → example-agents_fsd.md.DfNKQTHz.js} +5 -5
- package/dist/docs/assets/example-agents_index.md.DgGBwckv.js +2 -0
- package/dist/docs/assets/example-agents_index.md.DgGBwckv.lean.js +1 -0
- package/dist/docs/assets/{example-agents_knowledge-base.md.BPJiVueF.js → example-agents_knowledge-base.md.CzyZ2DCr.js} +5 -5
- package/dist/docs/assets/{example-agents_knowledge-base.md.BPJiVueF.lean.js → example-agents_knowledge-base.md.CzyZ2DCr.lean.js} +1 -1
- package/dist/docs/assets/example-agents_oncall.md.wFFXXEyW.js +10 -0
- package/dist/docs/assets/{example-agents_security-reviewer.md.Dhj_m7_B.js → example-agents_security-reviewer.md.Dkf1gyo6.js} +8 -8
- package/dist/docs/assets/example-agents_slack-agent.md.DvgvT4nn.js +5 -0
- package/dist/docs/assets/example-agents_weather-agent.md.Dmrcphhl.js +24 -0
- package/dist/docs/assets/example-agents_weather-agent.md.Dmrcphhl.lean.js +1 -0
- package/dist/docs/assets/{guides_agent-to-agent.md.Bpzgq2Pq.js → guides_agent-to-agent.md.Bmbxy-FA.js} +4 -4
- package/dist/docs/assets/guides_cloud-runtime.md.BZ2GA7Es.js +9 -0
- package/dist/docs/assets/{guides_github.md.DOOCpqsW.js → guides_github.md.R2QlpR75.js} +5 -5
- package/dist/docs/assets/{guides_human-in-the-loop.md.DlUqsp1S.js → guides_human-in-the-loop.md.BWvT7UqY.js} +1 -1
- package/dist/docs/assets/{guides_mcp-oauth.md.Dd8EgSem.js → guides_mcp-oauth.md.C7G7IykG.js} +5 -5
- package/dist/docs/assets/guides_mcp-oauth.md.C7G7IykG.lean.js +1 -0
- package/dist/docs/assets/guides_slack.md.zriQpU_9.js +47 -0
- package/dist/docs/assets/guides_slack.md.zriQpU_9.lean.js +1 -0
- package/dist/docs/assets/{guides_webhooks.md.wSOYas3X.js → guides_webhooks.md.DiAwSR42.js} +1 -1
- package/dist/docs/assets/{hillclimbing.md.DHNast08.js → hillclimbing.md.D9Y1_bYh.js} +1 -1
- package/dist/docs/assets/index.md.CZqbBJPB.js +20 -0
- package/dist/docs/assets/index.md.CZqbBJPB.lean.js +1 -0
- package/dist/docs/assets/{quickstart.md.BU6Iwi_9.js → quickstart.md.TnEXYgYW.js} +12 -12
- package/dist/docs/assets/{reference_agent-config.md.DrW2JUM8.js → reference_agent-config.md.kuN6-OxK.js} +1 -1
- package/dist/docs/assets/reference_cli.md.sD-IUWjg.js +73 -0
- package/dist/docs/assets/{reference_cli.md.ccoKOoXt.lean.js → reference_cli.md.sD-IUWjg.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.B9Q3TOve.js → reference_connections.md.DGqAsFXb.js} +3 -3
- package/dist/docs/assets/reference_http-api.md.CfVM_ICa.js +11 -0
- package/dist/docs/assets/{reference_project-layout.md.Bd_CKtNS.js → reference_project-layout.md.D8E6ZmHJ.js} +4 -4
- package/dist/docs/assets/{reference_project-layout.md.Bd_CKtNS.lean.js → reference_project-layout.md.D8E6ZmHJ.lean.js} +1 -1
- package/dist/docs/assets/{reference_schedules.md.w_F2mXB6.js → reference_schedules.md.gmfYzf_I.js} +1 -1
- package/dist/docs/assets/{reference_sessions.md.DLd6mvbv.js → reference_sessions.md.C_ouF_uf.js} +3 -3
- package/dist/docs/assets/{reference_tools.md.BRSDnTbN.js → reference_tools.md.BswAQM41.js} +3 -3
- package/dist/docs/assets/{scaffolding-agents.md.C3pTrmoE.js → scaffolding-agents.md.Bsr9Pwzu.js} +1 -1
- package/dist/docs/assets/{scaffolding-agents.md.C3pTrmoE.lean.js → scaffolding-agents.md.Bsr9Pwzu.lean.js} +1 -1
- package/dist/docs/assets/{storage.md.DRTdnFvd.js → storage.md.xZoiGM58.js} +3 -3
- package/dist/docs/assets/storage.md.xZoiGM58.lean.js +1 -0
- package/dist/docs/assets/troubleshooting.md.B5RVX_tL.js +1 -0
- package/dist/docs/assets/{troubleshooting.md.CmQkmnzC.lean.js → troubleshooting.md.B5RVX_tL.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +12 -12
- package/dist/docs/concepts.html +6 -6
- package/dist/docs/deployment.html +32 -32
- package/dist/docs/evals.html +19 -19
- package/dist/docs/example-agents/approval-buddy.html +9 -9
- package/dist/docs/example-agents/benny.html +11 -11
- package/dist/docs/example-agents/bugbot.html +10 -10
- package/dist/docs/example-agents/codebase-wiki.html +11 -11
- package/dist/docs/example-agents/codeowners-review.html +11 -11
- package/dist/docs/example-agents/concierge.html +12 -12
- package/dist/docs/example-agents/fsd.html +10 -10
- package/dist/docs/example-agents/index.html +7 -7
- package/dist/docs/example-agents/knowledge-base.html +10 -10
- package/dist/docs/example-agents/oncall.html +10 -10
- package/dist/docs/example-agents/security-reviewer.html +13 -13
- package/dist/docs/example-agents/slack-agent.html +10 -10
- package/dist/docs/example-agents/weather-agent.html +16 -16
- package/dist/docs/guides/agent-to-agent.html +9 -9
- package/dist/docs/guides/cloud-runtime.html +7 -7
- package/dist/docs/guides/github.html +10 -10
- package/dist/docs/guides/human-in-the-loop.html +7 -7
- package/dist/docs/guides/mcp-oauth.html +11 -11
- package/dist/docs/guides/slack.html +22 -17
- package/dist/docs/guides/webhooks.html +7 -7
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +7 -7
- package/dist/docs/index.html +9 -9
- package/dist/docs/quickstart.html +17 -17
- package/dist/docs/reference/agent-config.html +7 -7
- package/dist/docs/reference/channels.html +5 -5
- package/dist/docs/reference/cli.html +56 -48
- package/dist/docs/reference/connections.html +9 -9
- package/dist/docs/reference/hooks.html +5 -5
- package/dist/docs/reference/http-api.html +7 -7
- package/dist/docs/reference/instructions.html +5 -5
- package/dist/docs/reference/playground.html +5 -5
- package/dist/docs/reference/project-layout.html +9 -9
- package/dist/docs/reference/prompt.html +5 -5
- package/dist/docs/reference/schedules.html +7 -7
- package/dist/docs/reference/sessions.html +8 -8
- package/dist/docs/reference/skills.html +5 -5
- package/dist/docs/reference/subagents.html +5 -5
- package/dist/docs/reference/tools.html +9 -9
- package/dist/docs/scaffolding-agents.html +6 -6
- package/dist/docs/storage.html +9 -9
- package/dist/docs/troubleshooting.html +6 -6
- package/dist/evals/reporters.d.ts +1 -1
- package/dist/evals/reporters.js +1 -1
- package/dist/evals.d.ts +2 -2
- package/dist/files-backends/agent-store-presigned-url.d.ts +3 -0
- package/dist/files-backends/agent-store-presigned-url.d.ts.map +1 -0
- package/dist/files-backends/agent-store-presigned-url.js +1023 -0
- package/dist/files-backends/cursor-hosted.d.ts +87 -0
- package/dist/files-backends/cursor-hosted.d.ts.map +1 -0
- package/dist/files-backends/cursor-hosted.js +563 -0
- package/dist/files-backends/local-fs.d.ts +33 -0
- package/dist/files-backends/local-fs.d.ts.map +1 -0
- package/dist/files-backends/local-fs.js +199 -0
- package/dist/files.d.ts +139 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +89 -0
- package/dist/internal/ab-collector.js +2 -2
- package/dist/internal/ab-fold.js +1 -1
- package/dist/internal/cli-ax.d.ts +2 -2
- package/dist/internal/cli-ax.js +2 -2
- package/dist/internal/cli-deploy.d.ts +1 -1
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +7 -2
- package/dist/internal/cli-docs.d.ts +1 -1
- package/dist/internal/cli-docs.js +1 -1
- package/dist/internal/cli-github.js +13 -13
- package/dist/internal/cli-mcp-oauth.d.ts +1 -1
- package/dist/internal/cli-mcp-oauth.js +2 -2
- package/dist/internal/cli-mcp.d.ts +3 -3
- package/dist/internal/cli-mcp.js +4 -4
- package/dist/internal/cli-skills.js +1 -1
- package/dist/internal/cloud-turn-cost.d.ts +9 -1
- package/dist/internal/cloud-turn-cost.d.ts.map +1 -1
- package/dist/internal/cloud-turn-cost.js +14 -4
- package/dist/internal/cursor/account-mcp.js +5 -5
- package/dist/internal/cursor/backend-client.js +1 -1
- package/dist/internal/cursor/github-credentials.js +3 -3
- package/dist/internal/cursor-account-mcp-auth.d.ts +1 -1
- package/dist/internal/cursor-account-mcp-auth.js +1 -1
- package/dist/internal/cursor-event-relay.js +1 -1
- package/dist/internal/cursor-relay-core.d.ts +1 -1
- package/dist/internal/cursor-relay-core.d.ts.map +1 -1
- package/dist/internal/cursor-slack-relay.js +1 -1
- package/dist/internal/deploy-client.d.ts +6 -1
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +3 -2
- package/dist/internal/deploy-source.d.ts +2 -2
- package/dist/internal/deploy-source.js +2 -2
- package/dist/internal/discovery.js +2 -2
- package/dist/internal/distribution.d.ts +5 -5
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +6 -6
- package/dist/internal/docs-site.js +5 -5
- package/dist/internal/eval-run-store.js +8 -8
- package/dist/internal/evals-client.d.ts +1 -1
- package/dist/internal/evals-client.js +1 -1
- package/dist/internal/github-fanout.js +2 -2
- package/dist/internal/host-files.d.ts +29 -0
- package/dist/internal/host-files.d.ts.map +1 -0
- package/dist/internal/host-files.js +283 -0
- package/dist/internal/host-platforms.js +5 -5
- package/dist/internal/hosting.d.ts +1 -1
- package/dist/internal/hosting.js +1 -1
- package/dist/internal/http-channel.d.ts.map +1 -1
- package/dist/internal/http-channel.js +26 -0
- package/dist/internal/install-cursor-skills.d.ts +1 -1
- package/dist/internal/install-cursor-skills.d.ts.map +1 -1
- package/dist/internal/install-cursor-skills.js +33 -4
- package/dist/internal/json-dir-store.d.ts +32 -0
- package/dist/internal/json-dir-store.d.ts.map +1 -0
- package/dist/internal/local-control-plane.js +2 -2
- package/dist/internal/logs-client.d.ts +2 -2
- package/dist/internal/logs-client.js +2 -2
- package/dist/internal/mcp-endpoint.js +1 -1
- package/dist/internal/mcp-oauth.js +2 -2
- package/dist/internal/persistence-coordinator.d.ts +127 -0
- package/dist/internal/persistence-coordinator.d.ts.map +1 -0
- package/dist/internal/platform-schedule-sync.js +2 -2
- package/dist/internal/playground/toolchain.js +6 -6
- package/dist/internal/reminder-runner.js +13 -13
- package/dist/internal/resolved-connections.js +6 -6
- package/dist/internal/schedule-runner.js +1 -1
- package/dist/internal/sdk-runner.js +5 -5
- package/dist/internal/server.js +16 -16
- package/dist/internal/session-cost.d.ts +3 -2
- package/dist/internal/session-cost.d.ts.map +1 -1
- package/dist/internal/session-cost.js +7 -6
- package/dist/internal/session-engine.d.ts +31 -1
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +119 -31
- package/dist/internal/slack-provision-client.js +1 -1
- package/dist/internal/storage-coordinator.js +7 -7
- package/dist/internal/trajectory.js +2 -2
- package/dist/internal/turn-cost.d.ts +27 -0
- package/dist/internal/turn-cost.d.ts.map +1 -0
- package/dist/internal/turn-cost.js +83 -0
- package/dist/internal/update-check.d.ts +3 -3
- package/dist/internal/update-check.d.ts.map +1 -1
- package/dist/internal/update-check.js +5 -5
- package/dist/memory.d.ts +1 -1
- package/dist/memory.js +1 -1
- package/dist/multi-tenant.d.ts +80 -0
- package/dist/multi-tenant.d.ts.map +1 -0
- package/dist/multi-tenant.js +69 -0
- package/dist/persistence.d.ts +184 -0
- package/dist/persistence.d.ts.map +1 -0
- package/dist/playground/assets/index-50PKeJlG.css +1 -0
- package/dist/playground/assets/index-C0f2Wl1q.js +85 -0
- package/dist/playground/index.html +2 -2
- package/dist/storage.d.ts +1 -1
- package/dist/storage.js +1 -1
- package/dist/types.d.ts +120 -16
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +23 -23
- package/docs/ab.md +12 -12
- package/docs/building-with-agents.md +9 -9
- package/docs/concepts.md +11 -11
- package/docs/deployment.md +55 -43
- package/docs/evals.md +20 -20
- package/docs/example-agents/approval-buddy.md +9 -9
- package/docs/example-agents/benny.md +13 -13
- package/docs/example-agents/bugbot.md +6 -6
- package/docs/example-agents/codebase-wiki.md +8 -8
- package/docs/example-agents/codeowners-review.md +8 -8
- package/docs/example-agents/concierge.md +10 -10
- package/docs/example-agents/fsd.md +7 -7
- package/docs/example-agents/index.md +8 -8
- package/docs/example-agents/knowledge-base.md +9 -9
- package/docs/example-agents/oncall.md +7 -7
- package/docs/example-agents/security-reviewer.md +12 -12
- package/docs/example-agents/slack-agent.md +10 -10
- package/docs/example-agents/weather-agent.md +30 -26
- package/docs/guides/agent-to-agent.md +4 -4
- package/docs/guides/cloud-runtime.md +3 -3
- package/docs/guides/github.md +6 -6
- package/docs/guides/human-in-the-loop.md +1 -1
- package/docs/guides/mcp-oauth.md +9 -9
- package/docs/guides/slack.md +94 -21
- package/docs/guides/webhooks.md +1 -1
- package/docs/hillclimbing.md +3 -3
- package/docs/quickstart.md +18 -18
- package/docs/reference/agent-config.md +1 -1
- package/docs/reference/cli.md +110 -79
- package/docs/reference/connections.md +3 -3
- package/docs/reference/http-api.md +2 -2
- package/docs/reference/project-layout.md +7 -7
- package/docs/reference/schedules.md +1 -1
- package/docs/reference/sessions.md +7 -7
- package/docs/reference/tools.md +3 -3
- package/docs/scaffolding-agents.md +2 -2
- package/docs/storage.md +5 -5
- package/docs/troubleshooting.md +11 -10
- package/package.json +5 -2
- package/skills/ab/SKILL.md +5 -5
- package/skills/create-agent/SKILL.md +17 -17
- package/skills/debug/SKILL.md +10 -10
- package/skills/evals/SKILL.md +13 -13
- package/skills/framework-map/SKILL.md +3 -3
- package/skills/github/SKILL.md +11 -11
- package/skills/hillclimb/SKILL.md +9 -9
- package/skills/mcp-auth/SKILL.md +11 -11
- package/skills/setup-slack/SKILL.md +28 -28
- package/src/bin/agent-serve.ts +4 -4
- package/src/channels/github/index.ts +1 -1
- package/src/channels/slack/bot-mentions.ts +1 -1
- package/src/channels/slack/eval-directive.ts +1 -1
- package/src/channels/slack/external-policy.ts +1 -1
- package/src/channels/slack/log.ts +1 -1
- package/src/channels/slack/setup.ts +1 -1
- package/src/channels/slack/socket-mode.ts +1 -1
- package/src/evals/reporters.ts +1 -1
- package/src/evals.ts +2 -2
- package/src/files-backends/agent-store-presigned-url.ts +8 -0
- package/src/files-backends/cursor-hosted.ts +724 -0
- package/src/files-backends/local-fs.ts +178 -0
- package/src/files.ts +195 -0
- package/src/internal/ab-collector.ts +2 -2
- package/src/internal/ab-fold.ts +1 -1
- package/src/internal/cli-ax.ts +2 -2
- package/src/internal/cli-deploy.ts +7 -2
- package/src/internal/cli-docs.ts +1 -1
- package/src/internal/cli-github.ts +13 -13
- package/src/internal/cli-mcp-oauth.ts +2 -2
- package/src/internal/cli-mcp.ts +4 -4
- package/src/internal/cli-skills.ts +1 -1
- package/src/internal/cloud-turn-cost.ts +20 -4
- package/src/internal/cursor/account-mcp.ts +5 -5
- package/src/internal/cursor/backend-client.ts +1 -1
- package/src/internal/cursor/github-credentials.ts +3 -3
- package/src/internal/cursor-account-mcp-auth.ts +1 -1
- package/src/internal/cursor-event-relay.ts +1 -1
- package/src/internal/cursor-relay-core.ts +1 -1
- package/src/internal/cursor-slack-relay.ts +1 -1
- package/src/internal/deploy-client.ts +8 -2
- package/src/internal/deploy-source.ts +2 -2
- package/src/internal/discovery.ts +2 -2
- package/src/internal/distribution.ts +6 -6
- package/src/internal/docs-site.ts +5 -5
- package/src/internal/eval-run-store.ts +8 -8
- package/src/internal/evals-client.ts +1 -1
- package/src/internal/github-fanout.ts +2 -2
- package/src/internal/host-files.ts +372 -0
- package/src/internal/host-platforms.ts +5 -5
- package/src/internal/hosting.ts +1 -1
- package/src/internal/http-channel.ts +30 -0
- package/src/internal/install-cursor-skills.ts +31 -3
- package/src/internal/local-control-plane.ts +2 -2
- package/src/internal/logs-client.ts +2 -2
- package/src/internal/mcp-endpoint.ts +1 -1
- package/src/internal/mcp-oauth.ts +2 -2
- package/src/internal/platform-schedule-sync.ts +2 -2
- package/src/internal/playground/toolchain.ts +6 -6
- package/src/internal/reminder-runner.ts +13 -13
- package/src/internal/resolved-connections.ts +6 -6
- package/src/internal/schedule-runner.ts +1 -1
- package/src/internal/sdk-runner.ts +5 -5
- package/src/internal/server.ts +16 -16
- package/src/internal/session-cost.ts +7 -6
- package/src/internal/session-engine.ts +141 -28
- package/src/internal/slack-provision-client.ts +1 -1
- package/src/internal/storage-coordinator.ts +7 -7
- package/src/internal/trajectory.ts +2 -2
- package/src/internal/turn-cost.ts +110 -0
- package/src/internal/update-check.ts +6 -6
- package/src/memory.ts +1 -1
- package/src/storage.ts +1 -1
- package/src/types.ts +148 -16
- package/dist/docs/assets/building-with-agents.md.CJCtZCyi.js +0 -13
- package/dist/docs/assets/chunks/@localSearchIndexroot.CbQshWFK.js +0 -1
- package/dist/docs/assets/concepts.md.Cfb9b-k1.js +0 -4
- package/dist/docs/assets/concepts.md.Cfb9b-k1.lean.js +0 -1
- package/dist/docs/assets/deployment.md.TecHo0_2.js +0 -55
- package/dist/docs/assets/deployment.md.TecHo0_2.lean.js +0 -1
- package/dist/docs/assets/evals.md.DYOjkRCX.lean.js +0 -1
- package/dist/docs/assets/example-agents_benny.md.B0gjhI-p.js +0 -7
- package/dist/docs/assets/example-agents_index.md.D2PEVSXl.js +0 -2
- package/dist/docs/assets/example-agents_index.md.D2PEVSXl.lean.js +0 -1
- package/dist/docs/assets/example-agents_oncall.md.BG_sUMly.js +0 -10
- package/dist/docs/assets/example-agents_slack-agent.md.buLbgvBf.js +0 -5
- package/dist/docs/assets/example-agents_weather-agent.md.C9Qv-W0o.js +0 -24
- package/dist/docs/assets/example-agents_weather-agent.md.C9Qv-W0o.lean.js +0 -1
- package/dist/docs/assets/guides_cloud-runtime.md.gVzabdQL.js +0 -9
- package/dist/docs/assets/guides_mcp-oauth.md.Dd8EgSem.lean.js +0 -1
- package/dist/docs/assets/guides_slack.md.CjmJSvZS.js +0 -42
- package/dist/docs/assets/guides_slack.md.CjmJSvZS.lean.js +0 -1
- package/dist/docs/assets/index.md.CH_s5uZe.js +0 -20
- package/dist/docs/assets/index.md.CH_s5uZe.lean.js +0 -1
- package/dist/docs/assets/reference_cli.md.ccoKOoXt.js +0 -65
- package/dist/docs/assets/reference_http-api.md.BncLd3PZ.js +0 -11
- package/dist/docs/assets/storage.md.DRTdnFvd.lean.js +0 -1
- package/dist/docs/assets/troubleshooting.md.CmQkmnzC.js +0 -1
- package/dist/internal/model-pricing.d.ts +0 -49
- package/dist/internal/model-pricing.d.ts.map +0 -1
- package/dist/internal/model-pricing.js +0 -377
- package/dist/playground/assets/index-CquRB-l0.js +0 -85
- package/dist/playground/assets/index-Dj0bWpkn.css +0 -1
- package/src/internal/model-pricing.ts +0 -426
- /package/dist/docs/assets/{example-agents_benny.md.B0gjhI-p.lean.js → example-agents_benny.md.2Et1qa8f.lean.js} +0 -0
- /package/dist/docs/assets/{example-agents_bugbot.md.DelIdhxB.lean.js → example-agents_bugbot.md.ByUexi5i.lean.js} +0 -0
- /package/dist/docs/assets/{example-agents_concierge.md.4rQTSMXt.lean.js → example-agents_concierge.md.lL8rhYlj.lean.js} +0 -0
- /package/dist/docs/assets/{example-agents_fsd.md.CzgUrDfi.lean.js → example-agents_fsd.md.DfNKQTHz.lean.js} +0 -0
- /package/dist/docs/assets/{example-agents_oncall.md.BG_sUMly.lean.js → example-agents_oncall.md.wFFXXEyW.lean.js} +0 -0
- /package/dist/docs/assets/{example-agents_security-reviewer.md.Dhj_m7_B.lean.js → example-agents_security-reviewer.md.Dkf1gyo6.lean.js} +0 -0
- /package/dist/docs/assets/{example-agents_slack-agent.md.buLbgvBf.lean.js → example-agents_slack-agent.md.DvgvT4nn.lean.js} +0 -0
- /package/dist/docs/assets/{guides_agent-to-agent.md.Bpzgq2Pq.lean.js → guides_agent-to-agent.md.Bmbxy-FA.lean.js} +0 -0
- /package/dist/docs/assets/{guides_cloud-runtime.md.gVzabdQL.lean.js → guides_cloud-runtime.md.BZ2GA7Es.lean.js} +0 -0
- /package/dist/docs/assets/{guides_github.md.DOOCpqsW.lean.js → guides_github.md.R2QlpR75.lean.js} +0 -0
- /package/dist/docs/assets/{guides_human-in-the-loop.md.DlUqsp1S.lean.js → guides_human-in-the-loop.md.BWvT7UqY.lean.js} +0 -0
- /package/dist/docs/assets/{guides_webhooks.md.wSOYas3X.lean.js → guides_webhooks.md.DiAwSR42.lean.js} +0 -0
- /package/dist/docs/assets/{hillclimbing.md.DHNast08.lean.js → hillclimbing.md.D9Y1_bYh.lean.js} +0 -0
- /package/dist/docs/assets/{quickstart.md.BU6Iwi_9.lean.js → quickstart.md.TnEXYgYW.lean.js} +0 -0
- /package/dist/docs/assets/{reference_agent-config.md.DrW2JUM8.lean.js → reference_agent-config.md.kuN6-OxK.lean.js} +0 -0
- /package/dist/docs/assets/{reference_connections.md.B9Q3TOve.lean.js → reference_connections.md.DGqAsFXb.lean.js} +0 -0
- /package/dist/docs/assets/{reference_http-api.md.BncLd3PZ.lean.js → reference_http-api.md.CfVM_ICa.lean.js} +0 -0
- /package/dist/docs/assets/{reference_schedules.md.w_F2mXB6.lean.js → reference_schedules.md.gmfYzf_I.lean.js} +0 -0
- /package/dist/docs/assets/{reference_sessions.md.DLd6mvbv.lean.js → reference_sessions.md.C_ouF_uf.lean.js} +0 -0
- /package/dist/docs/assets/{reference_tools.md.BRSDnTbN.lean.js → reference_tools.md.BswAQM41.lean.js} +0 -0
|
@@ -10,7 +10,7 @@ scaffolding, channels, verification, evals, and measured improvement.
|
|
|
10
10
|
|
|
11
11
|
## What can a coding agent build for me?
|
|
12
12
|
|
|
13
|
-
A coding agent can take
|
|
13
|
+
A coding agent can take an Agent SDK project from an idea to a
|
|
14
14
|
verified first version. It can:
|
|
15
15
|
|
|
16
16
|
- Create the project and choose the smallest useful surface
|
|
@@ -65,7 +65,7 @@ the workflow, commands, and common mistakes for that task.
|
|
|
65
65
|
|
|
66
66
|
> [!NOTE]
|
|
67
67
|
> The skill bodies use the current `agent-serve` CLI names. This guide
|
|
68
|
-
> uses the upcoming `
|
|
68
|
+
> uses the upcoming `agent-sdk` names. See
|
|
69
69
|
> [Run the CLI](./README.md#run-the-cli) for the full rename table.
|
|
70
70
|
|
|
71
71
|
## How does a coding agent verify its work?
|
|
@@ -74,19 +74,19 @@ The coding agent should discover the project, test each server tool,
|
|
|
74
74
|
run a real turn, and finish with evals:
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
agent-sdk validate --dir .
|
|
78
|
+
agent-sdk info --dir . --json
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
agent-sdk call inspect_pr --dir . \
|
|
81
81
|
--input '{"prUrl":"https://github.com/acme/checkout/pull/42"}'
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
agent-sdk run --dir . \
|
|
84
84
|
--message "Is https://github.com/acme/checkout/pull/42 ready to approve?"
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
agent-sdk trajectory --events .agent-sdk/traces/<sessionId>.ndjson
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
agent-sdk eval --dir . --list
|
|
89
|
+
agent-sdk eval --dir . --json
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
`serve` boots without an API key, which is enough to check channel
|
package/docs/concepts.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "How
|
|
2
|
+
title: "How the Agent SDK works"
|
|
3
3
|
description: "Understand projects, sessions, event streams, channels, and runtimes in plain language."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# How
|
|
6
|
+
# How the Agent SDK works
|
|
7
7
|
|
|
8
|
-
An agent is a folder of instructions and capabilities.
|
|
8
|
+
An agent is a folder of instructions and capabilities. The Agent SDK
|
|
9
9
|
discovers those files, runs conversations, and records what happened.
|
|
10
10
|
|
|
11
11
|
## What happens when someone sends a message?
|
|
@@ -17,7 +17,7 @@ Follow one message through the system:
|
|
|
17
17
|
2. The channel starts a session or continues an existing one.
|
|
18
18
|
3. The runtime gives the model its instructions, tools, and workspace.
|
|
19
19
|
4. The model replies and can call tools along the way.
|
|
20
|
-
5.
|
|
20
|
+
5. The Agent SDK appends every message and tool call to the session's
|
|
21
21
|
event stream.
|
|
22
22
|
|
|
23
23
|
The channel is the front door. The runtime does the work. The event
|
|
@@ -26,7 +26,7 @@ stream is the record you inspect later.
|
|
|
26
26
|
## How do files become an agent?
|
|
27
27
|
|
|
28
28
|
Each capability has a home in the project. The path tells
|
|
29
|
-
|
|
29
|
+
the Agent SDK what to load. The filename becomes the capability's
|
|
30
30
|
name. For example, `agent/tools/get_weather.ts` creates a tool named
|
|
31
31
|
`get_weather`.
|
|
32
32
|
|
|
@@ -42,13 +42,13 @@ name. For example, `agent/tools/get_weather.ts` creates a tool named
|
|
|
42
42
|
| `evals/**/*.eval.ts` | Repeatable checks at the project root |
|
|
43
43
|
|
|
44
44
|
Other folders add subagents, hooks, schedules, and workspace files. You
|
|
45
|
-
don't register them elsewhere. Run `
|
|
45
|
+
don't register them elsewhere. Run `agent-sdk validate` to catch
|
|
46
46
|
invalid files before serving the project.
|
|
47
47
|
|
|
48
48
|
See [Project layout](./reference/project-layout.md) for every supported
|
|
49
49
|
path.
|
|
50
50
|
|
|
51
|
-
## How does
|
|
51
|
+
## How does the Agent SDK identify a conversation?
|
|
52
52
|
|
|
53
53
|
A session is one durable conversation. It has two identifiers:
|
|
54
54
|
|
|
@@ -75,7 +75,7 @@ Each session writes an append-only NDJSON file:
|
|
|
75
75
|
|
|
76
76
|
Sessions and their event streams survive server restarts. The
|
|
77
77
|
playground renders the stream. Evals assert against it. The
|
|
78
|
-
`
|
|
78
|
+
`agent-sdk trajectory` command turns a saved stream into a short
|
|
79
79
|
summary.
|
|
80
80
|
|
|
81
81
|
When a run surprises you, inspect its event stream first. See
|
|
@@ -117,14 +117,14 @@ Choose a runtime in `agent/agent.ts`:
|
|
|
117
117
|
|
|
118
118
|
Use the local runtime when the host has the tools and files the agent
|
|
119
119
|
needs. Use the cloud runtime when each turn needs an isolated repository
|
|
120
|
-
checkout. `
|
|
120
|
+
checkout. `agent-sdk validate` warns when a cloud agent uses a
|
|
121
121
|
local-only capability.
|
|
122
122
|
|
|
123
123
|
See [Cloud runtime](./guides/cloud-runtime.md) for setup and trade-offs.
|
|
124
124
|
|
|
125
125
|
## What files can a local session access?
|
|
126
126
|
|
|
127
|
-
Each local session gets its own workspace.
|
|
127
|
+
Each local session gets its own workspace. The Agent SDK writes the
|
|
128
128
|
instructions as `AGENTS.md`, installs authored skills, copies sandbox
|
|
129
129
|
files, and adds agent tool scripts.
|
|
130
130
|
|
|
@@ -137,7 +137,7 @@ commands already use temporary state.
|
|
|
137
137
|
Durable local state uses this shape:
|
|
138
138
|
|
|
139
139
|
```text
|
|
140
|
-
<project>/.
|
|
140
|
+
<project>/.agent-sdk/
|
|
141
141
|
sessions/<id>/events.ndjson
|
|
142
142
|
sessions/<id>/workspace/
|
|
143
143
|
traces/<sessionId>.ndjson
|
package/docs/deployment.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Deployment"
|
|
3
|
-
description: "Deploy
|
|
3
|
+
description: "Deploy the Agent SDK with Cursor-managed hosting or on infrastructure you control."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Deploy
|
|
6
|
+
# Deploy the Agent SDK
|
|
7
7
|
|
|
8
8
|
Both options run the same agent project and HTTP API. Channel delivery
|
|
9
9
|
paths differ. Cursor-managed hosting is preferred for most agents.
|
|
@@ -56,10 +56,10 @@ creating the deployment. Names beginning with `CURSOR_` are reserved.
|
|
|
56
56
|
|
|
57
57
|
For `defineConnection({ url, oauth: true })`, declare
|
|
58
58
|
`MCP_OAUTH_<CONNECTION>_*` in `secretNames`, authorize with
|
|
59
|
-
`
|
|
59
|
+
`agent-sdk mcp oauth <connection> --store`, then redeploy. See
|
|
60
60
|
[Host MCP OAuth](./guides/mcp-oauth.md).
|
|
61
61
|
|
|
62
|
-
Run `
|
|
62
|
+
Run `agent-sdk validate` before deploying. It reports invalid domains and
|
|
63
63
|
secret names as warnings, so fix them even when validation exits zero.
|
|
64
64
|
|
|
65
65
|
### Deploy from Git
|
|
@@ -68,10 +68,10 @@ Sign in, validate the project, and deploy it:
|
|
|
68
68
|
|
|
69
69
|
```bash
|
|
70
70
|
cd my-agent
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
agent-sdk login
|
|
72
|
+
agent-sdk whoami
|
|
73
|
+
agent-sdk validate
|
|
74
|
+
agent-sdk deploy
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
Inside a Git checkout, `deploy` infers the HTTPS `origin` URL, current
|
|
@@ -79,7 +79,7 @@ branch or detached commit, agent path, and deployment slug. Explicit
|
|
|
79
79
|
flags override each value:
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
|
-
|
|
82
|
+
agent-sdk deploy \
|
|
83
83
|
--repo https://github.com/acme/agents \
|
|
84
84
|
--ref main \
|
|
85
85
|
--path agents/weather \
|
|
@@ -108,9 +108,9 @@ The command waits up to ten minutes for a running engine. Use
|
|
|
108
108
|
it separately:
|
|
109
109
|
|
|
110
110
|
```bash
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
agent-sdk deployments
|
|
112
|
+
agent-sdk deployment weather-agent
|
|
113
|
+
agent-sdk logs --prod --slug weather-agent
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
### Set deployment secrets
|
|
@@ -119,9 +119,9 @@ A deployment must exist before you can set its secrets. Omit values from
|
|
|
119
119
|
the command line to enter them through the hidden prompt:
|
|
120
120
|
|
|
121
121
|
```bash
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
agent-sdk secrets set weather-agent WEATHER_API_KEY
|
|
123
|
+
agent-sdk secrets list weather-agent
|
|
124
|
+
agent-sdk deploy --dir . --slug weather-agent
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
The engine reads secret changes on its next deploy. `secrets list`
|
|
@@ -151,18 +151,18 @@ can't add this header.
|
|
|
151
151
|
Use `--prod` with the normal client commands:
|
|
152
152
|
|
|
153
153
|
```bash
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
agent-sdk playground --prod --slug weather-agent
|
|
155
|
+
agent-sdk chat --prod --slug weather-agent
|
|
156
|
+
agent-sdk run --prod --slug weather-agent --message "Forecast for Paris"
|
|
157
|
+
agent-sdk sessions --prod --slug weather-agent
|
|
158
|
+
agent-sdk logs --prod --slug weather-agent
|
|
159
159
|
```
|
|
160
160
|
|
|
161
161
|
Keep `playground --prod` running while the playground is open. Press
|
|
162
162
|
Ctrl-C to stop it.
|
|
163
163
|
|
|
164
164
|
The first deployment prints a reusable alias token once. Store it
|
|
165
|
-
immediately. Run `
|
|
165
|
+
immediately. Run `agent-sdk deployment weather-agent` to retrieve the
|
|
166
166
|
stable alias URL later. The token remains valid until rotation and can't
|
|
167
167
|
be retrieved.
|
|
168
168
|
|
|
@@ -177,7 +177,7 @@ curl "$AGENT_ALIAS_URL/v1/health" \
|
|
|
177
177
|
rotate it. The old token stops working immediately:
|
|
178
178
|
|
|
179
179
|
```bash
|
|
180
|
-
|
|
180
|
+
agent-sdk rotate-token weather-agent
|
|
181
181
|
```
|
|
182
182
|
|
|
183
183
|
### Connect GitHub
|
|
@@ -187,7 +187,7 @@ Let the hosted engine pull Cursor SCM events. Repeat
|
|
|
187
187
|
agent:
|
|
188
188
|
|
|
189
189
|
```bash
|
|
190
|
-
|
|
190
|
+
agent-sdk deploy --dir . \
|
|
191
191
|
--slug pr-approver \
|
|
192
192
|
--cursor-events-repo acme/checkout \
|
|
193
193
|
--cursor-events-repo acme/payments
|
|
@@ -231,13 +231,25 @@ import { slackChannel } from "@cursor/july/channels/slack";
|
|
|
231
231
|
export default slackChannel({ envPrefix: "PR_APPROVER" });
|
|
232
232
|
```
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
Provision the dedicated app from the dashboard. Open the deployment
|
|
235
|
+
under **Deployed Agents** at
|
|
236
|
+
[cursor.com/dashboard](https://cursor.com/dashboard), switch to
|
|
237
|
+
**Details**, and expand **Slack** under **Integrations**. **Add to
|
|
238
|
+
Slack** connects the workspace with a one-time authorization, and
|
|
239
|
+
**Create Slack app** creates and installs the app, then stores its
|
|
240
|
+
tokens as deployment secrets automatically. Redeploy when prompted so
|
|
241
|
+
the running agent picks them up. See
|
|
242
|
+
[Provision from the dashboard](./guides/slack.md#provision-from-the-dashboard-hosted-deployments)
|
|
243
|
+
for the walkthrough, including workspace-admin approval.
|
|
244
|
+
|
|
245
|
+
If you created the Slack app by hand instead, set its tokens as
|
|
246
|
+
deployment secrets yourself. The prefix selects the secret names:
|
|
235
247
|
|
|
236
248
|
```bash
|
|
237
|
-
|
|
249
|
+
agent-sdk secrets set pr-approver \
|
|
238
250
|
PR_APPROVER_SLACK_BOT_TOKEN \
|
|
239
251
|
PR_APPROVER_SLACK_APP_TOKEN
|
|
240
|
-
|
|
252
|
+
agent-sdk deploy --dir . --slug pr-approver
|
|
241
253
|
```
|
|
242
254
|
|
|
243
255
|
Without `envPrefix`, a dedicated app reads `SLACK_BOT_TOKEN` and
|
|
@@ -251,17 +263,17 @@ continues to point at the active generation. Follow the same source rules
|
|
|
251
263
|
from [Deploy from Git](#deploy-from-git).
|
|
252
264
|
|
|
253
265
|
```bash
|
|
254
|
-
|
|
255
|
-
|
|
266
|
+
agent-sdk deploy --dir /path/to/my-agent --slug weather-agent
|
|
267
|
+
agent-sdk stop weather-agent
|
|
256
268
|
```
|
|
257
269
|
|
|
258
270
|
`stop` waits for the deployment to stop unless you pass `--no-wait`.
|
|
259
271
|
See the [CLI reference](./reference/cli.md#deploy) for the full command
|
|
260
272
|
reference.
|
|
261
273
|
|
|
262
|
-
## Self-host
|
|
274
|
+
## Self-host the Agent SDK
|
|
263
275
|
|
|
264
|
-
|
|
276
|
+
The Agent SDK runs as a Node HTTP server on Node 22.13 or newer. You can host
|
|
265
277
|
it on a VM, container platform, or ECS.
|
|
266
278
|
|
|
267
279
|
### The security model in one minute
|
|
@@ -284,13 +296,13 @@ A self-hosted server can read these credentials.
|
|
|
284
296
|
|
|
285
297
|
| Credential | Used for | Provide it as |
|
|
286
298
|
| --- | --- | --- |
|
|
287
|
-
| Cursor API key | model turns, cloud runtime, Cursor account MCP connections | `
|
|
299
|
+
| Cursor API key | model turns, cloud runtime, Cursor account MCP connections | `agent-sdk login` (stores a revocable key), `CURSOR_API_KEY`, or `--api-key` / `serve({ apiKey })` |
|
|
288
300
|
| Slack tokens | Slack channels | `<PREFIX>_SLACK_BOT_TOKEN` + `<PREFIX>_SLACK_APP_TOKEN` per agent |
|
|
289
301
|
| GitHub webhook secret | delivery signature verification | `GITHUB_WEBHOOK_SECRET`, same value on server and signer |
|
|
290
302
|
| GitHub API | outbound API calls | a GitHub App (`GITHUB_APP_ID` + `GITHUB_APP_PRIVATE_KEY` + installation id) or `GITHUB_TOKEN` / `gh auth login` |
|
|
291
|
-
| MCP connection tokens | authored MCP connections | env vars your `mcp-connections/*.ts` read, or host OAuth secrets from `
|
|
303
|
+
| MCP connection tokens | authored MCP connections | env vars your `mcp-connections/*.ts` read, or host OAuth secrets from `agent-sdk mcp oauth <name> --store` (`MCP_OAUTH_*`; see [Host MCP OAuth](./guides/mcp-oauth.md)) |
|
|
292
304
|
|
|
293
|
-
Use a dedicated Cursor key per host. `
|
|
305
|
+
Use a dedicated Cursor key per host. `agent-sdk whoami` shows the active
|
|
294
306
|
credential. `logout` removes the stored key from the host; revoke the key
|
|
295
307
|
in the Cursor dashboard to invalidate it. See
|
|
296
308
|
[CLI authentication](./reference/cli.md#login--logout--whoami) for
|
|
@@ -311,12 +323,12 @@ the supervisor environment:
|
|
|
311
323
|
|
|
312
324
|
```bash
|
|
313
325
|
export CURSOR_API_KEY="<cursor-api-key>"
|
|
314
|
-
export
|
|
326
|
+
export AGENT_SDK_BEARER_TOKEN="$(openssl rand -hex 32)"
|
|
315
327
|
|
|
316
328
|
# the server: all agents under one port
|
|
317
|
-
|
|
329
|
+
agent-sdk serve --dir /srv/agents --port 3000 --host 127.0.0.1 \
|
|
318
330
|
--state-root /var/lib/agent-serve \
|
|
319
|
-
--bearer-token "$
|
|
331
|
+
--bearer-token "$AGENT_SDK_BEARER_TOKEN"
|
|
320
332
|
```
|
|
321
333
|
|
|
322
334
|
Slack Socket Mode needs no inbound network. For GitHub, prefer
|
|
@@ -332,12 +344,12 @@ forwarding requires repo-admin access; organization forwarding with
|
|
|
332
344
|
|
|
333
345
|
```bash
|
|
334
346
|
export GITHUB_WEBHOOK_SECRET="$(openssl rand -hex 32)"
|
|
335
|
-
|
|
347
|
+
agent-sdk github doctor --install
|
|
336
348
|
gh auth login
|
|
337
349
|
|
|
338
350
|
# GitHub agents only: ONE forwarder relaying live deliveries to loopback
|
|
339
351
|
GITHUB_TOKEN= GH_TOKEN= \
|
|
340
|
-
|
|
352
|
+
agent-sdk github forward --dir /srv/agents --repo owner/repo
|
|
341
353
|
```
|
|
342
354
|
|
|
343
355
|
Run long-lived processes under a supervisor. systemd survives reboots;
|
|
@@ -352,13 +364,13 @@ checks), and each agent also serves `/<slug>/v1/health`.
|
|
|
352
364
|
### Containers
|
|
353
365
|
|
|
354
366
|
Build the image with Node 22.13 or newer, the agent source, and its
|
|
355
|
-
package dependencies. Run `
|
|
367
|
+
package dependencies. Run `agent-sdk serve` as a non-root user:
|
|
356
368
|
|
|
357
369
|
```bash
|
|
358
|
-
|
|
370
|
+
agent-sdk serve --dir /srv/agents --mode multi \
|
|
359
371
|
--host 0.0.0.0 --port 3000 \
|
|
360
372
|
--state-root /var/lib/agent-serve \
|
|
361
|
-
--bearer-token "$
|
|
373
|
+
--bearer-token "$AGENT_SDK_BEARER_TOKEN"
|
|
362
374
|
```
|
|
363
375
|
|
|
364
376
|
Mount the state root as a persistent volume and inject secrets at
|
|
@@ -372,7 +384,7 @@ its directory name on one port. One process, one state root, one
|
|
|
372
384
|
credential:
|
|
373
385
|
|
|
374
386
|
```bash
|
|
375
|
-
|
|
387
|
+
agent-sdk serve --dir /srv/agents
|
|
376
388
|
# index at /, each agent at /<slug>/v1/*, /<slug>/playground
|
|
377
389
|
```
|
|
378
390
|
|
|
@@ -410,7 +422,7 @@ survive a restart; re-run or recreate them afterward.
|
|
|
410
422
|
|
|
411
423
|
### Observability
|
|
412
424
|
|
|
413
|
-
Use [`
|
|
425
|
+
Use [`agent-sdk logs`](./reference/cli.md#logs) for runtime output,
|
|
414
426
|
[hooks](./reference/hooks.md) for metrics export, and
|
|
415
427
|
[session traces](./reference/sessions.md#how-do-i-inspect-a-saved-event-stream)
|
|
416
428
|
for incident review.
|
package/docs/evals.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Evals"
|
|
3
|
-
description: "Define repeatable checks with defineEval, run them with
|
|
3
|
+
description: "Define repeatable checks with defineEval, run them with agent-sdk eval, and use them as regression checks."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Evals
|
|
@@ -24,7 +24,7 @@ accepted a message, and did what you asserted.
|
|
|
24
24
|
|
|
25
25
|
## Define evals with `defineEval`
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
The Agent SDK discovers evals under the project-root `evals/` directory,
|
|
28
28
|
in `.eval.ts` or `.eval.js` files. That's a sibling of `agent/`, never
|
|
29
29
|
inside it (`agent/evals/` is silently ignored). TypeScript is the normal
|
|
30
30
|
authoring format.
|
|
@@ -213,13 +213,13 @@ Run the CLI under Node 22.13 or newer. Do not use Bun. Its HTTP/2 client
|
|
|
213
213
|
breaks tool-result streams and causes eval turns to fail.
|
|
214
214
|
|
|
215
215
|
```bash
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
216
|
+
agent-sdk eval --dir . --list # discover only
|
|
217
|
+
agent-sdk eval --dir . # run all
|
|
218
|
+
agent-sdk eval --dir . builds/checkout # one datapoint
|
|
219
|
+
agent-sdk eval --dir . builds search # several ids or prefixes
|
|
220
|
+
agent-sdk eval --dir . --tag smoke --tag pull-request # any matching tag
|
|
221
|
+
agent-sdk eval --dir . --json --no-stream # machine-readable results
|
|
222
|
+
agent-sdk eval --dir . --verbose # logs + reply snippets
|
|
223
223
|
```
|
|
224
224
|
|
|
225
225
|
Id filters use OR semantics. Each filter selects an exact id and its
|
|
@@ -230,11 +230,11 @@ match both groups.
|
|
|
230
230
|
|
|
231
231
|
`eval` boots an ephemeral server on port 0 with a temp state root
|
|
232
232
|
outside the project, so cases don't inherit ambient monorepo rules and
|
|
233
|
-
don't pollute `.
|
|
233
|
+
don't pollute `.agent-sdk/`. Point `--url` at a running server to eval
|
|
234
234
|
a live agent instead:
|
|
235
235
|
|
|
236
236
|
```bash
|
|
237
|
-
|
|
237
|
+
agent-sdk eval --dir . \
|
|
238
238
|
--url http://127.0.0.1:3000/weather-agent \
|
|
239
239
|
--bearer-token "$AGENT_TOKEN"
|
|
240
240
|
```
|
|
@@ -248,7 +248,7 @@ keep live progress off stderr. A TTY streams turn progress by default.
|
|
|
248
248
|
`--verbose` still writes `t.log` lines to stderr and adds reply snippets
|
|
249
249
|
to text results.
|
|
250
250
|
|
|
251
|
-
Model turns need a Cursor credential from `
|
|
251
|
+
Model turns need a Cursor credential from `agent-sdk login` or
|
|
252
252
|
`CURSOR_API_KEY`.
|
|
253
253
|
|
|
254
254
|
The exit code is `0` when every selected case passes, `1` when any case
|
|
@@ -293,7 +293,7 @@ Start the server with `--dev`, open the playground, and choose
|
|
|
293
293
|
the resulting session trace.
|
|
294
294
|
|
|
295
295
|
```bash
|
|
296
|
-
|
|
296
|
+
agent-sdk serve --dir . --dev
|
|
297
297
|
```
|
|
298
298
|
|
|
299
299
|
Playground runs target the live server instead of an ephemeral one.
|
|
@@ -318,13 +318,13 @@ On `--prod` / `--url`, the CLI prints the Eval ID as soon as the batch is
|
|
|
318
318
|
accepted (and a Playground deep link with `?view=evals&evalRunId=…`):
|
|
319
319
|
|
|
320
320
|
```bash
|
|
321
|
-
|
|
321
|
+
agent-sdk eval --prod --slug vulnerability-scanner --tag deepsec
|
|
322
322
|
# Eval ID: evalrun_…
|
|
323
|
-
# Cancel:
|
|
323
|
+
# Cancel: agent-sdk eval cancel evalrun_… --prod --slug vulnerability-scanner
|
|
324
324
|
# Playground: https://…/playground?view=evals&evalRunId=evalrun_…
|
|
325
325
|
|
|
326
|
-
|
|
327
|
-
|
|
326
|
+
agent-sdk eval cancel evalrun_… --prod --slug vulnerability-scanner
|
|
327
|
+
agent-sdk eval status evalrun_… --prod --slug vulnerability-scanner
|
|
328
328
|
```
|
|
329
329
|
|
|
330
330
|
The Evals tab prefers the server’s in-flight batch (`activeRunId`) over a
|
|
@@ -357,8 +357,8 @@ The right fixture depends on the surface under test.
|
|
|
357
357
|
| Agent surface | Fixture |
|
|
358
358
|
| --- | --- |
|
|
359
359
|
| Chat / domain assistant | A canonical prompt string, chosen once and frozen |
|
|
360
|
-
| Tool-heavy | Run `
|
|
361
|
-
| GitHub webhook | `
|
|
360
|
+
| Tool-heavy | Run `agent-sdk call <tool>` first to pin what the tool returns, then freeze the prompt that triggers it |
|
|
361
|
+
| GitHub webhook | `agent-sdk github replay <pr> --events '*' --dry-run --out fixtures/github` snapshots real payloads for offline replay ([GitHub guide](./guides/github.md)) |
|
|
362
362
|
| PR reviewer with host preparation | Diff, metadata, and gold labels pinned to commit SHAs; keep any live PR matrix small |
|
|
363
363
|
| Workspace-dependent | `workspaceFiles` in `t.send` options, never developer-machine paths |
|
|
364
364
|
|
|
@@ -398,7 +398,7 @@ suite into a list of checks that no longer protect anything.
|
|
|
398
398
|
## Compare variants on live traffic
|
|
399
399
|
|
|
400
400
|
Use `defineAB` to compare variant metrics on live sessions. It is not a
|
|
401
|
-
test runner and has no `
|
|
401
|
+
test runner and has no `agent-sdk ab` command. Keep `defineEval` as the
|
|
402
402
|
regression ratchet. Eval sessions do not enroll or change live metrics.
|
|
403
403
|
See [Live A/B metrics](./ab.md) for assignment, behavior, collection,
|
|
404
404
|
and inspection.
|
|
@@ -96,14 +96,14 @@ If you enable Giphy in a hosted copy, declare its secret and
|
|
|
96
96
|
## Validate without approving a PR
|
|
97
97
|
|
|
98
98
|
```bash
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
agent-sdk validate --dir examples/approval-buddy
|
|
100
|
+
agent-sdk info --dir examples/approval-buddy --json
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
List the deterministic roster:
|
|
104
104
|
|
|
105
105
|
```bash
|
|
106
|
-
|
|
106
|
+
agent-sdk call list_buddies \
|
|
107
107
|
--dir examples/approval-buddy \
|
|
108
108
|
--input '{}'
|
|
109
109
|
```
|
|
@@ -112,7 +112,7 @@ Set a known merged PR, then run the read-only precheck:
|
|
|
112
112
|
|
|
113
113
|
```bash
|
|
114
114
|
MERGED_PR_URL=https://github.com/your-org/your-repo/pull/123
|
|
115
|
-
|
|
115
|
+
agent-sdk call prepare_review \
|
|
116
116
|
--dir examples/approval-buddy \
|
|
117
117
|
--input "{\"prUrl\":\"$MERGED_PR_URL\"}"
|
|
118
118
|
```
|
|
@@ -121,7 +121,7 @@ The result should decline because the PR is no longer open. `prepare_review`
|
|
|
121
121
|
never posts an approval.
|
|
122
122
|
|
|
123
123
|
> [!CAUTION]
|
|
124
|
-
> Don't use `
|
|
124
|
+
> Don't use `agent-sdk call approve_pr` as a smoke test. The tool has no
|
|
125
125
|
> `needsApproval` gate and posts a real GitHub review when the PR qualifies.
|
|
126
126
|
|
|
127
127
|
## See why preparation is separate
|
|
@@ -175,7 +175,7 @@ posts reviews, statuses, and comments. When adapting the example, start with
|
|
|
175
175
|
|
|
176
176
|
Every terminal status is green by design. Declines and crashed turns are
|
|
177
177
|
informational, not merge-blocking. This is a product decision in the example,
|
|
178
|
-
not an
|
|
178
|
+
not an Agent SDK default.
|
|
179
179
|
|
|
180
180
|
A successful turn that never calls `approve_pr` leaves the pending status in
|
|
181
181
|
place. The channel clears it on `approve_pr` results and `turn.failed`, but
|
|
@@ -190,7 +190,7 @@ test.
|
|
|
190
190
|
Start the dev server:
|
|
191
191
|
|
|
192
192
|
```bash
|
|
193
|
-
|
|
193
|
+
agent-sdk dev examples/approval-buddy
|
|
194
194
|
```
|
|
195
195
|
|
|
196
196
|
Then ask through the signed-in account-linked Slack connection:
|
|
@@ -221,7 +221,7 @@ shorter sessions.
|
|
|
221
221
|
List the four eval cases:
|
|
222
222
|
|
|
223
223
|
```bash
|
|
224
|
-
|
|
224
|
+
agent-sdk eval --dir examples/approval-buddy --list
|
|
225
225
|
```
|
|
226
226
|
|
|
227
227
|
The suite covers:
|
|
@@ -234,7 +234,7 @@ The suite covers:
|
|
|
234
234
|
Run the safe qualification case:
|
|
235
235
|
|
|
236
236
|
```bash
|
|
237
|
-
|
|
237
|
+
agent-sdk eval \
|
|
238
238
|
--dir examples/approval-buddy \
|
|
239
239
|
qualify/merged-pr-question \
|
|
240
240
|
--json
|
|
@@ -33,7 +33,7 @@ The result is a thin agent project over a mature procedure library.
|
|
|
33
33
|
2. The dedicated Socket Mode channel accepts the allowlisted channel.
|
|
34
34
|
3. A 15-second debounce lets edits settle. Deleting the post during that
|
|
35
35
|
window cancels the dispatch.
|
|
36
|
-
4.
|
|
36
|
+
4. The Agent SDK creates a thread-scoped session and sends the report to the
|
|
37
37
|
playbook router.
|
|
38
38
|
5. The instructions select the matching triage playbook.
|
|
39
39
|
6. The harness finds the repository root, opens the inherited playbook, and
|
|
@@ -59,7 +59,7 @@ experiments, or sandbox seeds.
|
|
|
59
59
|
|
|
60
60
|
## See why `local.cwd` matters
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
The Agent SDK normally keeps an ephemeral `run` or `eval` workspace outside a
|
|
63
63
|
large monorepo. This prevents ancestor instruction and repository-rule files
|
|
64
64
|
from leaking into an unrelated agent.
|
|
65
65
|
|
|
@@ -77,7 +77,7 @@ Each harness workspace lands under
|
|
|
77
77
|
`examples/benny/.agent-serve/harness/<sessionId>`. Walking up the directory
|
|
78
78
|
tree reaches the host repository and its inherited playbook directory.
|
|
79
79
|
|
|
80
|
-
Those playbooks are inherited context. `
|
|
80
|
+
Those playbooks are inherited context. `agent-sdk info` reports zero authored
|
|
81
81
|
skills for the agent. Copying this project into another repository removes
|
|
82
82
|
its main procedures unless you copy or replace the skill library too.
|
|
83
83
|
|
|
@@ -87,8 +87,8 @@ The account-linked path needs an agent-runtime login and a connected Slack
|
|
|
87
87
|
account:
|
|
88
88
|
|
|
89
89
|
```bash
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
agent-sdk login
|
|
91
|
+
agent-sdk whoami
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
It routes explicit mentions without a dedicated Slack token on the host.
|
|
@@ -99,9 +99,9 @@ For the watched-channel path, configure a dedicated Socket Mode app with:
|
|
|
99
99
|
- have an App-Level Token with `connections:write`, and
|
|
100
100
|
- be a member of the watched channel.
|
|
101
101
|
|
|
102
|
-
Run `
|
|
102
|
+
Run `agent-sdk slack setup` for the guided app workflow. Generate the project
|
|
103
103
|
manifest with `--channel-posts` when you create a new copy, then validate the
|
|
104
|
-
configured channel prefix with `
|
|
104
|
+
configured channel prefix with `agent-sdk slack doctor`.
|
|
105
105
|
|
|
106
106
|
Missing dedicated-app tokens leave that channel idle. They don't stop the
|
|
107
107
|
account-linked channel.
|
|
@@ -109,9 +109,9 @@ account-linked channel.
|
|
|
109
109
|
## Validate and start the server
|
|
110
110
|
|
|
111
111
|
```bash
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
agent-sdk validate --dir examples/benny
|
|
113
|
+
agent-sdk info --dir examples/benny --json
|
|
114
|
+
agent-sdk dev examples/benny
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
The info output should show two Slack channels and no authored skill. That
|
|
@@ -139,7 +139,7 @@ turn and reaches the prompt.
|
|
|
139
139
|
|
|
140
140
|
## Inspect thread continuity
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
The Agent SDK keys Slack sessions by channel and thread timestamp. A follow-up in
|
|
143
143
|
the same thread resumes the conversation and workspace. A new top-level issue
|
|
144
144
|
gets a new session.
|
|
145
145
|
|
|
@@ -150,8 +150,8 @@ sessions while the dev server runs.
|
|
|
150
150
|
## Run the smoke eval
|
|
151
151
|
|
|
152
152
|
```bash
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
agent-sdk eval --dir examples/benny --list
|
|
154
|
+
agent-sdk eval --dir examples/benny smoke --json
|
|
155
155
|
```
|
|
156
156
|
|
|
157
157
|
The case asks for the agent identity and the playbook used for issue triage.
|
|
@@ -80,8 +80,8 @@ checks out the PR into the serve host's working tree.
|
|
|
80
80
|
## Validate the surface
|
|
81
81
|
|
|
82
82
|
```bash
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
agent-sdk validate --dir examples/bugbot
|
|
84
|
+
agent-sdk info --dir examples/bugbot --json
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
The manifest should show one server tool, one skill, and two authored
|
|
@@ -92,7 +92,7 @@ channels.
|
|
|
92
92
|
Call the preparation tool directly:
|
|
93
93
|
|
|
94
94
|
```bash
|
|
95
|
-
|
|
95
|
+
agent-sdk call prepare_pr \
|
|
96
96
|
--dir examples/bugbot \
|
|
97
97
|
--input '{"pr":"https://github.com/owner/repo/pull/123"}'
|
|
98
98
|
```
|
|
@@ -122,7 +122,7 @@ buffer; a larger diff fails preparation instead of being truncated.
|
|
|
122
122
|
Start the server:
|
|
123
123
|
|
|
124
124
|
```bash
|
|
125
|
-
|
|
125
|
+
agent-sdk dev examples/bugbot
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
From another terminal:
|
|
@@ -185,8 +185,8 @@ same skill with different intake channels.
|
|
|
185
185
|
## Run the fixture-backed eval
|
|
186
186
|
|
|
187
187
|
```bash
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
agent-sdk eval --dir examples/bugbot --list
|
|
189
|
+
agent-sdk eval --dir examples/bugbot review/smoke --json
|
|
190
190
|
```
|
|
191
191
|
|
|
192
192
|
The eval constructs a `PreparedPrReview`, seeds its file map through
|