@cursor/july 0.1.100 → 0.1.102
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/README.md +27 -0
- package/dist/bin/agent-serve.js +3 -2
- package/dist/channels/deployments/deployments-channel.d.ts +41 -5
- package/dist/channels/deployments/deployments-channel.d.ts.map +1 -1
- package/dist/channels/deployments/deployments-channel.js +88 -8
- package/dist/channels/deployments/types.d.ts +4 -3
- package/dist/channels/deployments/types.d.ts.map +1 -1
- package/dist/channels/origin/defaults.d.ts +43 -0
- package/dist/channels/origin/defaults.d.ts.map +1 -0
- package/dist/channels/origin/defaults.js +111 -0
- package/dist/channels/origin/index.d.ts +2 -0
- package/dist/channels/origin/index.d.ts.map +1 -1
- package/dist/channels/origin/index.js +2 -0
- package/dist/channels/origin/origin-channel.d.ts +2 -1
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +24 -3
- package/dist/channels/origin/state.d.ts +32 -0
- package/dist/channels/origin/state.d.ts.map +1 -0
- package/dist/channels/origin/state.js +23 -0
- package/dist/channels/origin/types.d.ts +23 -1
- package/dist/channels/origin/types.d.ts.map +1 -1
- package/dist/channels/slack/api.d.ts +1 -1
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +5 -2
- package/dist/channels/slack/assistant.d.ts +1 -1
- package/dist/channels/slack/assistant.d.ts.map +1 -1
- package/dist/channels/slack/code-fences.d.ts +17 -0
- package/dist/channels/slack/code-fences.d.ts.map +1 -0
- package/dist/channels/slack/code-fences.js +168 -0
- package/dist/channels/slack/dispatch.d.ts +3 -2
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +28 -8
- 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 +28 -0
- package/dist/channels/slack/index.d.ts +1 -0
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +1 -0
- package/dist/channels/slack/live-delivery.d.ts.map +1 -1
- package/dist/channels/slack/live-delivery.js +11 -4
- package/dist/channels/slack/manifest.d.ts.map +1 -1
- package/dist/channels/slack/manifest.js +2 -1
- package/dist/connections.d.ts +18 -2
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +18 -2
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +4 -4
- package/dist/docs/assets/{app.DZ1e0Ycq.js → app.CLA03RCz.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.FAqdWIXo.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.l8omwc6D.js → VPLocalSearchBox.ifxv-cJV.js} +1 -1
- package/dist/docs/assets/chunks/{theme.JVcD6gel.js → theme.DWCwM6p-.js} +2 -2
- package/dist/docs/assets/concepts.md.rPzW2HZN.js +1 -0
- package/dist/docs/assets/guides_cloud-agents.md.DumwWXba.js +9 -0
- package/dist/docs/assets/guides_cloud-agents.md.DumwWXba.lean.js +1 -0
- package/dist/docs/assets/{guides_cloud-runtime.md.CkYbjnAX.js → guides_cloud-runtime.md.BRirbRAN.js} +1 -1
- package/dist/docs/assets/index.md.Kiht7ell.js +5 -0
- package/dist/docs/assets/{index.md.Bb4k8kUm.lean.js → index.md.Kiht7ell.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.BiGoBAk2.js → reference_connections.md.Di6jJAXF.js} +12 -2
- package/dist/docs/assets/{reference_connections.md.BiGoBAk2.lean.js → reference_connections.md.Di6jJAXF.lean.js} +1 -1
- package/dist/docs/assets/reference_extensions.md.9WQMZe1l.js +56 -0
- package/dist/docs/assets/reference_extensions.md.9WQMZe1l.lean.js +1 -0
- package/dist/docs/assets/{reference_http-api.md.BEJx9XVj.js → reference_http-api.md.oySXBO8o.js} +1 -1
- package/dist/docs/assets/{reference_project-layout.md.Bv4KOtlB.js → reference_project-layout.md.CA6QP6Lw.js} +2 -2
- package/dist/docs/assets/{reference_project-layout.md.Bv4KOtlB.lean.js → reference_project-layout.md.CA6QP6Lw.lean.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.BFW9retM.js → reference_skills.md.l2ezAcaN.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.CvAHsdSp.js → reference_tools.md.B1up2r9W.js} +1 -1
- package/dist/docs/assets/skills_framework-map.md.DDa4MeEW.js +1 -0
- package/dist/docs/assets/{skills_framework-map.md.BTi817yv.lean.js → skills_framework-map.md.DDa4MeEW.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +4 -4
- package/dist/docs/concepts.html +5 -5
- package/dist/docs/concepts.md +3 -3
- package/dist/docs/deployment.html +4 -4
- package/dist/docs/evals.html +4 -4
- package/dist/docs/guides/agent-to-agent.html +4 -4
- package/dist/docs/guides/cloud-agents.html +35 -0
- package/dist/docs/guides/cloud-agents.md +93 -0
- package/dist/docs/guides/cloud-runtime.html +6 -6
- package/dist/docs/guides/cloud-runtime.md +2 -0
- 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 +4 -4
- package/dist/docs/guides/opentelemetry.html +5 -5
- package/dist/docs/guides/slack.html +4 -4
- 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 +5 -1
- package/dist/docs/llms-full.txt +353 -5
- package/dist/docs/llms.txt +2 -0
- package/dist/docs/quickstart.html +4 -4
- package/dist/docs/reference/agent-config.html +4 -4
- package/dist/docs/reference/artifacts.html +4 -4
- package/dist/docs/reference/channels.html +5 -5
- package/dist/docs/reference/cli.html +4 -4
- package/dist/docs/reference/connections.html +16 -6
- package/dist/docs/reference/connections.md +31 -0
- package/dist/docs/reference/extensions.html +82 -0
- package/dist/docs/reference/extensions.md +200 -0
- package/dist/docs/reference/hooks.html +4 -4
- package/dist/docs/reference/http-api.html +6 -6
- package/dist/docs/reference/http-api.md +1 -1
- package/dist/docs/reference/instructions.html +4 -4
- package/dist/docs/reference/playground.html +4 -4
- package/dist/docs/reference/project-layout.html +6 -6
- package/dist/docs/reference/project-layout.md +3 -0
- package/dist/docs/reference/prompt.html +4 -4
- package/dist/docs/reference/schedules.html +4 -4
- package/dist/docs/reference/sessions.html +4 -4
- package/dist/docs/reference/skills.html +6 -6
- package/dist/docs/reference/skills.md +2 -0
- package/dist/docs/reference/subagents.html +5 -5
- package/dist/docs/reference/tools.html +6 -6
- package/dist/docs/reference/tools.md +2 -0
- package/dist/docs/scaffolding-agents.html +4 -4
- package/dist/docs/skills/ab.html +4 -4
- package/dist/docs/skills/create-agent.html +4 -4
- package/dist/docs/skills/debug.html +4 -4
- package/dist/docs/skills/evals.html +4 -4
- package/dist/docs/skills/framework-map.html +5 -5
- package/dist/docs/skills/framework-map.md +1 -0
- package/dist/docs/skills/github.html +4 -4
- package/dist/docs/skills/hillclimb.html +4 -4
- package/dist/docs/skills/index.html +4 -4
- package/dist/docs/skills/mcp-auth.html +4 -4
- package/dist/docs/skills/otel.html +4 -4
- package/dist/docs/skills/setup-slack.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 +4 -4
- package/dist/docs/templates/code-wiki.html +4 -4
- package/dist/docs/templates/demo.html +4 -4
- 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 +4 -4
- package/dist/docs/templates/triage.html +4 -4
- package/dist/docs/troubleshooting.html +4 -4
- package/dist/extensions/cursor-cloud-agents/extension.d.ts +57 -0
- package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/extension.js +66 -0
- package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts +78 -0
- package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/backend.js +286 -0
- package/dist/extensions/cursor-cloud-agents/lib/fleet.d.ts +25 -0
- package/dist/extensions/cursor-cloud-agents/lib/fleet.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/fleet.js +85 -0
- package/dist/extensions/cursor-cloud-agents/lib/inputs.d.ts +5 -0
- package/dist/extensions/cursor-cloud-agents/lib/inputs.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/inputs.js +4 -0
- package/dist/extensions/cursor-cloud-agents/lib/repos.d.ts +15 -0
- package/dist/extensions/cursor-cloud-agents/lib/repos.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/repos.js +55 -0
- package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts +8 -0
- package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/transcript.js +15 -0
- package/dist/extensions/cursor-cloud-agents/skills/handoff.md +41 -0
- package/dist/extensions/cursor-cloud-agents/tools/cancel.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/cancel.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/cancel.js +26 -0
- package/dist/extensions/cursor-cloud-agents/tools/dump.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/dump.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/dump.js +54 -0
- package/dist/extensions/cursor-cloud-agents/tools/get.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/get.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/get.js +25 -0
- package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/launch.js +59 -0
- package/dist/extensions/cursor-cloud-agents/tools/list.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/list.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/list.js +36 -0
- package/dist/extensions/cursor-cloud-agents/tools/reply.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/reply.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/reply.js +35 -0
- package/dist/extensions.d.ts +73 -0
- package/dist/extensions.d.ts.map +1 -0
- package/dist/extensions.js +112 -0
- package/dist/files-backends/cursor-hosted.d.ts +0 -8
- package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/files-backends/cursor-hosted.js +1 -11
- package/dist/files.d.ts +5 -1
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +22 -18
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/internal/advertise-tools.d.ts +4 -1
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +20 -1
- package/dist/internal/as-of.d.ts +18 -0
- package/dist/internal/as-of.d.ts.map +1 -1
- package/dist/internal/as-of.js +131 -0
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +64 -19
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +3 -1
- package/dist/internal/conversation-mirror.d.ts.map +1 -1
- package/dist/internal/conversation-mirror.js +13 -15
- package/dist/internal/cursor/backend-client.d.ts +8 -1
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +25 -9
- package/dist/internal/cursor/hosted-deployment-secrets.d.ts +16 -0
- package/dist/internal/cursor/hosted-deployment-secrets.d.ts.map +1 -0
- package/dist/internal/cursor/hosted-deployment-secrets.js +61 -0
- package/dist/internal/cursor/hosted-store-secrets.d.ts +11 -0
- package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -1
- package/dist/internal/cursor/hosted-store-secrets.js +15 -0
- package/dist/internal/cursor-deployment-relay.d.ts +15 -1
- package/dist/internal/cursor-deployment-relay.d.ts.map +1 -1
- package/dist/internal/cursor-deployment-relay.js +46 -7
- package/dist/internal/deploy-client.d.ts +23 -0
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +54 -12
- package/dist/internal/discovery/ab.d.ts +9 -0
- package/dist/internal/discovery/ab.d.ts.map +1 -0
- package/dist/internal/discovery/ab.js +101 -0
- package/dist/internal/discovery/agent-config.d.ts +35 -0
- package/dist/internal/discovery/agent-config.d.ts.map +1 -0
- package/dist/internal/discovery/agent-config.js +173 -0
- package/dist/internal/discovery/agent.d.ts +11 -0
- package/dist/internal/discovery/agent.d.ts.map +1 -0
- package/dist/internal/discovery/agent.js +306 -0
- package/dist/internal/discovery/channels.d.ts +10 -0
- package/dist/internal/discovery/channels.d.ts.map +1 -0
- package/dist/internal/discovery/channels.js +97 -0
- package/dist/internal/discovery/connections.d.ts +17 -0
- package/dist/internal/discovery/connections.d.ts.map +1 -0
- package/dist/internal/discovery/connections.js +436 -0
- package/dist/internal/discovery/context.d.ts +20 -0
- package/dist/internal/discovery/context.d.ts.map +1 -0
- package/dist/internal/discovery/context.js +30 -0
- package/dist/internal/discovery/cursor-plugin.d.ts +25 -0
- package/dist/internal/discovery/cursor-plugin.d.ts.map +1 -0
- package/dist/internal/discovery/cursor-plugin.js +570 -0
- package/dist/internal/discovery/extensions.d.ts +19 -0
- package/dist/internal/discovery/extensions.d.ts.map +1 -0
- package/dist/internal/discovery/extensions.js +238 -0
- package/dist/internal/discovery/fs.d.ts +15 -0
- package/dist/internal/discovery/fs.d.ts.map +1 -0
- package/dist/internal/discovery/fs.js +115 -0
- package/dist/internal/discovery/hooks.d.ts +7 -0
- package/dist/internal/discovery/hooks.d.ts.map +1 -0
- package/dist/internal/discovery/hooks.js +48 -0
- package/dist/internal/discovery/info.d.ts +6 -0
- package/dist/internal/discovery/info.d.ts.map +1 -0
- package/dist/internal/discovery/info.js +141 -0
- package/dist/internal/discovery/instructions.d.ts +7 -0
- package/dist/internal/discovery/instructions.d.ts.map +1 -0
- package/dist/internal/discovery/instructions.js +95 -0
- package/dist/internal/discovery/modules.d.ts +20 -0
- package/dist/internal/discovery/modules.d.ts.map +1 -0
- package/dist/internal/discovery/modules.js +101 -0
- package/dist/internal/discovery/names.d.ts +12 -0
- package/dist/internal/discovery/names.d.ts.map +1 -0
- package/dist/internal/discovery/names.js +36 -0
- package/dist/internal/discovery/project.d.ts +53 -0
- package/dist/internal/discovery/project.d.ts.map +1 -0
- package/dist/internal/discovery/project.js +239 -0
- package/dist/internal/discovery/runtime.d.ts +34 -0
- package/dist/internal/discovery/runtime.d.ts.map +1 -0
- package/dist/internal/discovery/runtime.js +98 -0
- package/dist/internal/discovery/schedules.d.ts +7 -0
- package/dist/internal/discovery/schedules.d.ts.map +1 -0
- package/dist/internal/discovery/schedules.js +97 -0
- package/dist/internal/discovery/seed-files.d.ts +7 -0
- package/dist/internal/discovery/seed-files.d.ts.map +1 -0
- package/dist/internal/discovery/seed-files.js +41 -0
- package/dist/internal/discovery/services.d.ts +17 -0
- package/dist/internal/discovery/services.d.ts.map +1 -0
- package/dist/internal/discovery/services.js +104 -0
- package/dist/internal/discovery/skills.d.ts +16 -0
- package/dist/internal/discovery/skills.d.ts.map +1 -0
- package/dist/internal/discovery/skills.js +151 -0
- package/dist/internal/discovery/subagent.d.ts +13 -0
- package/dist/internal/discovery/subagent.d.ts.map +1 -0
- package/dist/internal/discovery/subagent.js +19 -0
- package/dist/internal/discovery/tools.d.ts +18 -0
- package/dist/internal/discovery/tools.d.ts.map +1 -0
- package/dist/internal/discovery/tools.js +159 -0
- package/dist/internal/discovery.d.ts +8 -62
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +8 -2210
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +5 -0
- package/dist/internal/framework-file-storage.d.ts +3 -3
- package/dist/internal/framework-file-storage.d.ts.map +1 -1
- package/dist/internal/framework-file-storage.js +38 -9
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/framework-storage-selection.js +8 -7
- package/dist/internal/frontmatter.d.ts +11 -3
- package/dist/internal/frontmatter.d.ts.map +1 -1
- package/dist/internal/frontmatter.js +29 -3
- package/dist/internal/hosted-delivery.d.ts +3 -1
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +19 -32
- package/dist/internal/hosted-execution-diag.d.ts +5 -0
- package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
- package/dist/internal/hosted-execution-diag.js +5 -0
- package/dist/internal/hosted-execution-flush.d.ts +46 -0
- package/dist/internal/hosted-execution-flush.d.ts.map +1 -0
- package/dist/internal/hosted-execution-flush.js +81 -0
- package/dist/internal/mcp-endpoint.js +1 -0
- package/dist/internal/mcp-host.d.ts +2 -1
- package/dist/internal/mcp-host.d.ts.map +1 -1
- package/dist/internal/mcp-host.js +66 -29
- package/dist/internal/otel/collector.d.ts +13 -0
- package/dist/internal/otel/collector.d.ts.map +1 -1
- package/dist/internal/otel/collector.js +84 -17
- package/dist/internal/otel/http.d.ts.map +1 -1
- package/dist/internal/otel/http.js +2 -10
- package/dist/internal/otel/mcp.d.ts +16 -0
- package/dist/internal/otel/mcp.d.ts.map +1 -0
- package/dist/internal/otel/mcp.js +68 -0
- package/dist/internal/otel/propagation.d.ts +6 -0
- package/dist/internal/otel/propagation.d.ts.map +1 -0
- package/dist/internal/otel/propagation.js +14 -0
- package/dist/internal/otel/runtime.d.ts.map +1 -1
- package/dist/internal/otel/runtime.js +2 -0
- package/dist/internal/review-comments.d.ts +1 -1
- package/dist/internal/review-comments.d.ts.map +1 -1
- package/dist/internal/review-comments.js +4 -4
- package/dist/internal/server.d.ts +3 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +79 -104
- package/dist/internal/session-engine.d.ts +14 -7
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +113 -66
- package/dist/internal/session-run-log.d.ts +3 -1
- package/dist/internal/session-run-log.d.ts.map +1 -1
- package/dist/internal/session-run-log.js +14 -14
- package/dist/internal/start-log-store.d.ts +60 -0
- package/dist/internal/start-log-store.d.ts.map +1 -0
- package/dist/internal/start-log-store.js +149 -0
- package/dist/internal/storage-coordinator.d.ts +4 -1
- package/dist/internal/storage-coordinator.d.ts.map +1 -1
- package/dist/internal/storage-coordinator.js +15 -13
- package/dist/internal/tool-catalog.d.ts.map +1 -1
- package/dist/internal/tool-catalog.js +9 -6
- package/dist/internal/tool-policy.d.ts +8 -0
- package/dist/internal/tool-policy.d.ts.map +1 -1
- package/dist/internal/tool-policy.js +19 -7
- package/dist/internal/turn-cost.d.ts +14 -0
- package/dist/internal/turn-cost.d.ts.map +1 -1
- package/dist/internal/turn-cost.js +41 -9
- package/dist/internal/v2-hosting.d.ts +22 -0
- package/dist/internal/v2-hosting.d.ts.map +1 -0
- package/dist/internal/v2-hosting.js +23 -0
- package/dist/otel.d.ts +16 -0
- package/dist/otel.d.ts.map +1 -1
- package/dist/otel.js +26 -0
- package/dist/playground/assets/index-B6C9S9nG.css +1 -0
- package/dist/playground/assets/{index-DVs98vPL.js → index-ZqNoT8Ie.js} +45 -45
- package/dist/playground/index.html +2 -2
- package/dist/storage-protocol.d.ts +47 -22
- package/dist/storage-protocol.d.ts.map +1 -1
- package/dist/storage-protocol.js +90 -54
- package/dist/storage.d.ts +2 -2
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +1 -1
- package/dist/tools.d.ts +9 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +9 -0
- package/dist/types.d.ts +154 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +29 -1
- package/docs/README.md +5 -1
- package/docs/concepts.md +3 -3
- package/docs/guides/cloud-agents.md +98 -0
- package/docs/guides/cloud-runtime.md +2 -0
- package/docs/reference/connections.md +31 -0
- package/docs/reference/extensions.md +205 -0
- package/docs/reference/http-api.md +1 -1
- package/docs/reference/project-layout.md +3 -0
- package/docs/reference/skills.md +2 -0
- package/docs/reference/tools.md +2 -0
- package/package.json +18 -4
- package/skills/framework-map/SKILL.md +1 -0
- package/src/bin/agent-serve.ts +11 -2
- package/src/channels/deployments/deployments-channel.ts +117 -8
- package/src/channels/deployments/types.ts +4 -3
- package/src/channels/origin/defaults.ts +143 -0
- package/src/channels/origin/index.ts +2 -0
- package/src/channels/origin/origin-channel.ts +37 -1
- package/src/channels/origin/state.ts +54 -0
- package/src/channels/origin/types.ts +24 -0
- package/src/channels/slack/api.ts +6 -3
- package/src/channels/slack/assistant.ts +1 -1
- package/src/channels/slack/code-fences.ts +183 -0
- package/src/channels/slack/dispatch.ts +27 -2
- package/src/channels/slack/inbound.ts +37 -0
- package/src/channels/slack/index.ts +1 -0
- package/src/channels/slack/live-delivery.ts +16 -13
- package/src/channels/slack/manifest.ts +2 -1
- package/src/connections.ts +18 -1
- package/src/extensions/cursor-cloud-agents/extension.ts +120 -0
- package/src/extensions/cursor-cloud-agents/lib/backend.ts +395 -0
- package/src/extensions/cursor-cloud-agents/lib/fleet.ts +109 -0
- package/src/extensions/cursor-cloud-agents/lib/inputs.ts +5 -0
- package/src/extensions/cursor-cloud-agents/lib/repos.ts +81 -0
- package/src/extensions/cursor-cloud-agents/lib/transcript.ts +23 -0
- package/src/extensions/cursor-cloud-agents/skills/handoff.md +41 -0
- package/src/extensions/cursor-cloud-agents/tools/cancel.ts +19 -0
- package/src/extensions/cursor-cloud-agents/tools/dump.ts +51 -0
- package/src/extensions/cursor-cloud-agents/tools/get.ts +18 -0
- package/src/extensions/cursor-cloud-agents/tools/launch.ts +64 -0
- package/src/extensions/cursor-cloud-agents/tools/list.ts +31 -0
- package/src/extensions/cursor-cloud-agents/tools/reply.ts +34 -0
- package/src/extensions.ts +141 -0
- package/src/files-backends/cursor-hosted.ts +1 -17
- package/src/files.ts +43 -34
- package/src/index.ts +11 -0
- package/src/internal/advertise-tools.ts +37 -12
- package/src/internal/as-of.ts +163 -0
- package/src/internal/cli-deploy.ts +86 -23
- package/src/internal/continuation-identity.ts +3 -1
- package/src/internal/conversation-mirror.ts +23 -18
- package/src/internal/cursor/backend-client.ts +32 -10
- package/src/internal/cursor/hosted-deployment-secrets.ts +72 -0
- package/src/internal/cursor/hosted-store-secrets.ts +27 -0
- package/src/internal/cursor-deployment-relay.ts +65 -8
- package/src/internal/deploy-client.ts +73 -18
- package/src/internal/discovery/ab.ts +111 -0
- package/src/internal/discovery/agent-config.ts +222 -0
- package/src/internal/discovery/agent.ts +360 -0
- package/src/internal/discovery/channels.ts +103 -0
- package/src/internal/discovery/connections.ts +540 -0
- package/src/internal/discovery/context.ts +46 -0
- package/src/internal/discovery/cursor-plugin.ts +708 -0
- package/src/internal/discovery/extensions.ts +348 -0
- package/src/internal/discovery/fs.ts +108 -0
- package/src/internal/discovery/hooks.ts +45 -0
- package/src/internal/discovery/info.ts +179 -0
- package/src/internal/discovery/instructions.ts +113 -0
- package/src/internal/discovery/modules.ts +107 -0
- package/src/internal/discovery/names.ts +44 -0
- package/src/internal/discovery/project.ts +270 -0
- package/src/internal/discovery/runtime.ts +159 -0
- package/src/internal/discovery/schedules.ts +94 -0
- package/src/internal/discovery/seed-files.ts +37 -0
- package/src/internal/discovery/services.ts +124 -0
- package/src/internal/discovery/skills.ts +176 -0
- package/src/internal/discovery/subagent.ts +29 -0
- package/src/internal/discovery/tools.ts +182 -0
- package/src/internal/discovery.ts +20 -2724
- package/src/internal/distribution.ts +5 -0
- package/src/internal/framework-file-storage.ts +43 -9
- package/src/internal/framework-storage-selection.ts +9 -9
- package/src/internal/frontmatter.ts +36 -3
- package/src/internal/hosted-delivery.ts +38 -63
- package/src/internal/hosted-execution-diag.ts +6 -0
- package/src/internal/hosted-execution-flush.ts +142 -0
- package/src/internal/mcp-endpoint.ts +1 -0
- package/src/internal/mcp-host.ts +116 -37
- package/src/internal/otel/collector.ts +125 -25
- package/src/internal/otel/http.ts +2 -12
- package/src/internal/otel/mcp.ts +69 -0
- package/src/internal/otel/propagation.ts +17 -0
- package/src/internal/otel/runtime.ts +2 -0
- package/src/internal/review-comments.ts +5 -2
- package/src/internal/server.ts +81 -100
- package/src/internal/session-engine.ts +152 -39
- package/src/internal/session-run-log.ts +18 -16
- package/src/internal/start-log-store.ts +174 -0
- package/src/internal/storage-coordinator.ts +19 -16
- package/src/internal/tool-catalog.ts +9 -6
- package/src/internal/tool-policy.ts +39 -9
- package/src/internal/turn-cost.ts +47 -4
- package/src/internal/v2-hosting.ts +38 -0
- package/src/otel.ts +38 -0
- package/src/storage-protocol.ts +126 -79
- package/src/storage.ts +5 -0
- package/src/tools.ts +18 -0
- package/src/types.ts +213 -14
- package/dist/docs/assets/chunks/@localSearchIndexroot.j70vvPL4.js +0 -1
- package/dist/docs/assets/concepts.md.lwAgBIMI.js +0 -1
- package/dist/docs/assets/index.md.Bb4k8kUm.js +0 -5
- package/dist/docs/assets/skills_framework-map.md.BTi817yv.js +0 -1
- package/dist/playground/assets/index-BszoQDc6.css +0 -1
- /package/dist/docs/assets/{concepts.md.lwAgBIMI.lean.js → concepts.md.rPzW2HZN.lean.js} +0 -0
- /package/dist/docs/assets/{guides_cloud-runtime.md.CkYbjnAX.lean.js → guides_cloud-runtime.md.BRirbRAN.lean.js} +0 -0
- /package/dist/docs/assets/{reference_http-api.md.BEJx9XVj.lean.js → reference_http-api.md.oySXBO8o.lean.js} +0 -0
- /package/dist/docs/assets/{reference_skills.md.BFW9retM.lean.js → reference_skills.md.l2ezAcaN.lean.js} +0 -0
- /package/dist/docs/assets/{reference_tools.md.CvAHsdSp.lean.js → reference_tools.md.B1up2r9W.lean.js} +0 -0
package/src/files.ts
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* know the write did not land.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import { STORAGE_KEY_ROOT } from "./storage.js";
|
|
26
|
+
import { AGENTSDK_STORAGE_KEY_ROOT, STORAGE_KEY_ROOT } from "./storage.js";
|
|
27
27
|
|
|
28
28
|
// ============================================================================
|
|
29
29
|
// Sink interface
|
|
@@ -163,39 +163,48 @@ export const AGENT_SERVE_USER_STORE_KEY_PREFIX = "agent-serve";
|
|
|
163
163
|
* `--agent-store-skills-dir` walk finds them the same way it finds user-store
|
|
164
164
|
* skills. Memory and artifacts stay under {@link STORAGE_KEY_ROOT}.
|
|
165
165
|
*/
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
166
|
+
function createAgentStoreKeys(root: string) {
|
|
167
|
+
return {
|
|
168
|
+
artifactRow: (agent: string, id: string): string =>
|
|
169
|
+
`${root}/${agent}/artifacts/rows/${encodeURIComponent(id)}.json`,
|
|
170
|
+
artifactRowPrefix: (agent: string): string =>
|
|
171
|
+
`${root}/${agent}/artifacts/rows/`,
|
|
172
|
+
artifactContent: (agent: string, id: string): string =>
|
|
173
|
+
`${root}/${agent}/artifacts/content/${encodeURIComponent(id)}`,
|
|
174
|
+
skillFile: (
|
|
175
|
+
skillName: string,
|
|
176
|
+
relPath: string,
|
|
177
|
+
skillsPrefix: string = "skills/"
|
|
178
|
+
): string => `${skillsPrefix}${skillName}/${relPath}`,
|
|
179
|
+
skillsPrefix: (): string => "skills/",
|
|
180
|
+
/** Personal-key cloud agents: namespaced so they cannot collide with the user's own `skills/`. */
|
|
181
|
+
userSkillsPrefix: (agent: string): string =>
|
|
182
|
+
`${AGENT_SERVE_USER_STORE_KEY_PREFIX}/${agent}/skills/`,
|
|
183
|
+
memoryDir: (agent: string): string => `${root}/${agent}/memory`,
|
|
184
|
+
memoryJournal: (agent: string): string =>
|
|
185
|
+
`${root}/${agent}/memory/journal.jsonl`,
|
|
186
|
+
memoryJournalRotated: (agent: string, stamp: string): string =>
|
|
187
|
+
`${root}/${agent}/memory/journal-${stamp}.jsonl`,
|
|
188
|
+
// SDK conversation mirror (the runner's SQLite store, exported through the
|
|
189
|
+
// store APIs): one manifest per SDK agent id plus its content-addressed
|
|
190
|
+
// checkpoint blobs. See internal/conversation-mirror.ts.
|
|
191
|
+
conversationManifest: (agent: string, sdkAgentId: string): string =>
|
|
192
|
+
`${root}/${agent}/conversations/${encodeURIComponent(sdkAgentId)}/manifest.json`,
|
|
193
|
+
conversationBlob: (
|
|
194
|
+
agent: string,
|
|
195
|
+
sdkAgentId: string,
|
|
196
|
+
blobId: string
|
|
197
|
+
): string =>
|
|
198
|
+
`${root}/${agent}/conversations/${encodeURIComponent(sdkAgentId)}/blobs/${encodeURIComponent(blobId)}`,
|
|
199
|
+
} as const;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export type AgentStoreKeys = ReturnType<typeof createAgentStoreKeys>;
|
|
203
|
+
export const agentStoreKeys: AgentStoreKeys =
|
|
204
|
+
createAgentStoreKeys(STORAGE_KEY_ROOT);
|
|
205
|
+
export const agentSdkAgentStoreKeys: AgentStoreKeys = createAgentStoreKeys(
|
|
206
|
+
AGENTSDK_STORAGE_KEY_ROOT
|
|
207
|
+
);
|
|
199
208
|
|
|
200
209
|
/**
|
|
201
210
|
* Deployment store FUSE mount on cloud-runtime VMs. Mirrors
|
package/src/index.ts
CHANGED
|
@@ -78,6 +78,12 @@ export {
|
|
|
78
78
|
stampMailboxContinuation,
|
|
79
79
|
V2EngineError,
|
|
80
80
|
} from "./continuation.js";
|
|
81
|
+
export {
|
|
82
|
+
cursorPlugin,
|
|
83
|
+
defineExtension,
|
|
84
|
+
disableConnection,
|
|
85
|
+
disableTool,
|
|
86
|
+
} from "./extensions.js";
|
|
81
87
|
export { defineHook } from "./hooks.js";
|
|
82
88
|
export {
|
|
83
89
|
InvalidAsOfError,
|
|
@@ -166,15 +172,19 @@ export type {
|
|
|
166
172
|
StorageDefinition,
|
|
167
173
|
StorageEntry,
|
|
168
174
|
StorageEvalsTable,
|
|
175
|
+
StorageKeys,
|
|
169
176
|
StoragePolicy,
|
|
170
177
|
StorageRestorePolicy,
|
|
171
178
|
} from "./storage.js";
|
|
172
179
|
export {
|
|
180
|
+
AGENTSDK_STORAGE_KEY_ROOT,
|
|
181
|
+
agentSdkStorageKeys,
|
|
173
182
|
defineStorage,
|
|
174
183
|
isDurableSessionRecordKey,
|
|
175
184
|
parseDurableSessionRecord,
|
|
176
185
|
STORAGE_KEY_ROOT,
|
|
177
186
|
storageKeys,
|
|
187
|
+
storageKeysForArchitecture,
|
|
178
188
|
summarizeDurableSessionRecord,
|
|
179
189
|
} from "./storage.js";
|
|
180
190
|
export { defineTool } from "./tools.js";
|
|
@@ -189,6 +199,7 @@ export {
|
|
|
189
199
|
isToolEffect,
|
|
190
200
|
MAX_RUNNING_TURNS_LIMIT,
|
|
191
201
|
normalizeConnectionEffects,
|
|
202
|
+
normalizeConnectionTools,
|
|
192
203
|
normalizeCursorAccountServers,
|
|
193
204
|
supportsKvCas,
|
|
194
205
|
} from "./types.js";
|
|
@@ -27,21 +27,25 @@
|
|
|
27
27
|
* `defineConnection({ effects })` filters the listing before names are
|
|
28
28
|
* assigned: only tools whose MCP annotations classify as an intended
|
|
29
29
|
* effect are advertised. Unclassified tools are omitted, not guessed.
|
|
30
|
+
* `defineConnection({ tools: [...] })` keeps only the named tools.
|
|
31
|
+
* `disallowedTools` drops names. A name filter that matches nothing on
|
|
32
|
+
* the server fails the turn.
|
|
30
33
|
* Tools whose `annotations.title` is `do-not-call` are dropped as well
|
|
31
34
|
* (vendor host-UI / MCP Apps helpers that still carry `readOnlyHint`).
|
|
32
35
|
*/
|
|
33
36
|
|
|
34
|
-
import
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
import {
|
|
38
|
+
connectionAllowsTool,
|
|
39
|
+
type DiscoveredConnection,
|
|
40
|
+
type DiscoveredTool,
|
|
41
|
+
type HostMcpCallResult,
|
|
42
|
+
type HostMcpToolInfo,
|
|
43
|
+
type JsonSchemaObject,
|
|
44
|
+
type McpToolAnnotations,
|
|
45
|
+
type ResolvedAgent,
|
|
46
|
+
type SessionInfo,
|
|
47
|
+
type ToolDefinition,
|
|
48
|
+
type ToolEffect,
|
|
45
49
|
} from "../types.js";
|
|
46
50
|
import { brandDefinition } from "./brand.js";
|
|
47
51
|
import type { HostMcpOneOff } from "./mcp-host.js";
|
|
@@ -136,7 +140,14 @@ export async function resolveAdvertisedTools(args: {
|
|
|
136
140
|
try {
|
|
137
141
|
const source = await sourceFor(connection, args.session, args.hostMcp);
|
|
138
142
|
const listed = await source.listTools();
|
|
139
|
-
return {
|
|
143
|
+
return {
|
|
144
|
+
connection,
|
|
145
|
+
ok: true,
|
|
146
|
+
source,
|
|
147
|
+
listed: listed.filter((info) =>
|
|
148
|
+
connectionAllowsTool(connection, info.name)
|
|
149
|
+
),
|
|
150
|
+
};
|
|
140
151
|
} catch (error) {
|
|
141
152
|
return { connection, ok: false, error };
|
|
142
153
|
}
|
|
@@ -157,6 +168,20 @@ export async function resolveAdvertisedTools(args: {
|
|
|
157
168
|
);
|
|
158
169
|
}
|
|
159
170
|
const { source, listed } = listing;
|
|
171
|
+
if (
|
|
172
|
+
(connection.tools !== undefined ||
|
|
173
|
+
connection.disallowedTools !== undefined) &&
|
|
174
|
+
listed.length === 0
|
|
175
|
+
) {
|
|
176
|
+
const error = new Error(
|
|
177
|
+
`Advertised connection "${connection.name}" tool filter matched no tools on the server.`
|
|
178
|
+
);
|
|
179
|
+
if (args.onConnectionError !== undefined) {
|
|
180
|
+
args.onConnectionError(connection.name, error);
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
throw error;
|
|
184
|
+
}
|
|
160
185
|
const intended = listed.filter(
|
|
161
186
|
(info) =>
|
|
162
187
|
!isDoNotCallTool(info.annotations) &&
|
package/src/internal/as-of.ts
CHANGED
|
@@ -105,3 +105,166 @@ export function timeArgViolation(
|
|
|
105
105
|
}
|
|
106
106
|
return undefined;
|
|
107
107
|
}
|
|
108
|
+
|
|
109
|
+
// Whole-string only: a query that merely contains "now" is not a bound.
|
|
110
|
+
// Duration-only strings (`30m`, `2h`) and last/this plus a non-window word
|
|
111
|
+
// (`last modified`) are not time bounds. Calendar-aligned `now/d` is.
|
|
112
|
+
const TIME_UNIT =
|
|
113
|
+
"(?:s|sec|secs|second|seconds|m|min|mins|minute|minutes|h|hr|hrs|hour|hours|d|day|days|w|week|weeks|mo|month|months|y|yr|yrs|year|years)";
|
|
114
|
+
const WINDOW_WORD =
|
|
115
|
+
"(?:second|seconds|minute|minutes|hour|hours|day|days|week|weeks|month|months|year|years|quarter|quarters|weekend|monday|tuesday|wednesday|thursday|friday|saturday|sunday|morning|afternoon|evening|night)";
|
|
116
|
+
const RELATIVE_TIME_EXPRESSION = new RegExp(
|
|
117
|
+
`^(?:now(?:\\s*[+-]\\s*\\d+\\s*${TIME_UNIT}\\b.*|/[a-zA-Z]+.*)?|[+-]\\d+\\s*${TIME_UNIT}|today|yesterday|tomorrow|(?:last|this)\\s+${WINDOW_WORD})$`,
|
|
118
|
+
"i"
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
function forwardTimeReason(
|
|
122
|
+
value: unknown,
|
|
123
|
+
asOf: string,
|
|
124
|
+
frozenMs: number
|
|
125
|
+
): string | undefined {
|
|
126
|
+
if (typeof value !== "string") {
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
const trimmed = value.trim();
|
|
130
|
+
if (trimmed === "") {
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
if (RELATIVE_TIME_EXPRESSION.test(trimmed)) {
|
|
134
|
+
return (
|
|
135
|
+
`Argument ${JSON.stringify(value)} is a relative time expression, ` +
|
|
136
|
+
`which reads against the real present. This session reads the world ` +
|
|
137
|
+
`as of ${asOf}; supply an absolute ISO-8601 instant with a timezone ` +
|
|
138
|
+
`at or before that instant and retry.`
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
const instant = parseInstant(trimmed);
|
|
142
|
+
if (instant !== undefined && instant.getTime() > frozenMs) {
|
|
143
|
+
return (
|
|
144
|
+
`Argument ${JSON.stringify(value)} is later than the instant this ` +
|
|
145
|
+
`session reads the world as of (${asOf}). Supply a bound at or before ` +
|
|
146
|
+
`that instant and retry.`
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** Relative expressions or instants after `asOf`. Numeric epochs need `timeArgs`. */
|
|
153
|
+
export function forwardTimeArgument(
|
|
154
|
+
input: unknown,
|
|
155
|
+
asOf: string
|
|
156
|
+
): string | undefined {
|
|
157
|
+
const frozenMs = new Date(asOf).getTime();
|
|
158
|
+
const seen = new Set<unknown>();
|
|
159
|
+
const walk = (value: unknown, depth: number): string | undefined => {
|
|
160
|
+
if (depth > 8) {
|
|
161
|
+
return undefined;
|
|
162
|
+
}
|
|
163
|
+
const reason = forwardTimeReason(value, asOf, frozenMs);
|
|
164
|
+
if (reason !== undefined) {
|
|
165
|
+
return reason;
|
|
166
|
+
}
|
|
167
|
+
if (Array.isArray(value)) {
|
|
168
|
+
for (const item of value) {
|
|
169
|
+
const found = walk(item, depth + 1);
|
|
170
|
+
if (found !== undefined) {
|
|
171
|
+
return found;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return undefined;
|
|
175
|
+
}
|
|
176
|
+
if (typeof value === "object" && value !== null) {
|
|
177
|
+
if (seen.has(value)) {
|
|
178
|
+
return undefined;
|
|
179
|
+
}
|
|
180
|
+
seen.add(value);
|
|
181
|
+
for (const item of Object.values(value as Record<string, unknown>)) {
|
|
182
|
+
const found = walk(item, depth + 1);
|
|
183
|
+
if (found !== undefined) {
|
|
184
|
+
return found;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return undefined;
|
|
189
|
+
};
|
|
190
|
+
return walk(input, 0);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Property names that carry a query's time window when a vendor schema
|
|
195
|
+
* declares them. Deliberately narrower than the embedded-filter key list:
|
|
196
|
+
* these must be safe to *require*, so only unambiguous window names — never
|
|
197
|
+
* `timestamp`/`date`, which name data fields more often than bounds.
|
|
198
|
+
*/
|
|
199
|
+
const TIME_WINDOW_KEYS = new Set([
|
|
200
|
+
"from",
|
|
201
|
+
"to",
|
|
202
|
+
"since",
|
|
203
|
+
"until",
|
|
204
|
+
"start",
|
|
205
|
+
"end",
|
|
206
|
+
"start_time",
|
|
207
|
+
"end_time",
|
|
208
|
+
"starttime",
|
|
209
|
+
"endtime",
|
|
210
|
+
]);
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* The string-typed time-window properties a tool's input schema declares.
|
|
214
|
+
* String-typed only: a numeric `from` is a pagination offset more often than
|
|
215
|
+
* an instant, and requiring an ISO value there would break the call.
|
|
216
|
+
*/
|
|
217
|
+
export function schemaTimeWindowKeys(
|
|
218
|
+
inputSchema: { properties?: Record<string, unknown> } | undefined
|
|
219
|
+
): string[] {
|
|
220
|
+
const properties = inputSchema?.properties;
|
|
221
|
+
if (properties === undefined) {
|
|
222
|
+
return [];
|
|
223
|
+
}
|
|
224
|
+
const keys: string[] = [];
|
|
225
|
+
for (const [name, spec] of Object.entries(properties)) {
|
|
226
|
+
if (!TIME_WINDOW_KEYS.has(name.toLowerCase())) {
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
const type =
|
|
230
|
+
typeof spec === "object" && spec !== null
|
|
231
|
+
? (spec as { type?: unknown }).type
|
|
232
|
+
: undefined;
|
|
233
|
+
const types = Array.isArray(type) ? type : [type];
|
|
234
|
+
if (types.includes("string")) {
|
|
235
|
+
keys.push(name);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return keys;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* An omitted time window on a vendor tool is not "no window" — the vendor
|
|
243
|
+
* fills it with a live default (Datadog: `now-1h`..`now`), which the walker
|
|
244
|
+
* cannot see because the value is never present. In a frozen session a call
|
|
245
|
+
* that omits a schema-declared window key is refused so the model supplies
|
|
246
|
+
* the bound explicitly, where {@link forwardTimeArgument} then checks it.
|
|
247
|
+
*/
|
|
248
|
+
export function missingTimeWindow(
|
|
249
|
+
input: unknown,
|
|
250
|
+
windowKeys: readonly string[],
|
|
251
|
+
asOf: string
|
|
252
|
+
): string | undefined {
|
|
253
|
+
if (windowKeys.length === 0) {
|
|
254
|
+
return undefined;
|
|
255
|
+
}
|
|
256
|
+
const record =
|
|
257
|
+
typeof input === "object" && input !== null
|
|
258
|
+
? (input as Record<string, unknown>)
|
|
259
|
+
: {};
|
|
260
|
+
const missing = windowKeys.filter((key) => record[key] === undefined);
|
|
261
|
+
if (missing.length === 0) {
|
|
262
|
+
return undefined;
|
|
263
|
+
}
|
|
264
|
+
return (
|
|
265
|
+
`This tool fills omitted time bounds (${missing.join(", ")}) with a ` +
|
|
266
|
+
`live default window, which reads the real present. This session reads ` +
|
|
267
|
+
`the world as of ${asOf}; supply each bound explicitly as an absolute ` +
|
|
268
|
+
`ISO-8601 instant with a timezone at or before that instant and retry.`
|
|
269
|
+
);
|
|
270
|
+
}
|
|
@@ -329,6 +329,14 @@ export async function cmdDeploy(options: DeployCliOptions): Promise<number> {
|
|
|
329
329
|
if (manifests.every((manifest) => manifest.architecture === "v2")) {
|
|
330
330
|
return deployAgentsdkApplication(ctx, options, targets, {
|
|
331
331
|
hasScmChannels: manifests.some((manifest) => manifest.hasScmChannels),
|
|
332
|
+
declaredSecretNames: [
|
|
333
|
+
...new Set(
|
|
334
|
+
manifests.flatMap((manifest) => manifest.hosting?.secretNames ?? [])
|
|
335
|
+
),
|
|
336
|
+
],
|
|
337
|
+
hasDeploymentsChannels: manifests.some(
|
|
338
|
+
(manifest) => manifest.hasDeploymentsChannels
|
|
339
|
+
),
|
|
332
340
|
});
|
|
333
341
|
}
|
|
334
342
|
if (
|
|
@@ -741,6 +749,8 @@ async function deployOne(
|
|
|
741
749
|
agentPath,
|
|
742
750
|
repositories: options.cursorEventsRepos,
|
|
743
751
|
hasScmChannels: manifest.hasScmChannels,
|
|
752
|
+
declaredSecretNames: hosting?.secretNames,
|
|
753
|
+
hasDeploymentsChannels: manifest.hasDeploymentsChannels,
|
|
744
754
|
multiTenant: options.multiTenant === true,
|
|
745
755
|
});
|
|
746
756
|
}
|
|
@@ -871,7 +881,11 @@ async function deployAgentsdkApplication(
|
|
|
871
881
|
ctx: DeployCliContext,
|
|
872
882
|
options: DeployCliOptions,
|
|
873
883
|
targets: readonly DeployTarget[],
|
|
874
|
-
declarations: {
|
|
884
|
+
declarations: {
|
|
885
|
+
hasScmChannels: boolean;
|
|
886
|
+
declaredSecretNames: string[];
|
|
887
|
+
hasDeploymentsChannels: boolean;
|
|
888
|
+
}
|
|
875
889
|
): Promise<number> {
|
|
876
890
|
const parentDir = resolve(options.dir ?? ".");
|
|
877
891
|
const slug = slugFromDirectoryName(basename(parentDir));
|
|
@@ -936,16 +950,7 @@ async function deployAgentsdkApplication(
|
|
|
936
950
|
);
|
|
937
951
|
}
|
|
938
952
|
|
|
939
|
-
|
|
940
|
-
// budget is per component; otherwise a 2+ component deploy routinely hits
|
|
941
|
-
// the client-side timeout while the server-side deploy is still fine. An
|
|
942
|
-
// explicitly passed timeout always wins.
|
|
943
|
-
const waitCtx =
|
|
944
|
-
options.timeoutMs === undefined
|
|
945
|
-
? { ...ctx, timeoutMs: ctx.timeoutMs * targets.length }
|
|
946
|
-
: ctx;
|
|
947
|
-
|
|
948
|
-
return deployOneAgentsdk(waitCtx, undefined, {
|
|
953
|
+
return deployOneAgentsdk(ctx, undefined, {
|
|
949
954
|
slug,
|
|
950
955
|
gitRepoUrl,
|
|
951
956
|
gitRef,
|
|
@@ -953,6 +958,8 @@ async function deployAgentsdkApplication(
|
|
|
953
958
|
components,
|
|
954
959
|
repositories: options.cursorEventsRepos,
|
|
955
960
|
hasScmChannels: declarations.hasScmChannels,
|
|
961
|
+
declaredSecretNames: declarations.declaredSecretNames,
|
|
962
|
+
hasDeploymentsChannels: declarations.hasDeploymentsChannels,
|
|
956
963
|
multiTenant: options.multiTenant === true,
|
|
957
964
|
});
|
|
958
965
|
}
|
|
@@ -974,6 +981,10 @@ async function deployOneAgentsdk(
|
|
|
974
981
|
repositories: string[] | undefined;
|
|
975
982
|
/** Any component declares a GitHub/Origin channel. */
|
|
976
983
|
hasScmChannels: boolean;
|
|
984
|
+
/** Union of application component secret declarations. */
|
|
985
|
+
declaredSecretNames?: string[];
|
|
986
|
+
/** Any component declares a deployments channel (same repo scope). */
|
|
987
|
+
hasDeploymentsChannels?: boolean;
|
|
977
988
|
/** Redeploy an existing Cursor-managed product. */
|
|
978
989
|
multiTenant: boolean;
|
|
979
990
|
}
|
|
@@ -1048,6 +1059,9 @@ async function deployOneAgentsdk(
|
|
|
1048
1059
|
);
|
|
1049
1060
|
return 1;
|
|
1050
1061
|
}
|
|
1062
|
+
warnMissingSecrets(ctx, slug, args.declaredSecretNames, detail.secretNames);
|
|
1063
|
+
const watchesRepositories =
|
|
1064
|
+
args.hasScmChannels || args.hasDeploymentsChannels === true;
|
|
1051
1065
|
ctx.out(
|
|
1052
1066
|
`Deployed ${slug} (team ${ctx.teamId})\n` +
|
|
1053
1067
|
` status: running\n` +
|
|
@@ -1059,15 +1073,16 @@ async function deployOneAgentsdk(
|
|
|
1059
1073
|
: ` components: ${args.components
|
|
1060
1074
|
.map((component) => component.componentKey)
|
|
1061
1075
|
.join(", ")}\n`) +
|
|
1062
|
-
(detail.repositories === undefined || !
|
|
1076
|
+
(detail.repositories === undefined || !watchesRepositories
|
|
1063
1077
|
? ""
|
|
1064
1078
|
: ` watching: ${detail.repositories.length === 0 ? "(nothing)" : detail.repositories.join(", ")}\n`)
|
|
1065
1079
|
);
|
|
1066
|
-
// An agent with GitHub/Origin channels bound to no repository
|
|
1067
|
-
// no deliveries at all
|
|
1068
|
-
|
|
1080
|
+
// An agent with GitHub/Origin/deployments channels bound to no repository
|
|
1081
|
+
// scope gets no deliveries at all (deployments channels receive the
|
|
1082
|
+
// watched repos' deployment events), which is otherwise invisible here.
|
|
1083
|
+
if (watchesRepositories && detail.repositories?.length === 0) {
|
|
1069
1084
|
ctx.err(
|
|
1070
|
-
`warning: ${slug} watches no repositories, so its GitHub/Origin channels receive no events.\n` +
|
|
1085
|
+
`warning: ${slug} watches no repositories, so its GitHub/Origin/deployments channels receive no events.\n` +
|
|
1071
1086
|
` Redeploy with --cursor-events-repo <owner>/<name> to set the scope.\n`
|
|
1072
1087
|
);
|
|
1073
1088
|
}
|
|
@@ -1185,6 +1200,12 @@ interface DeployManifest {
|
|
|
1185
1200
|
* while the deployment is bound to at least one `owner/name` scope.
|
|
1186
1201
|
*/
|
|
1187
1202
|
hasScmChannels: boolean;
|
|
1203
|
+
/**
|
|
1204
|
+
* The agent has deployments channels; deploy-source edges derive from
|
|
1205
|
+
* the same watched-repo set as GitHub/Origin, so it too receives
|
|
1206
|
+
* nothing while the deployment watches no repositories.
|
|
1207
|
+
*/
|
|
1208
|
+
hasDeploymentsChannels: boolean;
|
|
1188
1209
|
}
|
|
1189
1210
|
|
|
1190
1211
|
/**
|
|
@@ -1224,6 +1245,9 @@ async function readDeployManifest(dir: string): Promise<DeployManifest> {
|
|
|
1224
1245
|
const kind = channel.definition.meta?.kind;
|
|
1225
1246
|
return kind === "github" || kind === "origin";
|
|
1226
1247
|
}),
|
|
1248
|
+
hasDeploymentsChannels: project.channels.some(
|
|
1249
|
+
(channel) => channel.definition.meta?.kind === "deployments"
|
|
1250
|
+
),
|
|
1227
1251
|
};
|
|
1228
1252
|
}
|
|
1229
1253
|
|
|
@@ -1450,6 +1474,9 @@ function renderAgentkitDeploymentStatus(
|
|
|
1450
1474
|
}`
|
|
1451
1475
|
);
|
|
1452
1476
|
}
|
|
1477
|
+
if (detail.secretNames !== undefined && detail.secretNames.length > 0) {
|
|
1478
|
+
lines.push(` secrets: ${detail.secretNames.join(", ")}`);
|
|
1479
|
+
}
|
|
1453
1480
|
if (detail.lastError !== null && detail.lastError !== undefined) {
|
|
1454
1481
|
lines.push(` last error: ${sanitizeCustomerError(detail.lastError)}`);
|
|
1455
1482
|
}
|
|
@@ -1650,6 +1677,21 @@ export async function cmdRotatePodCredential(
|
|
|
1650
1677
|
// secrets set|list|unset
|
|
1651
1678
|
// ============================================================================
|
|
1652
1679
|
|
|
1680
|
+
async function secretDeploymentArchitecture(
|
|
1681
|
+
ctx: DeployCliContext,
|
|
1682
|
+
slug: string
|
|
1683
|
+
): Promise<"v1" | "v2"> {
|
|
1684
|
+
try {
|
|
1685
|
+
await ctx.client.getAgentkitDeploy({ teamId: ctx.teamId, slug });
|
|
1686
|
+
return "v2";
|
|
1687
|
+
} catch (error) {
|
|
1688
|
+
if (error instanceof DeployApiError && error.status === 404) {
|
|
1689
|
+
return "v1";
|
|
1690
|
+
}
|
|
1691
|
+
throw error;
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1653
1695
|
export async function cmdSecretsSet(
|
|
1654
1696
|
slug: string | undefined,
|
|
1655
1697
|
specs: string[],
|
|
@@ -1712,11 +1754,19 @@ export async function cmdSecretsSet(
|
|
|
1712
1754
|
|
|
1713
1755
|
let secretNames: string[];
|
|
1714
1756
|
try {
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1757
|
+
const architecture = await secretDeploymentArchitecture(ctx, slug);
|
|
1758
|
+
secretNames =
|
|
1759
|
+
architecture === "v2"
|
|
1760
|
+
? await ctx.client.setAgentkitSecrets({
|
|
1761
|
+
teamId: ctx.teamId,
|
|
1762
|
+
slug,
|
|
1763
|
+
secrets,
|
|
1764
|
+
})
|
|
1765
|
+
: await ctx.client.setSecrets({
|
|
1766
|
+
teamId: ctx.teamId,
|
|
1767
|
+
slug,
|
|
1768
|
+
secrets,
|
|
1769
|
+
});
|
|
1720
1770
|
} catch (error) {
|
|
1721
1771
|
return renderApiError(error, ctx.err);
|
|
1722
1772
|
}
|
|
@@ -1748,7 +1798,11 @@ export async function cmdSecretsList(
|
|
|
1748
1798
|
}
|
|
1749
1799
|
let secrets: SecretInfo[];
|
|
1750
1800
|
try {
|
|
1751
|
-
|
|
1801
|
+
const architecture = await secretDeploymentArchitecture(ctx, slug);
|
|
1802
|
+
secrets =
|
|
1803
|
+
architecture === "v2"
|
|
1804
|
+
? await ctx.client.listAgentkitSecrets({ teamId: ctx.teamId, slug })
|
|
1805
|
+
: await ctx.client.listSecrets({ teamId: ctx.teamId, slug });
|
|
1752
1806
|
} catch (error) {
|
|
1753
1807
|
return renderApiError(error, ctx.err);
|
|
1754
1808
|
}
|
|
@@ -1787,7 +1841,16 @@ export async function cmdSecretsUnset(
|
|
|
1787
1841
|
return ctx;
|
|
1788
1842
|
}
|
|
1789
1843
|
try {
|
|
1790
|
-
await
|
|
1844
|
+
const architecture = await secretDeploymentArchitecture(ctx, slug);
|
|
1845
|
+
if (architecture === "v2") {
|
|
1846
|
+
await ctx.client.deleteAgentkitSecret({
|
|
1847
|
+
teamId: ctx.teamId,
|
|
1848
|
+
slug,
|
|
1849
|
+
name,
|
|
1850
|
+
});
|
|
1851
|
+
} else {
|
|
1852
|
+
await ctx.client.deleteSecret({ teamId: ctx.teamId, slug, name });
|
|
1853
|
+
}
|
|
1791
1854
|
} catch (error) {
|
|
1792
1855
|
if (error instanceof DeployApiError && error.status === 404) {
|
|
1793
1856
|
ctx.err(
|
|
@@ -119,7 +119,9 @@ export const BUILTINS: readonly ContinuationBuiltin[] = [
|
|
|
119
119
|
{
|
|
120
120
|
type: "deployment",
|
|
121
121
|
kind: "deployments",
|
|
122
|
-
events
|
|
122
|
+
// All three factory stream events carry `deploymentId`; keep in
|
|
123
|
+
// lockstep with the control plane's `conversation/deployments.ts`.
|
|
124
|
+
events: ["deployment.created", "deployment.succeeded", "deployment.failed"],
|
|
123
125
|
format: "deployments:{deploymentId}",
|
|
124
126
|
},
|
|
125
127
|
] as const;
|