@cursor/july 0.1.62 → 0.1.68

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.
Files changed (180) hide show
  1. package/dist/bin/agent-serve.js +8 -0
  2. package/dist/channels/slack/channel-watch.d.ts +2 -1
  3. package/dist/channels/slack/channel-watch.d.ts.map +1 -1
  4. package/dist/channels/slack/channel-watch.js +7 -3
  5. package/dist/channels/slack/dispatch.d.ts +9 -0
  6. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  7. package/dist/channels/slack/dispatch.js +41 -21
  8. package/dist/channels/slack/manifest.d.ts.map +1 -1
  9. package/dist/channels/slack/manifest.js +1 -0
  10. package/dist/channels/slack/nudge-store.d.ts +16 -0
  11. package/dist/channels/slack/nudge-store.d.ts.map +1 -1
  12. package/dist/channels/slack/nudge-store.js +53 -0
  13. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  14. package/dist/channels/slack/slack-channel.js +4 -1
  15. package/dist/channels/slack/types.d.ts +22 -5
  16. package/dist/channels/slack/types.d.ts.map +1 -1
  17. package/dist/docs/404.html +2 -2
  18. package/dist/docs/ab.html +3 -3
  19. package/dist/docs/assets/{app.B-biogkN.js → app.C5XUTCw9.js} +1 -1
  20. package/dist/docs/assets/chunks/@localSearchIndexroot.DvUR3lv9.js +1 -0
  21. package/dist/docs/assets/chunks/{VPLocalSearchBox.DZqKtFZS.js → VPLocalSearchBox.CGDTAYHY.js} +1 -1
  22. package/dist/docs/assets/chunks/{theme.BwC5zP2r.js → theme.lPixh250.js} +2 -2
  23. package/dist/docs/assets/{reference_connections.md.CSQiNzre.js → reference_connections.md.Bwswbm6H.js} +13 -3
  24. package/dist/docs/assets/{reference_connections.md.CSQiNzre.lean.js → reference_connections.md.Bwswbm6H.lean.js} +1 -1
  25. package/dist/docs/assets/{reference_tools.md.kJfJAP2m.js → reference_tools.md.Wmvb7Lob.js} +2 -2
  26. package/dist/docs/assets/{reference_tools.md.kJfJAP2m.lean.js → reference_tools.md.Wmvb7Lob.lean.js} +1 -1
  27. package/dist/docs/building-with-agents.html +3 -3
  28. package/dist/docs/concepts.html +3 -3
  29. package/dist/docs/deployment.html +3 -3
  30. package/dist/docs/evals.html +3 -3
  31. package/dist/docs/example-agents/approval-buddy.html +3 -3
  32. package/dist/docs/example-agents/benny.html +3 -3
  33. package/dist/docs/example-agents/bugbot.html +3 -3
  34. package/dist/docs/example-agents/codebase-wiki.html +3 -3
  35. package/dist/docs/example-agents/codeowners-review.html +3 -3
  36. package/dist/docs/example-agents/concierge.html +3 -3
  37. package/dist/docs/example-agents/fsd.html +3 -3
  38. package/dist/docs/example-agents/index.html +3 -3
  39. package/dist/docs/example-agents/knowledge-base.html +3 -3
  40. package/dist/docs/example-agents/oncall.html +3 -3
  41. package/dist/docs/example-agents/security-reviewer.html +3 -3
  42. package/dist/docs/example-agents/slack-agent.html +3 -3
  43. package/dist/docs/example-agents/weather-agent.html +3 -3
  44. package/dist/docs/guides/agent-to-agent.html +3 -3
  45. package/dist/docs/guides/cloud-runtime.html +3 -3
  46. package/dist/docs/guides/convert-automation.html +3 -3
  47. package/dist/docs/guides/github.html +3 -3
  48. package/dist/docs/guides/human-in-the-loop.html +3 -3
  49. package/dist/docs/guides/mcp-oauth.html +3 -3
  50. package/dist/docs/guides/opentelemetry.html +3 -3
  51. package/dist/docs/guides/slack.html +3 -3
  52. package/dist/docs/guides/webhooks.html +3 -3
  53. package/dist/docs/hashmap.json +1 -1
  54. package/dist/docs/hillclimbing.html +3 -3
  55. package/dist/docs/index.html +3 -3
  56. package/dist/docs/quickstart.html +3 -3
  57. package/dist/docs/reference/agent-config.html +3 -3
  58. package/dist/docs/reference/artifacts.html +3 -3
  59. package/dist/docs/reference/channels.html +3 -3
  60. package/dist/docs/reference/cli.html +3 -3
  61. package/dist/docs/reference/connections.html +15 -5
  62. package/dist/docs/reference/hooks.html +3 -3
  63. package/dist/docs/reference/http-api.html +3 -3
  64. package/dist/docs/reference/instructions.html +3 -3
  65. package/dist/docs/reference/playground.html +3 -3
  66. package/dist/docs/reference/project-layout.html +3 -3
  67. package/dist/docs/reference/prompt.html +3 -3
  68. package/dist/docs/reference/schedules.html +3 -3
  69. package/dist/docs/reference/sessions.html +3 -3
  70. package/dist/docs/reference/skills.html +3 -3
  71. package/dist/docs/reference/subagents.html +3 -3
  72. package/dist/docs/reference/tools.html +5 -5
  73. package/dist/docs/scaffolding-agents.html +3 -3
  74. package/dist/docs/storage.html +3 -3
  75. package/dist/docs/templates/agentic-owners.html +3 -3
  76. package/dist/docs/templates/demo.html +3 -3
  77. package/dist/docs/templates/pr-autofixer.html +3 -3
  78. package/dist/docs/templates/security-reviewer.html +3 -3
  79. package/dist/docs/templates/triage.html +3 -3
  80. package/dist/docs/troubleshooting.html +3 -3
  81. package/dist/files-backends/agent-store-presigned-url.js +1 -1
  82. package/dist/index.d.ts +2 -2
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/index.js +1 -1
  85. package/dist/internal/advertise-tools.d.ts +74 -0
  86. package/dist/internal/advertise-tools.d.ts.map +1 -0
  87. package/dist/internal/advertise-tools.js +152 -0
  88. package/dist/internal/cli-deploy.d.ts.map +1 -1
  89. package/dist/internal/cli-deploy.js +11 -3
  90. package/dist/internal/cli-manifest.d.ts +19 -0
  91. package/dist/internal/cli-manifest.d.ts.map +1 -0
  92. package/dist/internal/cli-manifest.js +49 -0
  93. package/dist/internal/cli-slack.d.ts.map +1 -1
  94. package/dist/internal/cli-slack.js +9 -1
  95. package/dist/internal/cursor-agent-template.d.ts +9 -0
  96. package/dist/internal/cursor-agent-template.d.ts.map +1 -0
  97. package/dist/internal/cursor-agent-template.js +37 -0
  98. package/dist/internal/deploy-client.d.ts +8 -0
  99. package/dist/internal/deploy-client.d.ts.map +1 -1
  100. package/dist/internal/deploy-client.js +21 -3
  101. package/dist/internal/deploy-manifest.d.ts +85 -0
  102. package/dist/internal/deploy-manifest.d.ts.map +1 -0
  103. package/dist/internal/deploy-manifest.js +106 -0
  104. package/dist/internal/deployment-scm-event-stream.d.ts +113 -0
  105. package/dist/internal/deployment-scm-event-stream.d.ts.map +1 -0
  106. package/dist/internal/deployment-scm-event-stream.js +460 -0
  107. package/dist/internal/discovery.d.ts.map +1 -1
  108. package/dist/internal/discovery.js +69 -0
  109. package/dist/internal/init-project.d.ts.map +1 -1
  110. package/dist/internal/init-project.js +5 -17
  111. package/dist/internal/mcp-host.d.ts +18 -0
  112. package/dist/internal/mcp-host.d.ts.map +1 -1
  113. package/dist/internal/mcp-host.js +41 -5
  114. package/dist/internal/sdk-runner.d.ts +1 -1
  115. package/dist/internal/sdk-runner.d.ts.map +1 -1
  116. package/dist/internal/sdk-runner.js +36 -13
  117. package/dist/internal/server.d.ts.map +1 -1
  118. package/dist/internal/server.js +18 -0
  119. package/dist/internal/session-engine.d.ts +66 -0
  120. package/dist/internal/session-engine.d.ts.map +1 -1
  121. package/dist/internal/session-engine.js +430 -110
  122. package/dist/internal/shallow-clone.d.ts +115 -0
  123. package/dist/internal/shallow-clone.d.ts.map +1 -0
  124. package/dist/internal/shallow-clone.js +292 -0
  125. package/dist/internal/slack-provision-client.d.ts +2 -0
  126. package/dist/internal/slack-provision-client.d.ts.map +1 -1
  127. package/dist/internal/slack-provision-client.js +1 -0
  128. package/dist/internal/turn-lease-store.d.ts +44 -0
  129. package/dist/internal/turn-lease-store.d.ts.map +1 -0
  130. package/dist/internal/turn-lease-store.js +139 -0
  131. package/dist/internal/workspace.d.ts +12 -0
  132. package/dist/internal/workspace.d.ts.map +1 -1
  133. package/dist/internal/workspace.js +28 -0
  134. package/dist/playground/assets/index-CoL7xCJl.css +1 -0
  135. package/dist/playground/assets/index-yxs1heea.js +85 -0
  136. package/dist/playground/index.html +2 -2
  137. package/dist/storage-protocol.d.ts +122 -0
  138. package/dist/storage-protocol.d.ts.map +1 -0
  139. package/dist/storage-protocol.js +173 -0
  140. package/dist/storage.d.ts +2 -72
  141. package/dist/storage.d.ts.map +1 -1
  142. package/dist/storage.js +2 -82
  143. package/dist/types.d.ts +113 -3
  144. package/dist/types.d.ts.map +1 -1
  145. package/docs/reference/connections.md +80 -0
  146. package/docs/reference/tools.md +14 -0
  147. package/package.json +4 -2
  148. package/src/bin/agent-serve.ts +9 -0
  149. package/src/channels/slack/channel-watch.ts +6 -3
  150. package/src/channels/slack/dispatch.ts +40 -3
  151. package/src/channels/slack/manifest.ts +1 -0
  152. package/src/channels/slack/nudge-store.ts +56 -0
  153. package/src/channels/slack/slack-channel.ts +3 -0
  154. package/src/channels/slack/types.ts +22 -5
  155. package/src/index.ts +5 -0
  156. package/src/internal/advertise-tools.ts +229 -0
  157. package/src/internal/cli-deploy.ts +22 -1
  158. package/src/internal/cli-manifest.ts +63 -0
  159. package/src/internal/cli-slack.ts +10 -1
  160. package/src/internal/cursor-agent-template.ts +46 -0
  161. package/src/internal/deploy-client.ts +35 -6
  162. package/src/internal/deploy-manifest.ts +167 -0
  163. package/src/internal/deployment-scm-event-stream.ts +577 -0
  164. package/src/internal/discovery.ts +85 -0
  165. package/src/internal/init-project.ts +11 -20
  166. package/src/internal/mcp-host.ts +66 -9
  167. package/src/internal/sdk-runner.ts +50 -11
  168. package/src/internal/server.ts +19 -0
  169. package/src/internal/session-engine.ts +385 -19
  170. package/src/internal/shallow-clone.ts +407 -0
  171. package/src/internal/slack-provision-client.ts +3 -0
  172. package/src/internal/turn-lease-store.ts +147 -0
  173. package/src/internal/workspace.ts +27 -0
  174. package/src/storage-protocol.ts +247 -0
  175. package/src/storage.ts +16 -110
  176. package/src/types.ts +117 -3
  177. package/templates/pr-autofixer/agent/lib/drive-schemas.ts +4 -1
  178. package/dist/docs/assets/chunks/@localSearchIndexroot.5ozYNf74.js +0 -1
  179. package/dist/playground/assets/index-B4rcOgeP.css +0 -1
  180. package/dist/playground/assets/index-DXcY42Jv.js +0 -85
