@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
|
@@ -1,23 +1,48 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `agent/extensions/<ns>.ts` | `agent/extensions/<ns>/extension.ts`:
|
|
2
|
+
* `agent/extensions/<ns>.ts` | `agent/extensions/<ns>/extension.ts`:
|
|
3
|
+
* agent-shaped trees and Cursor plugins mounted under a namespace.
|
|
3
4
|
*/
|
|
4
5
|
|
|
5
6
|
import type { Dirent } from "node:fs";
|
|
6
7
|
import { join, resolve } from "node:path";
|
|
7
8
|
import type {
|
|
9
|
+
ArtifactsDefinition,
|
|
8
10
|
ConnectionDefinition,
|
|
11
|
+
DiscoveredAB,
|
|
12
|
+
DiscoveredChannel,
|
|
9
13
|
DiscoveredConnection,
|
|
10
14
|
DiscoveredExtension,
|
|
15
|
+
DiscoveredHook,
|
|
16
|
+
DiscoveredSchedule,
|
|
11
17
|
DiscoveredSkill,
|
|
12
18
|
DiscoveredTool,
|
|
13
19
|
ExtensionMount,
|
|
14
20
|
ResolvedAgent,
|
|
21
|
+
SeedFile,
|
|
15
22
|
ToolDefinition,
|
|
16
23
|
} from "../../types.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
24
|
+
import { buildIdentityPreamble, withIdentityPreamble } from "../workspace.js";
|
|
25
|
+
import { loadABs } from "./ab.js";
|
|
26
|
+
import { loadChannels } from "./channels.js";
|
|
27
|
+
import {
|
|
28
|
+
compileConnection,
|
|
29
|
+
compileHostConnection,
|
|
30
|
+
loadConnections,
|
|
31
|
+
loadHostConnections,
|
|
32
|
+
} from "./connections.js";
|
|
19
33
|
import { type DiscoveryContext, displayPath } from "./context.js";
|
|
20
34
|
import { type CursorPluginAgent, readCursorPlugin } from "./cursor-plugin.js";
|
|
35
|
+
import {
|
|
36
|
+
overlayAbs,
|
|
37
|
+
overlayArtifacts,
|
|
38
|
+
overlayChannels,
|
|
39
|
+
overlayHooks,
|
|
40
|
+
overlayInstructionsFragment,
|
|
41
|
+
overlaySchedules,
|
|
42
|
+
overlaySkills,
|
|
43
|
+
overlaySlot,
|
|
44
|
+
overlaySubagents,
|
|
45
|
+
} from "./extension-overlay.js";
|
|
21
46
|
import {
|
|
22
47
|
findModuleFile,
|
|
23
48
|
isDirectory,
|
|
@@ -26,10 +51,15 @@ import {
|
|
|
26
51
|
moduleStem,
|
|
27
52
|
sortedEntries,
|
|
28
53
|
} from "./fs.js";
|
|
29
|
-
import {
|
|
54
|
+
import { loadHooks } from "./hooks.js";
|
|
55
|
+
import { loadInstructions } from "./instructions.js";
|
|
56
|
+
import { importDefault, moduleEntries } from "./modules.js";
|
|
30
57
|
import { validateName } from "./names.js";
|
|
58
|
+
import { loadSchedules } from "./schedules.js";
|
|
59
|
+
import { loadSeedFiles } from "./seed-files.js";
|
|
60
|
+
import { loadArtifacts, mergeArtifacts } from "./services.js";
|
|
31
61
|
import { loadSkills } from "./skills.js";
|
|
32
|
-
import { subagent } from "./subagent.js";
|
|
62
|
+
import { loadSubagents, subagent } from "./subagent.js";
|
|
33
63
|
import { compileTool, loadTools } from "./tools.js";
|
|
34
64
|
|
|
35
65
|
/** The agent's authored slot lists that mounted extensions append to. */
|
|
@@ -37,7 +67,15 @@ export interface ExtensionContributions {
|
|
|
37
67
|
tools: DiscoveredTool[];
|
|
38
68
|
skills: DiscoveredSkill[];
|
|
39
69
|
connections: DiscoveredConnection[];
|
|
70
|
+
hostConnections: DiscoveredConnection[];
|
|
40
71
|
subagents: ResolvedAgent[];
|
|
72
|
+
hooks: DiscoveredHook[];
|
|
73
|
+
channels: DiscoveredChannel[];
|
|
74
|
+
schedules: DiscoveredSchedule[];
|
|
75
|
+
instructionParts: string[];
|
|
76
|
+
seedFiles: SeedFile[];
|
|
77
|
+
abs: DiscoveredAB[];
|
|
78
|
+
artifacts: ArtifactsDefinition | undefined;
|
|
41
79
|
}
|
|
42
80
|
|
|
43
81
|
/**
|
|
@@ -83,7 +121,7 @@ interface MountSite {
|
|
|
83
121
|
ns: string;
|
|
84
122
|
/** The module default-exporting the {@link ExtensionMount}. */
|
|
85
123
|
mountPath: string;
|
|
86
|
-
/** A directory mount; its
|
|
124
|
+
/** A directory mount; its slots overlay the extension's. */
|
|
87
125
|
overlayDir?: string;
|
|
88
126
|
}
|
|
89
127
|
|
|
@@ -123,14 +161,46 @@ interface ExtensionTree {
|
|
|
123
161
|
tools: DiscoveredTool[];
|
|
124
162
|
skills: DiscoveredSkill[];
|
|
125
163
|
connections: DiscoveredConnection[];
|
|
164
|
+
hostConnections: DiscoveredConnection[];
|
|
126
165
|
/** Connection names the tree declares but left to the mount's overlay. */
|
|
127
166
|
overlaidServers: string[];
|
|
128
167
|
agents: CursorPluginAgent[];
|
|
168
|
+
subagents: ResolvedAgent[];
|
|
169
|
+
hooks: DiscoveredHook[];
|
|
170
|
+
channels: DiscoveredChannel[];
|
|
171
|
+
schedules: DiscoveredSchedule[];
|
|
172
|
+
instructions?: string;
|
|
173
|
+
seedFiles: SeedFile[];
|
|
174
|
+
abs: DiscoveredAB[];
|
|
175
|
+
artifacts?: ArtifactsDefinition;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function emptyDiscovered(
|
|
179
|
+
ns: string,
|
|
180
|
+
description?: string
|
|
181
|
+
): DiscoveredExtension {
|
|
182
|
+
return {
|
|
183
|
+
name: ns,
|
|
184
|
+
description,
|
|
185
|
+
tools: [],
|
|
186
|
+
skills: [],
|
|
187
|
+
connections: [],
|
|
188
|
+
hostConnections: [],
|
|
189
|
+
subagents: [],
|
|
190
|
+
hooks: [],
|
|
191
|
+
channels: [],
|
|
192
|
+
schedules: [],
|
|
193
|
+
instructions: false,
|
|
194
|
+
seedFiles: [],
|
|
195
|
+
abs: [],
|
|
196
|
+
artifactKinds: [],
|
|
197
|
+
};
|
|
129
198
|
}
|
|
130
199
|
|
|
131
200
|
/**
|
|
132
201
|
* Read the extension's tree, lay the mount's overlay on top (a same-named
|
|
133
|
-
* file replaces, `disableTool()` removes), then namespace
|
|
202
|
+
* file replaces, `disable()` / `disableTool()` removes), then namespace
|
|
203
|
+
* what is left.
|
|
134
204
|
*/
|
|
135
205
|
async function mountExtension(
|
|
136
206
|
ctx: DiscoveryContext,
|
|
@@ -138,14 +208,7 @@ async function mountExtension(
|
|
|
138
208
|
mount: ExtensionMount,
|
|
139
209
|
into: ExtensionContributions
|
|
140
210
|
): Promise<DiscoveredExtension> {
|
|
141
|
-
const mounted
|
|
142
|
-
name: site.ns,
|
|
143
|
-
description: mount.extension.description,
|
|
144
|
-
tools: [],
|
|
145
|
-
skills: [],
|
|
146
|
-
connections: [],
|
|
147
|
-
subagents: [],
|
|
148
|
-
};
|
|
211
|
+
const mounted = emptyDiscovered(site.ns, mount.extension.description);
|
|
149
212
|
const root = resolve(ctx.rootDir, mount.extension.root);
|
|
150
213
|
if (!(await isDirectory(root))) {
|
|
151
214
|
const hint =
|
|
@@ -159,31 +222,36 @@ async function mountExtension(
|
|
|
159
222
|
});
|
|
160
223
|
return mounted;
|
|
161
224
|
}
|
|
162
|
-
|
|
163
|
-
// servers uncompiled: a plugin server you replace or drop needs no values.
|
|
164
|
-
const connectionOverlay =
|
|
165
|
-
site.overlayDir === undefined
|
|
166
|
-
? []
|
|
167
|
-
: await moduleEntries(
|
|
168
|
-
ctx,
|
|
169
|
-
join(site.overlayDir, "mcp-connections"),
|
|
170
|
-
"connection"
|
|
171
|
-
);
|
|
172
|
-
const tree = await readExtensionTree(
|
|
173
|
-
ctx,
|
|
174
|
-
site,
|
|
175
|
-
mount,
|
|
176
|
-
root,
|
|
177
|
-
new Set(connectionOverlay.map((entry) => entry.name))
|
|
178
|
-
);
|
|
225
|
+
const tree = await readExtensionTree(ctx, site, mount, root);
|
|
179
226
|
if (tree === undefined) {
|
|
180
227
|
return mounted;
|
|
181
228
|
}
|
|
182
229
|
mounted.description = mount.extension.description ?? tree.description;
|
|
230
|
+
|
|
183
231
|
const tools = byName(tree.tools);
|
|
184
232
|
const skills = byName(tree.skills);
|
|
185
233
|
const connections = byName(tree.connections);
|
|
234
|
+
const hostConnections = byName(tree.hostConnections);
|
|
235
|
+
const hooks = byName(tree.hooks);
|
|
236
|
+
const channels = byId(tree.channels);
|
|
237
|
+
const schedules = byName(tree.schedules);
|
|
238
|
+
const subagents = byName(tree.subagents);
|
|
239
|
+
for (const agent of tree.agents) {
|
|
240
|
+
subagents.set(agent.name, subagent(agent.name, agent));
|
|
241
|
+
}
|
|
242
|
+
const seedFiles = new Map(
|
|
243
|
+
tree.seedFiles.map((seed) => [seed.relativePath, seed])
|
|
244
|
+
);
|
|
245
|
+
const abs = byAbSource(tree.abs);
|
|
246
|
+
let artifacts = tree.artifacts;
|
|
247
|
+
let instructions = tree.instructions;
|
|
248
|
+
|
|
186
249
|
if (site.overlayDir !== undefined) {
|
|
250
|
+
const connectionOverlay = await moduleEntries(
|
|
251
|
+
ctx,
|
|
252
|
+
join(site.overlayDir, "mcp-connections"),
|
|
253
|
+
"connection"
|
|
254
|
+
);
|
|
187
255
|
await overlaySlot(
|
|
188
256
|
ctx,
|
|
189
257
|
site,
|
|
@@ -191,6 +259,8 @@ async function mountExtension(
|
|
|
191
259
|
await moduleEntries(ctx, join(site.overlayDir, "tools"), "tool"),
|
|
192
260
|
{
|
|
193
261
|
kind: "tool",
|
|
262
|
+
disabledKind: "disabled-tool",
|
|
263
|
+
disableHelper: "disableTool",
|
|
194
264
|
declared: new Set(tools.keys()),
|
|
195
265
|
compile: (ctx, path, name, definition) =>
|
|
196
266
|
compileTool(ctx, path, name, definition as ToolDefinition),
|
|
@@ -198,6 +268,8 @@ async function mountExtension(
|
|
|
198
268
|
);
|
|
199
269
|
await overlaySlot(ctx, site, connections, connectionOverlay, {
|
|
200
270
|
kind: "connection",
|
|
271
|
+
disabledKind: "disabled-connection",
|
|
272
|
+
disableHelper: "disableConnection",
|
|
201
273
|
declared: new Set([...connections.keys(), ...tree.overlaidServers]),
|
|
202
274
|
compile: (ctx, path, name, definition) =>
|
|
203
275
|
compileConnection(
|
|
@@ -208,13 +280,63 @@ async function mountExtension(
|
|
|
208
280
|
"model"
|
|
209
281
|
),
|
|
210
282
|
});
|
|
211
|
-
|
|
283
|
+
await overlaySlot(
|
|
212
284
|
ctx,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
285
|
+
site,
|
|
286
|
+
hostConnections,
|
|
287
|
+
await moduleEntries(
|
|
288
|
+
ctx,
|
|
289
|
+
join(site.overlayDir, "host-connections"),
|
|
290
|
+
"connection"
|
|
291
|
+
),
|
|
292
|
+
{
|
|
293
|
+
kind: "connection",
|
|
294
|
+
disabledKind: "disabled-connection",
|
|
295
|
+
disableHelper: "disableConnection",
|
|
296
|
+
declared: new Set(hostConnections.keys()),
|
|
297
|
+
compile: (ctx, path, name, definition) =>
|
|
298
|
+
compileHostConnection(
|
|
299
|
+
ctx,
|
|
300
|
+
path,
|
|
301
|
+
name,
|
|
302
|
+
definition as ConnectionDefinition
|
|
303
|
+
),
|
|
304
|
+
}
|
|
305
|
+
);
|
|
306
|
+
await overlaySkills(ctx, site, skills, join(site.overlayDir, "skills"));
|
|
307
|
+
await overlayHooks(ctx, site, hooks, join(site.overlayDir, "hooks"));
|
|
308
|
+
await overlayChannels(
|
|
309
|
+
ctx,
|
|
310
|
+
site,
|
|
311
|
+
channels,
|
|
312
|
+
join(site.overlayDir, "channels")
|
|
313
|
+
);
|
|
314
|
+
await overlaySchedules(
|
|
315
|
+
ctx,
|
|
316
|
+
site,
|
|
317
|
+
schedules,
|
|
318
|
+
join(site.overlayDir, "schedules")
|
|
319
|
+
);
|
|
320
|
+
await overlaySubagents(
|
|
321
|
+
ctx,
|
|
322
|
+
site,
|
|
323
|
+
subagents,
|
|
324
|
+
join(site.overlayDir, "subagents")
|
|
325
|
+
);
|
|
326
|
+
const overlayInstructions = await overlayInstructionsFragment(
|
|
327
|
+
ctx,
|
|
328
|
+
site.overlayDir
|
|
329
|
+
);
|
|
330
|
+
if (overlayInstructions !== "keep") {
|
|
331
|
+
instructions = overlayInstructions;
|
|
216
332
|
}
|
|
333
|
+
for (const seed of await loadSeedFiles(ctx, site.overlayDir)) {
|
|
334
|
+
seedFiles.set(seed.relativePath, seed);
|
|
335
|
+
}
|
|
336
|
+
await overlayAbs(ctx, site, abs, site.overlayDir);
|
|
337
|
+
artifacts = await overlayArtifacts(ctx, site.overlayDir, artifacts);
|
|
217
338
|
}
|
|
339
|
+
|
|
218
340
|
for (const [name, tool] of tools) {
|
|
219
341
|
const composed = `${site.ns}__${name}`;
|
|
220
342
|
into.tools.push({ ...tool, name: composed, extension: site.ns });
|
|
@@ -225,16 +347,86 @@ async function mountExtension(
|
|
|
225
347
|
into.skills.push({ ...skill, name: composed, extension: site.ns });
|
|
226
348
|
mounted.skills.push(composed);
|
|
227
349
|
}
|
|
350
|
+
const modelNames = new Set<string>();
|
|
228
351
|
for (const [name, connection] of connections) {
|
|
229
352
|
const composed = `${site.ns}__${name}`;
|
|
353
|
+
modelNames.add(composed);
|
|
230
354
|
into.connections.push({ ...connection, name: composed });
|
|
231
355
|
mounted.connections.push(composed);
|
|
232
356
|
}
|
|
233
|
-
for (const
|
|
234
|
-
const composed = `${site.ns}__${
|
|
235
|
-
|
|
357
|
+
for (const [name, connection] of hostConnections) {
|
|
358
|
+
const composed = `${site.ns}__${name}`;
|
|
359
|
+
if (modelNames.has(composed)) {
|
|
360
|
+
ctx.diagnostics.push({
|
|
361
|
+
severity: "error",
|
|
362
|
+
path: displayPath(ctx, join(root, "host-connections", `${name}.ts`)),
|
|
363
|
+
message: `Host connection "${composed}" collides with MCP connection "${composed}". Rename one of them.`,
|
|
364
|
+
});
|
|
365
|
+
continue;
|
|
366
|
+
}
|
|
367
|
+
into.hostConnections.push({ ...connection, name: composed });
|
|
368
|
+
mounted.hostConnections.push(composed);
|
|
369
|
+
}
|
|
370
|
+
for (const [name, child] of subagents) {
|
|
371
|
+
const composed = `${site.ns}__${name}`;
|
|
372
|
+
into.subagents.push(namespaceSubagent(composed, child));
|
|
236
373
|
mounted.subagents.push(composed);
|
|
237
374
|
}
|
|
375
|
+
for (const [name, hook] of hooks) {
|
|
376
|
+
const composed = `${site.ns}__${name}`;
|
|
377
|
+
into.hooks.push({ ...hook, name: composed });
|
|
378
|
+
mounted.hooks.push(composed);
|
|
379
|
+
}
|
|
380
|
+
for (const [id, channel] of channels) {
|
|
381
|
+
const composed = `${site.ns}__${id}`;
|
|
382
|
+
into.channels.push({ ...channel, id: composed });
|
|
383
|
+
mounted.channels.push(composed);
|
|
384
|
+
}
|
|
385
|
+
for (const [name, schedule] of schedules) {
|
|
386
|
+
const composed = `${site.ns}__${name}`;
|
|
387
|
+
into.schedules.push({ ...schedule, name: composed });
|
|
388
|
+
mounted.schedules.push(composed);
|
|
389
|
+
}
|
|
390
|
+
if (instructions !== undefined && instructions !== "") {
|
|
391
|
+
into.instructionParts.push(instructions);
|
|
392
|
+
mounted.instructions = true;
|
|
393
|
+
}
|
|
394
|
+
for (const seed of seedFiles.values()) {
|
|
395
|
+
if (
|
|
396
|
+
into.seedFiles.some(
|
|
397
|
+
(existing) => existing.relativePath === seed.relativePath
|
|
398
|
+
)
|
|
399
|
+
) {
|
|
400
|
+
ctx.diagnostics.push({
|
|
401
|
+
severity: "warning",
|
|
402
|
+
path: displayPath(ctx, seed.sourcePath),
|
|
403
|
+
message: `Extension seed "${seed.relativePath}" collides with an existing workspace seed; keeping the first.`,
|
|
404
|
+
});
|
|
405
|
+
continue;
|
|
406
|
+
}
|
|
407
|
+
into.seedFiles.push(seed);
|
|
408
|
+
mounted.seedFiles.push(seed.relativePath);
|
|
409
|
+
}
|
|
410
|
+
for (const experiment of abs.values()) {
|
|
411
|
+
const composed = `${site.ns}__${experiment.name}`;
|
|
412
|
+
into.abs.push({
|
|
413
|
+
name: composed,
|
|
414
|
+
definition: experiment.definition,
|
|
415
|
+
});
|
|
416
|
+
mounted.abs.push(composed);
|
|
417
|
+
}
|
|
418
|
+
if (artifacts !== undefined) {
|
|
419
|
+
const kinds: NonNullable<ArtifactsDefinition["kinds"]> = {};
|
|
420
|
+
for (const [kind, config] of Object.entries(artifacts.kinds ?? {})) {
|
|
421
|
+
const composed = `${site.ns}__${kind}`;
|
|
422
|
+
kinds[composed] = config;
|
|
423
|
+
mounted.artifactKinds.push(composed);
|
|
424
|
+
}
|
|
425
|
+
into.artifacts = mergeArtifacts(into.artifacts, {
|
|
426
|
+
...artifacts,
|
|
427
|
+
kinds,
|
|
428
|
+
});
|
|
429
|
+
}
|
|
238
430
|
return mounted;
|
|
239
431
|
}
|
|
240
432
|
|
|
@@ -242,26 +434,84 @@ async function readExtensionTree(
|
|
|
242
434
|
ctx: DiscoveryContext,
|
|
243
435
|
site: MountSite,
|
|
244
436
|
mount: ExtensionMount,
|
|
245
|
-
root: string
|
|
246
|
-
overlaidServers: ReadonlySet<string>
|
|
437
|
+
root: string
|
|
247
438
|
): Promise<ExtensionTree | undefined> {
|
|
248
439
|
if ("layout" in mount.extension) {
|
|
440
|
+
const connectionOverlay =
|
|
441
|
+
site.overlayDir === undefined
|
|
442
|
+
? []
|
|
443
|
+
: await moduleEntries(
|
|
444
|
+
ctx,
|
|
445
|
+
join(site.overlayDir, "mcp-connections"),
|
|
446
|
+
"connection"
|
|
447
|
+
);
|
|
249
448
|
const plugin = await readCursorPlugin(
|
|
250
449
|
ctx,
|
|
251
450
|
root,
|
|
252
451
|
site.mountPath,
|
|
253
452
|
mount.extension.variables,
|
|
254
|
-
|
|
453
|
+
new Set(connectionOverlay.map((entry) => entry.name))
|
|
255
454
|
);
|
|
256
|
-
|
|
455
|
+
if (plugin === undefined) {
|
|
456
|
+
return undefined;
|
|
457
|
+
}
|
|
458
|
+
return {
|
|
459
|
+
...plugin,
|
|
460
|
+
tools: [],
|
|
461
|
+
hostConnections: [],
|
|
462
|
+
subagents: [],
|
|
463
|
+
hooks: [],
|
|
464
|
+
channels: [],
|
|
465
|
+
schedules: [],
|
|
466
|
+
seedFiles: [],
|
|
467
|
+
abs: [],
|
|
468
|
+
};
|
|
257
469
|
}
|
|
258
|
-
|
|
470
|
+
return readNativeTree(ctx, root);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
async function readNativeTree(
|
|
474
|
+
ctx: DiscoveryContext,
|
|
475
|
+
root: string
|
|
476
|
+
): Promise<ExtensionTree> {
|
|
477
|
+
await warnAgentRootOnlySlots(ctx, root);
|
|
478
|
+
const connections = await loadConnections(ctx, join(root, "mcp-connections"));
|
|
259
479
|
return {
|
|
260
480
|
tools: await loadTools(ctx, join(root, "tools")),
|
|
261
481
|
skills: await loadSkills(ctx, join(root, "skills")),
|
|
262
|
-
connections
|
|
482
|
+
connections,
|
|
483
|
+
hostConnections: await loadHostConnections(ctx, root, connections),
|
|
263
484
|
overlaidServers: [],
|
|
264
485
|
agents: [],
|
|
486
|
+
subagents: await loadSubagents(ctx, join(root, "subagents")),
|
|
487
|
+
hooks: await loadHooks(ctx, join(root, "hooks")),
|
|
488
|
+
channels: (await loadChannels(ctx, join(root, "channels"), "extension"))
|
|
489
|
+
.channels,
|
|
490
|
+
schedules: await loadSchedules(ctx, join(root, "schedules")),
|
|
491
|
+
instructions: await loadInstructions(ctx, root, undefined, false),
|
|
492
|
+
seedFiles: await loadSeedFiles(ctx, root),
|
|
493
|
+
abs: await loadABs(ctx, root),
|
|
494
|
+
artifacts: await loadArtifacts(ctx, root),
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
function namespaceSubagent(
|
|
499
|
+
composed: string,
|
|
500
|
+
child: ResolvedAgent
|
|
501
|
+
): ResolvedAgent {
|
|
502
|
+
const oldPreamble = buildIdentityPreamble(child.name);
|
|
503
|
+
let body = child.instructions;
|
|
504
|
+
if (
|
|
505
|
+
body !== undefined &&
|
|
506
|
+
oldPreamble !== "" &&
|
|
507
|
+
body.startsWith(oldPreamble)
|
|
508
|
+
) {
|
|
509
|
+
body = body.slice(oldPreamble.length).replace(/^\n+/, "");
|
|
510
|
+
}
|
|
511
|
+
return {
|
|
512
|
+
...child,
|
|
513
|
+
name: composed,
|
|
514
|
+
instructions: withIdentityPreamble(composed, body),
|
|
265
515
|
};
|
|
266
516
|
}
|
|
267
517
|
|
|
@@ -269,79 +519,54 @@ function byName<T extends { name: string }>(items: T[]): Map<string, T> {
|
|
|
269
519
|
return new Map(items.map((item) => [item.name, item]));
|
|
270
520
|
}
|
|
271
521
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
ctx: DiscoveryContext,
|
|
279
|
-
path: string,
|
|
280
|
-
name: string,
|
|
281
|
-
definition: unknown
|
|
282
|
-
) => Promise<T | undefined> | T | undefined;
|
|
522
|
+
function byAbSource(items: DiscoveredAB[]): Map<string, DiscoveredAB> {
|
|
523
|
+
return new Map(items.map((item) => [item.source ?? item.name, item]));
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
function byId<T extends { id: string }>(items: T[]): Map<string, T> {
|
|
527
|
+
return new Map(items.map((item) => [item.id, item]));
|
|
283
528
|
}
|
|
284
529
|
|
|
285
530
|
/**
|
|
286
|
-
*
|
|
287
|
-
*
|
|
531
|
+
* Agent-singleton slots: one runtime (`agent.ts`), one storage backend,
|
|
532
|
+
* one OTLP exporter, one A/B platform config. Playground chips are a
|
|
533
|
+
* Vite glob of the agent tree, not a discovery walk. Nested
|
|
534
|
+
* `extensions/` are not mounted.
|
|
288
535
|
*/
|
|
289
|
-
async function
|
|
536
|
+
async function warnAgentRootOnlySlots(
|
|
290
537
|
ctx: DiscoveryContext,
|
|
291
|
-
|
|
292
|
-
contributed: Map<string, T>,
|
|
293
|
-
entries: Array<{ name: string; path: string }>,
|
|
294
|
-
slot: OverlaySlot<T>
|
|
538
|
+
root: string
|
|
295
539
|
): Promise<void> {
|
|
296
|
-
const
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
path: displayPath(ctx, path),
|
|
311
|
-
message: `${helperCall(disabledKind)} targets "${name}", which extension "${site.ns}" does not contribute.`,
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
continue;
|
|
315
|
-
}
|
|
316
|
-
const item = await slot.compile(ctx, path, name, definition);
|
|
317
|
-
if (item !== undefined) {
|
|
318
|
-
contributed.set(name, item);
|
|
540
|
+
const files = [
|
|
541
|
+
["agent.ts", "agent.ts"],
|
|
542
|
+
["storage.ts", "storage"],
|
|
543
|
+
["otel.ts", "otel"],
|
|
544
|
+
["ab.config.ts", "A/B config"],
|
|
545
|
+
] as const;
|
|
546
|
+
for (const [file, label] of files) {
|
|
547
|
+
const path = join(root, file);
|
|
548
|
+
if (await isFile(path)) {
|
|
549
|
+
ctx.diagnostics.push({
|
|
550
|
+
severity: "warning",
|
|
551
|
+
path: displayPath(ctx, path),
|
|
552
|
+
message: `The agent that mounts this extension owns ${label}; ignoring.`,
|
|
553
|
+
});
|
|
319
554
|
}
|
|
320
555
|
}
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
): Promise<void> {
|
|
328
|
-
const unsupported = [
|
|
329
|
-
["instructions.md", "instructions"],
|
|
330
|
-
["connections", "connections"],
|
|
331
|
-
["mcp-connections", "MCP connections"],
|
|
332
|
-
["hooks", "hooks"],
|
|
333
|
-
["subagents", "subagents"],
|
|
334
|
-
["channels", "channels"],
|
|
335
|
-
["schedules", "schedules"],
|
|
336
|
-
["extensions", "nested extensions"],
|
|
556
|
+
const dirs = [
|
|
557
|
+
[
|
|
558
|
+
"playground",
|
|
559
|
+
"Playground chips are a Vite glob of the agent tree, not an extension slot; ignoring.",
|
|
560
|
+
],
|
|
561
|
+
["extensions", "Nested extensions are not mounted; ignoring."],
|
|
337
562
|
] as const;
|
|
338
|
-
for (const [slot,
|
|
563
|
+
for (const [slot, message] of dirs) {
|
|
339
564
|
const path = join(root, slot);
|
|
340
|
-
if (
|
|
565
|
+
if (await isDirectory(path)) {
|
|
341
566
|
ctx.diagnostics.push({
|
|
342
567
|
severity: "warning",
|
|
343
568
|
path: displayPath(ctx, path),
|
|
344
|
-
message
|
|
569
|
+
message,
|
|
345
570
|
});
|
|
346
571
|
}
|
|
347
572
|
}
|
|
@@ -4,13 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
import { basename, extname, relative } from "node:path";
|
|
6
6
|
import type { DiscoveredHook, HookDefinition } from "../../types.js";
|
|
7
|
+
import { getDefinitionKind } from "../brand.js";
|
|
7
8
|
import { type DiscoveryContext, displayPath } from "./context.js";
|
|
8
9
|
import { isDirectory, isModuleFile, toPosix, walkFiles } from "./fs.js";
|
|
9
10
|
import { importDefault } from "./modules.js";
|
|
10
11
|
|
|
11
12
|
export async function loadHooks(
|
|
12
13
|
ctx: DiscoveryContext,
|
|
13
|
-
hooksDir: string
|
|
14
|
+
hooksDir: string,
|
|
15
|
+
onDisable?: (name: string, path: string) => void
|
|
14
16
|
): Promise<DiscoveredHook[]> {
|
|
15
17
|
if (!(await isDirectory(hooksDir))) {
|
|
16
18
|
return [];
|
|
@@ -22,10 +24,26 @@ export async function loadHooks(
|
|
|
22
24
|
}
|
|
23
25
|
const rel = toPosix(relative(hooksDir, filePath));
|
|
24
26
|
const name = rel.slice(0, -extname(rel).length);
|
|
25
|
-
|
|
27
|
+
if (name.includes("__")) {
|
|
28
|
+
ctx.diagnostics.push({
|
|
29
|
+
severity: "error",
|
|
30
|
+
path: displayPath(ctx, filePath),
|
|
31
|
+
message: `Hook name "${name}" may not contain "__"; it is reserved for extension contributions (\`<ns>__<name>\`).`,
|
|
32
|
+
});
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
const definition = await importDefault(
|
|
36
|
+
ctx,
|
|
37
|
+
filePath,
|
|
38
|
+
onDisable === undefined ? "hook" : ["hook", "disabled"]
|
|
39
|
+
);
|
|
26
40
|
if (definition === undefined) {
|
|
27
41
|
continue;
|
|
28
42
|
}
|
|
43
|
+
if (getDefinitionKind(definition) === "disabled") {
|
|
44
|
+
onDisable?.(name, filePath);
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
29
47
|
const hook = definition as HookDefinition;
|
|
30
48
|
if (
|
|
31
49
|
typeof hook.events !== "object" ||
|
|
@@ -128,6 +128,12 @@ export function projectInfo(project: AgentProject): AgentProjectInfo {
|
|
|
128
128
|
if (meta?.originWebhookEvents !== undefined) {
|
|
129
129
|
info.originWebhookEvents = meta.originWebhookEvents;
|
|
130
130
|
}
|
|
131
|
+
if (meta?.gitlabWebhookEvents !== undefined) {
|
|
132
|
+
info.gitlabWebhookEvents = meta.gitlabWebhookEvents;
|
|
133
|
+
}
|
|
134
|
+
if (meta?.bitbucketWebhookEvents !== undefined) {
|
|
135
|
+
info.bitbucketWebhookEvents = meta.bitbucketWebhookEvents;
|
|
136
|
+
}
|
|
131
137
|
if (meta?.deploymentEventTypes !== undefined) {
|
|
132
138
|
info.deploymentEventTypes = meta.deploymentEventTypes;
|
|
133
139
|
}
|
|
@@ -167,6 +173,7 @@ export function projectInfo(project: AgentProject): AgentProjectInfo {
|
|
|
167
173
|
agentTool: project.artifacts.agentTool === true,
|
|
168
174
|
max: resolveArtifactsMax(project.artifacts),
|
|
169
175
|
},
|
|
176
|
+
result: project.result === undefined ? undefined : true,
|
|
170
177
|
otel:
|
|
171
178
|
project.otel === undefined
|
|
172
179
|
? undefined
|
|
@@ -71,13 +71,15 @@ export async function importDefault(
|
|
|
71
71
|
return mod.default;
|
|
72
72
|
}
|
|
73
73
|
const helpers = kinds.map(helperCall).join(" or ");
|
|
74
|
+
const expectedKinds = kinds.join(" or ");
|
|
75
|
+
const article = /^[aeiou]/.test(expectedKinds) ? "an" : "a";
|
|
74
76
|
ctx.diagnostics.push({
|
|
75
77
|
severity: "error",
|
|
76
78
|
path: displayPath(ctx, modulePath),
|
|
77
79
|
message:
|
|
78
80
|
kind === undefined
|
|
79
81
|
? `Module must default-export ${helpers}.`
|
|
80
|
-
: `Expected
|
|
82
|
+
: `Expected ${article} ${expectedKinds} definition but found "${kind}" (wrong authored slot?).`,
|
|
81
83
|
});
|
|
82
84
|
return undefined;
|
|
83
85
|
}
|
|
@@ -85,7 +87,9 @@ export async function importDefault(
|
|
|
85
87
|
/** How a definition of `kind` is authored: `defineTool({ ... })`, `disableTool()`. */
|
|
86
88
|
export function helperCall(kind: ImportableKind): string {
|
|
87
89
|
const name = DEFINE_HELPER_NAME[kind];
|
|
88
|
-
return kind.startsWith("disabled-")
|
|
90
|
+
return kind === "disabled" || kind.startsWith("disabled-")
|
|
91
|
+
? `${name}()`
|
|
92
|
+
: `${name}({ ... })`;
|
|
89
93
|
}
|
|
90
94
|
|
|
91
95
|
const DEFINE_HELPER_NAME: Record<ImportableKind, string> = {
|
|
@@ -95,6 +99,7 @@ const DEFINE_HELPER_NAME: Record<ImportableKind, string> = {
|
|
|
95
99
|
extension: "defineExtension",
|
|
96
100
|
"disabled-tool": "disableTool",
|
|
97
101
|
"disabled-connection": "disableConnection",
|
|
102
|
+
disabled: "disable",
|
|
98
103
|
connection: "defineConnection",
|
|
99
104
|
channel: "defineChannel",
|
|
100
105
|
"http-channel": "httpChannel",
|
|
@@ -104,4 +109,5 @@ const DEFINE_HELPER_NAME: Record<ImportableKind, string> = {
|
|
|
104
109
|
storage: "defineStorage",
|
|
105
110
|
artifacts: "defineArtifacts",
|
|
106
111
|
otel: "defineOtel",
|
|
112
|
+
result: "defineResult",
|
|
107
113
|
};
|