@grok/agent-sdk 0.0.0-stage → 0.2.28
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 +341 -0
- package/CHANGELOG.md +3 -0
- package/LICENSE.md +3 -0
- package/README.md +104 -2
- package/dist/agent-v2-hosting.d.ts +13 -0
- package/dist/agent-v2-hosting.d.ts.map +1 -0
- package/dist/agent-v2-hosting.js +8 -0
- package/dist/artifacts.d.ts +37 -0
- package/dist/artifacts.d.ts.map +1 -0
- package/dist/artifacts.js +52 -0
- package/dist/bin/agent-serve.d.ts +8 -0
- package/dist/bin/agent-serve.d.ts.map +1 -0
- package/dist/bin/agent-serve.js +105 -0
- package/dist/channels/bitbucket/api.d.ts +217 -0
- package/dist/channels/bitbucket/api.d.ts.map +1 -0
- package/dist/channels/bitbucket/api.js +648 -0
- package/dist/channels/bitbucket/binding.d.ts +75 -0
- package/dist/channels/bitbucket/binding.d.ts.map +1 -0
- package/dist/channels/bitbucket/binding.js +313 -0
- package/dist/channels/bitbucket/bitbucket-channel.d.ts +47 -0
- package/dist/channels/bitbucket/bitbucket-channel.d.ts.map +1 -0
- package/dist/channels/bitbucket/bitbucket-channel.js +174 -0
- package/dist/channels/bitbucket/bitbucket-webhook.d.ts +73 -0
- package/dist/channels/bitbucket/bitbucket-webhook.d.ts.map +1 -0
- package/dist/channels/bitbucket/bitbucket-webhook.js +402 -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 +94 -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 +77 -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 +59 -0
- package/dist/channels/bitbucket/index.d.ts +38 -0
- package/dist/channels/bitbucket/index.d.ts.map +1 -0
- package/dist/channels/bitbucket/index.js +37 -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 +327 -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 +30 -0
- package/dist/channels/bitbucket/types.d.ts +236 -0
- package/dist/channels/bitbucket/types.d.ts.map +1 -0
- package/dist/channels/bitbucket/types.js +1 -0
- package/dist/channels/change-monitors/change-monitors-channel.d.ts +5 -0
- package/dist/channels/change-monitors/change-monitors-channel.d.ts.map +1 -0
- package/dist/channels/change-monitors/change-monitors-channel.js +58 -0
- package/dist/channels/change-monitors/claim.d.ts +5 -0
- package/dist/channels/change-monitors/claim.d.ts.map +1 -0
- package/dist/channels/change-monitors/claim.js +6 -0
- package/dist/channels/change-monitors/index.d.ts +5 -0
- package/dist/channels/change-monitors/index.d.ts.map +1 -0
- package/dist/channels/change-monitors/index.js +3 -0
- package/dist/channels/change-monitors/types.d.ts +42 -0
- package/dist/channels/change-monitors/types.d.ts.map +1 -0
- package/dist/channels/change-monitors/types.js +1 -0
- package/dist/channels/checks.d.ts +121 -0
- package/dist/channels/checks.d.ts.map +1 -0
- package/dist/channels/checks.js +76 -0
- package/dist/channels/deployments/deployments-channel.d.ts +95 -0
- package/dist/channels/deployments/deployments-channel.d.ts.map +1 -0
- package/dist/channels/deployments/deployments-channel.js +188 -0
- package/dist/channels/deployments/index.d.ts +25 -0
- package/dist/channels/deployments/index.d.ts.map +1 -0
- package/dist/channels/deployments/index.js +24 -0
- package/dist/channels/deployments/types.d.ts +83 -0
- package/dist/channels/deployments/types.d.ts.map +1 -0
- package/dist/channels/deployments/types.js +7 -0
- package/dist/channels/github/api.d.ts +144 -0
- package/dist/channels/github/api.d.ts.map +1 -0
- package/dist/channels/github/api.js +398 -0
- package/dist/channels/github/auth.d.ts +71 -0
- package/dist/channels/github/auth.d.ts.map +1 -0
- package/dist/channels/github/auth.js +247 -0
- package/dist/channels/github/binding.d.ts +88 -0
- package/dist/channels/github/binding.d.ts.map +1 -0
- package/dist/channels/github/binding.js +130 -0
- package/dist/channels/github/checks.d.ts +64 -0
- package/dist/channels/github/checks.d.ts.map +1 -0
- package/dist/channels/github/checks.js +93 -0
- package/dist/channels/github/cursor-account.d.ts +109 -0
- package/dist/channels/github/cursor-account.d.ts.map +1 -0
- package/dist/channels/github/cursor-account.js +206 -0
- package/dist/channels/github/defaults.d.ts +23 -0
- package/dist/channels/github/defaults.d.ts.map +1 -0
- package/dist/channels/github/defaults.js +132 -0
- package/dist/channels/github/events.d.ts +18 -0
- package/dist/channels/github/events.d.ts.map +1 -0
- package/dist/channels/github/events.js +56 -0
- package/dist/channels/github/forward.d.ts +139 -0
- package/dist/channels/github/forward.d.ts.map +1 -0
- package/dist/channels/github/forward.js +263 -0
- package/dist/channels/github/github-channel.d.ts +192 -0
- package/dist/channels/github/github-channel.d.ts.map +1 -0
- package/dist/channels/github/github-channel.js +2098 -0
- package/dist/channels/github/index.d.ts +64 -0
- package/dist/channels/github/index.d.ts.map +1 -0
- package/dist/channels/github/index.js +52 -0
- package/dist/channels/github/progress.d.ts +84 -0
- package/dist/channels/github/progress.d.ts.map +1 -0
- package/dist/channels/github/progress.js +239 -0
- package/dist/channels/github/replay.d.ts +115 -0
- package/dist/channels/github/replay.d.ts.map +1 -0
- package/dist/channels/github/replay.js +269 -0
- package/dist/channels/github/state.d.ts +47 -0
- package/dist/channels/github/state.d.ts.map +1 -0
- package/dist/channels/github/state.js +77 -0
- package/dist/channels/github/types.d.ts +515 -0
- package/dist/channels/github/types.d.ts.map +1 -0
- package/dist/channels/github/types.js +1 -0
- package/dist/channels/gitlab/api.d.ts +118 -0
- package/dist/channels/gitlab/api.d.ts.map +1 -0
- package/dist/channels/gitlab/api.js +231 -0
- package/dist/channels/gitlab/binding.d.ts +63 -0
- package/dist/channels/gitlab/binding.d.ts.map +1 -0
- package/dist/channels/gitlab/binding.js +165 -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 +125 -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 +64 -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 +61 -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 +26 -0
- package/dist/channels/gitlab/gitlab-channel.d.ts +48 -0
- package/dist/channels/gitlab/gitlab-channel.d.ts.map +1 -0
- package/dist/channels/gitlab/gitlab-channel.js +170 -0
- package/dist/channels/gitlab/gitlab-webhook.d.ts +54 -0
- package/dist/channels/gitlab/gitlab-webhook.d.ts.map +1 -0
- package/dist/channels/gitlab/gitlab-webhook.js +424 -0
- package/dist/channels/gitlab/index.d.ts +35 -0
- package/dist/channels/gitlab/index.d.ts.map +1 -0
- package/dist/channels/gitlab/index.js +34 -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 +224 -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 +31 -0
- package/dist/channels/gitlab/types.d.ts +222 -0
- package/dist/channels/gitlab/types.d.ts.map +1 -0
- package/dist/channels/gitlab/types.js +1 -0
- package/dist/channels/issues/claim.d.ts +5 -0
- package/dist/channels/issues/claim.d.ts.map +1 -0
- package/dist/channels/issues/claim.js +6 -0
- package/dist/channels/issues/index.d.ts +5 -0
- package/dist/channels/issues/index.d.ts.map +1 -0
- package/dist/channels/issues/index.js +3 -0
- package/dist/channels/issues/issues-channel.d.ts +5 -0
- package/dist/channels/issues/issues-channel.d.ts.map +1 -0
- package/dist/channels/issues/issues-channel.js +48 -0
- package/dist/channels/issues/types.d.ts +33 -0
- package/dist/channels/issues/types.d.ts.map +1 -0
- package/dist/channels/issues/types.js +1 -0
- package/dist/channels/origin/api.d.ts +157 -0
- package/dist/channels/origin/api.d.ts.map +1 -0
- package/dist/channels/origin/api.js +363 -0
- package/dist/channels/origin/binding.d.ts +57 -0
- package/dist/channels/origin/binding.d.ts.map +1 -0
- package/dist/channels/origin/binding.js +56 -0
- package/dist/channels/origin/checks.d.ts +119 -0
- package/dist/channels/origin/checks.d.ts.map +1 -0
- package/dist/channels/origin/checks.js +147 -0
- package/dist/channels/origin/cursor-account.d.ts +24 -0
- package/dist/channels/origin/cursor-account.d.ts.map +1 -0
- package/dist/channels/origin/cursor-account.js +35 -0
- package/dist/channels/origin/defaults.d.ts +43 -0
- package/dist/channels/origin/defaults.d.ts.map +1 -0
- package/dist/channels/origin/defaults.js +94 -0
- package/dist/channels/origin/events.d.ts +10 -0
- package/dist/channels/origin/events.d.ts.map +1 -0
- package/dist/channels/origin/events.js +25 -0
- package/dist/channels/origin/index.d.ts +45 -0
- package/dist/channels/origin/index.d.ts.map +1 -0
- package/dist/channels/origin/index.js +33 -0
- package/dist/channels/origin/origin-channel.d.ts +72 -0
- package/dist/channels/origin/origin-channel.d.ts.map +1 -0
- package/dist/channels/origin/origin-channel.js +628 -0
- package/dist/channels/origin/origin-webhook.d.ts +69 -0
- package/dist/channels/origin/origin-webhook.d.ts.map +1 -0
- package/dist/channels/origin/origin-webhook.js +210 -0
- package/dist/channels/origin/reactions.d.ts +56 -0
- package/dist/channels/origin/reactions.d.ts.map +1 -0
- package/dist/channels/origin/reactions.js +46 -0
- package/dist/channels/origin/state.d.ts +32 -0
- package/dist/channels/origin/state.d.ts.map +1 -0
- package/dist/channels/origin/state.js +31 -0
- package/dist/channels/origin/types.d.ts +257 -0
- package/dist/channels/origin/types.d.ts.map +1 -0
- package/dist/channels/origin/types.js +1 -0
- package/dist/channels/pagerduty/api.d.ts +74 -0
- package/dist/channels/pagerduty/api.d.ts.map +1 -0
- package/dist/channels/pagerduty/api.js +102 -0
- package/dist/channels/pagerduty/defaults.d.ts +42 -0
- package/dist/channels/pagerduty/defaults.d.ts.map +1 -0
- package/dist/channels/pagerduty/defaults.js +132 -0
- package/dist/channels/pagerduty/events.d.ts +24 -0
- package/dist/channels/pagerduty/events.d.ts.map +1 -0
- package/dist/channels/pagerduty/events.js +38 -0
- package/dist/channels/pagerduty/index.d.ts +31 -0
- package/dist/channels/pagerduty/index.d.ts.map +1 -0
- package/dist/channels/pagerduty/index.js +30 -0
- package/dist/channels/pagerduty/pagerduty-channel.d.ts +64 -0
- package/dist/channels/pagerduty/pagerduty-channel.d.ts.map +1 -0
- package/dist/channels/pagerduty/pagerduty-channel.js +196 -0
- package/dist/channels/pagerduty/pagerduty-webhook.d.ts +70 -0
- package/dist/channels/pagerduty/pagerduty-webhook.d.ts.map +1 -0
- package/dist/channels/pagerduty/pagerduty-webhook.js +289 -0
- package/dist/channels/pagerduty/payload.d.ts +33 -0
- package/dist/channels/pagerduty/payload.d.ts.map +1 -0
- package/dist/channels/pagerduty/payload.js +149 -0
- package/dist/channels/pagerduty/replay.d.ts +35 -0
- package/dist/channels/pagerduty/replay.d.ts.map +1 -0
- package/dist/channels/pagerduty/replay.js +118 -0
- package/dist/channels/pagerduty/secrets.d.ts +16 -0
- package/dist/channels/pagerduty/secrets.d.ts.map +1 -0
- package/dist/channels/pagerduty/secrets.js +23 -0
- package/dist/channels/pagerduty/self-user.d.ts +51 -0
- package/dist/channels/pagerduty/self-user.d.ts.map +1 -0
- package/dist/channels/pagerduty/self-user.js +156 -0
- package/dist/channels/pagerduty/state.d.ts +31 -0
- package/dist/channels/pagerduty/state.d.ts.map +1 -0
- package/dist/channels/pagerduty/state.js +30 -0
- package/dist/channels/pagerduty/types.d.ts +217 -0
- package/dist/channels/pagerduty/types.d.ts.map +1 -0
- package/dist/channels/pagerduty/types.js +1 -0
- package/dist/channels/runs/index.d.ts +4 -0
- package/dist/channels/runs/index.d.ts.map +1 -0
- package/dist/channels/runs/index.js +2 -0
- package/dist/channels/runs/runs-channel.d.ts +5 -0
- package/dist/channels/runs/runs-channel.d.ts.map +1 -0
- package/dist/channels/runs/runs-channel.js +40 -0
- package/dist/channels/runs/types.d.ts +34 -0
- package/dist/channels/runs/types.d.ts.map +1 -0
- package/dist/channels/runs/types.js +1 -0
- package/dist/channels/slack/agentic-delivery.d.ts +43 -0
- package/dist/channels/slack/agentic-delivery.d.ts.map +1 -0
- package/dist/channels/slack/agentic-delivery.js +575 -0
- package/dist/channels/slack/agentic-posted.d.ts +30 -0
- package/dist/channels/slack/agentic-posted.d.ts.map +1 -0
- package/dist/channels/slack/agentic-posted.js +101 -0
- package/dist/channels/slack/agentic-signals.d.ts +45 -0
- package/dist/channels/slack/agentic-signals.d.ts.map +1 -0
- package/dist/channels/slack/agentic-signals.js +216 -0
- package/dist/channels/slack/api.d.ts +172 -0
- package/dist/channels/slack/api.d.ts.map +1 -0
- package/dist/channels/slack/api.js +641 -0
- package/dist/channels/slack/approvals.d.ts +48 -0
- package/dist/channels/slack/approvals.d.ts.map +1 -0
- package/dist/channels/slack/approvals.js +234 -0
- package/dist/channels/slack/assistant.d.ts +23 -0
- package/dist/channels/slack/assistant.d.ts.map +1 -0
- package/dist/channels/slack/assistant.js +57 -0
- package/dist/channels/slack/attachments.d.ts +85 -0
- package/dist/channels/slack/attachments.d.ts.map +1 -0
- package/dist/channels/slack/attachments.js +532 -0
- package/dist/channels/slack/auth.d.ts +46 -0
- package/dist/channels/slack/auth.d.ts.map +1 -0
- package/dist/channels/slack/auth.js +99 -0
- package/dist/channels/slack/blocks.d.ts +61 -0
- package/dist/channels/slack/blocks.d.ts.map +1 -0
- package/dist/channels/slack/blocks.js +90 -0
- package/dist/channels/slack/bot-mentions.d.ts +108 -0
- package/dist/channels/slack/bot-mentions.d.ts.map +1 -0
- package/dist/channels/slack/bot-mentions.js +241 -0
- package/dist/channels/slack/channel-watch.d.ts +80 -0
- package/dist/channels/slack/channel-watch.d.ts.map +1 -0
- package/dist/channels/slack/channel-watch.js +264 -0
- package/dist/channels/slack/cli-project.d.ts +19 -0
- package/dist/channels/slack/cli-project.d.ts.map +1 -0
- package/dist/channels/slack/cli-project.js +200 -0
- package/dist/channels/slack/code-fences.d.ts +17 -0
- package/dist/channels/slack/code-fences.d.ts.map +1 -0
- package/dist/channels/slack/code-fences.js +164 -0
- package/dist/channels/slack/constants.d.ts +34 -0
- package/dist/channels/slack/constants.d.ts.map +1 -0
- package/dist/channels/slack/constants.js +44 -0
- package/dist/channels/slack/credentials.d.ts +35 -0
- package/dist/channels/slack/credentials.d.ts.map +1 -0
- package/dist/channels/slack/credentials.js +73 -0
- package/dist/channels/slack/defaults.d.ts +62 -0
- package/dist/channels/slack/defaults.d.ts.map +1 -0
- package/dist/channels/slack/defaults.js +600 -0
- package/dist/channels/slack/dispatch.d.ts +159 -0
- package/dist/channels/slack/dispatch.d.ts.map +1 -0
- package/dist/channels/slack/dispatch.js +895 -0
- package/dist/channels/slack/doctor.d.ts +40 -0
- package/dist/channels/slack/doctor.d.ts.map +1 -0
- package/dist/channels/slack/doctor.js +277 -0
- package/dist/channels/slack/eval-directive.d.ts +59 -0
- package/dist/channels/slack/eval-directive.d.ts.map +1 -0
- package/dist/channels/slack/eval-directive.js +252 -0
- package/dist/channels/slack/event-id-dedupe.d.ts +10 -0
- package/dist/channels/slack/event-id-dedupe.d.ts.map +1 -0
- package/dist/channels/slack/event-id-dedupe.js +23 -0
- package/dist/channels/slack/external-policy.d.ts +28 -0
- package/dist/channels/slack/external-policy.d.ts.map +1 -0
- package/dist/channels/slack/external-policy.js +51 -0
- package/dist/channels/slack/footer.d.ts +33 -0
- package/dist/channels/slack/footer.d.ts.map +1 -0
- package/dist/channels/slack/footer.js +72 -0
- package/dist/channels/slack/inbound.d.ts +111 -0
- package/dist/channels/slack/inbound.d.ts.map +1 -0
- package/dist/channels/slack/inbound.js +371 -0
- package/dist/channels/slack/index.d.ts +56 -0
- package/dist/channels/slack/index.d.ts.map +1 -0
- package/dist/channels/slack/index.js +55 -0
- package/dist/channels/slack/init.d.ts +43 -0
- package/dist/channels/slack/init.d.ts.map +1 -0
- package/dist/channels/slack/init.js +117 -0
- package/dist/channels/slack/interactive.d.ts +78 -0
- package/dist/channels/slack/interactive.d.ts.map +1 -0
- package/dist/channels/slack/interactive.js +299 -0
- package/dist/channels/slack/links.d.ts +10 -0
- package/dist/channels/slack/links.d.ts.map +1 -0
- package/dist/channels/slack/links.js +18 -0
- package/dist/channels/slack/live-delivery.d.ts +80 -0
- package/dist/channels/slack/live-delivery.d.ts.map +1 -0
- package/dist/channels/slack/live-delivery.js +386 -0
- package/dist/channels/slack/log.d.ts +25 -0
- package/dist/channels/slack/log.d.ts.map +1 -0
- package/dist/channels/slack/log.js +44 -0
- package/dist/channels/slack/manifest.d.ts +80 -0
- package/dist/channels/slack/manifest.d.ts.map +1 -0
- package/dist/channels/slack/manifest.js +189 -0
- package/dist/channels/slack/message-body.d.ts +13 -0
- package/dist/channels/slack/message-body.d.ts.map +1 -0
- package/dist/channels/slack/message-body.js +72 -0
- package/dist/channels/slack/nudge-carrier.d.ts +21 -0
- package/dist/channels/slack/nudge-carrier.d.ts.map +1 -0
- package/dist/channels/slack/nudge-carrier.js +227 -0
- package/dist/channels/slack/nudge-store.d.ts +77 -0
- package/dist/channels/slack/nudge-store.d.ts.map +1 -0
- package/dist/channels/slack/nudge-store.js +293 -0
- package/dist/channels/slack/paint-start.d.ts +22 -0
- package/dist/channels/slack/paint-start.d.ts.map +1 -0
- package/dist/channels/slack/paint-start.js +76 -0
- package/dist/channels/slack/placeholder.d.ts +65 -0
- package/dist/channels/slack/placeholder.d.ts.map +1 -0
- package/dist/channels/slack/placeholder.js +238 -0
- package/dist/channels/slack/pr-ref.d.ts +24 -0
- package/dist/channels/slack/pr-ref.d.ts.map +1 -0
- package/dist/channels/slack/pr-ref.js +55 -0
- package/dist/channels/slack/progress-delivery.d.ts +28 -0
- package/dist/channels/slack/progress-delivery.d.ts.map +1 -0
- package/dist/channels/slack/progress-delivery.js +109 -0
- package/dist/channels/slack/reasoning-card.d.ts +38 -0
- package/dist/channels/slack/reasoning-card.d.ts.map +1 -0
- package/dist/channels/slack/reasoning-card.js +90 -0
- package/dist/channels/slack/reasoning-chip.d.ts +8 -0
- package/dist/channels/slack/reasoning-chip.d.ts.map +1 -0
- package/dist/channels/slack/reasoning-chip.js +30 -0
- package/dist/channels/slack/recording-sink.d.ts +29 -0
- package/dist/channels/slack/recording-sink.d.ts.map +1 -0
- package/dist/channels/slack/recording-sink.js +129 -0
- package/dist/channels/slack/redact.d.ts +2 -0
- package/dist/channels/slack/redact.d.ts.map +1 -0
- package/dist/channels/slack/redact.js +5 -0
- package/dist/channels/slack/reply-options.d.ts +56 -0
- package/dist/channels/slack/reply-options.d.ts.map +1 -0
- package/dist/channels/slack/reply-options.js +218 -0
- package/dist/channels/slack/self-identity.d.ts +18 -0
- package/dist/channels/slack/self-identity.d.ts.map +1 -0
- package/dist/channels/slack/self-identity.js +49 -0
- package/dist/channels/slack/sender-name.d.ts +26 -0
- package/dist/channels/slack/sender-name.d.ts.map +1 -0
- package/dist/channels/slack/sender-name.js +78 -0
- package/dist/channels/slack/setup.d.ts +33 -0
- package/dist/channels/slack/setup.d.ts.map +1 -0
- package/dist/channels/slack/setup.js +99 -0
- package/dist/channels/slack/slack-channel.d.ts +44 -0
- package/dist/channels/slack/slack-channel.d.ts.map +1 -0
- package/dist/channels/slack/slack-channel.js +660 -0
- package/dist/channels/slack/socket-mode.d.ts +26 -0
- package/dist/channels/slack/socket-mode.d.ts.map +1 -0
- package/dist/channels/slack/socket-mode.js +100 -0
- package/dist/channels/slack/stop.d.ts +14 -0
- package/dist/channels/slack/stop.d.ts.map +1 -0
- package/dist/channels/slack/stop.js +22 -0
- package/dist/channels/slack/stream.d.ts +42 -0
- package/dist/channels/slack/stream.d.ts.map +1 -0
- package/dist/channels/slack/stream.js +30 -0
- package/dist/channels/slack/thread-context.d.ts +89 -0
- package/dist/channels/slack/thread-context.d.ts.map +1 -0
- package/dist/channels/slack/thread-context.js +454 -0
- package/dist/channels/slack/tool-approval-events.d.ts +38 -0
- package/dist/channels/slack/tool-approval-events.d.ts.map +1 -0
- package/dist/channels/slack/tool-approval-events.js +207 -0
- package/dist/channels/slack/tool-cards.d.ts +22 -0
- package/dist/channels/slack/tool-cards.d.ts.map +1 -0
- package/dist/channels/slack/tool-cards.js +171 -0
- package/dist/channels/slack/tool-chip.d.ts +9 -0
- package/dist/channels/slack/tool-chip.d.ts.map +1 -0
- package/dist/channels/slack/tool-chip.js +22 -0
- package/dist/channels/slack/types.d.ts +826 -0
- package/dist/channels/slack/types.d.ts.map +1 -0
- package/dist/channels/slack/types.js +4 -0
- package/dist/channels/slack/upload.d.ts +15 -0
- package/dist/channels/slack/upload.d.ts.map +1 -0
- package/dist/channels/slack/upload.js +159 -0
- package/dist/channels/slack/user-info.d.ts +16 -0
- package/dist/channels/slack/user-info.d.ts.map +1 -0
- package/dist/channels/slack/user-info.js +55 -0
- package/dist/channels.d.ts +188 -0
- package/dist/channels.d.ts.map +1 -0
- package/dist/channels.js +448 -0
- package/dist/connections.d.ts +160 -0
- package/dist/connections.d.ts.map +1 -0
- package/dist/connections.js +185 -0
- package/dist/dashboard-session-url.d.ts +15 -0
- package/dist/dashboard-session-url.d.ts.map +1 -0
- package/dist/dashboard-session-url.js +24 -0
- package/dist/docs/404.html +24 -0
- package/dist/docs/architecture.svg +59 -0
- package/dist/docs/assets/app.DF9vlcdn.js +309 -0
- package/dist/docs/assets/building-with-agents.md.Bf1yH2tG.js +9 -0
- package/dist/docs/assets/building-with-agents.md.Bf1yH2tG.lean.js +1 -0
- package/dist/docs/assets/changelog.md.fZ-NNFeJ.js +1 -0
- package/dist/docs/assets/changelog.md.fZ-NNFeJ.lean.js +1 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.mfzjiOsL.js +1 -0
- package/dist/docs/assets/chunks/VPLocalSearchBox.D8OuwKO0.js +9 -0
- package/dist/docs/assets/chunks/arc.DCq_TCYV.js +1 -0
- package/dist/docs/assets/chunks/architectureDiagram-Q4EWVU46.PWRNTPbk.js +36 -0
- package/dist/docs/assets/chunks/baseUniq.BeRPvRUL.js +1 -0
- package/dist/docs/assets/chunks/blockDiagram-DXYQGD6D.BuRmZVSo.js +132 -0
- package/dist/docs/assets/chunks/c4Diagram-AHTNJAMY.7DKSMwuv.js +10 -0
- package/dist/docs/assets/chunks/channel.goFR5lbe.js +1 -0
- package/dist/docs/assets/chunks/chunk-4BX2VUAB.7VrO9-9i.js +1 -0
- package/dist/docs/assets/chunks/chunk-4TB4RGXK.CHystNE2.js +206 -0
- package/dist/docs/assets/chunks/chunk-55IACEB6.Nuh9TbTq.js +1 -0
- package/dist/docs/assets/chunks/chunk-EDXVE4YY.CA0EKugm.js +1 -0
- package/dist/docs/assets/chunks/chunk-FMBD7UC4.F9_mp7U8.js +15 -0
- package/dist/docs/assets/chunks/chunk-OYMX7WX6.CEU4QfE1.js +231 -0
- package/dist/docs/assets/chunks/chunk-QZHKN3VN.B8h_x9_i.js +1 -0
- package/dist/docs/assets/chunks/chunk-YZCP3GAM.Btfb-rKg.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.B2yLtFja.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.B2yLtFja.js +1 -0
- package/dist/docs/assets/chunks/clone.CztV97Wu.js +1 -0
- package/dist/docs/assets/chunks/cose-bilkent-S5V4N54A.DKvc96Wa.js +1 -0
- package/dist/docs/assets/chunks/cytoscape.esm.BQk4lpUV.js +331 -0
- package/dist/docs/assets/chunks/dagre-KV5264BT.CMo0cy1b.js +4 -0
- package/dist/docs/assets/chunks/defaultLocale.C4B-KCzX.js +1 -0
- package/dist/docs/assets/chunks/diagram-5BDNPKRD.DDgMOQhB.js +10 -0
- package/dist/docs/assets/chunks/diagram-G4DWMVQ6.BdJnoIsU.js +24 -0
- package/dist/docs/assets/chunks/diagram-MMDJMWI5.oSvhAZaL.js +43 -0
- package/dist/docs/assets/chunks/diagram-TYMM5635.C9zZLIE-.js +24 -0
- package/dist/docs/assets/chunks/erDiagram-SMLLAGMA.BNhVyccy.js +85 -0
- package/dist/docs/assets/chunks/flowDiagram-DWJPFMVM.BEFLLBiU.js +162 -0
- package/dist/docs/assets/chunks/framework.BNw1pucY.js +19 -0
- package/dist/docs/assets/chunks/ganttDiagram-T4ZO3ILL.BdUzXBgY.js +292 -0
- package/dist/docs/assets/chunks/gitGraphDiagram-UUTBAWPF.Rd3LlOIJ.js +106 -0
- package/dist/docs/assets/chunks/graph.DnJC1GpG.js +1 -0
- package/dist/docs/assets/chunks/infoDiagram-42DDH7IO.xv0xntDJ.js +2 -0
- package/dist/docs/assets/chunks/init.Gi6I4Gst.js +1 -0
- package/dist/docs/assets/chunks/ishikawaDiagram-UXIWVN3A.BaGIlviU.js +70 -0
- package/dist/docs/assets/chunks/journeyDiagram-VCZTEJTY.Cof_h0fp.js +139 -0
- package/dist/docs/assets/chunks/kanban-definition-6JOO6SKY.C5GozFuU.js +89 -0
- package/dist/docs/assets/chunks/katex.DkKDou_j.js +257 -0
- package/dist/docs/assets/chunks/layout.zc9UShLc.js +1 -0
- package/dist/docs/assets/chunks/linear.BoqrFVcJ.js +1 -0
- package/dist/docs/assets/chunks/min.DwIfr8hG.js +1 -0
- package/dist/docs/assets/chunks/mindmap-definition-QFDTVHPH.Dkq2yTtp.js +96 -0
- package/dist/docs/assets/chunks/ordinal.DBvzRdQf.js +1 -0
- package/dist/docs/assets/chunks/pieDiagram-DEJITSTG.B4CpTmHK.js +30 -0
- package/dist/docs/assets/chunks/quadrantDiagram-34T5L4WZ.BqXnFC9C.js +7 -0
- package/dist/docs/assets/chunks/requirementDiagram-MS252O5E.DhIN2z-E.js +84 -0
- package/dist/docs/assets/chunks/sankeyDiagram-XADWPNL6.BhxUAmg2.js +10 -0
- package/dist/docs/assets/chunks/sequenceDiagram-FGHM5R23.BqgU7HU-.js +157 -0
- package/dist/docs/assets/chunks/stateDiagram-FHFEXIEX.B1BCO18N.js +1 -0
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CZlVHdDZ.js +1 -0
- package/dist/docs/assets/chunks/theme.oV7rddEz.js +2 -0
- package/dist/docs/assets/chunks/timeline-definition-GMOUNBTQ.oRI8UwMC.js +120 -0
- package/dist/docs/assets/chunks/vennDiagram-DHZGUBPP.DmuWrIxN.js +34 -0
- package/dist/docs/assets/chunks/virtual_mermaid-config.DDnGl6nM.js +1 -0
- package/dist/docs/assets/chunks/wardley-RL74JXVD.CEBjM5ov.js +162 -0
- package/dist/docs/assets/chunks/wardleyDiagram-NUSXRM2D.m5zsCOF9.js +20 -0
- package/dist/docs/assets/chunks/xychartDiagram-5P7HB3ND.cPN-587n.js +7 -0
- package/dist/docs/assets/deployment.md.DDmjAVbg.js +31 -0
- package/dist/docs/assets/deployment.md.DDmjAVbg.lean.js +1 -0
- package/dist/docs/assets/evals.md.OjKb7tNA.js +68 -0
- package/dist/docs/assets/evals.md.OjKb7tNA.lean.js +1 -0
- package/dist/docs/assets/guides_agent-to-agent.md.D1D5f6Jc.js +42 -0
- package/dist/docs/assets/guides_agent-to-agent.md.D1D5f6Jc.lean.js +1 -0
- package/dist/docs/assets/guides_bitbucket.md.DkjkBRU8.js +145 -0
- package/dist/docs/assets/guides_bitbucket.md.DkjkBRU8.lean.js +1 -0
- package/dist/docs/assets/guides_cloud-agents.md.Ceyjv0ul.js +9 -0
- package/dist/docs/assets/guides_cloud-agents.md.Ceyjv0ul.lean.js +1 -0
- package/dist/docs/assets/guides_convert-automation.md.BjraCvok.js +43 -0
- package/dist/docs/assets/guides_convert-automation.md.BjraCvok.lean.js +1 -0
- package/dist/docs/assets/guides_github.md.CgN5sNbW.js +162 -0
- package/dist/docs/assets/guides_github.md.CgN5sNbW.lean.js +1 -0
- package/dist/docs/assets/guides_gitlab.md.DCE0p7_w.js +153 -0
- package/dist/docs/assets/guides_gitlab.md.DCE0p7_w.lean.js +1 -0
- package/dist/docs/assets/guides_grokbot-agents.md.D0PpM_Gf.js +15 -0
- package/dist/docs/assets/guides_grokbot-agents.md.D0PpM_Gf.lean.js +1 -0
- package/dist/docs/assets/guides_hooks.md.BjeEiM7s.js +54 -0
- package/dist/docs/assets/guides_hooks.md.BjeEiM7s.lean.js +1 -0
- package/dist/docs/assets/guides_improve.md.BFYtrtLE.js +21 -0
- package/dist/docs/assets/guides_improve.md.BFYtrtLE.lean.js +1 -0
- package/dist/docs/assets/guides_jev.md.Ccw4pedT.js +151 -0
- package/dist/docs/assets/guides_jev.md.Ccw4pedT.lean.js +1 -0
- package/dist/docs/assets/guides_mcp-oauth.md.ekpWOZCC.js +38 -0
- package/dist/docs/assets/guides_mcp-oauth.md.ekpWOZCC.lean.js +1 -0
- package/dist/docs/assets/guides_migrate.md.RS9Eu-Xh.js +8 -0
- package/dist/docs/assets/guides_migrate.md.RS9Eu-Xh.lean.js +1 -0
- package/dist/docs/assets/guides_opentelemetry.md.CoZ1kNyd.js +28 -0
- package/dist/docs/assets/guides_opentelemetry.md.CoZ1kNyd.lean.js +1 -0
- package/dist/docs/assets/guides_pagerduty.md.mnKXe9U0.js +60 -0
- package/dist/docs/assets/guides_pagerduty.md.mnKXe9U0.lean.js +1 -0
- package/dist/docs/assets/guides_slack.md.BqiGSYGX.js +88 -0
- package/dist/docs/assets/guides_slack.md.BqiGSYGX.lean.js +1 -0
- package/dist/docs/assets/guides_webhooks.md.BJk63ZTs.js +97 -0
- package/dist/docs/assets/guides_webhooks.md.BJk63ZTs.lean.js +1 -0
- package/dist/docs/assets/hillclimbing.md.By61f3uq.js +7 -0
- package/dist/docs/assets/hillclimbing.md.By61f3uq.lean.js +1 -0
- package/dist/docs/assets/index.md.CVRjO09Y.js +27 -0
- package/dist/docs/assets/index.md.CVRjO09Y.lean.js +1 -0
- package/dist/docs/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
- package/dist/docs/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
- package/dist/docs/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
- package/dist/docs/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
- package/dist/docs/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
- package/dist/docs/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
- package/dist/docs/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
- package/dist/docs/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
- package/dist/docs/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
- package/dist/docs/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
- package/dist/docs/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
- package/dist/docs/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
- package/dist/docs/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
- package/dist/docs/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
- package/dist/docs/assets/quickstart.md.DaLk4ZIF.js +170 -0
- package/dist/docs/assets/quickstart.md.DaLk4ZIF.lean.js +1 -0
- package/dist/docs/assets/reference_access.md.CExlH_mR.js +1 -0
- package/dist/docs/assets/reference_access.md.CExlH_mR.lean.js +1 -0
- package/dist/docs/assets/reference_agent-config.md.11E_xe--.js +40 -0
- package/dist/docs/assets/reference_agent-config.md.11E_xe--.lean.js +1 -0
- package/dist/docs/assets/reference_artifacts.md.C-hKR2hp.js +18 -0
- package/dist/docs/assets/reference_artifacts.md.C-hKR2hp.lean.js +1 -0
- package/dist/docs/assets/reference_channels.md.DsJfGSBJ.js +22 -0
- package/dist/docs/assets/reference_channels.md.DsJfGSBJ.lean.js +1 -0
- package/dist/docs/assets/reference_cli.md.DQ3dCgmk.js +99 -0
- package/dist/docs/assets/reference_cli.md.DQ3dCgmk.lean.js +1 -0
- package/dist/docs/assets/reference_connections.md.BoAotr7_.js +66 -0
- package/dist/docs/assets/reference_connections.md.BoAotr7_.lean.js +1 -0
- package/dist/docs/assets/reference_evals.md.DYKjGFi-.js +56 -0
- package/dist/docs/assets/reference_evals.md.DYKjGFi-.lean.js +1 -0
- package/dist/docs/assets/reference_extensions.md.pEVj72Xo.js +62 -0
- package/dist/docs/assets/reference_extensions.md.pEVj72Xo.lean.js +1 -0
- package/dist/docs/assets/reference_hooks.md.B-bwJuiG.js +51 -0
- package/dist/docs/assets/reference_hooks.md.B-bwJuiG.lean.js +1 -0
- package/dist/docs/assets/reference_http-api.md._RWELr3d.js +11 -0
- package/dist/docs/assets/reference_http-api.md._RWELr3d.lean.js +1 -0
- package/dist/docs/assets/reference_instructions.md.yL2hXLnl.js +14 -0
- package/dist/docs/assets/reference_instructions.md.yL2hXLnl.lean.js +1 -0
- package/dist/docs/assets/reference_limits.md.Da1HegjB.js +8 -0
- package/dist/docs/assets/reference_limits.md.Da1HegjB.lean.js +1 -0
- package/dist/docs/assets/reference_memory.md.Dd7cyV9V.js +4 -0
- package/dist/docs/assets/reference_memory.md.Dd7cyV9V.lean.js +1 -0
- package/dist/docs/assets/reference_playground.md.CQiJk9CM.js +1 -0
- package/dist/docs/assets/reference_playground.md.CQiJk9CM.lean.js +1 -0
- package/dist/docs/assets/reference_project-layout.md.BamcPDUn.js +25 -0
- package/dist/docs/assets/reference_project-layout.md.BamcPDUn.lean.js +1 -0
- package/dist/docs/assets/reference_prompt.md.BMjm1Jp3.js +9 -0
- package/dist/docs/assets/reference_prompt.md.BMjm1Jp3.lean.js +1 -0
- package/dist/docs/assets/reference_schedules.md.RC47aFm4.js +47 -0
- package/dist/docs/assets/reference_schedules.md.RC47aFm4.lean.js +1 -0
- package/dist/docs/assets/reference_sessions.md.C7KFhWXV.js +22 -0
- package/dist/docs/assets/reference_sessions.md.C7KFhWXV.lean.js +1 -0
- package/dist/docs/assets/reference_skills.md.Dej2zQxi.js +15 -0
- package/dist/docs/assets/reference_skills.md.Dej2zQxi.lean.js +1 -0
- package/dist/docs/assets/reference_subagents.md.CAhvW4yS.js +10 -0
- package/dist/docs/assets/reference_subagents.md.CAhvW4yS.lean.js +1 -0
- package/dist/docs/assets/reference_tools.md.DQr7Fnhu.js +79 -0
- package/dist/docs/assets/reference_tools.md.DQr7Fnhu.lean.js +1 -0
- package/dist/docs/assets/style.DK0YX1WL.css +1 -0
- package/dist/docs/assets/templates_agentic-owners.md.Dh2nDSqg.js +13 -0
- package/dist/docs/assets/templates_agentic-owners.md.Dh2nDSqg.lean.js +1 -0
- package/dist/docs/assets/templates_security-reviewer.md.DnwXdnB5.js +3 -0
- package/dist/docs/assets/templates_security-reviewer.md.DnwXdnB5.lean.js +1 -0
- package/dist/docs/assets/templates_thermo-quality-review.md.MJIdHkzE.js +3 -0
- package/dist/docs/assets/templates_thermo-quality-review.md.MJIdHkzE.lean.js +1 -0
- package/dist/docs/assets/templates_thermo-review.md.DfN1OFOl.js +3 -0
- package/dist/docs/assets/templates_thermo-review.md.DfN1OFOl.lean.js +1 -0
- package/dist/docs/assets/templates_triage.md.BYWMloV4.js +9 -0
- package/dist/docs/assets/templates_triage.md.BYWMloV4.lean.js +1 -0
- package/dist/docs/assets/troubleshooting.md.AGJ3jDzj.js +1 -0
- package/dist/docs/assets/troubleshooting.md.AGJ3jDzj.lean.js +1 -0
- package/dist/docs/building-with-agents.html +68 -0
- package/dist/docs/building-with-agents.md +134 -0
- package/dist/docs/changelog.html +60 -0
- package/dist/docs/changelog.md +150 -0
- package/dist/docs/deployment.html +90 -0
- package/dist/docs/deployment.md +371 -0
- package/dist/docs/evals.html +127 -0
- package/dist/docs/evals.md +239 -0
- package/dist/docs/guides/agent-to-agent.html +101 -0
- package/dist/docs/guides/agent-to-agent.md +162 -0
- package/dist/docs/guides/bitbucket.html +204 -0
- package/dist/docs/guides/bitbucket.md +293 -0
- package/dist/docs/guides/cloud-agents.html +68 -0
- package/dist/docs/guides/cloud-agents.md +81 -0
- package/dist/docs/guides/convert-automation.html +102 -0
- package/dist/docs/guides/convert-automation.md +181 -0
- package/dist/docs/guides/github.html +221 -0
- package/dist/docs/guides/github.md +373 -0
- package/dist/docs/guides/gitlab.html +212 -0
- package/dist/docs/guides/gitlab.md +299 -0
- package/dist/docs/guides/grokbot-agents.html +74 -0
- package/dist/docs/guides/grokbot-agents.md +129 -0
- package/dist/docs/guides/hooks.html +113 -0
- package/dist/docs/guides/hooks.md +116 -0
- package/dist/docs/guides/improve.html +80 -0
- package/dist/docs/guides/improve.md +129 -0
- package/dist/docs/guides/jev.html +210 -0
- package/dist/docs/guides/jev.md +298 -0
- package/dist/docs/guides/mcp-oauth.html +97 -0
- package/dist/docs/guides/mcp-oauth.md +148 -0
- package/dist/docs/guides/migrate.html +67 -0
- package/dist/docs/guides/migrate.md +171 -0
- package/dist/docs/guides/opentelemetry.html +87 -0
- package/dist/docs/guides/opentelemetry.md +136 -0
- package/dist/docs/guides/pagerduty.html +119 -0
- package/dist/docs/guides/pagerduty.md +336 -0
- package/dist/docs/guides/slack.html +147 -0
- package/dist/docs/guides/slack.md +380 -0
- package/dist/docs/guides/webhooks.html +156 -0
- package/dist/docs/guides/webhooks.md +308 -0
- package/dist/docs/hashmap.json +1 -0
- package/dist/docs/hillclimbing.html +66 -0
- package/dist/docs/hillclimbing.md +134 -0
- package/dist/docs/index.html +86 -0
- package/dist/docs/index.md +109 -0
- package/dist/docs/llms-full.txt +10072 -0
- package/dist/docs/llms.txt +68 -0
- package/dist/docs/quickstart.html +229 -0
- package/dist/docs/quickstart.md +307 -0
- package/dist/docs/reference/access.html +60 -0
- package/dist/docs/reference/access.md +22 -0
- package/dist/docs/reference/agent-config.html +99 -0
- package/dist/docs/reference/agent-config.md +280 -0
- package/dist/docs/reference/artifacts.html +77 -0
- package/dist/docs/reference/artifacts.md +113 -0
- package/dist/docs/reference/channels.html +81 -0
- package/dist/docs/reference/channels.md +234 -0
- package/dist/docs/reference/cli.html +158 -0
- package/dist/docs/reference/cli.md +1095 -0
- package/dist/docs/reference/connections.html +125 -0
- package/dist/docs/reference/connections.md +307 -0
- package/dist/docs/reference/evals.html +115 -0
- package/dist/docs/reference/evals.md +294 -0
- package/dist/docs/reference/extensions.html +121 -0
- package/dist/docs/reference/extensions.md +209 -0
- package/dist/docs/reference/hooks.html +110 -0
- package/dist/docs/reference/hooks.md +197 -0
- package/dist/docs/reference/http-api.html +70 -0
- package/dist/docs/reference/http-api.md +221 -0
- package/dist/docs/reference/instructions.html +73 -0
- package/dist/docs/reference/instructions.md +64 -0
- package/dist/docs/reference/limits.html +67 -0
- package/dist/docs/reference/limits.md +37 -0
- package/dist/docs/reference/memory.html +63 -0
- package/dist/docs/reference/memory.md +114 -0
- package/dist/docs/reference/playground.html +60 -0
- package/dist/docs/reference/playground.md +36 -0
- package/dist/docs/reference/project-layout.html +84 -0
- package/dist/docs/reference/project-layout.md +117 -0
- package/dist/docs/reference/prompt.html +68 -0
- package/dist/docs/reference/prompt.md +47 -0
- package/dist/docs/reference/schedules.html +106 -0
- package/dist/docs/reference/schedules.md +190 -0
- package/dist/docs/reference/sessions.html +81 -0
- package/dist/docs/reference/sessions.md +200 -0
- package/dist/docs/reference/skills.html +74 -0
- package/dist/docs/reference/skills.md +72 -0
- package/dist/docs/reference/subagents.html +69 -0
- package/dist/docs/reference/subagents.md +61 -0
- package/dist/docs/reference/tools.html +138 -0
- package/dist/docs/reference/tools.md +316 -0
- package/dist/docs/templates/agentic-owners.html +72 -0
- package/dist/docs/templates/agentic-owners.md +126 -0
- package/dist/docs/templates/security-reviewer.html +62 -0
- package/dist/docs/templates/security-reviewer.md +81 -0
- package/dist/docs/templates/thermo-quality-review.html +62 -0
- package/dist/docs/templates/thermo-quality-review.md +75 -0
- package/dist/docs/templates/thermo-review.html +62 -0
- package/dist/docs/templates/thermo-review.md +75 -0
- package/dist/docs/templates/triage.html +68 -0
- package/dist/docs/templates/triage.md +101 -0
- package/dist/docs/troubleshooting.html +60 -0
- package/dist/docs/troubleshooting.md +151 -0
- package/dist/docs/vp-icons.css +0 -0
- package/dist/evals/assertions.d.ts +199 -0
- package/dist/evals/assertions.d.ts.map +1 -0
- package/dist/evals/assertions.js +447 -0
- package/dist/evals/expect.d.ts +95 -0
- package/dist/evals/expect.d.ts.map +1 -0
- package/dist/evals/expect.js +192 -0
- package/dist/evals/judge.d.ts +134 -0
- package/dist/evals/judge.d.ts.map +1 -0
- package/dist/evals/judge.js +221 -0
- package/dist/evals/loaders.d.ts +51 -0
- package/dist/evals/loaders.d.ts.map +1 -0
- package/dist/evals/loaders.js +110 -0
- package/dist/evals/matchers.d.ts +95 -0
- package/dist/evals/matchers.d.ts.map +1 -0
- package/dist/evals/matchers.js +175 -0
- package/dist/evals/reporters.d.ts +70 -0
- package/dist/evals/reporters.d.ts.map +1 -0
- package/dist/evals/reporters.js +196 -0
- package/dist/evals/results.d.ts +103 -0
- package/dist/evals/results.d.ts.map +1 -0
- package/dist/evals/results.js +27 -0
- package/dist/evals/run-facts.d.ts +77 -0
- package/dist/evals/run-facts.d.ts.map +1 -0
- package/dist/evals/run-facts.js +213 -0
- package/dist/evals.d.ts +446 -0
- package/dist/evals.d.ts.map +1 -0
- package/dist/evals.js +304 -0
- package/dist/executors.d.ts +11 -0
- package/dist/executors.d.ts.map +1 -0
- package/dist/executors.js +21 -0
- package/dist/extensions/cursor-cloud-agents/extension.d.ts +94 -0
- package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/extension.js +104 -0
- package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts +118 -0
- package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/backend.js +301 -0
- package/dist/extensions/cursor-cloud-agents/lib/channels.d.ts +3 -0
- package/dist/extensions/cursor-cloud-agents/lib/channels.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/channels.js +11 -0
- package/dist/extensions/cursor-cloud-agents/lib/fleet.d.ts +25 -0
- package/dist/extensions/cursor-cloud-agents/lib/fleet.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/fleet.js +65 -0
- package/dist/extensions/cursor-cloud-agents/lib/inputs.d.ts +5 -0
- package/dist/extensions/cursor-cloud-agents/lib/inputs.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/inputs.js +4 -0
- package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts +47 -0
- package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/launch-agent.js +62 -0
- package/dist/extensions/cursor-cloud-agents/lib/repos.d.ts +17 -0
- package/dist/extensions/cursor-cloud-agents/lib/repos.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/repos.js +60 -0
- package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts +8 -0
- package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/transcript.js +14 -0
- package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts +17 -0
- package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/watch.js +85 -0
- package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts +19 -0
- package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.js +60 -0
- package/dist/extensions/cursor-cloud-agents/skills/handoff.md +41 -0
- package/dist/extensions/cursor-cloud-agents/tools/cancel.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/cancel.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/cancel.js +19 -0
- package/dist/extensions/cursor-cloud-agents/tools/dump.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/dump.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/dump.js +43 -0
- package/dist/extensions/cursor-cloud-agents/tools/get.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/get.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/get.js +14 -0
- package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/launch.js +49 -0
- package/dist/extensions/cursor-cloud-agents/tools/list.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/list.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/list.js +25 -0
- package/dist/extensions/cursor-cloud-agents/tools/reply.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/reply.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/reply.js +26 -0
- package/dist/extensions/cursor-grokbot-agents/extension.d.ts +71 -0
- package/dist/extensions/cursor-grokbot-agents/extension.d.ts.map +1 -0
- package/dist/extensions/cursor-grokbot-agents/extension.js +64 -0
- package/dist/extensions/cursor-grokbot-agents/lib/agents.d.ts +11 -0
- package/dist/extensions/cursor-grokbot-agents/lib/agents.d.ts.map +1 -0
- package/dist/extensions/cursor-grokbot-agents/lib/agents.js +31 -0
- package/dist/extensions/cursor-grokbot-agents/lib/backend.d.ts +56 -0
- package/dist/extensions/cursor-grokbot-agents/lib/backend.d.ts.map +1 -0
- package/dist/extensions/cursor-grokbot-agents/lib/backend.js +139 -0
- package/dist/extensions/cursor-grokbot-agents/lib/contacts.d.ts +28 -0
- package/dist/extensions/cursor-grokbot-agents/lib/contacts.d.ts.map +1 -0
- package/dist/extensions/cursor-grokbot-agents/lib/contacts.js +46 -0
- package/dist/extensions/cursor-grokbot-agents/lib/conversation.d.ts +53 -0
- package/dist/extensions/cursor-grokbot-agents/lib/conversation.d.ts.map +1 -0
- package/dist/extensions/cursor-grokbot-agents/lib/conversation.js +186 -0
- package/dist/extensions/cursor-grokbot-agents/lib/inputs.d.ts +4 -0
- package/dist/extensions/cursor-grokbot-agents/lib/inputs.d.ts.map +1 -0
- package/dist/extensions/cursor-grokbot-agents/lib/inputs.js +15 -0
- package/dist/extensions/cursor-grokbot-agents/lib/lock.d.ts +12 -0
- package/dist/extensions/cursor-grokbot-agents/lib/lock.d.ts.map +1 -0
- package/dist/extensions/cursor-grokbot-agents/lib/lock.js +24 -0
- package/dist/extensions/cursor-grokbot-agents/skills/consult.md +40 -0
- package/dist/extensions/cursor-grokbot-agents/tools/ask.d.ts +4 -0
- package/dist/extensions/cursor-grokbot-agents/tools/ask.d.ts.map +1 -0
- package/dist/extensions/cursor-grokbot-agents/tools/ask.js +26 -0
- package/dist/extensions/cursor-grokbot-agents/tools/check.d.ts +4 -0
- package/dist/extensions/cursor-grokbot-agents/tools/check.d.ts.map +1 -0
- package/dist/extensions/cursor-grokbot-agents/tools/check.js +21 -0
- package/dist/extensions/cursor-grokbot-agents/tools/interrupt.d.ts +4 -0
- package/dist/extensions/cursor-grokbot-agents/tools/interrupt.d.ts.map +1 -0
- package/dist/extensions/cursor-grokbot-agents/tools/interrupt.js +13 -0
- package/dist/extensions/cursor-grokbot-agents/tools/list.d.ts +4 -0
- package/dist/extensions/cursor-grokbot-agents/tools/list.d.ts.map +1 -0
- package/dist/extensions/cursor-grokbot-agents/tools/list.js +22 -0
- package/dist/extensions/improve/extension.d.ts +48 -0
- package/dist/extensions/improve/extension.d.ts.map +1 -0
- package/dist/extensions/improve/extension.js +43 -0
- package/dist/extensions/improve/skills/yourself.d.ts +4 -0
- package/dist/extensions/improve/skills/yourself.d.ts.map +1 -0
- package/dist/extensions/improve/skills/yourself.js +43 -0
- package/dist/extensions/jev/extension.d.ts +46 -0
- package/dist/extensions/jev/extension.d.ts.map +1 -0
- package/dist/extensions/jev/extension.js +56 -0
- package/dist/extensions/jev/lib/evaluate.d.ts +105 -0
- package/dist/extensions/jev/lib/evaluate.d.ts.map +1 -0
- package/dist/extensions/jev/lib/evaluate.js +173 -0
- package/dist/extensions/jev/skills/gated-write.md +25 -0
- package/dist/extensions/jev/skills/questions.md +33 -0
- package/dist/extensions/jev/tools/evaluate.d.ts +4 -0
- package/dist/extensions/jev/tools/evaluate.d.ts.map +1 -0
- package/dist/extensions/jev/tools/evaluate.js +72 -0
- package/dist/extensions/slack-communication/extension.d.ts +28 -0
- package/dist/extensions/slack-communication/extension.d.ts.map +1 -0
- package/dist/extensions/slack-communication/extension.js +32 -0
- package/dist/extensions/slack-communication/skills/slack-voice.d.ts +5 -0
- package/dist/extensions/slack-communication/skills/slack-voice.d.ts.map +1 -0
- package/dist/extensions/slack-communication/skills/slack-voice.js +52 -0
- package/dist/extensions/slack-communication/tools/delete-message.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/delete-message.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/delete-message.js +29 -0
- package/dist/extensions/slack-communication/tools/edit-message.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/edit-message.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/edit-message.js +34 -0
- package/dist/extensions/slack-communication/tools/post-card.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/post-card.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/post-card.js +25 -0
- package/dist/extensions/slack-communication/tools/post-file.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/post-file.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/post-file.js +118 -0
- package/dist/extensions/slack-communication/tools/post-update.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/post-update.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/post-update.js +33 -0
- package/dist/extensions/slack-communication/tools/react.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/react.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/react.js +27 -0
- package/dist/extensions/slack-communication/tools/set-status.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/set-status.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/set-status.js +18 -0
- package/dist/extensions.d.ts +87 -0
- package/dist/extensions.d.ts.map +1 -0
- package/dist/extensions.js +145 -0
- package/dist/files-backends/agent-store-presigned-url.d.ts +3 -0
- package/dist/files-backends/agent-store-presigned-url.d.ts.map +1 -0
- package/dist/files-backends/agent-store-presigned-url.js +223 -0
- package/dist/files-backends/cursor-hosted.d.ts +65 -0
- package/dist/files-backends/cursor-hosted.d.ts.map +1 -0
- package/dist/files-backends/cursor-hosted.js +853 -0
- package/dist/files-backends/local-fs.d.ts +33 -0
- package/dist/files-backends/local-fs.d.ts.map +1 -0
- package/dist/files-backends/local-fs.js +134 -0
- package/dist/files.d.ts +203 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +129 -0
- package/dist/filesystem.d.ts +485 -0
- package/dist/filesystem.d.ts.map +1 -0
- package/dist/filesystem.js +1664 -0
- package/dist/hooks.d.ts +25 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +25 -0
- package/dist/index.d.ts +94 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +101 -0
- package/dist/internal/advertise-tools.d.ts +96 -0
- package/dist/internal/advertise-tools.d.ts.map +1 -0
- package/dist/internal/advertise-tools.js +259 -0
- package/dist/internal/approval-gate.d.ts +35 -0
- package/dist/internal/approval-gate.d.ts.map +1 -0
- package/dist/internal/approval-gate.js +81 -0
- package/dist/internal/artifacts-store.d.ts +123 -0
- package/dist/internal/artifacts-store.d.ts.map +1 -0
- package/dist/internal/artifacts-store.js +666 -0
- package/dist/internal/as-of.d.ts +39 -0
- package/dist/internal/as-of.d.ts.map +1 -0
- package/dist/internal/as-of.js +208 -0
- package/dist/internal/auth.d.ts +12 -0
- package/dist/internal/auth.d.ts.map +1 -0
- package/dist/internal/auth.js +34 -0
- package/dist/internal/authored-alias-hooks.d.ts +24 -0
- package/dist/internal/authored-alias-hooks.d.ts.map +1 -0
- package/dist/internal/authored-alias-hooks.js +151 -0
- package/dist/internal/authored-loaders.d.ts +50 -0
- package/dist/internal/authored-loaders.d.ts.map +1 -0
- package/dist/internal/authored-loaders.js +208 -0
- package/dist/internal/bounded-int.d.ts +11 -0
- package/dist/internal/bounded-int.d.ts.map +1 -0
- package/dist/internal/bounded-int.js +12 -0
- package/dist/internal/bounded.d.ts +7 -0
- package/dist/internal/bounded.d.ts.map +1 -0
- package/dist/internal/bounded.js +21 -0
- package/dist/internal/brand.d.ts +6 -0
- package/dist/internal/brand.d.ts.map +1 -0
- package/dist/internal/brand.js +40 -0
- package/dist/internal/browser-origin-guard.d.ts +19 -0
- package/dist/internal/browser-origin-guard.d.ts.map +1 -0
- package/dist/internal/browser-origin-guard.js +51 -0
- package/dist/internal/builtin-tools/artifacts.d.ts +10 -0
- package/dist/internal/builtin-tools/artifacts.d.ts.map +1 -0
- package/dist/internal/builtin-tools/artifacts.js +103 -0
- package/dist/internal/builtin-tools/index.d.ts +17 -0
- package/dist/internal/builtin-tools/index.d.ts.map +1 -0
- package/dist/internal/builtin-tools/index.js +39 -0
- package/dist/internal/builtin-tools/reminders.d.ts +9 -0
- package/dist/internal/builtin-tools/reminders.d.ts.map +1 -0
- package/dist/internal/builtin-tools/reminders.js +115 -0
- package/dist/internal/channel-architecture.d.ts +21 -0
- package/dist/internal/channel-architecture.d.ts.map +1 -0
- package/dist/internal/channel-architecture.js +43 -0
- 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 +74 -0
- package/dist/internal/channel-route-dispatch.d.ts +13 -0
- package/dist/internal/channel-route-dispatch.d.ts.map +1 -0
- package/dist/internal/channel-route-dispatch.js +51 -0
- package/dist/internal/channel-state.d.ts +17 -0
- package/dist/internal/channel-state.d.ts.map +1 -0
- package/dist/internal/channel-state.js +74 -0
- package/dist/internal/chat-client.d.ts +45 -0
- package/dist/internal/chat-client.d.ts.map +1 -0
- package/dist/internal/chat-client.js +466 -0
- package/dist/internal/cli/command.d.ts +134 -0
- package/dist/internal/cli/command.d.ts.map +1 -0
- package/dist/internal/cli/command.js +54 -0
- package/dist/internal/cli/commands/channels.d.ts +26 -0
- package/dist/internal/cli/commands/channels.d.ts.map +1 -0
- package/dist/internal/cli/commands/channels.js +524 -0
- package/dist/internal/cli/commands/develop.d.ts +15 -0
- package/dist/internal/cli/commands/develop.d.ts.map +1 -0
- package/dist/internal/cli/commands/develop.js +568 -0
- package/dist/internal/cli/commands/hosted.d.ts +22 -0
- package/dist/internal/cli/commands/hosted.d.ts.map +1 -0
- package/dist/internal/cli/commands/hosted.js +407 -0
- package/dist/internal/cli/commands/index.d.ts +4 -0
- package/dist/internal/cli/commands/index.d.ts.map +1 -0
- package/dist/internal/cli/commands/index.js +84 -0
- package/dist/internal/cli/commands/mcp.d.ts +6 -0
- package/dist/internal/cli/commands/mcp.d.ts.map +1 -0
- package/dist/internal/cli/commands/mcp.js +89 -0
- package/dist/internal/cli/commands/project.d.ts +5 -0
- package/dist/internal/cli/commands/project.d.ts.map +1 -0
- package/dist/internal/cli/commands/project.js +136 -0
- package/dist/internal/cli/commands/scaffold.d.ts +12 -0
- package/dist/internal/cli/commands/scaffold.d.ts.map +1 -0
- package/dist/internal/cli/commands/scaffold.js +279 -0
- package/dist/internal/cli/commands/serve.d.ts +11 -0
- package/dist/internal/cli/commands/serve.d.ts.map +1 -0
- package/dist/internal/cli/commands/serve.js +370 -0
- package/dist/internal/cli/commands/session.d.ts +7 -0
- package/dist/internal/cli/commands/session.d.ts.map +1 -0
- package/dist/internal/cli/commands/session.js +354 -0
- package/dist/internal/cli/dispatch.d.ts +46 -0
- package/dist/internal/cli/dispatch.d.ts.map +1 -0
- package/dist/internal/cli/dispatch.js +385 -0
- package/dist/internal/cli/errors.d.ts +51 -0
- package/dist/internal/cli/errors.d.ts.map +1 -0
- package/dist/internal/cli/errors.js +142 -0
- package/dist/internal/cli/flags.d.ts +186 -0
- package/dist/internal/cli/flags.d.ts.map +1 -0
- package/dist/internal/cli/flags.js +167 -0
- package/dist/internal/cli/help-command.d.ts +7 -0
- package/dist/internal/cli/help-command.d.ts.map +1 -0
- package/dist/internal/cli/help-command.js +60 -0
- package/dist/internal/cli/help.d.ts +63 -0
- package/dist/internal/cli/help.d.ts.map +1 -0
- package/dist/internal/cli/help.js +203 -0
- package/dist/internal/cli/io.d.ts +11 -0
- package/dist/internal/cli/io.d.ts.map +1 -0
- package/dist/internal/cli/io.js +33 -0
- package/dist/internal/cli/output.d.ts +54 -0
- package/dist/internal/cli/output.d.ts.map +1 -0
- package/dist/internal/cli/output.js +132 -0
- package/dist/internal/cli/value-kinds.d.ts +20 -0
- package/dist/internal/cli/value-kinds.d.ts.map +1 -0
- package/dist/internal/cli/value-kinds.js +70 -0
- package/dist/internal/cli-ax.d.ts +242 -0
- package/dist/internal/cli-ax.d.ts.map +1 -0
- package/dist/internal/cli-ax.js +1896 -0
- 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 +332 -0
- package/dist/internal/cli-convert-automation.d.ts +41 -0
- package/dist/internal/cli-convert-automation.d.ts.map +1 -0
- package/dist/internal/cli-convert-automation.js +289 -0
- package/dist/internal/cli-cursor.d.ts +38 -0
- package/dist/internal/cli-cursor.d.ts.map +1 -0
- package/dist/internal/cli-cursor.js +209 -0
- package/dist/internal/cli-deploy.d.ts +185 -0
- package/dist/internal/cli-deploy.d.ts.map +1 -0
- package/dist/internal/cli-deploy.js +1798 -0
- package/dist/internal/cli-docs.d.ts +34 -0
- package/dist/internal/cli-docs.d.ts.map +1 -0
- package/dist/internal/cli-docs.js +157 -0
- package/dist/internal/cli-github.d.ts +47 -0
- package/dist/internal/cli-github.d.ts.map +1 -0
- package/dist/internal/cli-github.js +601 -0
- 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 +350 -0
- package/dist/internal/cli-images.d.ts +68 -0
- package/dist/internal/cli-images.d.ts.map +1 -0
- package/dist/internal/cli-images.js +566 -0
- package/dist/internal/cli-invocation.d.ts +22 -0
- package/dist/internal/cli-invocation.d.ts.map +1 -0
- package/dist/internal/cli-invocation.js +86 -0
- package/dist/internal/cli-manifest.d.ts +22 -0
- package/dist/internal/cli-manifest.d.ts.map +1 -0
- package/dist/internal/cli-manifest.js +49 -0
- package/dist/internal/cli-mcp-oauth.d.ts +47 -0
- package/dist/internal/cli-mcp-oauth.d.ts.map +1 -0
- package/dist/internal/cli-mcp-oauth.js +220 -0
- package/dist/internal/cli-mcp.d.ts +64 -0
- package/dist/internal/cli-mcp.d.ts.map +1 -0
- package/dist/internal/cli-mcp.js +419 -0
- package/dist/internal/cli-migrate.d.ts +20 -0
- package/dist/internal/cli-migrate.d.ts.map +1 -0
- package/dist/internal/cli-migrate.js +379 -0
- package/dist/internal/cli-pagerduty.d.ts +32 -0
- package/dist/internal/cli-pagerduty.d.ts.map +1 -0
- package/dist/internal/cli-pagerduty.js +242 -0
- package/dist/internal/cli-skills.d.ts +49 -0
- package/dist/internal/cli-skills.d.ts.map +1 -0
- package/dist/internal/cli-skills.js +125 -0
- package/dist/internal/cli-slack-context.d.ts +91 -0
- package/dist/internal/cli-slack-context.d.ts.map +1 -0
- package/dist/internal/cli-slack-context.js +112 -0
- package/dist/internal/cli-slack-manual.d.ts +43 -0
- package/dist/internal/cli-slack-manual.d.ts.map +1 -0
- package/dist/internal/cli-slack-manual.js +308 -0
- package/dist/internal/cli-slack.d.ts +11 -0
- package/dist/internal/cli-slack.d.ts.map +1 -0
- package/dist/internal/cli-slack.js +588 -0
- package/dist/internal/cloud-merge.d.ts +23 -0
- package/dist/internal/cloud-merge.d.ts.map +1 -0
- package/dist/internal/cloud-merge.js +35 -0
- package/dist/internal/cloud-turn-usage.d.ts +34 -0
- package/dist/internal/cloud-turn-usage.d.ts.map +1 -0
- package/dist/internal/cloud-turn-usage.js +94 -0
- package/dist/internal/comment-safe.d.ts +8 -0
- package/dist/internal/comment-safe.d.ts.map +1 -0
- package/dist/internal/comment-safe.js +12 -0
- package/dist/internal/connection-env.d.ts +31 -0
- package/dist/internal/connection-env.d.ts.map +1 -0
- package/dist/internal/connection-env.js +83 -0
- package/dist/internal/continuation-channel.d.ts +48 -0
- package/dist/internal/continuation-channel.d.ts.map +1 -0
- package/dist/internal/continuation-channel.js +158 -0
- package/dist/internal/continuation-identity.d.ts +147 -0
- package/dist/internal/continuation-identity.d.ts.map +1 -0
- package/dist/internal/continuation-identity.js +1015 -0
- package/dist/internal/continuation-registration.d.ts +26 -0
- package/dist/internal/continuation-registration.d.ts.map +1 -0
- package/dist/internal/continuation-registration.js +35 -0
- package/dist/internal/continuation.d.ts +3 -0
- package/dist/internal/continuation.d.ts.map +1 -0
- package/dist/internal/continuation.js +1 -0
- package/dist/internal/conversation-mirror.d.ts +72 -0
- package/dist/internal/conversation-mirror.d.ts.map +1 -0
- package/dist/internal/conversation-mirror.js +410 -0
- package/dist/internal/conversation-pack.d.ts +29 -0
- package/dist/internal/conversation-pack.d.ts.map +1 -0
- package/dist/internal/conversation-pack.js +96 -0
- package/dist/internal/convert-automation/convert-workflow.d.ts +10 -0
- package/dist/internal/convert-automation/convert-workflow.d.ts.map +1 -0
- package/dist/internal/convert-automation/convert-workflow.js +982 -0
- package/dist/internal/convert-automation/types.d.ts +202 -0
- package/dist/internal/convert-automation/types.d.ts.map +1 -0
- package/dist/internal/convert-automation/types.js +13 -0
- package/dist/internal/cron.d.ts +17 -0
- package/dist/internal/cron.d.ts.map +1 -0
- package/dist/internal/cron.js +60 -0
- package/dist/internal/cursor/account-mcp.d.ts +135 -0
- package/dist/internal/cursor/account-mcp.d.ts.map +1 -0
- package/dist/internal/cursor/account-mcp.js +513 -0
- package/dist/internal/cursor/backend-client.d.ts +229 -0
- package/dist/internal/cursor/backend-client.d.ts.map +1 -0
- package/dist/internal/cursor/backend-client.js +698 -0
- 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 +89 -0
- package/dist/internal/cursor/credentials.d.ts +183 -0
- package/dist/internal/cursor/credentials.d.ts.map +1 -0
- package/dist/internal/cursor/credentials.js +447 -0
- package/dist/internal/cursor/cursor-api-transport.d.ts +37 -0
- package/dist/internal/cursor/cursor-api-transport.d.ts.map +1 -0
- package/dist/internal/cursor/cursor-api-transport.js +40 -0
- package/dist/internal/cursor/github-credentials.d.ts +44 -0
- package/dist/internal/cursor/github-credentials.d.ts.map +1 -0
- package/dist/internal/cursor/github-credentials.js +174 -0
- package/dist/internal/cursor/hosted-bound-secrets.d.ts +45 -0
- package/dist/internal/cursor/hosted-bound-secrets.d.ts.map +1 -0
- package/dist/internal/cursor/hosted-bound-secrets.js +64 -0
- package/dist/internal/cursor/hosted-deployment-secrets.d.ts +30 -0
- package/dist/internal/cursor/hosted-deployment-secrets.d.ts.map +1 -0
- package/dist/internal/cursor/hosted-deployment-secrets.js +97 -0
- package/dist/internal/cursor/hosted-store-secrets.d.ts +39 -0
- package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -0
- package/dist/internal/cursor/hosted-store-secrets.js +84 -0
- package/dist/internal/cursor/session-token.d.ts +45 -0
- package/dist/internal/cursor/session-token.d.ts.map +1 -0
- package/dist/internal/cursor/session-token.js +84 -0
- package/dist/internal/cursor/store-api-client.d.ts +60 -0
- package/dist/internal/cursor/store-api-client.d.ts.map +1 -0
- package/dist/internal/cursor/store-api-client.js +190 -0
- package/dist/internal/cursor-account-mcp-auth.d.ts +70 -0
- package/dist/internal/cursor-account-mcp-auth.d.ts.map +1 -0
- package/dist/internal/cursor-account-mcp-auth.js +233 -0
- package/dist/internal/cursor-agent-template.d.ts +9 -0
- package/dist/internal/cursor-agent-template.d.ts.map +1 -0
- package/dist/internal/cursor-agent-template.js +43 -0
- package/dist/internal/cursor-deployment-relay.d.ts +95 -0
- package/dist/internal/cursor-deployment-relay.d.ts.map +1 -0
- package/dist/internal/cursor-deployment-relay.js +234 -0
- package/dist/internal/cursor-event-relay.d.ts +243 -0
- package/dist/internal/cursor-event-relay.d.ts.map +1 -0
- package/dist/internal/cursor-event-relay.js +454 -0
- package/dist/internal/cursor-relay-core.d.ts +160 -0
- package/dist/internal/cursor-relay-core.d.ts.map +1 -0
- package/dist/internal/cursor-relay-core.js +461 -0
- package/dist/internal/deferred-channel-session.d.ts +21 -0
- package/dist/internal/deferred-channel-session.d.ts.map +1 -0
- package/dist/internal/deferred-channel-session.js +55 -0
- package/dist/internal/deploy-client.d.ts +614 -0
- package/dist/internal/deploy-client.d.ts.map +1 -0
- package/dist/internal/deploy-client.js +974 -0
- package/dist/internal/deploy-manifest.d.ts +179 -0
- package/dist/internal/deploy-manifest.d.ts.map +1 -0
- package/dist/internal/deploy-manifest.js +320 -0
- package/dist/internal/deploy-source.d.ts +38 -0
- package/dist/internal/deploy-source.d.ts.map +1 -0
- package/dist/internal/deploy-source.js +124 -0
- package/dist/internal/describe-error.d.ts +10 -0
- package/dist/internal/describe-error.d.ts.map +1 -0
- package/dist/internal/describe-error.js +51 -0
- package/dist/internal/dev-mode.d.ts +13 -0
- package/dist/internal/dev-mode.d.ts.map +1 -0
- package/dist/internal/dev-mode.js +17 -0
- package/dist/internal/discovery/agent-config.d.ts +51 -0
- package/dist/internal/discovery/agent-config.d.ts.map +1 -0
- package/dist/internal/discovery/agent-config.js +224 -0
- package/dist/internal/discovery/agent.d.ts +16 -0
- package/dist/internal/discovery/agent.d.ts.map +1 -0
- package/dist/internal/discovery/agent.js +341 -0
- package/dist/internal/discovery/channels.d.ts +10 -0
- package/dist/internal/discovery/channels.d.ts.map +1 -0
- package/dist/internal/discovery/channels.js +90 -0
- package/dist/internal/discovery/connections.d.ts +13 -0
- package/dist/internal/discovery/connections.d.ts.map +1 -0
- package/dist/internal/discovery/connections.js +432 -0
- package/dist/internal/discovery/context.d.ts +36 -0
- package/dist/internal/discovery/context.d.ts.map +1 -0
- package/dist/internal/discovery/context.js +89 -0
- package/dist/internal/discovery/cursor-plugin.d.ts +25 -0
- package/dist/internal/discovery/cursor-plugin.d.ts.map +1 -0
- package/dist/internal/discovery/cursor-plugin.js +513 -0
- package/dist/internal/discovery/extension-overlay.d.ts +31 -0
- package/dist/internal/discovery/extension-overlay.d.ts.map +1 -0
- package/dist/internal/discovery/extension-overlay.js +143 -0
- package/dist/internal/discovery/extensions.d.ts +28 -0
- package/dist/internal/discovery/extensions.d.ts.map +1 -0
- package/dist/internal/discovery/extensions.js +383 -0
- package/dist/internal/discovery/fs.d.ts +15 -0
- package/dist/internal/discovery/fs.d.ts.map +1 -0
- package/dist/internal/discovery/fs.js +93 -0
- package/dist/internal/discovery/hooks.d.ts +7 -0
- package/dist/internal/discovery/hooks.d.ts.map +1 -0
- package/dist/internal/discovery/hooks.js +51 -0
- package/dist/internal/discovery/info.d.ts +6 -0
- package/dist/internal/discovery/info.d.ts.map +1 -0
- package/dist/internal/discovery/info.js +163 -0
- package/dist/internal/discovery/instructions.d.ts +7 -0
- package/dist/internal/discovery/instructions.d.ts.map +1 -0
- package/dist/internal/discovery/instructions.js +82 -0
- package/dist/internal/discovery/instrumentation.d.ts +10 -0
- package/dist/internal/discovery/instrumentation.d.ts.map +1 -0
- package/dist/internal/discovery/instrumentation.js +29 -0
- package/dist/internal/discovery/modules.d.ts +20 -0
- package/dist/internal/discovery/modules.d.ts.map +1 -0
- package/dist/internal/discovery/modules.js +91 -0
- package/dist/internal/discovery/names.d.ts +14 -0
- package/dist/internal/discovery/names.d.ts.map +1 -0
- package/dist/internal/discovery/names.js +39 -0
- package/dist/internal/discovery/project-public.d.ts +16 -0
- package/dist/internal/discovery/project-public.d.ts.map +1 -0
- package/dist/internal/discovery/project-public.js +54 -0
- package/dist/internal/discovery/project.d.ts +57 -0
- package/dist/internal/discovery/project.d.ts.map +1 -0
- package/dist/internal/discovery/project.js +298 -0
- package/dist/internal/discovery/reminders.d.ts +7 -0
- package/dist/internal/discovery/reminders.d.ts.map +1 -0
- package/dist/internal/discovery/reminders.js +55 -0
- package/dist/internal/discovery/runtime.d.ts +18 -0
- package/dist/internal/discovery/runtime.d.ts.map +1 -0
- package/dist/internal/discovery/runtime.js +52 -0
- package/dist/internal/discovery/schedules.d.ts +7 -0
- package/dist/internal/discovery/schedules.d.ts.map +1 -0
- package/dist/internal/discovery/schedules.js +108 -0
- package/dist/internal/discovery/seed-files.d.ts +7 -0
- package/dist/internal/discovery/seed-files.d.ts.map +1 -0
- package/dist/internal/discovery/seed-files.js +30 -0
- package/dist/internal/discovery/services.d.ts +27 -0
- package/dist/internal/discovery/services.d.ts.map +1 -0
- package/dist/internal/discovery/services.js +124 -0
- package/dist/internal/discovery/skills.d.ts +11 -0
- package/dist/internal/discovery/skills.d.ts.map +1 -0
- package/dist/internal/discovery/skills.js +140 -0
- package/dist/internal/discovery/subagent.d.ts +16 -0
- package/dist/internal/discovery/subagent.d.ts.map +1 -0
- package/dist/internal/discovery/subagent.js +113 -0
- package/dist/internal/discovery/tools.d.ts +18 -0
- package/dist/internal/discovery/tools.d.ts.map +1 -0
- package/dist/internal/discovery/tools.js +146 -0
- package/dist/internal/discovery.d.ts +15 -0
- package/dist/internal/discovery.d.ts.map +1 -0
- package/dist/internal/discovery.js +13 -0
- package/dist/internal/distribution.d.ts +60 -0
- package/dist/internal/distribution.d.ts.map +1 -0
- package/dist/internal/distribution.js +138 -0
- package/dist/internal/docs-site.d.ts +38 -0
- package/dist/internal/docs-site.d.ts.map +1 -0
- package/dist/internal/docs-site.js +229 -0
- package/dist/internal/dry-run.d.ts +32 -0
- package/dist/internal/dry-run.d.ts.map +1 -0
- package/dist/internal/dry-run.js +62 -0
- package/dist/internal/duration.d.ts +8 -0
- package/dist/internal/duration.d.ts.map +1 -0
- package/dist/internal/duration.js +36 -0
- package/dist/internal/env-file.d.ts +19 -0
- package/dist/internal/env-file.d.ts.map +1 -0
- package/dist/internal/env-file.js +74 -0
- package/dist/internal/estimate-cost.d.ts +55 -0
- package/dist/internal/estimate-cost.d.ts.map +1 -0
- package/dist/internal/estimate-cost.js +125 -0
- package/dist/internal/eval-judge-model.d.ts +64 -0
- package/dist/internal/eval-judge-model.d.ts.map +1 -0
- package/dist/internal/eval-judge-model.js +129 -0
- package/dist/internal/eval-run-store.d.ts +119 -0
- package/dist/internal/eval-run-store.d.ts.map +1 -0
- package/dist/internal/eval-run-store.js +480 -0
- package/dist/internal/eval-runner.d.ts +104 -0
- package/dist/internal/eval-runner.d.ts.map +1 -0
- package/dist/internal/eval-runner.js +616 -0
- package/dist/internal/eval-transport.d.ts +24 -0
- package/dist/internal/eval-transport.d.ts.map +1 -0
- package/dist/internal/eval-transport.js +22 -0
- package/dist/internal/evals-client.d.ts +104 -0
- package/dist/internal/evals-client.d.ts.map +1 -0
- package/dist/internal/evals-client.js +344 -0
- package/dist/internal/event-log.d.ts +94 -0
- package/dist/internal/event-log.d.ts.map +1 -0
- package/dist/internal/event-log.js +294 -0
- package/dist/internal/event-mapper.d.ts +165 -0
- package/dist/internal/event-mapper.d.ts.map +1 -0
- package/dist/internal/event-mapper.js +683 -0
- package/dist/internal/expected-delivery-failure.d.ts +3 -0
- package/dist/internal/expected-delivery-failure.d.ts.map +1 -0
- package/dist/internal/expected-delivery-failure.js +35 -0
- package/dist/internal/fetch-text.d.ts +8 -0
- package/dist/internal/fetch-text.d.ts.map +1 -0
- package/dist/internal/fetch-text.js +32 -0
- package/dist/internal/filesystem/errors.d.ts +64 -0
- package/dist/internal/filesystem/errors.d.ts.map +1 -0
- package/dist/internal/filesystem/errors.js +180 -0
- package/dist/internal/filesystem/format.d.ts +28 -0
- package/dist/internal/filesystem/format.d.ts.map +1 -0
- package/dist/internal/filesystem/format.js +209 -0
- package/dist/internal/filesystem/merge.d.ts +34 -0
- package/dist/internal/filesystem/merge.d.ts.map +1 -0
- package/dist/internal/filesystem/merge.js +154 -0
- package/dist/internal/filesystem/nearest.d.ts +15 -0
- package/dist/internal/filesystem/nearest.d.ts.map +1 -0
- package/dist/internal/filesystem/nearest.js +90 -0
- package/dist/internal/filesystem/scratch.d.ts +60 -0
- package/dist/internal/filesystem/scratch.d.ts.map +1 -0
- package/dist/internal/filesystem/scratch.js +187 -0
- package/dist/internal/filesystem/sdk-schemas.d.ts +29 -0
- package/dist/internal/filesystem/sdk-schemas.d.ts.map +1 -0
- package/dist/internal/filesystem/sdk-schemas.js +148 -0
- package/dist/internal/filesystem/subagent-inherit.d.ts +39 -0
- package/dist/internal/filesystem/subagent-inherit.d.ts.map +1 -0
- package/dist/internal/filesystem/subagent-inherit.js +96 -0
- package/dist/internal/filesystem/tools.d.ts +59 -0
- package/dist/internal/filesystem/tools.d.ts.map +1 -0
- package/dist/internal/filesystem/tools.js +634 -0
- package/dist/internal/filesystem/walk.d.ts +77 -0
- package/dist/internal/filesystem/walk.d.ts.map +1 -0
- package/dist/internal/filesystem/walk.js +287 -0
- package/dist/internal/framework-file-storage.d.ts +51 -0
- package/dist/internal/framework-file-storage.d.ts.map +1 -0
- package/dist/internal/framework-file-storage.js +292 -0
- package/dist/internal/framework-storage-selection.d.ts +30 -0
- package/dist/internal/framework-storage-selection.d.ts.map +1 -0
- package/dist/internal/framework-storage-selection.js +84 -0
- package/dist/internal/frontmatter.d.ts +20 -0
- package/dist/internal/frontmatter.d.ts.map +1 -0
- package/dist/internal/frontmatter.js +89 -0
- package/dist/internal/github-fanout.d.ts +32 -0
- package/dist/internal/github-fanout.d.ts.map +1 -0
- package/dist/internal/github-fanout.js +107 -0
- package/dist/internal/guest-network.d.ts +98 -0
- package/dist/internal/guest-network.d.ts.map +1 -0
- package/dist/internal/guest-network.js +319 -0
- package/dist/internal/handleAgentServeTrigger.d.ts +106 -0
- package/dist/internal/handleAgentServeTrigger.d.ts.map +1 -0
- package/dist/internal/handleAgentServeTrigger.js +220 -0
- package/dist/internal/hmac-secret-values.d.ts +48 -0
- package/dist/internal/hmac-secret-values.d.ts.map +1 -0
- package/dist/internal/hmac-secret-values.js +68 -0
- package/dist/internal/host-files.d.ts +29 -0
- package/dist/internal/host-files.d.ts.map +1 -0
- package/dist/internal/host-files.js +256 -0
- package/dist/internal/host-kv.d.ts +21 -0
- package/dist/internal/host-kv.d.ts.map +1 -0
- package/dist/internal/host-kv.js +64 -0
- package/dist/internal/host-otel.d.ts +26 -0
- package/dist/internal/host-otel.d.ts.map +1 -0
- package/dist/internal/host-otel.js +178 -0
- package/dist/internal/host-platforms.d.ts +58 -0
- package/dist/internal/host-platforms.d.ts.map +1 -0
- package/dist/internal/host-platforms.js +125 -0
- package/dist/internal/hosted-admission-adapter.d.ts +36 -0
- package/dist/internal/hosted-admission-adapter.d.ts.map +1 -0
- package/dist/internal/hosted-admission-adapter.js +7 -0
- package/dist/internal/hosted-admission-context.d.ts +20 -0
- package/dist/internal/hosted-admission-context.d.ts.map +1 -0
- package/dist/internal/hosted-admission-context.js +31 -0
- package/dist/internal/hosted-catch-protocol.d.ts +54 -0
- package/dist/internal/hosted-catch-protocol.d.ts.map +1 -0
- package/dist/internal/hosted-catch-protocol.js +107 -0
- package/dist/internal/hosted-catch.d.ts +45 -0
- package/dist/internal/hosted-catch.d.ts.map +1 -0
- package/dist/internal/hosted-catch.js +166 -0
- package/dist/internal/hosted-delivery-protocol.d.ts +275 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -0
- package/dist/internal/hosted-delivery-protocol.js +738 -0
- package/dist/internal/hosted-delivery.d.ts +134 -0
- package/dist/internal/hosted-delivery.d.ts.map +1 -0
- package/dist/internal/hosted-delivery.js +1093 -0
- package/dist/internal/hosted-eval-cases.d.ts +21 -0
- package/dist/internal/hosted-eval-cases.d.ts.map +1 -0
- package/dist/internal/hosted-eval-cases.js +162 -0
- package/dist/internal/hosted-execution-diag.d.ts +64 -0
- package/dist/internal/hosted-execution-diag.d.ts.map +1 -0
- package/dist/internal/hosted-execution-diag.js +217 -0
- package/dist/internal/hosted-execution-flush.d.ts +65 -0
- package/dist/internal/hosted-execution-flush.d.ts.map +1 -0
- package/dist/internal/hosted-execution-flush.js +113 -0
- package/dist/internal/hosted-execution-latency.d.ts +80 -0
- package/dist/internal/hosted-execution-latency.d.ts.map +1 -0
- package/dist/internal/hosted-execution-latency.js +237 -0
- package/dist/internal/hosted-hints.d.ts +16 -0
- package/dist/internal/hosted-hints.d.ts.map +1 -0
- package/dist/internal/hosted-hints.js +23 -0
- package/dist/internal/hosted-managed-automation.d.ts +30 -0
- package/dist/internal/hosted-managed-automation.d.ts.map +1 -0
- package/dist/internal/hosted-managed-automation.js +84 -0
- package/dist/internal/hosted-session-fixture.d.ts +26 -0
- package/dist/internal/hosted-session-fixture.d.ts.map +1 -0
- package/dist/internal/hosted-session-fixture.js +34 -0
- package/dist/internal/hosted-session-view.d.ts +48 -0
- package/dist/internal/hosted-session-view.d.ts.map +1 -0
- package/dist/internal/hosted-session-view.js +305 -0
- package/dist/internal/hosting.d.ts +62 -0
- package/dist/internal/hosting.d.ts.map +1 -0
- package/dist/internal/hosting.js +130 -0
- package/dist/internal/http-channel-define.d.ts +11 -0
- package/dist/internal/http-channel-define.d.ts.map +1 -0
- package/dist/internal/http-channel-define.js +21 -0
- package/dist/internal/http-channel.d.ts +54 -0
- package/dist/internal/http-channel.d.ts.map +1 -0
- package/dist/internal/http-channel.js +546 -0
- package/dist/internal/http-control-plane-session.d.ts +54 -0
- package/dist/internal/http-control-plane-session.d.ts.map +1 -0
- package/dist/internal/http-control-plane-session.js +162 -0
- package/dist/internal/ids.d.ts +27 -0
- package/dist/internal/ids.d.ts.map +1 -0
- package/dist/internal/ids.js +54 -0
- package/dist/internal/incoming-headers-to-fetch.d.ts +10 -0
- package/dist/internal/incoming-headers-to-fetch.d.ts.map +1 -0
- package/dist/internal/incoming-headers-to-fetch.js +40 -0
- package/dist/internal/init-interview.d.ts +64 -0
- package/dist/internal/init-interview.d.ts.map +1 -0
- package/dist/internal/init-interview.js +193 -0
- package/dist/internal/init-project.d.ts +182 -0
- package/dist/internal/init-project.d.ts.map +1 -0
- package/dist/internal/init-project.js +482 -0
- package/dist/internal/init-scaffold.d.ts +20 -0
- package/dist/internal/init-scaffold.d.ts.map +1 -0
- package/dist/internal/init-scaffold.js +194 -0
- package/dist/internal/inline-stdio-define-stub.d.ts +3 -0
- package/dist/internal/inline-stdio-define-stub.d.ts.map +1 -0
- package/dist/internal/inline-stdio-define-stub.js +4 -0
- package/dist/internal/inline-stdio-mcp.d.ts +34 -0
- package/dist/internal/inline-stdio-mcp.d.ts.map +1 -0
- package/dist/internal/inline-stdio-mcp.js +193 -0
- package/dist/internal/install-cursor-skills.d.ts +167 -0
- package/dist/internal/install-cursor-skills.d.ts.map +1 -0
- package/dist/internal/install-cursor-skills.js +499 -0
- package/dist/internal/interview/agent-questions.d.ts +19 -0
- package/dist/internal/interview/agent-questions.d.ts.map +1 -0
- package/dist/internal/interview/agent-questions.js +123 -0
- package/dist/internal/interview/question.d.ts +82 -0
- package/dist/internal/interview/question.d.ts.map +1 -0
- package/dist/internal/interview/question.js +198 -0
- 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 +26 -0
- package/dist/internal/json-schema.d.ts.map +1 -0
- package/dist/internal/json-schema.js +149 -0
- package/dist/internal/json-value.d.ts +20 -0
- package/dist/internal/json-value.d.ts.map +1 -0
- package/dist/internal/json-value.js +56 -0
- package/dist/internal/listen-port.d.ts +22 -0
- package/dist/internal/listen-port.d.ts.map +1 -0
- package/dist/internal/listen-port.js +66 -0
- package/dist/internal/local-control-plane.d.ts +59 -0
- package/dist/internal/local-control-plane.d.ts.map +1 -0
- package/dist/internal/local-control-plane.js +341 -0
- package/dist/internal/local-env.d.ts +10 -0
- package/dist/internal/local-env.d.ts.map +1 -0
- package/dist/internal/local-env.js +55 -0
- package/dist/internal/local-ingress.d.ts +35 -0
- package/dist/internal/local-ingress.d.ts.map +1 -0
- package/dist/internal/local-ingress.js +50 -0
- package/dist/internal/log-ring.d.ts +23 -0
- package/dist/internal/log-ring.d.ts.map +1 -0
- package/dist/internal/log-ring.js +41 -0
- package/dist/internal/logs-client.d.ts +77 -0
- package/dist/internal/logs-client.d.ts.map +1 -0
- package/dist/internal/logs-client.js +261 -0
- package/dist/internal/map-pool.d.ts +11 -0
- package/dist/internal/map-pool.d.ts.map +1 -0
- package/dist/internal/map-pool.js +34 -0
- package/dist/internal/mcp-endpoint.d.ts +84 -0
- package/dist/internal/mcp-endpoint.d.ts.map +1 -0
- package/dist/internal/mcp-endpoint.js +567 -0
- package/dist/internal/mcp-host.d.ts +99 -0
- package/dist/internal/mcp-host.d.ts.map +1 -0
- package/dist/internal/mcp-host.js +435 -0
- package/dist/internal/mcp-oauth-on-demand.d.ts +68 -0
- package/dist/internal/mcp-oauth-on-demand.d.ts.map +1 -0
- package/dist/internal/mcp-oauth-on-demand.js +250 -0
- package/dist/internal/mcp-oauth-persist.d.ts +42 -0
- package/dist/internal/mcp-oauth-persist.d.ts.map +1 -0
- package/dist/internal/mcp-oauth-persist.js +76 -0
- package/dist/internal/mcp-oauth.d.ts +118 -0
- package/dist/internal/mcp-oauth.d.ts.map +1 -0
- package/dist/internal/mcp-oauth.js +446 -0
- package/dist/internal/memory-dir.d.ts +8 -0
- package/dist/internal/memory-dir.d.ts.map +1 -0
- package/dist/internal/memory-dir.js +7 -0
- package/dist/internal/model-config.d.ts +7 -0
- package/dist/internal/model-config.d.ts.map +1 -0
- package/dist/internal/model-config.js +67 -0
- package/dist/internal/named-webhook-secret.d.ts +51 -0
- package/dist/internal/named-webhook-secret.d.ts.map +1 -0
- package/dist/internal/named-webhook-secret.js +65 -0
- package/dist/internal/net.d.ts +5 -0
- package/dist/internal/net.d.ts.map +1 -0
- package/dist/internal/net.js +28 -0
- package/dist/internal/open-browser.d.ts +5 -0
- package/dist/internal/open-browser.d.ts.map +1 -0
- package/dist/internal/open-browser.js +33 -0
- package/dist/internal/otel/attrs.d.ts +7 -0
- package/dist/internal/otel/attrs.d.ts.map +1 -0
- package/dist/internal/otel/attrs.js +13 -0
- package/dist/internal/otel/bind-telemetry.d.ts +26 -0
- package/dist/internal/otel/bind-telemetry.d.ts.map +1 -0
- package/dist/internal/otel/bind-telemetry.js +36 -0
- package/dist/internal/otel/collector.d.ts +50 -0
- package/dist/internal/otel/collector.d.ts.map +1 -0
- package/dist/internal/otel/collector.js +817 -0
- package/dist/internal/otel/computer-use-attrs.d.ts +18 -0
- package/dist/internal/otel/computer-use-attrs.d.ts.map +1 -0
- package/dist/internal/otel/computer-use-attrs.js +30 -0
- package/dist/internal/otel/config.d.ts +59 -0
- package/dist/internal/otel/config.d.ts.map +1 -0
- package/dist/internal/otel/config.js +237 -0
- package/dist/internal/otel/conversation-span-processor.d.ts +9 -0
- package/dist/internal/otel/conversation-span-processor.d.ts.map +1 -0
- package/dist/internal/otel/conversation-span-processor.js +37 -0
- package/dist/internal/otel/customer.d.ts +48 -0
- package/dist/internal/otel/customer.d.ts.map +1 -0
- package/dist/internal/otel/customer.js +749 -0
- package/dist/internal/otel/http.d.ts +13 -0
- package/dist/internal/otel/http.d.ts.map +1 -0
- package/dist/internal/otel/http.js +95 -0
- package/dist/internal/otel/mcp.d.ts +16 -0
- package/dist/internal/otel/mcp.d.ts.map +1 -0
- package/dist/internal/otel/mcp.js +46 -0
- package/dist/internal/otel/propagation.d.ts +7 -0
- package/dist/internal/otel/propagation.d.ts.map +1 -0
- package/dist/internal/otel/propagation.js +15 -0
- package/dist/internal/otel/reserved-attributes.d.ts +8 -0
- package/dist/internal/otel/reserved-attributes.d.ts.map +1 -0
- package/dist/internal/otel/reserved-attributes.js +24 -0
- package/dist/internal/otel/runtime.d.ts +41 -0
- package/dist/internal/otel/runtime.d.ts.map +1 -0
- package/dist/internal/otel/runtime.js +99 -0
- package/dist/internal/otel/session-telemetry.d.ts +22 -0
- package/dist/internal/otel/session-telemetry.d.ts.map +1 -0
- package/dist/internal/otel/session-telemetry.js +30 -0
- package/dist/internal/otel/telemetry-attributes.d.ts +7 -0
- package/dist/internal/otel/telemetry-attributes.d.ts.map +1 -0
- package/dist/internal/otel/telemetry-attributes.js +35 -0
- package/dist/internal/otel/telemetry-processor.d.ts +7 -0
- package/dist/internal/otel/telemetry-processor.d.ts.map +1 -0
- package/dist/internal/otel/telemetry-processor.js +47 -0
- package/dist/internal/otel/tool-error-class.d.ts +4 -0
- package/dist/internal/otel/tool-error-class.d.ts.map +1 -0
- package/dist/internal/otel/tool-error-class.js +40 -0
- package/dist/internal/otel-env.d.ts +6 -0
- package/dist/internal/otel-env.d.ts.map +1 -0
- package/dist/internal/otel-env.js +5 -0
- package/dist/internal/package-inline-stdio.d.ts +12 -0
- package/dist/internal/package-inline-stdio.d.ts.map +1 -0
- package/dist/internal/package-inline-stdio.js +107 -0
- package/dist/internal/peer-connections.d.ts +63 -0
- package/dist/internal/peer-connections.d.ts.map +1 -0
- package/dist/internal/peer-connections.js +115 -0
- package/dist/internal/persistent-stage-log-mirror.d.ts +57 -0
- package/dist/internal/persistent-stage-log-mirror.d.ts.map +1 -0
- package/dist/internal/persistent-stage-log-mirror.js +228 -0
- package/dist/internal/platform-schedule-sync.d.ts +17 -0
- package/dist/internal/platform-schedule-sync.d.ts.map +1 -0
- package/dist/internal/platform-schedule-sync.js +55 -0
- package/dist/internal/platform-timers.d.ts +42 -0
- package/dist/internal/platform-timers.d.ts.map +1 -0
- package/dist/internal/platform-timers.js +282 -0
- package/dist/internal/playground/static.d.ts +52 -0
- package/dist/internal/playground/static.d.ts.map +1 -0
- package/dist/internal/playground/static.js +230 -0
- package/dist/internal/playground/toolchain.d.ts +57 -0
- package/dist/internal/playground/toolchain.d.ts.map +1 -0
- package/dist/internal/playground/toolchain.js +226 -0
- package/dist/internal/playground-proxy.d.ts +48 -0
- package/dist/internal/playground-proxy.d.ts.map +1 -0
- package/dist/internal/playground-proxy.js +376 -0
- package/dist/internal/private-file.d.ts +2 -0
- package/dist/internal/private-file.d.ts.map +1 -0
- package/dist/internal/private-file.js +8 -0
- package/dist/internal/process-memory-telemetry.d.ts +89 -0
- package/dist/internal/process-memory-telemetry.d.ts.map +1 -0
- package/dist/internal/process-memory-telemetry.js +226 -0
- package/dist/internal/project-layout.d.ts +7 -0
- package/dist/internal/project-layout.d.ts.map +1 -0
- package/dist/internal/project-layout.js +24 -0
- package/dist/internal/prompt-context.d.ts +38 -0
- package/dist/internal/prompt-context.d.ts.map +1 -0
- package/dist/internal/prompt-context.js +86 -0
- package/dist/internal/reminder-control-plane-protocol.d.ts +196 -0
- package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -0
- package/dist/internal/reminder-control-plane-protocol.js +281 -0
- package/dist/internal/reminder-runner.d.ts +223 -0
- package/dist/internal/reminder-runner.d.ts.map +1 -0
- package/dist/internal/reminder-runner.js +1228 -0
- package/dist/internal/reminder-schedule.d.ts +26 -0
- package/dist/internal/reminder-schedule.d.ts.map +1 -0
- package/dist/internal/reminder-schedule.js +83 -0
- package/dist/internal/reminder-store.d.ts +78 -0
- package/dist/internal/reminder-store.d.ts.map +1 -0
- package/dist/internal/reminder-store.js +100 -0
- package/dist/internal/request-error-status.d.ts +14 -0
- package/dist/internal/request-error-status.d.ts.map +1 -0
- package/dist/internal/request-error-status.js +77 -0
- package/dist/internal/request-headers.d.ts +11 -0
- package/dist/internal/request-headers.d.ts.map +1 -0
- package/dist/internal/request-headers.js +14 -0
- package/dist/internal/resolve-prod-target.d.ts +20 -0
- package/dist/internal/resolve-prod-target.d.ts.map +1 -0
- package/dist/internal/resolve-prod-target.js +48 -0
- package/dist/internal/resolved-connections.d.ts +65 -0
- package/dist/internal/resolved-connections.d.ts.map +1 -0
- package/dist/internal/resolved-connections.js +108 -0
- package/dist/internal/resource-channel.d.ts +33 -0
- package/dist/internal/resource-channel.d.ts.map +1 -0
- package/dist/internal/resource-channel.js +65 -0
- package/dist/internal/router.d.ts +33 -0
- package/dist/internal/router.d.ts.map +1 -0
- package/dist/internal/router.js +93 -0
- package/dist/internal/run-client.d.ts +78 -0
- package/dist/internal/run-client.d.ts.map +1 -0
- package/dist/internal/run-client.js +372 -0
- package/dist/internal/sanitize-mcp-tool-name.d.ts +20 -0
- package/dist/internal/sanitize-mcp-tool-name.d.ts.map +1 -0
- package/dist/internal/sanitize-mcp-tool-name.js +28 -0
- package/dist/internal/schedule-runner.d.ts +42 -0
- package/dist/internal/schedule-runner.d.ts.map +1 -0
- package/dist/internal/schedule-runner.js +157 -0
- package/dist/internal/scm/pr-url.d.ts +56 -0
- package/dist/internal/scm/pr-url.d.ts.map +1 -0
- package/dist/internal/scm/pr-url.js +153 -0
- package/dist/internal/sdk-runner.d.ts +204 -0
- package/dist/internal/sdk-runner.d.ts.map +1 -0
- package/dist/internal/sdk-runner.js +1009 -0
- package/dist/internal/sdk-subagent-inherit-support.d.ts +9 -0
- package/dist/internal/sdk-subagent-inherit-support.d.ts.map +1 -0
- package/dist/internal/sdk-subagent-inherit-support.js +90 -0
- package/dist/internal/secret-alternatives.d.ts +11 -0
- package/dist/internal/secret-alternatives.d.ts.map +1 -0
- package/dist/internal/secret-alternatives.js +13 -0
- package/dist/internal/serve-restart.d.ts +45 -0
- package/dist/internal/serve-restart.d.ts.map +1 -0
- package/dist/internal/serve-restart.js +76 -0
- package/dist/internal/server.d.ts +49 -0
- package/dist/internal/server.d.ts.map +1 -0
- package/dist/internal/server.js +2573 -0
- package/dist/internal/session-cost.d.ts +49 -0
- package/dist/internal/session-cost.d.ts.map +1 -0
- package/dist/internal/session-cost.js +147 -0
- package/dist/internal/session-engine.d.ts +969 -0
- package/dist/internal/session-engine.d.ts.map +1 -0
- package/dist/internal/session-engine.js +4975 -0
- package/dist/internal/session-links.d.ts +14 -0
- package/dist/internal/session-links.d.ts.map +1 -0
- package/dist/internal/session-links.js +65 -0
- package/dist/internal/session-live-publisher.d.ts +41 -0
- package/dist/internal/session-live-publisher.d.ts.map +1 -0
- package/dist/internal/session-live-publisher.js +428 -0
- package/dist/internal/session-run-log.d.ts +108 -0
- package/dist/internal/session-run-log.d.ts.map +1 -0
- package/dist/internal/session-run-log.js +412 -0
- package/dist/internal/session-store.d.ts +73 -0
- package/dist/internal/session-store.d.ts.map +1 -0
- package/dist/internal/session-store.js +293 -0
- package/dist/internal/session-urls.d.ts +10 -0
- package/dist/internal/session-urls.d.ts.map +1 -0
- package/dist/internal/session-urls.js +25 -0
- package/dist/internal/sessions-client.d.ts +65 -0
- package/dist/internal/sessions-client.d.ts.map +1 -0
- package/dist/internal/sessions-client.js +249 -0
- package/dist/internal/shallow-clone.d.ts +258 -0
- package/dist/internal/shallow-clone.d.ts.map +1 -0
- package/dist/internal/shallow-clone.js +644 -0
- package/dist/internal/skill-catalog.d.ts +28 -0
- package/dist/internal/skill-catalog.d.ts.map +1 -0
- package/dist/internal/skill-catalog.js +36 -0
- package/dist/internal/skills-sync.d.ts +22 -0
- package/dist/internal/skills-sync.d.ts.map +1 -0
- package/dist/internal/skills-sync.js +40 -0
- package/dist/internal/slack-bot-scopes.d.ts +3 -0
- package/dist/internal/slack-bot-scopes.d.ts.map +1 -0
- package/dist/internal/slack-bot-scopes.js +2 -0
- package/dist/internal/slack-manifest-opt-in.d.ts +26 -0
- package/dist/internal/slack-manifest-opt-in.d.ts.map +1 -0
- package/dist/internal/slack-manifest-opt-in.js +63 -0
- package/dist/internal/slack-provision-client.d.ts +183 -0
- package/dist/internal/slack-provision-client.d.ts.map +1 -0
- package/dist/internal/slack-provision-client.js +321 -0
- package/dist/internal/slack-thread-key.d.ts +12 -0
- package/dist/internal/slack-thread-key.d.ts.map +1 -0
- package/dist/internal/slack-thread-key.js +10 -0
- 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/slug.d.ts +12 -0
- package/dist/internal/slug.d.ts.map +1 -0
- package/dist/internal/slug.js +38 -0
- package/dist/internal/sqlite-experimental-warning.d.ts +2 -0
- package/dist/internal/sqlite-experimental-warning.d.ts.map +1 -0
- package/dist/internal/sqlite-experimental-warning.js +22 -0
- package/dist/internal/start-log-store.d.ts +53 -0
- package/dist/internal/start-log-store.d.ts.map +1 -0
- package/dist/internal/start-log-store.js +152 -0
- package/dist/internal/steering.d.ts +15 -0
- package/dist/internal/steering.d.ts.map +1 -0
- package/dist/internal/steering.js +17 -0
- package/dist/internal/storage-coordinator.d.ts +200 -0
- package/dist/internal/storage-coordinator.d.ts.map +1 -0
- package/dist/internal/storage-coordinator.js +776 -0
- package/dist/internal/storage-roles.d.ts +83 -0
- package/dist/internal/storage-roles.d.ts.map +1 -0
- package/dist/internal/storage-roles.js +24 -0
- package/dist/internal/storage.d.ts +2 -0
- package/dist/internal/storage.d.ts.map +1 -0
- package/dist/internal/storage.js +1 -0
- package/dist/internal/store-api-protocol.d.ts +164 -0
- package/dist/internal/store-api-protocol.d.ts.map +1 -0
- package/dist/internal/store-api-protocol.js +145 -0
- package/dist/internal/store-mirror.d.ts +28 -0
- package/dist/internal/store-mirror.d.ts.map +1 -0
- package/dist/internal/store-mirror.js +54 -0
- package/dist/internal/stored-eval-run.d.ts +17 -0
- package/dist/internal/stored-eval-run.d.ts.map +1 -0
- package/dist/internal/stored-eval-run.js +305 -0
- package/dist/internal/stream-progress.d.ts +14 -0
- package/dist/internal/stream-progress.d.ts.map +1 -0
- package/dist/internal/stream-progress.js +231 -0
- package/dist/internal/tcp-address.d.ts +4 -0
- package/dist/internal/tcp-address.d.ts.map +1 -0
- package/dist/internal/tcp-address.js +8 -0
- package/dist/internal/terminal-style.d.ts +40 -0
- package/dist/internal/terminal-style.d.ts.map +1 -0
- package/dist/internal/terminal-style.js +93 -0
- package/dist/internal/testing/conversation-identity-vectors.d.ts +53 -0
- package/dist/internal/testing/conversation-identity-vectors.d.ts.map +1 -0
- package/dist/internal/testing/conversation-identity-vectors.js +170 -0
- package/dist/internal/testing/hmac-secret-vectors.d.ts +38 -0
- package/dist/internal/testing/hmac-secret-vectors.d.ts.map +1 -0
- package/dist/internal/testing/hmac-secret-vectors.js +89 -0
- package/dist/internal/testing/pagerduty-continuation-fixtures.d.ts +42 -0
- package/dist/internal/testing/pagerduty-continuation-fixtures.d.ts.map +1 -0
- package/dist/internal/testing/pagerduty-continuation-fixtures.js +175 -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 +257 -0
- package/dist/internal/testing/slack-continuation-fixtures.d.ts +32 -0
- package/dist/internal/testing/slack-continuation-fixtures.d.ts.map +1 -0
- package/dist/internal/testing/slack-continuation-fixtures.js +207 -0
- package/dist/internal/tool-call-retry.d.ts +115 -0
- package/dist/internal/tool-call-retry.d.ts.map +1 -0
- package/dist/internal/tool-call-retry.js +387 -0
- package/dist/internal/tool-catalog.d.ts +31 -0
- package/dist/internal/tool-catalog.d.ts.map +1 -0
- package/dist/internal/tool-catalog.js +81 -0
- package/dist/internal/tool-policy.d.ts +123 -0
- package/dist/internal/tool-policy.d.ts.map +1 -0
- package/dist/internal/tool-policy.js +166 -0
- package/dist/internal/tool-result.d.ts +15 -0
- package/dist/internal/tool-result.d.ts.map +1 -0
- package/dist/internal/tool-result.js +70 -0
- package/dist/internal/trajectory.d.ts +68 -0
- package/dist/internal/trajectory.d.ts.map +1 -0
- package/dist/internal/trajectory.js +340 -0
- package/dist/internal/turn-governor.d.ts +54 -0
- package/dist/internal/turn-governor.d.ts.map +1 -0
- package/dist/internal/turn-governor.js +108 -0
- package/dist/internal/turn-lease-store.d.ts +51 -0
- package/dist/internal/turn-lease-store.d.ts.map +1 -0
- package/dist/internal/turn-lease-store.js +172 -0
- package/dist/internal/turn-outbox.d.ts +24 -0
- package/dist/internal/turn-outbox.d.ts.map +1 -0
- package/dist/internal/turn-outbox.js +66 -0
- package/dist/internal/update-check.d.ts +95 -0
- package/dist/internal/update-check.d.ts.map +1 -0
- package/dist/internal/update-check.js +405 -0
- package/dist/internal/v2-hosting.d.ts +34 -0
- package/dist/internal/v2-hosting.d.ts.map +1 -0
- package/dist/internal/v2-hosting.js +35 -0
- package/dist/internal/workspace-sync.d.ts +44 -0
- package/dist/internal/workspace-sync.d.ts.map +1 -0
- package/dist/internal/workspace-sync.js +85 -0
- package/dist/internal/workspace.d.ts +154 -0
- package/dist/internal/workspace.d.ts.map +1 -0
- package/dist/internal/workspace.js +468 -0
- package/dist/internal/zod-schema.d.ts +14 -0
- package/dist/internal/zod-schema.d.ts.map +1 -0
- package/dist/internal/zod-schema.js +22 -0
- package/dist/internal/zod3-datetime.d.ts +12 -0
- package/dist/internal/zod3-datetime.d.ts.map +1 -0
- package/dist/internal/zod3-datetime.js +17 -0
- package/dist/kv/memory-kv.d.ts +24 -0
- package/dist/kv/memory-kv.d.ts.map +1 -0
- package/dist/kv/memory-kv.js +80 -0
- package/dist/kv.d.ts +25 -0
- package/dist/kv.d.ts.map +1 -0
- package/dist/kv.js +24 -0
- package/dist/memory.d.ts +113 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +312 -0
- package/dist/otel-public.d.ts +7 -0
- package/dist/otel-public.d.ts.map +1 -0
- package/dist/otel-public.js +6 -0
- package/dist/otel.d.ts +31 -0
- package/dist/otel.d.ts.map +1 -0
- package/dist/otel.js +150 -0
- package/dist/playground/assets/cursor-icons-16-QUmxS7q3.woff2 +0 -0
- package/dist/playground/assets/index-BMpVzZzC.css +1 -0
- package/dist/playground/assets/index-_3zz3yh8.js +62 -0
- package/dist/playground/index.html +17 -0
- package/dist/prompt.d.ts +39 -0
- package/dist/prompt.d.ts.map +1 -0
- package/dist/prompt.js +68 -0
- package/dist/public-deprecated.d.ts +35 -0
- package/dist/public-deprecated.d.ts.map +1 -0
- package/dist/public-deprecated.js +38 -0
- package/dist/reminders.d.ts +42 -0
- package/dist/reminders.d.ts.map +1 -0
- package/dist/reminders.js +45 -0
- package/dist/schedules.d.ts +23 -0
- package/dist/schedules.d.ts.map +1 -0
- package/dist/schedules.js +26 -0
- package/dist/scm.d.ts +2 -0
- package/dist/scm.d.ts.map +1 -0
- package/dist/scm.js +1 -0
- package/dist/skills.d.ts +22 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/skills.js +22 -0
- package/dist/storage-backends/cursor-hosted-v2.d.ts +54 -0
- package/dist/storage-backends/cursor-hosted-v2.d.ts.map +1 -0
- package/dist/storage-backends/cursor-hosted-v2.js +113 -0
- package/dist/storage-backends/cursor-hosted.d.ts +94 -0
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -0
- package/dist/storage-backends/cursor-hosted.js +227 -0
- package/dist/storage-backends/file-kv.d.ts +43 -0
- package/dist/storage-backends/file-kv.d.ts.map +1 -0
- package/dist/storage-backends/file-kv.js +238 -0
- package/dist/storage-protocol.d.ts +124 -0
- package/dist/storage-protocol.d.ts.map +1 -0
- package/dist/storage-protocol.js +181 -0
- package/dist/storage.d.ts +253 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +149 -0
- package/dist/telemetry.d.ts +12 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +11 -0
- package/dist/tools.d.ts +135 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +79 -0
- package/dist/types.d.ts +3817 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +191 -0
- package/docs/README.md +114 -0
- package/docs/building-with-agents.md +139 -0
- package/docs/changelog.md +155 -0
- package/docs/deployment.md +376 -0
- package/docs/evals.md +244 -0
- package/docs/guides/agent-to-agent.md +167 -0
- package/docs/guides/bitbucket.md +298 -0
- package/docs/guides/cloud-agents.md +86 -0
- package/docs/guides/convert-automation.md +186 -0
- package/docs/guides/github.md +378 -0
- package/docs/guides/gitlab.md +304 -0
- package/docs/guides/grokbot-agents.md +134 -0
- package/docs/guides/hooks.md +121 -0
- package/docs/guides/improve.md +134 -0
- package/docs/guides/jev.md +303 -0
- package/docs/guides/mcp-oauth.md +153 -0
- package/docs/guides/migrate.md +176 -0
- package/docs/guides/opentelemetry.md +136 -0
- package/docs/guides/pagerduty.md +341 -0
- package/docs/guides/slack.md +385 -0
- package/docs/guides/webhooks.md +313 -0
- package/docs/hillclimbing.md +139 -0
- package/docs/quickstart.md +312 -0
- package/docs/reference/access.md +27 -0
- package/docs/reference/agent-config.md +285 -0
- package/docs/reference/artifacts.md +118 -0
- package/docs/reference/channels.md +239 -0
- package/docs/reference/cli.md +1100 -0
- package/docs/reference/connections.md +312 -0
- package/docs/reference/evals.md +299 -0
- package/docs/reference/extensions.md +214 -0
- package/docs/reference/hooks.md +202 -0
- package/docs/reference/http-api.md +226 -0
- package/docs/reference/instructions.md +69 -0
- package/docs/reference/limits.md +42 -0
- package/docs/reference/memory.md +119 -0
- package/docs/reference/playground.md +41 -0
- package/docs/reference/project-layout.md +122 -0
- package/docs/reference/prompt.md +52 -0
- package/docs/reference/schedules.md +195 -0
- package/docs/reference/sessions.md +205 -0
- package/docs/reference/skills.md +77 -0
- package/docs/reference/subagents.md +66 -0
- package/docs/reference/tools.md +321 -0
- package/docs/templates/agentic-owners.md +131 -0
- package/docs/templates/security-reviewer.md +86 -0
- package/docs/templates/thermo-quality-review.md +80 -0
- package/docs/templates/thermo-review.md +80 -0
- package/docs/templates/triage.md +106 -0
- package/docs/troubleshooting.md +156 -0
- package/package.json +388 -4
- package/scripts/install-cursor-skills.mjs +29 -0
- package/skills/cli/SKILL.md +125 -0
- package/skills/create-agent/SKILL.md +177 -0
- package/skills/debug/SKILL.md +43 -0
- package/skills/deploy/SKILL.md +172 -0
- package/skills/evals/SKILL.md +145 -0
- package/skills/framework-map/SKILL.md +129 -0
- package/skills/github/SKILL.md +133 -0
- package/skills/hillclimb/SKILL.md +63 -0
- package/skills/mcp-auth/SKILL.md +60 -0
- package/skills/migrate-v2/SKILL.md +394 -0
- package/skills/otel/SKILL.md +78 -0
- package/skills/setup-slack/SKILL.md +136 -0
- package/templates/agentic-owners/README.md +78 -0
- package/templates/agentic-owners/bot/agent.ts +8 -0
- package/templates/agentic-owners/bot/channels/github.ts +63 -0
- package/templates/agentic-owners/bot/instructions.md +34 -0
- package/templates/agentic-owners/bot/lib/config.ts +5 -0
- package/templates/agentic-owners/bot/lib/github.ts +219 -0
- package/templates/agentic-owners/bot/lib/owners/README.md +50 -0
- package/templates/agentic-owners/bot/lib/owners/constants.ts +22 -0
- package/templates/agentic-owners/bot/lib/owners/decision.ts +480 -0
- package/templates/agentic-owners/bot/lib/owners/globalOverride.ts +60 -0
- package/templates/agentic-owners/bot/lib/owners/handles.ts +54 -0
- package/templates/agentic-owners/bot/lib/owners/match.ts +287 -0
- package/templates/agentic-owners/bot/lib/owners/matching.ts +147 -0
- package/templates/agentic-owners/bot/lib/owners/parse.ts +696 -0
- package/templates/agentic-owners/bot/lib/owners/policyMode.ts +61 -0
- package/templates/agentic-owners/bot/lib/owners/prompt.ts +64 -0
- package/templates/agentic-owners/bot/lib/owners/prompts/base-review.md +105 -0
- package/templates/agentic-owners/bot/lib/owners/types.ts +73 -0
- package/templates/agentic-owners/bot/lib/review.ts +727 -0
- package/templates/agentic-owners/bot/tools/record_review.ts +62 -0
- package/templates/agentic-owners/evals/evals.config.ts +5 -0
- package/templates/agentic-owners/evals/owners.eval.ts +111 -0
- package/templates/agentic-owners/package.json +20 -0
- package/templates/agentic-owners/tsconfig.json +12 -0
- package/templates/agents-md/README.md +43 -0
- package/templates/agents-md/bot/agent.ts +8 -0
- package/templates/agents-md/bot/channels/github.ts +10 -0
- package/templates/agents-md/bot/channels/queue.ts +25 -0
- package/templates/agents-md/bot/channels/slack.ts +9 -0
- package/templates/agents-md/bot/instructions.md +38 -0
- package/templates/agents-md/bot/lib/collect.ts +412 -0
- package/templates/agents-md/bot/lib/config.ts +8 -0
- package/templates/agents-md/bot/lib/paths.ts +49 -0
- package/templates/agents-md/bot/schedules/weekly.ts +17 -0
- package/templates/agents-md/bot/tools/apply_agents.ts +217 -0
- package/templates/agents-md/evals/agents.eval.ts +136 -0
- package/templates/agents-md/evals/evals.config.ts +5 -0
- package/templates/agents-md/init.json +38 -0
- package/templates/agents-md/package.json +18 -0
- package/templates/agents-md/tsconfig.json +12 -0
- package/templates/code-wiki/README.md +34 -0
- package/templates/code-wiki/bot/agent.ts +8 -0
- package/templates/code-wiki/bot/channels/github.ts +125 -0
- package/templates/code-wiki/bot/instructions.md +39 -0
- package/templates/code-wiki/bot/lib/repos.ts +5 -0
- package/templates/code-wiki/bot/lib/wiki.ts +22 -0
- package/templates/code-wiki/bot/tools/apply_wiki.ts +210 -0
- package/templates/code-wiki/evals/evals.config.ts +5 -0
- package/templates/code-wiki/evals/wiki.eval.ts +124 -0
- package/templates/code-wiki/init.json +25 -0
- package/templates/code-wiki/package.json +18 -0
- package/templates/code-wiki/tsconfig.json +12 -0
- package/templates/demo/README.md +37 -0
- package/templates/demo/bot/agent.ts +8 -0
- package/templates/demo/bot/channels/github.ts +56 -0
- package/templates/demo/bot/channels/queue.ts +24 -0
- package/templates/demo/bot/instructions.md +8 -0
- package/templates/demo/bot/lib/collect.ts +66 -0
- package/templates/demo/bot/lib/repos.ts +5 -0
- package/templates/demo/bot/tools/record_demo.ts +37 -0
- package/templates/demo/evals/demo.eval.ts +29 -0
- package/templates/demo/evals/evals.config.ts +5 -0
- package/templates/demo/init.json +25 -0
- package/templates/demo/package.json +18 -0
- package/templates/demo/tsconfig.json +12 -0
- package/templates/pr-autofixer/bot/agent.ts +11 -0
- package/templates/pr-autofixer/bot/channels/drive.ts +24 -0
- package/templates/pr-autofixer/bot/channels/github.ts +155 -0
- package/templates/pr-autofixer/bot/channels/slack.ts +16 -0
- package/templates/pr-autofixer/bot/hooks/bind-agent.ts +19 -0
- package/templates/pr-autofixer/bot/instructions.md +83 -0
- package/templates/pr-autofixer/bot/lib/affinity.ts +24 -0
- package/templates/pr-autofixer/bot/lib/drive-schemas.ts +18 -0
- package/templates/pr-autofixer/bot/lib/drive.ts +73 -0
- package/templates/pr-autofixer/bot/lib/merge-watch.ts +116 -0
- package/templates/pr-autofixer/bot/lib/pr-state.ts +40 -0
- package/templates/pr-autofixer/bot/lib/repos.ts +18 -0
- package/templates/pr-autofixer/bot/lib/start-drive.ts +113 -0
- package/templates/pr-autofixer/bot/lib/webhook-buffer.ts +215 -0
- package/templates/pr-autofixer/bot/lib/webhook-routing.ts +231 -0
- package/templates/pr-autofixer/bot/tools/drive_pr.ts +21 -0
- package/templates/pr-autofixer/evals/coordinator.eval.ts +16 -0
- package/templates/pr-autofixer/evals/evals.config.ts +5 -0
- package/templates/pr-autofixer/init.json +25 -0
- package/templates/pr-autofixer/package.json +18 -0
- package/templates/pr-autofixer/tsconfig.json +12 -0
- package/templates/security-help/.gitignore +4 -0
- package/templates/security-help/README.md +46 -0
- package/templates/security-help/bot/agent.ts +17 -0
- package/templates/security-help/bot/channels/github.ts +13 -0
- package/templates/security-help/bot/channels/slack.ts +84 -0
- package/templates/security-help/bot/instructions.md +19 -0
- package/templates/security-help/bot/lib/pr-first-pass.ts +40 -0
- package/templates/security-help/bot/lib/repos.ts +5 -0
- package/templates/security-help/bot/skills/access-request.md +10 -0
- package/templates/security-help/bot/skills/faq.md +31 -0
- package/templates/security-help/bot/skills/security-playbooks.md +12 -0
- package/templates/security-help/bot/skills/security-pr-first-pass.md +12 -0
- package/templates/security-help/evals/evals.config.ts +5 -0
- package/templates/security-help/evals/security-help.eval.ts +51 -0
- package/templates/security-help/init.json +31 -0
- package/templates/security-help/package.json +17 -0
- package/templates/security-help/tsconfig.json +12 -0
- package/templates/security-reviewer/README.md +33 -0
- package/templates/security-reviewer/bot/agent.ts +8 -0
- package/templates/security-reviewer/bot/channels/github.ts +43 -0
- package/templates/security-reviewer/bot/instructions.md +22 -0
- package/templates/security-reviewer/bot/lib/repos.ts +5 -0
- package/templates/security-reviewer/bot/tools/post_findings.ts +68 -0
- package/templates/security-reviewer/evals/evals.config.ts +5 -0
- package/templates/security-reviewer/evals/review.eval.ts +50 -0
- package/templates/security-reviewer/init.json +25 -0
- package/templates/security-reviewer/package.json +18 -0
- package/templates/security-reviewer/tsconfig.json +12 -0
- package/templates/thermo-quality-review/README.md +35 -0
- package/templates/thermo-quality-review/bot/agent.ts +8 -0
- package/templates/thermo-quality-review/bot/channels/github.ts +39 -0
- package/templates/thermo-quality-review/bot/instructions.md +43 -0
- package/templates/thermo-quality-review/bot/tools/post_findings.ts +67 -0
- package/templates/thermo-quality-review/evals/evals.config.ts +5 -0
- package/templates/thermo-quality-review/evals/review.eval.ts +59 -0
- package/templates/thermo-quality-review/package.json +18 -0
- package/templates/thermo-quality-review/tsconfig.json +12 -0
- package/templates/thermo-review/README.md +35 -0
- package/templates/thermo-review/bot/agent.ts +8 -0
- package/templates/thermo-review/bot/channels/github.ts +39 -0
- package/templates/thermo-review/bot/instructions.md +40 -0
- package/templates/thermo-review/bot/tools/post_findings.ts +67 -0
- package/templates/thermo-review/evals/evals.config.ts +5 -0
- package/templates/thermo-review/evals/review.eval.ts +50 -0
- package/templates/thermo-review/package.json +18 -0
- package/templates/thermo-review/tsconfig.json +12 -0
- package/templates/triage/README.md +47 -0
- package/templates/triage/bot/agent.ts +8 -0
- package/templates/triage/bot/channels/queue.ts +29 -0
- package/templates/triage/bot/channels/webhook.ts +41 -0
- package/templates/triage/bot/hooks/memory.ts +3 -0
- package/templates/triage/bot/instructions.md +38 -0
- package/templates/triage/bot/lib/actuate.ts +703 -0
- package/templates/triage/bot/lib/parse-queue-event.ts +160 -0
- package/templates/triage/bot/lib/tracker.ts +5 -0
- package/templates/triage/bot/lib/types.ts +48 -0
- package/templates/triage/bot/lib/verify-webhook.ts +79 -0
- package/templates/triage/bot/skills/triage-rubric.md +44 -0
- package/templates/triage/bot/tools/record_triage.ts +29 -0
- package/templates/triage/evals/evals.config.ts +5 -0
- package/templates/triage/evals/triage.eval.ts +64 -0
- package/templates/triage/overlays/jira/README.md +21 -0
- package/templates/triage/overlays/jira/bot/lib/tracker.ts +8 -0
- package/templates/triage/overlays/jira/bot/mcp-connections/tracker.ts +6 -0
- package/templates/triage/overlays/linear/README.md +21 -0
- package/templates/triage/overlays/linear/bot/lib/tracker.ts +8 -0
- package/templates/triage/overlays/linear/bot/mcp-connections/tracker.ts +6 -0
- package/templates/triage/package.json +18 -0
- package/templates/triage/tsconfig.json +12 -0
|
@@ -0,0 +1,1798 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `agent-sdk deploy | deployments | deployment | stop | rollback | delete | rotate-token |
|
|
3
|
+
* secrets set|list|unset` — Heroku-style deploys
|
|
4
|
+
* onto Cursor's managed agent-serve hosting.
|
|
5
|
+
*
|
|
6
|
+
* All intelligence is server-side. These handlers resolve parameters (credentials, team, slug, the project's
|
|
7
|
+
* `hosting` / `architecture` manifest block), call the v2 agentsdk
|
|
8
|
+
* management API through `deploy-client.ts`, poll status, and render.
|
|
9
|
+
* `deployment`, `stop`, and `delete` keep a v1 fallback so the owner of a
|
|
10
|
+
* live v1 deployment can still see, stop, or remove it.
|
|
11
|
+
*/
|
|
12
|
+
import { basename, relative, resolve } from "node:path";
|
|
13
|
+
import { catchAuthDeclaration, isPublicEndpointPolicy } from "../channels.js";
|
|
14
|
+
import { CursorBackendClient } from "./cursor/backend-client.js";
|
|
15
|
+
import { cursorExternalApiUrl, resolveApiKey, SIGN_IN_HINT } from "./cursor/credentials.js";
|
|
16
|
+
import { readDeployTemplate } from "./cursor-agent-template.js";
|
|
17
|
+
import { AgentServeDeployClient, SEVERAL_AGENTS_DEPLOY_ALONE, DeployApiError, SECRET_NOT_FOUND_MESSAGE, TERMINAL_AGENTKIT_DEPLOY_STATUSES, validateDeploymentSlug, } from "./deploy-client.js";
|
|
18
|
+
import { channelCatchSecretNames, channelCredentialSecretNames, channelSecretAlternatives, } from "./deploy-manifest.js";
|
|
19
|
+
import { unmetSecretAlternatives } from "./secret-alternatives.js";
|
|
20
|
+
import { inferDeployGitSource } from "./deploy-source.js";
|
|
21
|
+
import { describeError } from "./describe-error.js";
|
|
22
|
+
import { formatDiagnostics, hasErrorDiagnostics, isAgentProjectDir, listChildAgentDirs, loadAgentProject, } from "./discovery.js";
|
|
23
|
+
import { CLI_COMMAND_NAME as CLI } from "./distribution.js";
|
|
24
|
+
import { isReservedSecretName, isValidCursorEventRepo, validateSettableSecretName, } from "./hosting.js";
|
|
25
|
+
import { CliError, EXIT_CODE_BY_ERROR, errorCodeForStatus } from "./cli/errors.js";
|
|
26
|
+
import { DEFAULT_LIST_LIMIT, nextPageHint, pageLocally, printJson, printListJson, } from "./cli/output.js";
|
|
27
|
+
import { dryRunActive } from "./dry-run.js";
|
|
28
|
+
import { V1_MIGRATE_HINT } from "./hosted-hints.js";
|
|
29
|
+
import { deployProgressLabel, sanitizeCustomerError } from "./logs-client.js";
|
|
30
|
+
import { sleep } from "./sleep.js";
|
|
31
|
+
import { slugFromDirectoryName } from "./slug.js";
|
|
32
|
+
import { stderrPalette } from "./terminal-style.js";
|
|
33
|
+
const DEFAULT_POLL_INTERVAL_MS = 3_000;
|
|
34
|
+
const DEFAULT_DEPLOY_TIMEOUT_MS = 10 * 60 * 1000;
|
|
35
|
+
const MULTI_COMPONENT_ALLOWED_TEAM_ID = 1;
|
|
36
|
+
/** Server-side v1 deploys are closed; `migrate` moves a v1 project to v2. */
|
|
37
|
+
const V1_DEPLOYS_CLOSED = `Architecture v1 deploys are closed. ${V1_MIGRATE_HINT}`;
|
|
38
|
+
function canPublishAgentsAsOne(teamId) {
|
|
39
|
+
return teamId === MULTI_COMPONENT_ALLOWED_TEAM_ID;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Credentials → deploy client → team id. Shared by deploy commands and
|
|
43
|
+
* `--prod` AX routing. Returns an exit code (error already rendered) on
|
|
44
|
+
* failure.
|
|
45
|
+
*/
|
|
46
|
+
export async function resolveDeployAuth(options) {
|
|
47
|
+
const err = options.err ?? ((text) => void process.stderr.write(text));
|
|
48
|
+
const resolved = await resolveApiKey(options.apiKey === undefined ? undefined : { apiKey: options.apiKey });
|
|
49
|
+
if (resolved === undefined) {
|
|
50
|
+
err(`Not signed in to Cursor. ${SIGN_IN_HINT}\n`);
|
|
51
|
+
return EXIT_CODE_BY_ERROR.unauthenticated;
|
|
52
|
+
}
|
|
53
|
+
// The deployment management routes live on the external API host
|
|
54
|
+
// (api.cursor.com), not the default backend (api2.cursor.sh) — see
|
|
55
|
+
// cursorExternalApiUrl. GetMe below stays on the resolved backend.
|
|
56
|
+
const client = new AgentServeDeployClient({
|
|
57
|
+
backendUrl: cursorExternalApiUrl(),
|
|
58
|
+
apiKey: resolved.apiKey,
|
|
59
|
+
fetchImpl: options.fetchImpl,
|
|
60
|
+
});
|
|
61
|
+
let teamId;
|
|
62
|
+
if (options.team !== undefined) {
|
|
63
|
+
teamId = Number.parseInt(options.team, 10);
|
|
64
|
+
if (Number.isNaN(teamId) || teamId <= 0) {
|
|
65
|
+
err(`Invalid --team: ${options.team} (expected a positive team id)\n`);
|
|
66
|
+
return EXIT_CODE_BY_ERROR.usage;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
const account = new CursorBackendClient({
|
|
71
|
+
backendUrl: resolved.backendUrl,
|
|
72
|
+
apiKey: resolved.apiKey,
|
|
73
|
+
fetchImpl: options.fetchImpl,
|
|
74
|
+
});
|
|
75
|
+
let identity;
|
|
76
|
+
try {
|
|
77
|
+
identity = await account.getMe();
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
err(`Could not resolve your team from the Cursor account: ${describeError(error)}\nPass --team <id> explicitly.\n`);
|
|
81
|
+
return 1;
|
|
82
|
+
}
|
|
83
|
+
if (identity.teamId === undefined || identity.teamId <= 0) {
|
|
84
|
+
err("This Cursor account has no default team; pass --team <id> (find it in the Cursor dashboard URL).\n");
|
|
85
|
+
return 1;
|
|
86
|
+
}
|
|
87
|
+
teamId = identity.teamId;
|
|
88
|
+
const dim = stderrPalette().dim;
|
|
89
|
+
err(`${dim(`Using team ${teamId}${identity.teamName === undefined ? "" : ` (${identity.teamName})`}`)}\n${dim(" the account's team — pass --team to override.")}\n`);
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
client,
|
|
93
|
+
teamId,
|
|
94
|
+
apiKey: resolved.apiKey,
|
|
95
|
+
backendUrl: resolved.backendUrl,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Shared preamble: credentials → client → team id. Returns an exit code
|
|
100
|
+
* (with the error already rendered) when resolution fails.
|
|
101
|
+
*/
|
|
102
|
+
export async function prepare(options) {
|
|
103
|
+
const out = options.out ?? ((text) => void process.stdout.write(text));
|
|
104
|
+
const err = options.err ?? ((text) => void process.stderr.write(text));
|
|
105
|
+
const auth = await resolveDeployAuth({
|
|
106
|
+
team: options.team,
|
|
107
|
+
apiKey: options.apiKey,
|
|
108
|
+
fetchImpl: options.fetchImpl,
|
|
109
|
+
err,
|
|
110
|
+
});
|
|
111
|
+
if (typeof auth === "number") {
|
|
112
|
+
return auth;
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
client: auth.client,
|
|
116
|
+
teamId: auth.teamId,
|
|
117
|
+
apiKey: auth.apiKey,
|
|
118
|
+
backendUrl: auth.backendUrl,
|
|
119
|
+
json: options.json === true,
|
|
120
|
+
fields: options.fields,
|
|
121
|
+
list: { limit: options.limit ?? DEFAULT_LIST_LIMIT, pageToken: options.pageToken },
|
|
122
|
+
noWait: options.noWait === true,
|
|
123
|
+
pollIntervalMs: options.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS,
|
|
124
|
+
timeoutMs: options.timeoutMs ?? DEFAULT_DEPLOY_TIMEOUT_MS,
|
|
125
|
+
out,
|
|
126
|
+
err,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
// ============================================================================
|
|
130
|
+
// deploy
|
|
131
|
+
// ============================================================================
|
|
132
|
+
export async function cmdDeploy(options) {
|
|
133
|
+
const ctx = await prepare(options);
|
|
134
|
+
if (typeof ctx === "number") {
|
|
135
|
+
return ctx;
|
|
136
|
+
}
|
|
137
|
+
if (options.multiTenant === true && ctx.teamId !== MULTI_COMPONENT_ALLOWED_TEAM_ID) {
|
|
138
|
+
ctx.err("--multi-tenant is not available for this team.\n");
|
|
139
|
+
return 1;
|
|
140
|
+
}
|
|
141
|
+
const targets = await resolveDeployTargets(options, ctx);
|
|
142
|
+
if (typeof targets === "number") {
|
|
143
|
+
return targets;
|
|
144
|
+
}
|
|
145
|
+
if (targets.length === 1) {
|
|
146
|
+
return deployOne(ctx, options, targets[0]);
|
|
147
|
+
}
|
|
148
|
+
const manifests = [];
|
|
149
|
+
for (const target of targets) {
|
|
150
|
+
manifests.push(await readDeployManifest(target.dir));
|
|
151
|
+
}
|
|
152
|
+
const v1Agents = targets.filter((_, index) => manifests[index]?.architecture === "v1");
|
|
153
|
+
if (v1Agents.length > 0) {
|
|
154
|
+
ctx.err(`${V1_DEPLOYS_CLOSED} These agents set architecture: "v1": ${v1Agents
|
|
155
|
+
.map((target) => target.slug)
|
|
156
|
+
.join(", ")}.\n`);
|
|
157
|
+
return 1;
|
|
158
|
+
}
|
|
159
|
+
// One team can publish several agents as one deployment. Other teams deploy each agent alone.
|
|
160
|
+
if (!canPublishAgentsAsOne(ctx.teamId)) {
|
|
161
|
+
ctx.err(severalAgentsDeployAloneText(options, targets));
|
|
162
|
+
return 1;
|
|
163
|
+
}
|
|
164
|
+
if (!ctx.json) {
|
|
165
|
+
ctx.err(options.all === true
|
|
166
|
+
? deployingAllAgentsLine(options, targets)
|
|
167
|
+
: deployingAsOneApplicationLine(options, targets));
|
|
168
|
+
}
|
|
169
|
+
return deployAgentsdkApplication(ctx, options, targets, {
|
|
170
|
+
// `persistent` is per child agent, like `agentPath`: each release
|
|
171
|
+
// component carries its own.
|
|
172
|
+
componentPersistent: Object.fromEntries(targets.map((target, index) => [target.slug, manifests[index]?.persistent])),
|
|
173
|
+
componentImage: Object.fromEntries(targets.flatMap((target, index) => manifests[index]?.image === undefined ? [] : [[target.slug, manifests[index].image]])),
|
|
174
|
+
hasScmChannels: manifests.some((manifest) => manifest.hasScmChannels),
|
|
175
|
+
declaredSecretNames: declaredSecretNames(manifests),
|
|
176
|
+
hasDeploymentsChannels: manifests.some((manifest) => manifest.hasDeploymentsChannels),
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Resolve which agent directory(ies) to deploy from `--dir` / `--slug` /
|
|
181
|
+
* `--all`, with an interactive picker when a multi-agent parent is on a TTY.
|
|
182
|
+
*/
|
|
183
|
+
async function resolveDeployTargets(options, ctx) {
|
|
184
|
+
let dir = resolve(options.dir ?? ".");
|
|
185
|
+
// A repo-root deploy commonly names the local agent through --path. Use
|
|
186
|
+
// that project for manifest discovery unless --dir or --all chose a scope.
|
|
187
|
+
if (options.dir === undefined && options.path !== undefined && options.all !== true) {
|
|
188
|
+
const localSourceDir = resolve(options.path);
|
|
189
|
+
if (await isAgentProjectDir(localSourceDir)) {
|
|
190
|
+
dir = localSourceDir;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
if (options.slug !== undefined) {
|
|
194
|
+
const slugError = validateDeploymentSlug(options.slug);
|
|
195
|
+
if (slugError !== undefined) {
|
|
196
|
+
ctx.err(`${slugError}\n`);
|
|
197
|
+
return 1;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if (options.all === true && options.slug !== undefined) {
|
|
201
|
+
ctx.err("Pass either --slug or --all, not both.\n");
|
|
202
|
+
return 1;
|
|
203
|
+
}
|
|
204
|
+
if (await isAgentProjectDir(dir)) {
|
|
205
|
+
if (options.all === true) {
|
|
206
|
+
ctx.err(`--all requires a multi-agent parent directory (several child agents under --dir); ${dir} is a single agent project.\n`);
|
|
207
|
+
return 1;
|
|
208
|
+
}
|
|
209
|
+
let slug;
|
|
210
|
+
if (options.slug !== undefined) {
|
|
211
|
+
slug = options.slug;
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
const derived = slugFromDirectoryName(basename(dir));
|
|
215
|
+
if (derived === undefined) {
|
|
216
|
+
ctx.err(`Could not derive a deployment slug from the directory name ${JSON.stringify(basename(dir))}; pass --slug.\n`);
|
|
217
|
+
return 1;
|
|
218
|
+
}
|
|
219
|
+
slug = derived;
|
|
220
|
+
if (!ctx.json) {
|
|
221
|
+
ctx.err(`Deploying as "${slug}" (from the directory name).\n`);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return [{ slug, dir }];
|
|
225
|
+
}
|
|
226
|
+
let children;
|
|
227
|
+
try {
|
|
228
|
+
children = await listChildAgentDirs(dir);
|
|
229
|
+
}
|
|
230
|
+
catch (error) {
|
|
231
|
+
ctx.err(`${describeError(error)}\n`);
|
|
232
|
+
return 1;
|
|
233
|
+
}
|
|
234
|
+
// Deploy slugs are lowercase-only; normalize directory names the same way
|
|
235
|
+
// single-agent deploy does so MixedCase child dirs still deploy.
|
|
236
|
+
children = children.flatMap((child) => {
|
|
237
|
+
const slug = slugFromDirectoryName(basename(child.dir));
|
|
238
|
+
if (slug === undefined) {
|
|
239
|
+
return [];
|
|
240
|
+
}
|
|
241
|
+
return [{ slug, dir: child.dir }];
|
|
242
|
+
});
|
|
243
|
+
if (children.length === 0) {
|
|
244
|
+
if (options.all === true) {
|
|
245
|
+
ctx.err(`--all requires child agent projects under --dir; none found in ${dir}.\n`);
|
|
246
|
+
return 1;
|
|
247
|
+
}
|
|
248
|
+
// Bare-slug deploy against a non-agent directory (still requires --repo).
|
|
249
|
+
let slug;
|
|
250
|
+
if (options.slug !== undefined) {
|
|
251
|
+
slug = options.slug;
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
const derived = slugFromDirectoryName(basename(dir));
|
|
255
|
+
if (derived === undefined) {
|
|
256
|
+
ctx.err(`No agent projects under ${dir}, and could not derive a slug from ${JSON.stringify(basename(dir))}; pass --slug or --dir <agent>.\n`);
|
|
257
|
+
return 1;
|
|
258
|
+
}
|
|
259
|
+
slug = derived;
|
|
260
|
+
if (!ctx.json) {
|
|
261
|
+
ctx.err(`Deploying as "${slug}" (no agent project at ${dir}).\n`);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return [{ slug, dir }];
|
|
265
|
+
}
|
|
266
|
+
if (children.length === 1) {
|
|
267
|
+
const only = children[0];
|
|
268
|
+
if (options.all === true) {
|
|
269
|
+
// One child is fine for --all (degenerate multi-agent parent).
|
|
270
|
+
}
|
|
271
|
+
else if (options.slug !== undefined && options.slug.toLowerCase() !== only.slug) {
|
|
272
|
+
ctx.err(`No agent "${options.slug}" under ${dir}; found "${only.slug}".\n`);
|
|
273
|
+
return 1;
|
|
274
|
+
}
|
|
275
|
+
if (!ctx.json) {
|
|
276
|
+
ctx.err(`Deploying "${only.slug}" (only agent under ${basename(dir)}).\n`);
|
|
277
|
+
}
|
|
278
|
+
return [only];
|
|
279
|
+
}
|
|
280
|
+
// Multiple children.
|
|
281
|
+
if (options.all === true) {
|
|
282
|
+
return [...children];
|
|
283
|
+
}
|
|
284
|
+
if (options.slug !== undefined) {
|
|
285
|
+
const wanted = options.slug.toLowerCase();
|
|
286
|
+
const match = children.find((child) => child.slug === wanted);
|
|
287
|
+
if (match === undefined) {
|
|
288
|
+
ctx.err(`No agent "${options.slug}" under ${dir}.\n` +
|
|
289
|
+
formatAgentList(children) +
|
|
290
|
+
`Pass --slug <name> or --all.\n`);
|
|
291
|
+
return 1;
|
|
292
|
+
}
|
|
293
|
+
return [match];
|
|
294
|
+
}
|
|
295
|
+
// An all-v2 parent needs no picker or --all. A v1 child, or a child that
|
|
296
|
+
// fails to load, keeps the interactive picker below.
|
|
297
|
+
if (await allChildrenAreV2(children)) {
|
|
298
|
+
return [...children];
|
|
299
|
+
}
|
|
300
|
+
const chooser = options.chooseTargets ??
|
|
301
|
+
((agents) => promptChooseDeployTargets(agents, {
|
|
302
|
+
err: ctx.err,
|
|
303
|
+
stdin: options.stdin ?? process.stdin,
|
|
304
|
+
interactive: !ctx.json && (options.stdin ?? process.stdin).isTTY === true && process.stderr.isTTY,
|
|
305
|
+
}));
|
|
306
|
+
const chosen = await chooser(children);
|
|
307
|
+
if (chosen === null) {
|
|
308
|
+
ctx.err("Deploy cancelled.\n");
|
|
309
|
+
return 1;
|
|
310
|
+
}
|
|
311
|
+
if (chosen.length === 0) {
|
|
312
|
+
ctx.err(`Multiple agents under ${dir}:\n` +
|
|
313
|
+
formatAgentList(children) +
|
|
314
|
+
`Pass --slug <name> or --all (or re-run on a TTY to pick interactively).\n`);
|
|
315
|
+
return 1;
|
|
316
|
+
}
|
|
317
|
+
return chosen;
|
|
318
|
+
}
|
|
319
|
+
function deployingAllAgentsLine(options, targets) {
|
|
320
|
+
return `Deploying all ${targets.length} agents under ${basename(resolve(options.dir ?? "."))}: ${targets.map((target) => target.slug).join(", ")}.\n`;
|
|
321
|
+
}
|
|
322
|
+
function deployingAsOneApplicationLine(options, targets) {
|
|
323
|
+
return `Deploying all ${targets.length} v2 agents under ${basename(resolve(options.dir ?? "."))} as one application (pass --slug <name> to deploy a single agent standalone).\n`;
|
|
324
|
+
}
|
|
325
|
+
function severalAgentsDeployAloneText(options, targets) {
|
|
326
|
+
const flags = copiedDeployFlags(options);
|
|
327
|
+
const commands = targets.map((target) => ` ${CLI} deploy --dir ${quoteShell(relativeDeployDir(target.dir))}${flags}`);
|
|
328
|
+
return `${SEVERAL_AGENTS_DEPLOY_ALONE}\n${commands.join("\n")}\n`;
|
|
329
|
+
}
|
|
330
|
+
function copiedDeployFlags(options) {
|
|
331
|
+
const parts = [];
|
|
332
|
+
if (options.team !== undefined) {
|
|
333
|
+
parts.push(`--team ${quoteShell(options.team)}`);
|
|
334
|
+
}
|
|
335
|
+
if (options.repo !== undefined) {
|
|
336
|
+
parts.push(`--repo ${quoteShell(options.repo)}`);
|
|
337
|
+
}
|
|
338
|
+
if (options.ref !== undefined) {
|
|
339
|
+
parts.push(`--ref ${quoteShell(options.ref)}`);
|
|
340
|
+
}
|
|
341
|
+
for (const repo of options.cursorEventsRepos ?? []) {
|
|
342
|
+
parts.push(`--cursor-events-repo ${quoteShell(repo)}`);
|
|
343
|
+
}
|
|
344
|
+
return parts.length === 0 ? "" : ` ${parts.join(" ")}`;
|
|
345
|
+
}
|
|
346
|
+
function relativeDeployDir(dir) {
|
|
347
|
+
const rel = relative(process.cwd(), dir);
|
|
348
|
+
return rel === "" ? "." : rel;
|
|
349
|
+
}
|
|
350
|
+
function quoteShell(value) {
|
|
351
|
+
if (/^[A-Za-z0-9_./:-]+$/.test(value)) {
|
|
352
|
+
return value;
|
|
353
|
+
}
|
|
354
|
+
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
355
|
+
}
|
|
356
|
+
function formatAgentList(agents) {
|
|
357
|
+
return agents.map((agent, i) => ` ${i + 1}) ${agent.slug}\n`).join("");
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* True when every child agent project loads and declares
|
|
361
|
+
* `architecture: "v2"`. Broken projects count as not-v2 so target
|
|
362
|
+
* resolution falls back to the picker instead of failing the whole deploy
|
|
363
|
+
* on a child the user might not even select.
|
|
364
|
+
*/
|
|
365
|
+
async function allChildrenAreV2(children) {
|
|
366
|
+
for (const child of children) {
|
|
367
|
+
try {
|
|
368
|
+
if ((await readDeployManifest(child.dir)).architecture !== "v2") {
|
|
369
|
+
return false;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
catch {
|
|
373
|
+
return false;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return true;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* TTY picker for multi-agent parents. Non-interactive callers get `[]`
|
|
380
|
+
* so {@link resolveDeployTargets} can print the --slug/--all hint.
|
|
381
|
+
*/
|
|
382
|
+
export async function promptChooseDeployTargets(agents, options) {
|
|
383
|
+
options.err(`Multiple agents (${agents.length}):\n` + formatAgentList(agents) + ` a) all\n`);
|
|
384
|
+
if (!options.interactive) {
|
|
385
|
+
return [];
|
|
386
|
+
}
|
|
387
|
+
options.err('Deploy which? Enter a number, slug, "all", or "q" to cancel: ');
|
|
388
|
+
const readLine = createLineReader(options.stdin);
|
|
389
|
+
// createLineReader pauses until data; ensure stdin is flowing on a TTY.
|
|
390
|
+
options.stdin.resume?.();
|
|
391
|
+
const answer = (await readLine())?.trim().toLowerCase();
|
|
392
|
+
if (answer === undefined || answer === "q" || answer === "quit") {
|
|
393
|
+
return null;
|
|
394
|
+
}
|
|
395
|
+
if (answer === "a" || answer === "all" || answer === "*") {
|
|
396
|
+
return [...agents];
|
|
397
|
+
}
|
|
398
|
+
const asIndex = Number.parseInt(answer, 10);
|
|
399
|
+
if (!Number.isNaN(asIndex) &&
|
|
400
|
+
String(asIndex) === answer &&
|
|
401
|
+
asIndex >= 1 &&
|
|
402
|
+
asIndex <= agents.length) {
|
|
403
|
+
return [agents[asIndex - 1]];
|
|
404
|
+
}
|
|
405
|
+
const bySlug = agents.find((agent) => agent.slug.toLowerCase() === answer);
|
|
406
|
+
if (bySlug !== undefined) {
|
|
407
|
+
return [bySlug];
|
|
408
|
+
}
|
|
409
|
+
options.err(`Unrecognized choice ${JSON.stringify(answer)} — expected 1–${agents.length}, a slug, "all", or "q". Aborting.\n`);
|
|
410
|
+
return null;
|
|
411
|
+
}
|
|
412
|
+
const MISSING_DEPLOY_REPO_HINT = `Could not resolve an https:// git repository URL for this deploy.\n` +
|
|
413
|
+
` Pass --repo https://github.com/<owner>/<repo>, https://gitlab.com/<group>/<project>, or an Origin repository URL (inferred from origin when possible).\n`;
|
|
414
|
+
async function deployOne(ctx, options, target) {
|
|
415
|
+
const { dir, slug } = target;
|
|
416
|
+
// Fill --repo/--ref/--path from the local git checkout when omitted so
|
|
417
|
+
// `agent-sdk deploy` inside an agent directory is enough. Only probe git
|
|
418
|
+
// for real agent projects (avoids ambient monorepo remotes when someone
|
|
419
|
+
// deploys a bare --slug). Explicit flags always win.
|
|
420
|
+
const isAgent = await isAgentProjectDir(dir);
|
|
421
|
+
const needsGitInference = isAgent &&
|
|
422
|
+
(options.repo === undefined || options.ref === undefined || options.path === undefined);
|
|
423
|
+
const inferred = needsGitInference
|
|
424
|
+
? await inferDeployGitSource(dir, {
|
|
425
|
+
...(options.git === undefined ? {} : { git: options.git }),
|
|
426
|
+
})
|
|
427
|
+
: {};
|
|
428
|
+
const gitRepoUrl = options.repo ?? inferred.gitRepoUrl;
|
|
429
|
+
const gitRef = options.ref ?? inferred.gitRef;
|
|
430
|
+
const agentPath = options.path ?? inferred.agentPath;
|
|
431
|
+
if (gitRepoUrl !== undefined && !gitRepoUrl.startsWith("https://")) {
|
|
432
|
+
ctx.err(`Invalid --repo: ${gitRepoUrl} (expected an https:// git repository URL)\n`);
|
|
433
|
+
return 1;
|
|
434
|
+
}
|
|
435
|
+
if (gitRepoUrl === undefined) {
|
|
436
|
+
ctx.err(MISSING_DEPLOY_REPO_HINT);
|
|
437
|
+
return 1;
|
|
438
|
+
}
|
|
439
|
+
for (const repo of options.cursorEventsRepos ?? []) {
|
|
440
|
+
if (!isValidCursorEventRepo(repo)) {
|
|
441
|
+
ctx.err(`Invalid --cursor-events-repo: ${repo} (expected owner/name, gitlab.com/<group>/<project>, or bitbucket.org/<workspace>/<repo>)\n`);
|
|
442
|
+
return 1;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
if (!ctx.json && gitRepoUrl !== undefined) {
|
|
446
|
+
const inferredBits = [];
|
|
447
|
+
if (options.repo === undefined && inferred.gitRepoUrl !== undefined) {
|
|
448
|
+
inferredBits.push("repo");
|
|
449
|
+
}
|
|
450
|
+
if (options.ref === undefined && inferred.gitRef !== undefined) {
|
|
451
|
+
inferredBits.push("ref");
|
|
452
|
+
}
|
|
453
|
+
if (options.path === undefined && inferred.agentPath !== undefined) {
|
|
454
|
+
inferredBits.push("path");
|
|
455
|
+
}
|
|
456
|
+
ctx.err(` source: ${gitRepoUrl}${gitRef === undefined ? "" : ` @ ${gitRef}`}\n` +
|
|
457
|
+
(agentPath === undefined ? "" : ` path: ${agentPath}\n`) +
|
|
458
|
+
(inferredBits.length === 0
|
|
459
|
+
? ""
|
|
460
|
+
: ` (inferred ${inferredBits.join(", ")} from git; pass --repo/--ref/--path to override)\n`));
|
|
461
|
+
}
|
|
462
|
+
// The package manifest (`defineAgent({ hosting })`) is the source of
|
|
463
|
+
// truth for expected secret names. Directories without an agent project
|
|
464
|
+
// have no manifest and deploy with defaults; the hosted build reads the
|
|
465
|
+
// project from git.
|
|
466
|
+
const manifest = isAgent ? await readDeployManifest(dir) : undefined;
|
|
467
|
+
if (manifest?.architecture === "v1") {
|
|
468
|
+
ctx.err(`${V1_DEPLOYS_CLOSED}\n`);
|
|
469
|
+
return 1;
|
|
470
|
+
}
|
|
471
|
+
if (!ctx.json && manifest?.httpChannelPublicEndpoint === true) {
|
|
472
|
+
ctx.err(`warning: publicEndpoint() on the built-in HTTP channel has no effect on hosting — only custom channels (/v1/channels/…) can be public; the session API always requires the alias token.\n`);
|
|
473
|
+
}
|
|
474
|
+
const extensionEgress = manifest?.extensionEgress ?? [];
|
|
475
|
+
if (!ctx.json && extensionEgress.length > 0) {
|
|
476
|
+
// Mounted packages widen the pod's egress without an agent.ts edit; name
|
|
477
|
+
// each one before the deploy is accepted.
|
|
478
|
+
ctx.err(` egress from extensions: ${extensionEgress
|
|
479
|
+
.map((entry) => `${entry.extension} (${entry.egressDomains.join(", ")})`)
|
|
480
|
+
.join("; ")}\n`);
|
|
481
|
+
}
|
|
482
|
+
const deadSecretChannels = manifest?.publicChannelIdsWithDeadSecretPolicies ?? [];
|
|
483
|
+
if (!ctx.json && deadSecretChannels.length > 0) {
|
|
484
|
+
ctx.err(`warning: ${deadSecretChannels
|
|
485
|
+
.map((channelId) => `/v1/channels/${channelId}`)
|
|
486
|
+
.join(", ")}: publicEndpoint() sits beside sharedSecretAuth()/hmacSignatureAuth() — auth chains are any-of, so every request is admitted and those secret policies never run. Drop publicEndpoint() to enforce them, or drop them to make the intent explicit.\n`);
|
|
487
|
+
}
|
|
488
|
+
const persistent = manifest?.persistent === true;
|
|
489
|
+
if (!ctx.json) {
|
|
490
|
+
ctx.err(` architecture: v2${persistent ? " (persistent)" : ""}${manifest?.image === undefined ? "" : `\n image: ${manifest.image}`}\n`);
|
|
491
|
+
}
|
|
492
|
+
return deployOneAgentsdk(ctx, {
|
|
493
|
+
persistent,
|
|
494
|
+
image: manifest?.image,
|
|
495
|
+
slug,
|
|
496
|
+
gitRepoUrl,
|
|
497
|
+
gitRef,
|
|
498
|
+
agentPath,
|
|
499
|
+
repositories: options.cursorEventsRepos,
|
|
500
|
+
hasScmChannels: manifest?.hasScmChannels === true,
|
|
501
|
+
declaredSecretNames: declaredSecretNames([manifest]),
|
|
502
|
+
hasDeploymentsChannels: manifest?.hasDeploymentsChannels === true,
|
|
503
|
+
multiTenant: options.multiTenant === true,
|
|
504
|
+
template: readDeployTemplate(dir),
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Multi-agent parent whose children all declare `architecture: "v2"`:
|
|
509
|
+
* deploy ONE application whose release carries a component per child. The
|
|
510
|
+
* application slug derives from the parent directory name; each component
|
|
511
|
+
* key is the child's slug and its path is the child directory relative to
|
|
512
|
+
* the repo root (a shared --path names the parent's directory in the repo).
|
|
513
|
+
*/
|
|
514
|
+
async function deployAgentsdkApplication(ctx, options, targets, declarations) {
|
|
515
|
+
const parentDir = resolve(options.dir ?? ".");
|
|
516
|
+
const slug = slugFromDirectoryName(basename(parentDir));
|
|
517
|
+
if (slug === undefined) {
|
|
518
|
+
ctx.err(`Could not derive an application slug from the parent directory name ${JSON.stringify(basename(parentDir))} — rename it (deploy slugs use lowercase letters, digits, '-' or '_').\n`);
|
|
519
|
+
return 1;
|
|
520
|
+
}
|
|
521
|
+
const needsGitInference = options.repo === undefined || options.ref === undefined || options.path === undefined;
|
|
522
|
+
const inferred = needsGitInference
|
|
523
|
+
? await inferDeployGitSource(parentDir, {
|
|
524
|
+
...(options.git === undefined ? {} : { git: options.git }),
|
|
525
|
+
})
|
|
526
|
+
: {};
|
|
527
|
+
const gitRepoUrl = options.repo ?? inferred.gitRepoUrl;
|
|
528
|
+
const gitRef = options.ref ?? inferred.gitRef;
|
|
529
|
+
const parentPath = options.path ?? inferred.agentPath;
|
|
530
|
+
if (gitRepoUrl !== undefined && !gitRepoUrl.startsWith("https://")) {
|
|
531
|
+
ctx.err(`Invalid --repo: ${gitRepoUrl} (expected an https:// git repository URL)\n`);
|
|
532
|
+
return 1;
|
|
533
|
+
}
|
|
534
|
+
if (gitRepoUrl === undefined) {
|
|
535
|
+
ctx.err(MISSING_DEPLOY_REPO_HINT);
|
|
536
|
+
return 1;
|
|
537
|
+
}
|
|
538
|
+
for (const repo of options.cursorEventsRepos ?? []) {
|
|
539
|
+
if (!isValidCursorEventRepo(repo)) {
|
|
540
|
+
ctx.err(`Invalid --cursor-events-repo: ${repo} (expected owner/name, gitlab.com/<group>/<project>, or bitbucket.org/<workspace>/<repo>)\n`);
|
|
541
|
+
return 1;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
const components = targets.map((target) => ({
|
|
545
|
+
componentKey: target.slug,
|
|
546
|
+
agentPath: [parentPath, basename(target.dir)]
|
|
547
|
+
.filter((part) => part !== undefined && part !== "")
|
|
548
|
+
.join("/"),
|
|
549
|
+
persistent: declarations.componentPersistent[target.slug],
|
|
550
|
+
image: declarations.componentImage[target.slug],
|
|
551
|
+
}));
|
|
552
|
+
if (!ctx.json) {
|
|
553
|
+
ctx.err(`Deploying "${slug}" as one v2 application with ${targets.length} components (slug from the parent directory name).\n` +
|
|
554
|
+
` architecture: v2\n` +
|
|
555
|
+
` source: ${gitRepoUrl}${gitRef === undefined ? "" : ` @ ${gitRef}`}\n` +
|
|
556
|
+
components
|
|
557
|
+
.map((component) => ` component: ${component.componentKey} (${component.agentPath ?? "."})${component.persistent ? " persistent" : ""}${component.image === undefined ? "" : ` image ${component.image}`}\n`)
|
|
558
|
+
.join(""));
|
|
559
|
+
}
|
|
560
|
+
return deployOneAgentsdk(ctx, {
|
|
561
|
+
// Multi-component: the flag travels on each component instead.
|
|
562
|
+
persistent: false,
|
|
563
|
+
slug,
|
|
564
|
+
gitRepoUrl,
|
|
565
|
+
gitRef,
|
|
566
|
+
agentPath: undefined,
|
|
567
|
+
components,
|
|
568
|
+
repositories: options.cursorEventsRepos,
|
|
569
|
+
hasScmChannels: declarations.hasScmChannels,
|
|
570
|
+
declaredSecretNames: declarations.declaredSecretNames,
|
|
571
|
+
hasDeploymentsChannels: declarations.hasDeploymentsChannels,
|
|
572
|
+
multiTenant: options.multiTenant === true,
|
|
573
|
+
template: readDeployTemplate(parentDir),
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* `architecture: "v2"` deploy: POST `/internal/agentsdk/deployments` and
|
|
578
|
+
* poll the matching GET.
|
|
579
|
+
*/
|
|
580
|
+
async function deployOneAgentsdk(ctx, args) {
|
|
581
|
+
const { slug } = args;
|
|
582
|
+
const componentsLine = args.components === undefined
|
|
583
|
+
? ""
|
|
584
|
+
: ` components: ${args.components.map((component) => component.componentKey).join(", ")}\n`;
|
|
585
|
+
if (args.multiTenant && !ctx.json) {
|
|
586
|
+
ctx.err(" multi-tenant: existing product\n");
|
|
587
|
+
}
|
|
588
|
+
let accepted;
|
|
589
|
+
try {
|
|
590
|
+
accepted = await ctx.client.deployAgentkit({
|
|
591
|
+
teamId: ctx.teamId,
|
|
592
|
+
slug,
|
|
593
|
+
gitRepoUrl: args.gitRepoUrl,
|
|
594
|
+
gitRef: args.gitRef,
|
|
595
|
+
agentPath: args.agentPath,
|
|
596
|
+
components: args.components,
|
|
597
|
+
repositories: args.repositories,
|
|
598
|
+
...(args.multiTenant ? { multiTenant: true } : {}),
|
|
599
|
+
persistent: args.persistent,
|
|
600
|
+
image: args.image,
|
|
601
|
+
template: args.template,
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
catch (error) {
|
|
605
|
+
throw apiError(error, {
|
|
606
|
+
multiTenant: args.multiTenant,
|
|
607
|
+
teamId: ctx.teamId,
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
if (!ctx.json && accepted.aliasToken !== undefined) {
|
|
611
|
+
ctx.out(aliasTokenBlock(accepted.aliasToken));
|
|
612
|
+
}
|
|
613
|
+
if (ctx.noWait) {
|
|
614
|
+
if (ctx.json) {
|
|
615
|
+
ctx.out(`${JSON.stringify(accepted, null, 2)}\n`);
|
|
616
|
+
}
|
|
617
|
+
else {
|
|
618
|
+
ctx.out(`Deploy accepted: ${slug} (team ${ctx.teamId}, v2)\n` +
|
|
619
|
+
` application: ${accepted.applicationId}\n` +
|
|
620
|
+
` release: ${accepted.releaseId}\n` +
|
|
621
|
+
` alias: ${ctx.client.aliasUrl(accepted.engineAlias)}\n` +
|
|
622
|
+
componentsLine);
|
|
623
|
+
}
|
|
624
|
+
return 0;
|
|
625
|
+
}
|
|
626
|
+
let detail;
|
|
627
|
+
try {
|
|
628
|
+
detail = await pollUntil(ctx, slug, TERMINAL_AGENTKIT_DEPLOY_STATUSES, () => ctx.client.getAgentkitDeploy({ teamId: ctx.teamId, slug }));
|
|
629
|
+
}
|
|
630
|
+
catch (error) {
|
|
631
|
+
throw apiError(error);
|
|
632
|
+
}
|
|
633
|
+
const payload = { ...detail, aliasToken: accepted.aliasToken };
|
|
634
|
+
if (ctx.json) {
|
|
635
|
+
ctx.out(`${JSON.stringify(payload, null, 2)}\n`);
|
|
636
|
+
return detail.status === "running" ? 0 : 1;
|
|
637
|
+
}
|
|
638
|
+
if (detail.status !== "running") {
|
|
639
|
+
ctx.err(`Deployment ${slug} ended ${detail.status}${deployFailureDetail(detail.lastError)}\n`);
|
|
640
|
+
return 1;
|
|
641
|
+
}
|
|
642
|
+
warnMissingSecrets(ctx, slug, args.declaredSecretNames, detail.secretNames);
|
|
643
|
+
const watchesRepositories = args.hasScmChannels || args.hasDeploymentsChannels === true;
|
|
644
|
+
ctx.out(`Deployed ${slug} (team ${ctx.teamId})\n` +
|
|
645
|
+
` status: running\n` +
|
|
646
|
+
` architecture: v2\n` +
|
|
647
|
+
` application: ${detail.applicationId}\n` +
|
|
648
|
+
` release: ${detail.releaseId}\n` +
|
|
649
|
+
` alias: ${ctx.client.aliasUrl(accepted.engineAlias)}\n` +
|
|
650
|
+
(args.components === undefined
|
|
651
|
+
? ""
|
|
652
|
+
: ` components: ${args.components
|
|
653
|
+
.map((component) => component.componentKey)
|
|
654
|
+
.join(", ")}\n`) +
|
|
655
|
+
(detail.repositories === undefined || !watchesRepositories
|
|
656
|
+
? ""
|
|
657
|
+
: ` watching: ${detail.repositories.length === 0 ? "(nothing)" : detail.repositories.join(", ")}\n`) +
|
|
658
|
+
livePublicWebhookLines(ctx, detail));
|
|
659
|
+
// No --cursor-events-repo hint: that flag fails closed without the webhook.
|
|
660
|
+
if (detail.unboundInferredRepository !== undefined) {
|
|
661
|
+
ctx.err(`warning: ${slug} is not watching ${detail.unboundInferredRepository}.\n` +
|
|
662
|
+
(detail.repositories !== undefined && detail.repositories.length > 0
|
|
663
|
+
? ` Kept the existing scopes: ${detail.repositories.join(", ")}.\n`
|
|
664
|
+
: ` The deployment watches nothing.\n`));
|
|
665
|
+
return 0;
|
|
666
|
+
}
|
|
667
|
+
// An agent with GitHub/GitLab/Origin/deployments channels bound to no
|
|
668
|
+
// repository scope gets no deliveries at all (deployments channels receive
|
|
669
|
+
// the watched repos' deployment events), which is otherwise invisible here.
|
|
670
|
+
if (watchesRepositories && detail.repositories?.length === 0) {
|
|
671
|
+
ctx.err(`warning: ${slug} watches no repositories, so its GitHub/GitLab/Origin/deployments channels receive no events.\n` +
|
|
672
|
+
` Redeploy with --cursor-events-repo <owner>/<name> or gitlab.com/<group>/<project> to set the scope.\n`);
|
|
673
|
+
}
|
|
674
|
+
return 0;
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* Read the deploy-relevant bits of the project manifest at `dir` in one
|
|
678
|
+
* load: the `hosting` block, declared secrets, and channel warnings.
|
|
679
|
+
*/
|
|
680
|
+
async function readDeployManifest(dir) {
|
|
681
|
+
const project = await loadAgentProject(dir);
|
|
682
|
+
// Fail here, before anything is dispatched: a project with error
|
|
683
|
+
// diagnostics (e.g. agent/storage.ts on architecture v2) would only be
|
|
684
|
+
// refused later by `serve` inside the hosted build, wasting a bake.
|
|
685
|
+
if (hasErrorDiagnostics(project)) {
|
|
686
|
+
throw new Error(`Refusing to deploy ${project.name} — it has errors:\n${formatDiagnostics(project.diagnostics.filter((d) => d.severity === "error"))}`);
|
|
687
|
+
}
|
|
688
|
+
return {
|
|
689
|
+
hosting: project.agent.hosting,
|
|
690
|
+
architecture: project.agent.architecture,
|
|
691
|
+
persistent: project.agent.persistent === true,
|
|
692
|
+
image: project.agent.hosting?.image,
|
|
693
|
+
publicChannelIdsWithDeadSecretPolicies: project.channels
|
|
694
|
+
.filter((channel) => {
|
|
695
|
+
const auth = channel.definition.auth ?? [];
|
|
696
|
+
return (auth.some(isPublicEndpointPolicy) &&
|
|
697
|
+
auth.some((policy) => {
|
|
698
|
+
const kind = catchAuthDeclaration(policy)?.kind;
|
|
699
|
+
return kind !== undefined && kind !== "public";
|
|
700
|
+
}));
|
|
701
|
+
})
|
|
702
|
+
.map((channel) => channel.id),
|
|
703
|
+
httpChannelPublicEndpoint: (project.httpChannel.auth ?? []).some(isPublicEndpointPolicy),
|
|
704
|
+
catchSecretNames: [
|
|
705
|
+
...new Set(project.channels.flatMap((channel) => channelCatchSecretNames(channel.definition))),
|
|
706
|
+
],
|
|
707
|
+
credentialSecretNames: [
|
|
708
|
+
...new Set(project.channels.flatMap((channel) => channelCredentialSecretNames(channel.definition))),
|
|
709
|
+
],
|
|
710
|
+
secretAlternatives: project.channels.flatMap((channel) => channelSecretAlternatives(channel.definition)),
|
|
711
|
+
hasScmChannels: project.channels.some((channel) => {
|
|
712
|
+
const kind = channel.definition.meta?.kind;
|
|
713
|
+
return kind === "github" || kind === "gitlab" || kind === "origin";
|
|
714
|
+
}),
|
|
715
|
+
hasDeploymentsChannels: project.channels.some((channel) => channel.definition.meta?.kind === "deployments"),
|
|
716
|
+
extensionEgress: (project.agent.extensions ?? []).flatMap((extension) => {
|
|
717
|
+
const egressDomains = extension.hosting?.egressDomains ?? [];
|
|
718
|
+
return egressDomains.length === 0 ? [] : [{ extension: extension.name, egressDomains }];
|
|
719
|
+
}),
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* Every secret name the deployment is expected to carry: the authored
|
|
724
|
+
* `hosting.secretNames` plus the names the control plane verifies caught
|
|
725
|
+
* requests with. Empty when the manifests declare none.
|
|
726
|
+
*/
|
|
727
|
+
function declaredSecretNames(manifests) {
|
|
728
|
+
return {
|
|
729
|
+
names: [
|
|
730
|
+
...new Set(manifests.flatMap((manifest) => manifest === undefined
|
|
731
|
+
? []
|
|
732
|
+
: [
|
|
733
|
+
...(manifest.hosting?.secretNames ?? []),
|
|
734
|
+
...manifest.catchSecretNames,
|
|
735
|
+
...manifest.credentialSecretNames,
|
|
736
|
+
])),
|
|
737
|
+
],
|
|
738
|
+
alternatives: manifests.flatMap((manifest) => manifest?.secretAlternatives ?? []),
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Friendly post-deploy nudge: the manifest declares secrets the agent
|
|
743
|
+
* expects, but the deployment does not have them all set yet.
|
|
744
|
+
*/
|
|
745
|
+
function warnMissingSecrets(ctx, slug, declared, set) {
|
|
746
|
+
for (const group of unmetSecretAlternatives(declared?.alternatives ?? [], set)) {
|
|
747
|
+
ctx.err(`warning: none of ${group.names.join(", ")} is set on ${slug}: ${group.unsetEffect}\n` +
|
|
748
|
+
` set one with \`${CLI} secret set ${slug} ${group.names[0]}\`\n`);
|
|
749
|
+
}
|
|
750
|
+
if (declared === undefined || declared.names.length === 0) {
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
753
|
+
const setNames = new Set(set ?? []);
|
|
754
|
+
// Platform-managed names (CURSOR_*, hosted storage) are injected by the
|
|
755
|
+
// control plane and never appear in secrets list — do not warn on them.
|
|
756
|
+
const missing = declared.names.filter((name) => !setNames.has(name) && !isReservedSecretName(name));
|
|
757
|
+
if (missing.length === 0) {
|
|
758
|
+
return;
|
|
759
|
+
}
|
|
760
|
+
ctx.err(`warning: secrets declared in the agent manifest but not set on ${slug}: ${missing.join(", ")}\n` +
|
|
761
|
+
` set them with \`${CLI} secret set ${slug} ${missing.join(" ")}\`\n`);
|
|
762
|
+
}
|
|
763
|
+
// ============================================================================
|
|
764
|
+
// deployments (list)
|
|
765
|
+
// ============================================================================
|
|
766
|
+
export async function cmdDeployments(options) {
|
|
767
|
+
const ctx = await prepare(options);
|
|
768
|
+
if (typeof ctx === "number") {
|
|
769
|
+
return ctx;
|
|
770
|
+
}
|
|
771
|
+
let page;
|
|
772
|
+
try {
|
|
773
|
+
page = await ctx.client.listAgentkitDeploymentsPage({
|
|
774
|
+
teamId: ctx.teamId,
|
|
775
|
+
pageSize: ctx.list.limit,
|
|
776
|
+
pageToken: ctx.list.pageToken,
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
catch (error) {
|
|
780
|
+
throw apiError(error);
|
|
781
|
+
}
|
|
782
|
+
if (ctx.json) {
|
|
783
|
+
printListJson({ items: page.deployments, nextPageToken: page.nextPageToken }, { fields: ctx.fields, write: ctx.out });
|
|
784
|
+
return 0;
|
|
785
|
+
}
|
|
786
|
+
if (page.deployments.length === 0) {
|
|
787
|
+
// Past the last page the team can still have deployments.
|
|
788
|
+
ctx.out(ctx.list.pageToken === undefined
|
|
789
|
+
? `No deployments on team ${ctx.teamId}. Create one with \`${CLI} deploy\`.\n`
|
|
790
|
+
: "No more deployments.\n");
|
|
791
|
+
return 0;
|
|
792
|
+
}
|
|
793
|
+
ctx.out(`${renderTable(["SLUG", "STATUS", "UPDATED"], page.deployments.map((application) => [
|
|
794
|
+
application.slug,
|
|
795
|
+
application.status,
|
|
796
|
+
application.deployments
|
|
797
|
+
.map((row) => row.desiredUpdatedAt)
|
|
798
|
+
.sort()
|
|
799
|
+
.at(-1) ?? "",
|
|
800
|
+
]))}\n`);
|
|
801
|
+
const hint = nextPageHint(page.nextPageToken);
|
|
802
|
+
if (hint !== undefined) {
|
|
803
|
+
ctx.err(hint);
|
|
804
|
+
}
|
|
805
|
+
return 0;
|
|
806
|
+
}
|
|
807
|
+
// ============================================================================
|
|
808
|
+
// deployment <slug> (detail)
|
|
809
|
+
// ============================================================================
|
|
810
|
+
export async function cmdDeploymentStatus(slug, options) {
|
|
811
|
+
if (slug === undefined || slug === "") {
|
|
812
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} deployment get <slug> [--team <id>] [--json]\n`);
|
|
813
|
+
return 1;
|
|
814
|
+
}
|
|
815
|
+
const ctx = await prepare(options);
|
|
816
|
+
if (typeof ctx === "number") {
|
|
817
|
+
return ctx;
|
|
818
|
+
}
|
|
819
|
+
// v1 409s architecture-v2 slugs, so the v2 GET goes first. A v2 404 falls
|
|
820
|
+
// through to the v1 detail: the exit ramp for a deployment not yet on v2.
|
|
821
|
+
try {
|
|
822
|
+
const detail = await ctx.client.getAgentkitDeploy({
|
|
823
|
+
teamId: ctx.teamId,
|
|
824
|
+
slug,
|
|
825
|
+
});
|
|
826
|
+
renderAgentkitDeploymentStatus(ctx, detail);
|
|
827
|
+
return 0;
|
|
828
|
+
}
|
|
829
|
+
catch (error) {
|
|
830
|
+
if (!(error instanceof DeployApiError) || error.status !== 404) {
|
|
831
|
+
throw apiError(error);
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
let detail;
|
|
835
|
+
try {
|
|
836
|
+
detail = await ctx.client.getDeployment({ teamId: ctx.teamId, slug });
|
|
837
|
+
}
|
|
838
|
+
catch (error) {
|
|
839
|
+
throw apiError(error);
|
|
840
|
+
}
|
|
841
|
+
if (ctx.json) {
|
|
842
|
+
printJson({ ...detail, architecture: "v1" }, { fields: ctx.fields, write: ctx.out });
|
|
843
|
+
}
|
|
844
|
+
else {
|
|
845
|
+
const lines = [
|
|
846
|
+
`${detail.slug} (team ${detail.teamId})`,
|
|
847
|
+
` status: ${detail.status}`,
|
|
848
|
+
` architecture: v1`,
|
|
849
|
+
];
|
|
850
|
+
if (detail.lastError !== null && detail.lastError !== undefined) {
|
|
851
|
+
lines.push(` last error: ${sanitizeCustomerError(detail.lastError)}`);
|
|
852
|
+
}
|
|
853
|
+
if (detail.desiredUpdatedAt !== undefined) {
|
|
854
|
+
lines.push(` updated: ${detail.desiredUpdatedAt}`);
|
|
855
|
+
}
|
|
856
|
+
ctx.out(`${lines.join("\n")}\n`);
|
|
857
|
+
}
|
|
858
|
+
ctx.err(`${V1_MIGRATE_HINT}\n`);
|
|
859
|
+
return 0;
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* Absolute webhook URLs for channels the running release actually admits
|
|
863
|
+
* without an alias token. A missing alias or an empty path list prints
|
|
864
|
+
* nothing — a relative `/v1/channels/…` line is not a live URL. A
|
|
865
|
+
* multi-tenant release returns an empty list: the engine alias 404s, and
|
|
866
|
+
* the deployment URL is not this application's alias.
|
|
867
|
+
*/
|
|
868
|
+
function livePublicWebhookLines(ctx, detail) {
|
|
869
|
+
const engineAlias = detail.engineAlias;
|
|
870
|
+
if (detail.status !== "running" || engineAlias === undefined) {
|
|
871
|
+
return "";
|
|
872
|
+
}
|
|
873
|
+
return (detail.publicRoutePaths ?? [])
|
|
874
|
+
.map((path) => ` public: ${ctx.client.aliasUrl(engineAlias)}${path} (no alias token)\n`)
|
|
875
|
+
.join("");
|
|
876
|
+
}
|
|
877
|
+
function renderAgentkitDeploymentStatus(ctx, detail) {
|
|
878
|
+
if (ctx.json) {
|
|
879
|
+
printJson(detail, { fields: ctx.fields, write: ctx.out });
|
|
880
|
+
return;
|
|
881
|
+
}
|
|
882
|
+
const lines = [
|
|
883
|
+
`${detail.slug} (team ${detail.teamId})`,
|
|
884
|
+
` status: ${detail.status}`,
|
|
885
|
+
` architecture: v2`,
|
|
886
|
+
` application: ${detail.applicationId}`,
|
|
887
|
+
` release: ${detail.releaseId}`,
|
|
888
|
+
` progress: ${detail.progress}`,
|
|
889
|
+
];
|
|
890
|
+
if (detail.statusMessage !== null && detail.statusMessage.trim() !== "") {
|
|
891
|
+
lines.push(` step: ${detail.statusMessage}`);
|
|
892
|
+
}
|
|
893
|
+
if (detail.repositories !== undefined) {
|
|
894
|
+
lines.push(` watching: ${detail.repositories.length === 0 ? "(nothing)" : detail.repositories.join(", ")}`);
|
|
895
|
+
}
|
|
896
|
+
if (detail.secretNames !== undefined && detail.secretNames.length > 0) {
|
|
897
|
+
lines.push(` secrets: ${detail.secretNames.join(", ")}`);
|
|
898
|
+
}
|
|
899
|
+
const publicLines = livePublicWebhookLines(ctx, detail);
|
|
900
|
+
if (publicLines.length > 0) {
|
|
901
|
+
lines.push(...publicLines.replace(/\n$/, "").split("\n"));
|
|
902
|
+
}
|
|
903
|
+
if (detail.lastError !== null && detail.lastError !== undefined) {
|
|
904
|
+
lines.push(` last error: ${sanitizeCustomerError(detail.lastError)}`);
|
|
905
|
+
}
|
|
906
|
+
ctx.out(`${lines.join("\n")}\n`);
|
|
907
|
+
}
|
|
908
|
+
// ============================================================================
|
|
909
|
+
// stop <slug>
|
|
910
|
+
// ============================================================================
|
|
911
|
+
export async function cmdStop(slug, options) {
|
|
912
|
+
if (slug === undefined || slug === "") {
|
|
913
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} deployment stop <slug> [--team <id>] [--json] [--no-wait]\n`);
|
|
914
|
+
return 1;
|
|
915
|
+
}
|
|
916
|
+
const ctx = await prepare(options);
|
|
917
|
+
if (typeof ctx === "number") {
|
|
918
|
+
return ctx;
|
|
919
|
+
}
|
|
920
|
+
// Stop takes only a slug, so there is no manifest to dispatch on. The v2
|
|
921
|
+
// agentsdk control plane goes first: v1 endpoints refuse `architecture:
|
|
922
|
+
// "v2"` slugs with a 409 rather than a 404. A v2 404 falls back to the v1
|
|
923
|
+
// stop, the exit ramp for a deployment not yet on v2.
|
|
924
|
+
let architecture = "v2";
|
|
925
|
+
let accepted;
|
|
926
|
+
try {
|
|
927
|
+
accepted = await ctx.client.stopAgentkit({
|
|
928
|
+
teamId: ctx.teamId,
|
|
929
|
+
slug,
|
|
930
|
+
cancelRuns: options.cancelRuns,
|
|
931
|
+
});
|
|
932
|
+
}
|
|
933
|
+
catch (error) {
|
|
934
|
+
if (!(error instanceof DeployApiError) || error.status !== 404) {
|
|
935
|
+
throw apiError(error);
|
|
936
|
+
}
|
|
937
|
+
if (options.cancelRuns === true) {
|
|
938
|
+
ctx.err(`Canceling active runs while stopping is supported only for Agent SDK v2 deployments.\n`);
|
|
939
|
+
return 1;
|
|
940
|
+
}
|
|
941
|
+
try {
|
|
942
|
+
accepted = await ctx.client.stopDeployment({ teamId: ctx.teamId, slug });
|
|
943
|
+
architecture = "v1";
|
|
944
|
+
}
|
|
945
|
+
catch (v1Error) {
|
|
946
|
+
throw apiError(v1Error);
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
const cancellation = "cancellation" in accepted ? accepted.cancellation : undefined;
|
|
950
|
+
const stoppedGlobally = "scope" in accepted && accepted.scope === "global";
|
|
951
|
+
if (ctx.noWait) {
|
|
952
|
+
if (ctx.json) {
|
|
953
|
+
ctx.out(`${JSON.stringify(accepted, null, 2)}\n`);
|
|
954
|
+
}
|
|
955
|
+
else {
|
|
956
|
+
ctx.out(stoppedGlobally
|
|
957
|
+
? `Stop accepted for ${slug} across all tenants (status: ${accepted.status}).\n`
|
|
958
|
+
: `Stop accepted for ${slug} (status: ${accepted.status}).\n`);
|
|
959
|
+
}
|
|
960
|
+
return cancellation?.failed === 0 || cancellation === undefined ? 0 : 1;
|
|
961
|
+
}
|
|
962
|
+
let detail;
|
|
963
|
+
try {
|
|
964
|
+
detail =
|
|
965
|
+
architecture === "v2"
|
|
966
|
+
? await pollUntil(ctx, slug, new Set(["stopped"]), () => ctx.client.getAgentkitDeploy({ teamId: ctx.teamId, slug }))
|
|
967
|
+
: await pollUntil(ctx, slug, new Set(["stopped"]), () => ctx.client.getDeployment({ teamId: ctx.teamId, slug }));
|
|
968
|
+
}
|
|
969
|
+
catch (error) {
|
|
970
|
+
throw apiError(error);
|
|
971
|
+
}
|
|
972
|
+
if (ctx.json) {
|
|
973
|
+
// One document: the cancellation result rides along with the detail.
|
|
974
|
+
ctx.out(`${JSON.stringify(cancellation === undefined ? detail : { ...detail, cancellation }, null, 2)}\n`);
|
|
975
|
+
}
|
|
976
|
+
else if (stoppedGlobally) {
|
|
977
|
+
ctx.out(`Stopped ${slug} across all tenants (team ${ctx.teamId}); resume with \`${CLI} deployment start ${slug}\`.\n`);
|
|
978
|
+
}
|
|
979
|
+
else {
|
|
980
|
+
ctx.out(`Stopped ${slug} (team ${ctx.teamId}).\n`);
|
|
981
|
+
}
|
|
982
|
+
if (cancellation !== undefined) {
|
|
983
|
+
return writeCancellationStarted(ctx, cancellation, slug);
|
|
984
|
+
}
|
|
985
|
+
return 0;
|
|
986
|
+
}
|
|
987
|
+
function writeCancellationStarted(ctx, cancellation, slug) {
|
|
988
|
+
if (!ctx.json) {
|
|
989
|
+
ctx.out(`Started cancellation across ${cancellation.batchesStarted} deployment batch(es).\n`);
|
|
990
|
+
if (cancellation.sessionsMarkedFailed !== undefined) {
|
|
991
|
+
ctx.out(`Marked ${cancellation.sessionsMarkedFailed} factory session(s) failed.\n`);
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
if (cancellation.failed > 0) {
|
|
995
|
+
ctx.err(`Failed to start ${cancellation.failed} cancellation batch(es); retry with \`${CLI} deployment cancel-runs ${slug}\`.\n`);
|
|
996
|
+
return 1;
|
|
997
|
+
}
|
|
998
|
+
return 0;
|
|
999
|
+
}
|
|
1000
|
+
export async function cmdStart(slug, options) {
|
|
1001
|
+
if (slug === undefined || slug === "") {
|
|
1002
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} deployment start <slug> [--team <id>] [--json]\n`);
|
|
1003
|
+
return 1;
|
|
1004
|
+
}
|
|
1005
|
+
const ctx = await prepare(options);
|
|
1006
|
+
if (typeof ctx === "number") {
|
|
1007
|
+
return ctx;
|
|
1008
|
+
}
|
|
1009
|
+
try {
|
|
1010
|
+
const accepted = await ctx.client.startAgentkit({
|
|
1011
|
+
teamId: ctx.teamId,
|
|
1012
|
+
slug,
|
|
1013
|
+
});
|
|
1014
|
+
if (ctx.json) {
|
|
1015
|
+
ctx.out(`${JSON.stringify(accepted, null, 2)}\n`);
|
|
1016
|
+
}
|
|
1017
|
+
else {
|
|
1018
|
+
ctx.out(`Started ${slug} (team ${ctx.teamId}).\n`);
|
|
1019
|
+
}
|
|
1020
|
+
return 0;
|
|
1021
|
+
}
|
|
1022
|
+
catch (error) {
|
|
1023
|
+
throw apiError(error);
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
export async function cmdKill(slug, options) {
|
|
1027
|
+
if (slug === undefined || slug === "") {
|
|
1028
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} deployment kill <slug> [--team <id>] [--json]\n`);
|
|
1029
|
+
return 1;
|
|
1030
|
+
}
|
|
1031
|
+
const ctx = await prepare(options);
|
|
1032
|
+
if (typeof ctx === "number") {
|
|
1033
|
+
return ctx;
|
|
1034
|
+
}
|
|
1035
|
+
let accepted;
|
|
1036
|
+
try {
|
|
1037
|
+
accepted = await ctx.client.killAgentkit({ teamId: ctx.teamId, slug });
|
|
1038
|
+
}
|
|
1039
|
+
catch (error) {
|
|
1040
|
+
throw apiError(error);
|
|
1041
|
+
}
|
|
1042
|
+
if (ctx.json) {
|
|
1043
|
+
ctx.out(`${JSON.stringify(accepted, null, 2)}\n`);
|
|
1044
|
+
}
|
|
1045
|
+
else {
|
|
1046
|
+
ctx.out(accepted.scope === "global"
|
|
1047
|
+
? `Killed ${slug} across all tenants (team ${ctx.teamId}): deploys locked, admission stopped.\n`
|
|
1048
|
+
: `Killed ${slug} (team ${ctx.teamId}): deploys locked, admission stopped.\n`);
|
|
1049
|
+
ctx.out(`Resume traffic with \`${CLI} deployment unlock ${slug}\` then \`${CLI} deployment start ${slug}\`.\n`);
|
|
1050
|
+
}
|
|
1051
|
+
if (accepted.cancellation !== undefined) {
|
|
1052
|
+
return writeCancellationStarted(ctx, accepted.cancellation, slug);
|
|
1053
|
+
}
|
|
1054
|
+
return 0;
|
|
1055
|
+
}
|
|
1056
|
+
export async function cmdUnlockDeploys(slug, options) {
|
|
1057
|
+
if (slug === undefined || slug === "") {
|
|
1058
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} deployment unlock <slug> [--team <id>] [--json]\n`);
|
|
1059
|
+
return 1;
|
|
1060
|
+
}
|
|
1061
|
+
const ctx = await prepare(options);
|
|
1062
|
+
if (typeof ctx === "number") {
|
|
1063
|
+
return ctx;
|
|
1064
|
+
}
|
|
1065
|
+
try {
|
|
1066
|
+
const accepted = await ctx.client.unlockAgentkitDeploys({
|
|
1067
|
+
teamId: ctx.teamId,
|
|
1068
|
+
slug,
|
|
1069
|
+
});
|
|
1070
|
+
if (ctx.json) {
|
|
1071
|
+
ctx.out(`${JSON.stringify(accepted, null, 2)}\n`);
|
|
1072
|
+
}
|
|
1073
|
+
else {
|
|
1074
|
+
ctx.out(`Unlocked deploys for ${slug} (team ${ctx.teamId}).\n`);
|
|
1075
|
+
}
|
|
1076
|
+
return 0;
|
|
1077
|
+
}
|
|
1078
|
+
catch (error) {
|
|
1079
|
+
throw apiError(error);
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
export async function cmdCancelRuns(slug, options) {
|
|
1083
|
+
if (slug === undefined || slug === "") {
|
|
1084
|
+
(options.err ?? ((text) => void process.stderr.write(text)))(`Usage: ${CLI} deployment cancel-runs <slug> [--team <id>] [--json]\n`);
|
|
1085
|
+
return 1;
|
|
1086
|
+
}
|
|
1087
|
+
const ctx = await prepare(options);
|
|
1088
|
+
if (typeof ctx === "number") {
|
|
1089
|
+
return ctx;
|
|
1090
|
+
}
|
|
1091
|
+
let result;
|
|
1092
|
+
try {
|
|
1093
|
+
result = await ctx.client.cancelAgentkitRuns({
|
|
1094
|
+
teamId: ctx.teamId,
|
|
1095
|
+
slug,
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
catch (error) {
|
|
1099
|
+
throw apiError(error);
|
|
1100
|
+
}
|
|
1101
|
+
if (ctx.json) {
|
|
1102
|
+
ctx.out(`${JSON.stringify(result, null, 2)}\n`);
|
|
1103
|
+
}
|
|
1104
|
+
else {
|
|
1105
|
+
ctx.out(`Started cancellation across ${result.batchesStarted} deployment batch(es).\n`);
|
|
1106
|
+
if (result.sessionsMarkedFailed !== undefined) {
|
|
1107
|
+
ctx.out(`Marked ${result.sessionsMarkedFailed} factory session(s) failed.\n`);
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
if (result.failed > 0) {
|
|
1111
|
+
ctx.err(`Failed to start ${result.failed} cancellation batch(es).\n`);
|
|
1112
|
+
return 1;
|
|
1113
|
+
}
|
|
1114
|
+
return 0;
|
|
1115
|
+
}
|
|
1116
|
+
// ============================================================================
|
|
1117
|
+
// event-repos <slug> --repo <owner/name>...
|
|
1118
|
+
// ============================================================================
|
|
1119
|
+
export async function cmdEventRepos(slug, repositories, options) {
|
|
1120
|
+
if (slug === undefined || slug === "") {
|
|
1121
|
+
(options.err ?? ((text) => void process.stderr.write(text)))(`Usage: ${CLI} deployment update <slug> --event-repo <owner/name>... [--team <id>] [--json]\n`);
|
|
1122
|
+
return 1;
|
|
1123
|
+
}
|
|
1124
|
+
const ctx = await prepare(options);
|
|
1125
|
+
if (typeof ctx === "number") {
|
|
1126
|
+
return ctx;
|
|
1127
|
+
}
|
|
1128
|
+
let configured;
|
|
1129
|
+
try {
|
|
1130
|
+
configured = await ctx.client.setAgentkitEventRepositories({
|
|
1131
|
+
teamId: ctx.teamId,
|
|
1132
|
+
slug,
|
|
1133
|
+
repositories,
|
|
1134
|
+
});
|
|
1135
|
+
}
|
|
1136
|
+
catch (error) {
|
|
1137
|
+
throw apiError(error);
|
|
1138
|
+
}
|
|
1139
|
+
if (ctx.json) {
|
|
1140
|
+
ctx.out(`${JSON.stringify({ repositories: configured }, null, 2)}\n`);
|
|
1141
|
+
}
|
|
1142
|
+
else if (configured.length === 0) {
|
|
1143
|
+
ctx.out(`${slug} now watches no repositories.\n`);
|
|
1144
|
+
}
|
|
1145
|
+
else {
|
|
1146
|
+
ctx.out(`${slug} now watches ${configured.join(", ")}.\n`);
|
|
1147
|
+
}
|
|
1148
|
+
return 0;
|
|
1149
|
+
}
|
|
1150
|
+
// ============================================================================
|
|
1151
|
+
// upgrade <slug>
|
|
1152
|
+
// ============================================================================
|
|
1153
|
+
/** Release ids are uuids; anything else the user typed is a version. */
|
|
1154
|
+
const RELEASE_ID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
1155
|
+
export async function cmdUpgrade(args, options) {
|
|
1156
|
+
return cmdPinRelease(args, options, {
|
|
1157
|
+
usage: `Usage: ${CLI} deployment upgrade <slug> [--release <id|version>] [--team <id>] [--json]\n`,
|
|
1158
|
+
pin: (client, request) => client.upgradeAgentkitInstall(request),
|
|
1159
|
+
success: (slug, releaseId) => `${slug} now runs release ${releaseId}.\n`,
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
export async function cmdRollback(args, options) {
|
|
1163
|
+
return cmdPinRelease(args, options, {
|
|
1164
|
+
usage: `Usage: ${CLI} deployment rollback <slug> [--release <id|version>] [--team <id>] [--json]\n`,
|
|
1165
|
+
pin: (client, request) => client.rollbackAgentkitInstall(request),
|
|
1166
|
+
success: (slug, releaseId) => `${slug} rolled back to release ${releaseId}.\n`,
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
async function cmdPinRelease(args, options, pin) {
|
|
1170
|
+
const { slug, release } = args;
|
|
1171
|
+
if (slug === undefined || slug === "") {
|
|
1172
|
+
(options.err ?? ((text) => void process.stderr.write(text)))(pin.usage);
|
|
1173
|
+
return 1;
|
|
1174
|
+
}
|
|
1175
|
+
const ctx = await prepare(options);
|
|
1176
|
+
if (typeof ctx === "number") {
|
|
1177
|
+
return ctx;
|
|
1178
|
+
}
|
|
1179
|
+
const selector = release?.trim() ?? "";
|
|
1180
|
+
let releaseId;
|
|
1181
|
+
try {
|
|
1182
|
+
releaseId = await pin.pin(ctx.client, {
|
|
1183
|
+
teamId: ctx.teamId,
|
|
1184
|
+
slug,
|
|
1185
|
+
...(selector === ""
|
|
1186
|
+
? {}
|
|
1187
|
+
: RELEASE_ID_RE.test(selector)
|
|
1188
|
+
? { releaseId: selector }
|
|
1189
|
+
: { version: selector }),
|
|
1190
|
+
});
|
|
1191
|
+
}
|
|
1192
|
+
catch (error) {
|
|
1193
|
+
throw apiError(error);
|
|
1194
|
+
}
|
|
1195
|
+
if (ctx.json) {
|
|
1196
|
+
ctx.out(`${JSON.stringify({ releaseId }, null, 2)}\n`);
|
|
1197
|
+
}
|
|
1198
|
+
else {
|
|
1199
|
+
ctx.out(pin.success(slug, releaseId));
|
|
1200
|
+
}
|
|
1201
|
+
return 0;
|
|
1202
|
+
}
|
|
1203
|
+
// ============================================================================
|
|
1204
|
+
// delete <slug>
|
|
1205
|
+
// ============================================================================
|
|
1206
|
+
export async function cmdDelete(slug, options) {
|
|
1207
|
+
if (slug === undefined || slug === "") {
|
|
1208
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} deployment delete <slug> [--team <id>] [--json] [--no-wait]\n`);
|
|
1209
|
+
return 1;
|
|
1210
|
+
}
|
|
1211
|
+
const ctx = await prepare(options);
|
|
1212
|
+
if (typeof ctx === "number") {
|
|
1213
|
+
return ctx;
|
|
1214
|
+
}
|
|
1215
|
+
// Same dispatch as `stop`: v1 409s architecture-v2 slugs, so the v2
|
|
1216
|
+
// DELETE goes first. A v2 404 falls through to the v1 delete, the exit
|
|
1217
|
+
// ramp for a deployment not yet on v2.
|
|
1218
|
+
let architecture = "v2";
|
|
1219
|
+
let accepted;
|
|
1220
|
+
try {
|
|
1221
|
+
accepted = await ctx.client.deleteAgentkit({ teamId: ctx.teamId, slug });
|
|
1222
|
+
}
|
|
1223
|
+
catch (error) {
|
|
1224
|
+
if (!(error instanceof DeployApiError) || error.status !== 404) {
|
|
1225
|
+
throw apiError(error);
|
|
1226
|
+
}
|
|
1227
|
+
try {
|
|
1228
|
+
accepted = await ctx.client.deleteDeployment({
|
|
1229
|
+
teamId: ctx.teamId,
|
|
1230
|
+
slug,
|
|
1231
|
+
});
|
|
1232
|
+
architecture = "v1";
|
|
1233
|
+
}
|
|
1234
|
+
catch (v1Error) {
|
|
1235
|
+
throw apiError(v1Error);
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
if (ctx.noWait) {
|
|
1239
|
+
if (ctx.json) {
|
|
1240
|
+
ctx.out(`${JSON.stringify(accepted, null, 2)}\n`);
|
|
1241
|
+
}
|
|
1242
|
+
else {
|
|
1243
|
+
ctx.out(`Delete accepted for ${slug} (status: ${accepted.status}).\n`);
|
|
1244
|
+
}
|
|
1245
|
+
return 0;
|
|
1246
|
+
}
|
|
1247
|
+
try {
|
|
1248
|
+
await pollUntilGone(ctx, slug, () => architecture === "v2"
|
|
1249
|
+
? ctx.client.getAgentkitDeploy({ teamId: ctx.teamId, slug })
|
|
1250
|
+
: ctx.client.getDeployment({ teamId: ctx.teamId, slug }));
|
|
1251
|
+
}
|
|
1252
|
+
catch (error) {
|
|
1253
|
+
throw apiError(error);
|
|
1254
|
+
}
|
|
1255
|
+
if (ctx.json) {
|
|
1256
|
+
ctx.out(`${JSON.stringify({ slug, status: "deleted" }, null, 2)}\n`);
|
|
1257
|
+
}
|
|
1258
|
+
else {
|
|
1259
|
+
ctx.out(`Deleted ${slug} (team ${ctx.teamId}).\n`);
|
|
1260
|
+
}
|
|
1261
|
+
return 0;
|
|
1262
|
+
}
|
|
1263
|
+
// ============================================================================
|
|
1264
|
+
// rotate-token <slug>
|
|
1265
|
+
// ============================================================================
|
|
1266
|
+
export async function cmdRotateToken(slug, options) {
|
|
1267
|
+
if (slug === undefined || slug === "") {
|
|
1268
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} deployment rotate-token <slug> [--team <id>]\n`);
|
|
1269
|
+
return 1;
|
|
1270
|
+
}
|
|
1271
|
+
const ctx = await prepare(options);
|
|
1272
|
+
if (typeof ctx === "number") {
|
|
1273
|
+
return ctx;
|
|
1274
|
+
}
|
|
1275
|
+
let aliasToken;
|
|
1276
|
+
try {
|
|
1277
|
+
aliasToken = await ctx.client.rotateAgentsdkAliasToken({
|
|
1278
|
+
teamId: ctx.teamId,
|
|
1279
|
+
slug,
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
catch (error) {
|
|
1283
|
+
throw apiError(error);
|
|
1284
|
+
}
|
|
1285
|
+
if (ctx.json) {
|
|
1286
|
+
ctx.out(`${JSON.stringify({ aliasToken }, null, 2)}\n`);
|
|
1287
|
+
return 0;
|
|
1288
|
+
}
|
|
1289
|
+
ctx.out(`Rotated the alias token for ${slug}. The old token stopped working immediately.\n${aliasTokenBlock(aliasToken)}`);
|
|
1290
|
+
return 0;
|
|
1291
|
+
}
|
|
1292
|
+
// ============================================================================
|
|
1293
|
+
// secrets set|list|unset
|
|
1294
|
+
// ============================================================================
|
|
1295
|
+
export async function cmdSecretsSet(slug, specs, options) {
|
|
1296
|
+
const usageErr = options.err ?? ((t) => void process.stderr.write(t));
|
|
1297
|
+
if (slug === undefined || slug === "" || specs.length === 0) {
|
|
1298
|
+
usageErr(`Usage: ${CLI} secret set <slug> NAME [NAME2 ...] [--team <id>] [--json]\n` +
|
|
1299
|
+
` Hidden prompt on a TTY. One NAME reads all of stdin (redirect a PEM).\n` +
|
|
1300
|
+
` Several NAMEs: one stdin line each.\n` +
|
|
1301
|
+
` Opt-in (leaks into argv / agent terminals): NAME=VALUE … --from-argv\n`);
|
|
1302
|
+
return 1;
|
|
1303
|
+
}
|
|
1304
|
+
// Parse and validate every name before prompting for any value, so a
|
|
1305
|
+
// typo in the last name cannot waste typed-in secrets.
|
|
1306
|
+
const parsed = [];
|
|
1307
|
+
for (const spec of specs) {
|
|
1308
|
+
const eq = spec.indexOf("=");
|
|
1309
|
+
const name = eq === -1 ? spec : spec.slice(0, eq);
|
|
1310
|
+
const nameError = validateSettableSecretName(name);
|
|
1311
|
+
if (nameError !== undefined) {
|
|
1312
|
+
usageErr(`${nameError}\n`);
|
|
1313
|
+
return 1;
|
|
1314
|
+
}
|
|
1315
|
+
parsed.push(eq === -1 ? { name } : { name, value: spec.slice(eq + 1) });
|
|
1316
|
+
}
|
|
1317
|
+
const hasArgvValues = parsed.some((entry) => entry.value !== undefined);
|
|
1318
|
+
if (hasArgvValues && options.fromArgv !== true) {
|
|
1319
|
+
usageErr(`Refusing NAME=VALUE on argv (shows up in shell history and agent-captured terminals).\n` +
|
|
1320
|
+
`Pass names only:\n` +
|
|
1321
|
+
` ${CLI} secret set ${slug} NAME\n` +
|
|
1322
|
+
`Hidden prompt on a TTY. One NAME reads all of stdin, including newlines:\n` +
|
|
1323
|
+
` ${CLI} secret set ${slug} NAME < ./secret.pem\n` +
|
|
1324
|
+
`Several NAMEs take one stdin line each.\n`);
|
|
1325
|
+
return 1;
|
|
1326
|
+
}
|
|
1327
|
+
if (hasArgvValues) {
|
|
1328
|
+
usageErr(`warning: --from-argv puts secret values in argv (shell history and agent-captured terminals).\n`);
|
|
1329
|
+
}
|
|
1330
|
+
const ctx = await prepare(options);
|
|
1331
|
+
if (typeof ctx === "number") {
|
|
1332
|
+
return ctx;
|
|
1333
|
+
}
|
|
1334
|
+
const stdin = options.stdin ?? process.stdin;
|
|
1335
|
+
const secrets = [];
|
|
1336
|
+
let secretNames;
|
|
1337
|
+
try {
|
|
1338
|
+
const only = parsed.length === 1 ? parsed[0] : undefined;
|
|
1339
|
+
if (dryRunActive()) {
|
|
1340
|
+
// A dry run reads no value: the request below stops with names only.
|
|
1341
|
+
secrets.push(...parsed.map((entry) => ({ name: entry.name, value: "" })));
|
|
1342
|
+
}
|
|
1343
|
+
else if (only !== undefined && only.value === undefined && stdin.isTTY !== true) {
|
|
1344
|
+
secrets.push({
|
|
1345
|
+
name: only.name,
|
|
1346
|
+
value: await readWholeStdinValue(stdin, only.name),
|
|
1347
|
+
});
|
|
1348
|
+
}
|
|
1349
|
+
else {
|
|
1350
|
+
const readValue = createSecretValueReader(stdin, ctx.err);
|
|
1351
|
+
for (const entry of parsed) {
|
|
1352
|
+
secrets.push({
|
|
1353
|
+
name: entry.name,
|
|
1354
|
+
value: entry.value ?? (await readValue(entry.name)),
|
|
1355
|
+
});
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
secretNames = await ctx.client.setAgentkitSecrets({
|
|
1359
|
+
teamId: ctx.teamId,
|
|
1360
|
+
slug,
|
|
1361
|
+
secrets,
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
catch (error) {
|
|
1365
|
+
throw apiError(error);
|
|
1366
|
+
}
|
|
1367
|
+
if (ctx.json) {
|
|
1368
|
+
ctx.out(`${JSON.stringify({ secretNames }, null, 2)}\n`);
|
|
1369
|
+
return 0;
|
|
1370
|
+
}
|
|
1371
|
+
ctx.out(`Set ${secrets.length} secret${secrets.length === 1 ? "" : "s"} on ${slug}.\n` +
|
|
1372
|
+
`Secrets now set: ${secretNames.join(", ")}\n` +
|
|
1373
|
+
`The next task picks them up; no redeploy is required.\n`);
|
|
1374
|
+
return 0;
|
|
1375
|
+
}
|
|
1376
|
+
export async function cmdSecretsList(slug, options) {
|
|
1377
|
+
if (slug === undefined || slug === "") {
|
|
1378
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} secret list <slug> [--team <id>] [--json]\n`);
|
|
1379
|
+
return 1;
|
|
1380
|
+
}
|
|
1381
|
+
const ctx = await prepare(options);
|
|
1382
|
+
if (typeof ctx === "number") {
|
|
1383
|
+
return ctx;
|
|
1384
|
+
}
|
|
1385
|
+
let secrets;
|
|
1386
|
+
try {
|
|
1387
|
+
secrets = await ctx.client.listAgentkitSecrets({ teamId: ctx.teamId, slug });
|
|
1388
|
+
}
|
|
1389
|
+
catch (error) {
|
|
1390
|
+
throw apiError(error);
|
|
1391
|
+
}
|
|
1392
|
+
// The secrets route returns every secret at once, so page here.
|
|
1393
|
+
const page = pageLocally(secrets, ctx.list);
|
|
1394
|
+
if (ctx.json) {
|
|
1395
|
+
printListJson(page, { fields: ctx.fields, write: ctx.out });
|
|
1396
|
+
return 0;
|
|
1397
|
+
}
|
|
1398
|
+
if (secrets.length === 0) {
|
|
1399
|
+
ctx.out(`No secrets set on ${slug}. Add one with \`${CLI} secret set ${slug} NAME\`.\n`);
|
|
1400
|
+
return 0;
|
|
1401
|
+
}
|
|
1402
|
+
if (page.items.length === 0) {
|
|
1403
|
+
ctx.out("No more secrets.\n");
|
|
1404
|
+
return 0;
|
|
1405
|
+
}
|
|
1406
|
+
ctx.out(`${renderTable(["NAME", "CREATED"], page.items.map((secret) => [secret.name, secret.createdAt]))}\n`);
|
|
1407
|
+
const hint = nextPageHint(page.nextPageToken);
|
|
1408
|
+
if (hint !== undefined) {
|
|
1409
|
+
ctx.err(hint);
|
|
1410
|
+
}
|
|
1411
|
+
return 0;
|
|
1412
|
+
}
|
|
1413
|
+
export async function cmdSecretsUnset(slug, name, options) {
|
|
1414
|
+
if (slug === undefined || slug === "" || name === undefined || name === "") {
|
|
1415
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} secret delete <slug> NAME [--team <id>]\n`);
|
|
1416
|
+
return 1;
|
|
1417
|
+
}
|
|
1418
|
+
const ctx = await prepare(options);
|
|
1419
|
+
if (typeof ctx === "number") {
|
|
1420
|
+
return ctx;
|
|
1421
|
+
}
|
|
1422
|
+
try {
|
|
1423
|
+
await ctx.client.deleteAgentkitSecret({
|
|
1424
|
+
teamId: ctx.teamId,
|
|
1425
|
+
slug,
|
|
1426
|
+
name,
|
|
1427
|
+
});
|
|
1428
|
+
}
|
|
1429
|
+
catch (error) {
|
|
1430
|
+
if (error instanceof DeployApiError &&
|
|
1431
|
+
error.status === 404 &&
|
|
1432
|
+
error.message === SECRET_NOT_FOUND_MESSAGE) {
|
|
1433
|
+
throw new CliError(`No secret named ${name} on deployment ${slug}.`, {
|
|
1434
|
+
code: "not_found",
|
|
1435
|
+
hint: `Check \`${CLI} secret list ${slug}\` (and the slug / --team).`,
|
|
1436
|
+
cause: error,
|
|
1437
|
+
});
|
|
1438
|
+
}
|
|
1439
|
+
throw apiError(error);
|
|
1440
|
+
}
|
|
1441
|
+
if (ctx.json) {
|
|
1442
|
+
ctx.out(`${JSON.stringify({ removed: name }, null, 2)}\n`);
|
|
1443
|
+
}
|
|
1444
|
+
else {
|
|
1445
|
+
ctx.out(`Removed secret ${name} from ${slug}.\n`);
|
|
1446
|
+
}
|
|
1447
|
+
return 0;
|
|
1448
|
+
}
|
|
1449
|
+
/**
|
|
1450
|
+
* Returns a reader for interactive secret values: hidden (no-echo) prompt
|
|
1451
|
+
* when `stdin` is a TTY, otherwise one line per secret from the piped
|
|
1452
|
+
* stream. One reader per command so piped lines are consumed in order.
|
|
1453
|
+
* A single NAME uses {@link readWholeStdinValue} instead, so a redirected
|
|
1454
|
+
* PEM keeps its internal newlines.
|
|
1455
|
+
*/
|
|
1456
|
+
function createSecretValueReader(stdin, err) {
|
|
1457
|
+
if (stdin.isTTY === true) {
|
|
1458
|
+
return (name) => promptHidden(stdin, err, `Value for ${name}: `);
|
|
1459
|
+
}
|
|
1460
|
+
const readLine = createLineReader(stdin);
|
|
1461
|
+
return async (name) => {
|
|
1462
|
+
const line = await readLine();
|
|
1463
|
+
if (line === undefined) {
|
|
1464
|
+
throw new CliError(`stdin ended before a value for ${name} was provided (pipe one line per secret).`, { code: "invalid_argument" });
|
|
1465
|
+
}
|
|
1466
|
+
return line;
|
|
1467
|
+
};
|
|
1468
|
+
}
|
|
1469
|
+
/** Longest mask run drawn while typing a secret; the count carries the rest. */
|
|
1470
|
+
const SECRET_MASK_MAX_WIDTH = 24;
|
|
1471
|
+
/**
|
|
1472
|
+
* One line of typing feedback for the hidden prompt. Echoing the value would
|
|
1473
|
+
* leak it, so the line carries a bounded mask plus the exact character count —
|
|
1474
|
+
* enough to see that keystrokes, backspaces, and pasted values landed. The
|
|
1475
|
+
* mask is clamped to the terminal width so the redraw stays on one line.
|
|
1476
|
+
*/
|
|
1477
|
+
function renderSecretPromptLine(prompt, length, dim) {
|
|
1478
|
+
const count = `${length} char${length === 1 ? "" : "s"}`;
|
|
1479
|
+
const room = (process.stderr.columns ?? 80) - prompt.length - count.length - 2;
|
|
1480
|
+
const maskWidth = Math.max(0, Math.min(length, SECRET_MASK_MAX_WIDTH, room));
|
|
1481
|
+
// `·` over `•`: the rest of the CLI's progress output already uses it, and
|
|
1482
|
+
// fonts that ship no bullet glyph draw a tofu box in its place.
|
|
1483
|
+
const mask = "·".repeat(maskWidth);
|
|
1484
|
+
const body = mask === "" ? count : `${mask} ${count}`;
|
|
1485
|
+
return `\r\u001b[2K${prompt}${dim(body)}`;
|
|
1486
|
+
}
|
|
1487
|
+
/**
|
|
1488
|
+
* Raw-mode hidden prompt: never echoes the value, redraws a mask + character
|
|
1489
|
+
* count as it is typed, supports backspace and Ctrl-C.
|
|
1490
|
+
*/
|
|
1491
|
+
function promptHidden(stdin, err, prompt) {
|
|
1492
|
+
return new Promise((resolvePromise, reject) => {
|
|
1493
|
+
const { dim } = stderrPalette();
|
|
1494
|
+
let value = "";
|
|
1495
|
+
const draw = () => {
|
|
1496
|
+
err(renderSecretPromptLine(prompt, value.length, dim));
|
|
1497
|
+
};
|
|
1498
|
+
draw();
|
|
1499
|
+
stdin.setRawMode?.(true);
|
|
1500
|
+
stdin.resume();
|
|
1501
|
+
const cleanup = () => {
|
|
1502
|
+
stdin.off("data", onData);
|
|
1503
|
+
stdin.setRawMode?.(false);
|
|
1504
|
+
stdin.pause();
|
|
1505
|
+
draw();
|
|
1506
|
+
err("\n");
|
|
1507
|
+
};
|
|
1508
|
+
const onData = (chunk) => {
|
|
1509
|
+
const text = typeof chunk === "string" ? chunk : chunk.toString("utf8");
|
|
1510
|
+
for (const ch of text) {
|
|
1511
|
+
if (ch === "\r" || ch === "\n") {
|
|
1512
|
+
cleanup();
|
|
1513
|
+
resolvePromise(value);
|
|
1514
|
+
return;
|
|
1515
|
+
}
|
|
1516
|
+
if (ch === "\u0003") {
|
|
1517
|
+
cleanup();
|
|
1518
|
+
reject(new CliError("Aborted."));
|
|
1519
|
+
return;
|
|
1520
|
+
}
|
|
1521
|
+
if (ch === "\u007f" || ch === "\b") {
|
|
1522
|
+
value = value.slice(0, -1);
|
|
1523
|
+
continue;
|
|
1524
|
+
}
|
|
1525
|
+
value += ch;
|
|
1526
|
+
}
|
|
1527
|
+
// One redraw per chunk keeps a pasted value from flooding the terminal.
|
|
1528
|
+
draw();
|
|
1529
|
+
};
|
|
1530
|
+
stdin.on("data", onData);
|
|
1531
|
+
});
|
|
1532
|
+
}
|
|
1533
|
+
/**
|
|
1534
|
+
* Whole piped stdin for a single secret. One trailing newline is removed so
|
|
1535
|
+
* `echo value | secrets set slug NAME` still stores `value`. Internal
|
|
1536
|
+
* newlines stay, which is what a redirected PEM needs.
|
|
1537
|
+
*/
|
|
1538
|
+
async function readWholeStdinValue(stdin, name) {
|
|
1539
|
+
const raw = await readStreamText(stdin);
|
|
1540
|
+
if (raw === "") {
|
|
1541
|
+
throw new CliError(`stdin ended before a value for ${name} was provided.`, {
|
|
1542
|
+
code: "invalid_argument",
|
|
1543
|
+
});
|
|
1544
|
+
}
|
|
1545
|
+
return stripOneTrailingNewline(raw);
|
|
1546
|
+
}
|
|
1547
|
+
function stripOneTrailingNewline(value) {
|
|
1548
|
+
if (value.endsWith("\r\n")) {
|
|
1549
|
+
return value.slice(0, -2);
|
|
1550
|
+
}
|
|
1551
|
+
if (value.endsWith("\n") || value.endsWith("\r")) {
|
|
1552
|
+
return value.slice(0, -1);
|
|
1553
|
+
}
|
|
1554
|
+
return value;
|
|
1555
|
+
}
|
|
1556
|
+
function readStreamText(stream) {
|
|
1557
|
+
return new Promise((resolve, reject) => {
|
|
1558
|
+
const chunks = [];
|
|
1559
|
+
const cleanup = () => {
|
|
1560
|
+
stream.off("data", onData);
|
|
1561
|
+
stream.off("end", onEnd);
|
|
1562
|
+
stream.off("error", onError);
|
|
1563
|
+
};
|
|
1564
|
+
const onData = (chunk) => {
|
|
1565
|
+
chunks.push(typeof chunk === "string" ? Buffer.from(chunk) : chunk);
|
|
1566
|
+
};
|
|
1567
|
+
const onEnd = () => {
|
|
1568
|
+
cleanup();
|
|
1569
|
+
resolve(Buffer.concat(chunks).toString("utf8"));
|
|
1570
|
+
};
|
|
1571
|
+
const onError = (error) => {
|
|
1572
|
+
cleanup();
|
|
1573
|
+
reject(error instanceof Error ? error : new Error(String(error)));
|
|
1574
|
+
};
|
|
1575
|
+
stream.on("data", onData);
|
|
1576
|
+
stream.on("end", onEnd);
|
|
1577
|
+
stream.on("error", onError);
|
|
1578
|
+
stream.resume();
|
|
1579
|
+
});
|
|
1580
|
+
}
|
|
1581
|
+
/** Buffered line reader over a piped stream; undefined once it ends. */
|
|
1582
|
+
export function createLineReader(stream) {
|
|
1583
|
+
let buffer = "";
|
|
1584
|
+
let ended = false;
|
|
1585
|
+
const waiters = [];
|
|
1586
|
+
const drain = () => {
|
|
1587
|
+
while (waiters.length > 0) {
|
|
1588
|
+
const newline = buffer.indexOf("\n");
|
|
1589
|
+
if (newline !== -1) {
|
|
1590
|
+
const line = buffer.slice(0, newline).replace(/\r$/, "");
|
|
1591
|
+
buffer = buffer.slice(newline + 1);
|
|
1592
|
+
waiters.shift()?.(line);
|
|
1593
|
+
continue;
|
|
1594
|
+
}
|
|
1595
|
+
if (!ended) {
|
|
1596
|
+
return;
|
|
1597
|
+
}
|
|
1598
|
+
// Stream ended: a trailing unterminated line still counts once.
|
|
1599
|
+
const rest = buffer;
|
|
1600
|
+
buffer = "";
|
|
1601
|
+
waiters.shift()?.(rest === "" ? undefined : rest.replace(/\r$/, ""));
|
|
1602
|
+
}
|
|
1603
|
+
};
|
|
1604
|
+
stream.on("data", (chunk) => {
|
|
1605
|
+
buffer += typeof chunk === "string" ? chunk : chunk.toString("utf8");
|
|
1606
|
+
drain();
|
|
1607
|
+
});
|
|
1608
|
+
stream.on("end", () => {
|
|
1609
|
+
ended = true;
|
|
1610
|
+
drain();
|
|
1611
|
+
});
|
|
1612
|
+
stream.resume();
|
|
1613
|
+
return () => new Promise((resolvePromise) => {
|
|
1614
|
+
waiters.push(resolvePromise);
|
|
1615
|
+
drain();
|
|
1616
|
+
});
|
|
1617
|
+
}
|
|
1618
|
+
// ============================================================================
|
|
1619
|
+
// Polling + rendering helpers
|
|
1620
|
+
// ============================================================================
|
|
1621
|
+
/**
|
|
1622
|
+
* Poll deployment status every `pollIntervalMs` until it lands in
|
|
1623
|
+
* `terminal` (single-line progress on a TTY, one line per transition
|
|
1624
|
+
* otherwise). Prefers customer `statusMessage` / `progress` over raw
|
|
1625
|
+
* status so create → checkout → start is visible. Throws DeployApiError
|
|
1626
|
+
* on request failures or timeout.
|
|
1627
|
+
*/
|
|
1628
|
+
async function pollUntil(ctx, slug, terminal, fetchDetail) {
|
|
1629
|
+
const startedAt = Date.now();
|
|
1630
|
+
const tty = process.stderr.isTTY;
|
|
1631
|
+
let lastLabel;
|
|
1632
|
+
let sawProgress = false;
|
|
1633
|
+
const report = (detail) => {
|
|
1634
|
+
if (ctx.json) {
|
|
1635
|
+
return;
|
|
1636
|
+
}
|
|
1637
|
+
const label = deployProgressLabel(detail);
|
|
1638
|
+
const elapsed = Math.round((Date.now() - startedAt) / 1000);
|
|
1639
|
+
if (tty) {
|
|
1640
|
+
ctx.err(`\r\x1b[2K${slug}: ${label} (${elapsed}s)`);
|
|
1641
|
+
sawProgress = true;
|
|
1642
|
+
}
|
|
1643
|
+
else if (label !== lastLabel) {
|
|
1644
|
+
ctx.err(`${slug}: ${label}\n`);
|
|
1645
|
+
}
|
|
1646
|
+
lastLabel = label;
|
|
1647
|
+
};
|
|
1648
|
+
const finishProgressLine = () => {
|
|
1649
|
+
if (tty && sawProgress) {
|
|
1650
|
+
ctx.err("\n");
|
|
1651
|
+
}
|
|
1652
|
+
};
|
|
1653
|
+
for (;;) {
|
|
1654
|
+
let detail;
|
|
1655
|
+
try {
|
|
1656
|
+
detail = await fetchDetail();
|
|
1657
|
+
}
|
|
1658
|
+
catch (error) {
|
|
1659
|
+
// Capacity / rate-limit on GET is not a bake failure. The v2 accept
|
|
1660
|
+
// already started freeze; keep polling until the wait budget expires.
|
|
1661
|
+
if (isTransientDeployStatusError(error) && Date.now() - startedAt < ctx.timeoutMs) {
|
|
1662
|
+
if (!ctx.json) {
|
|
1663
|
+
const elapsed = Math.round((Date.now() - startedAt) / 1000);
|
|
1664
|
+
const label = "Waiting for status (server busy)";
|
|
1665
|
+
if (tty) {
|
|
1666
|
+
ctx.err(`\r\x1b[2K${slug}: ${label} (${elapsed}s)`);
|
|
1667
|
+
sawProgress = true;
|
|
1668
|
+
}
|
|
1669
|
+
else if (label !== lastLabel) {
|
|
1670
|
+
ctx.err(`${slug}: ${label}\n`);
|
|
1671
|
+
}
|
|
1672
|
+
lastLabel = label;
|
|
1673
|
+
}
|
|
1674
|
+
const waitMs = transientDeployStatusWaitMs(error, ctx.pollIntervalMs);
|
|
1675
|
+
const remaining = ctx.timeoutMs - (Date.now() - startedAt);
|
|
1676
|
+
await sleep(Math.max(0, Math.min(waitMs, remaining)));
|
|
1677
|
+
continue;
|
|
1678
|
+
}
|
|
1679
|
+
finishProgressLine();
|
|
1680
|
+
throw error;
|
|
1681
|
+
}
|
|
1682
|
+
report(detail);
|
|
1683
|
+
if (terminal.has(detail.status)) {
|
|
1684
|
+
finishProgressLine();
|
|
1685
|
+
return detail;
|
|
1686
|
+
}
|
|
1687
|
+
if (Date.now() - startedAt >= ctx.timeoutMs) {
|
|
1688
|
+
finishProgressLine();
|
|
1689
|
+
const last = deployProgressLabel(detail);
|
|
1690
|
+
throw new CliError(`Timed out after ${Math.round(ctx.timeoutMs / 1000)}s waiting for ${slug} (last: ${last}). It may still converge — check \`${CLI} deployment get ${slug} --team ${ctx.teamId}\`.`, { code: "pending" });
|
|
1691
|
+
}
|
|
1692
|
+
await sleep(ctx.pollIntervalMs);
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
/** Load-shed / rate-limit on status GET — the deploy itself may still be baking. */
|
|
1696
|
+
function isTransientDeployStatusError(error) {
|
|
1697
|
+
return error instanceof DeployApiError && (error.status === 503 || error.status === 429);
|
|
1698
|
+
}
|
|
1699
|
+
function transientDeployStatusWaitMs(error, pollIntervalMs) {
|
|
1700
|
+
if (error.status === 429 &&
|
|
1701
|
+
error.retryAfterSeconds !== undefined &&
|
|
1702
|
+
error.retryAfterSeconds > 0) {
|
|
1703
|
+
return Math.max(pollIntervalMs, error.retryAfterSeconds * 1000);
|
|
1704
|
+
}
|
|
1705
|
+
return pollIntervalMs;
|
|
1706
|
+
}
|
|
1707
|
+
/**
|
|
1708
|
+
* Wait until GET 404s (the delete reconciler purged the record). Treats
|
|
1709
|
+
* other errors as failures. Throws DeployApiError on timeout.
|
|
1710
|
+
*/
|
|
1711
|
+
async function pollUntilGone(ctx, slug, getDetail) {
|
|
1712
|
+
const startedAt = Date.now();
|
|
1713
|
+
const tty = process.stderr.isTTY;
|
|
1714
|
+
let sawProgress = false;
|
|
1715
|
+
const report = (label) => {
|
|
1716
|
+
if (ctx.json) {
|
|
1717
|
+
return;
|
|
1718
|
+
}
|
|
1719
|
+
const elapsed = Math.round((Date.now() - startedAt) / 1000);
|
|
1720
|
+
if (tty) {
|
|
1721
|
+
ctx.err(`\r\x1b[2K${slug}: ${label} (${elapsed}s)`);
|
|
1722
|
+
sawProgress = true;
|
|
1723
|
+
}
|
|
1724
|
+
};
|
|
1725
|
+
const finishProgressLine = () => {
|
|
1726
|
+
if (tty && sawProgress) {
|
|
1727
|
+
ctx.err("\n");
|
|
1728
|
+
}
|
|
1729
|
+
};
|
|
1730
|
+
for (;;) {
|
|
1731
|
+
try {
|
|
1732
|
+
const detail = await getDetail();
|
|
1733
|
+
report(deployProgressLabel(detail));
|
|
1734
|
+
}
|
|
1735
|
+
catch (error) {
|
|
1736
|
+
if (error instanceof DeployApiError && error.status === 404) {
|
|
1737
|
+
finishProgressLine();
|
|
1738
|
+
return;
|
|
1739
|
+
}
|
|
1740
|
+
finishProgressLine();
|
|
1741
|
+
throw error;
|
|
1742
|
+
}
|
|
1743
|
+
if (Date.now() - startedAt >= ctx.timeoutMs) {
|
|
1744
|
+
finishProgressLine();
|
|
1745
|
+
throw new CliError(`Timed out after ${Math.round(ctx.timeoutMs / 1000)}s waiting for ${slug} to disappear. It may still be deleting — check \`${CLI} deployment get ${slug} --team ${ctx.teamId}\`.`, { code: "pending" });
|
|
1746
|
+
}
|
|
1747
|
+
await sleep(ctx.pollIntervalMs);
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
function aliasTokenBlock(aliasToken) {
|
|
1751
|
+
return (`\n Alias token (shown ONCE — save it now, it cannot be retrieved again):\n\n` +
|
|
1752
|
+
` ${aliasToken}\n\n` +
|
|
1753
|
+
` Send it as the X-Agent-Alias-Token header on requests to the alias URL.\n` +
|
|
1754
|
+
` Lost tokens: \`${CLI} deployment rotate-token <slug>\` mints a replacement.\n\n`);
|
|
1755
|
+
}
|
|
1756
|
+
/**
|
|
1757
|
+
* `: <reason>` suffix for a deploy that ended in a non-running state, or
|
|
1758
|
+
* empty when the control plane recorded no reason.
|
|
1759
|
+
*/
|
|
1760
|
+
function deployFailureDetail(lastError) {
|
|
1761
|
+
if (lastError === null || lastError === undefined || lastError.trim() === "") {
|
|
1762
|
+
return "";
|
|
1763
|
+
}
|
|
1764
|
+
return `: ${sanitizeCustomerError(lastError.trim())}`;
|
|
1765
|
+
}
|
|
1766
|
+
/**
|
|
1767
|
+
* A Cursor backend error as a {@link CliError}: its HTTP status picks the
|
|
1768
|
+
* error code (and so the exit code), plus a hint where one helps. Any other
|
|
1769
|
+
* error comes back unchanged, so `throw apiError(error)` keeps it.
|
|
1770
|
+
*/
|
|
1771
|
+
export function apiError(error, context) {
|
|
1772
|
+
if (!(error instanceof DeployApiError)) {
|
|
1773
|
+
return error;
|
|
1774
|
+
}
|
|
1775
|
+
let hint;
|
|
1776
|
+
if (error.status === 409 && error.message.includes("application multiTenant does not match")) {
|
|
1777
|
+
if (context?.multiTenant === true) {
|
|
1778
|
+
hint = "This slug is a single-tenant application. Redeploy it without --multi-tenant.";
|
|
1779
|
+
}
|
|
1780
|
+
else if (context?.teamId === MULTI_COMPONENT_ALLOWED_TEAM_ID) {
|
|
1781
|
+
hint =
|
|
1782
|
+
"This slug is a Cursor-managed (multi-tenant) product. Redeploy it with --multi-tenant.";
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
return new CliError(error.message, {
|
|
1786
|
+
code: errorCodeForStatus(error.status),
|
|
1787
|
+
hint,
|
|
1788
|
+
cause: error,
|
|
1789
|
+
});
|
|
1790
|
+
}
|
|
1791
|
+
export function renderTable(header, rows) {
|
|
1792
|
+
const widths = header.map((h, i) => Math.max(h.length, ...rows.map((row) => (row[i] ?? "").length)));
|
|
1793
|
+
const renderRow = (row) => row
|
|
1794
|
+
.map((cell, i) => cell.padEnd(widths[i] ?? 0))
|
|
1795
|
+
.join(" ")
|
|
1796
|
+
.trimEnd();
|
|
1797
|
+
return [renderRow(header), ...rows.map(renderRow)].join("\n");
|
|
1798
|
+
}
|