@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
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Directory-mount overlays: a same-named file replaces, disable() removes.
|
|
3
|
+
* Slot loaders do the walk; this file only applies replace/disable.
|
|
4
|
+
*/
|
|
5
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
import { join } from "node:path";
|
|
15
|
+
import { getDefinitionKind } from "../brand.js";
|
|
16
|
+
import { loadABs } from "./ab.js";
|
|
17
|
+
import { loadChannels } from "./channels.js";
|
|
18
|
+
import { displayPath, errorMessage } from "./context.js";
|
|
19
|
+
import { findModuleFile, isDirectory, isFile, isModuleFile, moduleStem, sortedEntries, } from "./fs.js";
|
|
20
|
+
import { loadHooks } from "./hooks.js";
|
|
21
|
+
import { loadInstructions } from "./instructions.js";
|
|
22
|
+
import { importDefault } from "./modules.js";
|
|
23
|
+
import { loadSchedules } from "./schedules.js";
|
|
24
|
+
import { loadSkills } from "./skills.js";
|
|
25
|
+
import { loadSubagents } from "./subagent.js";
|
|
26
|
+
export function overlaySlot(ctx, site, contributed, entries, slot) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
for (const { name, path } of entries) {
|
|
29
|
+
const definition = yield importDefault(ctx, path, [
|
|
30
|
+
slot.kind,
|
|
31
|
+
slot.disabledKind,
|
|
32
|
+
"disabled",
|
|
33
|
+
]);
|
|
34
|
+
if (definition === undefined) {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
const kind = getDefinitionKind(definition);
|
|
38
|
+
if (kind === slot.disabledKind || kind === "disabled") {
|
|
39
|
+
contributed.delete(name);
|
|
40
|
+
if (!slot.declared.has(name)) {
|
|
41
|
+
unknownContribution(ctx, path, slot.disableHelper, name, site.ns);
|
|
42
|
+
}
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const item = yield slot.compile(ctx, path, name, definition);
|
|
46
|
+
if (item !== undefined) {
|
|
47
|
+
contributed.set(name, item);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
export function overlaySkills(ctx, site, contributed, dir) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
yield overlayNamed(ctx, site, contributed, dir, "disableSkill", (onDisable) => loadSkills(ctx, dir, onDisable));
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
export function overlayHooks(ctx, site, contributed, dir) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
yield overlayNamed(ctx, site, contributed, dir, "disableHook", (onDisable) => loadHooks(ctx, dir, onDisable));
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
export function overlaySchedules(ctx, site, contributed, dir) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
yield overlayNamed(ctx, site, contributed, dir, "disableSchedule", (onDisable) => loadSchedules(ctx, dir, onDisable));
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
export function overlayChannels(ctx, site, contributed, dir) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
if (!(yield isDirectory(dir))) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const declared = new Set(contributed.keys());
|
|
73
|
+
const { channels } = yield loadChannels(ctx, dir, "extension", (id, path) => {
|
|
74
|
+
contributed.delete(id);
|
|
75
|
+
if (!declared.has(id)) {
|
|
76
|
+
unknownContribution(ctx, path, "disableChannel", id, site.ns);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
for (const channel of channels) {
|
|
80
|
+
contributed.set(channel.id, channel);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
export function overlaySubagents(ctx, site, contributed, dir) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
if (!(yield isDirectory(dir))) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const declared = new Set(contributed.keys());
|
|
90
|
+
for (const child of yield loadSubagents(ctx, dir)) {
|
|
91
|
+
contributed.set(child.name, child);
|
|
92
|
+
}
|
|
93
|
+
for (const entry of yield sortedEntries(dir)) {
|
|
94
|
+
const path = join(dir, entry.name);
|
|
95
|
+
if (!entry.isFile() || !isModuleFile(entry.name)) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
const name = moduleStem(entry.name);
|
|
99
|
+
const definition = yield importDefault(ctx, path, ["disabled"]);
|
|
100
|
+
if (definition === undefined) {
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
contributed.delete(name);
|
|
104
|
+
if (!declared.has(name)) {
|
|
105
|
+
unknownContribution(ctx, path, "disableSubagent", name, site.ns);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
export function overlayInstructionsFragment(ctx, overlayDir) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
const markdownPath = join(overlayDir, "instructions.md");
|
|
113
|
+
const modulePath = yield findModuleFile(overlayDir, "instructions");
|
|
114
|
+
const instructionsDir = join(overlayDir, "instructions");
|
|
115
|
+
if (!(yield isFile(markdownPath)) &&
|
|
116
|
+
modulePath === undefined &&
|
|
117
|
+
!(yield isDirectory(instructionsDir))) {
|
|
118
|
+
return "keep";
|
|
119
|
+
}
|
|
120
|
+
if (modulePath !== undefined) {
|
|
121
|
+
let mod;
|
|
122
|
+
try {
|
|
123
|
+
mod = yield ctx.importModule(modulePath);
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
ctx.diagnostics.push({
|
|
127
|
+
severity: "error",
|
|
128
|
+
path: displayPath(ctx, modulePath),
|
|
129
|
+
message: `Failed to load module: ${errorMessage(error)}`,
|
|
130
|
+
});
|
|
131
|
+
return "keep";
|
|
132
|
+
}
|
|
133
|
+
if (getDefinitionKind(mod.default) === "disabled") {
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return loadInstructions(ctx, overlayDir, undefined, false);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
export function overlayAbs(ctx, site, contributed, overlayDir) {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
var _a;
|
|
143
|
+
const loaded = yield loadABs(ctx, overlayDir, (source, path) => {
|
|
144
|
+
if (!contributed.delete(source)) {
|
|
145
|
+
unknownContribution(ctx, path, "disableAB", source, site.ns);
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
for (const experiment of loaded) {
|
|
149
|
+
contributed.set((_a = experiment.source) !== null && _a !== void 0 ? _a : experiment.name, experiment);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
export function overlayArtifacts(ctx, overlayDir, current) {
|
|
154
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
155
|
+
const path = yield findModuleFile(overlayDir, "artifacts");
|
|
156
|
+
if (path === undefined) {
|
|
157
|
+
return current;
|
|
158
|
+
}
|
|
159
|
+
const definition = yield importDefault(ctx, path, ["artifacts", "disabled"]);
|
|
160
|
+
if (definition === undefined) {
|
|
161
|
+
return current;
|
|
162
|
+
}
|
|
163
|
+
if (getDefinitionKind(definition) === "disabled") {
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
166
|
+
return definition;
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
function overlayNamed(ctx, site, contributed, dir, helper, load) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
+
if (!(yield isDirectory(dir))) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
const declared = new Set(contributed.keys());
|
|
175
|
+
for (const item of yield load((name, path) => {
|
|
176
|
+
contributed.delete(name);
|
|
177
|
+
if (!declared.has(name)) {
|
|
178
|
+
unknownContribution(ctx, path, helper, name, site.ns);
|
|
179
|
+
}
|
|
180
|
+
})) {
|
|
181
|
+
contributed.set(item.name, item);
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
function unknownContribution(ctx, path, helper, name, ns) {
|
|
186
|
+
ctx.diagnostics.push({
|
|
187
|
+
severity: "error",
|
|
188
|
+
path: displayPath(ctx, path),
|
|
189
|
+
message: `${helper}() targets "${name}", which extension "${ns}" does not contribute.`,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
@@ -1,14 +1,23 @@
|
|
|
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
|
-
import type { DiscoveredConnection, DiscoveredExtension, DiscoveredSkill, DiscoveredTool, ResolvedAgent } from "../../types.js";
|
|
5
|
+
import type { ArtifactsDefinition, DiscoveredAB, DiscoveredChannel, DiscoveredConnection, DiscoveredExtension, DiscoveredHook, DiscoveredSchedule, DiscoveredSkill, DiscoveredTool, ResolvedAgent, SeedFile } from "../../types.js";
|
|
5
6
|
import { type DiscoveryContext } from "./context.js";
|
|
6
7
|
/** The agent's authored slot lists that mounted extensions append to. */
|
|
7
8
|
export interface ExtensionContributions {
|
|
8
9
|
tools: DiscoveredTool[];
|
|
9
10
|
skills: DiscoveredSkill[];
|
|
10
11
|
connections: DiscoveredConnection[];
|
|
12
|
+
hostConnections: DiscoveredConnection[];
|
|
11
13
|
subagents: ResolvedAgent[];
|
|
14
|
+
hooks: DiscoveredHook[];
|
|
15
|
+
channels: DiscoveredChannel[];
|
|
16
|
+
schedules: DiscoveredSchedule[];
|
|
17
|
+
instructionParts: string[];
|
|
18
|
+
seedFiles: SeedFile[];
|
|
19
|
+
abs: DiscoveredAB[];
|
|
20
|
+
artifacts: ArtifactsDefinition | undefined;
|
|
12
21
|
}
|
|
13
22
|
/**
|
|
14
23
|
* Mount every extension under `agent/extensions/` and append what it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/extensions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/extensions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EACV,mBAAmB,EAEnB,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,cAAc,EAEd,aAAa,EACb,QAAQ,EAET,MAAM,gBAAgB,CAAC;AAUxB,OAAO,EAAE,KAAK,gBAAgB,EAAe,MAAM,cAAc,CAAC;AAgClE,yEAAyE;AACzE,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,WAAW,EAAE,oBAAoB,EAAE,CAAC;IACpC,eAAe,EAAE,oBAAoB,EAAE,CAAC;IACxC,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,GAAG,EAAE,YAAY,EAAE,CAAC;IACpB,SAAS,EAAE,mBAAmB,GAAG,SAAS,CAAC;CAC5C;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,gBAAgB,EACrB,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,mBAAmB,EAAE,CAAC,CA4BhC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
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
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
6
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -11,15 +12,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
12
|
});
|
|
12
13
|
};
|
|
13
14
|
import { join, resolve } from "node:path";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
15
|
+
import { buildIdentityPreamble, withIdentityPreamble } from "../workspace.js";
|
|
16
|
+
import { loadABs } from "./ab.js";
|
|
17
|
+
import { loadChannels } from "./channels.js";
|
|
18
|
+
import { compileConnection, compileHostConnection, loadConnections, loadHostConnections, } from "./connections.js";
|
|
16
19
|
import { displayPath } from "./context.js";
|
|
17
20
|
import { readCursorPlugin } from "./cursor-plugin.js";
|
|
21
|
+
import { overlayAbs, overlayArtifacts, overlayChannels, overlayHooks, overlayInstructionsFragment, overlaySchedules, overlaySkills, overlaySlot, overlaySubagents, } from "./extension-overlay.js";
|
|
18
22
|
import { findModuleFile, isDirectory, isFile, isModuleFile, moduleStem, sortedEntries, } from "./fs.js";
|
|
19
|
-
import {
|
|
23
|
+
import { loadHooks } from "./hooks.js";
|
|
24
|
+
import { loadInstructions } from "./instructions.js";
|
|
25
|
+
import { importDefault, moduleEntries } from "./modules.js";
|
|
20
26
|
import { validateName } from "./names.js";
|
|
27
|
+
import { loadSchedules } from "./schedules.js";
|
|
28
|
+
import { loadSeedFiles } from "./seed-files.js";
|
|
29
|
+
import { loadArtifacts, mergeArtifacts } from "./services.js";
|
|
21
30
|
import { loadSkills } from "./skills.js";
|
|
22
|
-
import { subagent } from "./subagent.js";
|
|
31
|
+
import { loadSubagents, subagent } from "./subagent.js";
|
|
23
32
|
import { compileTool, loadTools } from "./tools.js";
|
|
24
33
|
/**
|
|
25
34
|
* Mount every extension under `agent/extensions/` and append what it
|
|
@@ -81,21 +90,33 @@ function resolveMountSite(ctx, path, entry) {
|
|
|
81
90
|
: undefined;
|
|
82
91
|
});
|
|
83
92
|
}
|
|
93
|
+
function emptyDiscovered(ns, description) {
|
|
94
|
+
return {
|
|
95
|
+
name: ns,
|
|
96
|
+
description,
|
|
97
|
+
tools: [],
|
|
98
|
+
skills: [],
|
|
99
|
+
connections: [],
|
|
100
|
+
hostConnections: [],
|
|
101
|
+
subagents: [],
|
|
102
|
+
hooks: [],
|
|
103
|
+
channels: [],
|
|
104
|
+
schedules: [],
|
|
105
|
+
instructions: false,
|
|
106
|
+
seedFiles: [],
|
|
107
|
+
abs: [],
|
|
108
|
+
artifactKinds: [],
|
|
109
|
+
};
|
|
110
|
+
}
|
|
84
111
|
/**
|
|
85
112
|
* Read the extension's tree, lay the mount's overlay on top (a same-named
|
|
86
|
-
* file replaces, `disableTool()` removes), then namespace
|
|
113
|
+
* file replaces, `disable()` / `disableTool()` removes), then namespace
|
|
114
|
+
* what is left.
|
|
87
115
|
*/
|
|
88
116
|
function mountExtension(ctx, site, mount, into) {
|
|
89
117
|
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
-
var _a;
|
|
91
|
-
const mounted =
|
|
92
|
-
name: site.ns,
|
|
93
|
-
description: mount.extension.description,
|
|
94
|
-
tools: [],
|
|
95
|
-
skills: [],
|
|
96
|
-
connections: [],
|
|
97
|
-
subagents: [],
|
|
98
|
-
};
|
|
118
|
+
var _a, _b;
|
|
119
|
+
const mounted = emptyDiscovered(site.ns, mount.extension.description);
|
|
99
120
|
const root = resolve(ctx.rootDir, mount.extension.root);
|
|
100
121
|
if (!(yield isDirectory(root))) {
|
|
101
122
|
const hint = "layout" in mount.extension
|
|
@@ -108,12 +129,7 @@ function mountExtension(ctx, site, mount, into) {
|
|
|
108
129
|
});
|
|
109
130
|
return mounted;
|
|
110
131
|
}
|
|
111
|
-
|
|
112
|
-
// servers uncompiled: a plugin server you replace or drop needs no values.
|
|
113
|
-
const connectionOverlay = site.overlayDir === undefined
|
|
114
|
-
? []
|
|
115
|
-
: yield moduleEntries(ctx, join(site.overlayDir, "mcp-connections"), "connection");
|
|
116
|
-
const tree = yield readExtensionTree(ctx, site, mount, root, new Set(connectionOverlay.map((entry) => entry.name)));
|
|
132
|
+
const tree = yield readExtensionTree(ctx, site, mount, root);
|
|
117
133
|
if (tree === undefined) {
|
|
118
134
|
return mounted;
|
|
119
135
|
}
|
|
@@ -121,20 +137,55 @@ function mountExtension(ctx, site, mount, into) {
|
|
|
121
137
|
const tools = byName(tree.tools);
|
|
122
138
|
const skills = byName(tree.skills);
|
|
123
139
|
const connections = byName(tree.connections);
|
|
140
|
+
const hostConnections = byName(tree.hostConnections);
|
|
141
|
+
const hooks = byName(tree.hooks);
|
|
142
|
+
const channels = byId(tree.channels);
|
|
143
|
+
const schedules = byName(tree.schedules);
|
|
144
|
+
const subagents = byName(tree.subagents);
|
|
145
|
+
for (const agent of tree.agents) {
|
|
146
|
+
subagents.set(agent.name, subagent(agent.name, agent));
|
|
147
|
+
}
|
|
148
|
+
const seedFiles = new Map(tree.seedFiles.map((seed) => [seed.relativePath, seed]));
|
|
149
|
+
const abs = byAbSource(tree.abs);
|
|
150
|
+
let artifacts = tree.artifacts;
|
|
151
|
+
let instructions = tree.instructions;
|
|
124
152
|
if (site.overlayDir !== undefined) {
|
|
153
|
+
const connectionOverlay = yield moduleEntries(ctx, join(site.overlayDir, "mcp-connections"), "connection");
|
|
125
154
|
yield overlaySlot(ctx, site, tools, yield moduleEntries(ctx, join(site.overlayDir, "tools"), "tool"), {
|
|
126
155
|
kind: "tool",
|
|
156
|
+
disabledKind: "disabled-tool",
|
|
157
|
+
disableHelper: "disableTool",
|
|
127
158
|
declared: new Set(tools.keys()),
|
|
128
159
|
compile: (ctx, path, name, definition) => compileTool(ctx, path, name, definition),
|
|
129
160
|
});
|
|
130
161
|
yield overlaySlot(ctx, site, connections, connectionOverlay, {
|
|
131
162
|
kind: "connection",
|
|
163
|
+
disabledKind: "disabled-connection",
|
|
164
|
+
disableHelper: "disableConnection",
|
|
132
165
|
declared: new Set([...connections.keys(), ...tree.overlaidServers]),
|
|
133
166
|
compile: (ctx, path, name, definition) => compileConnection(ctx, path, name, definition, "model"),
|
|
134
167
|
});
|
|
135
|
-
|
|
136
|
-
|
|
168
|
+
yield overlaySlot(ctx, site, hostConnections, yield moduleEntries(ctx, join(site.overlayDir, "host-connections"), "connection"), {
|
|
169
|
+
kind: "connection",
|
|
170
|
+
disabledKind: "disabled-connection",
|
|
171
|
+
disableHelper: "disableConnection",
|
|
172
|
+
declared: new Set(hostConnections.keys()),
|
|
173
|
+
compile: (ctx, path, name, definition) => compileHostConnection(ctx, path, name, definition),
|
|
174
|
+
});
|
|
175
|
+
yield overlaySkills(ctx, site, skills, join(site.overlayDir, "skills"));
|
|
176
|
+
yield overlayHooks(ctx, site, hooks, join(site.overlayDir, "hooks"));
|
|
177
|
+
yield overlayChannels(ctx, site, channels, join(site.overlayDir, "channels"));
|
|
178
|
+
yield overlaySchedules(ctx, site, schedules, join(site.overlayDir, "schedules"));
|
|
179
|
+
yield overlaySubagents(ctx, site, subagents, join(site.overlayDir, "subagents"));
|
|
180
|
+
const overlayInstructions = yield overlayInstructionsFragment(ctx, site.overlayDir);
|
|
181
|
+
if (overlayInstructions !== "keep") {
|
|
182
|
+
instructions = overlayInstructions;
|
|
183
|
+
}
|
|
184
|
+
for (const seed of yield loadSeedFiles(ctx, site.overlayDir)) {
|
|
185
|
+
seedFiles.set(seed.relativePath, seed);
|
|
137
186
|
}
|
|
187
|
+
yield overlayAbs(ctx, site, abs, site.overlayDir);
|
|
188
|
+
artifacts = yield overlayArtifacts(ctx, site.overlayDir, artifacts);
|
|
138
189
|
}
|
|
139
190
|
for (const [name, tool] of tools) {
|
|
140
191
|
const composed = `${site.ns}__${name}`;
|
|
@@ -146,91 +197,177 @@ function mountExtension(ctx, site, mount, into) {
|
|
|
146
197
|
into.skills.push(Object.assign(Object.assign({}, skill), { name: composed, extension: site.ns }));
|
|
147
198
|
mounted.skills.push(composed);
|
|
148
199
|
}
|
|
200
|
+
const modelNames = new Set();
|
|
149
201
|
for (const [name, connection] of connections) {
|
|
150
202
|
const composed = `${site.ns}__${name}`;
|
|
203
|
+
modelNames.add(composed);
|
|
151
204
|
into.connections.push(Object.assign(Object.assign({}, connection), { name: composed }));
|
|
152
205
|
mounted.connections.push(composed);
|
|
153
206
|
}
|
|
154
|
-
for (const
|
|
155
|
-
const composed = `${site.ns}__${
|
|
156
|
-
|
|
207
|
+
for (const [name, connection] of hostConnections) {
|
|
208
|
+
const composed = `${site.ns}__${name}`;
|
|
209
|
+
if (modelNames.has(composed)) {
|
|
210
|
+
ctx.diagnostics.push({
|
|
211
|
+
severity: "error",
|
|
212
|
+
path: displayPath(ctx, join(root, "host-connections", `${name}.ts`)),
|
|
213
|
+
message: `Host connection "${composed}" collides with MCP connection "${composed}". Rename one of them.`,
|
|
214
|
+
});
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
into.hostConnections.push(Object.assign(Object.assign({}, connection), { name: composed }));
|
|
218
|
+
mounted.hostConnections.push(composed);
|
|
219
|
+
}
|
|
220
|
+
for (const [name, child] of subagents) {
|
|
221
|
+
const composed = `${site.ns}__${name}`;
|
|
222
|
+
into.subagents.push(namespaceSubagent(composed, child));
|
|
157
223
|
mounted.subagents.push(composed);
|
|
158
224
|
}
|
|
225
|
+
for (const [name, hook] of hooks) {
|
|
226
|
+
const composed = `${site.ns}__${name}`;
|
|
227
|
+
into.hooks.push(Object.assign(Object.assign({}, hook), { name: composed }));
|
|
228
|
+
mounted.hooks.push(composed);
|
|
229
|
+
}
|
|
230
|
+
for (const [id, channel] of channels) {
|
|
231
|
+
const composed = `${site.ns}__${id}`;
|
|
232
|
+
into.channels.push(Object.assign(Object.assign({}, channel), { id: composed }));
|
|
233
|
+
mounted.channels.push(composed);
|
|
234
|
+
}
|
|
235
|
+
for (const [name, schedule] of schedules) {
|
|
236
|
+
const composed = `${site.ns}__${name}`;
|
|
237
|
+
into.schedules.push(Object.assign(Object.assign({}, schedule), { name: composed }));
|
|
238
|
+
mounted.schedules.push(composed);
|
|
239
|
+
}
|
|
240
|
+
if (instructions !== undefined && instructions !== "") {
|
|
241
|
+
into.instructionParts.push(instructions);
|
|
242
|
+
mounted.instructions = true;
|
|
243
|
+
}
|
|
244
|
+
for (const seed of seedFiles.values()) {
|
|
245
|
+
if (into.seedFiles.some((existing) => existing.relativePath === seed.relativePath)) {
|
|
246
|
+
ctx.diagnostics.push({
|
|
247
|
+
severity: "warning",
|
|
248
|
+
path: displayPath(ctx, seed.sourcePath),
|
|
249
|
+
message: `Extension seed "${seed.relativePath}" collides with an existing workspace seed; keeping the first.`,
|
|
250
|
+
});
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
into.seedFiles.push(seed);
|
|
254
|
+
mounted.seedFiles.push(seed.relativePath);
|
|
255
|
+
}
|
|
256
|
+
for (const experiment of abs.values()) {
|
|
257
|
+
const composed = `${site.ns}__${experiment.name}`;
|
|
258
|
+
into.abs.push({
|
|
259
|
+
name: composed,
|
|
260
|
+
definition: experiment.definition,
|
|
261
|
+
});
|
|
262
|
+
mounted.abs.push(composed);
|
|
263
|
+
}
|
|
264
|
+
if (artifacts !== undefined) {
|
|
265
|
+
const kinds = {};
|
|
266
|
+
for (const [kind, config] of Object.entries((_b = artifacts.kinds) !== null && _b !== void 0 ? _b : {})) {
|
|
267
|
+
const composed = `${site.ns}__${kind}`;
|
|
268
|
+
kinds[composed] = config;
|
|
269
|
+
mounted.artifactKinds.push(composed);
|
|
270
|
+
}
|
|
271
|
+
into.artifacts = mergeArtifacts(into.artifacts, Object.assign(Object.assign({}, artifacts), { kinds }));
|
|
272
|
+
}
|
|
159
273
|
return mounted;
|
|
160
274
|
});
|
|
161
275
|
}
|
|
162
|
-
function readExtensionTree(ctx, site, mount, root
|
|
276
|
+
function readExtensionTree(ctx, site, mount, root) {
|
|
163
277
|
return __awaiter(this, void 0, void 0, function* () {
|
|
164
278
|
if ("layout" in mount.extension) {
|
|
165
|
-
const
|
|
166
|
-
|
|
279
|
+
const connectionOverlay = site.overlayDir === undefined
|
|
280
|
+
? []
|
|
281
|
+
: yield moduleEntries(ctx, join(site.overlayDir, "mcp-connections"), "connection");
|
|
282
|
+
const plugin = yield readCursorPlugin(ctx, root, site.mountPath, mount.extension.variables, new Set(connectionOverlay.map((entry) => entry.name)));
|
|
283
|
+
if (plugin === undefined) {
|
|
284
|
+
return undefined;
|
|
285
|
+
}
|
|
286
|
+
return Object.assign(Object.assign({}, plugin), { tools: [], hostConnections: [], subagents: [], hooks: [], channels: [], schedules: [], seedFiles: [], abs: [] });
|
|
167
287
|
}
|
|
168
|
-
|
|
288
|
+
return readNativeTree(ctx, root);
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
function readNativeTree(ctx, root) {
|
|
292
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
293
|
+
yield warnAgentRootOnlySlots(ctx, root);
|
|
294
|
+
const connections = yield loadConnections(ctx, join(root, "mcp-connections"));
|
|
169
295
|
return {
|
|
170
296
|
tools: yield loadTools(ctx, join(root, "tools")),
|
|
171
297
|
skills: yield loadSkills(ctx, join(root, "skills")),
|
|
172
|
-
connections
|
|
298
|
+
connections,
|
|
299
|
+
hostConnections: yield loadHostConnections(ctx, root, connections),
|
|
173
300
|
overlaidServers: [],
|
|
174
301
|
agents: [],
|
|
302
|
+
subagents: yield loadSubagents(ctx, join(root, "subagents")),
|
|
303
|
+
hooks: yield loadHooks(ctx, join(root, "hooks")),
|
|
304
|
+
channels: (yield loadChannels(ctx, join(root, "channels"), "extension"))
|
|
305
|
+
.channels,
|
|
306
|
+
schedules: yield loadSchedules(ctx, join(root, "schedules")),
|
|
307
|
+
instructions: yield loadInstructions(ctx, root, undefined, false),
|
|
308
|
+
seedFiles: yield loadSeedFiles(ctx, root),
|
|
309
|
+
abs: yield loadABs(ctx, root),
|
|
310
|
+
artifacts: yield loadArtifacts(ctx, root),
|
|
175
311
|
};
|
|
176
312
|
});
|
|
177
313
|
}
|
|
314
|
+
function namespaceSubagent(composed, child) {
|
|
315
|
+
const oldPreamble = buildIdentityPreamble(child.name);
|
|
316
|
+
let body = child.instructions;
|
|
317
|
+
if (body !== undefined &&
|
|
318
|
+
oldPreamble !== "" &&
|
|
319
|
+
body.startsWith(oldPreamble)) {
|
|
320
|
+
body = body.slice(oldPreamble.length).replace(/^\n+/, "");
|
|
321
|
+
}
|
|
322
|
+
return Object.assign(Object.assign({}, child), { name: composed, instructions: withIdentityPreamble(composed, body) });
|
|
323
|
+
}
|
|
178
324
|
function byName(items) {
|
|
179
325
|
return new Map(items.map((item) => [item.name, item]));
|
|
180
326
|
}
|
|
327
|
+
function byAbSource(items) {
|
|
328
|
+
return new Map(items.map((item) => { var _a; return [(_a = item.source) !== null && _a !== void 0 ? _a : item.name, item]; }));
|
|
329
|
+
}
|
|
330
|
+
function byId(items) {
|
|
331
|
+
return new Map(items.map((item) => [item.id, item]));
|
|
332
|
+
}
|
|
181
333
|
/**
|
|
182
|
-
*
|
|
183
|
-
*
|
|
334
|
+
* Agent-singleton slots: one runtime (`agent.ts`), one storage backend,
|
|
335
|
+
* one OTLP exporter, one A/B platform config. Playground chips are a
|
|
336
|
+
* Vite glob of the agent tree, not a discovery walk. Nested
|
|
337
|
+
* `extensions/` are not mounted.
|
|
184
338
|
*/
|
|
185
|
-
function
|
|
339
|
+
function warnAgentRootOnlySlots(ctx, root) {
|
|
186
340
|
return __awaiter(this, void 0, void 0, function* () {
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
path: displayPath(ctx, path),
|
|
202
|
-
message: `${helperCall(disabledKind)} targets "${name}", which extension "${site.ns}" does not contribute.`,
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
continue;
|
|
206
|
-
}
|
|
207
|
-
const item = yield slot.compile(ctx, path, name, definition);
|
|
208
|
-
if (item !== undefined) {
|
|
209
|
-
contributed.set(name, item);
|
|
341
|
+
const files = [
|
|
342
|
+
["agent.ts", "agent.ts"],
|
|
343
|
+
["storage.ts", "storage"],
|
|
344
|
+
["otel.ts", "otel"],
|
|
345
|
+
["ab.config.ts", "A/B config"],
|
|
346
|
+
];
|
|
347
|
+
for (const [file, label] of files) {
|
|
348
|
+
const path = join(root, file);
|
|
349
|
+
if (yield isFile(path)) {
|
|
350
|
+
ctx.diagnostics.push({
|
|
351
|
+
severity: "warning",
|
|
352
|
+
path: displayPath(ctx, path),
|
|
353
|
+
message: `The agent that mounts this extension owns ${label}; ignoring.`,
|
|
354
|
+
});
|
|
210
355
|
}
|
|
211
356
|
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
["instructions.md", "instructions"],
|
|
219
|
-
["connections", "connections"],
|
|
220
|
-
["mcp-connections", "MCP connections"],
|
|
221
|
-
["hooks", "hooks"],
|
|
222
|
-
["subagents", "subagents"],
|
|
223
|
-
["channels", "channels"],
|
|
224
|
-
["schedules", "schedules"],
|
|
225
|
-
["extensions", "nested extensions"],
|
|
357
|
+
const dirs = [
|
|
358
|
+
[
|
|
359
|
+
"playground",
|
|
360
|
+
"Playground chips are a Vite glob of the agent tree, not an extension slot; ignoring.",
|
|
361
|
+
],
|
|
362
|
+
["extensions", "Nested extensions are not mounted; ignoring."],
|
|
226
363
|
];
|
|
227
|
-
for (const [slot,
|
|
364
|
+
for (const [slot, message] of dirs) {
|
|
228
365
|
const path = join(root, slot);
|
|
229
|
-
if (
|
|
366
|
+
if (yield isDirectory(path)) {
|
|
230
367
|
ctx.diagnostics.push({
|
|
231
368
|
severity: "warning",
|
|
232
369
|
path: displayPath(ctx, path),
|
|
233
|
-
message
|
|
370
|
+
message,
|
|
234
371
|
});
|
|
235
372
|
}
|
|
236
373
|
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { DiscoveredHook } from "../../types.js";
|
|
5
5
|
import { type DiscoveryContext } from "./context.js";
|
|
6
|
-
export declare function loadHooks(ctx: DiscoveryContext, hooksDir: string): Promise<DiscoveredHook[]>;
|
|
6
|
+
export declare function loadHooks(ctx: DiscoveryContext, hooksDir: string, onDisable?: (name: string, path: string) => void): Promise<DiscoveredHook[]>;
|
|
7
7
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/hooks.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/hooks.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,gBAAgB,CAAC;AAErE,OAAO,EAAE,KAAK,gBAAgB,EAAe,MAAM,cAAc,CAAC;AAIlE,wBAAsB,SAAS,CAC7B,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,GAC/C,OAAO,CAAC,cAAc,EAAE,CAAC,CA+C3B"}
|
|
@@ -11,10 +11,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
13
|
import { basename, extname, relative } from "node:path";
|
|
14
|
+
import { getDefinitionKind } from "../brand.js";
|
|
14
15
|
import { displayPath } from "./context.js";
|
|
15
16
|
import { isDirectory, isModuleFile, toPosix, walkFiles } from "./fs.js";
|
|
16
17
|
import { importDefault } from "./modules.js";
|
|
17
|
-
export function loadHooks(ctx, hooksDir) {
|
|
18
|
+
export function loadHooks(ctx, hooksDir, onDisable) {
|
|
18
19
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19
20
|
if (!(yield isDirectory(hooksDir))) {
|
|
20
21
|
return [];
|
|
@@ -26,10 +27,22 @@ export function loadHooks(ctx, hooksDir) {
|
|
|
26
27
|
}
|
|
27
28
|
const rel = toPosix(relative(hooksDir, filePath));
|
|
28
29
|
const name = rel.slice(0, -extname(rel).length);
|
|
29
|
-
|
|
30
|
+
if (name.includes("__")) {
|
|
31
|
+
ctx.diagnostics.push({
|
|
32
|
+
severity: "error",
|
|
33
|
+
path: displayPath(ctx, filePath),
|
|
34
|
+
message: `Hook name "${name}" may not contain "__"; it is reserved for extension contributions (\`<ns>__<name>\`).`,
|
|
35
|
+
});
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
const definition = yield importDefault(ctx, filePath, onDisable === undefined ? "hook" : ["hook", "disabled"]);
|
|
30
39
|
if (definition === undefined) {
|
|
31
40
|
continue;
|
|
32
41
|
}
|
|
42
|
+
if (getDefinitionKind(definition) === "disabled") {
|
|
43
|
+
onDisable === null || onDisable === void 0 ? void 0 : onDisable(name, filePath);
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
33
46
|
const hook = definition;
|
|
34
47
|
if (typeof hook.events !== "object" ||
|
|
35
48
|
hook.events === null ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/info.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAEtB,MAAM,gBAAgB,CAAC;AAKxB,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,gBAAgB,
|
|
1
|
+
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/info.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAEtB,MAAM,gBAAgB,CAAC;AAKxB,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,gBAAgB,CA0KnE"}
|