@cursor/july 0.1.30 → 0.1.31
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/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.DigB_9cQ.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.CnFFl07y.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CYUFXspH.js → VPLocalSearchBox.BCMX25Bv.js} +1 -1
- package/dist/docs/assets/chunks/{theme.CTjkX9vc.js → theme.BDDWeELx.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 +100 -0
- package/dist/files-backends/agent-store-presigned-url.d.ts.map +1 -0
- package/dist/files-backends/agent-store-presigned-url.js +347 -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 +540 -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/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/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/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 +3 -1
- 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 +402 -0
- package/src/files-backends/cursor-hosted.ts +698 -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
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Explore the full
|
|
2
|
+
title: "Explore the full Agent SDK surface with a weather agent"
|
|
3
3
|
description: "Trace tools, MCP, channels, approvals, skills, subagents, schedules, hooks, A/B metrics, and evals through one local agent."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Explore the full
|
|
6
|
+
# Explore the full Agent SDK surface with a weather agent
|
|
7
7
|
|
|
8
8
|
The weather agent is the broadest small example in the repository. It fetches
|
|
9
9
|
live conditions and forecasts, converts units through MCP, writes notes in a
|
|
10
10
|
session workspace, and pauses an alert tool for human approval. The same agent
|
|
11
11
|
also runs from HTTP, Slack, a schedule, and the MCP endpoint.
|
|
12
12
|
|
|
13
|
-
Use this project when you want to see how
|
|
13
|
+
Use this project when you want to see how the Agent SDK's filesystem pieces fit
|
|
14
14
|
together before you design a larger agent.
|
|
15
15
|
|
|
16
16
|
[Browse the weather agent source.](../../examples/weather-agent/)
|
|
@@ -42,7 +42,7 @@ A current-weather question takes this path:
|
|
|
42
42
|
guessing.
|
|
43
43
|
3. The server tool geocodes the city, fetches Open-Meteo, validates the
|
|
44
44
|
response, and returns normalized fields.
|
|
45
|
-
4. The agent writes a short answer.
|
|
45
|
+
4. The agent writes a short answer. The Agent SDK records every event in the
|
|
46
46
|
session stream.
|
|
47
47
|
5. The audit hook observes `turn.completed`. If the session joined the A/B
|
|
48
48
|
experiment, the collector updates its metrics too.
|
|
@@ -61,16 +61,20 @@ You need:
|
|
|
61
61
|
- Network access to Open-Meteo.
|
|
62
62
|
- Python 3 for `save_weather_note`.
|
|
63
63
|
|
|
64
|
-
The project mounts an account-linked Slack channel.
|
|
64
|
+
The project mounts an account-linked Slack channel. The Agent SDK checks the
|
|
65
65
|
connection at startup, so sign in even when you plan to call a deterministic
|
|
66
66
|
tool.
|
|
67
67
|
|
|
68
|
-
The optional approval-enabled Slack app also needs
|
|
68
|
+
The optional approval-enabled Slack app also needs a token pair.
|
|
69
|
+
`agent-sdk slack create --dir examples/weather-agent` provisions the
|
|
70
|
+
app and writes the tokens for you (see the
|
|
71
|
+
[Slack guide](../guides/slack.md#set-it-up)); with hand-minted tokens,
|
|
72
|
+
export them instead:
|
|
69
73
|
|
|
70
74
|
```bash
|
|
71
75
|
export WEATHER_AGENT_SLACK_BOT_TOKEN=xoxb-...
|
|
72
76
|
export WEATHER_AGENT_SLACK_APP_TOKEN=xapp-...
|
|
73
|
-
|
|
77
|
+
agent-sdk slack doctor --prefix WEATHER_AGENT
|
|
74
78
|
```
|
|
75
79
|
|
|
76
80
|
Without those two tokens, the dedicated channel stays idle. The
|
|
@@ -79,9 +83,9 @@ account-linked channel still works.
|
|
|
79
83
|
## Inspect before running
|
|
80
84
|
|
|
81
85
|
```bash
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
agent-sdk validate --dir examples/weather-agent
|
|
87
|
+
agent-sdk info --dir examples/weather-agent --json
|
|
88
|
+
agent-sdk eval --dir examples/weather-agent --list
|
|
85
89
|
```
|
|
86
90
|
|
|
87
91
|
The manifest should report five tools, one skill, one MCP connection, one
|
|
@@ -93,37 +97,37 @@ experiment. The eval listing should report eight cases.
|
|
|
93
97
|
Start with the current-weather server tool:
|
|
94
98
|
|
|
95
99
|
```bash
|
|
96
|
-
|
|
100
|
+
agent-sdk call get_weather \
|
|
97
101
|
--dir examples/weather-agent \
|
|
98
102
|
--input '{"city":"New York City"}'
|
|
99
103
|
```
|
|
100
104
|
|
|
101
|
-
`defineTool` gives the input a Zod schema.
|
|
105
|
+
`defineTool` gives the input a Zod schema. The Agent SDK validates the JSON before
|
|
102
106
|
`execute` runs. The result includes the matched place, condition,
|
|
103
107
|
temperature, humidity, wind, gusts, and precipitation.
|
|
104
108
|
|
|
105
109
|
Try the forecast:
|
|
106
110
|
|
|
107
111
|
```bash
|
|
108
|
-
|
|
112
|
+
agent-sdk call get_forecast \
|
|
109
113
|
--dir examples/weather-agent \
|
|
110
114
|
--input '{"city":"Lisbon","days":5}'
|
|
111
115
|
```
|
|
112
116
|
|
|
113
117
|
The tool accepts one to seven days. Shared Open-Meteo code lives under
|
|
114
|
-
`agent/lib/`, so
|
|
118
|
+
`agent/lib/`, so the Agent SDK imports it without discovering another tool.
|
|
115
119
|
|
|
116
120
|
## Compare server and agent execution
|
|
117
121
|
|
|
118
122
|
Most weather tools use the default `execution: "server"`. Their TypeScript
|
|
119
123
|
runs inside the serve host and can reach `ctx.host` services.
|
|
120
124
|
|
|
121
|
-
`save_weather_note` uses `execution: "agent"` instead.
|
|
125
|
+
`save_weather_note` uses `execution: "agent"` instead. The Agent SDK materializes
|
|
122
126
|
its script into the agent environment. The script reads JSON from stdin and
|
|
123
127
|
appends to `weather-notes.md` in that session's workspace:
|
|
124
128
|
|
|
125
129
|
```bash
|
|
126
|
-
|
|
130
|
+
agent-sdk run --dir examples/weather-agent \
|
|
127
131
|
--message "Save a note that Boston is cold and windy."
|
|
128
132
|
```
|
|
129
133
|
|
|
@@ -131,14 +135,14 @@ Each session gets its own workspace. Saving a note doesn't edit the authored
|
|
|
131
135
|
example.
|
|
132
136
|
|
|
133
137
|
This split matters on cloud. Server tools are local-runtime only. For a cloud
|
|
134
|
-
turn,
|
|
138
|
+
turn, the Agent SDK includes an agent tool's catalog and script body in the first
|
|
135
139
|
prompt. The cloud model writes and invokes the script in its VM; the serve
|
|
136
140
|
host doesn't materialize it there.
|
|
137
141
|
|
|
138
142
|
## Use one MCP connection in three places
|
|
139
143
|
|
|
140
144
|
`agent/mcp-connections/units.ts` starts a local stdio server. The filename
|
|
141
|
-
makes its server name `units`.
|
|
145
|
+
makes its server name `units`. The Agent SDK exposes it to:
|
|
142
146
|
|
|
143
147
|
- the model as MCP tools,
|
|
144
148
|
- server tools through `ctx.host.mcp`, and
|
|
@@ -147,7 +151,7 @@ makes its server name `units`. Agentkit exposes it to:
|
|
|
147
151
|
`convert_temperature` demonstrates the server-tool path:
|
|
148
152
|
|
|
149
153
|
```bash
|
|
150
|
-
|
|
154
|
+
agent-sdk call convert_temperature \
|
|
151
155
|
--dir examples/weather-agent \
|
|
152
156
|
--input '{"value":72,"from":"F"}'
|
|
153
157
|
```
|
|
@@ -155,7 +159,7 @@ agentkit call convert_temperature \
|
|
|
155
159
|
The custom channel demonstrates the handler path. Start the dev server:
|
|
156
160
|
|
|
157
161
|
```bash
|
|
158
|
-
|
|
162
|
+
agent-sdk dev examples/weather-agent
|
|
159
163
|
```
|
|
160
164
|
|
|
161
165
|
Then call MCP deterministically through `/convert`:
|
|
@@ -201,7 +205,7 @@ authentication, and asynchronous handlers.
|
|
|
201
205
|
playground and the model's tool call parks before `execute`:
|
|
202
206
|
|
|
203
207
|
```bash
|
|
204
|
-
|
|
208
|
+
agent-sdk dev examples/weather-agent
|
|
205
209
|
```
|
|
206
210
|
|
|
207
211
|
Open the printed playground URL, ask:
|
|
@@ -216,12 +220,12 @@ The example tool returns a placeholder success object. It doesn't contact
|
|
|
216
220
|
Slack, PagerDuty, or an ops board. Replace its `execute` body with your own
|
|
217
221
|
sink before adapting it.
|
|
218
222
|
|
|
219
|
-
Use a model turn for this proof. A deterministic `
|
|
223
|
+
Use a model turn for this proof. A deterministic `agent-sdk call` runs the
|
|
220
224
|
tool body directly and doesn't demonstrate the parked approval flow.
|
|
221
225
|
|
|
222
226
|
## Load procedures and delegate research
|
|
223
227
|
|
|
224
|
-
The forecast skill gives the root agent an on-demand procedure.
|
|
228
|
+
The forecast skill gives the root agent an on-demand procedure. The Agent SDK
|
|
225
229
|
advertises the skill's description, then the harness loads its content when
|
|
226
230
|
the request matches.
|
|
227
231
|
|
|
@@ -230,7 +234,7 @@ parent when to delegate. It inherits the parent's execution surface, but
|
|
|
230
234
|
gets its own instructions:
|
|
231
235
|
|
|
232
236
|
```bash
|
|
233
|
-
|
|
237
|
+
agent-sdk run --dir examples/weather-agent \
|
|
234
238
|
--message "Compare record summer temperatures across Paris, London, and Rome."
|
|
235
239
|
```
|
|
236
240
|
|
|
@@ -270,8 +274,8 @@ policy.
|
|
|
270
274
|
List and run the evals:
|
|
271
275
|
|
|
272
276
|
```bash
|
|
273
|
-
|
|
274
|
-
|
|
277
|
+
agent-sdk eval --dir examples/weather-agent --list
|
|
278
|
+
agent-sdk eval --dir examples/weather-agent --json
|
|
275
279
|
```
|
|
276
280
|
|
|
277
281
|
Six cases cover current weather and forecasts against live Open-Meteo. Two
|
|
@@ -34,7 +34,7 @@ channel, bind to the calling principal, and show up in the playground
|
|
|
34
34
|
and `GET /v1/sessions` like any other session.
|
|
35
35
|
|
|
36
36
|
Any MCP client can attach to this endpoint. It isn't only for other
|
|
37
|
-
|
|
37
|
+
Agent SDK agents.
|
|
38
38
|
|
|
39
39
|
## Wire a peer MCP connection
|
|
40
40
|
|
|
@@ -57,8 +57,8 @@ delegation, except the peer is a full agent that keeps its own
|
|
|
57
57
|
instructions, tools, MCP connections, and sessions.
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
agent-sdk serve --dir ./agents --dev
|
|
61
|
+
agent-sdk chat --url http://127.0.0.1:3000/concierge \
|
|
62
62
|
--message "What's the weather in Paris right now?"
|
|
63
63
|
# concierge → weather.ask → weather-agent's own session/tools → reply
|
|
64
64
|
```
|
|
@@ -81,7 +81,7 @@ and `eval` use work too. Local-runtime turns (and host-side
|
|
|
81
81
|
`ctx.host.mcp` or channel-handler calls) reach the peer over loopback,
|
|
82
82
|
which works under the default auth. Cloud-runtime turns execute on a VM
|
|
83
83
|
that cannot reach this host's loopback address: pass
|
|
84
|
-
`--public-url https://
|
|
84
|
+
`--public-url https://agent-sdk.example.com` (or
|
|
85
85
|
`serve(dir, { publicUrl })`) so peers resolve to a reachable URL.
|
|
86
86
|
Without one, peers are omitted from cloud turns and the server warns at
|
|
87
87
|
startup. With `--bearer-token`, the token is attached to peer calls
|
|
@@ -47,7 +47,7 @@ export default defineAgent({
|
|
|
47
47
|
});
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
The host must be signed in (`
|
|
50
|
+
The host must be signed in (`agent-sdk login` or `CURSOR_API_KEY`).
|
|
51
51
|
|
|
52
52
|
> [!IMPORTANT]
|
|
53
53
|
> Cloud agents run against the Cursor backend under the signed-in
|
|
@@ -69,7 +69,7 @@ mapping shifts:
|
|
|
69
69
|
| `sandbox/workspace/**` | seeded into the session workspace | ignored |
|
|
70
70
|
| Tool approvals (`needsApproval`) | supported | not supported |
|
|
71
71
|
|
|
72
|
-
`
|
|
72
|
+
`agent-sdk validate` warns when `runtime: "cloud"` is combined with
|
|
73
73
|
local-only capabilities. Those warnings match this table.
|
|
74
74
|
|
|
75
75
|
Two more behaviors are cloud-specific. Sessions persist a separate SDK
|
|
@@ -106,7 +106,7 @@ These come from running a PR driver against real PR traffic:
|
|
|
106
106
|
|
|
107
107
|
## Verify cloud agents
|
|
108
108
|
|
|
109
|
-
`
|
|
109
|
+
`agent-sdk run` and `eval` work unchanged. The trajectory records the
|
|
110
110
|
same event vocabulary plus `agent.bound` with the cloud URL, so you can
|
|
111
111
|
open the cloud conversation for any session. Cloud turns take minutes.
|
|
112
112
|
Pass generous `--timeout-ms` values, and keep curl timeouts long when
|
package/docs/guides/github.md
CHANGED
|
@@ -18,7 +18,7 @@ The companion skill for coding agents is
|
|
|
18
18
|
Connect GitHub in Cursor for the repositories you care about (Settings or
|
|
19
19
|
[cursor.com/dashboard](https://cursor.com/dashboard)). That gives your
|
|
20
20
|
account access and lets Cursor receive the repo's webhooks. Sign the host
|
|
21
|
-
in (`
|
|
21
|
+
in (`agent-sdk login` or `CURSOR_API_KEY`), then opt the channel into the
|
|
22
22
|
Cursor account connection:
|
|
23
23
|
|
|
24
24
|
```ts
|
|
@@ -34,7 +34,7 @@ export default githubChannel({
|
|
|
34
34
|
|
|
35
35
|
`cursorAccount` starts the event relay and mints one short-lived GitHub
|
|
36
36
|
credential scoped to those repositories. `ctx.github`, `ctx.host.github`,
|
|
37
|
-
and child `gh` commands share it.
|
|
37
|
+
and child `gh` commands share it. The Agent SDK refreshes the credential before
|
|
38
38
|
expiry. No GitHub App key, PAT, or separate `gh auth login` is needed on
|
|
39
39
|
the host.
|
|
40
40
|
|
|
@@ -57,7 +57,7 @@ To keep repository scope in deployment config instead, use
|
|
|
57
57
|
`cursorAccount: true` and pass it at serve time:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
|
|
60
|
+
agent-sdk serve --dir . --cursor-events --repo owner/repo
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
Repeat `--repo` for each repository. The stream and credential are
|
|
@@ -150,13 +150,13 @@ the same delivery.
|
|
|
150
150
|
|
|
151
151
|
```bash
|
|
152
152
|
# Replay a pull_request delivery for a PR
|
|
153
|
-
|
|
153
|
+
agent-sdk github replay https://github.com/owner/repo/pull/123 --dir .
|
|
154
154
|
|
|
155
155
|
# Replay everything the channel listens for, with CI failing
|
|
156
|
-
|
|
156
|
+
agent-sdk github replay owner/repo#123 --dir . --events '*' --conclusion failure
|
|
157
157
|
|
|
158
158
|
# Inspect payloads without POSTing, and snapshot them as fixtures
|
|
159
|
-
|
|
159
|
+
agent-sdk github replay owner/repo#123 --dir . --events '*' --dry-run --out fixtures/github
|
|
160
160
|
```
|
|
161
161
|
|
|
162
162
|
`--events` defaults to `pull_request`, and `'*'` means the channel's
|
|
@@ -116,7 +116,7 @@ approvals with dry-run defaults for destructive integrations: post real
|
|
|
116
116
|
PR reviews only behind an explicit env flag like `MY_AGENT_LIVE=1`, no
|
|
117
117
|
matter who approved.
|
|
118
118
|
|
|
119
|
-
Deterministic tool calls (`
|
|
119
|
+
Deterministic tool calls (`agent-sdk call`, `POST /v1/tools/:name`)
|
|
120
120
|
execute directly without parking. There the human is the caller.
|
|
121
121
|
Approval parking applies to model-initiated calls.
|
|
122
122
|
|
package/docs/guides/mcp-oauth.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Host MCP OAuth"
|
|
3
|
-
description: "Authorize defineConnection({ url, oauth: true }) with
|
|
3
|
+
description: "Authorize defineConnection({ url, oauth: true }) with agent-sdk mcp oauth, store tokens locally, and push MCP_OAUTH_* secrets to hosted deployments."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Host MCP OAuth
|
|
@@ -17,7 +17,7 @@ The companion skill is
|
|
|
17
17
|
## What can host MCP OAuth do?
|
|
18
18
|
|
|
19
19
|
- Authorize `defineConnection({ url, oauth: true })` with a browser PKCE
|
|
20
|
-
flow (`
|
|
20
|
+
flow (`agent-sdk mcp oauth <connection>`)
|
|
21
21
|
- Keep tokens in `~/.config/agent-serve/mcp-auth.json`, bound to that
|
|
22
22
|
connection's resource URL
|
|
23
23
|
- Upsert deployment secrets with `--store` so hosted engines seed the
|
|
@@ -56,7 +56,7 @@ export default defineConnection({
|
|
|
56
56
|
|
|
57
57
|
Rules of the road:
|
|
58
58
|
|
|
59
|
-
- `oauth: true` is required for `
|
|
59
|
+
- `oauth: true` is required for `agent-sdk mcp oauth`
|
|
60
60
|
- `hostOnly: true` hides the server from the model; `ctx.host.mcp` and
|
|
61
61
|
channel handlers still see it
|
|
62
62
|
- Declare expected secret names on the agent when you plan to `--store`:
|
|
@@ -86,12 +86,12 @@ underscores (`inventory` → `MCP_OAUTH_INVENTORY_…`).
|
|
|
86
86
|
From the agent project (Node 22.13+, not Bun):
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
|
|
89
|
+
agent-sdk mcp oauth inventory
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
What happens:
|
|
93
93
|
|
|
94
|
-
1.
|
|
94
|
+
1. The Agent SDK loads `agent/mcp-connections/inventory.ts` and checks
|
|
95
95
|
`oauth: true`
|
|
96
96
|
2. It opens the authorization URL in your browser
|
|
97
97
|
3. The callback lands on `http://localhost:8787/callback`
|
|
@@ -107,7 +107,7 @@ connection URL (tokens are bound to the resource URL).
|
|
|
107
107
|
Authorize once, then push secrets to the deployment:
|
|
108
108
|
|
|
109
109
|
```bash
|
|
110
|
-
|
|
110
|
+
agent-sdk mcp oauth inventory --store
|
|
111
111
|
# optional:
|
|
112
112
|
# --slug my-agent
|
|
113
113
|
# --team <cursor-team-id>
|
|
@@ -121,9 +121,9 @@ agentkit mcp oauth inventory --store
|
|
|
121
121
|
| `MCP_OAUTH_<NAME>_REFRESH_TOKEN` | refresh token when the server returns one |
|
|
122
122
|
| `MCP_OAUTH_<NAME>_CLIENT_ID` | dynamic client id when registration returned one |
|
|
123
123
|
|
|
124
|
-
You must be signed in (`
|
|
124
|
+
You must be signed in (`agent-sdk login`) with permission to set secrets
|
|
125
125
|
on that slug. Secrets apply on the **next** deploy; run
|
|
126
|
-
`
|
|
126
|
+
`agent-sdk deploy` (or wait for your usual deploy path) after `--store`.
|
|
127
127
|
|
|
128
128
|
On the engine, when `mcp-auth.json` is empty, serve seeds the OAuth
|
|
129
129
|
provider from those env vars so host MCP calls work without a browser
|
|
@@ -151,7 +151,7 @@ tool instead.
|
|
|
151
151
|
| --- | --- |
|
|
152
152
|
| `must be defineConnection({ url, oauth: true })` | Add `oauth: true` on that connection, or pick the right connection name |
|
|
153
153
|
| Callback never completes | Keep port `8787` free; finish the browser login on this machine |
|
|
154
|
-
| Hosted calls unauthorized after `--store` | Confirm secrets with `
|
|
154
|
+
| Hosted calls unauthorized after `--store` | Confirm secrets with `agent-sdk secrets list <slug>`, then redeploy |
|
|
155
155
|
| Tokens ignored after URL change | Expected: resource URL binding drops stale entries. Re-run `mcp oauth` |
|
|
156
156
|
|
|
157
157
|
## What's next
|
package/docs/guides/slack.md
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Slack"
|
|
3
|
-
description: "Put the agent in Slack over Socket Mode: manifests, tokens, doctor, engagement rules, access policy, and approval buttons."
|
|
3
|
+
description: "Put the agent in Slack over Socket Mode: Add to Slack provisioning, manifests, tokens, doctor, engagement rules, access policy, and approval buttons."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Slack agents
|
|
7
7
|
|
|
8
8
|
The Slack channel puts your agent in Slack over Socket Mode: no public
|
|
9
9
|
Request URL, streaming replies in threads, tool "thinking" steps,
|
|
10
|
-
suggested prompts, and opt-in approval buttons.
|
|
11
|
-
|
|
10
|
+
suggested prompts, and opt-in approval buttons. Cursor's **Add to
|
|
11
|
+
Slack** provisioning handles the setup in one CLI command or one
|
|
12
|
+
dashboard click; the manual manifest flow remains as a fallback.
|
|
12
13
|
|
|
13
14
|
The companion skill is
|
|
14
15
|
[`skills/setup-slack/SKILL.md`](../../skills/setup-slack/SKILL.md).
|
|
@@ -59,7 +60,7 @@ export default slackChannel({
|
|
|
59
60
|
});
|
|
60
61
|
```
|
|
61
62
|
|
|
62
|
-
Sign the host in (`
|
|
63
|
+
Sign the host in (`agent-sdk login` or `CURSOR_API_KEY`), then mention the
|
|
63
64
|
agent in Slack as `@Cursor Weatherbot …`. Thread replies and DMs keep going to
|
|
64
65
|
the same agent. Messages appear as the Cursor app under that agent's name
|
|
65
66
|
and icon, with live updates as the turn progresses.
|
|
@@ -98,22 +99,88 @@ export default slackChannel({
|
|
|
98
99
|
|
|
99
100
|
## Set it up
|
|
100
101
|
|
|
101
|
-
|
|
102
|
+
Start with Cursor's **Add to Slack** provisioning: Cursor creates and
|
|
103
|
+
installs a dedicated Slack app for the agent and delivers its tokens,
|
|
104
|
+
so nobody visits [api.slack.com](https://api.slack.com/apps) or copies
|
|
105
|
+
an `xoxb-…` / `xapp-…` pair by hand. Use the CLI for local development
|
|
106
|
+
and the dashboard for hosted deployments. Fall back to the
|
|
107
|
+
[manual manifest flow](#manual-setup-fallback) only when provisioning
|
|
108
|
+
reports the feature is not enabled for your account.
|
|
102
109
|
|
|
103
|
-
|
|
110
|
+
### Provision with the CLI
|
|
111
|
+
|
|
112
|
+
One command runs the whole setup:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
agent-sdk slack create --dir . # dev app (default)
|
|
116
|
+
agent-sdk slack create --dir . --prod # prod app
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
`slack create` needs a signed-in host (`agent-sdk login` or
|
|
120
|
+
`CURSOR_API_KEY`). It scaffolds `agent/channels/slack.ts` when the file
|
|
121
|
+
is missing, connects your Slack workspace through a browser consent
|
|
122
|
+
page when it isn't connected yet (a one-time authorization per user and
|
|
123
|
+
workspace), creates and installs the agent's dedicated Socket Mode app,
|
|
124
|
+
writes `<PREFIX>_SLACK_BOT_TOKEN` and `<PREFIX>_SLACK_APP_TOKEN` into
|
|
125
|
+
`<dir>/.env.local`, and finishes with a `doctor` pass. Then serve and
|
|
126
|
+
smoke it as described [below](#wire-the-env-and-verify); the tokens are
|
|
127
|
+
already in place.
|
|
128
|
+
|
|
129
|
+
If the workspace requires admin approval for new apps, `create` prints
|
|
130
|
+
the Slack approval page for a workspace admin. Re-run
|
|
131
|
+
`agent-sdk slack create` after the approval to finish the install and
|
|
132
|
+
mint the tokens.
|
|
133
|
+
|
|
134
|
+
Useful companions: `--slack-team T0123ABCD` picks a workspace when
|
|
135
|
+
several are connected, `--icon <https-url-or-file>` sets the app icon,
|
|
136
|
+
`agent-sdk slack destroy` deletes the provisioned app, and
|
|
137
|
+
`agent-sdk slack icon <source>` updates the icon later. A re-run of
|
|
138
|
+
`create` refuses to overwrite manifest edits made by hand in Slack;
|
|
139
|
+
pass `--force` to overwrite them.
|
|
140
|
+
|
|
141
|
+
### Provision from the dashboard (hosted deployments)
|
|
142
|
+
|
|
143
|
+
For a [Cursor-hosted deployment](../deployment.md#cursor-managed-hosting),
|
|
144
|
+
provision from
|
|
145
|
+
[cursor.com/dashboard](https://cursor.com/dashboard): open **Deployed
|
|
146
|
+
Agents**, select the deployment, switch to the **Details** view, and
|
|
147
|
+
expand the **Slack** row under **Integrations**.
|
|
148
|
+
|
|
149
|
+
1. Click **Add to Slack** and approve the authorization in the tab that
|
|
150
|
+
opens. This is a one-time consent per user and workspace.
|
|
151
|
+
2. Pick the bot name (and the workspace, when several are connected)
|
|
152
|
+
and click **Create Slack app**. Cursor creates and installs the app,
|
|
153
|
+
then stores its tokens as deployment secrets; the values are never
|
|
154
|
+
shown. The **Advanced** disclosure sets the env-var prefix, so the
|
|
155
|
+
secret names match what your `slackChannel({ envPrefix })` reads.
|
|
156
|
+
3. If the workspace requires admin approval, the row shows **Waiting
|
|
157
|
+
for admin approval** with an **Approve in Slack** button that opens
|
|
158
|
+
Slack's pending-request page. After an admin approves, pick
|
|
159
|
+
**Retry** from the row's menu.
|
|
160
|
+
4. Click **Redeploy** when the banner appears. The running agent keeps
|
|
161
|
+
its old environment until the next deploy.
|
|
162
|
+
|
|
163
|
+
The row's menu also covers later care: rename the app, set its icon,
|
|
164
|
+
rotate its tokens, remove it from Slack, or disconnect the workspace.
|
|
165
|
+
|
|
166
|
+
### Manual setup (fallback)
|
|
167
|
+
|
|
168
|
+
When Add to Slack is not enabled for your account, create the apps by
|
|
169
|
+
hand. Generate the channel file, the app manifests, and the env
|
|
170
|
+
template:
|
|
104
171
|
|
|
105
172
|
```bash
|
|
106
|
-
|
|
173
|
+
agent-sdk slack init --dir . --name "My Agent"
|
|
107
174
|
```
|
|
108
175
|
|
|
109
176
|
This writes `agent/channels/slack.ts` (with an `envPrefix` derived from
|
|
110
177
|
the directory name), importable app manifests at
|
|
111
|
-
`.
|
|
112
|
-
`.
|
|
178
|
+
`.agent-serve/slack/manifest.{dev,prod}.json`, and
|
|
179
|
+
`.agent-serve/slack/env.example`. Use `--no-prefix` for the shared
|
|
113
180
|
`SLACK_*` variables on single-agent hosts, `--prefix CUSTOM` to
|
|
114
181
|
override, and `--channel-posts` if you plan to watch channels.
|
|
115
182
|
|
|
116
|
-
|
|
183
|
+
#### Create the apps (human, Slack admin)
|
|
117
184
|
|
|
118
185
|
This phase needs a human with permission to create Slack apps.
|
|
119
186
|
|
|
@@ -123,7 +190,7 @@ This phase needs a human with permission to create Slack apps.
|
|
|
123
190
|
3. Repeat with `manifest.prod.json`. Dev and prod are separate Slack
|
|
124
191
|
apps with separate tokens.
|
|
125
192
|
|
|
126
|
-
|
|
193
|
+
#### Install and mint tokens (human)
|
|
127
194
|
|
|
128
195
|
For each app: **Install to Workspace** and copy the Bot User OAuth Token
|
|
129
196
|
(`xoxb-…`), then under **Basic Information → App-Level Tokens** create a
|
|
@@ -131,7 +198,9 @@ token with scope `connections:write` and copy it (`xapp-…`).
|
|
|
131
198
|
|
|
132
199
|
### Wire the env and verify
|
|
133
200
|
|
|
134
|
-
|
|
201
|
+
`agent-sdk slack create` already wrote the tokens to `.env.local`, so
|
|
202
|
+
after provisioning skip straight to `doctor`. After a manual setup,
|
|
203
|
+
export the tokens in the shell that runs `serve`, using the names from
|
|
135
204
|
`env.example`, or put them in the agent directory's `.env.local` —
|
|
136
205
|
`serve`/`dev`/`slack doctor` load that file (real environment variables
|
|
137
206
|
always win over it):
|
|
@@ -142,15 +211,15 @@ export MY_AGENT_SLACK_APP_TOKEN=xapp-…
|
|
|
142
211
|
```
|
|
143
212
|
|
|
144
213
|
```bash
|
|
145
|
-
|
|
214
|
+
agent-sdk slack doctor --prefix MY_AGENT
|
|
146
215
|
```
|
|
147
216
|
|
|
148
217
|
Proceed when `app_token`, `connections_open`, `bot_token`, and
|
|
149
218
|
`auth_test` are all green. Then serve and smoke it:
|
|
150
219
|
|
|
151
220
|
```bash
|
|
152
|
-
|
|
153
|
-
# expect: [
|
|
221
|
+
agent-sdk serve --dir . --dev
|
|
222
|
+
# expect: [agent-sdk/slack] Socket Mode connected
|
|
154
223
|
```
|
|
155
224
|
|
|
156
225
|
Invite the bot to a channel and @mention it (or DM it). Expect the
|
|
@@ -262,12 +331,16 @@ Two habits matter most.
|
|
|
262
331
|
The `slack` subcommands cover setup end to end.
|
|
263
332
|
|
|
264
333
|
```bash
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
334
|
+
agent-sdk slack setup # guided checklist
|
|
335
|
+
agent-sdk slack create --dir . # provision via Add to Slack (dev app)
|
|
336
|
+
agent-sdk slack create --dir . --prod # prod app
|
|
337
|
+
agent-sdk slack destroy --dir . # delete the provisioned app
|
|
338
|
+
agent-sdk slack icon ./icon.png --dir . # set the provisioned app's icon
|
|
339
|
+
agent-sdk slack init --dir . --name "My Agent"
|
|
340
|
+
agent-sdk slack init --dir . --no-prefix # shared SLACK_* vars
|
|
341
|
+
agent-sdk slack init --dir . --channel-posts
|
|
342
|
+
agent-sdk slack manifest --env both # regenerate manifests
|
|
343
|
+
agent-sdk slack doctor --prefix MY_AGENT # token / connectivity checks
|
|
271
344
|
```
|
|
272
345
|
|
|
273
346
|
## What's next
|
package/docs/guides/webhooks.md
CHANGED
|
@@ -371,7 +371,7 @@ there. When something looks wrong, read the session's `events.ndjson`.
|
|
|
371
371
|
The stream is the record of what happened.
|
|
372
372
|
|
|
373
373
|
For GitHub specifically, don't hand-roll fixtures.
|
|
374
|
-
`
|
|
374
|
+
`agent-sdk github replay` synthesizes real-shaped, signed payloads
|
|
375
375
|
from any PR you can read. See the [GitHub guide](./github.md).
|
|
376
376
|
|
|
377
377
|
## What's next
|
package/docs/hillclimbing.md
CHANGED
|
@@ -52,11 +52,11 @@ Agree on four things before you edit:
|
|
|
52
52
|
3. **Success criteria**: what better means this round
|
|
53
53
|
4. **The freeze line**: what must not change
|
|
54
54
|
|
|
55
|
-
Pin the input first. A moving fixture is noise. For GitHub agents, use `
|
|
55
|
+
Pin the input first. A moving fixture is noise. For GitHub agents, use `agent-sdk github replay` (see the [GitHub guide](./guides/github.md)). For a single tool without a model turn, use `agent-sdk call`. For a chat turn, use `agent-sdk run --dir . --message "…"`.
|
|
56
56
|
|
|
57
57
|
## How do I run one hillclimb round?
|
|
58
58
|
|
|
59
|
-
**Measure.** Hit the agent the way a user would: playground, channel HTTP, or Slack in `--dev`. Or ask the hillclimb skill to do it. `
|
|
59
|
+
**Measure.** Hit the agent the way a user would: playground, channel HTTP, or Slack in `--dev`. Or ask the hillclimb skill to do it. `agent-sdk run` returns a JSON trajectory and writes a trace under `.agent-sdk/traces/`.
|
|
60
60
|
|
|
61
61
|
**Reflect.** Score the trajectory, not impressions. Was the answer right? Did the model thrash (too many tools, fat evidence, grep loops)? Did it invent work the host should have prepared? Name the single dominant problem for this round in one sentence. Example: "Full-file dumps trigger grep loops."
|
|
62
62
|
|
|
@@ -72,7 +72,7 @@ Pin the input first. A moving fixture is noise. For GitHub agents, use `agentkit
|
|
|
72
72
|
|
|
73
73
|
## How do I lock a hillclimb improvement with an eval?
|
|
74
74
|
|
|
75
|
-
Every kept change needs an eval that would have failed before the change: a tool-choice gate, an `action.result` count bound, or an output-shape check. Run `
|
|
75
|
+
Every kept change needs an eval that would have failed before the change: a tool-choice gate, an `action.result` count bound, or an output-shape check. Run `agent-sdk eval --dir . --json` between rounds. Never weaken an existing gate to pass the round.
|
|
76
76
|
|
|
77
77
|
Details live in [Evals](./evals.md). The evals skill will author the case with you.
|
|
78
78
|
|