@cursor/july 0.1.39 → 0.1.41
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 +4 -3
- package/dist/bin/agent-serve.js +28 -9
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +18 -8
- package/dist/channels/slack/attachments.d.ts +82 -0
- package/dist/channels/slack/attachments.d.ts.map +1 -0
- package/dist/channels/slack/attachments.js +520 -0
- package/dist/channels/slack/cursor-account.d.ts +7 -1
- package/dist/channels/slack/cursor-account.d.ts.map +1 -1
- package/dist/channels/slack/cursor-account.js +2 -2
- package/dist/channels/slack/defaults.d.ts.map +1 -1
- package/dist/channels/slack/defaults.js +26 -17
- package/dist/channels/slack/dispatch.d.ts +4 -3
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +84 -21
- package/dist/channels/slack/inbound.d.ts +6 -0
- package/dist/channels/slack/inbound.d.ts.map +1 -1
- package/dist/channels/slack/inbound.js +48 -2
- package/dist/channels/slack/index.d.ts +1 -0
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +1 -0
- package/dist/channels/slack/live-delivery.d.ts.map +1 -1
- package/dist/channels/slack/live-delivery.js +16 -4
- package/dist/channels/slack/manifest.d.ts.map +1 -1
- package/dist/channels/slack/manifest.js +1 -0
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +7 -4
- package/dist/channels/slack/types.d.ts +49 -1
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +6 -6
- package/dist/docs/assets/{ab.md.6cLOW7--.js → ab.md.hdxsvX5M.js} +2 -2
- package/dist/docs/assets/{app.BQ8Hihdf.js → app.mIw24pb1.js} +1 -1
- package/dist/docs/assets/{building-with-agents.md.txrcGU2B.js → building-with-agents.md.PeZaZA1P.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.BA7V8dEJ.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.BBCr8Yuy.js → VPLocalSearchBox.hOzpPwrG.js} +1 -1
- package/dist/docs/assets/chunks/{theme.CK_NiGC-.js → theme.BtFhUYmh.js} +2 -2
- package/dist/docs/assets/{deployment.md.CuK5SNjN.js → deployment.md.BHVjVqRa.js} +4 -4
- package/dist/docs/assets/{deployment.md.CuK5SNjN.lean.js → deployment.md.BHVjVqRa.lean.js} +1 -1
- package/dist/docs/assets/{evals.md.BQXI3rXy.js → evals.md.qeoGgPw0.js} +3 -3
- package/dist/docs/assets/example-agents_index.md.xmJ87d_3.js +2 -0
- package/dist/docs/assets/{guides_webhooks.md.BERuBSJW.js → guides_webhooks.md.DB-r_er9.js} +47 -4
- package/dist/docs/assets/{guides_webhooks.md.BERuBSJW.lean.js → guides_webhooks.md.DB-r_er9.lean.js} +1 -1
- package/dist/docs/assets/index.md.BKpbkCa6.js +24 -0
- package/dist/docs/assets/{index.md.CmhptOmN.lean.js → index.md.BKpbkCa6.lean.js} +1 -1
- package/dist/docs/assets/{quickstart.md.C_b6ESpD.js → quickstart.md.rIbfahJM.js} +4 -4
- package/dist/docs/assets/{reference_cli.md.Byvrg8eu.js → reference_cli.md.DqEqQpGn.js} +5 -5
- package/dist/docs/assets/{reference_cli.md.Byvrg8eu.lean.js → reference_cli.md.DqEqQpGn.lean.js} +1 -1
- package/dist/docs/assets/{reference_hooks.md.BGDw4VLm.js → reference_hooks.md.BHeG-vjK.js} +2 -2
- package/dist/docs/assets/{reference_hooks.md.BGDw4VLm.lean.js → reference_hooks.md.BHeG-vjK.lean.js} +1 -1
- package/dist/docs/assets/{storage.md.mQDtIULc.js → storage.md.DcGSnIxX.js} +10 -4
- package/dist/docs/assets/{storage.md.mQDtIULc.lean.js → storage.md.DcGSnIxX.lean.js} +1 -1
- package/dist/docs/assets/troubleshooting.md.CkgwmVI0.js +1 -0
- package/dist/docs/assets/{troubleshooting.md.B5RVX_tL.lean.js → troubleshooting.md.CkgwmVI0.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +5 -5
- package/dist/docs/concepts.html +3 -3
- package/dist/docs/deployment.html +6 -6
- package/dist/docs/evals.html +7 -7
- package/dist/docs/example-agents/approval-buddy.html +3 -3
- package/dist/docs/example-agents/benny.html +3 -3
- package/dist/docs/example-agents/bugbot.html +3 -3
- package/dist/docs/example-agents/codebase-wiki.html +3 -3
- package/dist/docs/example-agents/codeowners-review.html +3 -3
- package/dist/docs/example-agents/concierge.html +3 -3
- package/dist/docs/example-agents/fsd.html +3 -3
- package/dist/docs/example-agents/index.html +5 -5
- package/dist/docs/example-agents/knowledge-base.html +3 -3
- package/dist/docs/example-agents/oncall.html +3 -3
- package/dist/docs/example-agents/security-reviewer.html +3 -3
- package/dist/docs/example-agents/slack-agent.html +3 -3
- package/dist/docs/example-agents/weather-agent.html +3 -3
- package/dist/docs/guides/agent-to-agent.html +3 -3
- package/dist/docs/guides/cloud-runtime.html +3 -3
- package/dist/docs/guides/github.html +3 -3
- package/dist/docs/guides/human-in-the-loop.html +3 -3
- package/dist/docs/guides/mcp-oauth.html +3 -3
- package/dist/docs/guides/slack.html +3 -3
- package/dist/docs/guides/webhooks.html +49 -6
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +3 -3
- package/dist/docs/index.html +7 -7
- package/dist/docs/quickstart.html +8 -8
- package/dist/docs/reference/agent-config.html +3 -3
- package/dist/docs/reference/artifacts.html +3 -3
- package/dist/docs/reference/channels.html +3 -3
- package/dist/docs/reference/cli.html +8 -8
- package/dist/docs/reference/connections.html +3 -3
- package/dist/docs/reference/hooks.html +5 -5
- package/dist/docs/reference/http-api.html +3 -3
- package/dist/docs/reference/instructions.html +3 -3
- package/dist/docs/reference/playground.html +3 -3
- package/dist/docs/reference/project-layout.html +3 -3
- package/dist/docs/reference/prompt.html +3 -3
- package/dist/docs/reference/schedules.html +3 -3
- package/dist/docs/reference/sessions.html +3 -3
- package/dist/docs/reference/skills.html +3 -3
- package/dist/docs/reference/subagents.html +3 -3
- package/dist/docs/reference/tools.html +3 -3
- package/dist/docs/scaffolding-agents.html +3 -3
- package/dist/docs/storage.html +14 -8
- package/dist/docs/troubleshooting.html +5 -5
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +22 -2
- package/dist/internal/cli-deploy.d.ts +6 -0
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +14 -4
- package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
- package/dist/internal/cli-mcp-oauth.js +3 -1
- package/dist/internal/cli-mcp.js +4 -4
- package/dist/internal/cursor-event-relay.d.ts +45 -0
- package/dist/internal/cursor-event-relay.d.ts.map +1 -1
- package/dist/internal/cursor-event-relay.js +96 -2
- package/dist/internal/deploy-client.js +1 -1
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +35 -7
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +3 -1
- package/dist/internal/durable-session-store.d.ts +48 -0
- package/dist/internal/durable-session-store.d.ts.map +1 -0
- package/dist/internal/durable-session-store.js +86 -0
- package/dist/internal/hosting.d.ts +1 -1
- package/dist/internal/hosting.js +2 -2
- package/dist/internal/init-project.d.ts +34 -0
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +121 -2
- package/dist/internal/ledger-serving.d.ts +101 -0
- package/dist/internal/ledger-serving.d.ts.map +1 -0
- package/dist/internal/ledger-serving.js +174 -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 +77 -0
- package/dist/internal/mcp-oauth.d.ts +12 -1
- package/dist/internal/mcp-oauth.d.ts.map +1 -1
- package/dist/internal/mcp-oauth.js +25 -3
- package/dist/internal/playground/static.d.ts +21 -4
- package/dist/internal/playground/static.d.ts.map +1 -1
- package/dist/internal/playground/static.js +82 -18
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +10 -1
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +67 -49
- package/dist/internal/session-engine.d.ts +57 -1
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +117 -28
- package/dist/internal/slack-provision-client.js +1 -1
- package/dist/internal/workspace.d.ts +6 -2
- package/dist/internal/workspace.d.ts.map +1 -1
- package/dist/internal/workspace.js +10 -2
- package/dist/kv/memory-kv.d.ts +23 -0
- package/dist/kv/memory-kv.d.ts.map +1 -0
- package/dist/kv/memory-kv.js +103 -0
- package/dist/kv.d.ts +22 -0
- package/dist/kv.d.ts.map +1 -0
- package/dist/kv.js +20 -0
- package/dist/ledger/session-ledger.d.ts +204 -0
- package/dist/ledger/session-ledger.d.ts.map +1 -0
- package/dist/ledger/session-ledger.js +382 -0
- package/dist/ledger.d.ts +11 -0
- package/dist/ledger.d.ts.map +1 -0
- package/dist/ledger.js +9 -0
- package/dist/playground/assets/index-B3HBneZZ.js +85 -0
- package/dist/playground/assets/index-Bqk9nplh.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/storage-backends/cursor-hosted.d.ts +25 -3
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +50 -2
- package/dist/storage-backends/file-kv.d.ts +5 -2
- package/dist/storage-backends/file-kv.d.ts.map +1 -1
- package/dist/storage-backends/file-kv.js +107 -7
- package/dist/storage.d.ts +60 -5
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +28 -4
- package/dist/types.d.ts +123 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +14 -0
- package/docs/README.md +10 -7
- package/docs/ab.md +2 -2
- package/docs/building-with-agents.md +1 -1
- package/docs/deployment.md +34 -11
- package/docs/evals.md +3 -3
- package/docs/example-agents/index.md +1 -1
- package/docs/guides/webhooks.md +87 -0
- package/docs/quickstart.md +7 -8
- package/docs/reference/cli.md +15 -6
- package/docs/reference/hooks.md +8 -2
- package/docs/storage.md +67 -7
- package/docs/troubleshooting.md +10 -2
- package/package.json +20 -7
- package/skills/create-agent/SKILL.md +1 -1
- package/src/bin/agent-serve.ts +27 -11
- package/src/channels/slack/api.ts +19 -14
- package/src/channels/slack/attachments.ts +635 -0
- package/src/channels/slack/cursor-account.ts +8 -0
- package/src/channels/slack/defaults.ts +34 -18
- package/src/channels/slack/dispatch.ts +121 -6
- package/src/channels/slack/inbound.ts +60 -0
- package/src/channels/slack/index.ts +1 -0
- package/src/channels/slack/live-delivery.ts +17 -3
- package/src/channels/slack/manifest.ts +1 -0
- package/src/channels/slack/slack-channel.ts +7 -0
- package/src/channels/slack/types.ts +47 -1
- package/src/index.ts +9 -0
- package/src/internal/cli-ax.ts +25 -1
- package/src/internal/cli-deploy.ts +22 -4
- package/src/internal/cli-mcp-oauth.ts +3 -1
- package/src/internal/cli-mcp.ts +4 -4
- package/src/internal/cursor-event-relay.ts +168 -0
- package/src/internal/deploy-client.ts +1 -1
- package/src/internal/discovery.ts +42 -5
- package/src/internal/distribution.ts +3 -1
- package/src/internal/durable-session-store.ts +95 -0
- package/src/internal/hosting.ts +2 -2
- package/src/internal/init-project.ts +151 -2
- package/src/internal/ledger-serving.ts +240 -0
- package/src/internal/listen-port.ts +85 -0
- package/src/internal/mcp-oauth.ts +29 -4
- package/src/internal/playground/static.ts +111 -20
- package/src/internal/sdk-runner.ts +11 -1
- package/src/internal/server.ts +76 -62
- package/src/internal/session-engine.ts +192 -16
- package/src/internal/slack-provision-client.ts +1 -1
- package/src/internal/workspace.ts +14 -3
- package/src/kv/memory-kv.ts +99 -0
- package/src/kv.ts +27 -0
- package/src/ledger/session-ledger.ts +535 -0
- package/src/ledger.ts +29 -0
- package/src/storage-backends/cursor-hosted.ts +108 -3
- package/src/storage-backends/file-kv.ts +128 -12
- package/src/storage.ts +90 -6
- package/src/types.ts +130 -4
- package/dist/channels/slack/post-update-delivery.d.ts +0 -85
- package/dist/channels/slack/post-update-delivery.d.ts.map +0 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.B-VTH4As.js +0 -1
- package/dist/docs/assets/example-agents_index.md.DgGBwckv.js +0 -2
- package/dist/docs/assets/index.md.CmhptOmN.js +0 -24
- package/dist/docs/assets/troubleshooting.md.B5RVX_tL.js +0 -1
- package/dist/internal/json-dir-store.d.ts +0 -32
- package/dist/internal/json-dir-store.d.ts.map +0 -1
- package/dist/internal/persistence-coordinator.d.ts +0 -127
- package/dist/internal/persistence-coordinator.d.ts.map +0 -1
- package/dist/multi-tenant.d.ts +0 -80
- package/dist/multi-tenant.d.ts.map +0 -1
- package/dist/multi-tenant.js +0 -69
- package/dist/persistence.d.ts +0 -184
- package/dist/persistence.d.ts.map +0 -1
- package/dist/playground/assets/index-BRhBbnd4.css +0 -1
- package/dist/playground/assets/index-_2WKw9a-.js +0 -85
- package/dist/storage-backends/postgres-kv.d.ts +0 -82
- package/dist/storage-backends/postgres-kv.d.ts.map +0 -1
- package/dist/storage-backends/postgres-kv.js +0 -185
- package/src/storage-backends/postgres-kv.ts +0 -253
- /package/dist/docs/assets/{ab.md.6cLOW7--.lean.js → ab.md.hdxsvX5M.lean.js} +0 -0
- /package/dist/docs/assets/{building-with-agents.md.txrcGU2B.lean.js → building-with-agents.md.PeZaZA1P.lean.js} +0 -0
- /package/dist/docs/assets/{evals.md.BQXI3rXy.lean.js → evals.md.qeoGgPw0.lean.js} +0 -0
- /package/dist/docs/assets/{example-agents_index.md.DgGBwckv.lean.js → example-agents_index.md.xmJ87d_3.lean.js} +0 -0
- /package/dist/docs/assets/{quickstart.md.C_b6ESpD.lean.js → quickstart.md.rIbfahJM.lean.js} +0 -0
|
@@ -48,6 +48,34 @@ export type CursorScmPullRequestMeta = {
|
|
|
48
48
|
baseRef?: string;
|
|
49
49
|
baseSha?: string;
|
|
50
50
|
};
|
|
51
|
+
/** PR ref on a Checks / Actions webhook object. */
|
|
52
|
+
export type CursorScmCiPullRequestMeta = {
|
|
53
|
+
number: number;
|
|
54
|
+
url?: string;
|
|
55
|
+
};
|
|
56
|
+
export type CursorScmCiAppMeta = {
|
|
57
|
+
slug?: string;
|
|
58
|
+
name?: string;
|
|
59
|
+
};
|
|
60
|
+
/** Shared Checks / Actions fields. `id` + `headSha` satisfy the channel Zod schemas. */
|
|
61
|
+
type CursorScmCiBaseMeta = {
|
|
62
|
+
id: number;
|
|
63
|
+
headSha: string;
|
|
64
|
+
status?: string;
|
|
65
|
+
conclusion?: string | null;
|
|
66
|
+
htmlUrl?: string;
|
|
67
|
+
app?: CursorScmCiAppMeta;
|
|
68
|
+
pullRequests: CursorScmCiPullRequestMeta[];
|
|
69
|
+
};
|
|
70
|
+
export type CursorScmCheckRunMeta = CursorScmCiBaseMeta & {
|
|
71
|
+
name?: string;
|
|
72
|
+
checkSuiteId?: number;
|
|
73
|
+
};
|
|
74
|
+
export type CursorScmCheckSuiteMeta = CursorScmCiBaseMeta;
|
|
75
|
+
export type CursorScmWorkflowRunMeta = CursorScmCiBaseMeta & {
|
|
76
|
+
name?: string;
|
|
77
|
+
workflowId?: number;
|
|
78
|
+
};
|
|
51
79
|
/** One event delivered by `GET /v0/scm-events` (metadata only). */
|
|
52
80
|
export interface CursorScmEvent {
|
|
53
81
|
offset: string;
|
|
@@ -72,6 +100,12 @@ export interface CursorScmEvent {
|
|
|
72
100
|
* Zod-valid `issue_comment` / `pull_request_review_comment` webhook body.
|
|
73
101
|
*/
|
|
74
102
|
comment?: CursorScmCommentMeta;
|
|
103
|
+
/** `check_run` snapshot; enough to stub `onCheckRun`. */
|
|
104
|
+
checkRun?: CursorScmCheckRunMeta;
|
|
105
|
+
/** `check_suite` snapshot; enough to stub `onCheckSuite`. */
|
|
106
|
+
checkSuite?: CursorScmCheckSuiteMeta;
|
|
107
|
+
/** `workflow_run` snapshot; enough to stub `onWorkflowRun`. */
|
|
108
|
+
workflowRun?: CursorScmWorkflowRunMeta;
|
|
75
109
|
/** GitHub-side event time from the payload, when present. */
|
|
76
110
|
occurredAtMs?: number;
|
|
77
111
|
}
|
|
@@ -103,12 +137,20 @@ export declare function formatCursorScmEventLog(event: {
|
|
|
103
137
|
occurredAtMs?: number;
|
|
104
138
|
deliveryId?: string;
|
|
105
139
|
}): string;
|
|
140
|
+
/** Relay log suffix for one fan-out target, including parse errors on 4xx. */
|
|
141
|
+
export declare function formatCursorScmDispatchOutcome(target: {
|
|
142
|
+
slug: string;
|
|
143
|
+
status: number;
|
|
144
|
+
body: unknown;
|
|
145
|
+
}): string;
|
|
106
146
|
/**
|
|
107
147
|
* Minimal GitHub webhook body from an SCM-events metadata envelope.
|
|
108
148
|
* When `pullRequest` has title + head/base refs+shas, emits a Zod-valid
|
|
109
149
|
* `pull_request` object for `onPullRequest`; otherwise identity-only stubs.
|
|
110
150
|
* When `comment` is present, emits a Zod-valid `comment` object so relayed
|
|
111
151
|
* `issue_comment` / `pull_request_review_comment` deliveries dispatch.
|
|
152
|
+
* When a CI snapshot is present, emits `check_run` / `check_suite` /
|
|
153
|
+
* `workflow_run` so those typed hooks parse on the `--cursor-events` path.
|
|
112
154
|
*/
|
|
113
155
|
export declare function scmMetadataToGitHubPayload(event: {
|
|
114
156
|
repo: string;
|
|
@@ -117,6 +159,9 @@ export declare function scmMetadataToGitHubPayload(event: {
|
|
|
117
159
|
prUrl?: string;
|
|
118
160
|
pullRequest?: CursorScmPullRequestMeta;
|
|
119
161
|
comment?: CursorScmCommentMeta;
|
|
162
|
+
checkRun?: CursorScmCheckRunMeta;
|
|
163
|
+
checkSuite?: CursorScmCheckSuiteMeta;
|
|
164
|
+
workflowRun?: CursorScmWorkflowRunMeta;
|
|
120
165
|
}): Record<string, unknown>;
|
|
121
166
|
/**
|
|
122
167
|
* GitHub SCM-events relay: a thin {@link CursorRelayCore} adapter. Consumers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,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AC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,wBAAwB,CAAC;IACvC,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,UAAU,CAAC,EAAE,uBAAuB,CAAC;IACrC,WAAW,CAAC,EAAE,wBAAwB,CAAC;CACxC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmI1B;AA8ED;;;GAGG;AACH,qBAAa,gBAAgB;IAUf,OAAO,CAAC,QAAQ,CAAC,OAAO;IATpC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAkC;IACvD;;;;OAIG;IACH,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IAExD,YAA6B,OAAO,EAAE,uBAAuB,EAwD5D;IAED;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAatB,KAAK,IAAI,IAAI,CAEZ;IAEK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAE1B;CACF"}
|
|
@@ -36,22 +36,44 @@ export function formatCursorScmEventLog(event) {
|
|
|
36
36
|
const delivery = (_a = event.deliveryId) !== null && _a !== void 0 ? _a : "no delivery id";
|
|
37
37
|
return `${event.eventName}${action} on ${pr} received=${received}${occurred} (${delivery})`;
|
|
38
38
|
}
|
|
39
|
+
/** Relay log suffix for one fan-out target, including parse errors on 4xx. */
|
|
40
|
+
export function formatCursorScmDispatchOutcome(target) {
|
|
41
|
+
const slug = target.slug === "" ? "default" : target.slug;
|
|
42
|
+
if (target.status < 400) {
|
|
43
|
+
return `${slug}:${target.status}`;
|
|
44
|
+
}
|
|
45
|
+
const error = readDispatchError(target.body);
|
|
46
|
+
return error === undefined
|
|
47
|
+
? `${slug}:${target.status}`
|
|
48
|
+
: `${slug}:${target.status} ${error}`;
|
|
49
|
+
}
|
|
50
|
+
function readDispatchError(body) {
|
|
51
|
+
if (typeof body !== "object" || body === null)
|
|
52
|
+
return undefined;
|
|
53
|
+
if (!("error" in body))
|
|
54
|
+
return undefined;
|
|
55
|
+
const error = body.error;
|
|
56
|
+
return typeof error === "string" && error !== "" ? error : undefined;
|
|
57
|
+
}
|
|
39
58
|
/**
|
|
40
59
|
* Minimal GitHub webhook body from an SCM-events metadata envelope.
|
|
41
60
|
* When `pullRequest` has title + head/base refs+shas, emits a Zod-valid
|
|
42
61
|
* `pull_request` object for `onPullRequest`; otherwise identity-only stubs.
|
|
43
62
|
* When `comment` is present, emits a Zod-valid `comment` object so relayed
|
|
44
63
|
* `issue_comment` / `pull_request_review_comment` deliveries dispatch.
|
|
64
|
+
* When a CI snapshot is present, emits `check_run` / `check_suite` /
|
|
65
|
+
* `workflow_run` so those typed hooks parse on the `--cursor-events` path.
|
|
45
66
|
*/
|
|
46
67
|
export function scmMetadataToGitHubPayload(event) {
|
|
47
68
|
var _a, _b, _c;
|
|
69
|
+
var _d, _e, _f, _g, _h;
|
|
48
70
|
const slash = event.repo.indexOf("/");
|
|
49
71
|
const owner = slash === -1 ? "" : event.repo.slice(0, slash);
|
|
50
72
|
const name = slash === -1 ? event.repo : event.repo.slice(slash + 1);
|
|
51
73
|
const repoUrl = `https://github.com/${event.repo}`;
|
|
52
74
|
const prMeta = event.pullRequest;
|
|
53
|
-
const prNumber = (
|
|
54
|
-
const prUrl = (
|
|
75
|
+
const prNumber = (_d = prMeta === null || prMeta === void 0 ? void 0 : prMeta.number) !== null && _d !== void 0 ? _d : event.prNumber;
|
|
76
|
+
const prUrl = (_f = (_e = prMeta === null || prMeta === void 0 ? void 0 : prMeta.url) !== null && _e !== void 0 ? _e : event.prUrl) !== null && _f !== void 0 ? _f : (prNumber !== undefined ? `${repoUrl}/pull/${prNumber}` : undefined);
|
|
55
77
|
const payload = {
|
|
56
78
|
repository: {
|
|
57
79
|
full_name: event.repo,
|
|
@@ -96,6 +118,20 @@ export function scmMetadataToGitHubPayload(event) {
|
|
|
96
118
|
}
|
|
97
119
|
payload.comment = comment;
|
|
98
120
|
}
|
|
121
|
+
const checkPullRequests = stubGitHubCiPullRequests({
|
|
122
|
+
snapshot: (_h = (_g = (_a = event.checkRun) === null || _a === void 0 ? void 0 : _a.pullRequests) !== null && _g !== void 0 ? _g : (_b = event.checkSuite) === null || _b === void 0 ? void 0 : _b.pullRequests) !== null && _h !== void 0 ? _h : (_c = event.workflowRun) === null || _c === void 0 ? void 0 : _c.pullRequests,
|
|
123
|
+
prNumber,
|
|
124
|
+
prUrl,
|
|
125
|
+
});
|
|
126
|
+
if (event.checkRun !== undefined) {
|
|
127
|
+
payload.check_run = stubGitHubCheckRun(event.checkRun, checkPullRequests);
|
|
128
|
+
}
|
|
129
|
+
if (event.checkSuite !== undefined) {
|
|
130
|
+
payload.check_suite = stubGitHubCheckSuite(event.checkSuite, checkPullRequests);
|
|
131
|
+
}
|
|
132
|
+
if (event.workflowRun !== undefined) {
|
|
133
|
+
payload.workflow_run = stubGitHubWorkflowRun(event.workflowRun, checkPullRequests);
|
|
134
|
+
}
|
|
99
135
|
const title = prMeta === null || prMeta === void 0 ? void 0 : prMeta.title;
|
|
100
136
|
const headRef = prMeta === null || prMeta === void 0 ? void 0 : prMeta.headRef;
|
|
101
137
|
const headSha = prMeta === null || prMeta === void 0 ? void 0 : prMeta.headSha;
|
|
@@ -143,6 +179,64 @@ export function scmMetadataToGitHubPayload(event) {
|
|
|
143
179
|
}
|
|
144
180
|
return payload;
|
|
145
181
|
}
|
|
182
|
+
function stubGitHubCiPullRequests(input) {
|
|
183
|
+
if (input.snapshot !== undefined && input.snapshot.length > 0) {
|
|
184
|
+
return input.snapshot.map((pr) => (Object.assign({ number: pr.number }, (pr.url === undefined ? {} : { html_url: pr.url }))));
|
|
185
|
+
}
|
|
186
|
+
if (input.prNumber === undefined)
|
|
187
|
+
return [];
|
|
188
|
+
return [
|
|
189
|
+
Object.assign({ number: input.prNumber }, (input.prUrl === undefined ? {} : { html_url: input.prUrl })),
|
|
190
|
+
];
|
|
191
|
+
}
|
|
192
|
+
function stubGitHubCiApp(app) {
|
|
193
|
+
if (app === undefined)
|
|
194
|
+
return undefined;
|
|
195
|
+
const out = {};
|
|
196
|
+
if (app.slug !== undefined)
|
|
197
|
+
out.slug = app.slug;
|
|
198
|
+
if (app.name !== undefined)
|
|
199
|
+
out.name = app.name;
|
|
200
|
+
return out;
|
|
201
|
+
}
|
|
202
|
+
function stubGitHubCiBase(meta, pullRequests) {
|
|
203
|
+
const object = {
|
|
204
|
+
id: meta.id,
|
|
205
|
+
head_sha: meta.headSha,
|
|
206
|
+
};
|
|
207
|
+
if (meta.status !== undefined)
|
|
208
|
+
object.status = meta.status;
|
|
209
|
+
if (meta.conclusion !== undefined)
|
|
210
|
+
object.conclusion = meta.conclusion;
|
|
211
|
+
if (meta.htmlUrl !== undefined)
|
|
212
|
+
object.html_url = meta.htmlUrl;
|
|
213
|
+
const app = stubGitHubCiApp(meta.app);
|
|
214
|
+
if (app !== undefined)
|
|
215
|
+
object.app = app;
|
|
216
|
+
if (pullRequests.length > 0)
|
|
217
|
+
object.pull_requests = pullRequests;
|
|
218
|
+
return object;
|
|
219
|
+
}
|
|
220
|
+
function stubGitHubCheckRun(meta, pullRequests) {
|
|
221
|
+
const object = stubGitHubCiBase(meta, pullRequests);
|
|
222
|
+
if (meta.name !== undefined)
|
|
223
|
+
object.name = meta.name;
|
|
224
|
+
if (meta.checkSuiteId !== undefined) {
|
|
225
|
+
object.check_suite = { id: meta.checkSuiteId };
|
|
226
|
+
}
|
|
227
|
+
return object;
|
|
228
|
+
}
|
|
229
|
+
function stubGitHubCheckSuite(meta, pullRequests) {
|
|
230
|
+
return stubGitHubCiBase(meta, pullRequests);
|
|
231
|
+
}
|
|
232
|
+
function stubGitHubWorkflowRun(meta, pullRequests) {
|
|
233
|
+
const object = stubGitHubCiBase(meta, pullRequests);
|
|
234
|
+
if (meta.name !== undefined)
|
|
235
|
+
object.name = meta.name;
|
|
236
|
+
if (meta.workflowId !== undefined)
|
|
237
|
+
object.workflow_id = meta.workflowId;
|
|
238
|
+
return object;
|
|
239
|
+
}
|
|
146
240
|
/**
|
|
147
241
|
* GitHub SCM-events relay: a thin {@link CursorRelayCore} adapter. Consumers
|
|
148
242
|
* keep the same `new CursorEventRelay(options).start()/.stop()` surface.
|
|
@@ -442,7 +442,7 @@ function mapErrorResponse(response, bodyText, context) {
|
|
|
442
442
|
case 401:
|
|
443
443
|
return new DeployApiError("The Cursor API key was rejected. Run `agent-sdk login` again or update CURSOR_API_KEY.", 401);
|
|
444
444
|
case 403:
|
|
445
|
-
return new DeployApiError(`${serverError !== null && serverError !== void 0 ? serverError : "Not authorized"} — deploying needs team
|
|
445
|
+
return new DeployApiError(`${serverError !== null && serverError !== void 0 ? serverError : "Not authorized"} — deploying needs team membership and the cloud-agent entitlement on that team.`, 403);
|
|
446
446
|
case 404: {
|
|
447
447
|
// Fastify's route-not-found envelope means we hit the wrong host
|
|
448
448
|
// (api2 vs api.cursor.com), not a missing deployment / closed gate.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/internal/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAiBH,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/internal/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAiBH,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EAUrB,KAAK,UAAU,EAuBhB,MAAM,aAAa,CAAC;AA2BrB,MAAM,WAAW,uBAAuB;IACtC,sDAAsD;IACtD,YAAY,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC3E;AAmBD;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,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
|
|
@@ -120,11 +120,18 @@ export function loadAgentProjects(rootDir_1) {
|
|
|
120
120
|
throw new Error(`No agent projects found directly under ${resolved}. Each agent should be a subdirectory with its own agent/ directory (or flat-layout markers).`);
|
|
121
121
|
}
|
|
122
122
|
const results = [];
|
|
123
|
+
// Storage namespaces (session mirror, host kv, durable-session ledger)
|
|
124
|
+
// key on the project NAME, not the mount slug — two co-hosted agents
|
|
125
|
+
// sharing a name would silently share sessions and coordination state.
|
|
126
|
+
const slugByName = new Map();
|
|
123
127
|
for (const child of children) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
const project = yield loadAgentProject(child.dir, options);
|
|
129
|
+
const priorSlug = slugByName.get(project.name);
|
|
130
|
+
if (priorSlug !== undefined) {
|
|
131
|
+
throw new Error(`Duplicate agent name "${project.name}" under ${resolved}: agents "${priorSlug}" and "${child.slug}" both resolve to it (package.json "name", or the directory name when unset). Co-hosted agents must have distinct names — their storage and session namespaces key on the name.`);
|
|
132
|
+
}
|
|
133
|
+
slugByName.set(project.name, child.slug);
|
|
134
|
+
results.push({ slug: child.slug, project });
|
|
128
135
|
}
|
|
129
136
|
return results;
|
|
130
137
|
});
|
|
@@ -306,6 +313,7 @@ function loadAgent(ctx, agentDir, options) {
|
|
|
306
313
|
};
|
|
307
314
|
const hosting = resolveHosting(ctx, agentDir, config === null || config === void 0 ? void 0 : config.hosting);
|
|
308
315
|
const concurrency = resolveConcurrency(ctx, agentDir, config === null || config === void 0 ? void 0 : config.concurrency);
|
|
316
|
+
const serving = resolveServing(ctx, agentDir, config === null || config === void 0 ? void 0 : config.serving);
|
|
309
317
|
if (runtime === "cloud") {
|
|
310
318
|
warnCloudRuntimeLimitations(ctx, agentDir, {
|
|
311
319
|
agentTools: tools.filter((tool) => tool.execution === "agent").length,
|
|
@@ -326,6 +334,7 @@ function loadAgent(ctx, agentDir, options) {
|
|
|
326
334
|
local,
|
|
327
335
|
hosting,
|
|
328
336
|
concurrency,
|
|
337
|
+
serving,
|
|
329
338
|
tools,
|
|
330
339
|
skills,
|
|
331
340
|
connections,
|
|
@@ -334,6 +343,22 @@ function loadAgent(ctx, agentDir, options) {
|
|
|
334
343
|
};
|
|
335
344
|
});
|
|
336
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* Validate the authored serving mode. An unrecognized value is an error
|
|
348
|
+
* diagnostic and falls back to undefined (resident) — a typo must not
|
|
349
|
+
* silently opt an agent into (or out of) ledger coordination.
|
|
350
|
+
*/
|
|
351
|
+
function resolveServing(ctx, agentDir, serving) {
|
|
352
|
+
if (serving === undefined || serving === "resident" || serving === "ledger") {
|
|
353
|
+
return serving;
|
|
354
|
+
}
|
|
355
|
+
ctx.diagnostics.push({
|
|
356
|
+
severity: "error",
|
|
357
|
+
path: displayPath(ctx, join(agentDir, "agent.ts")),
|
|
358
|
+
message: `serving must be "resident" or "ledger"; got ${JSON.stringify(serving)}.`,
|
|
359
|
+
});
|
|
360
|
+
return undefined;
|
|
361
|
+
}
|
|
337
362
|
/** Absolute harness cwd parent, or undefined when unset / blank. */
|
|
338
363
|
function resolveAgentCwd(ctx, authored) {
|
|
339
364
|
if (authored === undefined) {
|
|
@@ -376,7 +401,7 @@ function resolveHosting(ctx, agentDir, hosting) {
|
|
|
376
401
|
warn(`hosting.secretNames: ${nameError}`);
|
|
377
402
|
}
|
|
378
403
|
else if (isReservedSecretName(name)) {
|
|
379
|
-
warn(`hosting.secretNames: ${JSON.stringify(name)} is platform-managed (CURSOR_* /
|
|
404
|
+
warn(`hosting.secretNames: ${JSON.stringify(name)} is platform-managed (CURSOR_* / reserved hosted-storage names); omit it from secretNames.`);
|
|
380
405
|
}
|
|
381
406
|
}
|
|
382
407
|
return Object.assign(Object.assign({}, (hosting.egressDomains === undefined
|
|
@@ -1525,11 +1550,14 @@ export function projectInfo(project) {
|
|
|
1525
1550
|
})), skills: agent.skills.map((skill) => ({
|
|
1526
1551
|
name: skill.name,
|
|
1527
1552
|
description: skill.description,
|
|
1528
|
-
})), connections: agent.connections.map((connection) => ({
|
|
1553
|
+
})), connections: agent.connections.map((connection) => { var _a; return ({
|
|
1529
1554
|
name: connection.name,
|
|
1530
1555
|
transport: connectionTransportLabel(connection.transport),
|
|
1531
1556
|
hostOnly: connection.hostOnly,
|
|
1532
|
-
|
|
1557
|
+
cursorAccountServers: "cursorAccount" in connection.transport
|
|
1558
|
+
? ((_a = connection.transport.servers) !== null && _a !== void 0 ? _a : "*")
|
|
1559
|
+
: undefined,
|
|
1560
|
+
}); }), subagents: agent.subagents.map((subagent) => ({
|
|
1533
1561
|
name: subagent.name,
|
|
1534
1562
|
description: subagent.description,
|
|
1535
1563
|
model: subagent.model,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distribution.d.ts","sourceRoot":"","sources":["../../src/internal/distribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,sEAAsE;AACtE,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAE3C,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,2BAA2B,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,WAAW,cAAc,CAAC;AACvC,eAAO,MAAM,UAAU,EAAE,MAA2B,CAAC;AACrD,eAAO,MAAM,gBAAgB,EAAE,MAAiC,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAA+B,CAAC;AAc/D;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAGhD;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,kEAAkE;AAClE,wBAAgB,cAAc,IAAI,MAAM,CAOvC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAC/C,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"distribution.d.ts","sourceRoot":"","sources":["../../src/internal/distribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,sEAAsE;AACtE,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAE3C,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,2BAA2B,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,WAAW,cAAc,CAAC;AACvC,eAAO,MAAM,UAAU,EAAE,MAA2B,CAAC;AACrD,eAAO,MAAM,gBAAgB,EAAE,MAAiC,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAA+B,CAAC;AAc/D;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAGhD;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,kEAAkE;AAClE,wBAAgB,cAAc,IAAI,MAAM,CAOvC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAC/C,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAyBzC,CAAC"}
|
|
@@ -92,8 +92,10 @@ export const AUTHORING_ENTRY_FILES = [
|
|
|
92
92
|
["evals/loaders", "evals/loaders.js"],
|
|
93
93
|
["ab", "ab.js"],
|
|
94
94
|
["artifacts", "artifacts.js"],
|
|
95
|
+
["kv", "kv.js"],
|
|
96
|
+
["kv/memory", "kv/memory-kv.js"],
|
|
97
|
+
["ledger", "ledger.js"],
|
|
95
98
|
["storage", "storage.js"],
|
|
96
99
|
["storage/file-kv", "storage-backends/file-kv.js"],
|
|
97
|
-
["storage/postgres-kv", "storage-backends/postgres-kv.js"],
|
|
98
100
|
["storage/cursor-hosted", "storage-backends/cursor-hosted.js"],
|
|
99
101
|
];
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Durable-session store resolution.
|
|
3
|
+
*
|
|
4
|
+
* Two APIs, one backend: `defineStorage` is the **storage API** (agent
|
|
5
|
+
* state — session records, event chunks, author KV), and the session
|
|
6
|
+
* ledger is the **durable session API** (session identity, leases,
|
|
7
|
+
* fenced commits). The ledger consumes {@link SessionLedgerKv} — exactly
|
|
8
|
+
* the three CAS methods it uses, nothing more; this module adapts a
|
|
9
|
+
* storage backend's `cas` group into that interface, so a deployment's
|
|
10
|
+
* one authored backend serves both APIs by default.
|
|
11
|
+
*
|
|
12
|
+
* Calls go straight at the config's methods — NOT through the
|
|
13
|
+
* StorageCoordinator: the coordinator's queue is bounded, serialized, and
|
|
14
|
+
* at-most-once (mirror semantics), while ledger CAS calls are the
|
|
15
|
+
* correctness path and must observe their own results synchronously.
|
|
16
|
+
*/
|
|
17
|
+
import type { SessionLedgerKv } from "../ledger/session-ledger.js";
|
|
18
|
+
import { type StorageConfig } from "../storage.js";
|
|
19
|
+
export interface StorageCasKvArgs {
|
|
20
|
+
agentName: string;
|
|
21
|
+
projectRoot: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Adapt a storage backend's `cas` group into the ledger's KV interface.
|
|
25
|
+
* Throws when the backend does not implement `cas` — the caller turns
|
|
26
|
+
* that into the fail-fast startup error for `serving: "ledger"`. Every
|
|
27
|
+
* call carries a `reason: "coordination"` {@link StorageContext}.
|
|
28
|
+
*/
|
|
29
|
+
export declare function storageCasKv(config: StorageConfig, args: StorageCasKvArgs): SessionLedgerKv;
|
|
30
|
+
/**
|
|
31
|
+
* The one place the ledger's physical namespace is minted:
|
|
32
|
+
* `agentkit/v1/<agent>/durable-session/` — the {@link STORAGE_KEY_ROOT}
|
|
33
|
+
* conventions with the agent segment encoded like every other
|
|
34
|
+
* caller-controlled segment. The ledger itself never sees this string;
|
|
35
|
+
* it speaks bare `session/…` / `ledger/…` keys against a handle that
|
|
36
|
+
* {@link namespacedKv} has already scoped.
|
|
37
|
+
*/
|
|
38
|
+
export declare function ledgerKeyPrefix(agentName: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Scope a raw store handle under a namespace, prepending it to every
|
|
41
|
+
* key on the way in. Applied exactly once, where the engine constructs
|
|
42
|
+
* the ledger's store handle — the same conceptual boundary where
|
|
43
|
+
* `host.kv` gets its agent scoping. Internal: not part of the public kv
|
|
44
|
+
* interface, and callers (including the explicit `durableSessionStore`
|
|
45
|
+
* override) always supply the raw store — they never write prefixes.
|
|
46
|
+
*/
|
|
47
|
+
export declare function namespacedKv(store: SessionLedgerKv, namespace: string): SessionLedgerKv;
|
|
48
|
+
//# sourceMappingURL=durable-session-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"durable-session-store.d.ts","sourceRoot":"","sources":["../../src/internal/durable-session-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAGL,KAAK,aAAa,EAEnB,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,gBAAgB,GACrB,eAAe,CAuBjB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,eAAe,EACtB,SAAS,EAAE,MAAM,GAChB,eAAe,CAOjB"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Durable-session store resolution.
|
|
3
|
+
*
|
|
4
|
+
* Two APIs, one backend: `defineStorage` is the **storage API** (agent
|
|
5
|
+
* state — session records, event chunks, author KV), and the session
|
|
6
|
+
* ledger is the **durable session API** (session identity, leases,
|
|
7
|
+
* fenced commits). The ledger consumes {@link SessionLedgerKv} — exactly
|
|
8
|
+
* the three CAS methods it uses, nothing more; this module adapts a
|
|
9
|
+
* storage backend's `cas` group into that interface, so a deployment's
|
|
10
|
+
* one authored backend serves both APIs by default.
|
|
11
|
+
*
|
|
12
|
+
* Calls go straight at the config's methods — NOT through the
|
|
13
|
+
* StorageCoordinator: the coordinator's queue is bounded, serialized, and
|
|
14
|
+
* at-most-once (mirror semantics), while ledger CAS calls are the
|
|
15
|
+
* correctness path and must observe their own results synchronously.
|
|
16
|
+
*/
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
import { keySegment, STORAGE_KEY_ROOT, } from "../storage.js";
|
|
27
|
+
/**
|
|
28
|
+
* Adapt a storage backend's `cas` group into the ledger's KV interface.
|
|
29
|
+
* Throws when the backend does not implement `cas` — the caller turns
|
|
30
|
+
* that into the fail-fast startup error for `serving: "ledger"`. Every
|
|
31
|
+
* call carries a `reason: "coordination"` {@link StorageContext}.
|
|
32
|
+
*/
|
|
33
|
+
export function storageCasKv(config, args) {
|
|
34
|
+
const ctx = {
|
|
35
|
+
agentName: args.agentName,
|
|
36
|
+
projectRoot: args.projectRoot,
|
|
37
|
+
reason: "coordination",
|
|
38
|
+
};
|
|
39
|
+
const { cas } = config;
|
|
40
|
+
if (cas === undefined) {
|
|
41
|
+
throw new Error("storageCasKv: the storage backend does not implement the cas group (conditional writes)");
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
getWithVersion(key) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
return yield cas.getWithVersion(key, ctx);
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
putIfAbsent(key, value) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
return yield cas.putIfAbsent(key, value, ctx);
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
putIfVersion(key, value, expectedVersion) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
return yield cas.putIfVersion(key, value, expectedVersion, ctx);
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The one place the ledger's physical namespace is minted:
|
|
63
|
+
* `agentkit/v1/<agent>/durable-session/` — the {@link STORAGE_KEY_ROOT}
|
|
64
|
+
* conventions with the agent segment encoded like every other
|
|
65
|
+
* caller-controlled segment. The ledger itself never sees this string;
|
|
66
|
+
* it speaks bare `session/…` / `ledger/…` keys against a handle that
|
|
67
|
+
* {@link namespacedKv} has already scoped.
|
|
68
|
+
*/
|
|
69
|
+
export function ledgerKeyPrefix(agentName) {
|
|
70
|
+
return `${STORAGE_KEY_ROOT}/${keySegment(agentName)}/durable-session/`;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Scope a raw store handle under a namespace, prepending it to every
|
|
74
|
+
* key on the way in. Applied exactly once, where the engine constructs
|
|
75
|
+
* the ledger's store handle — the same conceptual boundary where
|
|
76
|
+
* `host.kv` gets its agent scoping. Internal: not part of the public kv
|
|
77
|
+
* interface, and callers (including the explicit `durableSessionStore`
|
|
78
|
+
* override) always supply the raw store — they never write prefixes.
|
|
79
|
+
*/
|
|
80
|
+
export function namespacedKv(store, namespace) {
|
|
81
|
+
return {
|
|
82
|
+
getWithVersion: (key) => store.getWithVersion(namespace + key),
|
|
83
|
+
putIfAbsent: (key, value) => store.putIfAbsent(namespace + key, value),
|
|
84
|
+
putIfVersion: (key, value, expectedVersion) => store.putIfVersion(namespace + key, value, expectedVersion),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -14,7 +14,7 @@ export declare const MAX_SECRETS = 32;
|
|
|
14
14
|
export declare const MAX_SECRET_VALUE_BYTES = 4096;
|
|
15
15
|
/** Max secret name length. */
|
|
16
16
|
export declare const MAX_SECRET_NAME_LENGTH = 64;
|
|
17
|
-
/** Secret names the platform
|
|
17
|
+
/** Secret names the platform manages; user writes are rejected. */
|
|
18
18
|
export declare const RESERVED_SECRET_NAME_PREFIX = "CURSOR_";
|
|
19
19
|
/**
|
|
20
20
|
* Additional platform-managed env names for Cursor-hosted durable storage
|
package/dist/internal/hosting.js
CHANGED
|
@@ -14,7 +14,7 @@ export const MAX_SECRETS = 32;
|
|
|
14
14
|
export const MAX_SECRET_VALUE_BYTES = 4096;
|
|
15
15
|
/** Max secret name length. */
|
|
16
16
|
export const MAX_SECRET_NAME_LENGTH = 64;
|
|
17
|
-
/** Secret names the platform
|
|
17
|
+
/** Secret names the platform manages; user writes are rejected. */
|
|
18
18
|
export const RESERVED_SECRET_NAME_PREFIX = "CURSOR_";
|
|
19
19
|
/**
|
|
20
20
|
* Additional platform-managed env names for Cursor-hosted durable storage
|
|
@@ -73,7 +73,7 @@ export function validateSettableSecretName(name) {
|
|
|
73
73
|
return nameError;
|
|
74
74
|
}
|
|
75
75
|
if (isReservedSecretName(name)) {
|
|
76
|
-
return `Secret name ${JSON.stringify(name)} is platform-managed;
|
|
76
|
+
return `Secret name ${JSON.stringify(name)} is platform-managed; user secrets cannot claim CURSOR_* or reserved hosted-storage names.`;
|
|
77
77
|
}
|
|
78
78
|
return undefined;
|
|
79
79
|
}
|
|
@@ -52,6 +52,34 @@ export interface InstallScaffoldDependenciesResult {
|
|
|
52
52
|
* `@cursor/july` immediately after `init`.
|
|
53
53
|
*/
|
|
54
54
|
export declare function installScaffoldDependencies(rootDir: string, options?: InstallScaffoldDependenciesOptions): Promise<InstallScaffoldDependenciesResult>;
|
|
55
|
+
export interface LinkCliOntoPathOptions {
|
|
56
|
+
stdio?: "inherit" | "pipe";
|
|
57
|
+
runner?: (args: {
|
|
58
|
+
command: string;
|
|
59
|
+
args: string[];
|
|
60
|
+
cwd: string;
|
|
61
|
+
stdio: "inherit" | "pipe";
|
|
62
|
+
}) => Promise<{
|
|
63
|
+
exitCode: number;
|
|
64
|
+
stderr: string;
|
|
65
|
+
}>;
|
|
66
|
+
/** Test seam — absolute path of the linked CLI when present. */
|
|
67
|
+
whichImpl?: (command: string) => string | undefined | Promise<string | undefined>;
|
|
68
|
+
}
|
|
69
|
+
export interface LinkCliOntoPathResult {
|
|
70
|
+
ok: boolean;
|
|
71
|
+
exitCode: number;
|
|
72
|
+
stderr: string;
|
|
73
|
+
/** Absolute path to the linked `agent-sdk` when it resolves on PATH. */
|
|
74
|
+
resolvedPath?: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Put `agent-sdk` on the user PATH by installing the already-downloaded
|
|
78
|
+
* project copy into the npm global prefix. `npx @cursor/july init` only
|
|
79
|
+
* runs the package; this is the install that makes bare `agent-sdk …`
|
|
80
|
+
* work afterward.
|
|
81
|
+
*/
|
|
82
|
+
export declare function linkCliOntoPath(rootDir: string, options?: LinkCliOntoPathOptions): Promise<LinkCliOntoPathResult>;
|
|
55
83
|
export interface InitScaffoldSummaryOptions {
|
|
56
84
|
/** Scaffolded project root (absolute). */
|
|
57
85
|
rootDir: string;
|
|
@@ -70,6 +98,11 @@ export interface InitNextStepsOptions {
|
|
|
70
98
|
* `login` (used for `--json` and when an interactive login attempt failed).
|
|
71
99
|
*/
|
|
72
100
|
signedIn: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* True when `agent-sdk` resolves on PATH after init linked the CLI.
|
|
103
|
+
* When false, next steps include a PATH export for `node_modules/.bin`.
|
|
104
|
+
*/
|
|
105
|
+
cliOnPath: boolean;
|
|
73
106
|
/** Override TTY color detection (tests / `--json` callers). */
|
|
74
107
|
color?: boolean;
|
|
75
108
|
}
|
|
@@ -101,6 +134,7 @@ export declare function initNextCommands(options: {
|
|
|
101
134
|
rootDir: string;
|
|
102
135
|
cwd: string;
|
|
103
136
|
signedIn: boolean;
|
|
137
|
+
cliOnPath: boolean;
|
|
104
138
|
}): string[];
|
|
105
139
|
/**
|
|
106
140
|
* Coding-agent setup guide printed by `agent-serve init`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-project.d.ts","sourceRoot":"","sources":["../../src/internal/init-project.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"init-project.d.ts","sourceRoot":"","sources":["../../src/internal/init-project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAkBH,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,2BAA2B;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,qDAAqD;IACrD,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AA2BD,wBAAsB,WAAW,CAC/B,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAuI5B;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAO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