@cursor/july 0.1.102 → 0.1.103
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/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/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/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/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.DW9pXkpL.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.nrl1ifBq.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.ifxv-cJV.js → VPLocalSearchBox.CdEIUwDg.js} +1 -1
- package/dist/docs/assets/chunks/{theme.DWCwM6p-.js → theme.YZMHgPgg.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.DKYiT9do.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.Dz8Cnudp.js} +2 -2
- package/dist/docs/assets/{reference_channels.md.Cd2f2iyV.lean.js → reference_channels.md.Dz8Cnudp.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/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 +0 -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 +501 -262
- package/dist/docs/llms.txt +2 -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 +18 -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/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -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 +14 -0
- package/dist/internal/continuation-channel.d.ts.map +1 -1
- package/dist/internal/continuation-channel.js +56 -3
- package/dist/internal/continuation-identity.d.ts +14 -15
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +182 -7
- 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 +65 -116
- 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 +7 -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/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 +101 -0
- package/dist/internal/guest-network.d.ts.map +1 -0
- package/dist/internal/guest-network.js +304 -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 +248 -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.map +1 -1
- package/dist/internal/sdk-runner.js +3 -6
- 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 +26 -11
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +146 -76
- 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/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-59KvgREd.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 +90 -23
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +2 -2
- package/docs/concepts.md +2 -4
- 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 +0 -1
- package/docs/guides/opentelemetry.md +41 -17
- package/docs/reference/agent-config.md +6 -10
- package/docs/reference/channels.md +18 -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 +29 -10
- 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/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/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/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/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/index.ts +20 -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 +82 -1
- package/src/internal/continuation-identity.ts +229 -11
- 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 +94 -135
- 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 +7 -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/framework-file-storage.ts +8 -8
- package/src/internal/github-fanout.ts +1 -1
- package/src/internal/guest-network.ts +383 -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 +376 -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 +3 -7
- package/src/internal/server.ts +153 -44
- package/src/internal/session-cost.ts +3 -3
- package/src/internal/session-engine.ts +182 -74
- 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/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 +105 -34
- 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/{guides_github.md.BtPr9GaP.lean.js → guides_github.md.DKYiT9do.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
|
@@ -6,11 +6,17 @@ import {
|
|
|
6
6
|
loopbackOnly,
|
|
7
7
|
POST,
|
|
8
8
|
} from "../../channels.js";
|
|
9
|
+
import {
|
|
10
|
+
acknowledgeTask,
|
|
11
|
+
isTaskDispatch,
|
|
12
|
+
skipped,
|
|
13
|
+
turnStarted,
|
|
14
|
+
withPropagatingBackgroundErrors,
|
|
15
|
+
} from "../../internal/channel-dispatch.js";
|
|
9
16
|
import {
|
|
10
17
|
continuationSource,
|
|
11
18
|
normalizeIdentity,
|
|
12
19
|
} from "../../internal/continuation-identity.js";
|
|
13
|
-
import { isDeferredChannelSession } from "../../internal/deferred-channel-session.js";
|
|
14
20
|
import { isDevMode } from "../../internal/dev-mode.js";
|
|
15
21
|
import { attachHostedAdmissionAdapter } from "../../internal/hosted-admission-adapter.js";
|
|
16
22
|
import { bindLocalIngressSend } from "../../internal/local-ingress.js";
|
|
@@ -49,7 +55,6 @@ import type {
|
|
|
49
55
|
OriginPullRequestEvent,
|
|
50
56
|
OriginRepositoryRef,
|
|
51
57
|
OriginReview,
|
|
52
|
-
OriginTaskDispatch,
|
|
53
58
|
OriginTurnDispatch,
|
|
54
59
|
OriginWebhookEnvelope,
|
|
55
60
|
} from "./types.js";
|
|
@@ -425,12 +430,6 @@ export function defaultOriginPullRequestDispatch(
|
|
|
425
430
|
return { auth: defaultOriginAuth(ctx) };
|
|
426
431
|
}
|
|
427
432
|
|
|
428
|
-
function isTaskDispatch(
|
|
429
|
-
dispatch: OriginDispatch
|
|
430
|
-
): dispatch is OriginTaskDispatch {
|
|
431
|
-
return "task" in dispatch;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
433
|
function enrichEventContext(input: {
|
|
435
434
|
ctx: Omit<OriginEventContext, "host" | "artifacts" | "origin">;
|
|
436
435
|
args: ChannelHandlerArgs;
|
|
@@ -452,60 +451,6 @@ function enrichEventContext(input: {
|
|
|
452
451
|
};
|
|
453
452
|
}
|
|
454
453
|
|
|
455
|
-
export type OriginDispatchOutcome = "skip" | "send" | "task";
|
|
456
|
-
|
|
457
|
-
const dispatchOutcomeByResponse = new WeakMap<
|
|
458
|
-
Response,
|
|
459
|
-
OriginDispatchOutcome
|
|
460
|
-
>();
|
|
461
|
-
|
|
462
|
-
function withDispatchOutcome(
|
|
463
|
-
response: Response,
|
|
464
|
-
outcome: OriginDispatchOutcome
|
|
465
|
-
): Response {
|
|
466
|
-
dispatchOutcomeByResponse.set(response, outcome);
|
|
467
|
-
return response;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
export function getOriginDispatchOutcome(
|
|
471
|
-
response: Response
|
|
472
|
-
): OriginDispatchOutcome | undefined {
|
|
473
|
-
return dispatchOutcomeByResponse.get(response);
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
function skipped(
|
|
477
|
-
reason: string,
|
|
478
|
-
extra: Record<string, unknown> = {}
|
|
479
|
-
): Response {
|
|
480
|
-
return withDispatchOutcome(
|
|
481
|
-
Response.json({ ok: true, skipped: true, reason, ...extra }),
|
|
482
|
-
"skip"
|
|
483
|
-
);
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
function acknowledgeTask(
|
|
487
|
-
args: ChannelHandlerArgs,
|
|
488
|
-
dispatch: OriginTaskDispatch,
|
|
489
|
-
extra: Record<string, unknown>
|
|
490
|
-
): Response {
|
|
491
|
-
args.waitUntil(
|
|
492
|
-
new Promise<void>((resolve, reject) => {
|
|
493
|
-
setImmediate(() => {
|
|
494
|
-
Promise.resolve()
|
|
495
|
-
.then(dispatch.task)
|
|
496
|
-
.then(() => resolve(), reject);
|
|
497
|
-
});
|
|
498
|
-
})
|
|
499
|
-
);
|
|
500
|
-
return withDispatchOutcome(
|
|
501
|
-
Response.json(
|
|
502
|
-
{ ok: true, dispatched: true, mode: "task", ...extra },
|
|
503
|
-
{ status: 202 }
|
|
504
|
-
),
|
|
505
|
-
"task"
|
|
506
|
-
);
|
|
507
|
-
}
|
|
508
|
-
|
|
509
454
|
async function startTurn(input: {
|
|
510
455
|
options: OriginChannelOptions;
|
|
511
456
|
args: ChannelHandlerArgs;
|
|
@@ -528,26 +473,7 @@ async function startTurn(input: {
|
|
|
528
473
|
// reply delivery targets the latest wake, not the session's first.
|
|
529
474
|
refreshState: input.state as unknown as JsonValue,
|
|
530
475
|
});
|
|
531
|
-
|
|
532
|
-
// Hosted admission captured the send; the control plane allocates the
|
|
533
|
-
// session after acknowledgement, so there is nothing to report yet.
|
|
534
|
-
return withDispatchOutcome(
|
|
535
|
-
Response.json(
|
|
536
|
-
{ ok: true, dispatched: true, mode: "turn" },
|
|
537
|
-
{ status: 202 }
|
|
538
|
-
),
|
|
539
|
-
"send"
|
|
540
|
-
);
|
|
541
|
-
}
|
|
542
|
-
return withDispatchOutcome(
|
|
543
|
-
Response.json({
|
|
544
|
-
ok: true,
|
|
545
|
-
sessionId: session.id,
|
|
546
|
-
isNew: session.isNew,
|
|
547
|
-
continuationToken: session.continuationToken,
|
|
548
|
-
}),
|
|
549
|
-
"send"
|
|
550
|
-
);
|
|
476
|
+
return turnStarted(session);
|
|
551
477
|
}
|
|
552
478
|
|
|
553
479
|
async function resolveCloudOptions(
|
|
@@ -590,7 +516,12 @@ async function applyDispatch(input: {
|
|
|
590
516
|
return skipped("not_dispatched", input.extra);
|
|
591
517
|
}
|
|
592
518
|
if (isTaskDispatch(input.dispatch)) {
|
|
593
|
-
return acknowledgeTask(
|
|
519
|
+
return acknowledgeTask(
|
|
520
|
+
input.args,
|
|
521
|
+
ORIGIN_CHANNEL_KIND,
|
|
522
|
+
input.dispatch,
|
|
523
|
+
input.extra
|
|
524
|
+
);
|
|
594
525
|
}
|
|
595
526
|
const message = [
|
|
596
527
|
input.dispatch.message ?? input.message,
|
|
@@ -615,13 +546,10 @@ async function applyDispatch(input: {
|
|
|
615
546
|
}
|
|
616
547
|
|
|
617
548
|
/**
|
|
618
|
-
*
|
|
619
|
-
*
|
|
620
|
-
*
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
* Run authored Origin hooks and `send()`. Does not extract a v2 mailbox —
|
|
624
|
-
* the local CP (or hosted verified ingress) stamps before this runs.
|
|
549
|
+
* Run the authored hooks for one Origin delivery and `send()` the turn.
|
|
550
|
+
* Callers own delivery auth: the HTTP route verifies v1ed and binds the app
|
|
551
|
+
* id; trigger fan-out and hosted admission arrive verified. The v2 mailbox
|
|
552
|
+
* is stamped upstream (local CP or hosted ingress), never here.
|
|
625
553
|
*/
|
|
626
554
|
export async function dispatchOriginWebhook(input: {
|
|
627
555
|
options: OriginChannelOptions;
|
|
@@ -893,6 +821,7 @@ export function originChannel(
|
|
|
893
821
|
originChannelOptionsByDefinition.set(definition, channelOptions);
|
|
894
822
|
attachHostedAdmissionAdapter(definition, {
|
|
895
823
|
kind: ORIGIN_CHANNEL_KIND,
|
|
824
|
+
prepareArgs: withPropagatingBackgroundErrors,
|
|
896
825
|
dispatch: async ({ payload, args }) => {
|
|
897
826
|
const envelope = parseOriginWebhookEnvelope(payload);
|
|
898
827
|
if (envelope === null) {
|
|
@@ -907,10 +836,6 @@ export function originChannel(
|
|
|
907
836
|
args,
|
|
908
837
|
});
|
|
909
838
|
},
|
|
910
|
-
getOutcome: (response) => {
|
|
911
|
-
const outcome = getOriginDispatchOutcome(response);
|
|
912
|
-
return outcome === "skip" || outcome === "task" ? outcome : undefined;
|
|
913
|
-
},
|
|
914
839
|
});
|
|
915
840
|
if (usesCursorAccount) {
|
|
916
841
|
registerOriginCursorAccountRuntime(definition, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ContinuationIdentity } from "../../continuation.js";
|
|
1
|
+
import type { ContinuationIdentity } from "../../internal/continuation-identity.js";
|
|
2
2
|
import type {
|
|
3
3
|
AgentCloudOptions,
|
|
4
4
|
ArtifactsApi,
|
|
@@ -97,7 +97,28 @@ export type OriginTurnDispatch = {
|
|
|
97
97
|
context?: readonly string[];
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
/** Bound per-delivery helpers passed to an {@link OriginTaskDispatch.task}. */
|
|
101
|
+
export interface OriginTaskArgs {
|
|
102
|
+
/**
|
|
103
|
+
* Start (or resume) a session for this delivery. In hosted admission it
|
|
104
|
+
* captures the send for the control plane; a send captured at `onStart`
|
|
105
|
+
* bypasses that capture and is rejected.
|
|
106
|
+
*/
|
|
107
|
+
send: SendMessageFn;
|
|
108
|
+
/**
|
|
109
|
+
* Extend the local delivery's background window past the task promise.
|
|
110
|
+
* Hosted admission awaits the task promise only.
|
|
111
|
+
*/
|
|
112
|
+
waitUntil: (promise: Promise<unknown>) => void;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Run a host-side handler after the webhook is acknowledged with a 202.
|
|
117
|
+
* Zero-argument tasks remain valid.
|
|
118
|
+
*/
|
|
119
|
+
export type OriginTaskDispatch = {
|
|
120
|
+
task: (args: OriginTaskArgs) => void | Promise<void>;
|
|
121
|
+
};
|
|
101
122
|
|
|
102
123
|
export type OriginDispatch = OriginTurnDispatch | OriginTaskDispatch;
|
|
103
124
|
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
EvalRunConflictError,
|
|
17
17
|
EvalRunEmptyError,
|
|
18
18
|
} from "../../internal/eval-run-store.js";
|
|
19
|
+
import { sleep } from "../../internal/sleep.js";
|
|
19
20
|
import { stripLeadingSlackMentions } from "./stop.js";
|
|
20
21
|
import type { SlackBinding } from "./types.js";
|
|
21
22
|
|
|
@@ -218,12 +219,6 @@ function truncateTyping(status: string): string {
|
|
|
218
219
|
return `${status.slice(0, TYPING_STATUS_MAX - 1)}…`;
|
|
219
220
|
}
|
|
220
221
|
|
|
221
|
-
async function sleep(ms: number): Promise<void> {
|
|
222
|
-
await new Promise((resolve) => {
|
|
223
|
-
setTimeout(resolve, ms);
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
|
|
227
222
|
async function safeTyping(
|
|
228
223
|
binding: SlackBinding,
|
|
229
224
|
status: string
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
10
10
|
import { basename, join, resolve } from "node:path";
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
CLI_COMMAND_NAME as CLI,
|
|
13
|
+
PACKAGE_NAME,
|
|
14
|
+
} from "../../internal/distribution.js";
|
|
12
15
|
import { writeSlackCliProject } from "./cli-project.js";
|
|
13
16
|
import { envPrefixFromName, slackEnvKeys } from "./credentials.js";
|
|
14
17
|
import {
|
|
@@ -91,8 +94,8 @@ function slackChannelSource(
|
|
|
91
94
|
: ` * Tokens: ${target.envKeys.bot} + ${target.envKeys.app}`;
|
|
92
95
|
const setupLine =
|
|
93
96
|
kind === "manual"
|
|
94
|
-
?
|
|
95
|
-
:
|
|
97
|
+
? ` * Full setup: ${CLI} slack setup`
|
|
98
|
+
: ` * Full setup: ${CLI} slack create --dir .`;
|
|
96
99
|
return `import { slackChannel } from "${PACKAGE_NAME}/channels/slack";
|
|
97
100
|
|
|
98
101
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { CLI_COMMAND_NAME as CLI } from "../../internal/distribution.js";
|
|
1
2
|
/**
|
|
2
|
-
* Slack setup guide printed by `agent-
|
|
3
|
+
* Slack setup guide printed by `agent-sdk slack setup`.
|
|
3
4
|
*
|
|
4
5
|
* Dedicated Socket Mode app via `slack create` (dashboard wizard).
|
|
5
6
|
* `slack init --manual` is the unmanaged Slack CLI / paste path.
|
|
@@ -20,7 +21,7 @@ export const SLACK_SETUP_PHASES: SlackSetupPhase[] = [
|
|
|
20
21
|
actor: "agent",
|
|
21
22
|
title: "Generate channel + manifests",
|
|
22
23
|
steps: [
|
|
23
|
-
|
|
24
|
+
`${CLI} slack init --manual --dir . --name My Agent`,
|
|
24
25
|
"Installs the Slack app when Slack CLI is logged in. Otherwise next asks the user to install it.",
|
|
25
26
|
"Manifests default to Socket Mode (no public Request URL).",
|
|
26
27
|
],
|
|
@@ -55,7 +56,7 @@ export const SLACK_SETUP_PHASES: SlackSetupPhase[] = [
|
|
|
55
56
|
"Write per-agent tokens into .env.local (see .agent-serve/slack/env.example)",
|
|
56
57
|
"Multi-agent: <PREFIX>_SLACK_BOT_TOKEN + <PREFIX>_SLACK_APP_TOKEN",
|
|
57
58
|
"Single agent: SLACK_BOT_TOKEN + SLACK_APP_TOKEN (--no-prefix)",
|
|
58
|
-
|
|
59
|
+
`${CLI} slack doctor --prefix <PREFIX>`,
|
|
59
60
|
],
|
|
60
61
|
},
|
|
61
62
|
{
|
|
@@ -63,7 +64,7 @@ export const SLACK_SETUP_PHASES: SlackSetupPhase[] = [
|
|
|
63
64
|
actor: "agent",
|
|
64
65
|
title: "Serve",
|
|
65
66
|
steps: [
|
|
66
|
-
|
|
67
|
+
`${CLI} serve --dir . --dev`,
|
|
67
68
|
"Confirm log: [agent-sdk/slack] Socket Mode connected",
|
|
68
69
|
],
|
|
69
70
|
},
|
|
@@ -103,10 +104,10 @@ export function initialSlackSetupStatus(options: {
|
|
|
103
104
|
|
|
104
105
|
export function formatSlackSetupGuide(): string {
|
|
105
106
|
const lines: string[] = [
|
|
106
|
-
|
|
107
|
+
`${CLI} — Slack setup`,
|
|
107
108
|
"",
|
|
108
109
|
"Dedicated Slack app (Socket Mode) via the dashboard wizard:",
|
|
109
|
-
|
|
110
|
+
` ${CLI} slack create --dir .`,
|
|
110
111
|
" Finish Slack consent and the bot name there. The CLI writes",
|
|
111
112
|
" tokens into .env.local.",
|
|
112
113
|
"",
|
package/src/channels.ts
CHANGED
package/src/client.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Client-side plumbing for talking to a running agent-
|
|
2
|
+
* Client-side plumbing for talking to a running agent-sdk deployment:
|
|
3
3
|
* production target resolution (stored Cursor login → engineAccess URL and
|
|
4
4
|
* headers), request-header assembly, and the sessions listing used for
|
|
5
5
|
* latest-session binding.
|
package/src/connections.ts
CHANGED
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
* executes **on the Cursor backend** with the account's stored OAuth
|
|
66
66
|
* credentials, so the agent gets Linear / Notion / Slack / … tools with
|
|
67
67
|
* zero token plumbing and no OAuth secrets on this host. Requires the host
|
|
68
|
-
* to be signed in (`agent-
|
|
68
|
+
* to be signed in (`agent-sdk login` or `CURSOR_API_KEY`):
|
|
69
69
|
*
|
|
70
70
|
* ```ts
|
|
71
71
|
* // agent/mcp-connections/account.ts — every connected server (no allowlist)
|
package/src/evals.ts
CHANGED
|
@@ -215,7 +215,7 @@ export interface EvalTestContext extends EvalAssertions {
|
|
|
215
215
|
* change the exit code. Call it before sending messages.
|
|
216
216
|
*/
|
|
217
217
|
skip(reason: string): never;
|
|
218
|
-
/** Debug line (surfaced under `agent-
|
|
218
|
+
/** Debug line (surfaced under `agent-sdk eval --verbose`). */
|
|
219
219
|
log(message: string): void;
|
|
220
220
|
/**
|
|
221
221
|
* Structured score for the playground (and CLI). Values appear on the
|
package/src/extensions.ts
CHANGED
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
* Extensions — agent-shaped trees an agent mounts under a namespace.
|
|
3
3
|
*
|
|
4
4
|
* An extension is a directory laid out like `agent/`: `extension.ts`
|
|
5
|
-
* declares it
|
|
6
|
-
*
|
|
5
|
+
* declares it; `tools/`, `skills/`, `mcp-connections/`,
|
|
6
|
+
* `host-connections/`, `hooks/`, `channels/`, `schedules/`,
|
|
7
|
+
* `subagents/`, `instructions`, `ab.ts` / `ab/`, `artifacts.ts`,
|
|
8
|
+
* and `sandbox/workspace/` are its contributions. `lib/` holds
|
|
9
|
+
* shared code.
|
|
7
10
|
*
|
|
8
11
|
* ```ts
|
|
9
12
|
* // extension.ts
|
|
@@ -27,8 +30,7 @@
|
|
|
27
30
|
*
|
|
28
31
|
* A consumer mounts it from `agent/extensions/<ns>.ts`; the filename is the
|
|
29
32
|
* namespace, and every contribution is exposed as `<ns>__<name>`
|
|
30
|
-
* (`ci__failed_jobs`). `__` is reserved for that
|
|
31
|
-
* or `agent/skills/` name may not contain it.
|
|
33
|
+
* (`ci__failed_jobs`). `__` is reserved for that.
|
|
32
34
|
*
|
|
33
35
|
* ```ts
|
|
34
36
|
* // agent/extensions/ci.ts
|
|
@@ -40,7 +42,8 @@
|
|
|
40
42
|
* To adjust a contribution, mount as a directory instead and overlay the
|
|
41
43
|
* slot: `agent/extensions/ci/extension.ts` holds the mount, and
|
|
42
44
|
* `agent/extensions/ci/tools/job_log.ts` replaces `ci__job_log` — or removes
|
|
43
|
-
* it with `export default disableTool()
|
|
45
|
+
* it with `export default disableTool()`, `disableSkill()`, or the
|
|
46
|
+
* matching helper for that slot.
|
|
44
47
|
*
|
|
45
48
|
* A Cursor plugin (the marketplace format: `.cursor-plugin/plugin.json`,
|
|
46
49
|
* `skills/`, `commands/`, `agents/`, `mcp.json`) mounts the same way with
|
|
@@ -69,6 +72,7 @@ import { brandDefinition } from "./internal/brand.js";
|
|
|
69
72
|
import type {
|
|
70
73
|
CursorPluginOptions,
|
|
71
74
|
DisabledConnectionDefinition,
|
|
75
|
+
DisabledDefinition,
|
|
72
76
|
DisabledToolDefinition,
|
|
73
77
|
Extension,
|
|
74
78
|
ExtensionMount,
|
|
@@ -79,6 +83,7 @@ export type {
|
|
|
79
83
|
CursorPluginDeclaration,
|
|
80
84
|
CursorPluginOptions,
|
|
81
85
|
DisabledConnectionDefinition,
|
|
86
|
+
DisabledDefinition,
|
|
82
87
|
DisabledToolDefinition,
|
|
83
88
|
DiscoveredExtension,
|
|
84
89
|
Extension,
|
|
@@ -128,6 +133,43 @@ export function disableConnection(): DisabledConnectionDefinition {
|
|
|
128
133
|
return brandDefinition("disabled-connection", {});
|
|
129
134
|
}
|
|
130
135
|
|
|
136
|
+
/** Remove an extension contribution from a directory overlay. */
|
|
137
|
+
export function disable(): DisabledDefinition {
|
|
138
|
+
return brandDefinition("disabled", {});
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function disableSkill(): DisabledDefinition {
|
|
142
|
+
return disable();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function disableHook(): DisabledDefinition {
|
|
146
|
+
return disable();
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export function disableChannel(): DisabledDefinition {
|
|
150
|
+
return disable();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function disableSchedule(): DisabledDefinition {
|
|
154
|
+
return disable();
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function disableSubagent(): DisabledDefinition {
|
|
158
|
+
return disable();
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function disableInstructions(): DisabledDefinition {
|
|
162
|
+
return disable();
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export function disableAB(): DisabledDefinition {
|
|
166
|
+
return disable();
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export function disableArtifacts(): DisabledDefinition {
|
|
170
|
+
return disable();
|
|
171
|
+
}
|
|
172
|
+
|
|
131
173
|
export function cursorPlugin(options: CursorPluginOptions): ExtensionMount {
|
|
132
174
|
return brandDefinition("extension", {
|
|
133
175
|
extension: {
|
package/src/files.ts
CHANGED
|
@@ -156,12 +156,15 @@ export const AGENT_SERVE_USER_STORE_KEY_PREFIX = "agent-serve";
|
|
|
156
156
|
/**
|
|
157
157
|
* Framework-owned keys for state that lives on the deployment's Agent Store
|
|
158
158
|
* but is not author `host.files` data: artifact rows and payloads, authored
|
|
159
|
-
* skills synced for cloud turns, and the cross-session
|
|
160
|
-
* out of `files/` so author listings never see
|
|
159
|
+
* skills and workspace seeds synced for cloud turns, and the cross-session
|
|
160
|
+
* memory journal. Kept out of `files/` so author listings never see
|
|
161
|
+
* framework rows.
|
|
161
162
|
*
|
|
162
163
|
* Skills sit at store-root `skills/<name>/…` so exec-daemon's
|
|
163
164
|
* `--agent-store-skills-dir` walk finds them the same way it finds user-store
|
|
164
|
-
* skills.
|
|
165
|
+
* skills. Workspace seeds sit at store-root `workspace/…` so the mount path
|
|
166
|
+
* the first cloud prompt names stays short. Memory and artifacts stay under
|
|
167
|
+
* {@link STORAGE_KEY_ROOT}.
|
|
165
168
|
*/
|
|
166
169
|
function createAgentStoreKeys(root: string) {
|
|
167
170
|
return {
|
|
@@ -180,6 +183,14 @@ function createAgentStoreKeys(root: string) {
|
|
|
180
183
|
/** Personal-key cloud agents: namespaced so they cannot collide with the user's own `skills/`. */
|
|
181
184
|
userSkillsPrefix: (agent: string): string =>
|
|
182
185
|
`${AGENT_SERVE_USER_STORE_KEY_PREFIX}/${agent}/skills/`,
|
|
186
|
+
workspaceFile: (
|
|
187
|
+
relPath: string,
|
|
188
|
+
workspacePrefix: string = "workspace/"
|
|
189
|
+
): string => `${workspacePrefix}${relPath}`,
|
|
190
|
+
workspacePrefix: (): string => "workspace/",
|
|
191
|
+
/** Personal-key cloud agents: namespaced like {@link userSkillsPrefix}. */
|
|
192
|
+
userWorkspacePrefix: (agent: string): string =>
|
|
193
|
+
`${AGENT_SERVE_USER_STORE_KEY_PREFIX}/${agent}/workspace/`,
|
|
183
194
|
memoryDir: (agent: string): string => `${root}/${agent}/memory`,
|
|
184
195
|
memoryJournal: (agent: string): string =>
|
|
185
196
|
`${root}/${agent}/memory/journal.jsonl`,
|
|
@@ -213,6 +224,13 @@ export const agentSdkAgentStoreKeys: AgentStoreKeys = createAgentStoreKeys(
|
|
|
213
224
|
*/
|
|
214
225
|
export const DEPLOYMENT_STORE_MOUNT_PATH = "/cursor/stores/deployment";
|
|
215
226
|
|
|
227
|
+
/**
|
|
228
|
+
* USER store FUSE mount on personal-key cloud-runtime VMs. Mirrors
|
|
229
|
+
* `AGENT_STORE_MOUNT_ROOT` / `AGENT_STORE_USER_MOUNT_NAME` in
|
|
230
|
+
* `@anysphere/constants`.
|
|
231
|
+
*/
|
|
232
|
+
export const USER_STORE_MOUNT_PATH = "/cursor/stores/user";
|
|
233
|
+
|
|
216
234
|
/** Errors raised by the file surface. Thrown by sinks and by the framework. */
|
|
217
235
|
export class FileConflictError extends Error {
|
|
218
236
|
constructor(
|
package/src/index.ts
CHANGED
|
@@ -51,37 +51,19 @@ export {
|
|
|
51
51
|
publicEndpoint,
|
|
52
52
|
} from "./channels.js";
|
|
53
53
|
export { defineConnection } from "./connections.js";
|
|
54
|
-
export type {
|
|
55
|
-
ContinuationBuiltin,
|
|
56
|
-
ContinuationClaim,
|
|
57
|
-
ContinuationIdentity,
|
|
58
|
-
ContinuationSelector,
|
|
59
|
-
ConversationType,
|
|
60
|
-
MailboxContinuation,
|
|
61
|
-
ParsedContinuation,
|
|
62
|
-
} from "./continuation.js";
|
|
63
|
-
export {
|
|
64
|
-
BUILTINS,
|
|
65
|
-
bindMailboxContinuationSend,
|
|
66
|
-
CONTINUATION_SELECTORS,
|
|
67
|
-
continuationSource,
|
|
68
|
-
defaultContinuationSelector,
|
|
69
|
-
extractContinuation,
|
|
70
|
-
formatConversationKey,
|
|
71
|
-
handshakeContinuation,
|
|
72
|
-
isContinuationSelector,
|
|
73
|
-
mintClaim,
|
|
74
|
-
normalizeIdentity,
|
|
75
|
-
parseContinuationSelector,
|
|
76
|
-
resolveContinuation,
|
|
77
|
-
resolveV2Key,
|
|
78
|
-
stampMailboxContinuation,
|
|
79
|
-
V2EngineError,
|
|
80
|
-
} from "./continuation.js";
|
|
81
54
|
export {
|
|
82
55
|
cursorPlugin,
|
|
83
56
|
defineExtension,
|
|
57
|
+
disable,
|
|
58
|
+
disableAB,
|
|
59
|
+
disableArtifacts,
|
|
60
|
+
disableChannel,
|
|
84
61
|
disableConnection,
|
|
62
|
+
disableHook,
|
|
63
|
+
disableInstructions,
|
|
64
|
+
disableSchedule,
|
|
65
|
+
disableSkill,
|
|
66
|
+
disableSubagent,
|
|
85
67
|
disableTool,
|
|
86
68
|
} from "./extensions.js";
|
|
87
69
|
export { defineHook } from "./hooks.js";
|
|
@@ -89,6 +71,15 @@ export {
|
|
|
89
71
|
InvalidAsOfError,
|
|
90
72
|
VacuousTimeArgsError,
|
|
91
73
|
} from "./internal/as-of.js";
|
|
74
|
+
export type {
|
|
75
|
+
ContinuationBuiltin,
|
|
76
|
+
ContinuationClaim,
|
|
77
|
+
ContinuationIdentity,
|
|
78
|
+
ContinuationSelector,
|
|
79
|
+
ConversationType,
|
|
80
|
+
MailboxContinuation,
|
|
81
|
+
ParsedContinuation,
|
|
82
|
+
} from "./internal/continuation-identity.js";
|
|
92
83
|
export type { LoadAgentProjectOptions } from "./internal/discovery.js";
|
|
93
84
|
export {
|
|
94
85
|
formatDiagnostics,
|
|
@@ -144,7 +135,7 @@ export type {
|
|
|
144
135
|
OtelDefinition,
|
|
145
136
|
OtelExporterConfig,
|
|
146
137
|
} from "./otel.js";
|
|
147
|
-
export { defineOtel } from "./otel.js";
|
|
138
|
+
export { defineOtel, resolveOtelDefinition } from "./otel.js";
|
|
148
139
|
export type { PromptTag } from "./prompt.js";
|
|
149
140
|
export { prompt } from "./prompt.js";
|
|
150
141
|
export type {
|
|
@@ -160,6 +151,7 @@ export type {
|
|
|
160
151
|
ReminderTarget,
|
|
161
152
|
ReminderUntilContext,
|
|
162
153
|
} from "./reminders.js";
|
|
154
|
+
export { defineResult } from "./result.js";
|
|
163
155
|
export { defineSchedule } from "./schedules.js";
|
|
164
156
|
export { defineSkill } from "./skills.js";
|
|
165
157
|
export type {
|
|
@@ -89,9 +89,6 @@ export async function buildABSnapshot(
|
|
|
89
89
|
input: BuildABSnapshotInput
|
|
90
90
|
): Promise<ABSnapshot> {
|
|
91
91
|
const experiments = input.experiments;
|
|
92
|
-
const experimentByName = new Map(
|
|
93
|
-
experiments.map((experiment) => [experiment.name, experiment])
|
|
94
|
-
);
|
|
95
92
|
|
|
96
93
|
const armTotals = new Map<
|
|
97
94
|
string,
|
|
@@ -48,6 +48,7 @@ import {
|
|
|
48
48
|
type ToolEffect,
|
|
49
49
|
} from "../types.js";
|
|
50
50
|
import { brandDefinition } from "./brand.js";
|
|
51
|
+
import { describeError } from "./describe-error.js";
|
|
51
52
|
import type { HostMcpOneOff } from "./mcp-host.js";
|
|
52
53
|
import {
|
|
53
54
|
sanitizeMcpToolName,
|
|
@@ -379,7 +380,3 @@ export function formatMcpToolResult(
|
|
|
379
380
|
? JSON.stringify(result.structuredContent, null, 2)
|
|
380
381
|
: "(empty result)";
|
|
381
382
|
}
|
|
382
|
-
|
|
383
|
-
function describeError(error: unknown): string {
|
|
384
|
-
return error instanceof Error ? error.message : String(error);
|
|
385
|
-
}
|
|
@@ -4,20 +4,12 @@
|
|
|
4
4
|
* thread — keep this module dependency-free).
|
|
5
5
|
*
|
|
6
6
|
* Authored files import the framework by bare specifier. On compiled runs the
|
|
7
|
-
* CLI pins
|
|
8
|
-
* `directAliases` so channel-option WeakMaps stay single-copy
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* - `@cursor/july[/subpath]` (published name)
|
|
12
|
-
* - `@cursor/agentkit[/subpath]` (future public name)
|
|
13
|
-
*
|
|
14
|
-
* Preferring a project's own `node_modules` (or tsx tsconfig paths that map
|
|
15
|
-
* onto this package's `src/`) would load a second module instance and break
|
|
7
|
+
* CLI pins `@cursor/july[/subpath]` onto its own entry files via
|
|
8
|
+
* `directAliases` so channel-option WeakMaps stay single-copy. Preferring a
|
|
9
|
+
* project's own `node_modules` (or tsx tsconfig paths that map onto this
|
|
10
|
+
* package's `src/`) would load a second module instance and break
|
|
16
11
|
* `getGitHubChannelOptions` / continuation stamping / hosted-delivery.
|
|
17
12
|
*
|
|
18
|
-
* `fallbackAliases` remains for tests and any future soft remap; production
|
|
19
|
-
* registration leaves it empty.
|
|
20
|
-
*
|
|
21
13
|
* A separate case is first-party factory agents that relative-import this
|
|
22
14
|
* package's `src/` from a monorepo checkout. Hosted engines `npm install`
|
|
23
15
|
* only the agent directory, so files under `packages/agent-serve/src` have
|
|
@@ -28,12 +20,10 @@
|
|
|
28
20
|
// Null-prototype copies so specifiers like "constructor" or "__proto__"
|
|
29
21
|
// can never resolve to inherited Object.prototype members.
|
|
30
22
|
let directAliases = toNullProtoMap({});
|
|
31
|
-
let fallbackAliases = toNullProtoMap({});
|
|
32
23
|
let sourceTreeFallbackParentURL: string | undefined;
|
|
33
24
|
|
|
34
25
|
export interface AuthoredAliasHookData {
|
|
35
26
|
directAliases: Record<string, string>;
|
|
36
|
-
fallbackAliases: Record<string, string>;
|
|
37
27
|
/**
|
|
38
28
|
* `file:` URL of the running `@cursor/july` package.json. Bare imports
|
|
39
29
|
* from monorepo `packages/agent-serve/` source retry against this parent
|
|
@@ -50,7 +40,6 @@ function toNullProtoMap(
|
|
|
50
40
|
|
|
51
41
|
export function initialize(data: AuthoredAliasHookData): void {
|
|
52
42
|
directAliases = toNullProtoMap(data.directAliases);
|
|
53
|
-
fallbackAliases = toNullProtoMap(data.fallbackAliases);
|
|
54
43
|
const parent = data.sourceTreeFallbackParentURL;
|
|
55
44
|
sourceTreeFallbackParentURL =
|
|
56
45
|
typeof parent === "string" && parent !== "" ? parent : undefined;
|
|
@@ -76,12 +65,6 @@ export function resolve(
|
|
|
76
65
|
if (direct !== undefined) {
|
|
77
66
|
return { url: direct, shortCircuit: true };
|
|
78
67
|
}
|
|
79
|
-
const fallback = fallbackAliases[specifier];
|
|
80
|
-
if (fallback !== undefined) {
|
|
81
|
-
return Promise.resolve()
|
|
82
|
-
.then(() => nextResolve(specifier, context))
|
|
83
|
-
.catch(() => ({ url: fallback, shortCircuit: true }));
|
|
84
|
-
}
|
|
85
68
|
if (
|
|
86
69
|
sourceTreeFallbackParentURL !== undefined &&
|
|
87
70
|
isBarePackageSpecifier(specifier) &&
|