@@ -0,0 +1,49 @@
1
+ /**
2
+ * `july manifest` — print the offline deploy manifest (Wd-1 of
3
+ * `docs/agent-serve/agent-sdk-event-ingress-plan.md`).
4
+ *
5
+ * Loads the agent project from disk and emits the statically-derived
6
+ * metadata the control plane stores at deploy time: declared GitHub webhook
7
+ * events, egress domains, public routes, and the full `/v1/info` payload.
8
+ * Runs entirely offline — no VM, no engine, no network.
9
+ */
10
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
11
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
12
+ return new (P || (P = Promise))(function (resolve, reject) {
13
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
14
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
15
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
16
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
17
+ });
18
+ };
19
+ import { buildAgentDeployManifest, parseAgentDeployManifest, } from "./deploy-manifest.js";
20
+ import { isAgentProjectDir, loadAgentProject } from "./discovery.js";
21
+ export function cmdManifest(options) {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ var _a, _b;
24
+ const out = (_a = options.out) !== null && _a !== void 0 ? _a : ((line) => process.stdout.write(line));
25
+ const err = (_b = options.err) !== null && _b !== void 0 ? _b : ((line) => process.stderr.write(line));
26
+ if (!(yield isAgentProjectDir(options.dir))) {
27
+ err(`No agent project found at ${options.dir} (expected an agent.ts default-exporting defineAgent({ ... })).\n`);
28
+ return 1;
29
+ }
30
+ const project = yield loadAgentProject(options.dir);
31
+ for (const diagnostic of project.diagnostics) {
32
+ err(`${diagnostic.severity}: ${diagnostic.message}\n`);
33
+ }
34
+ if (project.diagnostics.some((d) => d.severity === "error")) {
35
+ return 1;
36
+ }
37
+ const manifest = buildAgentDeployManifest(project);
38
+ // Round-trip through the wire schema so `july manifest` can never emit
39
+ // something the control plane contract would reject.
40
+ if (parseAgentDeployManifest(JSON.parse(JSON.stringify(manifest))) === undefined) {
41
+ err("internal error: generated manifest failed schema validation\n");
42
+ return 1;
43
+ }
44
+ out(options.json === true
45
+ ? `${JSON.stringify(manifest)}\n`
46
+ : `${JSON.stringify(manifest, null, 2)}\n`);
47
+ return 0;
48
+ });
49
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"cli-slack.d.ts","sourceRoot":"","sources":["../../src/internal/cli-slack.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAIL,cAAc,EAGf,MAAM,4BAA4B,CAAC;AAqBpC,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE1E,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,mEAAmE;IACnE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,kBAAkB;IAClB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,eAAe,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AO,CAAC,MAAM,CAAC,CA4CjB;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAsD5E"}
@@ -283,7 +283,15 @@ function writePendingAdminWait(ctx, poll) {
283
283
  ? poll.oauthAuthorizeUrl
284
284
  : undefined;
285
285
  ctx.err(`Waiting for a Slack admin to approve the app${appSuffix}.\n\n`);
286
- if (requestUrl !== undefined) {
286
+ if (poll.approvalRequest === "pending") {
287
+ // Already in the admin queue: nothing to file, so no browser hop.
288
+ ctx.err(ctx.dim(` Approval request sent; workspace owners were notified.\n\n`));
289
+ if (requestUrl !== undefined) {
290
+ ctx.err(ctx.dim(` Send a reminder from:\n\n`));
291
+ ctx.err(` ${requestUrl}\n\n`);
292
+ }
293
+ }
294
+ else if (requestUrl !== undefined) {
287
295
  ctx.err(ctx.dim(` Slack will notify workspace owners once the request is in their queue.\n` +
288
296
  ` Open this page to file it or send a reminder:\n\n`));
289
297
  ctx.err(` ${requestUrl}\n\n`);
@@ -0,0 +1,9 @@
1
+ declare const TEMPLATE_NAMES: readonly ["agentic-owners", "demo", "pr-autofixer", "security-reviewer", "triage-linear", "triage-jira"];
2
+ export type TemplateName = (typeof TEMPLATE_NAMES)[number];
3
+ export declare function canonicalTemplateName(name: string): string;
4
+ export declare function isTemplateName(name: string): name is TemplateName;
5
+ /** Raw scaffold marker. Validation depends on the consuming boundary. */
6
+ export declare function readCursorAgentTemplate(rootDir: string): string | undefined;
7
+ export declare function readDeployTemplate(rootDir: string): string | undefined;
8
+ export {};
9
+ //# sourceMappingURL=cursor-agent-template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor-agent-template.d.ts","sourceRoot":"","sources":["../../src/internal/cursor-agent-template.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,cAAc,YAClB,gBAAgB,EAChB,MAAM,EACN,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,aAAa,CACL,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAG3D,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,YAAY,CAEjE;AAED,yEAAyE;AACzE,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAY3E;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOtE"}
@@ -0,0 +1,37 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ const MAX = 64;
4
+ const TEMPLATE_NAMES = [
5
+ "agentic-owners",
6
+ "demo",
7
+ "pr-autofixer",
8
+ "security-reviewer",
9
+ "triage-linear",
10
+ "triage-jira",
11
+ ];
12
+ const NAMES = new Set(TEMPLATE_NAMES);
13
+ export function canonicalTemplateName(name) {
14
+ return name === "triage" ? "triage-linear" : name;
15
+ }
16
+ export function isTemplateName(name) {
17
+ return NAMES.has(name);
18
+ }
19
+ /** Raw scaffold marker. Validation depends on the consuming boundary. */
20
+ export function readCursorAgentTemplate(rootDir) {
21
+ try {
22
+ const pkg = JSON.parse(readFileSync(join(rootDir, "package.json"), "utf8"));
23
+ const stamp = pkg.cursorAgentTemplate;
24
+ return typeof stamp === "string" ? stamp : undefined;
25
+ }
26
+ catch (_a) {
27
+ return undefined;
28
+ }
29
+ }
30
+ export function readDeployTemplate(rootDir) {
31
+ const stamp = readCursorAgentTemplate(rootDir);
32
+ if (stamp === undefined || stamp.length === 0 || stamp.length > MAX) {
33
+ return undefined;
34
+ }
35
+ const name = canonicalTemplateName(stamp);
36
+ return isTemplateName(name) ? name : undefined;
37
+ }
@@ -9,6 +9,7 @@
9
9
  * The endpoints are gated on the `agent_serve_mvp` Statsig gate and 404
10
10
  * when it is off — the error mapping says so instead of "not found".
11
11
  */
12
+ import type { AgentDeployManifestV1 } from "./deploy-manifest.js";
12
13
  export type DeploymentStatus = "pending" | "deploying" | "running" | "degraded" | "failed" | "stopping" | "stopped" | "deleting";
13
14
  /** Customer-safe deploy progress (no hosting phase / infra names). */
14
15
  export type DeploymentProgress = "queued" | "preparing" | "creating" | "building" | "starting" | "finalizing" | "running" | "failed" | "stopping" | "stopped" | "deleting" | "degraded";
@@ -37,6 +38,12 @@ export type DeploySource = {
37
38
  * `X-Agent-Alias-Token` (channels authored with `publicEndpoint()`).
38
39
  */
39
40
  publicRoutePaths?: string[];
41
+ /**
42
+ * Offline deploy manifest (Wd): derived declarations + `/v1/info`
43
+ * payload, extracted at deploy time with no VM. Optional — servers that
44
+ * predate manifest storage strip unknown fields.
45
+ */
46
+ manifest?: AgentDeployManifestV1;
40
47
  };
41
48
  /** Returns a human error message, or undefined when the slug is valid. */
42
49
  export declare function validateDeploymentSlug(slug: string): string | undefined;
@@ -174,6 +181,7 @@ export declare class AgentServeDeployClient {
174
181
  teamId: number;
175
182
  slug: string;
176
183
  source: DeploySource;
184
+ template?: string;
177
185
  }): Promise<DeployAccepted>;
178
186
  listDeployments(args: {
179
187
  teamId: number;
@@ -1 +1 @@
1
- {"version":3,"file":"deploy-client.d.ts","sourceRoot":"","sources":["../../src/internal/deploy-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,WAAW,GACX,SAAS,GACT,UAAU,GACV,QAAQ,GACR,UAAU,GACV,SAAS,GACT,UAAU,CAAC;AAEf,sEAAsE;AACtE,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,WAAW,GACX,UAAU,GACV,UAAU,GACV,UAAU,GACV,YAAY,GACZ,SAAS,GACT,QAAQ,GACR,UAAU,GACV,SAAS,GACT,UAAU,GACV,UAAU,CAAC;AAEf,eAAO,MAAM,wBAAwB,EAAE,WAAW,CAAC,gBAAgB,CAKjE,CAAC;AAEH;;;;;;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AIG;IACG,UAAU,CAAC,IAAI,EAAE;QACrB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KACjD,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA0BpB;IAED,gEAAgE;IAC1D,WAAW,CAAC,IAAI,EAAE;QACtB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAOxB;IAED,yDAAyD;IACnD,YAAY,CAAC,IAAI,EAAE;QACvB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,OAAO,CAAC,IAAI,CAAC,CAUhB;IAED;;;;OAIG;IACG,mBAAmB,CAAC,IAAI,EAAE;QAC9B,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,OAAO,CAAC,MAAM,CAAC,CAOlB;IAED;;;;;OAKG;IACG,gBAAgB,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAsBxE;IAED,4DAA4D;IAC5D,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEpC;IAED;;;;;OAKG;IACH,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;YAEa,OAAO;CAyCtB"}
@@ -227,7 +227,7 @@ export class AgentServeDeployClient {
227
227
  }
228
228
  // Only the git-ref member exists today; a future artifact member would
229
229
  // upload the build first and post a different body from this branch.
230
- const body = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ teamId: args.teamId, slug: args.slug, gitRepoUrl: args.source.gitRepoUrl }, (args.source.gitRef === undefined
230
+ const body = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ teamId: args.teamId, slug: args.slug, gitRepoUrl: args.source.gitRepoUrl }, (args.source.gitRef === undefined
231
231
  ? {}
232
232
  : { gitRef: args.source.gitRef })), (args.source.agentPath === undefined
233
233
  ? {}
@@ -237,13 +237,31 @@ export class AgentServeDeployClient {
237
237
  ? {}
238
238
  : { egressAllowedDomains: args.source.egressAllowedDomains })), {
239
239
  // JSON.stringify drops undefined keys.
240
- publicRoutePaths: args.source.publicRoutePaths });
241
- const raw = yield this.request({
240
+ publicRoutePaths: args.source.publicRoutePaths }), (args.source.manifest === undefined
241
+ ? {}
242
+ : { manifest: args.source.manifest })), { template: args.template });
243
+ const send = () => this.request({
242
244
  method: "POST",
243
245
  path: "/internal/agent-serve/deployments",
244
246
  body,
245
247
  context: { verb: "deploy", slug: args.slug },
246
248
  });
