@cursor/july 0.1.102 → 0.1.104
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 +34 -32
- package/README.md +10 -12
- package/dist/ab.d.ts +1 -1
- package/dist/ab.js +1 -1
- package/dist/bin/agent-serve.d.ts +12 -12
- package/dist/bin/agent-serve.js +114 -36
- package/dist/channels/bitbucket/api.d.ts +176 -0
- package/dist/channels/bitbucket/api.d.ts.map +1 -0
- package/dist/channels/bitbucket/api.js +419 -0
- package/dist/channels/bitbucket/binding.d.ts +71 -0
- package/dist/channels/bitbucket/binding.d.ts.map +1 -0
- package/dist/channels/bitbucket/binding.js +269 -0
- package/dist/channels/bitbucket/bitbucket-channel.d.ts +33 -0
- package/dist/channels/bitbucket/bitbucket-channel.d.ts.map +1 -0
- package/dist/channels/bitbucket/bitbucket-channel.js +120 -0
- package/dist/channels/bitbucket/bitbucket-webhook.d.ts +61 -0
- package/dist/channels/bitbucket/bitbucket-webhook.d.ts.map +1 -0
- package/dist/channels/bitbucket/bitbucket-webhook.js +394 -0
- package/dist/channels/bitbucket/checks.d.ts +67 -0
- package/dist/channels/bitbucket/checks.d.ts.map +1 -0
- package/dist/channels/bitbucket/checks.js +102 -0
- package/dist/channels/bitbucket/cursor-account.d.ts +37 -0
- package/dist/channels/bitbucket/cursor-account.d.ts.map +1 -0
- package/dist/channels/bitbucket/cursor-account.js +65 -0
- package/dist/channels/bitbucket/defaults.d.ts +26 -0
- package/dist/channels/bitbucket/defaults.d.ts.map +1 -0
- package/dist/channels/bitbucket/defaults.js +73 -0
- package/dist/channels/bitbucket/events.d.ts +22 -0
- package/dist/channels/bitbucket/events.d.ts.map +1 -0
- package/dist/channels/bitbucket/events.js +64 -0
- package/dist/channels/bitbucket/index.d.ts +34 -0
- package/dist/channels/bitbucket/index.d.ts.map +1 -0
- package/dist/channels/bitbucket/index.js +33 -0
- package/dist/channels/bitbucket/replay.d.ts +63 -0
- package/dist/channels/bitbucket/replay.d.ts.map +1 -0
- package/dist/channels/bitbucket/replay.js +304 -0
- package/dist/channels/bitbucket/state.d.ts +35 -0
- package/dist/channels/bitbucket/state.d.ts.map +1 -0
- package/dist/channels/bitbucket/state.js +21 -0
- package/dist/channels/bitbucket/types.d.ts +229 -0
- package/dist/channels/bitbucket/types.d.ts.map +1 -0
- package/dist/channels/bitbucket/types.js +1 -0
- package/dist/channels/change-monitors/change-monitors-channel.d.ts +5 -0
- package/dist/channels/change-monitors/change-monitors-channel.d.ts.map +1 -0
- package/dist/channels/change-monitors/change-monitors-channel.js +41 -0
- package/dist/channels/change-monitors/index.d.ts +4 -0
- package/dist/channels/change-monitors/index.d.ts.map +1 -0
- package/dist/channels/change-monitors/index.js +2 -0
- package/dist/channels/change-monitors/types.d.ts +39 -0
- package/dist/channels/change-monitors/types.d.ts.map +1 -0
- package/dist/channels/change-monitors/types.js +1 -0
- package/dist/channels/deployments/deployments-channel.d.ts +22 -14
- package/dist/channels/deployments/deployments-channel.d.ts.map +1 -1
- package/dist/channels/deployments/deployments-channel.js +25 -27
- package/dist/channels/deployments/types.d.ts +12 -6
- package/dist/channels/deployments/types.d.ts.map +1 -1
- package/dist/channels/github/binding.d.ts +6 -0
- package/dist/channels/github/binding.d.ts.map +1 -1
- package/dist/channels/github/binding.js +3 -3
- package/dist/channels/github/cursor-account.d.ts +7 -3
- package/dist/channels/github/cursor-account.d.ts.map +1 -1
- package/dist/channels/github/cursor-account.js +10 -6
- package/dist/channels/github/defaults.d.ts.map +1 -1
- package/dist/channels/github/defaults.js +4 -0
- package/dist/channels/github/events.d.ts +1 -1
- package/dist/channels/github/events.js +1 -1
- package/dist/channels/github/forward.d.ts +1 -1
- package/dist/channels/github/forward.d.ts.map +1 -1
- package/dist/channels/github/forward.js +3 -2
- package/dist/channels/github/github-channel.d.ts +29 -39
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +68 -101
- package/dist/channels/github/progress.d.ts +22 -0
- package/dist/channels/github/progress.d.ts.map +1 -1
- package/dist/channels/github/progress.js +32 -5
- package/dist/channels/github/replay.d.ts +1 -1
- package/dist/channels/github/replay.js +1 -1
- package/dist/channels/github/state.d.ts +2 -0
- package/dist/channels/github/state.d.ts.map +1 -1
- package/dist/channels/github/state.js +14 -11
- package/dist/channels/github/types.d.ts +2 -4
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/gitlab/api.d.ts +91 -0
- package/dist/channels/gitlab/api.d.ts.map +1 -0
- package/dist/channels/gitlab/api.js +150 -0
- package/dist/channels/gitlab/binding.d.ts +58 -0
- package/dist/channels/gitlab/binding.d.ts.map +1 -0
- package/dist/channels/gitlab/binding.js +139 -0
- package/dist/channels/gitlab/checks.d.ts +110 -0
- package/dist/channels/gitlab/checks.d.ts.map +1 -0
- package/dist/channels/gitlab/checks.js +126 -0
- package/dist/channels/gitlab/cursor-account.d.ts +36 -0
- package/dist/channels/gitlab/cursor-account.d.ts.map +1 -0
- package/dist/channels/gitlab/cursor-account.js +65 -0
- package/dist/channels/gitlab/defaults.d.ts +25 -0
- package/dist/channels/gitlab/defaults.d.ts.map +1 -0
- package/dist/channels/gitlab/defaults.js +60 -0
- package/dist/channels/gitlab/events.d.ts +12 -0
- package/dist/channels/gitlab/events.d.ts.map +1 -0
- package/dist/channels/gitlab/events.js +28 -0
- package/dist/channels/gitlab/gitlab-channel.d.ts +33 -0
- package/dist/channels/gitlab/gitlab-channel.d.ts.map +1 -0
- package/dist/channels/gitlab/gitlab-channel.js +120 -0
- package/dist/channels/gitlab/gitlab-webhook.d.ts +45 -0
- package/dist/channels/gitlab/gitlab-webhook.d.ts.map +1 -0
- package/dist/channels/gitlab/gitlab-webhook.js +397 -0
- package/dist/channels/gitlab/index.d.ts +31 -0
- package/dist/channels/gitlab/index.d.ts.map +1 -0
- package/dist/channels/gitlab/index.js +30 -0
- package/dist/channels/gitlab/replay.d.ts +105 -0
- package/dist/channels/gitlab/replay.d.ts.map +1 -0
- package/dist/channels/gitlab/replay.js +206 -0
- package/dist/channels/gitlab/state.d.ts +33 -0
- package/dist/channels/gitlab/state.d.ts.map +1 -0
- package/dist/channels/gitlab/state.js +23 -0
- package/dist/channels/gitlab/types.d.ts +214 -0
- package/dist/channels/gitlab/types.d.ts.map +1 -0
- package/dist/channels/gitlab/types.js +1 -0
- package/dist/channels/issues/index.d.ts +4 -0
- package/dist/channels/issues/index.d.ts.map +1 -0
- package/dist/channels/issues/index.js +2 -0
- package/dist/channels/issues/issues-channel.d.ts +5 -0
- package/dist/channels/issues/issues-channel.d.ts.map +1 -0
- package/dist/channels/issues/issues-channel.js +37 -0
- package/dist/channels/issues/types.d.ts +33 -0
- package/dist/channels/issues/types.d.ts.map +1 -0
- package/dist/channels/issues/types.js +1 -0
- package/dist/channels/origin/api.d.ts.map +1 -1
- package/dist/channels/origin/api.js +4 -2
- package/dist/channels/origin/origin-channel.d.ts +4 -9
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +8 -48
- package/dist/channels/origin/types.d.ts +20 -2
- package/dist/channels/origin/types.d.ts.map +1 -1
- package/dist/channels/slack/eval-directive.d.ts.map +1 -1
- package/dist/channels/slack/eval-directive.js +1 -7
- package/dist/channels/slack/init.d.ts.map +1 -1
- package/dist/channels/slack/init.js +3 -3
- 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 +6 -13
- package/dist/channels/slack/types.d.ts +1 -1
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/channels.d.ts +1 -1
- package/dist/channels.d.ts.map +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/connections.d.ts +1 -1
- package/dist/connections.js +1 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +4 -4
- package/dist/docs/assets/{app.CLA03RCz.js → app.DbMWUyGb.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.Bqsulb9K.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.ifxv-cJV.js → VPLocalSearchBox.DcNeTh9o.js} +1 -1
- package/dist/docs/assets/chunks/{theme.DWCwM6p-.js → theme.DMjhY3gl.js} +2 -2
- package/dist/docs/assets/concepts.md.DgEcZOfT.js +1 -0
- package/dist/docs/assets/{concepts.md.rPzW2HZN.lean.js → concepts.md.DgEcZOfT.lean.js} +1 -1
- package/dist/docs/assets/{evals.md.CPzDAwoH.js → evals.md.CbMoebP1.js} +1 -1
- package/dist/docs/assets/guides_cloud-agents.md.DS8RIjwx.js +9 -0
- package/dist/docs/assets/{guides_github.md.BtPr9GaP.js → guides_github.md.c0gdGJ-D.js} +1 -1
- package/dist/docs/assets/{guides_github.md.BtPr9GaP.lean.js → guides_github.md.c0gdGJ-D.lean.js} +1 -1
- package/dist/docs/assets/{guides_opentelemetry.md.BVTXDCRg.js → guides_opentelemetry.md.COh9jFVg.js} +7 -8
- package/dist/docs/assets/{guides_opentelemetry.md.BVTXDCRg.lean.js → guides_opentelemetry.md.COh9jFVg.lean.js} +1 -1
- package/dist/docs/assets/{index.md.Kiht7ell.js → index.md.D75GWhPl.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.BHeYMgme.js → reference_agent-config.md.CHNpiyp4.js} +3 -3
- package/dist/docs/assets/{reference_channels.md.Cd2f2iyV.js → reference_channels.md.DBGcaB7m.js} +2 -2
- package/dist/docs/assets/{reference_channels.md.Cd2f2iyV.lean.js → reference_channels.md.DBGcaB7m.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.DfoeyvL0.js → reference_cli.md.CJNc_xYK.js} +1 -1
- package/dist/docs/assets/{reference_extensions.md.9WQMZe1l.js → reference_extensions.md.DykHW3qL.js} +11 -5
- package/dist/docs/assets/reference_extensions.md.DykHW3qL.lean.js +1 -0
- package/dist/docs/assets/reference_hooks.md.Ddt5DdgJ.js +73 -0
- package/dist/docs/assets/{reference_hooks.md.a8BJxMR5.lean.js → reference_hooks.md.Ddt5DdgJ.lean.js} +1 -1
- package/dist/docs/assets/{reference_playground.md.DnX5nL-B.js → reference_playground.md.4myJPxrf.js} +1 -1
- package/dist/docs/assets/{reference_project-layout.md.CA6QP6Lw.js → reference_project-layout.md.DuBu9a96.js} +2 -2
- package/dist/docs/assets/reference_result.md.BK5SxDrf.js +19 -0
- package/dist/docs/assets/reference_result.md.BK5SxDrf.lean.js +1 -0
- package/dist/docs/assets/{reference_sessions.md.NxFP_CAC.js → reference_sessions.md.CueyOHSL.js} +1 -1
- package/dist/docs/assets/{reference_sessions.md.NxFP_CAC.lean.js → reference_sessions.md.CueyOHSL.lean.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.B1up2r9W.js → reference_tools.md.aGrn99hP.js} +1 -1
- package/dist/docs/assets/skills_framework-map.md.haibFyoB.js +1 -0
- package/dist/docs/assets/{skills_otel.md.CgiZryR3.js → skills_otel.md.CqhobH3B.js} +3 -3
- package/dist/docs/assets/{skills_otel.md.CgiZryR3.lean.js → skills_otel.md.CqhobH3B.lean.js} +1 -1
- package/dist/docs/assets/{templates_pr-autofixer.md.x5zl6-GT.js → templates_pr-autofixer.md.Bds_XWcV.js} +2 -2
- package/dist/docs/assets/{templates_pr-autofixer.md.x5zl6-GT.lean.js → templates_pr-autofixer.md.Bds_XWcV.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 +2 -4
- package/dist/docs/deployment.html +4 -4
- package/dist/docs/design/filesystem.md +376 -0
- package/dist/docs/design/runtime-abstraction.md +2 -3
- package/dist/docs/evals.html +6 -6
- package/dist/docs/evals.md +9 -7
- package/dist/docs/guides/agent-to-agent.html +4 -4
- package/dist/docs/guides/cloud-agents.html +6 -6
- package/dist/docs/guides/cloud-agents.md +4 -6
- package/dist/docs/guides/convert-automation.html +4 -4
- package/dist/docs/guides/github.html +6 -6
- package/dist/docs/guides/github.md +5 -1
- package/dist/docs/guides/human-in-the-loop.html +4 -4
- package/dist/docs/guides/mcp-oauth.html +5 -5
- package/dist/docs/guides/opentelemetry.html +10 -11
- package/dist/docs/guides/opentelemetry.md +41 -17
- 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 +2 -2
- package/dist/docs/llms-full.txt +907 -262
- package/dist/docs/llms.txt +3 -2
- package/dist/docs/quickstart.html +4 -4
- package/dist/docs/reference/agent-config.html +8 -8
- package/dist/docs/reference/agent-config.md +6 -10
- package/dist/docs/reference/artifacts.html +5 -5
- package/dist/docs/reference/channels.html +6 -6
- package/dist/docs/reference/channels.md +38 -8
- package/dist/docs/reference/cli.html +5 -5
- package/dist/docs/reference/cli.md +3 -4
- package/dist/docs/reference/connections.html +4 -4
- package/dist/docs/reference/extensions.html +16 -10
- package/dist/docs/reference/extensions.md +86 -22
- package/dist/docs/reference/hooks.html +69 -10
- package/dist/docs/reference/hooks.md +215 -46
- package/dist/docs/reference/http-api.html +4 -4
- package/dist/docs/reference/instructions.html +4 -4
- package/dist/docs/reference/playground.html +5 -5
- package/dist/docs/reference/playground.md +3 -0
- package/dist/docs/reference/project-layout.html +6 -6
- package/dist/docs/reference/project-layout.md +2 -1
- package/dist/docs/reference/prompt.html +4 -4
- package/dist/docs/reference/result.html +45 -0
- package/dist/docs/reference/result.md +89 -0
- package/dist/docs/reference/schedules.html +4 -4
- package/dist/docs/reference/sessions.html +5 -5
- package/dist/docs/reference/sessions.md +3 -1
- package/dist/docs/reference/skills.html +4 -4
- package/dist/docs/reference/subagents.html +4 -4
- package/dist/docs/reference/tools.html +5 -5
- package/dist/docs/reference/tools.md +1 -2
- 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 +3 -1
- 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 +7 -7
- package/dist/docs/skills/otel.md +8 -3
- 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 +6 -6
- package/dist/docs/templates/pr-autofixer.md +0 -3
- 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/evals.d.ts +1 -1
- package/dist/evals.d.ts.map +1 -1
- package/dist/extensions.d.ts +20 -7
- package/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js +36 -5
- package/dist/files.d.ts +16 -3
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +16 -3
- package/dist/filesystem.d.ts +440 -0
- package/dist/filesystem.d.ts.map +1 -0
- package/dist/filesystem.js +1694 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/internal/ab-snapshot.d.ts.map +1 -1
- package/dist/internal/ab-snapshot.js +0 -1
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +1 -3
- package/dist/internal/authored-alias-hooks.d.ts +4 -13
- package/dist/internal/authored-alias-hooks.d.ts.map +1 -1
- package/dist/internal/authored-alias-hooks.js +4 -20
- package/dist/internal/authored-loaders.d.ts +2 -3
- package/dist/internal/authored-loaders.d.ts.map +1 -1
- package/dist/internal/authored-loaders.js +6 -20
- package/dist/internal/channel-dispatch.d.ts +43 -0
- package/dist/internal/channel-dispatch.d.ts.map +1 -0
- package/dist/internal/channel-dispatch.js +77 -0
- package/dist/internal/chat-client.d.ts +1 -1
- package/dist/internal/chat-client.js +1 -1
- package/dist/internal/cli-ax.d.ts +5 -5
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +5 -5
- package/dist/internal/cli-bitbucket.d.ts +33 -0
- package/dist/internal/cli-bitbucket.d.ts.map +1 -0
- package/dist/internal/cli-bitbucket.js +359 -0
- package/dist/internal/cli-convert-automation.d.ts +1 -1
- package/dist/internal/cli-convert-automation.js +2 -2
- package/dist/internal/cli-cursor.d.ts +1 -1
- package/dist/internal/cli-cursor.d.ts.map +1 -1
- package/dist/internal/cli-cursor.js +2 -4
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +2 -6
- package/dist/internal/cli-github.d.ts +1 -1
- package/dist/internal/cli-github.js +3 -3
- package/dist/internal/cli-gitlab.d.ts +37 -0
- package/dist/internal/cli-gitlab.d.ts.map +1 -0
- package/dist/internal/cli-gitlab.js +380 -0
- package/dist/internal/cli-mcp.d.ts.map +1 -1
- package/dist/internal/cli-mcp.js +2 -6
- package/dist/internal/cli-slack.d.ts +1 -1
- package/dist/internal/cli-slack.d.ts.map +1 -1
- package/dist/internal/cli-slack.js +2 -4
- package/dist/internal/continuation-channel.d.ts +18 -2
- package/dist/internal/continuation-channel.d.ts.map +1 -1
- package/dist/internal/continuation-channel.js +67 -5
- package/dist/internal/continuation-identity.d.ts +24 -17
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +246 -32
- package/dist/internal/conversation-mirror.d.ts.map +1 -1
- package/dist/internal/conversation-mirror.js +4 -3
- package/dist/internal/convert-automation/types.d.ts +1 -1
- package/dist/internal/convert-automation/types.js +1 -1
- package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
- package/dist/internal/cursor/account-mcp.js +1 -3
- package/dist/internal/cursor/backend-client.d.ts +5 -4
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +5 -6
- package/dist/internal/cursor/bound-secret-file.d.ts +56 -0
- package/dist/internal/cursor/bound-secret-file.d.ts.map +1 -0
- package/dist/internal/cursor/bound-secret-file.js +88 -0
- package/dist/internal/cursor/credentials.d.ts +39 -5
- package/dist/internal/cursor/credentials.d.ts.map +1 -1
- package/dist/internal/cursor/credentials.js +58 -8
- package/dist/internal/cursor/hosted-bound-secrets.d.ts +41 -0
- package/dist/internal/cursor/hosted-bound-secrets.d.ts.map +1 -0
- package/dist/internal/cursor/hosted-bound-secrets.js +54 -0
- package/dist/internal/cursor/hosted-deployment-secrets.d.ts +19 -5
- package/dist/internal/cursor/hosted-deployment-secrets.d.ts.map +1 -1
- package/dist/internal/cursor/hosted-deployment-secrets.js +29 -9
- package/dist/internal/cursor/hosted-store-secrets.d.ts +1 -1
- package/dist/internal/cursor/hosted-store-secrets.js +1 -1
- package/dist/internal/cursor-account-mcp-auth.d.ts.map +1 -1
- package/dist/internal/cursor-account-mcp-auth.js +2 -4
- package/dist/internal/cursor-deployment-relay.d.ts +6 -2
- package/dist/internal/cursor-deployment-relay.d.ts.map +1 -1
- package/dist/internal/cursor-deployment-relay.js +13 -9
- package/dist/internal/deploy-manifest.d.ts +1 -1
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +1 -1
- package/dist/internal/discovery/ab.d.ts +1 -1
- package/dist/internal/discovery/ab.d.ts.map +1 -1
- package/dist/internal/discovery/ab.js +21 -9
- package/dist/internal/discovery/agent.d.ts +6 -1
- package/dist/internal/discovery/agent.d.ts.map +1 -1
- package/dist/internal/discovery/agent.js +141 -120
- package/dist/internal/discovery/channels.d.ts +1 -1
- package/dist/internal/discovery/channels.d.ts.map +1 -1
- package/dist/internal/discovery/channels.js +14 -14
- package/dist/internal/discovery/connections.d.ts +1 -5
- package/dist/internal/discovery/connections.d.ts.map +1 -1
- package/dist/internal/discovery/connections.js +30 -44
- package/dist/internal/discovery/cursor-plugin.d.ts.map +1 -1
- package/dist/internal/discovery/cursor-plugin.js +1 -3
- package/dist/internal/discovery/extension-overlay.d.ts +32 -0
- package/dist/internal/discovery/extension-overlay.d.ts.map +1 -0
- package/dist/internal/discovery/extension-overlay.js +191 -0
- package/dist/internal/discovery/extensions.d.ts +11 -2
- package/dist/internal/discovery/extensions.d.ts.map +1 -1
- package/dist/internal/discovery/extensions.js +211 -74
- package/dist/internal/discovery/hooks.d.ts +1 -1
- package/dist/internal/discovery/hooks.d.ts.map +1 -1
- package/dist/internal/discovery/hooks.js +15 -2
- package/dist/internal/discovery/info.d.ts.map +1 -1
- package/dist/internal/discovery/info.js +10 -1
- package/dist/internal/discovery/modules.d.ts.map +1 -1
- package/dist/internal/discovery/modules.js +8 -2
- package/dist/internal/discovery/names.d.ts +1 -1
- package/dist/internal/discovery/names.d.ts.map +1 -1
- package/dist/internal/discovery/names.js +1 -0
- package/dist/internal/discovery/project.d.ts +0 -2
- package/dist/internal/discovery/project.d.ts.map +1 -1
- package/dist/internal/discovery/project.js +64 -10
- package/dist/internal/discovery/runtime.d.ts.map +1 -1
- package/dist/internal/discovery/runtime.js +1 -2
- package/dist/internal/discovery/schedules.d.ts +1 -1
- package/dist/internal/discovery/schedules.d.ts.map +1 -1
- package/dist/internal/discovery/schedules.js +23 -2
- package/dist/internal/discovery/services.d.ts +6 -2
- package/dist/internal/discovery/services.d.ts.map +1 -1
- package/dist/internal/discovery/services.js +31 -1
- package/dist/internal/discovery/skills.d.ts +1 -6
- package/dist/internal/discovery/skills.d.ts.map +1 -1
- package/dist/internal/discovery/skills.js +8 -3
- package/dist/internal/discovery/subagent.d.ts +3 -0
- package/dist/internal/discovery/subagent.d.ts.map +1 -1
- package/dist/internal/discovery/subagent.js +109 -0
- package/dist/internal/discovery.d.ts +1 -2
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +1 -2
- package/dist/internal/distribution.d.ts +10 -27
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +25 -73
- package/dist/internal/docs-site.js +1 -1
- package/dist/internal/eval-run-store.d.ts +0 -1
- package/dist/internal/eval-run-store.d.ts.map +1 -1
- package/dist/internal/eval-runner.d.ts.map +1 -1
- package/dist/internal/factory-resource-channel.d.ts +33 -0
- package/dist/internal/factory-resource-channel.d.ts.map +1 -0
- package/dist/internal/factory-resource-channel.js +77 -0
- package/dist/internal/filesystem/errors.d.ts +64 -0
- package/dist/internal/filesystem/errors.d.ts.map +1 -0
- package/dist/internal/filesystem/errors.js +175 -0
- package/dist/internal/filesystem/format.d.ts +28 -0
- package/dist/internal/filesystem/format.d.ts.map +1 -0
- package/dist/internal/filesystem/format.js +213 -0
- package/dist/internal/filesystem/merge.d.ts +34 -0
- package/dist/internal/filesystem/merge.d.ts.map +1 -0
- package/dist/internal/filesystem/merge.js +196 -0
- package/dist/internal/filesystem/scratch.d.ts +59 -0
- package/dist/internal/filesystem/scratch.d.ts.map +1 -0
- package/dist/internal/filesystem/scratch.js +212 -0
- package/dist/internal/filesystem/sdk-schemas.d.ts +29 -0
- package/dist/internal/filesystem/sdk-schemas.d.ts.map +1 -0
- package/dist/internal/filesystem/sdk-schemas.js +153 -0
- package/dist/internal/filesystem/tools.d.ts +42 -0
- package/dist/internal/filesystem/tools.d.ts.map +1 -0
- package/dist/internal/filesystem/tools.js +618 -0
- package/dist/internal/filesystem/walk.d.ts +74 -0
- package/dist/internal/filesystem/walk.d.ts.map +1 -0
- package/dist/internal/filesystem/walk.js +339 -0
- package/dist/internal/framework-file-storage.d.ts +8 -0
- package/dist/internal/framework-file-storage.d.ts.map +1 -1
- package/dist/internal/framework-file-storage.js +8 -8
- package/dist/internal/github-fanout.d.ts +1 -1
- package/dist/internal/github-fanout.js +1 -1
- package/dist/internal/guest-network.d.ts +104 -0
- package/dist/internal/guest-network.d.ts.map +1 -0
- package/dist/internal/guest-network.js +309 -0
- package/dist/internal/host-otel.d.ts +3 -3
- package/dist/internal/host-otel.d.ts.map +1 -1
- package/dist/internal/host-otel.js +8 -4
- package/dist/internal/hosted-admission-adapter.d.ts +8 -7
- package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.d.ts +6 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +18 -5
- package/dist/internal/hosted-delivery.d.ts +18 -0
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +258 -118
- package/dist/internal/http-channel.d.ts.map +1 -1
- package/dist/internal/http-channel.js +1 -3
- package/dist/internal/init-interview.d.ts.map +1 -1
- package/dist/internal/init-interview.js +1 -3
- package/dist/internal/init-project.d.ts +2 -2
- package/dist/internal/init-project.js +2 -2
- package/dist/internal/inline-stdio-define-stub.d.ts +1 -1
- package/dist/internal/inline-stdio-define-stub.d.ts.map +1 -1
- package/dist/internal/inline-stdio-define-stub.js +1 -1
- package/dist/internal/is-record.d.ts +2 -0
- package/dist/internal/is-record.d.ts.map +1 -0
- package/dist/internal/is-record.js +3 -0
- package/dist/internal/json-schema.d.ts.map +1 -1
- package/dist/internal/json-schema.js +18 -10
- package/dist/internal/local-control-plane.d.ts +1 -2
- package/dist/internal/local-control-plane.d.ts.map +1 -1
- package/dist/internal/local-control-plane.js +3 -20
- package/dist/internal/mcp-endpoint.d.ts.map +1 -1
- package/dist/internal/mcp-endpoint.js +1 -3
- package/dist/internal/otel/collector.d.ts +12 -3
- package/dist/internal/otel/collector.d.ts.map +1 -1
- package/dist/internal/otel/collector.js +77 -125
- package/dist/internal/otel/config.d.ts +0 -2
- package/dist/internal/otel/config.d.ts.map +1 -1
- package/dist/internal/otel/config.js +17 -20
- package/dist/internal/otel/http.d.ts +2 -0
- package/dist/internal/otel/http.d.ts.map +1 -1
- package/dist/internal/otel/http.js +7 -1
- package/dist/internal/otel/mcp.d.ts.map +1 -1
- package/dist/internal/otel/mcp.js +3 -16
- package/dist/internal/otel/runtime.d.ts +26 -1
- package/dist/internal/otel/runtime.d.ts.map +1 -1
- package/dist/internal/otel/runtime.js +164 -15
- package/dist/internal/package-inline-stdio.d.ts.map +1 -1
- package/dist/internal/package-inline-stdio.js +3 -11
- package/dist/internal/playground/toolchain.d.ts +1 -1
- package/dist/internal/playground/toolchain.d.ts.map +1 -1
- package/dist/internal/playground/toolchain.js +1 -1
- package/dist/internal/request-error-status.d.ts +12 -0
- package/dist/internal/request-error-status.d.ts.map +1 -0
- package/dist/internal/request-error-status.js +52 -0
- package/dist/internal/resolve-prod-target.d.ts +1 -1
- package/dist/internal/resolve-prod-target.d.ts.map +1 -1
- package/dist/internal/resolve-prod-target.js +3 -7
- package/dist/internal/result-output.d.ts +18 -0
- package/dist/internal/result-output.d.ts.map +1 -0
- package/dist/internal/result-output.js +33 -0
- package/dist/internal/run-client.d.ts +2 -2
- package/dist/internal/run-client.js +2 -2
- package/dist/internal/runtime-dispatch-runner.d.ts +1 -11
- package/dist/internal/runtime-dispatch-runner.d.ts.map +1 -1
- package/dist/internal/runtime-dispatch-runner.js +2 -15
- package/dist/internal/sdk-runner.d.ts +1 -1
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +6 -7
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +110 -35
- package/dist/internal/session-cost.d.ts +3 -3
- package/dist/internal/session-cost.d.ts.map +1 -1
- package/dist/internal/session-cost.js +3 -3
- package/dist/internal/session-engine.d.ts +48 -11
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +507 -115
- package/dist/internal/session-run-log.d.ts.map +1 -1
- package/dist/internal/session-run-log.js +1 -3
- package/dist/internal/skills-sync.d.ts +1 -4
- package/dist/internal/skills-sync.d.ts.map +1 -1
- package/dist/internal/skills-sync.js +10 -50
- package/dist/internal/sleep.d.ts +2 -0
- package/dist/internal/sleep.d.ts.map +1 -0
- package/dist/internal/sleep.js +3 -0
- package/dist/internal/store-mirror.d.ts +29 -0
- package/dist/internal/store-mirror.d.ts.map +1 -0
- package/dist/internal/store-mirror.js +70 -0
- package/dist/internal/tenant-slack/relay.d.ts +73 -0
- package/dist/internal/tenant-slack/relay.d.ts.map +1 -0
- package/dist/internal/tenant-slack/relay.js +138 -0
- package/dist/internal/testing/factory-resource-fixtures.d.ts +48 -0
- package/dist/internal/testing/factory-resource-fixtures.d.ts.map +1 -0
- package/dist/internal/testing/factory-resource-fixtures.js +41 -0
- package/dist/internal/testing/scm-continuation-fixtures.d.ts +33 -0
- package/dist/internal/testing/scm-continuation-fixtures.d.ts.map +1 -0
- package/dist/internal/testing/scm-continuation-fixtures.js +253 -0
- package/dist/internal/workspace-sync.d.ts +22 -0
- package/dist/internal/workspace-sync.d.ts.map +1 -0
- package/dist/internal/workspace-sync.js +49 -0
- package/dist/internal/workspace.d.ts +7 -0
- package/dist/internal/workspace.d.ts.map +1 -1
- package/dist/internal/workspace.js +13 -0
- package/dist/otel.d.ts +23 -1
- package/dist/otel.d.ts.map +1 -1
- package/dist/otel.js +93 -2
- package/dist/playground/assets/index-8YiozU89.js +67 -0
- package/dist/playground/assets/index-MbMxXg-y.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/result.d.ts +24 -0
- package/dist/result.d.ts.map +1 -0
- package/dist/result.js +27 -0
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +7 -4
- package/dist/storage-protocol.d.ts.map +1 -1
- package/dist/storage-protocol.js +1 -3
- package/dist/types.d.ts +141 -26
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +2 -2
- package/docs/concepts.md +2 -4
- package/docs/design/filesystem.md +376 -0
- package/docs/design/runtime-abstraction.md +2 -3
- package/docs/evals.md +9 -7
- package/docs/guides/cloud-agents.md +4 -6
- package/docs/guides/github.md +5 -1
- package/docs/guides/opentelemetry.md +41 -17
- package/docs/reference/agent-config.md +6 -10
- package/docs/reference/channels.md +38 -8
- package/docs/reference/cli.md +3 -4
- package/docs/reference/extensions.md +87 -23
- package/docs/reference/hooks.md +215 -46
- package/docs/reference/playground.md +3 -0
- package/docs/reference/project-layout.md +2 -1
- package/docs/reference/result.md +94 -0
- package/docs/reference/sessions.md +3 -1
- package/docs/reference/tools.md +1 -2
- package/docs/templates/pr-autofixer.md +0 -3
- package/package.json +42 -9
- package/skills/framework-map/SKILL.md +3 -1
- package/skills/otel/SKILL.md +8 -3
- package/src/ab.ts +1 -1
- package/src/bin/agent-serve.ts +121 -21
- package/src/channels/bitbucket/api.ts +623 -0
- package/src/channels/bitbucket/binding.ts +414 -0
- package/src/channels/bitbucket/bitbucket-channel.ts +182 -0
- package/src/channels/bitbucket/bitbucket-webhook.ts +576 -0
- package/src/channels/bitbucket/checks.ts +154 -0
- package/src/channels/bitbucket/cursor-account.ts +117 -0
- package/src/channels/bitbucket/defaults.ts +110 -0
- package/src/channels/bitbucket/events.ts +84 -0
- package/src/channels/bitbucket/index.ts +49 -0
- package/src/channels/bitbucket/replay.ts +439 -0
- package/src/channels/bitbucket/state.ts +59 -0
- package/src/channels/bitbucket/types.ts +266 -0
- package/src/channels/change-monitors/change-monitors-channel.ts +62 -0
- package/src/channels/change-monitors/index.ts +8 -0
- package/src/channels/change-monitors/types.ts +44 -0
- package/src/channels/deployments/deployments-channel.ts +25 -43
- package/src/channels/deployments/types.ts +12 -6
- package/src/channels/github/binding.ts +8 -1
- package/src/channels/github/cursor-account.ts +17 -6
- package/src/channels/github/defaults.ts +4 -0
- package/src/channels/github/events.ts +1 -1
- package/src/channels/github/forward.ts +3 -2
- package/src/channels/github/github-channel.ts +74 -221
- package/src/channels/github/progress.ts +76 -10
- package/src/channels/github/replay.ts +1 -1
- package/src/channels/github/state.ts +6 -0
- package/src/channels/github/types.ts +2 -5
- package/src/channels/gitlab/api.ts +228 -0
- package/src/channels/gitlab/binding.ts +233 -0
- package/src/channels/gitlab/checks.ts +243 -0
- package/src/channels/gitlab/cursor-account.ts +114 -0
- package/src/channels/gitlab/defaults.ts +93 -0
- package/src/channels/gitlab/events.ts +44 -0
- package/src/channels/gitlab/gitlab-channel.ts +176 -0
- package/src/channels/gitlab/gitlab-webhook.ts +555 -0
- package/src/channels/gitlab/index.ts +43 -0
- package/src/channels/gitlab/replay.ts +347 -0
- package/src/channels/gitlab/state.ts +55 -0
- package/src/channels/gitlab/types.ts +263 -0
- package/src/channels/issues/index.ts +9 -0
- package/src/channels/issues/issues-channel.ts +51 -0
- package/src/channels/issues/types.ts +41 -0
- package/src/channels/origin/api.ts +4 -2
- package/src/channels/origin/origin-channel.ts +19 -94
- package/src/channels/origin/types.ts +23 -2
- package/src/channels/slack/eval-directive.ts +1 -6
- package/src/channels/slack/init.ts +6 -3
- package/src/channels/slack/setup.ts +7 -6
- package/src/channels/slack/types.ts +1 -1
- package/src/channels.ts +0 -1
- package/src/client.ts +1 -1
- package/src/connections.ts +1 -1
- package/src/evals.ts +1 -1
- package/src/extensions.ts +47 -5
- package/src/files.ts +21 -3
- package/src/filesystem.ts +2074 -0
- package/src/index.ts +48 -28
- package/src/internal/ab-snapshot.ts +0 -3
- package/src/internal/advertise-tools.ts +1 -4
- package/src/internal/authored-alias-hooks.ts +4 -21
- package/src/internal/authored-loaders.ts +6 -23
- package/src/internal/channel-dispatch.ts +160 -0
- package/src/internal/chat-client.ts +1 -1
- package/src/internal/cli-ax.ts +5 -5
- package/src/internal/cli-bitbucket.ts +477 -0
- package/src/internal/cli-convert-automation.ts +7 -7
- package/src/internal/cli-cursor.ts +2 -5
- package/src/internal/cli-deploy.ts +2 -8
- package/src/internal/cli-github.ts +3 -3
- package/src/internal/cli-gitlab.ts +485 -0
- package/src/internal/cli-mcp.ts +2 -7
- package/src/internal/cli-slack.ts +2 -5
- package/src/internal/continuation-channel.ts +102 -4
- package/src/internal/continuation-identity.ts +338 -35
- package/src/internal/conversation-mirror.ts +4 -3
- package/src/internal/convert-automation/types.ts +1 -1
- package/src/internal/cursor/account-mcp.ts +1 -4
- package/src/internal/cursor/backend-client.ts +9 -10
- package/src/internal/cursor/bound-secret-file.ts +108 -0
- package/src/internal/cursor/credentials.ts +75 -10
- package/src/internal/cursor/hosted-bound-secrets.ts +75 -0
- package/src/internal/cursor/hosted-deployment-secrets.ts +42 -11
- package/src/internal/cursor/hosted-store-secrets.ts +1 -1
- package/src/internal/cursor-account-mcp-auth.ts +2 -5
- package/src/internal/cursor-deployment-relay.ts +11 -7
- package/src/internal/deploy-manifest.ts +4 -2
- package/src/internal/discovery/ab.ts +29 -9
- package/src/internal/discovery/agent.ts +181 -136
- package/src/internal/discovery/channels.ts +15 -13
- package/src/internal/discovery/connections.ts +55 -50
- package/src/internal/discovery/cursor-plugin.ts +1 -4
- package/src/internal/discovery/extension-overlay.ts +274 -0
- package/src/internal/discovery/extensions.ts +330 -105
- package/src/internal/discovery/hooks.ts +20 -2
- package/src/internal/discovery/info.ts +10 -0
- package/src/internal/discovery/modules.ts +8 -2
- package/src/internal/discovery/names.ts +2 -1
- package/src/internal/discovery/project.ts +80 -9
- package/src/internal/discovery/runtime.ts +1 -2
- package/src/internal/discovery/schedules.ts +28 -2
- package/src/internal/discovery/services.ts +37 -1
- package/src/internal/discovery/skills.ts +13 -3
- package/src/internal/discovery/subagent.ts +107 -0
- package/src/internal/discovery.ts +0 -2
- package/src/internal/distribution.ts +35 -83
- package/src/internal/docs-site.ts +1 -1
- package/src/internal/eval-run-store.ts +0 -7
- package/src/internal/eval-runner.ts +0 -1
- package/src/internal/factory-resource-channel.ts +122 -0
- package/src/internal/filesystem/errors.ts +220 -0
- package/src/internal/filesystem/format.ts +276 -0
- package/src/internal/filesystem/merge.ts +195 -0
- package/src/internal/filesystem/scratch.ts +255 -0
- package/src/internal/filesystem/sdk-schemas.ts +204 -0
- package/src/internal/filesystem/tools.ts +821 -0
- package/src/internal/filesystem/walk.ts +369 -0
- package/src/internal/framework-file-storage.ts +8 -8
- package/src/internal/github-fanout.ts +1 -1
- package/src/internal/guest-network.ts +389 -0
- package/src/internal/host-otel.ts +8 -4
- package/src/internal/hosted-admission-adapter.ts +8 -8
- package/src/internal/hosted-delivery-protocol.ts +26 -1
- package/src/internal/hosted-delivery.ts +393 -192
- package/src/internal/http-channel.ts +1 -4
- package/src/internal/init-interview.ts +1 -4
- package/src/internal/init-project.ts +2 -2
- package/src/internal/inline-stdio-define-stub.ts +1 -1
- package/src/internal/is-record.ts +3 -0
- package/src/internal/json-schema.ts +19 -10
- package/src/internal/local-control-plane.ts +5 -24
- package/src/internal/mcp-endpoint.ts +1 -4
- package/src/internal/otel/collector.ts +94 -159
- package/src/internal/otel/config.ts +10 -14
- package/src/internal/otel/http.ts +14 -1
- package/src/internal/otel/mcp.ts +3 -16
- package/src/internal/otel/runtime.ts +240 -25
- package/src/internal/package-inline-stdio.ts +3 -12
- package/src/internal/playground/toolchain.ts +1 -1
- package/src/internal/request-error-status.ts +72 -0
- package/src/internal/resolve-prod-target.ts +3 -8
- package/src/internal/result-output.ts +34 -0
- package/src/internal/run-client.ts +2 -2
- package/src/internal/runtime-dispatch-runner.ts +3 -21
- package/src/internal/sdk-runner.ts +7 -7
- package/src/internal/server.ts +153 -44
- package/src/internal/session-cost.ts +3 -3
- package/src/internal/session-engine.ts +621 -103
- package/src/internal/session-run-log.ts +1 -4
- package/src/internal/skills-sync.ts +13 -63
- package/src/internal/sleep.ts +3 -0
- package/src/internal/store-mirror.ts +86 -0
- package/src/internal/tenant-slack/relay.ts +179 -0
- package/src/internal/testing/factory-resource-fixtures.ts +85 -0
- package/src/internal/testing/scm-continuation-fixtures.ts +286 -0
- package/src/internal/workspace-sync.ts +55 -0
- package/src/internal/workspace.ts +14 -0
- package/src/otel.ts +143 -3
- package/src/result.ts +36 -0
- package/src/storage-backends/cursor-hosted.ts +7 -4
- package/src/storage-protocol.ts +1 -4
- package/src/types.ts +154 -37
- package/templates/triage/agent/lib/types.ts +0 -2
- package/dist/continuation.d.ts +0 -20
- package/dist/continuation.d.ts.map +0 -1
- package/dist/continuation.js +0 -18
- package/dist/docs/assets/chunks/@localSearchIndexroot.FAqdWIXo.js +0 -1
- package/dist/docs/assets/concepts.md.rPzW2HZN.js +0 -1
- package/dist/docs/assets/guides_cloud-agents.md.DumwWXba.js +0 -9
- package/dist/docs/assets/guides_cloud-runtime.md.BRirbRAN.js +0 -9
- package/dist/docs/assets/guides_cloud-runtime.md.BRirbRAN.lean.js +0 -1
- package/dist/docs/assets/reference_extensions.md.9WQMZe1l.lean.js +0 -1
- package/dist/docs/assets/reference_hooks.md.a8BJxMR5.js +0 -14
- package/dist/docs/assets/skills_framework-map.md.DDa4MeEW.js +0 -1
- package/dist/docs/guides/cloud-runtime.html +0 -35
- package/dist/docs/guides/cloud-runtime.md +0 -117
- package/dist/internal/convert-automation/index.d.ts +0 -3
- package/dist/internal/convert-automation/index.d.ts.map +0 -1
- package/dist/internal/convert-automation/index.js +0 -1
- package/dist/internal/grokbot/runner.d.ts +0 -64
- package/dist/internal/grokbot/runner.d.ts.map +0 -1
- package/dist/internal/grokbot/runner.js +0 -282
- package/dist/internal/managed-delivery.d.ts +0 -80
- package/dist/internal/managed-delivery.d.ts.map +0 -1
- package/dist/internal/managed-delivery.js +0 -86
- package/dist/internal/review-comments.d.ts +0 -370
- package/dist/internal/review-comments.d.ts.map +0 -1
- package/dist/internal/review-comments.js +0 -921
- package/dist/internal/shallow-clone.d.ts +0 -176
- package/dist/internal/shallow-clone.d.ts.map +0 -1
- package/dist/internal/shallow-clone.js +0 -419
- package/dist/playground/assets/index-B6C9S9nG.css +0 -1
- package/dist/playground/assets/index-ZqNoT8Ie.js +0 -69
- package/docs/guides/cloud-runtime.md +0 -122
- package/src/continuation.ts +0 -49
- package/src/internal/convert-automation/index.ts +0 -10
- package/src/internal/grokbot/runner.ts +0 -370
- package/src/internal/managed-delivery.ts +0 -125
- package/src/internal/review-comments.ts +0 -1363
- package/src/internal/shallow-clone.ts +0 -609
- /package/dist/docs/assets/{evals.md.CPzDAwoH.lean.js → evals.md.CbMoebP1.lean.js} +0 -0
- /package/dist/docs/assets/{guides_cloud-agents.md.DumwWXba.lean.js → guides_cloud-agents.md.DS8RIjwx.lean.js} +0 -0
- /package/dist/docs/assets/{index.md.Kiht7ell.lean.js → index.md.D75GWhPl.lean.js} +0 -0
- /package/dist/docs/assets/{reference_agent-config.md.BHeYMgme.lean.js → reference_agent-config.md.CHNpiyp4.lean.js} +0 -0
- /package/dist/docs/assets/{reference_cli.md.DfoeyvL0.lean.js → reference_cli.md.CJNc_xYK.lean.js} +0 -0
- /package/dist/docs/assets/{reference_playground.md.DnX5nL-B.lean.js → reference_playground.md.4myJPxrf.lean.js} +0 -0
- /package/dist/docs/assets/{reference_project-layout.md.CA6QP6Lw.lean.js → reference_project-layout.md.DuBu9a96.lean.js} +0 -0
- /package/dist/docs/assets/{reference_tools.md.B1up2r9W.lean.js → reference_tools.md.aGrn99hP.lean.js} +0 -0
- /package/dist/docs/assets/{skills_framework-map.md.DDa4MeEW.lean.js → skills_framework-map.md.haibFyoB.lean.js} +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Destroying a hosted v2 task-bind secret file after its value is in
|
|
3
|
+
* `process.env`.
|
|
4
|
+
*
|
|
5
|
+
* The bind files under `/run/cursor/secrets/` are an IPC channel, not a
|
|
6
|
+
* credential store: the control plane cannot set another process's
|
|
7
|
+
* environment, so it drops the value on tmpfs and July copies it into
|
|
8
|
+
* `process.env` before anything authored runs. Once that copy succeeds the
|
|
9
|
+
* on-disk value is pure liability — authored agent code runs in this pod and
|
|
10
|
+
* can read any world-readable path.
|
|
11
|
+
*
|
|
12
|
+
* Unlink is preferred. It is not always available: pod-daemon writes the
|
|
13
|
+
* files as root, and removing a directory entry needs write permission on
|
|
14
|
+
* `/run/cursor/secrets`, which is root-owned. Making that directory writable
|
|
15
|
+
* by the guest is not the fix — untrusted guest code could then plant a
|
|
16
|
+
* symlink that the next root-side bind write would follow. The binder instead
|
|
17
|
+
* relaxes the two secret files themselves so the guest can truncate them, and
|
|
18
|
+
* this module falls back to a zero-length overwrite. Both readers treat an
|
|
19
|
+
* empty bind file as unsigned.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import {
|
|
23
|
+
closeSync,
|
|
24
|
+
fsyncSync,
|
|
25
|
+
ftruncateSync,
|
|
26
|
+
openSync,
|
|
27
|
+
readFileSync,
|
|
28
|
+
unlinkSync,
|
|
29
|
+
} from "node:fs";
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* What happened to a bind file. Only `readable` is a failure: the secret
|
|
33
|
+
* survived the consume and callers must not run authored code.
|
|
34
|
+
*/
|
|
35
|
+
export type BoundSecretFileDisposal =
|
|
36
|
+
/** Nothing recoverable was there — missing, empty, or unreadable already. */
|
|
37
|
+
| { state: "absent" }
|
|
38
|
+
/** Directory entry removed. */
|
|
39
|
+
| { state: "unlinked" }
|
|
40
|
+
/** Truncated to zero length and fsynced; an empty file remains. */
|
|
41
|
+
| { state: "wiped" }
|
|
42
|
+
/** Still recoverable by a later `readFile`. */
|
|
43
|
+
| { state: "readable"; reason: string };
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Whether a later `readFile` of this path could still recover a secret.
|
|
47
|
+
* A read failure counts as unrecoverable: this process just read the file
|
|
48
|
+
* during hydrate, so losing access to it means the content is gone.
|
|
49
|
+
*/
|
|
50
|
+
export function boundSecretFileIsReadable(path: string): boolean {
|
|
51
|
+
try {
|
|
52
|
+
return readFileSync(path, "utf8").trim() !== "";
|
|
53
|
+
} catch {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function errorReason(error: unknown): string {
|
|
59
|
+
const code = (error as { code?: unknown } | undefined)?.code;
|
|
60
|
+
return typeof code === "string" ? code : "unknown";
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Remove a bind file's contents from disk, preferring unlink over an empty
|
|
65
|
+
* leftover. Callers must have already copied the value into `process.env`:
|
|
66
|
+
* this is destructive and there is no second bind until the control plane
|
|
67
|
+
* rewrites the file before the next hosted request.
|
|
68
|
+
*/
|
|
69
|
+
export function destroyBoundSecretFile(path: string): BoundSecretFileDisposal {
|
|
70
|
+
if (!boundSecretFileIsReadable(path)) {
|
|
71
|
+
// Nothing recoverable, so nothing to fail over. Still try to clear the
|
|
72
|
+
// empty leftover: whether that succeeds does not change the disposal,
|
|
73
|
+
// because there is no secret here either way.
|
|
74
|
+
try {
|
|
75
|
+
unlinkSync(path);
|
|
76
|
+
} catch {
|
|
77
|
+
// Already gone, or a directory the guest cannot write. Both are fine.
|
|
78
|
+
}
|
|
79
|
+
return { state: "absent" };
|
|
80
|
+
}
|
|
81
|
+
let unlinkReason: string | undefined;
|
|
82
|
+
try {
|
|
83
|
+
unlinkSync(path);
|
|
84
|
+
if (!boundSecretFileIsReadable(path)) {
|
|
85
|
+
return { state: "unlinked" };
|
|
86
|
+
}
|
|
87
|
+
unlinkReason = "recreated";
|
|
88
|
+
} catch (error) {
|
|
89
|
+
unlinkReason = errorReason(error);
|
|
90
|
+
}
|
|
91
|
+
try {
|
|
92
|
+
const fd = openSync(path, "r+");
|
|
93
|
+
try {
|
|
94
|
+
ftruncateSync(fd, 0);
|
|
95
|
+
fsyncSync(fd);
|
|
96
|
+
} finally {
|
|
97
|
+
closeSync(fd);
|
|
98
|
+
}
|
|
99
|
+
} catch (error) {
|
|
100
|
+
return {
|
|
101
|
+
state: "readable",
|
|
102
|
+
reason: `unlink ${unlinkReason}, truncate ${errorReason(error)}`,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
return boundSecretFileIsReadable(path)
|
|
106
|
+
? { state: "readable", reason: `unlink ${unlinkReason}, truncate no-op` }
|
|
107
|
+
: { state: "wiped" };
|
|
108
|
+
}
|
|
@@ -4,13 +4,16 @@
|
|
|
4
4
|
* Exactly one kind of secret exists at runtime: a **personal Cursor user API
|
|
5
5
|
* key**. Two ways to obtain it, one code path after that:
|
|
6
6
|
*
|
|
7
|
-
* - `agent-
|
|
7
|
+
* - `agent-sdk login` runs the same PKCE browser flow as `cursor-agent`
|
|
8
8
|
* and Sand, then uses the short-lived session once to mint a named,
|
|
9
9
|
* dashboard-revocable user API key — only the key is stored.
|
|
10
10
|
* - `CURSOR_API_KEY` (or `serve({ apiKey })`) wins over the stored key, so
|
|
11
11
|
* CI and hosted deployments stay env-driven.
|
|
12
12
|
* - `CURSOR_API_KEY_FILE` (or the hosted default path) is next: freeze bind
|
|
13
|
-
* drops the key at task time without restarting July.
|
|
13
|
+
* drops the key at task time without restarting July. On the hosted path
|
|
14
|
+
* that file is consumed into `CURSOR_API_KEY` and destroyed before
|
|
15
|
+
* anything authored runs, so this fallback is there for local,
|
|
16
|
+
* self-hosted, and the unsigned window before the first bind.
|
|
14
17
|
* - Stored `july login` is last. Same order for hosted and self-hosted:
|
|
15
18
|
* option → env → file → login.
|
|
16
19
|
*
|
|
@@ -26,6 +29,10 @@ import { homedir } from "node:os";
|
|
|
26
29
|
import { dirname, join } from "node:path";
|
|
27
30
|
import { z } from "zod";
|
|
28
31
|
import { CLI_COMMAND_NAME } from "../distribution.js";
|
|
32
|
+
import {
|
|
33
|
+
type BoundSecretFileDisposal,
|
|
34
|
+
destroyBoundSecretFile,
|
|
35
|
+
} from "./bound-secret-file.js";
|
|
29
36
|
|
|
30
37
|
export const DEFAULT_CURSOR_BACKEND_URL = "https://api2.cursor.sh";
|
|
31
38
|
export const DEFAULT_CURSOR_EXTERNAL_API_URL = "https://api.cursor.com";
|
|
@@ -182,9 +189,11 @@ export interface ResolvedApiKey {
|
|
|
182
189
|
|
|
183
190
|
/**
|
|
184
191
|
* Hosted task-bind path. Not a secret: the snapshot may name this path.
|
|
185
|
-
* The binder writes the key here after restore
|
|
186
|
-
*
|
|
187
|
-
*
|
|
192
|
+
* The binder writes the key here after restore, and hosted admission /
|
|
193
|
+
* execution consume it into `process.env.CURSOR_API_KEY` and destroy the
|
|
194
|
+
* file before authored work — this is an IPC handoff, not a credential
|
|
195
|
+
* source July keeps reading. Override with `CURSOR_API_KEY_FILE`. A missing
|
|
196
|
+
* file is unsigned — self-hosted then uses `CURSOR_API_KEY` or stored login.
|
|
188
197
|
*/
|
|
189
198
|
export const DEFAULT_CURSOR_API_KEY_FILE: string =
|
|
190
199
|
"/run/cursor/secrets/CURSOR_API_KEY";
|
|
@@ -195,12 +204,18 @@ export const DEFAULT_CURSOR_API_KEY_FILE: string =
|
|
|
195
204
|
* listens before the binder drops the key; self-hosted falls through to
|
|
196
205
|
* env or login.
|
|
197
206
|
*/
|
|
207
|
+
export function resolveCursorApiKeyFilePath(
|
|
208
|
+
filePath?: string,
|
|
209
|
+
env: NodeJS.ProcessEnv = process.env
|
|
210
|
+
): string {
|
|
211
|
+
const configured = filePath ?? env.CURSOR_API_KEY_FILE;
|
|
212
|
+
return configured !== undefined && configured.trim() !== ""
|
|
213
|
+
? configured.trim()
|
|
214
|
+
: DEFAULT_CURSOR_API_KEY_FILE;
|
|
215
|
+
}
|
|
216
|
+
|
|
198
217
|
export function readApiKeyFromFile(filePath?: string): string | undefined {
|
|
199
|
-
const
|
|
200
|
-
const path =
|
|
201
|
-
configured !== undefined && configured.trim() !== ""
|
|
202
|
-
? configured.trim()
|
|
203
|
-
: DEFAULT_CURSOR_API_KEY_FILE;
|
|
218
|
+
const path = resolveCursorApiKeyFilePath(filePath);
|
|
204
219
|
try {
|
|
205
220
|
const raw = readFileSync(path, "utf8").trim();
|
|
206
221
|
return raw === "" ? undefined : raw;
|
|
@@ -209,6 +224,56 @@ export function readApiKeyFromFile(filePath?: string): string | undefined {
|
|
|
209
224
|
}
|
|
210
225
|
}
|
|
211
226
|
|
|
227
|
+
export type BoundCursorApiKeyConsumeResult = {
|
|
228
|
+
/** The file supplied `CURSOR_API_KEY` on this call. */
|
|
229
|
+
applied: boolean;
|
|
230
|
+
disposal: BoundSecretFileDisposal;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Copy the task-bind key file into `process.env.CURSOR_API_KEY`, then destroy
|
|
235
|
+
* the file.
|
|
236
|
+
*
|
|
237
|
+
* Hosted v2 cannot set another process's environment from the binder, so it
|
|
238
|
+
* drops a tmpfs file. Teaching every reader to open that file misses authored
|
|
239
|
+
* `process.env.CURSOR_API_KEY` and leaves a secret on disk. Hosted admission /
|
|
240
|
+
* execution call this once per request, next to the deployment-secrets
|
|
241
|
+
* consume: after it returns, env-only readers work and the key is no longer
|
|
242
|
+
* recoverable from disk. The control plane re-binds before the next request.
|
|
243
|
+
*
|
|
244
|
+
* The env write always happens before the destroy, never the other way round.
|
|
245
|
+
* An already-set `CURSOR_API_KEY` is not overwritten, but the file is still
|
|
246
|
+
* destroyed — env is the source, the file is only the handoff.
|
|
247
|
+
*
|
|
248
|
+
* A `readable` disposal means the secret survived; callers on the hosted path
|
|
249
|
+
* must fail the request rather than run authored code.
|
|
250
|
+
*/
|
|
251
|
+
export function consumeBoundCursorApiKey(options?: {
|
|
252
|
+
filePath?: string;
|
|
253
|
+
env?: NodeJS.ProcessEnv;
|
|
254
|
+
}): BoundCursorApiKeyConsumeResult {
|
|
255
|
+
const env = options?.env ?? process.env;
|
|
256
|
+
const path = resolveCursorApiKeyFilePath(options?.filePath, env);
|
|
257
|
+
const envKeyAlreadySet =
|
|
258
|
+
env.CURSOR_API_KEY !== undefined && env.CURSOR_API_KEY.trim() !== "";
|
|
259
|
+
let raw = "";
|
|
260
|
+
try {
|
|
261
|
+
raw = readFileSync(path, "utf8").trim();
|
|
262
|
+
} catch {
|
|
263
|
+
return { applied: false, disposal: { state: "absent" } };
|
|
264
|
+
}
|
|
265
|
+
if (raw === "") {
|
|
266
|
+
return { applied: false, disposal: destroyBoundSecretFile(path) };
|
|
267
|
+
}
|
|
268
|
+
if (!envKeyAlreadySet) {
|
|
269
|
+
env.CURSOR_API_KEY = raw;
|
|
270
|
+
}
|
|
271
|
+
return {
|
|
272
|
+
applied: !envKeyAlreadySet,
|
|
273
|
+
disposal: destroyBoundSecretFile(path),
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
|
|
212
277
|
/**
|
|
213
278
|
* First present source wins. We define the order; operators do not.
|
|
214
279
|
* `--api-key` / `serve({ apiKey })` → `CURSOR_API_KEY` → `CURSOR_API_KEY_FILE`
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The hosted v2 per-request secret handoff: bind files in, `process.env` out,
|
|
3
|
+
* nothing recoverable left on disk.
|
|
4
|
+
*
|
|
5
|
+
* The control plane rewrites `/run/cursor/secrets/` before every hosted
|
|
6
|
+
* admission and execution because it cannot set the already-running July
|
|
7
|
+
* process's environment. This module closes that handoff at the top of each
|
|
8
|
+
* request: copy both documents into `process.env`, then destroy them. Hosted
|
|
9
|
+
* request code and authored agents read env from there on — nothing on the
|
|
10
|
+
* hosted path should open these paths again.
|
|
11
|
+
*
|
|
12
|
+
* It fails closed. A secret that survives the consume would sit world-readable
|
|
13
|
+
* next to authored agent code for the length of a turn, so the caller returns
|
|
14
|
+
* a retryable error instead of dispatching. The next request re-binds and
|
|
15
|
+
* consumes again.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import {
|
|
19
|
+
consumeBoundCursorApiKey,
|
|
20
|
+
DEFAULT_CURSOR_API_KEY_FILE,
|
|
21
|
+
} from "./credentials.js";
|
|
22
|
+
import {
|
|
23
|
+
consumeBoundDeploymentSecrets,
|
|
24
|
+
DEFAULT_AGENT_SERVE_DEPLOYMENT_SECRETS_FILE,
|
|
25
|
+
} from "./hosted-deployment-secrets.js";
|
|
26
|
+
|
|
27
|
+
/** Wire error code for a bind file that outlived its consume. */
|
|
28
|
+
export const BOUND_SECRETS_NOT_CONSUMED = "bound_secrets_not_consumed";
|
|
29
|
+
|
|
30
|
+
export type HostedBoundSecretsResult =
|
|
31
|
+
| { ok: true }
|
|
32
|
+
| { ok: false; code: typeof BOUND_SECRETS_NOT_CONSUMED; message: string };
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Hydrate `process.env` from both bind files and remove them from disk.
|
|
36
|
+
* Returns a failure when either secret is still readable afterwards.
|
|
37
|
+
*
|
|
38
|
+
* Both paths are platform constants, deliberately not the `CURSOR_API_KEY_FILE`
|
|
39
|
+
* override that {@link resolveApiKeySync} honors. That override is a read
|
|
40
|
+
* chain; this is a destructive consume. Following it here would let authored
|
|
41
|
+
* code redirect the destroy at a decoy path — reporting success while the real
|
|
42
|
+
* bind file stays live — and would delete an operator's own long-lived key
|
|
43
|
+
* file on a surface that points the variable at one.
|
|
44
|
+
*/
|
|
45
|
+
export function consumeHostedBoundSecrets(options?: {
|
|
46
|
+
apiKeyFilePath?: string;
|
|
47
|
+
deploymentSecretsFilePath?: string;
|
|
48
|
+
}): HostedBoundSecretsResult {
|
|
49
|
+
const survivors: string[] = [];
|
|
50
|
+
|
|
51
|
+
const secretsPath =
|
|
52
|
+
options?.deploymentSecretsFilePath ??
|
|
53
|
+
DEFAULT_AGENT_SERVE_DEPLOYMENT_SECRETS_FILE;
|
|
54
|
+
const secrets = consumeBoundDeploymentSecrets(secretsPath);
|
|
55
|
+
if (secrets.disposal.state === "readable") {
|
|
56
|
+
survivors.push(`${secretsPath} (${secrets.disposal.reason})`);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const apiKeyPath = options?.apiKeyFilePath ?? DEFAULT_CURSOR_API_KEY_FILE;
|
|
60
|
+
const apiKey = consumeBoundCursorApiKey({ filePath: apiKeyPath });
|
|
61
|
+
if (apiKey.disposal.state === "readable") {
|
|
62
|
+
survivors.push(`${apiKeyPath} (${apiKey.disposal.reason})`);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (survivors.length === 0) {
|
|
66
|
+
return { ok: true };
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
ok: false,
|
|
70
|
+
code: BOUND_SECRETS_NOT_CONSUMED,
|
|
71
|
+
message:
|
|
72
|
+
`Task-bind secrets are still readable after being hydrated into the ` +
|
|
73
|
+
`environment, so authored work did not run: ${survivors.join(", ")}.`,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
@@ -4,11 +4,18 @@
|
|
|
4
4
|
* The deployment host rewrites this tmpfs document before each admission and
|
|
5
5
|
* execution request. July reloads it synchronously because the process was
|
|
6
6
|
* already running in the frozen snapshot when the task-specific values
|
|
7
|
-
* arrived.
|
|
7
|
+
* arrived, then destroys the document: `process.env` is the source authored
|
|
8
|
+
* code reads, and the file is only how the value crossed the process
|
|
9
|
+
* boundary.
|
|
8
10
|
*/
|
|
9
11
|
|
|
10
12
|
import { readFileSync } from "node:fs";
|
|
11
13
|
|
|
14
|
+
import {
|
|
15
|
+
type BoundSecretFileDisposal,
|
|
16
|
+
destroyBoundSecretFile,
|
|
17
|
+
} from "./bound-secret-file.js";
|
|
18
|
+
|
|
12
19
|
export const DEFAULT_AGENT_SERVE_DEPLOYMENT_SECRETS_FILE =
|
|
13
20
|
"/run/cursor/secrets/AGENT_SERVE_DEPLOYMENT_SECRETS.json";
|
|
14
21
|
|
|
@@ -48,17 +55,11 @@ function parseBoundSecrets(path: string): Record<string, string> | undefined {
|
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
58
|
+
* Apply the latest bound document to `process.env`. An empty valid document
|
|
59
|
+
* removes values loaded by an earlier bind after the deployment secret was
|
|
60
|
+
* unset, which is why the applied names are tracked across calls.
|
|
54
61
|
*/
|
|
55
|
-
|
|
56
|
-
path: string = DEFAULT_AGENT_SERVE_DEPLOYMENT_SECRETS_FILE
|
|
57
|
-
): void {
|
|
58
|
-
const secrets = parseBoundSecrets(path);
|
|
59
|
-
if (secrets === undefined) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
+
function applyBoundSecrets(secrets: Record<string, string>): void {
|
|
62
63
|
for (const name of appliedSecretNames) {
|
|
63
64
|
if (!(name in secrets)) {
|
|
64
65
|
delete process.env[name];
|
|
@@ -70,3 +71,33 @@ export function refreshBoundDeploymentSecrets(
|
|
|
70
71
|
appliedSecretNames.add(name);
|
|
71
72
|
}
|
|
72
73
|
}
|
|
74
|
+
|
|
75
|
+
export type BoundDeploymentSecretsConsumeResult = {
|
|
76
|
+
/** The document supplied values on this call. */
|
|
77
|
+
applied: boolean;
|
|
78
|
+
disposal: BoundSecretFileDisposal;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Apply the bound document to `process.env`, then destroy it.
|
|
83
|
+
*
|
|
84
|
+
* The env refresh always runs first, so a failed destroy never costs the
|
|
85
|
+
* request its secrets. A malformed document is destroyed too: it carries no
|
|
86
|
+
* values this process can use, and leaving it on disk only leaves whatever
|
|
87
|
+
* the control plane did manage to write.
|
|
88
|
+
*
|
|
89
|
+
* A `readable` disposal means the document survived; hosted callers must fail
|
|
90
|
+
* the request rather than run authored code next to a live secrets file.
|
|
91
|
+
*/
|
|
92
|
+
export function consumeBoundDeploymentSecrets(
|
|
93
|
+
path: string = DEFAULT_AGENT_SERVE_DEPLOYMENT_SECRETS_FILE
|
|
94
|
+
): BoundDeploymentSecretsConsumeResult {
|
|
95
|
+
const secrets = parseBoundSecrets(path);
|
|
96
|
+
if (secrets !== undefined) {
|
|
97
|
+
applyBoundSecrets(secrets);
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
applied: secrets !== undefined,
|
|
101
|
+
disposal: destroyBoundSecretFile(path),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Task-time bind paths for hosted deployment file-store source ids.
|
|
3
3
|
*
|
|
4
|
-
* Freeze v2 snapshots start `agent-
|
|
4
|
+
* Freeze v2 snapshots start `agent-sdk serve` at bake time without a service
|
|
5
5
|
* account, so neither store id is in process env. Execute-from-freeze binds
|
|
6
6
|
* the deployment credential and store ids into `/run/cursor/secrets/` without
|
|
7
7
|
* restarting July — the same pattern as {@link DEFAULT_CURSOR_API_KEY_FILE}.
|
|
@@ -20,6 +20,7 @@ import type {
|
|
|
20
20
|
} from "./cursor/backend-client.js";
|
|
21
21
|
import { LOG_PREFIX } from "./distribution.js";
|
|
22
22
|
import { openBrowser } from "./mcp-oauth.js";
|
|
23
|
+
import { sleep as defaultSleep } from "./sleep.js";
|
|
23
24
|
|
|
24
25
|
const DEFAULT_POLL_INTERVAL_MS = 3_000;
|
|
25
26
|
const DEFAULT_POLL_TIMEOUT_MS = 5 * 60 * 1000;
|
|
@@ -66,10 +67,6 @@ export interface AuthorizeCursorAccountConnectorsResult {
|
|
|
66
67
|
errored: Array<{ name: string; error: string }>;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
|
-
function sleepMs(ms: number): Promise<void> {
|
|
70
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
71
|
-
}
|
|
72
|
-
|
|
73
70
|
/**
|
|
74
71
|
* Authorize the deployment service account for the connection's connectors.
|
|
75
72
|
* Already-authorized connectors are skipped; the rest get a browser OAuth
|
|
@@ -81,7 +78,7 @@ export async function authorizeCursorAccountConnectors(
|
|
|
81
78
|
const { backendClient, teamId, serviceAccountId, connectionName, out, err } =
|
|
82
79
|
args;
|
|
83
80
|
const open = args.openBrowserImpl ?? openBrowser;
|
|
84
|
-
const sleep = args.sleep ??
|
|
81
|
+
const sleep = args.sleep ?? defaultSleep;
|
|
85
82
|
const pollIntervalMs = args.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;
|
|
86
83
|
const pollTimeoutMs = args.pollTimeoutMs ?? DEFAULT_POLL_TIMEOUT_MS;
|
|
87
84
|
const redirectUri = mcpOauthRedirectUri();
|
|
@@ -60,14 +60,18 @@ export function currentDeploymentSubscriptions(
|
|
|
60
60
|
return typeof subscriptions === "function" ? subscriptions() : subscriptions;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* Normalize the channel's `deploySourceUris` option into concrete
|
|
65
|
+
* subscriptions. An omitted or empty option resolves to none, which callers
|
|
66
|
+
* read as "defer to the deploy scope".
|
|
67
|
+
*/
|
|
64
68
|
export function resolveDeploymentSubscriptions(options: {
|
|
65
|
-
deploySourceUris
|
|
69
|
+
deploySourceUris?: readonly (string | DeploymentSubscription)[];
|
|
66
70
|
environments?: readonly string[];
|
|
67
71
|
events?: readonly DeploymentEventType[];
|
|
68
72
|
}): ResolvedSubscription[] {
|
|
69
73
|
const bySource = new Map<string, ResolvedSubscription>();
|
|
70
|
-
for (const entry of options.deploySourceUris) {
|
|
74
|
+
for (const entry of options.deploySourceUris ?? []) {
|
|
71
75
|
const subscription: DeploymentSubscription =
|
|
72
76
|
typeof entry === "string" ? { deploySourceUri: entry } : entry;
|
|
73
77
|
// Case-folded only: `Deployment.deploy_source_uri` has no documented
|
|
@@ -106,10 +110,10 @@ export function resolveDeploymentSubscriptions(options: {
|
|
|
106
110
|
? []
|
|
107
111
|
: [...new Set([...existing.environments, ...environments])];
|
|
108
112
|
}
|
|
109
|
-
// Empty
|
|
110
|
-
//
|
|
111
|
-
// heartbeat, so a channel that later
|
|
112
|
-
//
|
|
113
|
+
// Empty means "this channel names nothing". The relay wire reads that as
|
|
114
|
+
// deregistration, hosted admission reads it as "defer to the deploy
|
|
115
|
+
// scope". The host re-resolves on each heartbeat, so a channel that later
|
|
116
|
+
// fills `deploySourceUris` registers without a restart.
|
|
113
117
|
return [...bySource.values()];
|
|
114
118
|
}
|
|
115
119
|
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
|
|
32
32
|
import { z } from "zod";
|
|
33
33
|
import { isPublicEndpointPolicy } from "../channels.js";
|
|
34
|
-
import type { ContinuationIdentity } from "../continuation.js";
|
|
35
34
|
import { isCursorHostedStorage } from "../storage-backends/cursor-hosted.js";
|
|
36
35
|
import type { AgentProject, AgentProjectInfo } from "../types.js";
|
|
37
36
|
import {
|
|
@@ -40,7 +39,10 @@ import {
|
|
|
40
39
|
channelDeclaredEventTypes,
|
|
41
40
|
handshakeChannelContinuation,
|
|
42
41
|
} from "./continuation-channel.js";
|
|
43
|
-
import {
|
|
42
|
+
import {
|
|
43
|
+
CONTINUATION_SELECTORS,
|
|
44
|
+
type ContinuationIdentity,
|
|
45
|
+
} from "./continuation-identity.js";
|
|
44
46
|
import {
|
|
45
47
|
projectInfo,
|
|
46
48
|
runtimeArchitectureCompatibilityError,
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { basename, extname, join, relative } from "node:path";
|
|
6
6
|
import type { ABConfigFile } from "../../ab.js";
|
|
7
7
|
import type { DiscoveredAB } from "../../types.js";
|
|
8
|
+
import { getDefinitionKind } from "../brand.js";
|
|
8
9
|
import { type DiscoveryContext, displayPath } from "./context.js";
|
|
9
10
|
import {
|
|
10
11
|
findModuleFile,
|
|
@@ -17,21 +18,31 @@ import { importDefault } from "./modules.js";
|
|
|
17
18
|
|
|
18
19
|
export async function loadABs(
|
|
19
20
|
ctx: DiscoveryContext,
|
|
20
|
-
agentDir: string
|
|
21
|
+
agentDir: string,
|
|
22
|
+
onDisable?: (source: string, path: string) => void
|
|
21
23
|
): Promise<DiscoveredAB[]> {
|
|
22
24
|
const abs: DiscoveredAB[] = [];
|
|
23
25
|
const seen = new Set<string>();
|
|
24
26
|
|
|
25
27
|
const single = await findModuleFile(agentDir, "ab");
|
|
26
28
|
if (single !== undefined) {
|
|
27
|
-
const definition = await importDefault(
|
|
29
|
+
const definition = await importDefault(
|
|
30
|
+
ctx,
|
|
31
|
+
single,
|
|
32
|
+
onDisable === undefined ? "ab" : ["ab", "disabled"]
|
|
33
|
+
);
|
|
28
34
|
if (definition !== undefined) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
name,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
if (getDefinitionKind(definition) === "disabled") {
|
|
36
|
+
onDisable?.("ab", single);
|
|
37
|
+
} else {
|
|
38
|
+
const name = resolveABName(definition, "ab");
|
|
39
|
+
seen.add(name);
|
|
40
|
+
abs.push({
|
|
41
|
+
name,
|
|
42
|
+
source: "ab",
|
|
43
|
+
definition: definition as DiscoveredAB["definition"],
|
|
44
|
+
});
|
|
45
|
+
}
|
|
35
46
|
}
|
|
36
47
|
}
|
|
37
48
|
|
|
@@ -43,10 +54,18 @@ export async function loadABs(
|
|
|
43
54
|
}
|
|
44
55
|
const rel = toPosix(relative(absDir, filePath));
|
|
45
56
|
const stem = rel.slice(0, -extname(rel).length);
|
|
46
|
-
const definition = await importDefault(
|
|
57
|
+
const definition = await importDefault(
|
|
58
|
+
ctx,
|
|
59
|
+
filePath,
|
|
60
|
+
onDisable === undefined ? "ab" : ["ab", "disabled"]
|
|
61
|
+
);
|
|
47
62
|
if (definition === undefined) {
|
|
48
63
|
continue;
|
|
49
64
|
}
|
|
65
|
+
if (getDefinitionKind(definition) === "disabled") {
|
|
66
|
+
onDisable?.(stem, filePath);
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
50
69
|
const name = resolveABName(definition, stem);
|
|
51
70
|
if (seen.has(name)) {
|
|
52
71
|
ctx.diagnostics.push({
|
|
@@ -59,6 +78,7 @@ export async function loadABs(
|
|
|
59
78
|
seen.add(name);
|
|
60
79
|
abs.push({
|
|
61
80
|
name,
|
|
81
|
+
source: stem,
|
|
62
82
|
definition: definition as DiscoveredAB["definition"],
|
|
63
83
|
});
|
|
64
84
|
}
|