@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
|
@@ -13,7 +13,7 @@ export const NAME_PATTERN: RegExp = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;
|
|
|
13
13
|
*/
|
|
14
14
|
export function validateName(
|
|
15
15
|
ctx: DiscoveryContext,
|
|
16
|
-
kind: "skill" | "tool" | "extension" | "connection" | "subagent",
|
|
16
|
+
kind: "skill" | "tool" | "extension" | "connection" | "subagent" | "channel",
|
|
17
17
|
name: string,
|
|
18
18
|
entryPath: string
|
|
19
19
|
): boolean {
|
|
@@ -23,6 +23,7 @@ export function validateName(
|
|
|
23
23
|
extension: "Extension",
|
|
24
24
|
connection: "MCP connection",
|
|
25
25
|
subagent: "Subagent",
|
|
26
|
+
channel: "Channel",
|
|
26
27
|
}[kind];
|
|
27
28
|
if (!NAME_PATTERN.test(name)) {
|
|
28
29
|
ctx.diagnostics.push({
|
|
@@ -4,15 +4,23 @@
|
|
|
4
4
|
|
|
5
5
|
import { basename, join, resolve } from "node:path";
|
|
6
6
|
import { httpChannel } from "../../channels.js";
|
|
7
|
-
import type {
|
|
7
|
+
import type {
|
|
8
|
+
AgentProject,
|
|
9
|
+
ArtifactsDefinition,
|
|
10
|
+
Diagnostic,
|
|
11
|
+
} from "../../types.js";
|
|
8
12
|
import { registerAuthoredModuleLoaders } from "../authored-loaders.js";
|
|
9
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
applyAgentContinuationDefaults,
|
|
15
|
+
warnOmittedContinuationDowngrades,
|
|
16
|
+
} from "../continuation-channel.js";
|
|
10
17
|
import { loadABConfig, loadABs } from "./ab.js";
|
|
11
18
|
import { loadAgent, warnUnknownSlots } from "./agent.js";
|
|
12
19
|
import { loadChannels } from "./channels.js";
|
|
13
20
|
import {
|
|
14
21
|
type DiscoveryContext,
|
|
15
22
|
defaultImportModule,
|
|
23
|
+
displayPath,
|
|
16
24
|
type LoadAgentProjectOptions,
|
|
17
25
|
} from "./context.js";
|
|
18
26
|
import {
|
|
@@ -28,7 +36,9 @@ import {
|
|
|
28
36
|
appendArtifactTool,
|
|
29
37
|
loadArtifacts,
|
|
30
38
|
loadOtel,
|
|
39
|
+
loadResult,
|
|
31
40
|
loadStorage,
|
|
41
|
+
mergeArtifacts,
|
|
32
42
|
} from "./services.js";
|
|
33
43
|
|
|
34
44
|
/**
|
|
@@ -170,11 +180,7 @@ function assertSlug(name: string, parentDir: string): string {
|
|
|
170
180
|
}
|
|
171
181
|
|
|
172
182
|
/** URL path segments reserved by the server; agents cannot use them as slugs. */
|
|
173
|
-
|
|
174
|
-
"v1",
|
|
175
|
-
"playground",
|
|
176
|
-
"docs",
|
|
177
|
-
]);
|
|
183
|
+
const RESERVED_SLUGS: Set<string> = new Set(["v1", "playground", "docs"]);
|
|
178
184
|
|
|
179
185
|
export async function loadAgentProject(
|
|
180
186
|
dir: string,
|
|
@@ -208,7 +214,7 @@ export async function loadAgentProject(
|
|
|
208
214
|
};
|
|
209
215
|
|
|
210
216
|
const name = (await readPackageName(rootDir)) ?? basename(rootDir);
|
|
211
|
-
const agent = await loadAgent(ctx, agentDir, {
|
|
217
|
+
const { agent, projectSlots } = await loadAgent(ctx, agentDir, {
|
|
212
218
|
name,
|
|
213
219
|
isRoot: true,
|
|
214
220
|
});
|
|
@@ -217,13 +223,42 @@ export async function loadAgentProject(
|
|
|
217
223
|
ctx,
|
|
218
224
|
join(agentDir, "channels")
|
|
219
225
|
);
|
|
226
|
+
for (const channel of projectSlots.channels) {
|
|
227
|
+
if (channel.id === "http" || channels.some((c) => c.id === channel.id)) {
|
|
228
|
+
ctx.diagnostics.push({
|
|
229
|
+
severity: "error",
|
|
230
|
+
path: displayPath(ctx, join(agentDir, "extensions")),
|
|
231
|
+
message: `Extension channel "${channel.id}" collides with an agent channel.`,
|
|
232
|
+
});
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
channels.push(channel);
|
|
236
|
+
}
|
|
220
237
|
const schedules = await loadSchedules(ctx, join(agentDir, "schedules"));
|
|
238
|
+
schedules.push(...projectSlots.schedules);
|
|
221
239
|
const hooks = await loadHooks(ctx, join(agentDir, "hooks"));
|
|
240
|
+
hooks.push(...projectSlots.hooks);
|
|
222
241
|
const abs = await loadABs(ctx, agentDir);
|
|
242
|
+
for (const experiment of projectSlots.abs) {
|
|
243
|
+
if (abs.some((existing) => existing.name === experiment.name)) {
|
|
244
|
+
ctx.diagnostics.push({
|
|
245
|
+
severity: "error",
|
|
246
|
+
path: displayPath(ctx, join(agentDir, "extensions")),
|
|
247
|
+
message: `Extension A/B experiment "${experiment.name}" collides with an agent experiment.`,
|
|
248
|
+
});
|
|
249
|
+
continue;
|
|
250
|
+
}
|
|
251
|
+
abs.push(experiment);
|
|
252
|
+
}
|
|
223
253
|
const abConfig = await loadABConfig(ctx, agentDir);
|
|
224
254
|
const storage = await loadStorage(ctx, agentDir, agent.architecture);
|
|
225
|
-
const artifacts = await
|
|
255
|
+
const artifacts = await mergeProjectArtifacts(
|
|
256
|
+
ctx,
|
|
257
|
+
agentDir,
|
|
258
|
+
projectSlots.artifacts
|
|
259
|
+
);
|
|
226
260
|
const otel = await loadOtel(ctx, agentDir);
|
|
261
|
+
const result = await loadResult(ctx, agentDir);
|
|
227
262
|
await appendArtifactTool(ctx, agentDir, agent, artifacts);
|
|
228
263
|
|
|
229
264
|
if (agentDir !== rootDir) {
|
|
@@ -231,6 +266,17 @@ export async function loadAgentProject(
|
|
|
231
266
|
}
|
|
232
267
|
|
|
233
268
|
const resolvedHttpChannel = httpChannelDefinition ?? httpChannel();
|
|
269
|
+
warnOmittedContinuationDowngrades({
|
|
270
|
+
architecture: agent.architecture,
|
|
271
|
+
channels,
|
|
272
|
+
warn: (id, message) => {
|
|
273
|
+
ctx.diagnostics.push({
|
|
274
|
+
severity: "warning",
|
|
275
|
+
path: displayPath(ctx, join(agentDir, "channels", `${id}.ts`)),
|
|
276
|
+
message,
|
|
277
|
+
});
|
|
278
|
+
},
|
|
279
|
+
});
|
|
234
280
|
applyAgentContinuationDefaults({
|
|
235
281
|
agent,
|
|
236
282
|
channels,
|
|
@@ -250,11 +296,36 @@ export async function loadAgentProject(
|
|
|
250
296
|
abConfig,
|
|
251
297
|
storage,
|
|
252
298
|
artifacts,
|
|
299
|
+
result,
|
|
253
300
|
otel,
|
|
254
301
|
diagnostics,
|
|
255
302
|
};
|
|
256
303
|
}
|
|
257
304
|
|
|
305
|
+
async function mergeProjectArtifacts(
|
|
306
|
+
ctx: DiscoveryContext,
|
|
307
|
+
agentDir: string,
|
|
308
|
+
extra: ArtifactsDefinition | undefined
|
|
309
|
+
): Promise<ArtifactsDefinition | undefined> {
|
|
310
|
+
const agent = await loadArtifacts(ctx, agentDir);
|
|
311
|
+
if (extra === undefined) {
|
|
312
|
+
return agent;
|
|
313
|
+
}
|
|
314
|
+
const kinds = { ...extra.kinds };
|
|
315
|
+
const agentKinds = agent?.kinds;
|
|
316
|
+
for (const kind of Object.keys(kinds)) {
|
|
317
|
+
if (agentKinds !== undefined && kind in agentKinds) {
|
|
318
|
+
ctx.diagnostics.push({
|
|
319
|
+
severity: "error",
|
|
320
|
+
path: displayPath(ctx, join(agentDir, "extensions")),
|
|
321
|
+
message: `Extension artifact kind "${kind}" collides with an agent kind.`,
|
|
322
|
+
});
|
|
323
|
+
delete kinds[kind];
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
return mergeArtifacts(agent, { ...extra, kinds });
|
|
327
|
+
}
|
|
328
|
+
|
|
258
329
|
/** True when the project has diagnostics that must block serving. */
|
|
259
330
|
export function hasErrorDiagnostics(project: AgentProject): boolean {
|
|
260
331
|
return project.diagnostics.some((d) => d.severity === "error");
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import type { AgentRuntime } from "../../types.js";
|
|
7
|
-
import { builtinTools } from "../builtin-tools/index.js";
|
|
8
7
|
import { type DiscoveryContext, displayPath } from "./context.js";
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -153,7 +152,7 @@ export function warnCloudRuntimeLimitations(
|
|
|
153
152
|
severity: "warning",
|
|
154
153
|
path: displayPath(ctx, join(agentDir, "sandbox")),
|
|
155
154
|
message:
|
|
156
|
-
"sandbox/workspace seed files
|
|
155
|
+
"sandbox/workspace seed files reach cloud agents through the Agent Store, not the checkout: hosted deployments write the deployment store's workspace/ directory; local serve/run with a personal API key writes agent-serve/<agent>/workspace/ on the USER store. The first cloud prompt names the mounted directory. Without a reachable store, cloud turns do not see them.",
|
|
157
156
|
});
|
|
158
157
|
}
|
|
159
158
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { readFile } from "node:fs/promises";
|
|
6
6
|
import { basename, extname, relative } from "node:path";
|
|
7
7
|
import type { DiscoveredSchedule, ScheduleDefinition } from "../../types.js";
|
|
8
|
+
import { getDefinitionKind } from "../brand.js";
|
|
8
9
|
import { isValidCron } from "../cron.js";
|
|
9
10
|
import { parseFrontmatter } from "../frontmatter.js";
|
|
10
11
|
import { type DiscoveryContext, displayPath } from "./context.js";
|
|
@@ -13,7 +14,8 @@ import { importDefault } from "./modules.js";
|
|
|
13
14
|
|
|
14
15
|
export async function loadSchedules(
|
|
15
16
|
ctx: DiscoveryContext,
|
|
16
|
-
schedulesDir: string
|
|
17
|
+
schedulesDir: string,
|
|
18
|
+
onDisable?: (name: string, path: string) => void
|
|
17
19
|
): Promise<DiscoveredSchedule[]> {
|
|
18
20
|
if (!(await isDirectory(schedulesDir))) {
|
|
19
21
|
return [];
|
|
@@ -23,6 +25,14 @@ export async function loadSchedules(
|
|
|
23
25
|
const rel = toPosix(relative(schedulesDir, filePath));
|
|
24
26
|
if (rel.endsWith(".md")) {
|
|
25
27
|
const name = rel.slice(0, -".md".length);
|
|
28
|
+
if (name.includes("__")) {
|
|
29
|
+
ctx.diagnostics.push({
|
|
30
|
+
severity: "error",
|
|
31
|
+
path: displayPath(ctx, filePath),
|
|
32
|
+
message: `Schedule name "${name}" may not contain "__"; it is reserved for extension contributions (\`<ns>__<name>\`).`,
|
|
33
|
+
});
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
26
36
|
const { data, body } = parseFrontmatter(await readFile(filePath, "utf8"));
|
|
27
37
|
const cron = data.cron;
|
|
28
38
|
if (cron === undefined || !isValidCron(cron)) {
|
|
@@ -62,10 +72,26 @@ export async function loadSchedules(
|
|
|
62
72
|
continue;
|
|
63
73
|
}
|
|
64
74
|
const name = rel.slice(0, -extname(rel).length);
|
|
65
|
-
|
|
75
|
+
if (name.includes("__")) {
|
|
76
|
+
ctx.diagnostics.push({
|
|
77
|
+
severity: "error",
|
|
78
|
+
path: displayPath(ctx, filePath),
|
|
79
|
+
message: `Schedule name "${name}" may not contain "__"; it is reserved for extension contributions (\`<ns>__<name>\`).`,
|
|
80
|
+
});
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
const definition = await importDefault(
|
|
84
|
+
ctx,
|
|
85
|
+
filePath,
|
|
86
|
+
onDisable === undefined ? "schedule" : ["schedule", "disabled"]
|
|
87
|
+
);
|
|
66
88
|
if (definition === undefined) {
|
|
67
89
|
continue;
|
|
68
90
|
}
|
|
91
|
+
if (getDefinitionKind(definition) === "disabled") {
|
|
92
|
+
onDisable?.(name, filePath);
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
69
95
|
const schedule = definition as ScheduleDefinition;
|
|
70
96
|
if ((schedule.markdown === undefined) === (schedule.run === undefined)) {
|
|
71
97
|
ctx.diagnostics.push({
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `agent/storage.ts`, `agent/otel.ts`, `agent/artifacts.ts
|
|
2
|
+
* `agent/storage.ts`, `agent/otel.ts`, `agent/artifacts.ts`,
|
|
3
|
+
* `agent/result.ts`: host services the agent configures.
|
|
3
4
|
*/
|
|
4
5
|
|
|
5
6
|
import { join } from "node:path";
|
|
7
|
+
import { defineArtifacts } from "../../artifacts.js";
|
|
6
8
|
import type { OtelDefinition } from "../../otel.js";
|
|
7
9
|
import type { StorageDefinition } from "../../storage.js";
|
|
8
10
|
import type {
|
|
9
11
|
AgentArchitecture,
|
|
10
12
|
ArtifactsDefinition,
|
|
11
13
|
ResolvedAgent,
|
|
14
|
+
ResultDefinition,
|
|
12
15
|
} from "../../types.js";
|
|
13
16
|
import {
|
|
14
17
|
artifactBuiltinTool,
|
|
@@ -92,6 +95,39 @@ export async function loadArtifacts(
|
|
|
92
95
|
return definition;
|
|
93
96
|
}
|
|
94
97
|
|
|
98
|
+
export async function loadResult(
|
|
99
|
+
ctx: DiscoveryContext,
|
|
100
|
+
agentDir: string
|
|
101
|
+
): Promise<ResultDefinition | undefined> {
|
|
102
|
+
const path = await findModuleFile(agentDir, "result");
|
|
103
|
+
if (path === undefined) {
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
const imported = await importDefault(ctx, path, "result");
|
|
107
|
+
if (imported === undefined) {
|
|
108
|
+
return undefined;
|
|
109
|
+
}
|
|
110
|
+
return imported as ResultDefinition;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** Merge namespaced extension kinds onto the agent's artifacts registry. */
|
|
114
|
+
export function mergeArtifacts(
|
|
115
|
+
agent: ArtifactsDefinition | undefined,
|
|
116
|
+
extra: ArtifactsDefinition | undefined
|
|
117
|
+
): ArtifactsDefinition | undefined {
|
|
118
|
+
if (extra === undefined) {
|
|
119
|
+
return agent;
|
|
120
|
+
}
|
|
121
|
+
if (agent === undefined) {
|
|
122
|
+
return extra;
|
|
123
|
+
}
|
|
124
|
+
return defineArtifacts({
|
|
125
|
+
kinds: { ...agent.kinds, ...extra.kinds },
|
|
126
|
+
agentTool: agent.agentTool === true || extra.agentTool === true,
|
|
127
|
+
max: agent.max ?? extra.max,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
95
131
|
/**
|
|
96
132
|
* Materialize the `tag_artifact` built-in when `defineArtifacts` set
|
|
97
133
|
* `agentTool: true`. Appended after `loadAgent` because the tool is
|
|
@@ -10,6 +10,7 @@ import type {
|
|
|
10
10
|
SkillDefinition,
|
|
11
11
|
SkillFileSource,
|
|
12
12
|
} from "../../types.js";
|
|
13
|
+
import { getDefinitionKind } from "../brand.js";
|
|
13
14
|
import { parseFrontmatter } from "../frontmatter.js";
|
|
14
15
|
import { type DiscoveryContext, displayPath, isBlank } from "./context.js";
|
|
15
16
|
import {
|
|
@@ -53,7 +54,8 @@ export async function skillFiles(
|
|
|
53
54
|
|
|
54
55
|
export async function loadSkills(
|
|
55
56
|
ctx: DiscoveryContext,
|
|
56
|
-
skillsDir: string
|
|
57
|
+
skillsDir: string,
|
|
58
|
+
onDisable?: (name: string, path: string) => void
|
|
57
59
|
): Promise<DiscoveredSkill[]> {
|
|
58
60
|
if (!(await isDirectory(skillsDir))) {
|
|
59
61
|
return [];
|
|
@@ -92,10 +94,18 @@ export async function loadSkills(
|
|
|
92
94
|
if (!validateName(ctx, "skill", name, entryPath)) {
|
|
93
95
|
continue;
|
|
94
96
|
}
|
|
95
|
-
const definition = await importDefault(
|
|
97
|
+
const definition = await importDefault(
|
|
98
|
+
ctx,
|
|
99
|
+
entryPath,
|
|
100
|
+
onDisable === undefined ? "skill" : ["skill", "disabled"]
|
|
101
|
+
);
|
|
96
102
|
if (definition === undefined) {
|
|
97
103
|
continue;
|
|
98
104
|
}
|
|
105
|
+
if (getDefinitionKind(definition) === "disabled") {
|
|
106
|
+
onDisable?.(name, entryPath);
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
99
109
|
skills.push(compileSkill(name, definition as SkillDefinition));
|
|
100
110
|
}
|
|
101
111
|
}
|
|
@@ -156,7 +166,7 @@ async function loadPackagedSkill(
|
|
|
156
166
|
* Advertise the first non-empty, non-code-fence line of the body, with any
|
|
157
167
|
* leading `#`, `>`, `*`, or `-` markers stripped.
|
|
158
168
|
*/
|
|
159
|
-
|
|
169
|
+
function deriveSkillDescription(markdown: string): string | undefined {
|
|
160
170
|
let inFence = false;
|
|
161
171
|
for (const rawLine of markdown.split(/\r?\n/)) {
|
|
162
172
|
const line = rawLine.trim();
|
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
* A subagent as the Cursor harness runs it: description, model, and prompt. Its other slots are inert.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { join } from "node:path";
|
|
5
6
|
import type { ModelSetting, ResolvedAgent } from "../../types.js";
|
|
6
7
|
import { withIdentityPreamble } from "../workspace.js";
|
|
8
|
+
import { loadAgentConfig } from "./agent-config.js";
|
|
9
|
+
import { type DiscoveryContext, displayPath } from "./context.js";
|
|
10
|
+
import { findModuleFile, isDirectory, sortedEntries } from "./fs.js";
|
|
11
|
+
import { loadInstructions } from "./instructions.js";
|
|
12
|
+
import { validateName } from "./names.js";
|
|
7
13
|
|
|
8
14
|
interface SubagentFields {
|
|
9
15
|
description?: string;
|
|
@@ -27,3 +33,104 @@ export function subagent(name: string, fields: SubagentFields): ResolvedAgent {
|
|
|
27
33
|
seedFiles: [],
|
|
28
34
|
};
|
|
29
35
|
}
|
|
36
|
+
|
|
37
|
+
export async function loadSubagents(
|
|
38
|
+
ctx: DiscoveryContext,
|
|
39
|
+
subagentsDir: string
|
|
40
|
+
): Promise<ResolvedAgent[]> {
|
|
41
|
+
if (!(await isDirectory(subagentsDir))) {
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
const subagents: ResolvedAgent[] = [];
|
|
45
|
+
for (const entry of await sortedEntries(subagentsDir)) {
|
|
46
|
+
if (!entry.isDirectory()) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const subagentDir = join(subagentsDir, entry.name);
|
|
50
|
+
if (!validateName(ctx, "subagent", entry.name, subagentDir)) {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
subagents.push(await loadSubagent(ctx, subagentDir, entry.name));
|
|
54
|
+
}
|
|
55
|
+
return subagents;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export async function loadSubagent(
|
|
59
|
+
ctx: DiscoveryContext,
|
|
60
|
+
agentDir: string,
|
|
61
|
+
name: string
|
|
62
|
+
): Promise<ResolvedAgent> {
|
|
63
|
+
const config = await loadAgentConfig(ctx, agentDir, false);
|
|
64
|
+
const prompt = await loadInstructions(ctx, agentDir, config, false);
|
|
65
|
+
await warnUnsupportedSubagentSlots(ctx, agentDir);
|
|
66
|
+
if (config?.builtinTools !== undefined) {
|
|
67
|
+
ctx.diagnostics.push({
|
|
68
|
+
severity: "warning",
|
|
69
|
+
path: displayPath(ctx, join(agentDir, "agent.ts")),
|
|
70
|
+
message: "builtinTools is not supported on subagents; ignoring.",
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
if (config?.tools !== undefined) {
|
|
74
|
+
ctx.diagnostics.push({
|
|
75
|
+
severity: "warning",
|
|
76
|
+
path: displayPath(ctx, join(agentDir, "agent.ts")),
|
|
77
|
+
message:
|
|
78
|
+
"tools is not supported on subagents (they keep the harness task-tool toolset); ignoring.",
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
if (config?.architecture !== undefined) {
|
|
82
|
+
ctx.diagnostics.push({
|
|
83
|
+
severity: "warning",
|
|
84
|
+
path: displayPath(ctx, join(agentDir, "agent.ts")),
|
|
85
|
+
message: "architecture is not supported on subagents; ignoring.",
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
const artifactsPath = await findModuleFile(agentDir, "artifacts");
|
|
89
|
+
if (artifactsPath !== undefined) {
|
|
90
|
+
ctx.diagnostics.push({
|
|
91
|
+
severity: "warning",
|
|
92
|
+
path: displayPath(ctx, artifactsPath),
|
|
93
|
+
message: "artifacts are not supported on subagents; ignoring.",
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
const resultPath = await findModuleFile(agentDir, "result");
|
|
97
|
+
if (resultPath !== undefined) {
|
|
98
|
+
ctx.diagnostics.push({
|
|
99
|
+
severity: "warning",
|
|
100
|
+
path: displayPath(ctx, resultPath),
|
|
101
|
+
message: "result is not supported on subagents; ignoring.",
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
return subagent(config?.name ?? name, {
|
|
105
|
+
description: config?.description,
|
|
106
|
+
model: config?.model,
|
|
107
|
+
prompt,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
async function warnUnsupportedSubagentSlots(
|
|
112
|
+
ctx: DiscoveryContext,
|
|
113
|
+
subagentDir: string
|
|
114
|
+
): Promise<void> {
|
|
115
|
+
const unsupported = [
|
|
116
|
+
["tools", "tools"],
|
|
117
|
+
["skills", "skills"],
|
|
118
|
+
["extensions", "extensions"],
|
|
119
|
+
["mcp-connections", "MCP connections"],
|
|
120
|
+
["host-connections", "host MCP connections"],
|
|
121
|
+
["subagents", "nested subagents"],
|
|
122
|
+
["channels", "channels"],
|
|
123
|
+
["schedules", "schedules"],
|
|
124
|
+
["hooks", "hooks"],
|
|
125
|
+
["sandbox", "sandbox files"],
|
|
126
|
+
] as const;
|
|
127
|
+
for (const [slot, label] of unsupported) {
|
|
128
|
+
if (await isDirectory(join(subagentDir, slot))) {
|
|
129
|
+
ctx.diagnostics.push({
|
|
130
|
+
severity: "warning",
|
|
131
|
+
path: displayPath(ctx, join(subagentDir, slot)),
|
|
132
|
+
message: `Subagent ${label} are not supported on the Cursor harness yet; the subagent runs with the parent's execution surface. Ignoring.`,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -2,31 +2,18 @@
|
|
|
2
2
|
* Distribution facts for the running copy of the framework.
|
|
3
3
|
*
|
|
4
4
|
* The package publishes to npm as `@cursor/july` (the pre-launch codename
|
|
5
|
-
* for Agent SDK
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* working via tsconfig paths (source runs) and the runtime alias hooks
|
|
9
|
-
* (compiled runs). Everything that needs to print a package name, print a
|
|
10
|
-
* CLI command, or locate the package root goes through this module.
|
|
5
|
+
* for Agent SDK) with one bin, `agent-sdk`. Everything that needs to print
|
|
6
|
+
* a package name, print a CLI command, locate the package root, or pin
|
|
7
|
+
* `@cursor/july[/x]` to this copy goes through this module.
|
|
11
8
|
*/
|
|
12
9
|
|
|
13
10
|
import { readFileSync } from "node:fs";
|
|
14
|
-
import {
|
|
15
|
-
import { fileURLToPath } from "node:url";
|
|
11
|
+
import { join } from "node:path";
|
|
12
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
16
13
|
|
|
17
14
|
/** Published npm package name (pre-launch codename for Agent SDK). */
|
|
18
15
|
export const PACKAGE_NAME = "@cursor/july";
|
|
19
16
|
|
|
20
|
-
/** Historical monorepo package name; never published, aliased at runtime. */
|
|
21
|
-
export const LEGACY_PACKAGE_NAME = "@anysphere/agent-serve";
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Future public package name; aliased with the same direct-to-running-dist
|
|
25
|
-
* semantics as PACKAGE_NAME so the eventual rename keeps authored imports
|
|
26
|
-
* on the CLI's module identity.
|
|
27
|
-
*/
|
|
28
|
-
export const AGENTKIT_PACKAGE_NAME = "@cursor/agentkit";
|
|
29
|
-
|
|
30
17
|
/**
|
|
31
18
|
* Bracketed product tag for stderr / ServeOptions.logger lines
|
|
32
19
|
* (`[agent-sdk] …`, `[agent-sdk/slack] …`).
|
|
@@ -35,23 +22,8 @@ export const LOG_PRODUCT = "agent-sdk";
|
|
|
35
22
|
export const LOG_PREFIX: string = `[${LOG_PRODUCT}]`;
|
|
36
23
|
export const SLACK_LOG_PREFIX: string = `[${LOG_PRODUCT}/slack]`;
|
|
37
24
|
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
* keep help text and hints copy-pasteable for whichever the user typed.
|
|
41
|
-
*/
|
|
42
|
-
export const CLI_COMMAND_NAME: string = detectCliCommandName();
|
|
43
|
-
|
|
44
|
-
function detectCliCommandName(): string {
|
|
45
|
-
// Only an extensionless `agent-serve` entry (the npm .bin symlink) proves
|
|
46
|
-
// the user typed the legacy alias. Shims that re-exec the real dist script
|
|
47
|
-
// (pnpm/Windows) hand us `agent-serve.js` for both bins, so anything else
|
|
48
|
-
// brands as the primary name.
|
|
49
|
-
const entry = process.argv[1];
|
|
50
|
-
if (entry !== undefined && basename(entry) === "agent-serve") {
|
|
51
|
-
return "agent-serve";
|
|
52
|
-
}
|
|
53
|
-
return "agent-sdk";
|
|
54
|
-
}
|
|
25
|
+
/** The bin name, for help text and copy-pasteable hints. */
|
|
26
|
+
export const CLI_COMMAND_NAME = "agent-sdk";
|
|
55
27
|
|
|
56
28
|
/**
|
|
57
29
|
* True when this module runs from compiled `dist/` output (a published
|
|
@@ -72,14 +44,19 @@ export function packageRootDir(): string {
|
|
|
72
44
|
return fileURLToPath(new URL("../..", import.meta.url));
|
|
73
45
|
}
|
|
74
46
|
|
|
47
|
+
interface PackageManifest {
|
|
48
|
+
version: string;
|
|
49
|
+
exports: Record<string, { import: string }>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function packageManifest(): PackageManifest {
|
|
53
|
+
const raw = readFileSync(join(packageRootDir(), "package.json"), "utf8");
|
|
54
|
+
return JSON.parse(raw) as PackageManifest;
|
|
55
|
+
}
|
|
56
|
+
|
|
75
57
|
/** Version of the running package (from its own package.json). */
|
|
76
58
|
export function packageVersion(): string {
|
|
77
|
-
|
|
78
|
-
new URL("../../package.json", import.meta.url),
|
|
79
|
-
"utf8"
|
|
80
|
-
);
|
|
81
|
-
const parsed = JSON.parse(raw) as { version?: unknown };
|
|
82
|
-
return typeof parsed.version === "string" ? parsed.version : "0.0.0";
|
|
59
|
+
return packageManifest().version;
|
|
83
60
|
}
|
|
84
61
|
|
|
85
62
|
/** Facts `agent-sdk version` / `--version` print. */
|
|
@@ -88,15 +65,12 @@ export interface CliVersionInfo {
|
|
|
88
65
|
name: string;
|
|
89
66
|
/** `package.json` version of this install. */
|
|
90
67
|
version: string;
|
|
91
|
-
/** Bin the process was invoked as (`agent-sdk` / `agent-serve`). */
|
|
92
|
-
cli: string;
|
|
93
68
|
}
|
|
94
69
|
|
|
95
70
|
export function cliVersionInfo(): CliVersionInfo {
|
|
96
71
|
return {
|
|
97
72
|
name: PACKAGE_NAME,
|
|
98
73
|
version: packageVersion(),
|
|
99
|
-
cli: CLI_COMMAND_NAME,
|
|
100
74
|
};
|
|
101
75
|
}
|
|
102
76
|
|
|
@@ -114,43 +88,21 @@ export function formatCliVersion(options?: { json?: boolean }): string {
|
|
|
114
88
|
}
|
|
115
89
|
|
|
116
90
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* `
|
|
120
|
-
*
|
|
121
|
-
* `@cursor/agentkit[/x]` direct targets from this list.
|
|
91
|
+
* `@cursor/july[/subpath]` → `file:` URL of this copy's `import` target,
|
|
92
|
+
* for every subpath in the package `exports` map. The published manifest
|
|
93
|
+
* points at `dist/`; Bazel's staged copy points at the in-place `src/`
|
|
94
|
+
* emit, and the aliases follow whichever the manifest says.
|
|
122
95
|
*/
|
|
123
|
-
export
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
"extensions/cursor-cloud-agents",
|
|
137
|
-
"extensions/cursor-cloud-agents/extension.js",
|
|
138
|
-
],
|
|
139
|
-
["schedules", "schedules.js"],
|
|
140
|
-
["reminders", "reminders.js"],
|
|
141
|
-
["connections", "connections.js"],
|
|
142
|
-
["hooks", "hooks.js"],
|
|
143
|
-
["memory", "memory.js"],
|
|
144
|
-
["prompt", "prompt.js"],
|
|
145
|
-
["evals", "evals.js"],
|
|
146
|
-
["evals/reporters", "evals/reporters.js"],
|
|
147
|
-
["evals/loaders", "evals/loaders.js"],
|
|
148
|
-
["ab", "ab.js"],
|
|
149
|
-
["artifacts", "artifacts.js"],
|
|
150
|
-
["kv", "kv.js"],
|
|
151
|
-
["kv/memory", "kv/memory-kv.js"],
|
|
152
|
-
["storage", "storage.js"],
|
|
153
|
-
["storage/file-kv", "storage-backends/file-kv.js"],
|
|
154
|
-
["storage/cursor-hosted", "storage-backends/cursor-hosted.js"],
|
|
155
|
-
["otel", "otel.js"],
|
|
156
|
-
];
|
|
96
|
+
export function frameworkAliases(): Record<string, string> {
|
|
97
|
+
const root = packageRootDir();
|
|
98
|
+
return Object.fromEntries(
|
|
99
|
+
Object.entries(packageManifest().exports).map(
|
|
100
|
+
([exportPath, { import: file }]) => [
|
|
101
|
+
exportPath === "."
|
|
102
|
+
? PACKAGE_NAME
|
|
103
|
+
: `${PACKAGE_NAME}/${exportPath.slice(2)}`,
|
|
104
|
+
pathToFileURL(join(root, file)).href,
|
|
105
|
+
]
|
|
106
|
+
)
|
|
107
|
+
);
|
|
108
|
+
}
|
|
@@ -245,7 +245,7 @@ function fallbackHtml(): string {
|
|
|
245
245
|
<head>
|
|
246
246
|
<meta charset="utf-8" />
|
|
247
247
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
248
|
-
<title>agent-
|
|
248
|
+
<title>agent-sdk docs</title>
|
|
249
249
|
<style>
|
|
250
250
|
body { margin: 0; background: #0e1116; color: #e6edf3; font: 14px/1.6 ui-sans-serif, system-ui, sans-serif; }
|
|
251
251
|
.box { max-width: 640px; margin: 64px auto; padding: 0 24px; }
|
|
@@ -23,13 +23,6 @@ import {
|
|
|
23
23
|
runDiscoveredEvals,
|
|
24
24
|
} from "./eval-runner.js";
|
|
25
25
|
|
|
26
|
-
export type {
|
|
27
|
-
EvalBatchStatus,
|
|
28
|
-
EvalCaseRunStatus as EvalCaseStatus,
|
|
29
|
-
EvalCaseSnapshot,
|
|
30
|
-
EvalRunSnapshot,
|
|
31
|
-
} from "../evals.js";
|
|
32
|
-
|
|
33
26
|
/**
|
|
34
27
|
* Durable mirror for playground eval batches — the `StorageCoordinator`
|
|
35
28
|
* adapter over the `defineStorage` `evals` table. Writes are
|