@cursor/july 0.1.84 → 0.1.86
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/channels/deployments/deployments-channel.d.ts +2 -2
- package/dist/channels/deployments/deployments-channel.d.ts.map +1 -1
- package/dist/channels/deployments/deployments-channel.js +7 -6
- package/dist/channels/deployments/index.d.ts +2 -3
- package/dist/channels/deployments/index.d.ts.map +1 -1
- package/dist/channels/deployments/index.js +2 -3
- package/dist/channels/deployments/types.d.ts +14 -14
- package/dist/channels/deployments/types.d.ts.map +1 -1
- package/dist/channels/github/github-channel.d.ts +4 -0
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +18 -11
- package/dist/channels/origin/origin-channel.d.ts +6 -0
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +24 -11
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +12 -2
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +3 -3
- package/dist/docs/assets/{app.kqdC1N7p.js → app.DUOPbN18.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.CxCtxfDE.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.DXDE2WgG.js → VPLocalSearchBox.CmWbGcGk.js} +1 -1
- package/dist/docs/assets/chunks/{theme.DFYqbyta.js → theme.S57OeOLA.js} +2 -2
- package/dist/docs/assets/{reference_channels.md.G5GysZ7e.js → reference_channels.md.CboFd5IH.js} +1 -1
- package/dist/docs/building-with-agents.html +3 -3
- package/dist/docs/concepts.html +3 -3
- package/dist/docs/deployment.html +3 -3
- package/dist/docs/evals.html +3 -3
- 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 +3 -3
- 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/convert-automation.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/opentelemetry.html +3 -3
- package/dist/docs/guides/slack.html +3 -3
- package/dist/docs/guides/webhooks.html +3 -3
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +3 -3
- package/dist/docs/index.html +3 -3
- package/dist/docs/quickstart.html +3 -3
- package/dist/docs/reference/agent-config.html +3 -3
- package/dist/docs/reference/artifacts.html +3 -3
- package/dist/docs/reference/channels.html +5 -5
- package/dist/docs/reference/cli.html +3 -3
- package/dist/docs/reference/connections.html +3 -3
- package/dist/docs/reference/hooks.html +3 -3
- 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 +3 -3
- package/dist/docs/templates/agentic-owners.html +3 -3
- package/dist/docs/templates/demo.html +3 -3
- package/dist/docs/templates/pr-autofixer.html +3 -3
- package/dist/docs/templates/security-reviewer.html +3 -3
- package/dist/docs/templates/triage.html +3 -3
- package/dist/docs/troubleshooting.html +3 -3
- package/dist/internal/continuation-identity.d.ts +10 -0
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +10 -0
- package/dist/internal/cursor-deployment-relay.d.ts +4 -4
- package/dist/internal/cursor-deployment-relay.d.ts.map +1 -1
- package/dist/internal/cursor-deployment-relay.js +33 -32
- package/dist/internal/handleAgentServeTrigger.d.ts +5 -0
- package/dist/internal/handleAgentServeTrigger.d.ts.map +1 -1
- package/dist/internal/handleAgentServeTrigger.js +11 -3
- package/dist/internal/local-control-plane.d.ts +19 -0
- package/dist/internal/local-control-plane.d.ts.map +1 -1
- package/dist/internal/local-control-plane.js +17 -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 +44 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +151 -75
- package/dist/playground/assets/{index-Cspgk9jC.js → index-Bqn91tW4.js} +45 -45
- package/dist/playground/assets/index-C0_5hOsf.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +2 -2
- package/docs/reference/channels.md +13 -11
- package/package.json +1 -1
- package/src/channels/deployments/deployments-channel.ts +7 -6
- package/src/channels/deployments/index.ts +2 -3
- package/src/channels/deployments/types.ts +14 -14
- package/src/channels/github/github-channel.ts +18 -21
- package/src/channels/origin/origin-channel.ts +26 -15
- package/src/channels/slack/dispatch.ts +11 -7
- package/src/internal/continuation-identity.ts +10 -0
- package/src/internal/cursor-deployment-relay.ts +38 -36
- package/src/internal/handleAgentServeTrigger.ts +31 -2
- package/src/internal/local-control-plane.ts +33 -0
- package/src/internal/local-ingress.ts +90 -0
- package/src/internal/server.ts +194 -40
- package/src/types.ts +2 -2
- package/dist/docs/assets/chunks/@localSearchIndexroot.BqhvUA76.js +0 -1
- package/dist/playground/assets/index-ChETdG-_.css +0 -1
- /package/dist/docs/assets/{reference_channels.md.G5GysZ7e.lean.js → reference_channels.md.CboFd5IH.lean.js} +0 -0
|
@@ -22,10 +22,10 @@ export declare function dispatchDeploymentEvent(input: {
|
|
|
22
22
|
* import { deploymentsChannel } from "@cursor/july/channels/deployments";
|
|
23
23
|
*
|
|
24
24
|
* export default deploymentsChannel({
|
|
25
|
-
*
|
|
25
|
+
* deploySourceUris: ["https://origin.cursor.com/repos/anysphere/everysphere"],
|
|
26
26
|
* environments: ["prod"],
|
|
27
27
|
* onEvent: async (event, { send }) => {
|
|
28
|
-
* await send(`${event.
|
|
28
|
+
* await send(`${event.deploySourceUri}@${event.deployVersion} shipped to ${event.environment}`);
|
|
29
29
|
* },
|
|
30
30
|
* });
|
|
31
31
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployments-channel.d.ts","sourceRoot":"","sources":["../../../src/channels/deployments/deployments-channel.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC/B,MAAM,YAAY,CAAC;AAqBpB;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,GACjB,yBAAyB,GAAG,SAAS,CAEvC;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAAC,KAAK,EAAE;IACnD,OAAO,EAAE,yBAAyB,CAAC;IACnC,KAAK,EAAE,eAAe,CAAC;IACvB,IAAI,EAAE,kBAAkB,CAAC;CAC1B,GAAG,OAAO,CAAC,QAAQ,CAAC,CAGpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,yBAAyB,GACjC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"deployments-channel.d.ts","sourceRoot":"","sources":["../../../src/channels/deployments/deployments-channel.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC/B,MAAM,YAAY,CAAC;AAqBpB;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,GACjB,yBAAyB,GAAG,SAAS,CAEvC;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAAC,KAAK,EAAE;IACnD,OAAO,EAAE,yBAAyB,CAAC;IACnC,KAAK,EAAE,eAAe,CAAC;IACvB,IAAI,EAAE,kBAAkB,CAAC;CAC1B,GAAG,OAAO,CAAC,QAAQ,CAAC,CAGpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,yBAAyB,GACjC,iBAAiB,CA2BnB"}
|
|
@@ -15,11 +15,11 @@ const deploymentEventSchema = z.object({
|
|
|
15
15
|
eventType: z.enum(DEPLOYMENT_EVENT_TYPES),
|
|
16
16
|
eventId: z.string().min(1),
|
|
17
17
|
teamId: z.number(),
|
|
18
|
-
|
|
18
|
+
deploySourceUri: z.string().min(1),
|
|
19
19
|
deploymentId: z.string().min(1),
|
|
20
20
|
environment: z.string().min(1),
|
|
21
21
|
service: z.string().min(1).optional(),
|
|
22
|
-
|
|
22
|
+
deployVersion: z.string().min(1),
|
|
23
23
|
status: z.enum(["pending", "in_progress", "success", "failed"]),
|
|
24
24
|
occurredAtMs: z.number(),
|
|
25
25
|
});
|
|
@@ -50,10 +50,10 @@ export function dispatchDeploymentEvent(input) {
|
|
|
50
50
|
* import { deploymentsChannel } from "@cursor/july/channels/deployments";
|
|
51
51
|
*
|
|
52
52
|
* export default deploymentsChannel({
|
|
53
|
-
*
|
|
53
|
+
* deploySourceUris: ["https://origin.cursor.com/repos/anysphere/everysphere"],
|
|
54
54
|
* environments: ["prod"],
|
|
55
55
|
* onEvent: async (event, { send }) => {
|
|
56
|
-
* await send(`${event.
|
|
56
|
+
* await send(`${event.deploySourceUri}@${event.deployVersion} shipped to ${event.environment}`);
|
|
57
57
|
* },
|
|
58
58
|
* });
|
|
59
59
|
* ```
|
|
@@ -70,8 +70,9 @@ export function dispatchDeploymentEvent(input) {
|
|
|
70
70
|
*/
|
|
71
71
|
export function deploymentsChannel(options) {
|
|
72
72
|
var _a, _b;
|
|
73
|
-
// Throws here rather than at startup, so a malformed `
|
|
74
|
-
// when the channel module is authored instead of when the host
|
|
73
|
+
// Throws here rather than at startup, so a malformed `deploySourceUris`
|
|
74
|
+
// entry fails when the channel module is authored instead of when the host
|
|
75
|
+
// mounts it.
|
|
75
76
|
resolveDeploymentSubscriptions(options);
|
|
76
77
|
const routePath = (_a = options.path) !== null && _a !== void 0 ? _a : "/";
|
|
77
78
|
const definition = defineChannel(Object.assign(Object.assign(Object.assign({ auth: (_b = options.auth) !== null && _b !== void 0 ? _b : [localDevStrict()], meta: { kind: DEPLOYMENTS_CHANNEL_KIND } }, (options.onStart === undefined ? {} : { onStart: options.onStart })), (options.onStop === undefined ? {} : { onStop: options.onStop })), { routes: [
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* import { deploymentsChannel } from "@cursor/july/channels/deployments";
|
|
6
6
|
*
|
|
7
7
|
* export default deploymentsChannel({
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* onEvent: (event, { send }) => send(`${event.sha} shipped`),
|
|
8
|
+
* deploySourceUris: ["https://origin.cursor.com/repos/anysphere/everysphere"],
|
|
9
|
+
* onEvent: (event, { send }) => send(`${event.deployVersion} shipped`),
|
|
11
10
|
* });
|
|
12
11
|
* ```
|
|
13
12
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/channels/deployments/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/channels/deployments/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC"}
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* import { deploymentsChannel } from "@cursor/july/channels/deployments";
|
|
6
6
|
*
|
|
7
7
|
* export default deploymentsChannel({
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* onEvent: (event, { send }) => send(`${event.sha} shipped`),
|
|
8
|
+
* deploySourceUris: ["https://origin.cursor.com/repos/anysphere/everysphere"],
|
|
9
|
+
* onEvent: (event, { send }) => send(`${event.deployVersion} shipped`),
|
|
11
10
|
* });
|
|
12
11
|
* ```
|
|
13
12
|
*
|
|
@@ -11,24 +11,24 @@ export interface DeploymentEvent {
|
|
|
11
11
|
eventId: string;
|
|
12
12
|
/** Owning Cursor team. */
|
|
13
13
|
teamId: number;
|
|
14
|
-
/** The Deployment's
|
|
15
|
-
|
|
14
|
+
/** The Deployment's deploy_source_uri string, case-folded. */
|
|
15
|
+
deploySourceUri: string;
|
|
16
16
|
deploymentId: string;
|
|
17
17
|
/** Environment slug, e.g. `prod`. */
|
|
18
18
|
environment: string;
|
|
19
19
|
/** Absent when the deployment records no service. */
|
|
20
20
|
service?: string;
|
|
21
|
-
|
|
21
|
+
deployVersion: string;
|
|
22
22
|
status: DeploymentStatus;
|
|
23
23
|
occurredAtMs: number;
|
|
24
24
|
}
|
|
25
|
-
/** What a
|
|
25
|
+
/** What a deploy-source subscription asks for. */
|
|
26
26
|
export interface DeploymentSubscription {
|
|
27
27
|
/**
|
|
28
|
-
* The
|
|
28
|
+
* The deploy-source URI as the factory records it on a Deployment. Opaque:
|
|
29
29
|
* whatever your deployment writer puts there, matched case-insensitively.
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
deploySourceUri: string;
|
|
32
32
|
/** Omit or leave empty for every environment. */
|
|
33
33
|
environments?: readonly string[];
|
|
34
34
|
/** Defaults to `deployment.succeeded`. */
|
|
@@ -36,18 +36,18 @@ export interface DeploymentSubscription {
|
|
|
36
36
|
}
|
|
37
37
|
export interface DeploymentsChannelOptions {
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
40
|
-
* `Deployment.
|
|
41
|
-
* puts there is the key — and matching is case-insensitive but
|
|
42
|
-
* literal, so a value that does not match subscribes successfully
|
|
43
|
-
* receives nothing. A bare string takes the default environment and
|
|
44
|
-
* filters.
|
|
39
|
+
* Deploy sources to watch, spelled exactly as your deployment writer records
|
|
40
|
+
* `Deployment.deploy_source_uri`. The field has no format — whatever the
|
|
41
|
+
* writer puts there is the key — and matching is case-insensitive but
|
|
42
|
+
* otherwise literal, so a value that does not match subscribes successfully
|
|
43
|
+
* and then receives nothing. A bare string takes the default environment and
|
|
44
|
+
* event filters.
|
|
45
45
|
*
|
|
46
|
-
* There is no team-wide subscription: every
|
|
46
|
+
* There is no team-wide subscription: every deploy source is named. At least
|
|
47
47
|
* one is required — an empty list is how a consumer *deregisters*, so it
|
|
48
48
|
* cannot also mean "everything".
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
deploySourceUris: readonly (string | DeploymentSubscription)[];
|
|
51
51
|
/**
|
|
52
52
|
* Applied to every subscription that does not set its own. Omit or leave
|
|
53
53
|
* empty for every environment.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/channels/deployments/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAE5E,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,gBAAgB,CAAC;AAEtD,eAAO,MAAM,sBAAsB,YACjC,oBAAoB,EACpB,sBAAsB,CACd,CAAC;AACX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,G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C1C,MAAM,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,yBAAyB;IACxC;;;;;;;;;;;OAWG;IACH,gBAAgB,EAAE,SAAS,CAAC,MAAM,GAAG,sBAAsB,CAAC,EAAE,CAAC;IAC/D;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACxC,6EAA6E;IAC7E,OAAO,EAAE,CACP,KAAK,EAAE,eAAe,EACtB,IAAI,EAAE,kBAAkB,KACrB,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAChC,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACvC,MAAM,CAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;CACtC"}
|
|
@@ -109,6 +109,10 @@ export declare function verifyGitHubWebhookSignature(args: {
|
|
|
109
109
|
* {@link handleAgentServeTrigger} fan-out. Signature verification is the
|
|
110
110
|
* caller's responsibility (HTTP route verifies; internal fan-out skips).
|
|
111
111
|
*/
|
|
112
|
+
/**
|
|
113
|
+
* Run authored GitHub hooks and `send()`. Does not extract a v2 mailbox —
|
|
114
|
+
* the local CP (or hosted verified ingress) stamps before this runs.
|
|
115
|
+
*/
|
|
112
116
|
export declare function dispatchGitHubWebhook(input: {
|
|
113
117
|
options: GitHubChannelOptions;
|
|
114
118
|
eventName: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-channel.d.ts","sourceRoot":"","sources":["../../../src/channels/github/github-channel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-channel.d.ts","sourceRoot":"","sources":["../../../src/channels/github/github-channel.ts"],"names":[],"m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E,MAAM,CAAC;IACpB,IAAI,EAAE,kBAAkB,CAAC;CAC1B,GAAG,OAAO,CAAC,QAAQ,CAAC,CAEpB;AA2GD;;;GAGG;AACH,wBAAsB,0BAA0B,CAAC,KAAK,EAAE;IACtD,OAAO,EAAE,oBAAoB,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,kBAAkB,CAAC;IACzB,mEAAmE;IACnE,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC,GAAG,OAAO,CAAC,QAAQ,CAAC,CA2CpB;AAQD;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,GACjB,oBAAoB,GAAG,SAAS,CAElC;AAED,wBAAgB,aAAa,CAC3B,OAAO,GAAE,oBAAyB,GACjC,iBAAiB,CAAC,kBAAkB,CAAC,CA8GvC;AAi4BD,wEAAwE;AACxE,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,UAAU,GAAG,SAAS,EAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,GAC1B,OAAO,CAeT"}
|
|
@@ -10,8 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import { allowAll, defineChannel, localDevStrict, loopbackGitHubDev, POST, } from "../../channels.js";
|
|
13
|
-
import {
|
|
13
|
+
import { continuationSource, normalizeIdentity, } from "../../internal/continuation-identity.js";
|
|
14
14
|
import { isDevMode } from "../../internal/dev-mode.js";
|
|
15
|
+
import { bindLocalIngressSend } from "../../internal/local-ingress.js";
|
|
15
16
|
import { resolveCredentialValue } from "./auth.js";
|
|
16
17
|
import { buildGitHubBinding, } from "./binding.js";
|
|
17
18
|
import { createCursorAccountGithubTokenResolver, createPendingCursorGithubCredentials, cursorGithubPermissionsForChannel, parseCursorGithubRepoScope, registerGithubCursorAccountRuntime, } from "./cursor-account.js";
|
|
@@ -322,16 +323,13 @@ function verifyWebhookSha256Signature(args) {
|
|
|
322
323
|
* {@link handleAgentServeTrigger} fan-out. Signature verification is the
|
|
323
324
|
* caller's responsibility (HTTP route verifies; internal fan-out skips).
|
|
324
325
|
*/
|
|
326
|
+
/**
|
|
327
|
+
* Run authored GitHub hooks and `send()`. Does not extract a v2 mailbox —
|
|
328
|
+
* the local CP (or hosted verified ingress) stamps before this runs.
|
|
329
|
+
*/
|
|
325
330
|
export function dispatchGitHubWebhook(input) {
|
|
326
331
|
return __awaiter(this, void 0, void 0, function* () {
|
|
327
|
-
|
|
328
|
-
let args = input.args;
|
|
329
|
-
if (continuationSource(identity, "github") === "control-plane" &&
|
|
330
|
-
input.eventName !== null) {
|
|
331
|
-
const mailbox = stampMailboxContinuation(identity, input.eventName, input.payload);
|
|
332
|
-
args = Object.assign(Object.assign({}, input.args), { send: bindMailboxContinuationSend(input.args.send, mailbox) });
|
|
333
|
-
}
|
|
334
|
-
return dispatchGitHubWebhookInner(Object.assign(Object.assign({}, input), { args }));
|
|
332
|
+
return dispatchGitHubWebhookInner(input);
|
|
335
333
|
});
|
|
336
334
|
}
|
|
337
335
|
function dispatchGitHubWebhookInner(input) {
|
|
@@ -460,12 +458,21 @@ export function handleGitHubWebhookRequest(input) {
|
|
|
460
458
|
catch (_d) {
|
|
461
459
|
return Response.json({ ok: false, error: "invalid_json" }, { status: 400 });
|
|
462
460
|
}
|
|
461
|
+
const eventName = input.request.headers.get("x-github-event");
|
|
462
|
+
const args = eventName === null
|
|
463
|
+
? input.args
|
|
464
|
+
: bindLocalIngressSend(input.args, {
|
|
465
|
+
identity: input.options.continuation,
|
|
466
|
+
kind: "github",
|
|
467
|
+
eventType: eventName,
|
|
468
|
+
payload,
|
|
469
|
+
});
|
|
463
470
|
return dispatchGitHubWebhook({
|
|
464
471
|
options: input.options,
|
|
465
|
-
eventName
|
|
472
|
+
eventName,
|
|
466
473
|
payload,
|
|
467
474
|
deliveryId: (_c = input.request.headers.get("x-github-delivery")) !== null && _c !== void 0 ? _c : undefined,
|
|
468
|
-
args
|
|
475
|
+
args,
|
|
469
476
|
});
|
|
470
477
|
});
|
|
471
478
|
}
|
|
@@ -18,6 +18,8 @@ export declare function parseOriginPullRequestEvent(input: {
|
|
|
18
18
|
*/
|
|
19
19
|
export declare function defaultOriginAuth(ctx: Omit<OriginEventContext, "host" | "artifacts" | "origin">): AuthContext;
|
|
20
20
|
export declare function originContinuationKey(ctx: Pick<OriginEventContext, "repository" | "pullRequestNumber">): string;
|
|
21
|
+
/** Payload shape local/hosted CP extract expects (`fullName` + number). */
|
|
22
|
+
export declare function originIngressExtractPayload(envelope: OriginWebhookEnvelope): unknown;
|
|
21
23
|
export declare function defaultOriginTitle(ctx: Pick<OriginEventContext, "repository" | "pullRequestNumber">): string;
|
|
22
24
|
export declare function defaultOriginPullRequestMessage(ctx: Omit<OriginEventContext, "host" | "artifacts" | "origin">, pullRequest: OriginPullRequestEvent): string;
|
|
23
25
|
export declare function defaultOriginPullRequestDispatch(ctx: Omit<OriginEventContext, "host" | "artifacts" | "origin">, pullRequest: OriginPullRequestEvent): OriginTurnDispatch | null;
|
|
@@ -26,6 +28,10 @@ export declare function defaultOriginPullRequestDispatch(ctx: Omit<OriginEventCo
|
|
|
26
28
|
* {@link handleAgentServeTrigger} fan-out. Signature verification is the
|
|
27
29
|
* caller's responsibility (HTTP route verifies; internal fan-out skips).
|
|
28
30
|
*/
|
|
31
|
+
/**
|
|
32
|
+
* Run authored Origin hooks and `send()`. Does not extract a v2 mailbox —
|
|
33
|
+
* the local CP (or hosted verified ingress) stamps before this runs.
|
|
34
|
+
*/
|
|
29
35
|
export declare function dispatchOriginWebhook(input: {
|
|
30
36
|
options: OriginChannelOptions;
|
|
31
37
|
envelope: OriginWebhookEnvelope;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"origin-channel.d.ts","sourceRoot":"","sources":["../../../src/channels/origin/origin-channel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3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AE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC1C,mBAAmB,EAAE,CAgBvB"}
|
|
@@ -9,8 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { allowAll, defineChannel, localDevStrict, loopbackOnly, POST, } from "../../channels.js";
|
|
12
|
-
import {
|
|
12
|
+
import { continuationSource, normalizeIdentity, } from "../../internal/continuation-identity.js";
|
|
13
13
|
import { isDevMode } from "../../internal/dev-mode.js";
|
|
14
|
+
import { bindLocalIngressSend } from "../../internal/local-ingress.js";
|
|
14
15
|
import { buildOriginBinding } from "./binding.js";
|
|
15
16
|
import { parseCursorOriginRepoScope, registerOriginCursorAccountRuntime, } from "./cursor-account.js";
|
|
16
17
|
import { deriveOriginWebhookEvents, ORIGIN_CHANNEL_KIND } from "./events.js";
|
|
@@ -261,6 +262,17 @@ export function defaultOriginAuth(ctx) {
|
|
|
261
262
|
export function originContinuationKey(ctx) {
|
|
262
263
|
return `origin-pr:${ctx.repository.fullName}#${ctx.pullRequestNumber}`;
|
|
263
264
|
}
|
|
265
|
+
/** Payload shape local/hosted CP extract expects (`fullName` + number). */
|
|
266
|
+
export function originIngressExtractPayload(envelope) {
|
|
267
|
+
const parsed = parseOriginPullRequestEvent({ envelope });
|
|
268
|
+
if (parsed === null) {
|
|
269
|
+
return envelope.event.payload;
|
|
270
|
+
}
|
|
271
|
+
return {
|
|
272
|
+
pullRequest: { number: parsed.ctx.pullRequestNumber },
|
|
273
|
+
repository: { fullName: parsed.ctx.repository.fullName },
|
|
274
|
+
};
|
|
275
|
+
}
|
|
264
276
|
export function defaultOriginTitle(ctx) {
|
|
265
277
|
return `Origin ${ctx.repository.fullName}#${ctx.pullRequestNumber}`;
|
|
266
278
|
}
|
|
@@ -371,6 +383,10 @@ function applyDispatch(input) {
|
|
|
371
383
|
* {@link handleAgentServeTrigger} fan-out. Signature verification is the
|
|
372
384
|
* caller's responsibility (HTTP route verifies; internal fan-out skips).
|
|
373
385
|
*/
|
|
386
|
+
/**
|
|
387
|
+
* Run authored Origin hooks and `send()`. Does not extract a v2 mailbox —
|
|
388
|
+
* the local CP (or hosted verified ingress) stamps before this runs.
|
|
389
|
+
*/
|
|
374
390
|
export function dispatchOriginWebhook(input) {
|
|
375
391
|
return __awaiter(this, void 0, void 0, function* () {
|
|
376
392
|
var _a;
|
|
@@ -379,15 +395,7 @@ export function dispatchOriginWebhook(input) {
|
|
|
379
395
|
if (parsed === null) {
|
|
380
396
|
return Response.json({ ok: false, error: "invalid_origin_payload" }, { status: 400 });
|
|
381
397
|
}
|
|
382
|
-
const
|
|
383
|
-
let args = input.args;
|
|
384
|
-
if (continuationSource(identity, "origin") === "control-plane") {
|
|
385
|
-
const mailbox = stampMailboxContinuation(identity, eventType, {
|
|
386
|
-
pullRequest: { number: parsed.ctx.pullRequestNumber },
|
|
387
|
-
repository: { fullName: parsed.ctx.repository.fullName },
|
|
388
|
-
});
|
|
389
|
-
args = Object.assign(Object.assign({}, input.args), { send: bindMailboxContinuationSend(input.args.send, mailbox) });
|
|
390
|
-
}
|
|
398
|
+
const args = input.args;
|
|
391
399
|
const ctx = enrichEventContext({
|
|
392
400
|
ctx: parsed.ctx,
|
|
393
401
|
args,
|
|
@@ -515,7 +523,12 @@ export function handleOriginWebhookRequest(input) {
|
|
|
515
523
|
return dispatchOriginWebhook({
|
|
516
524
|
options: input.options,
|
|
517
525
|
envelope,
|
|
518
|
-
args: input.args,
|
|
526
|
+
args: bindLocalIngressSend(input.args, {
|
|
527
|
+
identity: input.options.continuation,
|
|
528
|
+
kind: "origin",
|
|
529
|
+
eventType: envelope.event.type,
|
|
530
|
+
payload: originIngressExtractPayload(envelope),
|
|
531
|
+
}),
|
|
519
532
|
});
|
|
520
533
|
});
|
|
521
534
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/dispatch.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,KAAK,oBAAoB,
|
|
1
|
+
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../../src/channels/slack/dispatch.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,KAAK,oBAAoB,EAI1B,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EAEX,aAAa,EACd,MAAM,gBAAgB,CAAC;AAQxB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAK7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAS1D,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAM1D,OAAO,KAAK,EAEV,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAEhB,YAAY,EACZ,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAqDpB,uCAAuC;AACvC,wBAAgB,sBAAsB,CACpC,KAAK,GAAE,OAAO,CAAC,iBAAiB,CAAM,GACrC,iBAAiB,CAiBnB;AAED,MAAM,WAAW,wBAAyB,SAAQ,uBAAuB;IACvE,IAAI,EAAE,aAAa,CAAC;IACpB,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC/C,YAAY,EAAE,mBAAmB,CAAC;IAClC,eAAe,EAAE,mBAAmB,CAAC;IACrC,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,WAAW,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC1C,Q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O,CAAC,CAAC;IACxE,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,+EAA+E;IAC/E,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC,GAAG,OAAO,CAAC,IAAI,CAAC,CAuVhB;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CA4KT"}
|
|
@@ -10,7 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
|
-
import { continuationSource, normalizeIdentity,
|
|
13
|
+
import { continuationSource, normalizeIdentity, } from "../../internal/continuation-identity.js";
|
|
14
|
+
import { routeLocalIngressContinuation } from "../../internal/local-ingress.js";
|
|
14
15
|
import { buildSlackBinding, slackContinuationKey } from "./api.js";
|
|
15
16
|
import { firstLineTitle, maybeSetThreadTitle } from "./assistant.js";
|
|
16
17
|
import { appendSlackAttachmentAnnotations, prepareSlackAttachments, SLACK_ATTACHMENT_ONLY_PROMPT, } from "./attachments.js";
|
|
@@ -75,7 +76,16 @@ function slackSessionContinuation(identity, channelId, threadTs) {
|
|
|
75
76
|
const key = slackContinuationKey(channelId, threadTs);
|
|
76
77
|
return { probeKey: key, sendPatch: { continuationToken: key } };
|
|
77
78
|
}
|
|
78
|
-
const
|
|
79
|
+
const routed = routeLocalIngressContinuation({
|
|
80
|
+
identity: normalizeIdentity(identity, "slack"),
|
|
81
|
+
kind: "slack",
|
|
82
|
+
eventType: "message",
|
|
83
|
+
payload: { channelId, threadTs },
|
|
84
|
+
});
|
|
85
|
+
const mailbox = routed.mailboxContinuation;
|
|
86
|
+
if (mailbox === undefined) {
|
|
87
|
+
throw new Error("v2 slack ingress did not stamp a mailbox");
|
|
88
|
+
}
|
|
79
89
|
return { probeKey: mailbox.key, sendPatch: { mailboxContinuation: mailbox } };
|
|
80
90
|
}
|
|
81
91
|
export function dispatchInboundMessage(args) {
|
package/dist/docs/404.html
CHANGED
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
<link rel="preload stylesheet" href="/docs/assets/style.kTsvp4pE.css" as="style">
|
|
10
10
|
<link rel="preload stylesheet" href="/docs/vp-icons.css" as="style">
|
|
11
11
|
|
|
12
|
-
<script type="module" src="/docs/assets/app.
|
|
12
|
+
<script type="module" src="/docs/assets/app.DUOPbN18.js"></script>
|
|
13
13
|
<link rel="preload" href="/docs/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
14
14
|
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
|
15
15
|
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
|
18
18
|
<div id="app"></div>
|
|
19
|
-
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"DYjwREAP\",\"building-with-agents.md\":\"PeZaZA1P\",\"concepts.md\":\"BXAm6G-C\",\"deployment.md\":\"B8kW-h7P\",\"evals.md\":\"CVe_O75-\",\"example-agents_approval-buddy.md\":\"CIiZ9coo\",\"example-agents_benny.md\":\"B-LIDGja\",\"example-agents_bugbot.md\":\"Dp5JqHSQ\",\"example-agents_codebase-wiki.md\":\"D-lteFf0\",\"example-agents_codeowners-review.md\":\"BU2ZXLf-\",\"example-agents_concierge.md\":\"DA2al_NK\",\"example-agents_fsd.md\":\"ZeGEpAw_\",\"example-agents_index.md\":\"xmJ87d_3\",\"example-agents_knowledge-base.md\":\"IneynQSR\",\"example-agents_oncall.md\":\"CBmyuAKc\",\"example-agents_security-reviewer.md\":\"DBL1TwtP\",\"example-agents_slack-agent.md\":\"06jQXTAI\",\"example-agents_weather-agent.md\":\"DC3lINjo\",\"guides_agent-to-agent.md\":\"Bmbxy-FA\",\"guides_cloud-runtime.md\":\"CbklWfzh\",\"guides_convert-automation.md\":\"BhMzTkE5\",\"guides_github.md\":\"CLLQJKRB\",\"guides_human-in-the-loop.md\":\"Cf8kIIqC\",\"guides_mcp-oauth.md\":\"CzEB6RaG\",\"guides_opentelemetry.md\":\"Csn7ZI25\",\"guides_slack.md\":\"DP4H75WP\",\"guides_webhooks.md\":\"DB-r_er9\",\"hillclimbing.md\":\"yXqdlv2R\",\"index.md\":\"DhRHS_-L\",\"quickstart.md\":\"DZxBu44y\",\"reference_agent-config.md\":\"CTWp4DnU\",\"reference_artifacts.md\":\"BGG4bZo-\",\"reference_channels.md\":\"
|
|
19
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"DYjwREAP\",\"building-with-agents.md\":\"PeZaZA1P\",\"concepts.md\":\"BXAm6G-C\",\"deployment.md\":\"B8kW-h7P\",\"evals.md\":\"CVe_O75-\",\"example-agents_approval-buddy.md\":\"CIiZ9coo\",\"example-agents_benny.md\":\"B-LIDGja\",\"example-agents_bugbot.md\":\"Dp5JqHSQ\",\"example-agents_codebase-wiki.md\":\"D-lteFf0\",\"example-agents_codeowners-review.md\":\"BU2ZXLf-\",\"example-agents_concierge.md\":\"DA2al_NK\",\"example-agents_fsd.md\":\"ZeGEpAw_\",\"example-agents_index.md\":\"xmJ87d_3\",\"example-agents_knowledge-base.md\":\"IneynQSR\",\"example-agents_oncall.md\":\"CBmyuAKc\",\"example-agents_security-reviewer.md\":\"DBL1TwtP\",\"example-agents_slack-agent.md\":\"06jQXTAI\",\"example-agents_weather-agent.md\":\"DC3lINjo\",\"guides_agent-to-agent.md\":\"Bmbxy-FA\",\"guides_cloud-runtime.md\":\"CbklWfzh\",\"guides_convert-automation.md\":\"BhMzTkE5\",\"guides_github.md\":\"CLLQJKRB\",\"guides_human-in-the-loop.md\":\"Cf8kIIqC\",\"guides_mcp-oauth.md\":\"CzEB6RaG\",\"guides_opentelemetry.md\":\"Csn7ZI25\",\"guides_slack.md\":\"DP4H75WP\",\"guides_webhooks.md\":\"DB-r_er9\",\"hillclimbing.md\":\"yXqdlv2R\",\"index.md\":\"DhRHS_-L\",\"quickstart.md\":\"DZxBu44y\",\"reference_agent-config.md\":\"CTWp4DnU\",\"reference_artifacts.md\":\"BGG4bZo-\",\"reference_channels.md\":\"CboFd5IH\",\"reference_cli.md\":\"TAaYU8br\",\"reference_connections.md\":\"Cu3N-S3Q\",\"reference_hooks.md\":\"DJE5DXcT\",\"reference_http-api.md\":\"DMbdFGVQ\",\"reference_instructions.md\":\"CgoV-YEb\",\"reference_playground.md\":\"CPZhfYaO\",\"reference_project-layout.md\":\"D3MdHM2z\",\"reference_prompt.md\":\"BaiweQxE\",\"reference_schedules.md\":\"gmfYzf_I\",\"reference_sessions.md\":\"B0DdlM-K\",\"reference_skills.md\":\"BRF2nDv9\",\"reference_subagents.md\":\"DSrGLIuB\",\"reference_tools.md\":\"DTg_kEsx\",\"scaffolding-agents.md\":\"CiGsJ1aw\",\"storage.md\":\"ks1u64_R\",\"templates_agentic-owners.md\":\"BkTLORaU\",\"templates_demo.md\":\"Bgd6MBaZ\",\"templates_pr-autofixer.md\":\"DcmoeUNZ\",\"templates_security-reviewer.md\":\"C0yIUaYs\",\"templates_triage.md\":\"DWuQ1bZz\",\"troubleshooting.md\":\"KgmmaCgw\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Agent SDK\",\"description\":\"Filesystem-first framework for building and serving Cursor agents.\",\"base\":\"/docs/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Quickstart\",\"link\":\"/quickstart\"},{\"text\":\"Guides\",\"link\":\"/guides/webhooks\"},{\"text\":\"Examples\",\"link\":\"/example-agents/\"},{\"text\":\"Reference\",\"link\":\"/reference/project-layout\"}],\"search\":{\"provider\":\"local\"},\"outline\":{\"level\":[2,3]},\"sidebar\":[{\"text\":\"Getting started\",\"items\":[{\"text\":\"Overview\",\"link\":\"/\"},{\"text\":\"Quickstart\",\"link\":\"/quickstart\"},{\"text\":\"Scaffold an agent with Cursor\",\"link\":\"/scaffolding-agents\"},{\"text\":\"Convert a Cursor Automation\",\"link\":\"/guides/convert-automation\"},{\"text\":\"Concepts\",\"link\":\"/concepts\"}]},{\"text\":\"Templates\",\"items\":[{\"text\":\"Demo agent\",\"link\":\"/templates/demo\"},{\"text\":\"Security reviewer\",\"link\":\"/templates/security-reviewer\"},{\"text\":\"Agentic Owners\",\"link\":\"/templates/agentic-owners\"},{\"text\":\"PR autofixer\",\"link\":\"/templates/pr-autofixer\"},{\"text\":\"Triage agent\",\"link\":\"/templates/triage\"}]},{\"text\":\"Improving agents\",\"items\":[{\"text\":\"Building agents with agents\",\"link\":\"/building-with-agents\"},{\"text\":\"Evals\",\"link\":\"/evals\"},{\"text\":\"Live A/B metrics\",\"link\":\"/ab\"},{\"text\":\"Storage\",\"link\":\"/storage\"},{\"text\":\"Hillclimbing\",\"link\":\"/hillclimbing\"}]},{\"text\":\"Guides\",\"items\":[{\"text\":\"Webhooks & custom channels\",\"link\":\"/guides/webhooks\"},{\"text\":\"GitHub\",\"link\":\"/guides/github\"},{\"text\":\"Slack\",\"link\":\"/guides/slack\"},{\"text\":\"Human-in-the-loop approvals\",\"link\":\"/guides/human-in-the-loop\"},{\"text\":\"Agent-to-agent\",\"link\":\"/guides/agent-to-agent\"},{\"text\":\"Host MCP OAuth\",\"link\":\"/guides/mcp-oauth\"},{\"text\":\"Cloud runtime\",\"link\":\"/guides/cloud-runtime\"},{\"text\":\"OpenTelemetry\",\"link\":\"/guides/opentelemetry\"}]},{\"text\":\"Example agents\",\"items\":[{\"text\":\"Choose an example\",\"link\":\"/example-agents/\"},{\"text\":\"Weather agent\",\"link\":\"/example-agents/weather-agent\"},{\"text\":\"Slack agent\",\"link\":\"/example-agents/slack-agent\"},{\"text\":\"Concierge\",\"link\":\"/example-agents/concierge\"},{\"text\":\"Playbook router\",\"link\":\"/example-agents/benny\"},{\"text\":\"Alert investigator\",\"link\":\"/example-agents/oncall\"},{\"text\":\"PR evidence reviewer\",\"link\":\"/example-agents/bugbot\"},{\"text\":\"Approval Buddy\",\"link\":\"/example-agents/approval-buddy\"},{\"text\":\"Security Reviewer\",\"link\":\"/example-agents/security-reviewer\"},{\"text\":\"Remote PR coordinator\",\"link\":\"/example-agents/fsd\"},{\"text\":\"Knowledge base\",\"link\":\"/example-agents/knowledge-base\"},{\"text\":\"Codebase wiki\",\"link\":\"/example-agents/codebase-wiki\"},{\"text\":\"Codeowners review\",\"link\":\"/example-agents/codeowners-review\"}]},{\"text\":\"Operating\",\"items\":[{\"text\":\"Deployment\",\"link\":\"/deployment\"},{\"text\":\"Fix common problems\",\"link\":\"/troubleshooting\"}]},{\"text\":\"Reference\",\"collapsed\":false,\"items\":[{\"text\":\"Project layout\",\"link\":\"/reference/project-layout\"},{\"text\":\"Agent config\",\"link\":\"/reference/agent-config\"},{\"text\":\"Instructions\",\"link\":\"/reference/instructions\"},{\"text\":\"Tools\",\"link\":\"/reference/tools\"},{\"text\":\"prompt\",\"link\":\"/reference/prompt\"},{\"text\":\"Skills\",\"link\":\"/reference/skills\"},{\"text\":\"MCP Connections\",\"link\":\"/reference/connections\"},{\"text\":\"Subagents\",\"link\":\"/reference/subagents\"},{\"text\":\"Channels\",\"link\":\"/reference/channels\"},{\"text\":\"Schedules & reminders\",\"link\":\"/reference/schedules\"},{\"text\":\"Hooks\",\"link\":\"/reference/hooks\"},{\"text\":\"Artifacts\",\"link\":\"/reference/artifacts\"},{\"text\":\"Sessions & streaming\",\"link\":\"/reference/sessions\"},{\"text\":\"Playground\",\"link\":\"/reference/playground\"},{\"text\":\"CLI\",\"link\":\"/reference/cli\"},{\"text\":\"HTTP API\",\"link\":\"/reference/http-api\"}]}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
|
20
20
|
|
|
21
21
|
</body>
|
|
22
22
|
</html>
|
package/dist/docs/ab.html
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
<link rel="preload stylesheet" href="/docs/assets/style.kTsvp4pE.css" as="style">
|
|
10
10
|
<link rel="preload stylesheet" href="/docs/vp-icons.css" as="style">
|
|
11
11
|
|
|
12
|
-
<script type="module" src="/docs/assets/app.
|
|
12
|
+
<script type="module" src="/docs/assets/app.DUOPbN18.js"></script>
|
|
13
13
|
<link rel="preload" href="/docs/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
14
|
-
<link rel="modulepreload" href="/docs/assets/chunks/theme.
|
|
14
|
+
<link rel="modulepreload" href="/docs/assets/chunks/theme.S57OeOLA.js">
|
|
15
15
|
<link rel="modulepreload" href="/docs/assets/chunks/framework.CAZyNGu9.js">
|
|
16
16
|
<link rel="modulepreload" href="/docs/assets/ab.md.DYjwREAP.lean.js">
|
|
17
17
|
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Optional — defaults to 200. Only affects GET /v1/abs / A/Bs tab.</span></span>
|
|
73
73
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> maxPlaygroundSessions: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">500</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
74
74
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p><code>maxPlaygroundSessions</code> keeps the newest sessions in the fold. It does not prune session logs or change assignment. For export to S3, a DB, or your metrics vendor, send samples from <code>onSample</code> or declare a storage <code>abs</code> table.</p><h2 id="keep-assignments-durable" tabindex="-1">Keep assignments durable <a class="header-anchor" href="#keep-assignments-durable" aria-label="Permalink to "Keep assignments durable""></a></h2><p>The append-only <code>events.ndjson</code> stream is the source of truth. Each <code>ab.assigned</code> event persists a variant key or null skip. Built-in metrics come from the turn and tool events that follow it.</p><p>After a server restart or a parked session resumes, the live collector replays the stream to rebuild cumulative counters. Replay does not call <code>onSample</code> (or write to the storage <code>abs</code> table) for historical turns. Only a new completed or failed turn emits another sample.</p><p>The snapshot API also replays <code>derive</code> across the full stream, so custom totals match the current extractor. Changing a derive function can change historical snapshot totals. Treat metric definitions as versioned experiment code.</p><h2 id="keep-eval-traffic-separate" tabindex="-1">Keep eval traffic separate <a class="header-anchor" href="#keep-eval-traffic-separate" aria-label="Permalink to "Keep eval traffic separate""></a></h2><p>Sessions created by <code>agent-sdk eval</code> and the playground Evals runner use <code>purpose: "eval"</code>. They skip A/B enrollment entirely:</p><ul><li>No split function runs.</li><li>No <code>ab.assigned</code> event is recorded.</li><li>No <code>onSample</code> callback fires.</li><li>The session is omitted from <code>GET /v1/abs</code>.</li></ul><p>Ordinary chat, <code>agent-sdk run</code>, Slack, GitHub, and other channel sessions use the live purpose. You do not need <code>splitIf</code> to exclude eval traffic.</p><h2 id="know-the-boundaries" tabindex="-1">Know the boundaries <a class="header-anchor" href="#know-the-boundaries" aria-label="Permalink to "Know the boundaries""></a></h2><p><code>defineAB</code> provides sticky assignment, variant instructions, <code>session.abs</code> for tools, cumulative metrics, and local inspection. It does not provide:</p><ul><li>A test command, assertion API, or pass/fail result</li><li>Statistical significance calculations</li><li>An experiment rollout or lifecycle service</li><li>Per-variant model or runtime configuration</li><li>A built-in analytics warehouse (bring your own via <code>onSample</code> or the storage <code>abs</code> table)</li></ul><p>Use <a href="./evals.html">evals</a> to protect known behavior. Use <code>onSample</code> or a storage <code>abs</code> table when you need sample/snapshot exports beyond the session event log.</p><h2 id="what-s-next" tabindex="-1">What's next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to "What's next""></a></h2><p>Continue with these pages:</p><ul><li><a href="./evals.html">Evals</a>: pass/fail regression checks on fixed inputs</li><li><a href="./hillclimbing.html">Hillclimbing</a>: improve an agent against fixed fixtures</li><li><a href="./reference/hooks.html">Hooks</a>: other event-stream consumers</li><li><a href="./reference/sessions.html">Sessions and streaming</a>: the <code>ab.assigned</code> event and durable log</li><li><a href="./reference/playground.html">Playground</a>: the A/Bs tab</li><li><a href="./reference/http-api.html">HTTP API</a>: <code>GET /v1/abs</code></li><li><a href="./../skills/ab/SKILL.html">Live A/B metrics skill</a>: have a coding agent wire an experiment</li></ul></div></div></main><footer class="VPDocFooter" data-v-2e506a34 data-v-574f06fa><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-574f06fa><span class="visually-hidden" id="doc-footer-aria-label" data-v-574f06fa>Pager</span><div class="pager" data-v-574f06fa><a class="VPLink link pager-link prev" href="/docs/evals.html" data-v-574f06fa><!--[--><span class="desc" data-v-574f06fa>Previous page</span><span class="title" data-v-574f06fa>Evals</span><!--]--></a></div><div class="pager" data-v-574f06fa><a class="VPLink link pager-link next" href="/docs/storage.html" data-v-574f06fa><!--[--><span class="desc" data-v-574f06fa>Next page</span><span class="title" data-v-574f06fa>Storage</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
|
75
|
-
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"DYjwREAP\",\"building-with-agents.md\":\"PeZaZA1P\",\"concepts.md\":\"BXAm6G-C\",\"deployment.md\":\"B8kW-h7P\",\"evals.md\":\"CVe_O75-\",\"example-agents_approval-buddy.md\":\"CIiZ9coo\",\"example-agents_benny.md\":\"B-LIDGja\",\"example-agents_bugbot.md\":\"Dp5JqHSQ\",\"example-agents_codebase-wiki.md\":\"D-lteFf0\",\"example-agents_codeowners-review.md\":\"BU2ZXLf-\",\"example-agents_concierge.md\":\"DA2al_NK\",\"example-agents_fsd.md\":\"ZeGEpAw_\",\"example-agents_index.md\":\"xmJ87d_3\",\"example-agents_knowledge-base.md\":\"IneynQSR\",\"example-agents_oncall.md\":\"CBmyuAKc\",\"example-agents_security-reviewer.md\":\"DBL1TwtP\",\"example-agents_slack-agent.md\":\"06jQXTAI\",\"example-agents_weather-agent.md\":\"DC3lINjo\",\"guides_agent-to-agent.md\":\"Bmbxy-FA\",\"guides_cloud-runtime.md\":\"CbklWfzh\",\"guides_convert-automation.md\":\"BhMzTkE5\",\"guides_github.md\":\"CLLQJKRB\",\"guides_human-in-the-loop.md\":\"Cf8kIIqC\",\"guides_mcp-oauth.md\":\"CzEB6RaG\",\"guides_opentelemetry.md\":\"Csn7ZI25\",\"guides_slack.md\":\"DP4H75WP\",\"guides_webhooks.md\":\"DB-r_er9\",\"hillclimbing.md\":\"yXqdlv2R\",\"index.md\":\"DhRHS_-L\",\"quickstart.md\":\"DZxBu44y\",\"reference_agent-config.md\":\"CTWp4DnU\",\"reference_artifacts.md\":\"BGG4bZo-\",\"reference_channels.md\":\"
|
|
75
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"ab.md\":\"DYjwREAP\",\"building-with-agents.md\":\"PeZaZA1P\",\"concepts.md\":\"BXAm6G-C\",\"deployment.md\":\"B8kW-h7P\",\"evals.md\":\"CVe_O75-\",\"example-agents_approval-buddy.md\":\"CIiZ9coo\",\"example-agents_benny.md\":\"B-LIDGja\",\"example-agents_bugbot.md\":\"Dp5JqHSQ\",\"example-agents_codebase-wiki.md\":\"D-lteFf0\",\"example-agents_codeowners-review.md\":\"BU2ZXLf-\",\"example-agents_concierge.md\":\"DA2al_NK\",\"example-agents_fsd.md\":\"ZeGEpAw_\",\"example-agents_index.md\":\"xmJ87d_3\",\"example-agents_knowledge-base.md\":\"IneynQSR\",\"example-agents_oncall.md\":\"CBmyuAKc\",\"example-agents_security-reviewer.md\":\"DBL1TwtP\",\"example-agents_slack-agent.md\":\"06jQXTAI\",\"example-agents_weather-agent.md\":\"DC3lINjo\",\"guides_agent-to-agent.md\":\"Bmbxy-FA\",\"guides_cloud-runtime.md\":\"CbklWfzh\",\"guides_convert-automation.md\":\"BhMzTkE5\",\"guides_github.md\":\"CLLQJKRB\",\"guides_human-in-the-loop.md\":\"Cf8kIIqC\",\"guides_mcp-oauth.md\":\"CzEB6RaG\",\"guides_opentelemetry.md\":\"Csn7ZI25\",\"guides_slack.md\":\"DP4H75WP\",\"guides_webhooks.md\":\"DB-r_er9\",\"hillclimbing.md\":\"yXqdlv2R\",\"index.md\":\"DhRHS_-L\",\"quickstart.md\":\"DZxBu44y\",\"reference_agent-config.md\":\"CTWp4DnU\",\"reference_artifacts.md\":\"BGG4bZo-\",\"reference_channels.md\":\"CboFd5IH\",\"reference_cli.md\":\"TAaYU8br\",\"reference_connections.md\":\"Cu3N-S3Q\",\"reference_hooks.md\":\"DJE5DXcT\",\"reference_http-api.md\":\"DMbdFGVQ\",\"reference_instructions.md\":\"CgoV-YEb\",\"reference_playground.md\":\"CPZhfYaO\",\"reference_project-layout.md\":\"D3MdHM2z\",\"reference_prompt.md\":\"BaiweQxE\",\"reference_schedules.md\":\"gmfYzf_I\",\"reference_sessions.md\":\"B0DdlM-K\",\"reference_skills.md\":\"BRF2nDv9\",\"reference_subagents.md\":\"DSrGLIuB\",\"reference_tools.md\":\"DTg_kEsx\",\"scaffolding-agents.md\":\"CiGsJ1aw\",\"storage.md\":\"ks1u64_R\",\"templates_agentic-owners.md\":\"BkTLORaU\",\"templates_demo.md\":\"Bgd6MBaZ\",\"templates_pr-autofixer.md\":\"DcmoeUNZ\",\"templates_security-reviewer.md\":\"C0yIUaYs\",\"templates_triage.md\":\"DWuQ1bZz\",\"troubleshooting.md\":\"KgmmaCgw\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Agent SDK\",\"description\":\"Filesystem-first framework for building and serving Cursor agents.\",\"base\":\"/docs/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Quickstart\",\"link\":\"/quickstart\"},{\"text\":\"Guides\",\"link\":\"/guides/webhooks\"},{\"text\":\"Examples\",\"link\":\"/example-agents/\"},{\"text\":\"Reference\",\"link\":\"/reference/project-layout\"}],\"search\":{\"provider\":\"local\"},\"outline\":{\"level\":[2,3]},\"sidebar\":[{\"text\":\"Getting started\",\"items\":[{\"text\":\"Overview\",\"link\":\"/\"},{\"text\":\"Quickstart\",\"link\":\"/quickstart\"},{\"text\":\"Scaffold an agent with Cursor\",\"link\":\"/scaffolding-agents\"},{\"text\":\"Convert a Cursor Automation\",\"link\":\"/guides/convert-automation\"},{\"text\":\"Concepts\",\"link\":\"/concepts\"}]},{\"text\":\"Templates\",\"items\":[{\"text\":\"Demo agent\",\"link\":\"/templates/demo\"},{\"text\":\"Security reviewer\",\"link\":\"/templates/security-reviewer\"},{\"text\":\"Agentic Owners\",\"link\":\"/templates/agentic-owners\"},{\"text\":\"PR autofixer\",\"link\":\"/templates/pr-autofixer\"},{\"text\":\"Triage agent\",\"link\":\"/templates/triage\"}]},{\"text\":\"Improving agents\",\"items\":[{\"text\":\"Building agents with agents\",\"link\":\"/building-with-agents\"},{\"text\":\"Evals\",\"link\":\"/evals\"},{\"text\":\"Live A/B metrics\",\"link\":\"/ab\"},{\"text\":\"Storage\",\"link\":\"/storage\"},{\"text\":\"Hillclimbing\",\"link\":\"/hillclimbing\"}]},{\"text\":\"Guides\",\"items\":[{\"text\":\"Webhooks & custom channels\",\"link\":\"/guides/webhooks\"},{\"text\":\"GitHub\",\"link\":\"/guides/github\"},{\"text\":\"Slack\",\"link\":\"/guides/slack\"},{\"text\":\"Human-in-the-loop approvals\",\"link\":\"/guides/human-in-the-loop\"},{\"text\":\"Agent-to-agent\",\"link\":\"/guides/agent-to-agent\"},{\"text\":\"Host MCP OAuth\",\"link\":\"/guides/mcp-oauth\"},{\"text\":\"Cloud runtime\",\"link\":\"/guides/cloud-runtime\"},{\"text\":\"OpenTelemetry\",\"link\":\"/guides/opentelemetry\"}]},{\"text\":\"Example agents\",\"items\":[{\"text\":\"Choose an example\",\"link\":\"/example-agents/\"},{\"text\":\"Weather agent\",\"link\":\"/example-agents/weather-agent\"},{\"text\":\"Slack agent\",\"link\":\"/example-agents/slack-agent\"},{\"text\":\"Concierge\",\"link\":\"/example-agents/concierge\"},{\"text\":\"Playbook router\",\"link\":\"/example-agents/benny\"},{\"text\":\"Alert investigator\",\"link\":\"/example-agents/oncall\"},{\"text\":\"PR evidence reviewer\",\"link\":\"/example-agents/bugbot\"},{\"text\":\"Approval Buddy\",\"link\":\"/example-agents/approval-buddy\"},{\"text\":\"Security Reviewer\",\"link\":\"/example-agents/security-reviewer\"},{\"text\":\"Remote PR coordinator\",\"link\":\"/example-agents/fsd\"},{\"text\":\"Knowledge base\",\"link\":\"/example-agents/knowledge-base\"},{\"text\":\"Codebase wiki\",\"link\":\"/example-agents/codebase-wiki\"},{\"text\":\"Codeowners review\",\"link\":\"/example-agents/codeowners-review\"}]},{\"text\":\"Operating\",\"items\":[{\"text\":\"Deployment\",\"link\":\"/deployment\"},{\"text\":\"Fix common problems\",\"link\":\"/troubleshooting\"}]},{\"text\":\"Reference\",\"collapsed\":false,\"items\":[{\"text\":\"Project layout\",\"link\":\"/reference/project-layout\"},{\"text\":\"Agent config\",\"link\":\"/reference/agent-config\"},{\"text\":\"Instructions\",\"link\":\"/reference/instructions\"},{\"text\":\"Tools\",\"link\":\"/reference/tools\"},{\"text\":\"prompt\",\"link\":\"/reference/prompt\"},{\"text\":\"Skills\",\"link\":\"/reference/skills\"},{\"text\":\"MCP Connections\",\"link\":\"/reference/connections\"},{\"text\":\"Subagents\",\"link\":\"/reference/subagents\"},{\"text\":\"Channels\",\"link\":\"/reference/channels\"},{\"text\":\"Schedules & reminders\",\"link\":\"/reference/schedules\"},{\"text\":\"Hooks\",\"link\":\"/reference/hooks\"},{\"text\":\"Artifacts\",\"link\":\"/reference/artifacts\"},{\"text\":\"Sessions & streaming\",\"link\":\"/reference/sessions\"},{\"text\":\"Playground\",\"link\":\"/reference/playground\"},{\"text\":\"CLI\",\"link\":\"/reference/cli\"},{\"text\":\"HTTP API\",\"link\":\"/reference/http-api\"}]}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
|
76
76
|
|
|
77
77
|
</body>
|
|
78
78
|
</html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as p}from"./chunks/theme.
|
|
1
|
+
import{t as p}from"./chunks/theme.S57OeOLA.js";import{R as s,a2 as i,a3 as u,a4 as c,a5 as l,a6 as f,a7 as d,a8 as m,a9 as h,aa as g,ab as A,d as v,u as y,v as C,s as P,ac as b,ad as w,ae as R,af as E}from"./chunks/framework.CAZyNGu9.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{P(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),R(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function _(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp};
|