@cursor/july 0.1.95 → 0.1.97
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 +3 -4
- package/README.md +3 -2
- package/dist/bin/agent-serve.js +14 -3
- package/dist/channels/deployments/types.d.ts +1 -1
- package/dist/channels/deployments/types.d.ts.map +1 -1
- package/dist/channels/deployments/types.js +1 -0
- package/dist/channels/origin/api.d.ts +72 -15
- package/dist/channels/origin/api.d.ts.map +1 -1
- package/dist/channels/origin/api.js +185 -28
- package/dist/channels/origin/binding.d.ts +13 -2
- package/dist/channels/origin/binding.d.ts.map +1 -1
- package/dist/channels/origin/binding.js +41 -25
- package/dist/channels/origin/checks.d.ts +6 -6
- package/dist/channels/origin/checks.js +6 -6
- package/dist/channels/origin/cursor-account.d.ts +5 -3
- package/dist/channels/origin/cursor-account.d.ts.map +1 -1
- package/dist/channels/origin/cursor-account.js +5 -3
- package/dist/channels/origin/index.d.ts +1 -0
- package/dist/channels/origin/index.d.ts.map +1 -1
- package/dist/channels/origin/index.js +1 -0
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +3 -0
- package/dist/channels/origin/reactions.d.ts +56 -0
- package/dist/channels/origin/reactions.d.ts.map +1 -0
- package/dist/channels/origin/reactions.js +67 -0
- package/dist/channels/origin/types.d.ts +11 -0
- package/dist/channels/origin/types.d.ts.map +1 -1
- package/dist/channels/slack/api.d.ts +9 -0
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +36 -5
- package/dist/channels/slack/approvals.d.ts +16 -0
- package/dist/channels/slack/approvals.d.ts.map +1 -1
- package/dist/channels/slack/approvals.js +86 -0
- package/dist/channels/slack/cli-project.d.ts +19 -0
- package/dist/channels/slack/cli-project.d.ts.map +1 -0
- package/dist/channels/slack/cli-project.js +234 -0
- package/dist/channels/slack/defaults.d.ts.map +1 -1
- package/dist/channels/slack/defaults.js +110 -81
- package/dist/channels/slack/dispatch.d.ts +7 -1
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +47 -23
- package/dist/channels/slack/inbound.d.ts +8 -0
- package/dist/channels/slack/inbound.d.ts.map +1 -1
- package/dist/channels/slack/inbound.js +32 -0
- package/dist/channels/slack/init.d.ts +3 -2
- package/dist/channels/slack/init.d.ts.map +1 -1
- package/dist/channels/slack/init.js +5 -5
- package/dist/channels/slack/interactive.d.ts +2 -1
- package/dist/channels/slack/interactive.d.ts.map +1 -1
- package/dist/channels/slack/interactive.js +15 -4
- package/dist/channels/slack/live-delivery.d.ts +26 -29
- package/dist/channels/slack/live-delivery.d.ts.map +1 -1
- package/dist/channels/slack/live-delivery.js +172 -73
- package/dist/channels/slack/manifest.d.ts +1 -1
- package/dist/channels/slack/manifest.d.ts.map +1 -1
- package/dist/channels/slack/manifest.js +6 -2
- package/dist/channels/slack/nudge-carrier.d.ts +2 -0
- package/dist/channels/slack/nudge-carrier.d.ts.map +1 -1
- package/dist/channels/slack/nudge-carrier.js +48 -1
- package/dist/channels/slack/setup.d.ts +1 -1
- package/dist/channels/slack/setup.d.ts.map +1 -1
- package/dist/channels/slack/setup.js +10 -6
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +3 -2
- package/dist/channels/slack/tool-approval-events.d.ts.map +1 -1
- package/dist/channels/slack/tool-approval-events.js +91 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +4 -4
- package/dist/docs/assets/{app.BBj0klBO.js → app.B3rWNYE1.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.BU9nHdnQ.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CUEXpL78.js → VPLocalSearchBox.C1lhqJJR.js} +1 -1
- package/dist/docs/assets/chunks/{theme.DabmQnia.js → theme.B40_SXuv.js} +2 -2
- package/dist/docs/assets/{deployment.md.D9msOFOW.js → deployment.md.MFPKqsqI.js} +2 -2
- package/dist/docs/assets/{guides_mcp-oauth.md.DPYmBCbV.js → guides_mcp-oauth.md.CN-6YmTJ.js} +4 -4
- package/dist/docs/assets/{guides_mcp-oauth.md.DPYmBCbV.lean.js → guides_mcp-oauth.md.CN-6YmTJ.lean.js} +1 -1
- package/dist/docs/assets/guides_slack.md.VDXQV3ja.js +22 -0
- package/dist/docs/assets/guides_slack.md.VDXQV3ja.lean.js +1 -0
- package/dist/docs/assets/index.md.CVeRUOeZ.js +5 -0
- package/dist/docs/assets/{index.md.BoHaMdeZ.lean.js → index.md.CVeRUOeZ.lean.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.Cp_x38Nl.js → reference_agent-config.md.BHeYMgme.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.BsMOxDvh.js → reference_cli.md.RyZf5OTE.js} +10 -6
- package/dist/docs/assets/{reference_cli.md.BsMOxDvh.lean.js → reference_cli.md.RyZf5OTE.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.BH8Oc0D0.js → reference_connections.md.DxldvyIB.js} +4 -3
- package/dist/docs/assets/{reference_http-api.md.D89k1mdm.js → reference_http-api.md.5zOAbV86.js} +1 -1
- package/dist/docs/assets/reference_sessions.md.NxFP_CAC.js +1 -0
- package/dist/docs/assets/{reference_tools.md.BHeXn2id.js → reference_tools.md.B84gw9Ii.js} +1 -1
- package/dist/docs/assets/templates_agents-md.md.CXSMZljE.js +2 -0
- package/dist/docs/assets/templates_agents-md.md.CXSMZljE.lean.js +1 -0
- package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.js +2 -0
- package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.lean.js +1 -0
- package/dist/docs/assets/troubleshooting.md.DCiPBhYs.js +1 -0
- package/dist/docs/building-with-agents.html +4 -4
- package/dist/docs/concepts.html +4 -4
- package/dist/docs/deployment.html +7 -7
- package/dist/docs/deployment.md +5 -4
- package/dist/docs/evals.html +4 -4
- package/dist/docs/guides/agent-to-agent.html +4 -4
- package/dist/docs/guides/cloud-runtime.html +4 -4
- package/dist/docs/guides/convert-automation.html +4 -4
- package/dist/docs/guides/github.html +4 -4
- package/dist/docs/guides/human-in-the-loop.html +4 -4
- package/dist/docs/guides/mcp-oauth.html +8 -8
- package/dist/docs/guides/mcp-oauth.md +26 -8
- package/dist/docs/guides/opentelemetry.html +4 -4
- package/dist/docs/guides/slack.html +17 -33
- package/dist/docs/guides/slack.md +92 -201
- package/dist/docs/guides/webhooks.html +4 -4
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +4 -4
- package/dist/docs/index.html +6 -6
- package/dist/docs/index.md +7 -3
- package/dist/docs/llms-full.txt +398 -653
- package/dist/docs/llms.txt +3 -2
- package/dist/docs/quickstart.html +4 -4
- package/dist/docs/reference/agent-config.html +6 -6
- package/dist/docs/reference/agent-config.md +2 -2
- package/dist/docs/reference/artifacts.html +4 -4
- package/dist/docs/reference/channels.html +4 -4
- package/dist/docs/reference/cli.html +14 -10
- package/dist/docs/reference/cli.md +39 -16
- package/dist/docs/reference/connections.html +9 -8
- package/dist/docs/reference/connections.md +6 -3
- package/dist/docs/reference/hooks.html +4 -4
- package/dist/docs/reference/http-api.html +6 -6
- package/dist/docs/reference/http-api.md +2 -1
- package/dist/docs/reference/instructions.html +4 -4
- package/dist/docs/reference/playground.html +4 -4
- package/dist/docs/reference/project-layout.html +4 -4
- package/dist/docs/reference/prompt.html +4 -4
- package/dist/docs/reference/schedules.html +4 -4
- package/dist/docs/reference/sessions.html +5 -5
- package/dist/docs/reference/sessions.md +4 -2
- package/dist/docs/reference/skills.html +4 -4
- package/dist/docs/reference/subagents.html +4 -4
- package/dist/docs/reference/tools.html +6 -6
- package/dist/docs/reference/tools.md +9 -2
- package/dist/docs/scaffolding-agents.html +4 -4
- package/dist/docs/storage.html +4 -4
- package/dist/docs/templates/agentic-owners.html +4 -4
- package/dist/docs/templates/agents-md.html +28 -0
- package/dist/docs/templates/agents-md.md +105 -0
- package/dist/docs/templates/code-wiki.html +28 -0
- package/dist/docs/templates/code-wiki.md +91 -0
- package/dist/docs/templates/demo.html +5 -5
- package/dist/docs/templates/pr-autofixer.html +4 -4
- package/dist/docs/templates/security-help.html +4 -4
- package/dist/docs/templates/security-reviewer.html +5 -5
- package/dist/docs/templates/triage.html +4 -4
- package/dist/docs/troubleshooting.html +5 -5
- package/dist/docs/troubleshooting.md +2 -2
- package/dist/evals/run-facts.d.ts.map +1 -1
- package/dist/evals/run-facts.js +27 -0
- package/dist/files-backends/cursor-hosted.d.ts +26 -4
- package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/files-backends/cursor-hosted.js +32 -4
- package/dist/internal/advertise-tools.d.ts +2 -0
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +30 -10
- package/dist/internal/approval-gate.d.ts +12 -13
- package/dist/internal/approval-gate.d.ts.map +1 -1
- package/dist/internal/approval-gate.js +16 -21
- package/dist/internal/bounded.d.ts +7 -0
- package/dist/internal/bounded.d.ts.map +1 -0
- package/dist/internal/bounded.js +32 -0
- package/dist/internal/chat-client.js +10 -0
- package/dist/internal/cli-deploy.d.ts +5 -0
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +57 -18
- package/dist/internal/cli-mcp-oauth.js +8 -18
- package/dist/internal/cli-slack-manual.d.ts +24 -2
- package/dist/internal/cli-slack-manual.d.ts.map +1 -1
- package/dist/internal/cli-slack-manual.js +251 -20
- package/dist/internal/cli-slack.d.ts +9 -2
- package/dist/internal/cli-slack.d.ts.map +1 -1
- package/dist/internal/cli-slack.js +29 -82
- package/dist/internal/conversation-mirror.d.ts +11 -8
- package/dist/internal/conversation-mirror.d.ts.map +1 -1
- package/dist/internal/conversation-mirror.js +116 -55
- package/dist/internal/cursor/account-mcp.d.ts +1 -0
- package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
- package/dist/internal/cursor/account-mcp.js +17 -0
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +22 -48
- package/dist/internal/cursor/session-token.d.ts +45 -0
- package/dist/internal/cursor/session-token.d.ts.map +1 -0
- package/dist/internal/cursor/session-token.js +99 -0
- package/dist/internal/cursor-agent-template.d.ts +1 -1
- package/dist/internal/cursor-agent-template.d.ts.map +1 -1
- package/dist/internal/cursor-agent-template.js +2 -0
- package/dist/internal/deploy-client.d.ts +17 -0
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +31 -10
- package/dist/internal/env-file.d.ts +19 -0
- package/dist/internal/env-file.d.ts.map +1 -0
- package/dist/internal/env-file.js +90 -0
- package/dist/internal/framework-file-storage.d.ts +61 -0
- package/dist/internal/framework-file-storage.d.ts.map +1 -0
- package/dist/internal/framework-file-storage.js +210 -0
- package/dist/internal/framework-storage-selection.d.ts +11 -5
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/framework-storage-selection.js +38 -11
- package/dist/internal/hosted-delivery-protocol.d.ts +7 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +7 -0
- package/dist/internal/hosted-delivery.d.ts +13 -0
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +64 -19
- package/dist/internal/hosted-execution-diag.d.ts +48 -0
- package/dist/internal/hosted-execution-diag.d.ts.map +1 -0
- package/dist/internal/hosted-execution-diag.js +150 -0
- package/dist/internal/http-channel.d.ts.map +1 -1
- package/dist/internal/http-channel.js +81 -1
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +4 -0
- package/dist/internal/install-cursor-skills.d.ts.map +1 -1
- package/dist/internal/install-cursor-skills.js +1 -3
- package/dist/internal/logs-client.d.ts +5 -0
- package/dist/internal/logs-client.d.ts.map +1 -1
- package/dist/internal/logs-client.js +5 -0
- package/dist/internal/managed-delivery.d.ts +80 -0
- package/dist/internal/managed-delivery.d.ts.map +1 -0
- package/dist/internal/managed-delivery.js +86 -0
- package/dist/internal/mcp-endpoint.js +2 -3
- package/dist/internal/mcp-host.d.ts +10 -0
- package/dist/internal/mcp-host.d.ts.map +1 -1
- package/dist/internal/mcp-host.js +57 -8
- package/dist/internal/mcp-oauth-on-demand.d.ts +68 -0
- package/dist/internal/mcp-oauth-on-demand.d.ts.map +1 -0
- package/dist/internal/mcp-oauth-on-demand.js +287 -0
- package/dist/internal/mcp-oauth-persist.d.ts +42 -0
- package/dist/internal/mcp-oauth-persist.d.ts.map +1 -0
- package/dist/internal/mcp-oauth-persist.js +92 -0
- package/dist/internal/mcp-oauth.d.ts +1 -0
- package/dist/internal/mcp-oauth.d.ts.map +1 -1
- package/dist/internal/mcp-oauth.js +10 -2
- package/dist/internal/otel/collector.d.ts.map +1 -1
- package/dist/internal/otel/collector.js +22 -9
- package/dist/internal/runtime-dispatch-runner.d.ts +5 -1
- package/dist/internal/runtime-dispatch-runner.d.ts.map +1 -1
- package/dist/internal/runtime-dispatch-runner.js +7 -0
- package/dist/internal/sdk-runner.d.ts +11 -0
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +39 -8
- package/dist/internal/server.d.ts +3 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +49 -21
- package/dist/internal/session-engine.d.ts +101 -3
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +577 -46
- package/dist/internal/sessions-client.d.ts +9 -7
- package/dist/internal/sessions-client.d.ts.map +1 -1
- package/dist/internal/sessions-client.js +3 -1
- package/dist/internal/steering.d.ts +15 -0
- package/dist/internal/steering.d.ts.map +1 -0
- package/dist/internal/steering.js +18 -0
- package/dist/internal/storage-coordinator.d.ts +7 -0
- package/dist/internal/storage-coordinator.d.ts.map +1 -1
- package/dist/internal/storage-coordinator.js +28 -5
- package/dist/internal/storage-roles.d.ts +5 -0
- package/dist/internal/storage-roles.d.ts.map +1 -1
- package/dist/internal/stream-progress.d.ts.map +1 -1
- package/dist/internal/stream-progress.js +10 -0
- package/dist/internal/tool-policy.d.ts +9 -1
- package/dist/internal/tool-policy.d.ts.map +1 -1
- package/dist/internal/tool-policy.js +13 -0
- package/dist/internal/trajectory.d.ts.map +1 -1
- package/dist/internal/trajectory.js +10 -0
- package/dist/internal/turn-outbox.d.ts +24 -0
- package/dist/internal/turn-outbox.d.ts.map +1 -0
- package/dist/internal/turn-outbox.js +80 -0
- package/dist/playground/assets/{index-CZA1uEWA.js → index-DrkI6y5O.js} +51 -51
- package/dist/playground/assets/index-DzNGwm7q.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/storage-backends/cursor-hosted.d.ts +9 -6
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +16 -3
- package/dist/storage.d.ts +8 -0
- package/dist/storage.d.ts.map +1 -1
- package/dist/types.d.ts +65 -8
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +7 -3
- package/docs/deployment.md +5 -4
- package/docs/guides/mcp-oauth.md +26 -8
- package/docs/guides/slack.md +93 -202
- package/docs/reference/agent-config.md +2 -2
- package/docs/reference/cli.md +39 -16
- package/docs/reference/connections.md +6 -3
- package/docs/reference/http-api.md +2 -1
- package/docs/reference/sessions.md +4 -2
- package/docs/reference/tools.md +9 -2
- package/docs/templates/agents-md.md +110 -0
- package/docs/templates/code-wiki.md +96 -0
- package/docs/troubleshooting.md +2 -2
- package/package.json +2 -2
- package/skills/ab/SKILL.md +13 -97
- package/skills/create-agent/SKILL.md +124 -223
- package/skills/debug/SKILL.md +34 -68
- package/skills/evals/SKILL.md +55 -180
- package/skills/framework-map/SKILL.md +83 -145
- package/skills/github/SKILL.md +53 -111
- package/skills/hillclimb/SKILL.md +40 -163
- package/skills/mcp-auth/SKILL.md +51 -107
- package/skills/otel/SKILL.md +22 -68
- package/skills/setup-slack/SKILL.md +91 -212
- package/src/bin/agent-serve.ts +13 -1
- package/src/channels/deployments/types.ts +1 -0
- package/src/channels/origin/api.ts +264 -33
- package/src/channels/origin/binding.ts +57 -28
- package/src/channels/origin/checks.ts +6 -6
- package/src/channels/origin/cursor-account.ts +5 -3
- package/src/channels/origin/index.ts +1 -0
- package/src/channels/origin/origin-channel.ts +4 -0
- package/src/channels/origin/reactions.ts +82 -0
- package/src/channels/origin/types.ts +11 -0
- package/src/channels/slack/api.ts +41 -5
- package/src/channels/slack/approvals.ts +105 -0
- package/src/channels/slack/cli-project.ts +267 -0
- package/src/channels/slack/defaults.ts +122 -93
- package/src/channels/slack/dispatch.ts +56 -22
- package/src/channels/slack/inbound.ts +43 -0
- package/src/channels/slack/init.ts +10 -5
- package/src/channels/slack/interactive.ts +35 -9
- package/src/channels/slack/live-delivery.ts +235 -114
- package/src/channels/slack/manifest.ts +6 -2
- package/src/channels/slack/nudge-carrier.ts +48 -1
- package/src/channels/slack/setup.ts +10 -6
- package/src/channels/slack/slack-channel.ts +3 -0
- package/src/channels/slack/tool-approval-events.ts +93 -0
- package/src/evals/run-facts.ts +32 -0
- package/src/files-backends/cursor-hosted.ts +40 -7
- package/src/internal/advertise-tools.ts +49 -12
- package/src/internal/approval-gate.ts +20 -29
- package/src/internal/bounded.ts +28 -0
- package/src/internal/chat-client.ts +19 -0
- package/src/internal/cli-deploy.ts +91 -9
- package/src/internal/cli-mcp-oauth.ts +7 -21
- package/src/internal/cli-slack-manual.ts +350 -18
- package/src/internal/cli-slack.ts +40 -84
- package/src/internal/conversation-mirror.ts +145 -69
- package/src/internal/cursor/account-mcp.ts +21 -0
- package/src/internal/cursor/backend-client.ts +34 -58
- package/src/internal/cursor/session-token.ts +115 -0
- package/src/internal/cursor-agent-template.ts +2 -0
- package/src/internal/deploy-client.ts +43 -0
- package/src/internal/env-file.ts +84 -0
- package/src/internal/framework-file-storage.ts +228 -0
- package/src/internal/framework-storage-selection.ts +51 -11
- package/src/internal/hosted-delivery-protocol.ts +7 -0
- package/src/internal/hosted-delivery.ts +107 -24
- package/src/internal/hosted-execution-diag.ts +207 -0
- package/src/internal/http-channel.ts +99 -0
- package/src/internal/init-project.ts +4 -0
- package/src/internal/install-cursor-skills.ts +1 -4
- package/src/internal/logs-client.ts +5 -0
- package/src/internal/managed-delivery.ts +125 -0
- package/src/internal/mcp-endpoint.ts +13 -4
- package/src/internal/mcp-host.ts +77 -11
- package/src/internal/mcp-oauth-on-demand.ts +352 -0
- package/src/internal/mcp-oauth-persist.ts +127 -0
- package/src/internal/mcp-oauth.ts +17 -1
- package/src/internal/otel/collector.ts +30 -0
- package/src/internal/runtime-dispatch-runner.ts +10 -0
- package/src/internal/sdk-runner.ts +56 -8
- package/src/internal/server.ts +61 -9
- package/src/internal/session-engine.ts +723 -60
- package/src/internal/sessions-client.ts +17 -8
- package/src/internal/steering.ts +17 -0
- package/src/internal/storage-coordinator.ts +38 -8
- package/src/internal/storage-roles.ts +7 -0
- package/src/internal/stream-progress.ts +19 -0
- package/src/internal/tool-policy.ts +18 -0
- package/src/internal/trajectory.ts +10 -0
- package/src/internal/turn-outbox.ts +85 -0
- package/src/storage-backends/cursor-hosted.ts +22 -8
- package/src/storage.ts +12 -0
- package/src/types.ts +70 -9
- package/templates/agents-md/README.md +39 -0
- package/templates/agents-md/agent/agent.ts +8 -0
- package/templates/agents-md/agent/channels/github.ts +10 -0
- package/templates/agents-md/agent/channels/queue.ts +28 -0
- package/templates/agents-md/agent/channels/slack.ts +9 -0
- package/templates/agents-md/agent/instructions.md +39 -0
- package/templates/agents-md/agent/lib/collect.ts +439 -0
- package/templates/agents-md/agent/lib/config.ts +8 -0
- package/templates/agents-md/agent/lib/paths.ts +51 -0
- package/templates/agents-md/agent/schedules/weekly.ts +17 -0
- package/templates/agents-md/agent/tools/apply_agents.ts +226 -0
- package/templates/agents-md/evals/agents.eval.ts +135 -0
- package/templates/agents-md/evals/evals.config.ts +5 -0
- package/templates/agents-md/init.json +38 -0
- package/templates/agents-md/package.json +18 -0
- package/templates/agents-md/tsconfig.json +12 -0
- package/templates/code-wiki/README.md +34 -0
- package/templates/code-wiki/agent/agent.ts +8 -0
- package/templates/code-wiki/agent/channels/github.ts +144 -0
- package/templates/code-wiki/agent/instructions.md +39 -0
- package/templates/code-wiki/agent/lib/repos.ts +5 -0
- package/templates/code-wiki/agent/lib/wiki.ts +22 -0
- package/templates/code-wiki/agent/tools/apply_wiki.ts +219 -0
- package/templates/code-wiki/evals/evals.config.ts +5 -0
- package/templates/code-wiki/evals/wiki.eval.ts +132 -0
- package/templates/code-wiki/init.json +25 -0
- package/templates/code-wiki/package.json +18 -0
- package/templates/code-wiki/tsconfig.json +12 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.oqPawjiD.js +0 -1
- package/dist/docs/assets/guides_slack.md.C32HsdKk.js +0 -38
- package/dist/docs/assets/guides_slack.md.C32HsdKk.lean.js +0 -1
- package/dist/docs/assets/index.md.BoHaMdeZ.js +0 -5
- package/dist/docs/assets/reference_sessions.md.D0mIh4KK.js +0 -1
- package/dist/docs/assets/troubleshooting.md.Ctv3T8C2.js +0 -1
- package/dist/docs/design/agsh.md +0 -406
- package/dist/internal/deployment-scm-event-stream.d.ts +0 -116
- package/dist/internal/deployment-scm-event-stream.d.ts.map +0 -1
- package/dist/internal/deployment-scm-event-stream.js +0 -474
- package/dist/playground/assets/index-CF7hUDnQ.css +0 -1
- package/docs/design/agsh.md +0 -406
- package/src/internal/deployment-scm-event-stream.ts +0 -593
- /package/dist/docs/assets/{deployment.md.D9msOFOW.lean.js → deployment.md.MFPKqsqI.lean.js} +0 -0
- /package/dist/docs/assets/{reference_agent-config.md.Cp_x38Nl.lean.js → reference_agent-config.md.BHeYMgme.lean.js} +0 -0
- /package/dist/docs/assets/{reference_connections.md.BH8Oc0D0.lean.js → reference_connections.md.DxldvyIB.lean.js} +0 -0
- /package/dist/docs/assets/{reference_http-api.md.D89k1mdm.lean.js → reference_http-api.md.5zOAbV86.lean.js} +0 -0
- /package/dist/docs/assets/{reference_sessions.md.D0mIh4KK.lean.js → reference_sessions.md.NxFP_CAC.lean.js} +0 -0
- /package/dist/docs/assets/{reference_tools.md.BHeXn2id.lean.js → reference_tools.md.B84gw9Ii.lean.js} +0 -0
- /package/dist/docs/assets/{troubleshooting.md.Ctv3T8C2.lean.js → troubleshooting.md.DCiPBhYs.lean.js} +0 -0
package/skills/evals/SKILL.md
CHANGED
|
@@ -1,129 +1,58 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentsdk-evals
|
|
3
3
|
description: >-
|
|
4
|
-
Author and run
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
Author and run defineEval cases. Use when writing, fixing, seeding,
|
|
5
|
+
or hillclimbing evals. Ask whether to generate samples or take
|
|
6
|
+
uploaded data. Materialize API-backed fixtures first. Live A/B is
|
|
7
|
+
defineAB (skills/ab), not defineEval.
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Agent SDK evals
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
Fixed input, model turn, gates on the trajectory. Files live at
|
|
13
|
+
project-root `evals/**/*.eval.ts`. `agent/evals/` is ignored.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
**project root** `evals/**/*.eval.ts` (never `agent/evals/` — that slot is
|
|
18
|
-
ignored).
|
|
19
|
-
|
|
20
|
-
For **live A/B metrics** while the agent serves traffic, use `defineAB`
|
|
21
|
-
under `agent/ab` (`packages/agent-serve/skills/ab/SKILL.md`). That plug-in
|
|
22
|
-
enrolls via sticky `split` and calls `onSample`; it is not a test runner
|
|
23
|
-
and does not replace `defineEval` gates.
|
|
24
|
-
|
|
25
|
-
**Identity**
|
|
26
|
-
|
|
27
|
-
- File id = path under `evals/` without `.eval.ts`
|
|
28
|
-
(`evals/weather.eval.ts` → `weather`).
|
|
29
|
-
- Single datapoint (`test`): case id = file id
|
|
30
|
-
(`evals/weather/nyc.eval.ts` → `weather/nyc`).
|
|
31
|
-
- Multiple datapoints (`cases`): case id = `<fileId>/<case.id>`
|
|
32
|
-
(`evals/weather.eval.ts` + `{ id: "nyc" }` → `weather/nyc`).
|
|
15
|
+
Live traffic variants: `skills/ab/SKILL.md`. That is not a test
|
|
16
|
+
runner.
|
|
33
17
|
|
|
34
18
|
```bash
|
|
35
|
-
agent-sdk eval --dir . --list
|
|
36
|
-
agent-sdk eval --dir . --json
|
|
37
|
-
agent-sdk eval --dir . weather/nyc
|
|
38
|
-
agent-sdk eval --dir . weather # every datapoint in that file
|
|
39
|
-
agent-sdk eval --dir . weather forecast # several files
|
|
19
|
+
agent-sdk eval --dir . --list
|
|
20
|
+
agent-sdk eval --dir . --json
|
|
21
|
+
agent-sdk eval --dir . weather/nyc
|
|
40
22
|
agent-sdk eval --dir . --tag smoke
|
|
41
|
-
agent-sdk eval --dir . --verbose
|
|
42
23
|
```
|
|
43
24
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
## Seeding / adding samples (required fork)
|
|
25
|
+
| Form | Case id |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| `evals/weather.eval.ts` + `test` | `weather` |
|
|
28
|
+
| `evals/weather/nyc.eval.ts` + `test` | `weather/nyc` |
|
|
29
|
+
| `evals/weather.eval.ts` + `{ id: "nyc" }` | `weather/nyc` |
|
|
50
30
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
assume a source of fixtures.
|
|
31
|
+
`eval` boots an ephemeral server and a temp state root. `--url`
|
|
32
|
+
points at a running agent. Model turns need `CURSOR_API_KEY`.
|
|
54
33
|
|
|
55
|
-
|
|
34
|
+
## Seeding
|
|
56
35
|
|
|
57
|
-
|
|
58
|
-
label it `(recommended)`. Do **not** put code blocks inside the question
|
|
59
|
-
prompt (they render poorly); keep the prompt short plain text.
|
|
36
|
+
Creating or expanding cases: `AskQuestion` first.
|
|
60
37
|
|
|
61
38
|
| Question | Options |
|
|
62
39
|
| --- | --- |
|
|
63
40
|
| **How should we get eval samples?** | Generate test eval samples for me `(recommended)` · I will add / upload the data manually |
|
|
64
41
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
If the uploaded data is **API-backed** (PR URLs, pinned SHAs, gold labels,
|
|
75
|
-
snapshot ids) rather than self-contained prompts/diffs, **materialize
|
|
76
|
-
fixtures first** — see “When eval data needs API calls to render” below.
|
|
77
|
-
|
|
78
|
-
**How to upload:**
|
|
79
|
-
|
|
80
|
-
1. Add or edit `.eval.ts` files under the project’s `evals/` directory.
|
|
81
|
-
2. Ensure `evals/evals.config.ts` exists with `maxConcurrency`.
|
|
82
|
-
3. Optional fixtures beside the case or under `fixtures/`.
|
|
83
|
-
4. Tell the agent once the files are in place — or paste case bodies in chat
|
|
84
|
-
and ask the agent to write the file.
|
|
85
|
-
5. Verify: `agent-sdk eval --dir <project> --list` shows the new ids.
|
|
86
|
-
|
|
87
|
-
### Step 2b — user chose agent-generated samples
|
|
88
|
-
|
|
89
|
-
1. Use `AskQuestion` again for count (single-select), recommended first:
|
|
90
|
-
|
|
91
|
-
| Question | Options |
|
|
92
|
-
| --- | --- |
|
|
93
|
-
| **How many test samples should I create?** | `3` `(recommended)` · `5` · `10` · Other (enter a number) |
|
|
94
|
-
|
|
95
|
-
2. Inspect the agent (tools, instructions, existing `evals/`) and invent
|
|
96
|
-
that many **distinct** datapoints: frozen prompts + decision/shape gates,
|
|
97
|
-
not exact prose. Follow “What good cases assert” below.
|
|
98
|
-
3. **Append** — prefer adding entries to an existing file’s `cases` array
|
|
99
|
-
when the suite fits; otherwise create a new `evals/<suite>.eval.ts` with
|
|
100
|
-
`cases`. Never overwrite or weaken an existing datapoint. Case ids must
|
|
101
|
-
not collide with `agent-sdk eval --dir <project> --list`.
|
|
102
|
-
4. Create `evals/evals.config.ts` if missing (`maxConcurrency: 20` is fine
|
|
103
|
-
for now; hard limit 200 for model provider request limits).
|
|
104
|
-
5. Re-list to confirm, then optionally run `--tag smoke` if you tagged any.
|
|
42
|
+
1. **Manual.** They provide files or paste. Show the shape below.
|
|
43
|
+
Do not invent cases. Then `eval --list` and wire gates.
|
|
44
|
+
API-backed pointers (PR URLs, SHAs, gold labels): materialize
|
|
45
|
+
under `fixtures/` first.
|
|
46
|
+
2. **Generated.** Ask count (`3` recommended). Append to an
|
|
47
|
+
existing `cases` array when it fits. Never overwrite or weaken
|
|
48
|
+
a datapoint. Create `evals/evals.config.ts` if missing
|
|
49
|
+
(`maxConcurrency: 20`; cap 200).
|
|
105
50
|
|
|
106
|
-
##
|
|
51
|
+
## API
|
|
107
52
|
|
|
108
53
|
```ts
|
|
109
|
-
import { defineEval, includes,
|
|
54
|
+
import { defineEval, includes, satisfies } from "@cursor/july/evals";
|
|
110
55
|
|
|
111
|
-
// Single datapoint (case id = file path under evals/)
|
|
112
|
-
export default defineEval({
|
|
113
|
-
description: "Uses get_weather for temperature questions.",
|
|
114
|
-
tags: ["smoke"],
|
|
115
|
-
timeoutMs: 120_000,
|
|
116
|
-
async test(t) {
|
|
117
|
-
await t.send("What's the temperature in NYC?");
|
|
118
|
-
t.succeeded();
|
|
119
|
-
t.calledTool("get_weather");
|
|
120
|
-
t.notCalledTool("save_weather_note");
|
|
121
|
-
t.messageIncludes(/°|[FC]/);
|
|
122
|
-
t.check(t.reply, includes("NYC"));
|
|
123
|
-
},
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
// Multiple datapoints in one file (ids = <fileId>/<case.id>)
|
|
127
56
|
export default defineEval({
|
|
128
57
|
tags: ["smoke", "weather"],
|
|
129
58
|
cases: [
|
|
@@ -134,100 +63,46 @@ export default defineEval({
|
|
|
134
63
|
await t.send("What's the temperature in NYC?");
|
|
135
64
|
t.succeeded();
|
|
136
65
|
t.calledTool("get_weather");
|
|
66
|
+
t.notCalledTool("save_weather_note");
|
|
137
67
|
t.check(t.reply, includes(/°|[FC]/));
|
|
138
68
|
},
|
|
139
69
|
},
|
|
140
|
-
{
|
|
141
|
-
id: "paris",
|
|
142
|
-
async test(t) {
|
|
143
|
-
await t.send("What's the weather in Paris?");
|
|
144
|
-
t.succeeded();
|
|
145
|
-
t.calledTool("get_weather");
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
70
|
],
|
|
149
71
|
});
|
|
150
72
|
```
|
|
151
73
|
|
|
152
|
-
Project-wide defaults in `evals/evals.config.ts` (required once):
|
|
153
|
-
|
|
154
74
|
```ts
|
|
155
|
-
import {
|
|
156
|
-
defineEvalConfig,
|
|
157
|
-
persistEvalRunsToDir,
|
|
158
|
-
} from "@cursor/july/evals";
|
|
75
|
+
import { defineEvalConfig } from "@cursor/july/evals";
|
|
159
76
|
|
|
160
77
|
export default defineEvalConfig({
|
|
161
|
-
maxConcurrency: 20,
|
|
162
|
-
// Playground batches are memory-only unless you set persistRuns:
|
|
163
|
-
// maxPlaygroundRuns: 50, // optional; default 20; playground history only
|
|
164
|
-
// persistRuns: persistEvalRunsToDir(".agent-serve/eval-runs"),
|
|
78
|
+
maxConcurrency: 20,
|
|
165
79
|
});
|
|
166
80
|
```
|
|
167
81
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
Options: `workspaceDir`, `workspaceFiles` (`{ path: contents }` seeded
|
|
172
|
-
before the first turn). Multiple `t.send` calls share the session.
|
|
173
|
-
- `t.reply` / `t.events` / `t.sessionId` for assertions and correlation.
|
|
174
|
-
- `t.metric(name, value)` — structured scores on the case snapshot (playground
|
|
175
|
-
badges + CLI). Prefer this over encoding scores only in `t.log`.
|
|
176
|
-
- Builders: `includes(string | RegExp)`, `equals(value)`,
|
|
177
|
-
`satisfies(predicate, label)`.
|
|
178
|
-
|
|
179
|
-
### Playground customization (optional)
|
|
180
|
-
|
|
181
|
-
Drop `agent/playground/evals.tsx` exporting `agentName` (must match
|
|
182
|
-
`defineAgent({ name })`) and
|
|
183
|
-
`default: { RunSummary?, CaseMetrics?, CaseExtras? }`. The playground
|
|
184
|
-
loads these via Vite glob (`factory/*`). Without a
|
|
185
|
-
module, cases still show default `t.metric` badges.
|
|
186
|
-
|
|
187
|
-
## What good cases assert
|
|
188
|
-
|
|
189
|
-
Gate **decisions and shape, not prose**. Model wording varies run to run;
|
|
190
|
-
tool choice, tool avoidance, and output structure shouldn't.
|
|
191
|
-
|
|
192
|
-
1. `t.succeeded()` — always, first.
|
|
193
|
-
2. The tool decision: `calledTool` for the intended path, `notCalledTool`
|
|
194
|
-
for the tempting wrong one (the pair is stronger than either alone).
|
|
195
|
-
3. Output shape: a regex for the contract (`/°|[FC]/`, a JSON marker, a
|
|
196
|
-
findings-block fence) — not exact sentences.
|
|
197
|
-
4. For structured output, parse `t.reply` and `t.check` fields with
|
|
198
|
-
`satisfies` rather than substring-matching JSON.
|
|
199
|
-
5. When a shape gate keeps failing on model formatting, tighten the output
|
|
200
|
-
contract in instructions and re-run — do not move rendering into a host
|
|
201
|
-
tool to make the gate pass. That trades a prompt fix for permanent code.
|
|
202
|
-
|
|
203
|
-
Anti-patterns: asserting exact phrasing; more than ~5 gates in one case
|
|
204
|
-
(split it); cases that depend on live external state that drifts (pin the
|
|
205
|
-
input instead — see fixtures).
|
|
206
|
-
|
|
207
|
-
## Fixture strategy by agent type
|
|
208
|
-
|
|
209
|
-
| Agent surface | Fixture source |
|
|
210
|
-
| --- | --- |
|
|
211
|
-
| Chat / domain assistant | A canonical prompt string, chosen once and frozen |
|
|
212
|
-
| Tool-heavy | `agent-sdk call <tool> --dir . --input '{...}'` first, then the prompt that should trigger it |
|
|
213
|
-
| GitHub webhook | `github replay … --dry-run --out fixtures/github` (see `packages/agent-serve/skills/github/SKILL.md`) |
|
|
214
|
-
| PR reviewer with host prep | A small fixed PR the team controls; assert on findings shape, not counts |
|
|
215
|
-
| Workspace-dependent | `workspaceFiles` in `t.send` — never machine-local paths |
|
|
82
|
+
Either `test(t)` or `cases`, not both. `t.send` waits for park/fail.
|
|
83
|
+
`workspaceFiles` seeds the first turn. Assert with `t.succeeded()`,
|
|
84
|
+
`calledTool` / `notCalledTool`, `t.check(t.reply, …)`, `t.metric`.
|
|
216
85
|
|
|
217
|
-
|
|
86
|
+
## What to gate
|
|
218
87
|
|
|
219
|
-
|
|
220
|
-
self-contained evidence, do **not** wire live `t.send(prUrl)` matrices.
|
|
221
|
-
Materialize once under `fixtures/` at pinned SHAs, point cases at those
|
|
222
|
-
files, gate on decision/shape against gold, and keep a tiny `--tag smoke`
|
|
223
|
-
subset for any full-pipeline runs.
|
|
88
|
+
Decisions and shape, not prose.
|
|
224
89
|
|
|
225
|
-
|
|
90
|
+
1. `t.succeeded()` first
|
|
91
|
+
2. Intended tool + the tempting wrong one
|
|
92
|
+
3. A shape regex or `satisfies` on parsed fields
|
|
93
|
+
4. If formatting keeps failing, tighten instructions. Do not move
|
|
94
|
+
rendering into a host tool.
|
|
226
95
|
|
|
227
|
-
|
|
228
|
-
|
|
96
|
+
Anti-patterns: exact phrasing; more than ~5 gates (split); live
|
|
97
|
+
drifting inputs (pin them).
|
|
229
98
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
99
|
+
| Surface | Fixture |
|
|
100
|
+
| --- | --- |
|
|
101
|
+
| Chat | One frozen prompt |
|
|
102
|
+
| Tool-heavy | `agent-sdk call` first, then the prompt |
|
|
103
|
+
| GitHub | `github replay … --dry-run --out fixtures/github` |
|
|
104
|
+
| Host-prep PR review | A team-owned PR; gate findings shape, not counts |
|
|
105
|
+
| Workspace | `workspaceFiles` in `t.send` |
|
|
106
|
+
|
|
107
|
+
Every kept hillclimb change lands an eval that would have failed
|
|
108
|
+
before it. Never weaken a gate to pass a round.
|
|
@@ -1,165 +1,103 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentsdk-framework-map
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Agent SDK projects with agent/agent.ts and agent/instructions.md.
|
|
4
|
+
Orient on Agent SDK layout, local vs cloud runtime, sessions, and
|
|
5
|
+
invariants (Node not Bun, root evals/, typecheck after tsx). Use
|
|
6
|
+
when creating, editing, or running a project with agent/agent.ts.
|
|
8
7
|
---
|
|
9
8
|
|
|
10
9
|
# Agent SDK framework map
|
|
11
10
|
|
|
12
|
-
`@cursor/july`
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
read/grep the model makes fails and turns degrade into 8-minute retry
|
|
35
|
-
loops. All package mise tasks already use tsx.
|
|
36
|
-
2. **Evals live at the project root `evals/`**, never `agent/evals/` (that
|
|
37
|
-
path is silently ignored).
|
|
38
|
-
3. **tsx strips types without checking them.** `validate`/`run` passing
|
|
39
|
-
does not mean the code typechecks — run the repo's TypeScript check
|
|
40
|
-
(in everysphere: `dev check typecheck packages/agent-serve/... --timeout 120`)
|
|
41
|
-
before shipping. Classic miss: a tool `execute` return that fails
|
|
42
|
-
`ToolExecuteResult` — returns must be JSON-shaped, so use object
|
|
43
|
-
literals or `type` aliases, not `interface` types.
|
|
44
|
-
4. **Harness cwd in a nested git repo.** Discovery defaults `local.cwd` to
|
|
45
|
-
`~/.cache/agent-serve/<dir>` so ancestor `AGENTS.md` / `.cursor` / IDE
|
|
46
|
-
MCP do not leak into playground turns. Set cwd at a checkout only when
|
|
47
|
-
the agent must inherit that tree. Attached MCP is invisible by name
|
|
48
|
-
until `advertiseTools: true`.
|
|
49
|
-
5. **A model turn needs `CURSOR_API_KEY`.** Everything structural
|
|
50
|
-
(`validate`, `info`, `call`, `serve` bring-up) works without one.
|
|
11
|
+
`@cursor/july` discovers files under `agent/` and serves the agent
|
|
12
|
+
over HTTP, Slack, and GitHub. Markdown is prose. TypeScript is typed
|
|
13
|
+
behavior. Ground truth: package `README.md` and `AGENTS.md`.
|
|
14
|
+
|
|
15
|
+
CLI is `agent-sdk` (Node, never Bun).
|
|
16
|
+
|
|
17
|
+
Public docs: `node_modules/@cursor/july/dist/docs/llms.txt` or
|
|
18
|
+
`/docs/llms.txt` on a running host.
|
|
19
|
+
|
|
20
|
+
## Invariants
|
|
21
|
+
|
|
22
|
+
1. **Node 22.13+, never Bun.** Bun corrupts harness tool-result
|
|
23
|
+
streams (`NGHTTP2_FRAME_SIZE_ERROR`).
|
|
24
|
+
2. **Evals live at project-root `evals/`.** `agent/evals/` is ignored.
|
|
25
|
+
3. **tsx does not typecheck.** Tool `execute` must return JSON-shaped
|
|
26
|
+
values: object literals or `type` aliases, not `interface` types.
|
|
27
|
+
4. **Nested git checkouts.** Discovery sets `local.cwd` to a
|
|
28
|
+
per-project cache directory under `~/.cache`. Point cwd at a
|
|
29
|
+
checkout only when the agent must inherit that tree.
|
|
30
|
+
5. **Attached MCP is nameless** until `advertiseTools: true`.
|
|
31
|
+
6. **Model turns need `CURSOR_API_KEY`.** `validate`, `info`, `call`,
|
|
32
|
+
and `serve` bring-up do not.
|
|
51
33
|
|
|
52
34
|
## Folder structure
|
|
53
35
|
|
|
54
|
-
|
|
55
|
-
path live under README "Folder structure".
|
|
36
|
+
Path is identity. Full list: README "Folder structure".
|
|
56
37
|
|
|
57
|
-
| Path |
|
|
38
|
+
| Path | Role |
|
|
58
39
|
| --- | --- |
|
|
59
|
-
| `agent/agent.ts` | `defineAgent({ model?, runtime?, cloud?, local? })
|
|
60
|
-
| `agent/instructions.md` | Always-on system prompt (required
|
|
61
|
-
| `agent/tools/<name>.ts` | One
|
|
62
|
-
| `agent/skills/*` |
|
|
63
|
-
| `agent/mcp-connections/<name>.ts` | MCP
|
|
64
|
-
| `agent/host-connections/<name>.ts` | Privileged MCP for `ctx.host.mcp`
|
|
65
|
-
| `agent/subagents/<id>/` | Child agent
|
|
66
|
-
| `agent/channels/*.ts` |
|
|
67
|
-
| `agent/hooks/*.ts` | Observe-only
|
|
68
|
-
| `agent/ab.ts` or `agent/ab/*.ts` | Live A/B
|
|
69
|
-
| `agent/
|
|
70
|
-
| `agent/
|
|
71
|
-
| `agent/
|
|
72
|
-
| `agent/
|
|
73
|
-
| `
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
`runtime: "
|
|
79
|
-
the serve host; `runtime: "cloud"` runs them on Cursor cloud agents
|
|
80
|
-
(`bc-...` ids, needs `cloud: { repos: [...] }`).
|
|
40
|
+
| `agent/agent.ts` | `defineAgent({ model?, runtime?, cloud?, local? })` |
|
|
41
|
+
| `agent/instructions.md` | Always-on system prompt (required) |
|
|
42
|
+
| `agent/tools/<name>.ts` | One tool. `execution: "server"` or `"agent"` |
|
|
43
|
+
| `agent/skills/*` | On-demand procedures |
|
|
44
|
+
| `agent/mcp-connections/<name>.ts` | MCP. Never name an account file `cursor.ts`. `advertiseTools: true` for named local tools |
|
|
45
|
+
| `agent/host-connections/<name>.ts` | Privileged MCP for `ctx.host.mcp` / `mcp oauth` |
|
|
46
|
+
| `agent/subagents/<id>/` | Child agent (`description` required) |
|
|
47
|
+
| `agent/channels/*.ts` | Slack / GitHub / custom HTTP |
|
|
48
|
+
| `agent/hooks/*.ts` | Observe-only |
|
|
49
|
+
| `agent/ab.ts` or `agent/ab/*.ts` | Live A/B (`defineAB`) |
|
|
50
|
+
| `agent/otel.ts` | OpenTelemetry (`defineOtel`) |
|
|
51
|
+
| `agent/schedules/*` | Cron. Never auto-fire under `--dev` |
|
|
52
|
+
| `agent/sandbox/workspace/` | Session seed files (local only) |
|
|
53
|
+
| `agent/lib/` | Import-only. Never discovered |
|
|
54
|
+
| `evals/**/*.eval.ts` | Case id is the path under `evals/` |
|
|
55
|
+
|
|
56
|
+
## Local vs cloud
|
|
57
|
+
|
|
58
|
+
`runtime: "local"` (default) runs on the serve host.
|
|
59
|
+
`runtime: "cloud"` needs `cloud: { repos: [...] }`.
|
|
81
60
|
|
|
82
61
|
| Capability | local | cloud |
|
|
83
62
|
| --- | --- | --- |
|
|
84
|
-
| Server tools
|
|
63
|
+
| Server tools | yes | yes on managed hosting; self-hosted needs `--public-url` |
|
|
85
64
|
| Tool approvals | yes | no |
|
|
86
|
-
| Agent tools
|
|
87
|
-
| Skills | yes | yes |
|
|
65
|
+
| Agent tools / skills | yes | yes |
|
|
88
66
|
| sandbox seeds | yes | no |
|
|
89
|
-
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
A follow-up to a busy HTTP/MCP session **interrupts the in-flight turn**
|
|
107
|
-
and waits for it to settle before the new turn sends. Slack uses
|
|
108
|
-
**coalesce** instead (enqueue + boundary drain; see
|
|
109
|
-
`docs/reference/sessions.md`). `POST /v1/session/:id/stop` interrupts
|
|
110
|
-
without sending. Session-bound deterministic tool calls are rejected with
|
|
111
|
-
`409 session_busy` while a turn runs.
|
|
112
|
-
|
|
113
|
-
Key built-in routes (each agent, under `/<slug>` in multi-agent mode):
|
|
114
|
-
`POST /v1/session`, `POST /v1/session/:id`, `GET /v1/session/:id/stream`,
|
|
115
|
-
`GET /v1/sessions`, `POST /v1/tools/:toolName` (deterministic call),
|
|
116
|
-
`GET/POST /v1/session/:id/approvals[/:callId]`, `GET /v1/info`,
|
|
117
|
-
`GET /v1/health`, and in dev `POST /v1/dev/schedules/:id`,
|
|
118
|
-
`POST /v1/dev/reminders/:id`.
|
|
119
|
-
|
|
120
|
-
## State layout
|
|
121
|
-
|
|
122
|
-
```
|
|
123
|
-
<project>/.agent-serve/ # or <stateRoot>/<slug>/ under serve
|
|
124
|
-
sessions/<id>/session.json # metadata
|
|
125
|
-
sessions/<id>/events.ndjson # durable stream (replayable)
|
|
126
|
-
sessions/<id>/workspace/ # the harness cwd for that session
|
|
127
|
-
traces/<sessionId>.ndjson # written by `run`
|
|
128
|
-
runner/ # SDK conversation store
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
Delete a session directory to forget a conversation.
|
|
67
|
+
| Checkout | you arrange it | the VM carries it |
|
|
68
|
+
|
|
69
|
+
Use cloud when the job needs a checkout at scale. `validate` warns
|
|
70
|
+
when cloud is combined with local-only capabilities.
|
|
71
|
+
|
|
72
|
+
## Sessions
|
|
73
|
+
|
|
74
|
+
- **continuationToken** continues a conversation. HTTP follow-ups
|
|
75
|
+
rotate it. Stale tokens return `409`.
|
|
76
|
+
- **sessionId** is the inspect handle
|
|
77
|
+
(`GET /v1/session/:id/stream?startIndex=N`).
|
|
78
|
+
|
|
79
|
+
A follow-up to a busy HTTP/MCP session interrupts the in-flight
|
|
80
|
+
turn. Slack coalesces. Routes: `docs/reference/http-api.md`.
|
|
81
|
+
Session files live under the project state directory
|
|
82
|
+
(`--state-root`).
|
|
132
83
|
|
|
133
84
|
## Where logic belongs
|
|
134
85
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
## Where to go next
|
|
155
|
-
|
|
156
|
-
- Scaffolding → `packages/agent-serve/skills/create-agent/SKILL.md`
|
|
157
|
-
- Evals → `packages/agent-serve/skills/evals/SKILL.md`
|
|
158
|
-
- Live A/B metrics → `packages/agent-serve/skills/ab/SKILL.md`
|
|
159
|
-
- OpenTelemetry → `packages/agent-serve/skills/otel/SKILL.md`
|
|
160
|
-
- GitHub webhooks → `packages/agent-serve/skills/github/SKILL.md`
|
|
161
|
-
- Slack → `packages/agent-serve/skills/setup-slack/SKILL.md`
|
|
162
|
-
- Host MCP OAuth → `packages/agent-serve/skills/mcp-auth/SKILL.md`
|
|
163
|
-
- Local triage → `packages/agent-serve/skills/debug/SKILL.md`
|
|
164
|
-
- Measured improvement → `packages/agent-serve/skills/hillclimb/SKILL.md`
|
|
165
|
-
- Dogfood / deploy → `packages/agent-serve/skills/operate/SKILL.md`
|
|
86
|
+
Code: side-effect gates, write dedupe, auth, evidence seeding, hard
|
|
87
|
+
API caps. Model: formatting, summarizing, classification, replies.
|
|
88
|
+
Budget: `skills/create-agent/SKILL.md`.
|
|
89
|
+
|
|
90
|
+
Loop: `validate` / `info` / `call` / `run` / `eval` / `serve`. Serve
|
|
91
|
+
only this agent's directory.
|
|
92
|
+
|
|
93
|
+
| Task | Skill |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| Scaffold | `skills/create-agent/SKILL.md` |
|
|
96
|
+
| Evals | `skills/evals/SKILL.md` |
|
|
97
|
+
| Live A/B | `skills/ab/SKILL.md` |
|
|
98
|
+
| OpenTelemetry | `skills/otel/SKILL.md` |
|
|
99
|
+
| GitHub | `skills/github/SKILL.md` |
|
|
100
|
+
| Slack | `skills/setup-slack/SKILL.md` |
|
|
101
|
+
| Host MCP OAuth | `skills/mcp-auth/SKILL.md` |
|
|
102
|
+
| Local triage | `skills/debug/SKILL.md` |
|
|
103
|
+
| Measured improvement | `skills/hillclimb/SKILL.md` |
|