@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
|
@@ -284,6 +284,36 @@ export function createOtelCollector(
|
|
|
284
284
|
);
|
|
285
285
|
return;
|
|
286
286
|
}
|
|
287
|
+
case "action.auth_requested": {
|
|
288
|
+
ensureTurn(event, session, startTime)
|
|
289
|
+
?.tools.get(event.data.callId)
|
|
290
|
+
?.addEvent("auth_requested", undefined, startTime);
|
|
291
|
+
emitLog(
|
|
292
|
+
"action.auth_requested",
|
|
293
|
+
SeverityNumber.INFO,
|
|
294
|
+
attrs({
|
|
295
|
+
...baseLog(event, session),
|
|
296
|
+
"cursor.tool.name": event.data.toolName,
|
|
297
|
+
"agent_sdk.call_id": event.data.callId,
|
|
298
|
+
"agent_sdk.mcp_connection": event.data.connection,
|
|
299
|
+
})
|
|
300
|
+
);
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
case "action.auth_resolved": {
|
|
304
|
+
ensureTurn(event, session, startTime)
|
|
305
|
+
?.tools.get(event.data.callId)
|
|
306
|
+
?.addEvent(
|
|
307
|
+
"auth_resolved",
|
|
308
|
+
attrs({
|
|
309
|
+
"agent_sdk.decision": event.data.decision,
|
|
310
|
+
"agent_sdk.decision_by": event.data.by,
|
|
311
|
+
"agent_sdk.mcp_connection": event.data.connection,
|
|
312
|
+
}),
|
|
313
|
+
startTime
|
|
314
|
+
);
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
287
317
|
case "action.result": {
|
|
288
318
|
const turn = ensureTurn(event, session, startTime);
|
|
289
319
|
const span = turn?.tools.get(event.data.callId);
|
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
AgentRunner,
|
|
14
14
|
PrewarmOutcome,
|
|
15
15
|
RunnerPrewarmRequest,
|
|
16
|
+
SteerAckOutcome,
|
|
16
17
|
} from "./sdk-runner.js";
|
|
17
18
|
|
|
18
19
|
export interface RuntimeDispatchingRunnerOptions {
|
|
@@ -45,6 +46,15 @@ export class RuntimeDispatchingRunner implements AgentRunner {
|
|
|
45
46
|
return this.options.sdkRunner.runTurn(request);
|
|
46
47
|
}
|
|
47
48
|
|
|
49
|
+
async steer(request: {
|
|
50
|
+
sessionId: string;
|
|
51
|
+
text: string;
|
|
52
|
+
}): Promise<SteerAckOutcome> {
|
|
53
|
+
return (
|
|
54
|
+
(await this.options.sdkRunner.steer?.(request)) ?? "revert_to_followup"
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
48
58
|
async prewarm(request: RunnerPrewarmRequest): Promise<PrewarmOutcome> {
|
|
49
59
|
// Prewarming is a local-harness concern; the engine only calls it for
|
|
50
60
|
// local-runtime agents.
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
createAgentPlatform,
|
|
17
17
|
type LocalAgentStore,
|
|
18
18
|
type ModelSelection,
|
|
19
|
+
type Run,
|
|
19
20
|
type RunResult,
|
|
20
21
|
type SDKAgent,
|
|
21
22
|
} from "@cursor/sdk";
|
|
@@ -31,10 +32,18 @@ import {
|
|
|
31
32
|
import { mapSdkTokenUsage, usageTokenSum } from "./cloud-turn-cost.js";
|
|
32
33
|
import type { ConversationMirror } from "./conversation-mirror.js";
|
|
33
34
|
import { resolveApiKeySync } from "./cursor/credentials.js";
|
|
35
|
+
import { describeError } from "./describe-error.js";
|
|
36
|
+
|
|
37
|
+
/** Mirrors @cursor/sdk's SteerAckOutcome; the published dist may predate it. */
|
|
38
|
+
export type SteerAckOutcome = "complete_delivered" | "revert_to_followup";
|
|
34
39
|
|
|
35
40
|
/** Internal seam between the session engine and the Cursor SDK harness. */
|
|
36
41
|
export interface AgentRunner {
|
|
37
42
|
runTurn(request: RunnerTurnRequest): Promise<TurnOutcome>;
|
|
43
|
+
steer?(request: {
|
|
44
|
+
sessionId: string;
|
|
45
|
+
text: string;
|
|
46
|
+
}): Promise<SteerAckOutcome>;
|
|
38
47
|
/**
|
|
39
48
|
* Resolve a local workspace before any session needs it, so the first turn
|
|
40
49
|
* is not the one that pays for it. Best effort, hence the reported outcome:
|
|
@@ -193,6 +202,7 @@ function retryReason(
|
|
|
193
202
|
|
|
194
203
|
export class CursorSdkRunner implements AgentRunner {
|
|
195
204
|
private readonly agents = new Map<string, CachedAgentHandle>();
|
|
205
|
+
private readonly activeRuns = new Map<string, Run>();
|
|
196
206
|
private readonly stores = new Map<string, Promise<LocalAgentStore>>();
|
|
197
207
|
private readonly prewarmReleases: Array<() => Promise<void>> = [];
|
|
198
208
|
|
|
@@ -322,15 +332,9 @@ export class CursorSdkRunner implements AgentRunner {
|
|
|
322
332
|
) {
|
|
323
333
|
await request.onRequestId(run.requestId);
|
|
324
334
|
}
|
|
335
|
+
this.activeRuns.set(request.sessionId, run);
|
|
325
336
|
try {
|
|
326
337
|
const result = await run.wait();
|
|
327
|
-
// Mirror the conversation before replying: on hosted v2 the pod can
|
|
328
|
-
// be parked as soon as the execution reply lands, so a
|
|
329
|
-
// fire-and-forget write would race VM teardown. Failed turns still
|
|
330
|
-
// checkpoint the user message, so they persist too.
|
|
331
|
-
if (request.runtime === "local") {
|
|
332
|
-
await this.persistConversation(request, agent.agentId);
|
|
333
|
-
}
|
|
334
338
|
let outcome = toTurnOutcome(result);
|
|
335
339
|
if (outcome.status === "error") {
|
|
336
340
|
// An error result usually means the handle's transport is poisoned
|
|
@@ -353,7 +357,25 @@ export class CursorSdkRunner implements AgentRunner {
|
|
|
353
357
|
}
|
|
354
358
|
return outcome;
|
|
355
359
|
} finally {
|
|
360
|
+
if (this.activeRuns.get(request.sessionId) === run) {
|
|
361
|
+
this.activeRuns.delete(request.sessionId);
|
|
362
|
+
}
|
|
356
363
|
signal?.removeEventListener("abort", onAbort);
|
|
364
|
+
// Mirror the conversation before replying: on hosted v2 the pod can
|
|
365
|
+
// be parked as soon as the execution reply lands, so a
|
|
366
|
+
// fire-and-forget write would race VM teardown. In the `finally` so
|
|
367
|
+
// a `wait()` that THROWS (transport death mid-turn, an abort with
|
|
368
|
+
// no follow-up) still persists the checkpoints the turn already
|
|
369
|
+
// wrote — the store is local SQLite, safe to read on the throw
|
|
370
|
+
// path, and persistConversation swallows its own errors. Guarded
|
|
371
|
+
// here (not just inside the helper) so unmirrored turns keep their
|
|
372
|
+
// exact post-wait sequencing.
|
|
373
|
+
if (
|
|
374
|
+
request.runtime === "local" &&
|
|
375
|
+
this.options.conversationMirror !== undefined
|
|
376
|
+
) {
|
|
377
|
+
await this.persistConversation(request, agent.agentId);
|
|
378
|
+
}
|
|
357
379
|
}
|
|
358
380
|
} catch (error) {
|
|
359
381
|
// Drop the cached agent so a dead Connect/HTTP2 session cannot poison
|
|
@@ -363,6 +385,28 @@ export class CursorSdkRunner implements AgentRunner {
|
|
|
363
385
|
}
|
|
364
386
|
}
|
|
365
387
|
|
|
388
|
+
async steer(request: {
|
|
389
|
+
sessionId: string;
|
|
390
|
+
text: string;
|
|
391
|
+
}): Promise<SteerAckOutcome> {
|
|
392
|
+
const run = this.activeRuns.get(request.sessionId) as
|
|
393
|
+
| (Run & {
|
|
394
|
+
steer?: (text: string) => Promise<SteerAckOutcome>;
|
|
395
|
+
})
|
|
396
|
+
| undefined;
|
|
397
|
+
if (run?.steer === undefined) {
|
|
398
|
+
return "revert_to_followup";
|
|
399
|
+
}
|
|
400
|
+
try {
|
|
401
|
+
return await run.steer(request.text);
|
|
402
|
+
} catch (error) {
|
|
403
|
+
this.log(
|
|
404
|
+
`[agent-sdk] session ${request.sessionId}: steer failed: ${describeError(error)}`
|
|
405
|
+
);
|
|
406
|
+
return "revert_to_followup";
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
366
410
|
/**
|
|
367
411
|
* Build the local executor for a workspace before any session asks for it.
|
|
368
412
|
* The warmed executor is reference counted, so the lease is held until
|
|
@@ -484,7 +528,11 @@ export class CursorSdkRunner implements AgentRunner {
|
|
|
484
528
|
private async buildLocalOptions(
|
|
485
529
|
request: RunnerPrewarmRequest
|
|
486
530
|
): Promise<AgentOptions> {
|
|
487
|
-
|
|
531
|
+
// Not resolveStore: an injected store is used synchronously (no
|
|
532
|
+
// microtask, no thenable assimilation), exactly as before the mirror
|
|
533
|
+
// existed.
|
|
534
|
+
const store =
|
|
535
|
+
this.options.store ?? (await this.getStore(request.runnerStateDir));
|
|
488
536
|
return {
|
|
489
537
|
...this.buildSharedOptions(request),
|
|
490
538
|
// The built-in tool allowlist rides AgentOptions, not `local`, and is
|
package/src/internal/server.ts
CHANGED
|
@@ -130,6 +130,11 @@ import {
|
|
|
130
130
|
MCP_ENDPOINT_PATH,
|
|
131
131
|
TOOL_MCP_ENDPOINT_PATH,
|
|
132
132
|
} from "./mcp-endpoint.js";
|
|
133
|
+
import {
|
|
134
|
+
mcpOauthServeCallbackPath,
|
|
135
|
+
mcpOauthServeCallbackUrl,
|
|
136
|
+
} from "./mcp-oauth-on-demand.js";
|
|
137
|
+
import type { McpOauthSecretsTarget } from "./mcp-oauth-persist.js";
|
|
133
138
|
import { isLoopbackAddress } from "./net.js";
|
|
134
139
|
import { createOtelCollector, type OtelCollector } from "./otel/collector.js";
|
|
135
140
|
import { pickAuthoredOtel, resolveOtelConfig } from "./otel/config.js";
|
|
@@ -240,6 +245,8 @@ function isV2Project(project: { agent: { architecture?: string } }): boolean {
|
|
|
240
245
|
export interface StartServerInternalOptions {
|
|
241
246
|
/** Test seam: replace the Cursor SDK runner (integration tests). */
|
|
242
247
|
runner?: AgentRunner;
|
|
248
|
+
/** Test seam: bind the `--store` secrets client for on-demand MCP OAuth. */
|
|
249
|
+
mcpOauthSecrets?: McpOauthSecretsTarget;
|
|
243
250
|
}
|
|
244
251
|
|
|
245
252
|
/**
|
|
@@ -647,6 +654,12 @@ export async function startServer(
|
|
|
647
654
|
otel: otelCollector,
|
|
648
655
|
otelMeter: otelRuntime?.meter,
|
|
649
656
|
});
|
|
657
|
+
engine.oauthCallbackHub.secrets = options.mcpOauthSecrets;
|
|
658
|
+
engine.oauthCallbackHub.secretsBind = {
|
|
659
|
+
slug: slug === "" ? undefined : slug,
|
|
660
|
+
cloudToolsUrl: options.cloudToolsUrl,
|
|
661
|
+
};
|
|
662
|
+
engine.oauthCallbackHub.logger = logger;
|
|
650
663
|
// Rehydrate sessions from the authored storage sink before any
|
|
651
664
|
// channel or route can address them (continuation tokens must resolve).
|
|
652
665
|
await engine.restoreStoredSessions();
|
|
@@ -732,6 +745,7 @@ export async function startServer(
|
|
|
732
745
|
multi,
|
|
733
746
|
logger,
|
|
734
747
|
logRing,
|
|
748
|
+
diagStateRoot: baseStateRoot,
|
|
735
749
|
...(options.authToken === undefined
|
|
736
750
|
? {}
|
|
737
751
|
: { authToken: options.authToken }),
|
|
@@ -762,6 +776,8 @@ export async function startServer(
|
|
|
762
776
|
},
|
|
763
777
|
resolveApproval: (sessionId, callId, decision, auth) =>
|
|
764
778
|
engine.resolveApproval(sessionId, callId, decision, auth),
|
|
779
|
+
resolveAuth: (sessionId, callId, decision, auth) =>
|
|
780
|
+
engine.resolveAuth(sessionId, callId, decision, auth),
|
|
765
781
|
hasContinuationSession: (continuationToken) =>
|
|
766
782
|
engine.hasContinuationSession(channel.id, continuationToken),
|
|
767
783
|
isContinuationBusy: (continuationToken) =>
|
|
@@ -1013,6 +1029,7 @@ export async function startServer(
|
|
|
1013
1029
|
const address = server.address() as AddressInfo;
|
|
1014
1030
|
const displayHost = host === "0.0.0.0" || host === "::" ? "127.0.0.1" : host;
|
|
1015
1031
|
const url = `http://${displayHost}:${boundPort}`;
|
|
1032
|
+
const oauthOrigin = (options.publicUrl ?? url).replace(/\/$/, "");
|
|
1016
1033
|
|
|
1017
1034
|
// Resolve peer + Cursor account MCP connections now that the listen port is
|
|
1018
1035
|
// known (see resolved-connections.ts for the URL/runtime rules).
|
|
@@ -1039,6 +1056,20 @@ export async function startServer(
|
|
|
1039
1056
|
if (resolved.length > 0) {
|
|
1040
1057
|
runtime.engine.setResolvedConnections(resolved);
|
|
1041
1058
|
}
|
|
1059
|
+
const oauthBase = runtime.slug === "" ? "" : `/${runtime.slug}`;
|
|
1060
|
+
runtime.engine.setMcpOauthCallbackUrl(
|
|
1061
|
+
mcpOauthServeCallbackUrl(oauthOrigin, oauthBase)
|
|
1062
|
+
);
|
|
1063
|
+
if (accountBridge !== undefined && accountRefs !== undefined) {
|
|
1064
|
+
const bridge = accountBridge;
|
|
1065
|
+
runtime.engine.setCursorAccountAuthProbe(async (connection) => {
|
|
1066
|
+
const ref = accountRefs.find((entry) => entry.name === connection);
|
|
1067
|
+
if (ref === undefined) {
|
|
1068
|
+
return undefined;
|
|
1069
|
+
}
|
|
1070
|
+
return await bridge.probeAuthUrl(ref);
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1042
1073
|
const hasServerTools = runtime.project.agent.tools.some(
|
|
1043
1074
|
(tool) => tool.execution === "server"
|
|
1044
1075
|
);
|
|
@@ -1227,6 +1258,11 @@ function mountAgentRoutes(
|
|
|
1227
1258
|
/** Cursor account bridge + this mount's account MCP connections, when authored. */
|
|
1228
1259
|
accountBridge?: CursorAccountMcpBridge;
|
|
1229
1260
|
accountRefs?: CursorAccountConnectionRef[];
|
|
1261
|
+
/**
|
|
1262
|
+
* Serve `--state-root`. Hosted-execution writes `hosted-execution.json`
|
|
1263
|
+
* here so the Temporal host can read a stable path after the POST.
|
|
1264
|
+
*/
|
|
1265
|
+
diagStateRoot?: string;
|
|
1230
1266
|
}
|
|
1231
1267
|
): void {
|
|
1232
1268
|
const { slug, project, engine, scheduleRunner, reminderRunner } = runtime;
|
|
@@ -1286,6 +1322,11 @@ function mountAgentRoutes(
|
|
|
1286
1322
|
channelId,
|
|
1287
1323
|
hostedSessionId,
|
|
1288
1324
|
}),
|
|
1325
|
+
drainSessionDurability: (sessionId) =>
|
|
1326
|
+
engine.drainSessionDurability(sessionId),
|
|
1327
|
+
...(args.diagStateRoot === undefined
|
|
1328
|
+
? {}
|
|
1329
|
+
: { stateRoot: args.diagStateRoot }),
|
|
1289
1330
|
});
|
|
1290
1331
|
}
|
|
1291
1332
|
// Playground lists/opens Slack (and other channel) sessions across
|
|
@@ -1301,6 +1342,13 @@ function mountAgentRoutes(
|
|
|
1301
1342
|
// tools (Slack principals never match local/anonymous HTTP auth).
|
|
1302
1343
|
const relaxSessionApprovalAuth = relaxSessionReadAuth;
|
|
1303
1344
|
|
|
1345
|
+
router.add({
|
|
1346
|
+
method: "GET",
|
|
1347
|
+
pattern: `${base}${mcpOauthServeCallbackPath()}`,
|
|
1348
|
+
auth: "none",
|
|
1349
|
+
handler: (request) => engine.oauthCallbackHub.handleCallback(request),
|
|
1350
|
+
});
|
|
1351
|
+
|
|
1304
1352
|
router.add({
|
|
1305
1353
|
method: "GET",
|
|
1306
1354
|
pattern: `${base}/v1/health`,
|
|
@@ -1389,7 +1437,7 @@ function mountAgentRoutes(
|
|
|
1389
1437
|
method: "GET",
|
|
1390
1438
|
pattern: `${base}/v1/sessions`,
|
|
1391
1439
|
auth: httpAuth,
|
|
1392
|
-
handler: async (
|
|
1440
|
+
handler: async (request, ctx) => {
|
|
1393
1441
|
// Same gate as requireSessionOwner / relaxSessionReadAuth: never with
|
|
1394
1442
|
// bearer or custom channel auth (strict per-principal isolation).
|
|
1395
1443
|
// `--allow-anonymous` alone is a shared-principal trust boundary (corp
|
|
@@ -1399,9 +1447,14 @@ function mountAgentRoutes(
|
|
|
1399
1447
|
(relaxSessionReadAuthBeyondLoopback ||
|
|
1400
1448
|
(typeof ctx.requestIp === "string" &&
|
|
1401
1449
|
isLoopbackAddress(ctx.requestIp)));
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1450
|
+
// `?latest=1` — only the newest visible session. Clients binding a
|
|
1451
|
+
// default session (agsh) do not need the whole list, and on hosted
|
|
1452
|
+
// storage the whole list is a database scan.
|
|
1453
|
+
const latest = new URL(request.url).searchParams.get("latest");
|
|
1454
|
+
const listed =
|
|
1455
|
+
latest === "1" || latest === "true"
|
|
1456
|
+
? await engine.latestSessionWithSource(ctx.auth, { includeAll })
|
|
1457
|
+
: await engine.listSessionsWithSource(ctx.auth, { includeAll });
|
|
1405
1458
|
return jsonResponse({
|
|
1406
1459
|
sessions: listed.sessions,
|
|
1407
1460
|
source: listed.source,
|
|
@@ -1611,23 +1664,22 @@ function mountAgentRoutes(
|
|
|
1611
1664
|
return binding.errorResponse;
|
|
1612
1665
|
}
|
|
1613
1666
|
try {
|
|
1614
|
-
const
|
|
1667
|
+
const described = await engine.describeCatalogTool(toolName, {
|
|
1615
1668
|
auth: ctx.auth,
|
|
1616
1669
|
...binding,
|
|
1617
1670
|
});
|
|
1618
|
-
|
|
1619
|
-
if (tool === undefined) {
|
|
1671
|
+
if (described.tool === undefined) {
|
|
1620
1672
|
return jsonResponse(
|
|
1621
1673
|
{
|
|
1622
1674
|
ok: false,
|
|
1623
1675
|
error: "unknown_tool",
|
|
1624
1676
|
message: `Unknown tool "${toolName}".`,
|
|
1625
|
-
availableTools:
|
|
1677
|
+
availableTools: described.availableTools,
|
|
1626
1678
|
},
|
|
1627
1679
|
{ status: 404 }
|
|
1628
1680
|
);
|
|
1629
1681
|
}
|
|
1630
|
-
return jsonResponse(catalogDetailEntry(tool));
|
|
1682
|
+
return jsonResponse(catalogDetailEntry(described.tool));
|
|
1631
1683
|
} catch (error) {
|
|
1632
1684
|
if (error instanceof InvalidContinuationTokenError) {
|
|
1633
1685
|
return errorResponse(
|