249
+ let raw;
250
+ try {
251
+ raw = yield send();
252
+ }
253
+ catch (error) {
254
+ const unsupportedTemplate = args.template !== undefined &&
255
+ error instanceof DeployApiError &&
256
+ error.status === 400 &&
257
+ error.message.toLowerCase().includes("template") &&
258
+ /unrecognized|unknown/i.test(error.message);
259
+ if (!unsupportedTemplate) {
260
+ throw error;
261
+ }
262
+ delete body.template;
263
+ raw = yield send();
264
+ }
247
265
  return deployAcceptedSchema.parse(raw);
248
266
  });
249
267
  }
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Offline deploy manifest (workstream Wd of
3
+ * `docs/agent-serve/agent-sdk-event-ingress-plan.md`, Wd-0/Wd-1).
4
+ *
5
+ * The manifest is every piece of deployment metadata that is statically
6
+ * derivable from the agent project — extracted at build/deploy time, with no
7
+ * VM, no engine, and no network — so the control plane can store it before
8
+ * any pod starts and keep answering metadata questions while a deployment is
9
+ * offline or hibernated.
10
+ *
11
+ * Two layers with different stability contracts:
12
+ *
13
+ * - `declarations` is the **versioned wire contract** consumed by the
14
+ * control plane (Wd-2): GitHub webhook events the mounted channels can
15
+ * dispatch on, egress domains, and public route paths. Validated by
16
+ * {@link agentDeployManifestV1Schema}; the CP stores these as columns /
17
+ * column views. Repos are deliberately NOT here — which repos a
18
+ * deployment watches is per-instance deploy configuration, not a property
19
+ * of the code.
20
+ * - `info` is the full static project description — the same payload the
21
+ * engine serves at `GET /v1/info` (`projectInfo`). Stored opaquely by the
22
+ * CP so `/v1/info`-class reads can be served for offline deployments
23
+ * (Wd-5). Its shape evolves with the SDK and is intentionally not pinned
24
+ * by the wire schema beyond "is an object".
25
+ *
26
+ * Event derivation note: each mounted `githubChannel()` publishes its
27
+ * derived event set on `ChannelMeta.githubWebhookEvents` (computed by
28
+ * `deriveGitHubWebhookEvents` from the declared hooks). The manifest is the
29
+ * union across mounted channels; a project with no GitHub channel gets no
30
+ * `githubWebhookEvents` key at all — such a deployment subscribes to
31
+ * nothing, regardless of the repos configured at deploy time.
32
+ */
33
+ import type { AgentProject, AgentProjectInfo } from "../types.js";
34
+ export declare const DEPLOY_MANIFEST_VERSION: 1;
35
+ export interface AgentDeployManifestDeclarations {
36
+ /**
37
+ * Union of every mounted GitHub channel's derived webhook events.
38
+ * Absent (not empty) when the project mounts no GitHub channel.
39
+ */
40
+ githubWebhookEvents?: string[];
41
+ egressDomains: string[];
42
+ publicRoutePaths: string[];
43
+ /** Where this runtime mirrors framework-owned sessions and event chunks. */
44
+ frameworkStorage?: "cursor-hosted" | "other" | "none";
45
+ /**
46
+ * Mounted channels with their kinds. The control plane derives the
47
+ * continuation identity (session key) for **defined** kinds it knows
48
+ * ("github", "slack"); a custom channel with no kind gets per-deployment
49
+ * serialization until a declared continuation config exists (a future
50
+ * schema field — reserved, deliberately not implemented yet). This is
51
+ * what lets the CP compute workflow/session identity before any engine
52
+ * runs.
53
+ */
54
+ channels: Array<{
55
+ id: string;
56
+ kind?: string;
57
+ }>;
58
+ }
59
+ export interface AgentDeployManifestV1 {
60
+ manifestVersion: 1;
61
+ /** Unix ms at extraction. */
62
+ generatedAtMs: number;
63
+ /** `@cursor/july` version that produced the manifest. */
64
+ cliVersion: string;
65
+ declarations: AgentDeployManifestDeclarations;
66
+ /**
67
+ * Full `projectInfo` payload (see `GET /v1/info`). Opaque to the wire
68
+ * contract; the CP stores it verbatim.
69
+ */
70
+ info: AgentProjectInfo;
71
+ }
72
+ /**
73
+ * Extract the offline deploy manifest from a loaded project. Pure: no
74
+ * network, no filesystem beyond what `loadAgentProject` already read.
75
+ */
76
+ export declare function buildAgentDeployManifest(project: AgentProject, options?: {
77
+ nowMs?: number;
78
+ cliVersion?: string;
79
+ }): AgentDeployManifestV1;
80
+ /**
81
+ * Parse an untrusted manifest (round-trip check for the CLI's own output;
82
+ * the CP re-validates server-side with its own copy of the contract).
83
+ */
84
+ export declare function parseAgentDeployManifest(raw: unknown): AgentDeployManifestV1 | undefined;
85
+ //# sourceMappingURL=deploy-manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy-manifest.d.ts","sourceRoot":"","sources":["../../src/internal/deploy-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIlE,eAAO,MAAM,uBAAuB,EAAE,CAAK,CAAC;AA6B5C,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,eAAe,GAAG,OAAO,GAAG,MAAM,CAAC;IACtD;;;;;;;;OAQG;IACH,QAAQ,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,qBAAqB;IACpC,eAAe,EAAE,CAAC,CAAC;IACnB,6BAA6B;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,+BAA+B,CAAC;IAC9C;;;OAGG;IACH,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,YAAY,EACrB,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAChD,qBAAqB,CAuCvB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,OAAO,GACX,qBAAqB,GAAG,SAAS,CAOnC"}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Offline deploy manifest (workstream Wd of
3
+ * `docs/agent-serve/agent-sdk-event-ingress-plan.md`, Wd-0/Wd-1).
4
+ *
5
+ * The manifest is every piece of deployment metadata that is statically
6
+ * derivable from the agent project — extracted at build/deploy time, with no
7
+ * VM, no engine, and no network — so the control plane can store it before
8
+ * any pod starts and keep answering metadata questions while a deployment is
9
+ * offline or hibernated.
10
+ *
11
+ * Two layers with different stability contracts:
12
+ *
13
+ * - `declarations` is the **versioned wire contract** consumed by the
14
+ * control plane (Wd-2): GitHub webhook events the mounted channels can
15
+ * dispatch on, egress domains, and public route paths. Validated by
16
+ * {@link agentDeployManifestV1Schema}; the CP stores these as columns /
17
+ * column views. Repos are deliberately NOT here — which repos a
18
+ * deployment watches is per-instance deploy configuration, not a property
19
+ * of the code.
20
+ * - `info` is the full static project description — the same payload the
21
+ * engine serves at `GET /v1/info` (`projectInfo`). Stored opaquely by the
22
+ * CP so `/v1/info`-class reads can be served for offline deployments
23
+ * (Wd-5). Its shape evolves with the SDK and is intentionally not pinned
24
+ * by the wire schema beyond "is an object".
25
+ *
26
+ * Event derivation note: each mounted `githubChannel()` publishes its
27
+ * derived event set on `ChannelMeta.githubWebhookEvents` (computed by
28
+ * `deriveGitHubWebhookEvents` from the declared hooks). The manifest is the
29
+ * union across mounted channels; a project with no GitHub channel gets no
30
+ * `githubWebhookEvents` key at all — such a deployment subscribes to
31
+ * nothing, regardless of the repos configured at deploy time.
32
+ */
33
+ import { z } from "zod";
34
+ import { isPublicEndpointPolicy } from "../channels.js";
35
+ import { isCursorHostedStorage } from "../storage-backends/cursor-hosted.js";
36
+ import { projectInfo } from "./discovery.js";
37
+ import { packageVersion } from "./distribution.js";
38
+ export const DEPLOY_MANIFEST_VERSION = 1;
39
+ /**
40
+ * Versioned wire contract for the CP-consumed declaration fields. Kept
41
+ * module-private (the package builds with isolated declarations); consumers
42
+ * use {@link parseAgentDeployManifest} and the explicit interfaces below.
43
+ */
44
+ const agentDeployManifestV1Schema = z.object({
45
+ manifestVersion: z.literal(DEPLOY_MANIFEST_VERSION),
46
+ generatedAtMs: z.number().int().nonnegative(),
47
+ cliVersion: z.string().min(1),
48
+ declarations: z.object({
49
+ githubWebhookEvents: z.array(z.string().min(1).max(64)).max(64).optional(),
50
+ egressDomains: z.array(z.string().min(1)).max(64),
51
+ publicRoutePaths: z.array(z.string().min(1)).max(64),
52
+ frameworkStorage: z.enum(["cursor-hosted", "other", "none"]).optional(),
53
+ channels: z
54
+ .array(z.object({
55
+ id: z.string().min(1).max(128),
56
+ kind: z.string().min(1).max(32).optional(),
57
+ }))
58
+ .max(64),
59
+ }),
60
+ // Full `projectInfo` payload — opaque to the wire contract.
61
+ info: z.record(z.unknown()),
62
+ });
63
+ /**
64
+ * Extract the offline deploy manifest from a loaded project. Pure: no
65
+ * network, no filesystem beyond what `loadAgentProject` already read.
66
+ */
67
+ export function buildAgentDeployManifest(project, options) {
68
+ var _a, _b;
69
+ var _c, _d, _e, _f;
70
+ const events = new Set();
71
+ for (const channel of project.channels) {
72
+ for (const event of (_c = (_a = channel.definition.meta) === null || _a === void 0 ? void 0 : _a.githubWebhookEvents) !== null && _c !== void 0 ? _c : []) {
73
+ events.add(event);
74
+ }
75
+ }
76
+ // Same mapping as `july deploy` (cli-deploy.ts): channels declared public
77
+ // via `publicEndpoint()` become alias-token-free route prefixes.
78
+ const publicRoutePaths = project.channels
79
+ .filter((channel) => { var _a; return ((_a = channel.definition.auth) !== null && _a !== void 0 ? _a : []).some(isPublicEndpointPolicy); })
80
+ .map((channel) => `/v1/channels/${channel.id}`);
81
+ return {
82
+ manifestVersion: DEPLOY_MANIFEST_VERSION,
83
+ generatedAtMs: (_d = options === null || options === void 0 ? void 0 : options.nowMs) !== null && _d !== void 0 ? _d : Date.now(),
84
+ cliVersion: (_e = options === null || options === void 0 ? void 0 : options.cliVersion) !== null && _e !== void 0 ? _e : packageVersion(),
85
+ declarations: Object.assign(Object.assign({}, (events.size === 0 ? {} : { githubWebhookEvents: [...events].sort() })), { egressDomains: [...((_f = (_b = project.agent.hosting) === null || _b === void 0 ? void 0 : _b.egressDomains) !== null && _f !== void 0 ? _f : [])], publicRoutePaths, frameworkStorage: project.storage === undefined
86
+ ? "none"
87
+ : isCursorHostedStorage(project.storage)
88
+ ? "cursor-hosted"
89
+ : "other", channels: project.channels.map((channel) => { var _a; return (Object.assign({ id: channel.id }, (((_a = channel.definition.meta) === null || _a === void 0 ? void 0 : _a.kind) === undefined
90
+ ? {}
91
+ : { kind: channel.definition.meta.kind }))); }) }),
92
+ info: projectInfo(project),
93
+ };
94
+ }
95
+ /**
96
+ * Parse an untrusted manifest (round-trip check for the CLI's own output;
97
+ * the CP re-validates server-side with its own copy of the contract).
98
+ */
99
+ export function parseAgentDeployManifest(raw) {
100
+ const parsed = agentDeployManifestV1Schema.safeParse(raw);
101
+ // `info` is opaque to the wire schema (validated as a plain object) but
102
+ // typed as AgentProjectInfo for producers/consumers inside the SDK.
103
+ return parsed.success
104
+ ? parsed.data
105
+ : undefined;
106
+ }
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Deployment-scoped SCM event intake for hosted multi-tenant agents.
3
+ *
4
+ * Instead of receiving HMAC-signed webhook forwards from the backend (which
5
+ * required a shared `GITHUB_WEBHOOK_SECRET` / forward-secret pair), the
6
+ * engine pulls its deliveries from the control plane's deployment-scoped
7
+ * event stream:
8
+ *
9
+ * GET /internal/agent-serve/automation-agent-sdk/events
10
+ *
11
+ * authenticated with the engine pod's `CURSOR_API_KEY` — the same
12
+ * credential (and server-side deployment allowlist) that authorizes the
13
+ * consuming agent's customer list read. The backend writes each envelope's
14
+ * `installationId` itself from the verified GitHub delivery, so agent-side
15
+ * tenant binding does not depend on an HMAC-covered payload.
16
+ *
17
+ * Each envelope is stubbed into a GitHub-shaped `pull_request` webhook body
18
+ * and POSTed to this process's own github channel route over loopback
19
+ * (admitted by the channel's no-secret `localDevStrict` policy), so the
20
+ * consuming agent's whole pipeline — Zod parse, cursorAccount credential
21
+ * lease, customer routing, tools — runs unchanged. Loopback (rather than
22
+ * the in-process `handleAgentServeTrigger` fan-out the `--cursor-events`
23
+ * relay uses) is deliberate: this stream is started from a channel's
24
+ * `onStart`, which cannot reach the serve-level mount/handler wiring.
25
+ *
26
+ * Offsets are client-owned (`<ms>-<seq>` Redis stream ids) and persisted
27
+ * under the state dir so a restart resumes where it left off instead of
28
+ * dropping deliveries (the old push path was fire-and-forget).
29
+ *
30
+ * INTERNAL: first-party host plumbing shared by agents in `factory/*`.
31
+ * Consumed via relative source imports, following
32
+ * `tenant-mcp/run-mcp-registry.ts`. Policy (which deliveries to act on,
33
+ * tenant routing) stays in the consuming agent; this module is transport
34
+ * only.
35
+ */
36
+ export interface AgentSdkScmPullRequestMeta {
37
+ number: number;
38
+ url: string;
39
+ title: string;
40
+ body?: string | null | undefined;
41
+ draft?: boolean | undefined;
42
+ merged?: boolean | undefined;
43
+ authorLogin?: string | undefined;
44
+ headRef: string;
45
+ headSha: string;
46
+ baseRef: string;
47
+ baseSha?: string | undefined;
48
+ }
49
+ /** One entry from the deployment-scoped control-plane event stream. */
50
+ export interface AgentSdkScmEventEnvelope {
51
+ provider: "github";
52
+ eventName: string;
53
+ deliveryId: string;
54
+ repo: string;
55
+ receivedAtMs: number;
56
+ action: string;
57
+ /** Tenant-binding material, written by the control plane. */
58
+ installationId: number;
59
+ pullRequest: AgentSdkScmPullRequestMeta;
60
+ occurredAtMs?: number | undefined;
61
+ }
62
+ /** Unknown envelope shapes return undefined (skipped, forward compat). */
63
+ export declare function parseAgentSdkScmEventEnvelope(value: unknown): AgentSdkScmEventEnvelope | undefined;
64
+ /**
65
+ * Stub a GitHub-shaped `pull_request` webhook body from an envelope —
66
+ * enough for agent-serve's pull_request Zod schema, plus `installation.id`
67
+ * so the channel's `ctx.installationId` tenant binding keeps working.
68
+ * Pure — exported for tests.
69
+ */
70
+ export declare function envelopeToGitHubPayload(envelope: AgentSdkScmEventEnvelope): Record<string, unknown>;
71
+ export interface AgentSdkEventStreamOptions {
72
+ logger?: (line: string) => void;
73
+ env?: NodeJS.ProcessEnv;
74
+ /** Injected for tests. */
75
+ fetch?: typeof fetch;
76
+ /** Injected for tests (default `process.argv`). */
77
+ argv?: readonly string[];
78
+ /**
79
+ * Prefix for the consumer-scoped env overrides
80
+ * `<prefix>_SELF_WEBHOOK_URL` and `<prefix>_EVENTS_STATE_DIR`
81
+ * (default `AGENT_SERVE`; e.g. the security reviewer passes
82
+ * `SECURITY_REVIEWER` to keep its existing deployment env vars working).
83
+ */
84
+ envPrefix?: string;
85
+ /** Log-line prefix (default `agent-sdk/deployment-events`). */
86
+ logLabel?: string;
87
+ /**
88
+ * Offset state directory name under `<cwd>/.agent-serve`
89
+ * (default `deployment-events`). Consumers with persisted offsets must
90
+ * keep their historical name or a restart re-anchors at `$`.
91
+ */
92
+ stateDirName?: string;
93
+ }
94
+ /**
95
+ * Port the serve process is actually listening on, read from its own argv.
96
+ *
97
+ * The channel runs inside the serve process, so `--port <n>` / `--port=<n>`
98
+ * on the command line is authoritative. Hosted-platform engines start with
99
+ * `--port 26100` and export no `PORT` env, so guessing a fixed default posts
100
+ * self-dispatches at a port nothing listens on ("fetch failed" for every
101
+ * delivery).
102
+ */
103
+ export declare function servePortFromArgv(argv: readonly string[]): string | undefined;
104
+ export interface AgentSdkEventStream {
105
+ stop(): Promise<void>;
106
+ }
107
+ /**
108
+ * Start the pull loop. Returns undefined (with a log line) when required
109
+ * config is missing so `serve` still starts — mirroring how other relays
110
+ * degrade instead of failing the host.
111
+ */
112
+ export declare function startAgentSdkEventStream(options?: AgentSdkEventStreamOptions): AgentSdkEventStream | undefined;
113
+ //# sourceMappingURL=deployment-scm-event-stream.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployment-scm-event-stream.d.ts","sourceRoot":"","sources":["../../src/internal/deployment-scm-event-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AA2BH,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,uEAAuE;AACvE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,0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