@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
|
@@ -1,142 +1,99 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentsdk-create-agent
|
|
3
3
|
description: >-
|
|
4
|
-
Scaffold a new Agent SDK agent
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
creating a new agent.
|
|
8
|
-
paths:
|
|
9
|
-
- packages/agent-serve/**/*
|
|
4
|
+
Scaffold a new Agent SDK agent: short AskQuestion interview, then
|
|
5
|
+
verify a turn and hand off to hillclimb. Use when creating a new
|
|
6
|
+
agent. Ask only what the invoking message left open.
|
|
10
7
|
---
|
|
11
8
|
|
|
12
9
|
# Create an Agent SDK agent
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
1. **Interview.** Two `AskQuestion` rounds, then a plan gate.
|
|
12
|
+
2. **Scaffold.** `agent-sdk init`, then shape the files.
|
|
13
|
+
3. **Verify.** `validate` / `info` / `call`, then a model turn.
|
|
14
|
+
4. **Channels.** Slack, GitHub, webhook, or schedule as chosen.
|
|
15
|
+
5. **Hillclimb.** `skills/hillclimb/SKILL.md`.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
wiring, `mcp-auth` for host MCP OAuth, `github` for webhook-driven
|
|
22
|
-
agents, `evals` for the eval API, `ab` for live A/B metrics, `otel` for
|
|
23
|
-
OpenTelemetry export, `hillclimb` for iteration once the agent runs.
|
|
24
|
-
|
|
25
|
-
Read `framework-map/SKILL.md` first if you haven't; treat the package
|
|
26
|
-
`AGENTS.md` and `README.md` as ground truth for
|
|
27
|
-
framework behavior. Run the CLI with Node, never Bun (Bun corrupts harness
|
|
28
|
-
tool-result streams): use the installed `agent-sdk` bin, or from a source
|
|
29
|
-
checkout `pnpm exec tsx src/bin/agent-serve.ts <command> …` — written as
|
|
30
|
-
`agent-sdk …` below.
|
|
17
|
+
Read `skills/framework-map/SKILL.md` if you have not. CLI is
|
|
18
|
+
`agent-sdk`. Public docs:
|
|
19
|
+
`node_modules/@cursor/july/dist/docs/llms.txt` or `/docs/llms.txt`
|
|
20
|
+
on a running host.
|
|
31
21
|
|
|
32
22
|
## Interview
|
|
33
23
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- **Ask about decisions, not implementation.** Instructions wording, tool
|
|
48
|
-
names, file layout, env prefix, and eval shape are your job — derive them
|
|
49
|
-
from the purpose and show the result instead of asking.
|
|
50
|
-
- If `AskQuestion` is unavailable or the user says "just go", state the
|
|
51
|
-
defaults you are assuming in one short list and proceed.
|
|
52
|
-
|
|
53
|
-
### Round 1 — identity
|
|
24
|
+
`AskQuestion`: batched, recommended option first and labeled
|
|
25
|
+
`(recommended)`.
|
|
26
|
+
|
|
27
|
+
- Mine the invoking message. Target: two rounds, then files.
|
|
28
|
+
- Round 1 is identity. Round 2 is the surface, tailored by round 1.
|
|
29
|
+
- Multi-select for channels, MCP, capabilities. Other where a
|
|
30
|
+
custom answer is plausible.
|
|
31
|
+
- Ask decisions, not how to build it. File layout, tool names,
|
|
32
|
+
env prefix, and eval shape are yours.
|
|
33
|
+
- If `AskQuestion` is missing or the user skips, state defaults
|
|
34
|
+
in one list and proceed.
|
|
35
|
+
|
|
36
|
+
### Round 1: identity
|
|
54
37
|
|
|
55
38
|
| Question | Options |
|
|
56
39
|
| --- | --- |
|
|
57
|
-
| **Purpose** | chat assistant · PR / repo automation · domain assistant over APIs/tools · scheduled reporter · Other
|
|
58
|
-
| **Name** | 2–3
|
|
59
|
-
| **Location** | `./<slug>` (default) · another directory
|
|
40
|
+
| **Purpose** | chat assistant · PR / repo automation · domain assistant over APIs/tools · scheduled reporter · Other |
|
|
41
|
+
| **Name** | 2–3 slugs from the purpose + Other. Directory: `[A-Za-z0-9][A-Za-z0-9_-]*`, not `v1`/`playground`/`docs` |
|
|
42
|
+
| **Location** | `./<slug>` (default) · another directory |
|
|
60
43
|
|
|
61
|
-
### Round 2
|
|
44
|
+
### Round 2: surface
|
|
62
45
|
|
|
63
46
|
| Question | Options | Guidance |
|
|
64
47
|
| --- | --- | --- |
|
|
65
|
-
| **Runtime** | `local` (default) · `cloud` |
|
|
66
|
-
| **Model** | `grok-4.5`
|
|
67
|
-
| **Channels** (multi) | playground + HTTP
|
|
68
|
-
| **MCP
|
|
69
|
-
| **Capabilities** (multi) | server tools · agent tools
|
|
70
|
-
|
|
71
|
-
Close the round with a one-screen plan — chosen options plus the file tree you
|
|
72
|
-
intend to create — and a final gate: "Scaffold it" / "Adjust something". Only
|
|
73
|
-
write files after approval.
|
|
48
|
+
| **Runtime** | `local` (default) · `cloud` | Cloud needs `cloud.repos`. Approvals and sandbox seeds are local only. Recommend local unless the job needs a cloud checkout. |
|
|
49
|
+
| **Model** | `grok-4.5` + `effort=high`, `fast=true` · Other id | Params, not id suffixes: `{ id: "grok-4.5", params: [{ id: "effort", value: "high" }, { id: "fast", value: "true" }] }` |
|
|
50
|
+
| **Channels** (multi) | playground + HTTP (always on) · Slack · GitHub · custom webhook · schedule | Slack: `skills/setup-slack/SKILL.md`. GitHub: `skills/github/SKILL.md`. No Discord/Teams pack; offer custom webhook. |
|
|
51
|
+
| **MCP** (multi) | none · remote URL · local stdio · Cursor account connectors · Other | One file under `agent/mcp-connections/`. Account file is `account.ts`, never `cursor.ts`. Named local tools need `advertiseTools: true`. Privileged servers go in `agent/host-connections/`. |
|
|
52
|
+
| **Capabilities** (multi) | server tools · agent tools · skills · subagents · hooks · sandbox seeds · approvals · evals (recommend) | Always recommend one smoke eval. |
|
|
74
53
|
|
|
75
|
-
|
|
54
|
+
Close with the plan and file tree, then "Scaffold it" / "Adjust
|
|
55
|
+
something". Write files only after approval.
|
|
76
56
|
|
|
77
|
-
|
|
78
|
-
purpose, and reach for the proven shape instead of
|
|
79
|
-
inventing:
|
|
57
|
+
## Fill the blanks
|
|
80
58
|
|
|
81
|
-
| Purpose
|
|
59
|
+
| Purpose | Shape |
|
|
82
60
|
| --- | --- |
|
|
83
|
-
| Slack chat
|
|
84
|
-
| PR review with host
|
|
85
|
-
| GitHub
|
|
86
|
-
| Domain assistant
|
|
87
|
-
| Wrap an existing pipeline
|
|
88
|
-
|
|
89
|
-
Defaults
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
(`~/.cache/agent-serve/<slug>`). Discovery does this for nested git
|
|
95
|
-
projects. Point cwd at a checkout only when the agent must inherit that
|
|
61
|
+
| Slack chat | `slackChannel({ envPrefix })` + suggested prompts. `agent-sdk slack create` mints the bot. Prefix: `skills/setup-slack/SKILL.md` |
|
|
62
|
+
| PR review with host prep | Channel `callTool` into a trimmed workspace `pr/` tree |
|
|
63
|
+
| GitHub automation | `githubChannel()` hooks, replay fixtures |
|
|
64
|
+
| Domain assistant | Server tools + one MCP connection + a skill |
|
|
65
|
+
| Wrap an existing pipeline | GitHub `{ task }` over a thin `agent/lib/` loop |
|
|
66
|
+
|
|
67
|
+
Defaults:
|
|
68
|
+
|
|
69
|
+
- Instructions + 1–2 tools + chosen channels + one smoke eval.
|
|
70
|
+
- `local.cwd` stays outside a monorepo checkout (default: a cache
|
|
71
|
+
directory under `~/.cache`) unless the agent must inherit that
|
|
96
72
|
tree.
|
|
97
|
-
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
`
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
summarizes, classifies, or composes replies is the model's job specified
|
|
113
|
-
badly, and it never comes off the books.
|
|
114
|
-
|
|
115
|
-
### The deterministic-path budget
|
|
116
|
-
|
|
117
|
-
TypeScript on the deterministic path is a permanent liability — every line
|
|
118
|
-
brings types, tests, restarts, and drift against the framework; prose is
|
|
119
|
-
cheap to change. Default every behavior to instructions/skills and promote
|
|
120
|
-
it to code only when it earns a row on the left:
|
|
121
|
-
|
|
122
|
-
| Code owns (earns its keep) | Model owns (keep out of code) |
|
|
73
|
+
- `agent/instructions.md`: identity, when to use which tool,
|
|
74
|
+
output shape.
|
|
75
|
+
- One tool per file. Prefer `execution: "server"` + zod
|
|
76
|
+
`inputSchema`. Gate side effects with `needsApproval: true`.
|
|
77
|
+
- Long prompts: `prompt\`…\`` / `prompt.lines\`…\`` from
|
|
78
|
+
`@cursor/july`.
|
|
79
|
+
- Host prep is for evidence (`callTool`, `workspaceFiles`), not
|
|
80
|
+
judgment, formatting, or replies.
|
|
81
|
+
|
|
82
|
+
### Deterministic-path budget
|
|
83
|
+
|
|
84
|
+
Default to instructions and skills. Promote to TypeScript only
|
|
85
|
+
when it earns the left column:
|
|
86
|
+
|
|
87
|
+
| Code owns | Model owns |
|
|
123
88
|
| --- | --- |
|
|
124
|
-
| Side-effect gates
|
|
125
|
-
|
|
|
126
|
-
| Auth
|
|
127
|
-
| Evidence seeding
|
|
128
|
-
| Hard
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
- **Prose in TS.** An `instructions.ts` / `prompt.ts` string builder is a
|
|
133
|
-
skill file wearing a trench coat — write `.md` and interpolate only what
|
|
134
|
-
is truly dynamic.
|
|
135
|
-
- **Inverted ratio.** A first cut whose `agent/lib/` + `tools/` dwarf its
|
|
136
|
-
instructions + skills (~3:1 or worse) is either wrapping an existing
|
|
137
|
-
deterministic pipeline (fine — keep the wrapper thin and say so) or
|
|
138
|
-
building a service with a vestigial model turn. Move procedure back into
|
|
139
|
-
prompts, or question whether this should be an agent at all.
|
|
89
|
+
| Side-effect gates (approve, deploy, post) | Human-facing output to a stated shape |
|
|
90
|
+
| Dedupe of external writes | Summarizing, classifying, wording |
|
|
91
|
+
| Auth and signature checks | What to do next from ground truth |
|
|
92
|
+
| Evidence seeding | Soft-failure retries |
|
|
93
|
+
| Hard API caps | Formatting under those caps |
|
|
94
|
+
|
|
95
|
+
Smells: prose builders in `.ts` (write `.md`); `agent/lib/` +
|
|
96
|
+
`tools/` dwarfing instructions + skills on a first cut.
|
|
140
97
|
|
|
141
98
|
## Scaffold
|
|
142
99
|
|
|
@@ -144,124 +101,68 @@ Two smells to check before scaffolding and again before hand-off:
|
|
|
144
101
|
agent-sdk init ./<slug>
|
|
145
102
|
```
|
|
146
103
|
|
|
147
|
-
`init` writes
|
|
148
|
-
`
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
customize `agent/channels/slack.ts` afterwards (e.g. `suggestedPrompts`).
|
|
166
|
-
5. `evals/evals.config.ts` — `defineEvalConfig({ maxConcurrency: 20 })`
|
|
167
|
-
(playground runs are memory-only unless you add `persistRuns`)
|
|
168
|
-
(`maxConcurrency` is required; hard-capped at 200 due to model provider
|
|
169
|
-
request limits) plus eval cases under `evals/**/*.eval.ts` — prefer one
|
|
170
|
-
suite file with `cases: [{ id, test }, …]` for related datapoints, or a
|
|
171
|
-
single `test` for one smoke. Assert `t.succeeded()` + `t.calledTool(...)`
|
|
172
|
-
(case id = file path, or `<fileId>/<case.id>`). Full assertion API and
|
|
173
|
-
fixture strategy: `evals/SKILL.md` (sibling skill).
|
|
174
|
-
|
|
175
|
-
Stick to deps the Agent SDK already
|
|
176
|
-
ships (`zod`, `@modelcontextprotocol/sdk`, `tsx`); a new npm dep needs its own
|
|
177
|
-
install story and is a smell for a first cut.
|
|
104
|
+
`init` writes the project, runs `npm install`, and may wait on
|
|
105
|
+
`login`. Then shape it:
|
|
106
|
+
|
|
107
|
+
1. `defineAgent` with the chosen model/runtime. Add
|
|
108
|
+
`cloud: { repos: [...] }` for cloud.
|
|
109
|
+
2. Real `instructions.md`. Replace `echo.ts`.
|
|
110
|
+
3. Chosen `channels/`, `mcp-connections/`, `skills/`,
|
|
111
|
+
`subagents/<id>/` (needs `description`), `schedules/`, `hooks/`.
|
|
112
|
+
Slack: `agent-sdk slack create --dir ./<slug> --name "<Name>"`,
|
|
113
|
+
not a hand-written channel. Manual Slack app:
|
|
114
|
+
`agent-sdk slack init --manual` (Slack CLI, or paste at
|
|
115
|
+
api.slack.com).
|
|
116
|
+
4. `evals/evals.config.ts` with `maxConcurrency: 20` (required;
|
|
117
|
+
cap 200) plus `evals/**/*.eval.ts`. Assert `t.succeeded()` +
|
|
118
|
+
`t.calledTool(...)`. API: `skills/evals/SKILL.md`.
|
|
119
|
+
|
|
120
|
+
Stay on deps the Agent SDK already ships (`zod`,
|
|
121
|
+
`@modelcontextprotocol/sdk`, `tsx`).
|
|
178
122
|
|
|
179
123
|
## Verify
|
|
180
124
|
|
|
181
|
-
No API key needed for the structural half — run these first and fix every
|
|
182
|
-
error diagnostic:
|
|
183
|
-
|
|
184
125
|
```bash
|
|
185
|
-
agent-sdk validate --dir ./<slug>
|
|
186
|
-
agent-sdk info --dir ./<slug> --json
|
|
187
|
-
agent-sdk call <tool> --dir ./<slug> --input '{…}'
|
|
126
|
+
agent-sdk validate --dir ./<slug>
|
|
127
|
+
agent-sdk info --dir ./<slug> --json
|
|
128
|
+
agent-sdk call <tool> --dir ./<slug> --input '{…}'
|
|
188
129
|
agent-sdk eval --dir ./<slug> --list
|
|
189
|
-
npx tsc --noEmit -p ./<slug>
|
|
130
|
+
npx tsc --noEmit -p ./<slug>
|
|
190
131
|
```
|
|
191
132
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
not satisfy `ToolExecuteResult` — returns must be JSON-shaped
|
|
195
|
-
(`ToolResultValue`), so use plain object literals or `type` aliases, not
|
|
196
|
-
`interface` types (their lack of an index signature fails assignability).
|
|
133
|
+
tsx does not typecheck. Tool `execute` must return JSON-shaped
|
|
134
|
+
values: object literals or `type` aliases, not `interface` types.
|
|
197
135
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
is forthcoming, finish every key-free check, confirm `run` fails with only
|
|
202
|
-
the clean API-key error, and hand these to the user as their next steps:
|
|
136
|
+
Model turns need `CURSOR_API_KEY`. Without one, finish the
|
|
137
|
+
key-free checks, confirm `run` fails with only the API-key error,
|
|
138
|
+
and hand these over:
|
|
203
139
|
|
|
204
140
|
```bash
|
|
205
|
-
agent-sdk run --dir ./<slug> --message "<fixture prompt>"
|
|
206
|
-
agent-sdk serve --dir ./<slug> --dev
|
|
207
|
-
#
|
|
141
|
+
agent-sdk run --dir ./<slug> --message "<fixture prompt>"
|
|
142
|
+
agent-sdk serve --dir ./<slug> --mode single --dev
|
|
143
|
+
# http://127.0.0.1:3000/playground
|
|
208
144
|
agent-sdk eval --dir ./<slug>
|
|
209
145
|
```
|
|
210
146
|
|
|
211
|
-
Serve only
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
## Hand off to hillclimbing
|
|
234
|
-
|
|
235
|
-
Scaffolding proves the agent runs; it says nothing about quality. Once the
|
|
236
|
-
smoke turn passes, propose the improvement loop — one last `AskQuestion` if
|
|
237
|
-
choices are open:
|
|
238
|
-
|
|
239
|
-
1. **Fixtures** — 1–3 fixed inputs worth optimizing against (a real PR URL, a
|
|
240
|
-
canonical Slack question, a saved webhook payload).
|
|
241
|
-
2. **Success criteria** — what "better" means first (correct tool choice,
|
|
242
|
-
fewer tool calls, faster wall time, output quality).
|
|
243
|
-
3. **Freeze line** — what must not change (API contract, output shape).
|
|
244
|
-
|
|
245
|
-
Those are exactly the preconditions in `skills/hillclimb/SKILL.md`; suggest
|
|
246
|
-
the user (or you) follow that skill with the fixtures you agreed on. Seed
|
|
247
|
-
the loop by pointing
|
|
248
|
-
at the smoke run's session (`.agent-serve/<slug>/sessions/<id>/events.ndjson`
|
|
249
|
-
or the trace under `.agent-serve/traces/`) as the baseline measurement — or,
|
|
250
|
-
when no API key was available, name the user's first real turn as the
|
|
251
|
-
baseline instead. For GitHub agents, snapshot replay fixtures now
|
|
252
|
-
(`agent-sdk github replay ... --dry-run --out fixtures/github`) so the
|
|
253
|
-
loop starts deterministic.
|
|
254
|
-
|
|
255
|
-
## Working agreements
|
|
256
|
-
|
|
257
|
-
- Interview → plan gate → scaffold → verify → channel setup → hillclimb
|
|
258
|
-
handoff. Do not skip verification because the files "look right".
|
|
259
|
-
- Fill blanks yourself. Re-ask only when an answer contradicts the framework,
|
|
260
|
-
such as approval-gated tools on the cloud runtime.
|
|
261
|
-
- Do not deploy, post to real Slack/GitHub surfaces beyond the smoke tests the
|
|
262
|
-
user asked for, or commit without being asked.
|
|
263
|
-
- Keep the first cut reviewable: if the plan grows past ~10 files, cut scope
|
|
264
|
-
and say what you deferred. Re-check the deterministic-path budget at
|
|
265
|
-
hand-off — behavior that crept into `lib/` during bring-up (formatting,
|
|
266
|
-
reply shaping, classification) goes back into instructions before you call
|
|
267
|
-
it done.
|
|
147
|
+
Serve only this agent's directory. Session files land in the
|
|
148
|
+
project state directory (`--state-root`). That is not harness cwd.
|
|
149
|
+
|
|
150
|
+
## Channel setup
|
|
151
|
+
|
|
152
|
+
- **Slack.** `skills/setup-slack/SKILL.md`
|
|
153
|
+
- **GitHub.** `skills/github/SKILL.md`
|
|
154
|
+
- **Custom webhook.** `POST /v1/channels/<id>/<route>`.
|
|
155
|
+
Loopback-only until you add `bearerAuth(...)`.
|
|
156
|
+
- **Schedules.** Never auto-fire under `--dev`.
|
|
157
|
+
`POST /v1/dev/schedules/<id>`.
|
|
158
|
+
|
|
159
|
+
## Hillclimb handoff
|
|
160
|
+
|
|
161
|
+
Once a smoke turn passes, agree fixtures, success criteria, and a
|
|
162
|
+
freeze line, then follow `skills/hillclimb/SKILL.md`. Seed from
|
|
163
|
+
the smoke session under the project state directory. GitHub:
|
|
164
|
+
snapshot `agent-sdk github replay ... --dry-run --out fixtures/github`.
|
|
165
|
+
|
|
166
|
+
Do not deploy or post to real Slack/GitHub beyond the smoke the
|
|
167
|
+
user asked for. If the plan grows past ~10 files, cut scope.
|
|
168
|
+
Re-check the budget at hand-off.
|
package/skills/debug/SKILL.md
CHANGED
|
@@ -1,78 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentsdk-debug
|
|
3
3
|
description: >-
|
|
4
|
-
Diagnose a misbehaving Agent SDK agent
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
orphaned processes. Use when an Agent SDK project runs but behaves
|
|
8
|
-
wrong locally.
|
|
4
|
+
Diagnose a misbehaving local Agent SDK agent: blank playground,
|
|
5
|
+
missing sessions, failed reads, webhook 401s, 403/409, lost
|
|
6
|
+
approvals. Use when a project runs but behaves wrong locally.
|
|
9
7
|
---
|
|
10
8
|
|
|
11
9
|
# Debugging the Agent SDK locally
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
Local `agent-sdk serve`. Hosted start or health failures:
|
|
12
|
+
`docs/troubleshooting.md` and `docs/deployment.md`.
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
1. **Validate.** `agent-sdk validate --dir <project>`
|
|
15
|
+
2. **Info.** `curl -s http://127.0.0.1:3000/<slug>/v1/info | jq .`
|
|
16
|
+
3. **Trace.** Session events under the project state directory.
|
|
17
|
+
Then match the table.
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
project structure or session model. Everything below assumes Node/tsx (`pnpm exec tsx
|
|
22
|
-
src/bin/agent-serve.ts ...` in the everysphere monorepo).
|
|
23
|
-
|
|
24
|
-
## Triage in order
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
# 1. Is discovery clean? serve refuses to start on error diagnostics.
|
|
28
|
-
agent-sdk validate --dir <project>
|
|
29
|
-
|
|
30
|
-
# 2. What is actually running, and where?
|
|
31
|
-
lsof -iTCP:3000 -sTCP:LISTEN; lsof -iTCP:5273 -sTCP:LISTEN
|
|
32
|
-
ps aux | rg -i 'agent-serve|vite' | rg -v rg
|
|
33
|
-
|
|
34
|
-
# 3. What does the server think it serves?
|
|
35
|
-
curl -s localhost:3000/v1/agents | jq . # multi-agent index
|
|
36
|
-
curl -s localhost:3000/<slug>/v1/info | jq . # per-agent surface
|
|
37
|
-
|
|
38
|
-
# 4. What did the session actually do? The stream never lies.
|
|
39
|
-
curl -sN 'localhost:3000/<slug>/v1/session/<id>/stream?startIndex=0' | head -50
|
|
40
|
-
# or read <stateRoot>/<slug>/sessions/<id>/events.ndjson directly
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Symptom → cause
|
|
44
|
-
|
|
45
|
-
| Symptom | Cause / fix |
|
|
19
|
+
| Symptom | Fix |
|
|
46
20
|
| --- | --- |
|
|
47
|
-
| Playground blank
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
| `
|
|
52
|
-
| `Hook already exists`
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
| Port 3000
|
|
56
|
-
|
|
|
57
|
-
| Schedule / reminder
|
|
58
|
-
|
|
|
59
|
-
| `409` on
|
|
60
|
-
| `
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
- `actions.requested` / `action.result` pairs are the tool trajectory;
|
|
72
|
-
count them by `toolName` before blaming latency, and split **host** work
|
|
73
|
-
(channel `callTool`, prep) from **model** tools.
|
|
74
|
-
- `turn.failed` with `"turn interrupted"` means a follow-up or `/stop`
|
|
75
|
-
preempted it — that's the designed behavior, not a crash.
|
|
76
|
-
- Escapes outside the session workspace in read/grep paths mean the
|
|
77
|
-
harness is fighting your evidence layout, not that the model is broken.
|
|
78
|
-
- `agent-sdk trajectory --events <file>` renders any saved NDJSON.
|
|
21
|
+
| Playground blank / "no agents" | Start `serve`. A built SPA with no backend serves nothing. |
|
|
22
|
+
| Playground UI edits do not show | Open the URL `serve --dev` prints as `playground`, not `:3000`. |
|
|
23
|
+
| Sessions on disk, empty playground list | List is the calling principal. `--dev` or `--allow-anonymous` shows all. Or `?sessionId=ses_...`. |
|
|
24
|
+
| Built-in read/grep fail; retry loops | Bun. Rerun under Node. The tell is `NGHTTP2_FRAME_SIZE_ERROR`. |
|
|
25
|
+
| `github forward` 401s; hook created | Blank `GITHUB_TOKEN`/`GH_TOKEN`. Relay uses `gh` login. |
|
|
26
|
+
| `Hook already exists` | One forwarder per repo. `forward --dir <parent>`. |
|
|
27
|
+
| Answers cite ancestor `AGENTS.md` | Nested checkout. Default `local.cwd` is a cache directory under `~/.cache`. |
|
|
28
|
+
| Model lists IDE `cursor` tools, never MCP | `advertiseTools: true`. Check `GET /v1/info`. |
|
|
29
|
+
| Port 3000 in use | `lsof -iTCP:3000 -sTCP:LISTEN` and kill that pid. |
|
|
30
|
+
| Approval vanished after restart | Parked calls do not survive restart. Re-run. |
|
|
31
|
+
| Schedule / reminder silent under `--dev` | Dev never auto-fires. `POST /<slug>/v1/dev/schedules/<id>`. |
|
|
32
|
+
| `409` on follow-up | Stale `continuationToken`, busy session, or a task session. |
|
|
33
|
+
| `409 session_busy` on `call --session` | Wait, or drop `--session`. |
|
|
34
|
+
| `403` on stream | Wrong principal. Same auth as create; beyond loopback send `--bearer-token`. |
|
|
35
|
+
| Works on loopback, blocked via tunnel | `localDevStrict()` rejects forwarded headers. Use `--bearer-token`. Never `--allow-anonymous` with account MCP. |
|
|
36
|
+
| Slack `channel idle … missing credentials` | Expected. `slack doctor --prefix <PREFIX>`. |
|
|
37
|
+
| Immediate API-key error | Model turns need `CURSOR_API_KEY`. |
|
|
38
|
+
| Approvals or sandbox seeds missing | `runtime: "cloud"`. Those are local only. `validate` warns. |
|
|
39
|
+
| `validate` clean, CI typecheck fails | tsx skipped types. JSON-shaped returns; `type` not `interface`. |
|
|
40
|
+
|
|
41
|
+
Count `action.result` by `toolName` before blaming latency.
|
|
42
|
+
`turn.failed` + `"turn interrupted"` is a follow-up or stop, not a
|
|
43
|
+
crash. `agent-sdk trajectory --events <file>` renders a saved
|
|
44
|
+
trace.
|