@cursor/bdk 0.2.8 → 0.2.9
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/dist/bin/agent-serve.d.ts +1 -0
- package/dist/bin/agent-serve.d.ts.map +1 -1
- package/dist/bin/agent-serve.js +48 -26
- package/dist/docs/404.html +2 -2
- package/dist/docs/assets/{app.oyjtOr3W.js → app.BNhEdGa8.js} +4 -4
- package/dist/docs/assets/chunks/@localSearchIndexroot.BJ8UZggu.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.D0P6J_UJ.js → VPLocalSearchBox.DIdUV1Ph.js} +1 -1
- package/dist/docs/assets/chunks/{arc.B0LY1J1h.js → arc.lELI4_SR.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.dPduLUxY.js → architectureDiagram-Q4EWVU46.iCMdvuoM.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.B_Ohm21h.js → baseUniq.C1-nDJBf.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.B4zcanaJ.js → blockDiagram-DXYQGD6D.ClemzBox.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.D9Iw21nx.js → c4Diagram-AHTNJAMY.BqTak6cR.js} +1 -1
- package/dist/docs/assets/chunks/channel.BTJ5J9FI.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.DDVwRShI.js → chunk-4BX2VUAB.CUS3qs_R.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.DsYcdn1i.js → chunk-4TB4RGXK.dz5fdHcl.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.BzzQvcYp.js → chunk-55IACEB6.D6BEBmve.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.BMiXZ7FX.js → chunk-EDXVE4YY.B5uK4ID9.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.D_mBcLoc.js → chunk-FMBD7UC4.PgOJgNQs.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CMVjWVMx.js → chunk-OYMX7WX6.CvkTrCii.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.BG-FrPv9.js → chunk-QZHKN3VN.BnSfKYsB.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.CkFE1ap3.js → chunk-YZCP3GAM.MZH6v5UC.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.D4BZ3cVV.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.D4BZ3cVV.js +1 -0
- package/dist/docs/assets/chunks/clone.62tX-O-1.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.BVNnCTvY.js → cose-bilkent-S5V4N54A.BBbw_YZi.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.CDN5PR9l.js → dagre-KV5264BT.CNJB2l7E.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.DQRUlT-i.js → diagram-5BDNPKRD.BQzlnFfq.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.CoeblYQT.js → diagram-G4DWMVQ6.DkgqqZMz.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.DW3ymjl0.js → diagram-MMDJMWI5.DIT8L7H_.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.BP0uN4Jw.js → diagram-TYMM5635.3xLPZWGJ.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.DVFUWEn4.js → erDiagram-SMLLAGMA.5_IHz8jF.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.HU-eHspv.js → flowDiagram-DWJPFMVM.BGUCXz8A.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.DHNhXijY.js → ganttDiagram-T4ZO3ILL.DbfFavS1.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.DkISXcO3.js → gitGraphDiagram-UUTBAWPF.D2yKdeNW.js} +1 -1
- package/dist/docs/assets/chunks/{graph.CCV0fuRR.js → graph.CSCxwHba.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.bgILzOoc.js → infoDiagram-42DDH7IO.FDeb6xHY.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.CuryXC0F.js → ishikawaDiagram-UXIWVN3A.DbeYs9VL.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BL1Pr-wu.js → journeyDiagram-VCZTEJTY.CWjKINpx.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.BbGjvk4l.js → kanban-definition-6JOO6SKY.B4FrAlwz.js} +1 -1
- package/dist/docs/assets/chunks/{layout.C4PfdldS.js → layout.DFGxQ9ab.js} +1 -1
- package/dist/docs/assets/chunks/{linear.C3xD1T6X.js → linear.BmjZ-G59.js} +1 -1
- package/dist/docs/assets/chunks/{min.CzgRAQ9c.js → min.DZSxulMW.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.CA9rSWum.js → mindmap-definition-QFDTVHPH.CHLi3-aN.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.B8MprgJu.js → pieDiagram-DEJITSTG.DteG-CkU.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.DndDwbKT.js → quadrantDiagram-34T5L4WZ.D458ipN3.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.Zhfgwlnn.js → requirementDiagram-MS252O5E.DcFgUxst.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.B6RRm6N5.js → sankeyDiagram-XADWPNL6.BwQAMmSA.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.Bfmz-1PN.js → sequenceDiagram-FGHM5R23.B_Xdsrh9.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.gbrdNqgj.js → stateDiagram-FHFEXIEX.CdfDW6-C.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.DkTs1aEU.js +1 -0
- package/dist/docs/assets/chunks/{theme.gpWjytMh.js → theme.sfdL3srp.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.Bl1l7M1f.js → timeline-definition-GMOUNBTQ.56-4hXaC.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.Dfle4U0d.js → vennDiagram-DHZGUBPP.CvZSQBO7.js} +1 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.C9qc8k39.js +162 -0
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.CM_4lmvZ.js → wardleyDiagram-NUSXRM2D.D9s0nihi.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.CHT5X28R.js → xychartDiagram-5P7HB3ND.BVJSpYrC.js} +1 -1
- package/dist/docs/building-with-agents.html +35 -35
- package/dist/docs/deployment.html +35 -35
- package/dist/docs/evals.html +35 -35
- package/dist/docs/guides/agent-to-agent.html +35 -35
- package/dist/docs/guides/bitbucket.html +35 -35
- package/dist/docs/guides/cloud-agents.html +35 -35
- package/dist/docs/guides/convert-automation.html +35 -35
- package/dist/docs/guides/github.html +35 -35
- package/dist/docs/guides/gitlab.html +35 -35
- package/dist/docs/guides/grokbot-agents.html +35 -35
- package/dist/docs/guides/hooks.html +35 -35
- package/dist/docs/guides/improve.html +35 -35
- package/dist/docs/guides/jev.html +35 -35
- package/dist/docs/guides/mcp-oauth.html +35 -35
- package/dist/docs/guides/opentelemetry.html +35 -35
- package/dist/docs/guides/slack.html +35 -35
- package/dist/docs/guides/webhooks.html +35 -35
- package/dist/docs/hillclimbing.html +35 -35
- package/dist/docs/index.html +35 -35
- package/dist/docs/quickstart.html +35 -35
- package/dist/docs/reference/agent-config.html +35 -35
- package/dist/docs/reference/artifacts.html +35 -35
- package/dist/docs/reference/channels.html +35 -35
- package/dist/docs/reference/cli.html +35 -35
- package/dist/docs/reference/connections.html +35 -35
- package/dist/docs/reference/evals.html +35 -35
- package/dist/docs/reference/extensions.html +35 -35
- package/dist/docs/reference/hooks.html +35 -35
- package/dist/docs/reference/http-api.html +35 -35
- package/dist/docs/reference/instructions.html +35 -35
- package/dist/docs/reference/playground.html +35 -35
- package/dist/docs/reference/project-layout.html +35 -35
- package/dist/docs/reference/prompt.html +35 -35
- package/dist/docs/reference/schedules.html +35 -35
- package/dist/docs/reference/sessions.html +35 -35
- package/dist/docs/reference/skills.html +35 -35
- package/dist/docs/reference/subagents.html +35 -35
- package/dist/docs/reference/tools.html +35 -35
- package/dist/docs/templates/agentic-owners.html +35 -35
- package/dist/docs/templates/grokbot-agents.html +35 -35
- package/dist/docs/templates/security-reviewer.html +35 -35
- package/dist/docs/templates/thermo-quality-review.html +35 -35
- package/dist/docs/templates/thermo-review.html +35 -35
- package/dist/docs/templates/triage.html +35 -35
- package/dist/docs/troubleshooting.html +35 -35
- package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts +0 -1
- package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/backend.js +3 -6
- package/dist/extensions/cursor-cloud-agents/tools/list.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/tools/list.js +2 -2
- package/dist/internal/cli-migrate.d.ts +18 -0
- package/dist/internal/cli-migrate.d.ts.map +1 -0
- package/dist/internal/cli-migrate.js +153 -0
- package/dist/internal/cursor/credentials.d.ts +1 -0
- package/dist/internal/cursor/credentials.d.ts.map +1 -1
- package/dist/internal/cursor/credentials.js +3 -0
- package/dist/internal/install-cursor-skills.d.ts.map +1 -1
- package/dist/internal/install-cursor-skills.js +7 -1
- package/dist/playground/assets/index-C1g_PTTZ.css +1 -0
- package/dist/playground/assets/{index-MijLHTbB.js → index-Co4CUVTQ.js} +38 -38
- package/dist/playground/index.html +2 -2
- package/package.json +1 -1
- package/skills/migrate-v2/SKILL.md +223 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.C25zYVuc.js +0 -1
- package/dist/docs/assets/chunks/channel.CRUyWDV-.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CG_UObcQ.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CG_UObcQ.js +0 -1
- package/dist/docs/assets/chunks/clone.NYSZ9qZN.js +0 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.DOOmulfQ.js +0 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.BJrCW6xc.js +0 -162
- package/dist/playground/assets/index-DPKLl4C_.css +0 -1
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
/>
|
|
9
9
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
10
10
|
<title>agent-serve playground</title>
|
|
11
|
-
<script type="module" crossorigin src="./assets/index-
|
|
12
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-Co4CUVTQ.js"></script>
|
|
12
|
+
<link rel="stylesheet" crossorigin href="./assets/index-C1g_PTTZ.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bdk-migrate-v2
|
|
3
|
+
description: >-
|
|
4
|
+
Migrate a BDK project from hosted architecture v1 to v2: upgrade the
|
|
5
|
+
package, remove v1-only code, and redeploy. Applies only to projects
|
|
6
|
+
built during the early alpha, which depend on @cursor/july, run the
|
|
7
|
+
agent-sdk CLI, or set architecture "v1".
|
|
8
|
+
alwaysApply: false
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Migrate a BDK agent to architecture v2
|
|
12
|
+
|
|
13
|
+
This skill applies only to projects built during the BDK early alpha,
|
|
14
|
+
when hosted agents ran on architecture v1. Projects that never deployed
|
|
15
|
+
on v1 already run on v2 and need nothing here.
|
|
16
|
+
|
|
17
|
+
## Confirm the project needs it
|
|
18
|
+
|
|
19
|
+
Migrate when any of these is true:
|
|
20
|
+
|
|
21
|
+
- `package.json` depends on `@cursor/july`.
|
|
22
|
+
- `agent/agent.ts` sets `architecture: "v1"`.
|
|
23
|
+
- `bdk deployment <slug>` for the hosted copy does not print
|
|
24
|
+
`architecture: v2`.
|
|
25
|
+
|
|
26
|
+
Stop when none is true.
|
|
27
|
+
|
|
28
|
+
## Know what changes
|
|
29
|
+
|
|
30
|
+
A v1 deployment kept one long-lived process per agent. On v2 the platform
|
|
31
|
+
starts a short-lived runtime when an event arrives, keeps sessions, KV,
|
|
32
|
+
and files in Cursor-managed storage, and stops the runtime when the work
|
|
33
|
+
ends. That model changes code in three places:
|
|
34
|
+
|
|
35
|
+
- Module-scope state and files written outside `ctx.host.files` vanish
|
|
36
|
+
between events. Keep durable state in `ctx.host.kv` or `ctx.host.files`.
|
|
37
|
+
- Secrets arrive per request, after modules load. Read `process.env`
|
|
38
|
+
inside the handler, tool, or callback that needs the value.
|
|
39
|
+
- The deployment URL serves only routes your channels declare. It
|
|
40
|
+
answers `202` at once and runs the handler afterwards, so a route
|
|
41
|
+
cannot send a response body back to its caller.
|
|
42
|
+
|
|
43
|
+
## Check what v2 supports
|
|
44
|
+
|
|
45
|
+
| Capability | On v2 |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| Slack mentions, DMs, and channel posts | Supported. Provision a new Slack app after the first v2 deploy. |
|
|
48
|
+
| GitHub channels, including `cursorAccount` | Supported |
|
|
49
|
+
| GitLab and Bitbucket channels on Cursor hosting | Rolling out. Trial under a new slug first. |
|
|
50
|
+
| Custom HTTP channel routes | Supported. The caller gets `202`, not the handler's response. |
|
|
51
|
+
| Tools, skills, subagents, MCP connections | Supported |
|
|
52
|
+
| `ctx.host.kv`, `ctx.host.files`, artifacts | Supported, in platform-selected storage |
|
|
53
|
+
| Reminders with `prompt` or a named `handler` | Supported |
|
|
54
|
+
| Secrets and `hosting.egressDomains` | Supported. Same-slug deploys copy v1 secrets. |
|
|
55
|
+
| `persistent: true` and `hosting.image` | Supported, one persistent deployment per team |
|
|
56
|
+
| Local `bdk dev`, `run`, `eval`, and the playground | Supported |
|
|
57
|
+
| `defineStorage` in `agent/storage.ts` | Not supported. Delete the file. |
|
|
58
|
+
| Reminders with inline `run` or a function `until` | Not supported. Use a named handler. |
|
|
59
|
+
| Cron schedules in `agent/schedules/` on Cursor hosting | Not delivered yet. Self-hosted `bdk serve` still runs them. |
|
|
60
|
+
| Slack tool-approval buttons on Cursor hosting | Not supported yet |
|
|
61
|
+
| `bdk mcp oauth --store` for host MCP OAuth | Not supported. Connect Cursor-account MCP servers from **Deployed Agents** in the dashboard. |
|
|
62
|
+
| `/v1/health`, session, tool, and MCP APIs on the deployment URL | Not reachable |
|
|
63
|
+
| `--prod` with `chat`, `resume`, `call`, `sessions`, `cost`, or `mcp` | Not supported. Use `run --prod`, `session --prod`, and `logs --prod`. |
|
|
64
|
+
| v1 sessions, KV, and files | Not carried over. v2 starts empty, and deleting v1 deletes them. |
|
|
65
|
+
|
|
66
|
+
The steps below rewrite `defineStorage`, inline reminders, and secret
|
|
67
|
+
reads. Stop and ask before migrating an agent that depends on cron
|
|
68
|
+
schedules, Slack tool-approval buttons, `mcp oauth --store`, or an HTTP
|
|
69
|
+
route whose caller reads the response body. Name the row and the
|
|
70
|
+
file that uses it.
|
|
71
|
+
|
|
72
|
+
## Update the project
|
|
73
|
+
|
|
74
|
+
Keep the diff to the migration. Leave an `agent/` root in place; it
|
|
75
|
+
still loads.
|
|
76
|
+
|
|
77
|
+
1. **Upgrade the package.** Replace `@cursor/july` with the latest
|
|
78
|
+
`@cursor/bdk` in `package.json`, then install with the project's
|
|
79
|
+
package manager:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npm uninstall @cursor/july
|
|
83
|
+
npm install @cursor/bdk@latest
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Commit the lockfile the install writes, since deploys build from Git.
|
|
87
|
+
Rewrite every `@cursor/july` import to `@cursor/bdk`; subpaths such as
|
|
88
|
+
`/channels/slack`, `/evals`, and `/reminders` keep their names. Replace
|
|
89
|
+
`agent-sdk` with `bdk` in scripts, CI jobs, and READMEs.
|
|
90
|
+
|
|
91
|
+
The new types are stricter. `ctx.session.continuationKey` is
|
|
92
|
+
`string | null`, so guard with `typeof key === "string"`, not
|
|
93
|
+
`!== undefined`. Typecheck with `npx tsc --noEmit` even when the
|
|
94
|
+
project has no script for it.
|
|
95
|
+
|
|
96
|
+
2. **Drop the v1 opt-in.** Delete `architecture: "v1"` from
|
|
97
|
+
`defineAgent`. v2 is the default, so do not add `architecture: "v2"`.
|
|
98
|
+
|
|
99
|
+
3. **Delete `agent/storage.ts`.** v2 selects storage itself, and
|
|
100
|
+
`ctx.host.kv` calls keep working against it. Data in a backend you
|
|
101
|
+
run stays there. Data in Cursor-hosted storage is deleted with the v1
|
|
102
|
+
deployment, so export what the agent still needs before deploying.
|
|
103
|
+
|
|
104
|
+
4. **Name inline reminders.** Move each inline `run` into
|
|
105
|
+
`agent/reminders/<name>.ts` and pass that module as `handler` with
|
|
106
|
+
serializable `args`. A named handler takes no `until`. Move a function
|
|
107
|
+
`until` check into the handler and call `cancel()` when it holds.
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
// agent/reminders/ci_recheck.ts
|
|
111
|
+
import { defineReminder } from "@cursor/bdk/reminders";
|
|
112
|
+
|
|
113
|
+
export default defineReminder({
|
|
114
|
+
async run({ args, followup }) {
|
|
115
|
+
await followup({ message: `Recheck CI on ${String(args.headSha)}` });
|
|
116
|
+
return { action: "delivered" };
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
// agent/tools/watch_ci.ts, inside execute
|
|
123
|
+
await ctx.host.reminders?.create({
|
|
124
|
+
purpose: "ci_recheck",
|
|
125
|
+
channelId: ctx.session.channelId,
|
|
126
|
+
continuationToken: key,
|
|
127
|
+
delay: "2h",
|
|
128
|
+
handler: ciRecheck, // import ciRecheck from "../reminders/ci_recheck.js"
|
|
129
|
+
args: { headSha },
|
|
130
|
+
});
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
5. **Rewrite `/v1` continuation selectors.** Delete an explicit
|
|
134
|
+
`continuation: "<kind>.<scope>/v1"` on a channel so v2 picks its
|
|
135
|
+
default, or change the suffix to `/v2`. By default, GitHub PR events,
|
|
136
|
+
Slack threads, and deployment events still continue one session per
|
|
137
|
+
PR, thread, or deployment.
|
|
138
|
+
|
|
139
|
+
6. **Move secret reads.** Replace module-scope `process.env.NAME` reads
|
|
140
|
+
with reads inside the function that uses them. Give MCP connections a
|
|
141
|
+
`${NAME}` header or env template instead.
|
|
142
|
+
|
|
143
|
+
7. **Stop answering from HTTP routes.** A custom route that returned
|
|
144
|
+
computed data must deliver it another way, such as a callback URL or a
|
|
145
|
+
tool the turn calls.
|
|
146
|
+
|
|
147
|
+
## Verify locally
|
|
148
|
+
|
|
149
|
+
Run the project's installed CLI. Prefix each command with `npx` when
|
|
150
|
+
`bdk` is not on `PATH`.
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
bdk validate --dir .
|
|
154
|
+
bdk info --dir . --json
|
|
155
|
+
bdk run --dir . --message "<a representative request>"
|
|
156
|
+
bdk eval --dir .
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Fix every validation error, but never change `runtime` to pass
|
|
160
|
+
validation; stop and report instead. `run` and `eval` need a Cursor
|
|
161
|
+
credential. When none is set, skip them and say so in the pull request.
|
|
162
|
+
Run the project's own typecheck and tests.
|
|
163
|
+
|
|
164
|
+
## Open the pull request
|
|
165
|
+
|
|
166
|
+
Describe each removed or changed behavior, each unsupported row the
|
|
167
|
+
agent touched, and the deploy steps. Do not deploy from the pull request
|
|
168
|
+
branch.
|
|
169
|
+
|
|
170
|
+
## Deploy after merge
|
|
171
|
+
|
|
172
|
+
Deploy from a pushed ref. `bdk deploy` reads Git and never uploads the
|
|
173
|
+
working tree.
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
bdk login
|
|
177
|
+
bdk validate --dir .
|
|
178
|
+
bdk deploy --dir . --slug <existing-slug> \
|
|
179
|
+
--cursor-events-repo <owner/repo> \
|
|
180
|
+
--allow-domain <domain>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Pass every `--cursor-events-repo` and `--allow-domain` value the v1
|
|
184
|
+
deployment used. Domains already in `hosting.egressDomains` need no
|
|
185
|
+
flag. Print only those two fields, because the full output holds
|
|
186
|
+
credentials:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
bdk deployment <slug> --json | jq '{cursorEventRepos, egressAllowedDomains}'
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Choose a cutover before you deploy:
|
|
193
|
+
|
|
194
|
+
- **Same slug.** One command, and it can't be undone. The deploy copies
|
|
195
|
+
the v1 secrets, switches traffic once v2 is running, then deletes the
|
|
196
|
+
v1 deployment along with its Cursor-hosted sessions, KV, files, and
|
|
197
|
+
eval runs. Slack and webhook traffic stops until you finish the steps
|
|
198
|
+
below. If the command reports that same-slug replacement is
|
|
199
|
+
unavailable, use a new slug.
|
|
200
|
+
- **New slug.** v1 keeps serving while you test. Set secrets with
|
|
201
|
+
`bdk secrets set <new-slug> NAME`. Both deployments act on events from
|
|
202
|
+
the same repositories, so point the trial at a test repository with
|
|
203
|
+
`--cursor-events-repo`. Then move senders over and run
|
|
204
|
+
`bdk delete <old-slug>`, which deletes v1's hosted data the same way.
|
|
205
|
+
|
|
206
|
+
Prefer a new slug when the agent serves Slack, receives webhooks, or
|
|
207
|
+
keeps data in `ctx.host.kv`.
|
|
208
|
+
|
|
209
|
+
After the deploy is running:
|
|
210
|
+
|
|
211
|
+
- Store the alias token the deploy prints. Point every webhook sender
|
|
212
|
+
and HTTP caller at the new alias URL.
|
|
213
|
+
- For Slack, run `bdk slack create --prod --dir .`, then deploy again so
|
|
214
|
+
the deployment binds the workspace. The new app is a different bot, so
|
|
215
|
+
invite it to the channels the old one joined. The copied v1 Slack
|
|
216
|
+
secrets go unused.
|
|
217
|
+
- Reconnect Cursor-account MCP servers from **Deployed Agents** in the
|
|
218
|
+
dashboard.
|
|
219
|
+
- Start a turn with `bdk run --prod --slug <slug> --message "..."`, then
|
|
220
|
+
read it with `bdk session <ses_...> --prod --slug <slug>`.
|
|
221
|
+
|
|
222
|
+
The [deploy skill](../deploy/SKILL.md) covers deploys with an attached
|
|
223
|
+
service account.
|