@stigmer/cli 3.19.0 → 3.19.1-dev.20260920100552

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 (106) hide show
  1. package/commands/apply.d.ts.map +1 -1
  2. package/commands/apply.js +42 -100
  3. package/commands/apply.js.map +1 -1
  4. package/commands/validate.js +3 -4
  5. package/commands/validate.js.map +1 -1
  6. package/local/bootstrap.d.ts +1 -2
  7. package/local/bootstrap.d.ts.map +1 -1
  8. package/local/bootstrap.js +13 -41
  9. package/local/bootstrap.js.map +1 -1
  10. package/local/daemon/launch.d.ts +2 -2
  11. package/local/daemon/launch.d.ts.map +1 -1
  12. package/local/daemon/launch.js +2 -2
  13. package/local/daemon/launch.js.map +1 -1
  14. package/local/plugins/defaults.js +2 -2
  15. package/local/plugins/defaults.js.map +1 -1
  16. package/package.json +7 -7
  17. package/registry/index.d.ts +2 -2
  18. package/registry/index.d.ts.map +1 -1
  19. package/registry/index.js +2 -2
  20. package/registry/index.js.map +1 -1
  21. package/registry/metadata.d.ts +9 -0
  22. package/registry/metadata.d.ts.map +1 -1
  23. package/registry/metadata.js +14 -5
  24. package/registry/metadata.js.map +1 -1
  25. package/registry/registry.d.ts +9 -0
  26. package/registry/registry.d.ts.map +1 -1
  27. package/registry/registry.js +16 -1
  28. package/registry/registry.js.map +1 -1
  29. package/registry/verb-support.d.ts.map +1 -1
  30. package/registry/verb-support.js +0 -13
  31. package/registry/verb-support.js.map +1 -1
  32. package/resources/apply/apply.d.ts +11 -12
  33. package/resources/apply/apply.d.ts.map +1 -1
  34. package/resources/apply/apply.js +12 -21
  35. package/resources/apply/apply.js.map +1 -1
  36. package/resources/apply/handlers.js +2 -2
  37. package/resources/apply/handlers.js.map +1 -1
  38. package/resources/delete.d.ts.map +1 -1
  39. package/resources/delete.js +0 -1
  40. package/resources/delete.js.map +1 -1
  41. package/resources/get-bindings.d.ts.map +1 -1
  42. package/resources/get-bindings.js +0 -5
  43. package/resources/get-bindings.js.map +1 -1
  44. package/resources/list.d.ts.map +1 -1
  45. package/resources/list.js +0 -1
  46. package/resources/list.js.map +1 -1
  47. package/resources/validate.d.ts.map +1 -1
  48. package/resources/validate.js +0 -2
  49. package/resources/validate.js.map +1 -1
  50. package/src/commands/apply.ts +35 -150
  51. package/src/commands/validate.ts +2 -4
  52. package/src/local/bootstrap.test.ts +15 -59
  53. package/src/local/bootstrap.ts +12 -53
  54. package/src/local/daemon/launch.ts +4 -4
  55. package/src/local/plugins/defaults.ts +2 -2
  56. package/src/registry/index.ts +7 -1
  57. package/src/registry/metadata.ts +15 -5
  58. package/src/registry/registry.test.ts +1 -7
  59. package/src/registry/registry.ts +17 -1
  60. package/src/registry/verb-support.ts +0 -13
  61. package/src/resources/apply/apply.integration.test.ts +15 -3
  62. package/src/resources/apply/apply.ts +15 -26
  63. package/src/resources/apply/handlers.ts +2 -2
  64. package/src/resources/delete.ts +0 -1
  65. package/src/resources/get-bindings.ts +0 -5
  66. package/src/resources/list.ts +0 -1
  67. package/src/resources/validate.test.ts +0 -1
  68. package/src/resources/validate.ts +0 -2
  69. package/local/seedpack-retire.d.ts +0 -63
  70. package/local/seedpack-retire.d.ts.map +0 -1
  71. package/local/seedpack-retire.js +0 -361
  72. package/local/seedpack-retire.js.map +0 -1
  73. package/resources/apply/declarative.d.ts +0 -106
  74. package/resources/apply/declarative.d.ts.map +0 -1
  75. package/resources/apply/declarative.js +0 -397
  76. package/resources/apply/declarative.js.map +0 -1
  77. package/resources/apply/synth/project-track.d.ts +0 -21
  78. package/resources/apply/synth/project-track.d.ts.map +0 -1
  79. package/resources/apply/synth/project-track.js +0 -102
  80. package/resources/apply/synth/project-track.js.map +0 -1
  81. package/resources/apply/synth/reader.d.ts +0 -18
  82. package/resources/apply/synth/reader.d.ts.map +0 -1
  83. package/resources/apply/synth/reader.js +0 -55
  84. package/resources/apply/synth/reader.js.map +0 -1
  85. package/resources/apply/synth/runtime.d.ts +0 -8
  86. package/resources/apply/synth/runtime.d.ts.map +0 -1
  87. package/resources/apply/synth/runtime.js +0 -32
  88. package/resources/apply/synth/runtime.js.map +0 -1
  89. package/resources/apply/synth/synthesize.d.ts +0 -43
  90. package/resources/apply/synth/synthesize.d.ts.map +0 -1
  91. package/resources/apply/synth/synthesize.js +0 -115
  92. package/resources/apply/synth/synthesize.js.map +0 -1
  93. package/src/local/seedpack-retire.test.ts +0 -499
  94. package/src/local/seedpack-retire.ts +0 -474
  95. package/src/resources/apply/declarative.integration.test.ts +0 -204
  96. package/src/resources/apply/declarative.test.ts +0 -132
  97. package/src/resources/apply/declarative.ts +0 -491
  98. package/src/resources/apply/synth/capstone.integration.test.ts +0 -134
  99. package/src/resources/apply/synth/project-track.integration.test.ts +0 -194
  100. package/src/resources/apply/synth/project-track.ts +0 -126
  101. package/src/resources/apply/synth/reader.test.ts +0 -90
  102. package/src/resources/apply/synth/reader.ts +0 -68
  103. package/src/resources/apply/synth/runtime.test.ts +0 -29
  104. package/src/resources/apply/synth/runtime.ts +0 -39
  105. package/src/resources/apply/synth/synthesize.test.ts +0 -109
  106. package/src/resources/apply/synth/synthesize.ts +0 -161
@@ -1,8 +0,0 @@
1
- /** Language runtime used to execute an SDK entry point. */
2
- export type Runtime = "go" | "python" | "node";
3
- /**
4
- * Infer the runtime from an entry point's file extension. Throws a UsageError
5
- * listing the supported extensions when the extension is unrecognized.
6
- */
7
- export declare function inferRuntime(entryPoint: string): Runtime;
8
- //# sourceMappingURL=runtime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/resources/apply/synth/runtime.ts"],"names":[],"mappings":"AAWA,2DAA2D;AAC3D,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,MAAM,CAAC;AAa/C;;;GAGG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CASxD"}
@@ -1,32 +0,0 @@
1
- // Runtime inference for SDK project synthesis.
2
- //
3
- // A project's `entry_point` extension determines which language runtime executes
4
- // it — there is no explicit `runtime` field (the proto enum was removed; the
5
- // extension is the single source of truth). Port of the Go CLI's
6
- // `internal/cli/apply/runtime.go`; the extension table is kept in lockstep with
7
- // the backend's `supportedEntryPointExtensions` (project validator).
8
- import { extname } from "node:path";
9
- import { UsageError } from "../../../errors/index.js";
10
- // Extension → runtime. Keep in sync with the backend project validator and Go's
11
- // extensionToRuntime.
12
- const EXTENSION_TO_RUNTIME = new Map([
13
- [".go", "go"],
14
- [".py", "python"],
15
- [".ts", "node"],
16
- [".js", "node"],
17
- [".mts", "node"],
18
- [".mjs", "node"],
19
- ]);
20
- /**
21
- * Infer the runtime from an entry point's file extension. Throws a UsageError
22
- * listing the supported extensions when the extension is unrecognized.
23
- */
24
- export function inferRuntime(entryPoint) {
25
- const ext = extname(entryPoint).toLowerCase();
26
- const runtime = EXTENSION_TO_RUNTIME.get(ext);
27
- if (runtime !== undefined)
28
- return runtime;
29
- const supported = [...EXTENSION_TO_RUNTIME.keys()].join(", ");
30
- throw new UsageError(`cannot infer runtime from entry point '${entryPoint}' (extension '${ext}')\n\n` + `Supported extensions: ${supported}`);
31
- }
32
- //# sourceMappingURL=runtime.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../../../src/resources/apply/synth/runtime.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,EAAE;AACF,iFAAiF;AACjF,6EAA6E;AAC7E,iEAAiE;AACjE,gFAAgF;AAChF,qEAAqE;AAErE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAKtD,gFAAgF;AAChF,sBAAsB;AACtB,MAAM,oBAAoB,GAAiC,IAAI,GAAG,CAAC;IACjE,CAAC,KAAK,EAAE,IAAI,CAAC;IACb,CAAC,KAAK,EAAE,QAAQ,CAAC;IACjB,CAAC,KAAK,EAAE,MAAM,CAAC;IACf,CAAC,KAAK,EAAE,MAAM,CAAC;IACf,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,MAAM,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,UAAkB;IAC7C,MAAM,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;IAC9C,MAAM,OAAO,GAAG,oBAAoB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9C,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC;IAE1C,MAAM,SAAS,GAAG,CAAC,GAAG,oBAAoB,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9D,MAAM,IAAI,UAAU,CAClB,0CAA0C,UAAU,iBAAiB,GAAG,QAAQ,GAAG,yBAAyB,SAAS,EAAE,CACxH,CAAC;AACJ,CAAC"}
@@ -1,43 +0,0 @@
1
- import type { Runtime } from "./runtime.js";
2
- /** Result of running a subprocess to completion. */
3
- export interface SpawnResult {
4
- readonly exitCode: number;
5
- readonly stdout: string;
6
- readonly stderr: string;
7
- }
8
- /** A function that runs a command to completion (injectable for tests). */
9
- export type SpawnFn = (command: string, args: readonly string[], options: {
10
- readonly cwd: string;
11
- readonly env: NodeJS.ProcessEnv;
12
- }) => Promise<SpawnResult>;
13
- /** Inputs for one synthesis run. */
14
- export interface SynthesizeOptions {
15
- /** Directory containing the SDK code and stigmer.yaml. */
16
- readonly projectDir: string;
17
- /** Entry point file, relative to `projectDir`. */
18
- readonly entryPoint: string;
19
- /** Runtime inferred from the entry point extension. */
20
- readonly runtime: Runtime;
21
- /** Resolved org, injected as STIGMER_ORG_ID (empty = omit). */
22
- readonly orgId: string;
23
- }
24
- /** Injectable collaborators (defaults run real subprocesses / fs checks). */
25
- export interface SynthesizeDeps {
26
- readonly spawn?: SpawnFn;
27
- readonly prepare?: (runtime: Runtime, projectDir: string) => void;
28
- }
29
- /** Outcome of synthesis: where the `.pb` files were written, plus SDK stdout. */
30
- export interface SynthesizeResult {
31
- readonly outputDir: string;
32
- readonly stdout: string;
33
- }
34
- /**
35
- * Execute the SDK entry point and leave the synthesized `.pb` files in
36
- * `<projectDir>/.stigmer`. Validates inputs, runs runtime prep, spawns the
37
- * program with the synthesis env, and maps a non-zero exit (or spawn failure)
38
- * to an actionable error. The caller reads the output dir with the reader.
39
- */
40
- export declare function synthesize(opts: SynthesizeOptions, deps?: SynthesizeDeps): Promise<SynthesizeResult>;
41
- /** Command + args to execute an entry point for the given runtime. */
42
- export declare function runtimeCommand(runtime: Runtime, entryPoint: string): string[];
43
- //# sourceMappingURL=synthesize.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"synthesize.d.ts","sourceRoot":"","sources":["../../../../src/resources/apply/synth/synthesize.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,oDAAoD;AACpD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,2EAA2E;AAC3E,MAAM,MAAM,OAAO,GAAG,CACpB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAA;CAAE,KAC/D,OAAO,CAAC,WAAW,CAAC,CAAC;AAE1B,oCAAoC;AACpC,MAAM,WAAW,iBAAiB;IAChC,0DAA0D;IAC1D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,kDAAkD;IAClD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,uDAAuD;IACvD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CACnE;AAED,iFAAiF;AACjF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,iBAAiB,EAAE,IAAI,GAAE,cAAmB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAiC9G;AAED,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAY7E"}
@@ -1,115 +0,0 @@
1
- // SDK synthesis execution.
2
- //
3
- // Runs a project's `entry_point` as a subprocess with `STIGMER_OUT_DIR` (and
4
- // `STIGMER_ORG_ID`) set; the program writes `.pb` files into that dir, which the
5
- // reader then decodes. Uniform subprocess model for every runtime (DD-009 §5):
6
- // go → `go run <entry>`
7
- // python → `python3 <entry>`
8
- // node → `npx tsx <entry>` for TS, `node <entry>` for JS
9
- //
10
- // `tsx` (not Go's `ts-node`) executes TypeScript entries — it is the runner the
11
- // CLI ecosystem already standardizes on (DD-009 alternatives). The spawn is
12
- // injected so the orchestration is unit-testable without a real subprocess
13
- // (mirrors `connect/oauth.ts`). Port of `internal/cli/apply/synthesize.go`.
14
- import { spawn } from "node:child_process";
15
- import { existsSync, mkdirSync } from "node:fs";
16
- import { extname, join, resolve } from "node:path";
17
- import { UsageError } from "../../../errors/index.js";
18
- /**
19
- * Execute the SDK entry point and leave the synthesized `.pb` files in
20
- * `<projectDir>/.stigmer`. Validates inputs, runs runtime prep, spawns the
21
- * program with the synthesis env, and maps a non-zero exit (or spawn failure)
22
- * to an actionable error. The caller reads the output dir with the reader.
23
- */
24
- export async function synthesize(opts, deps = {}) {
25
- if (opts.projectDir === "")
26
- throw new UsageError("project directory is required");
27
- if (opts.entryPoint === "")
28
- throw new UsageError("entry point is required");
29
- const projectDir = resolve(opts.projectDir);
30
- if (!existsSync(projectDir))
31
- throw new UsageError(`project directory not found: ${opts.projectDir}`);
32
- const entryAbs = join(projectDir, opts.entryPoint);
33
- if (!existsSync(entryAbs))
34
- throw new UsageError(`entry point not found: ${opts.entryPoint}`);
35
- const outputDir = join(projectDir, ".stigmer");
36
- mkdirSync(outputDir, { recursive: true });
37
- (deps.prepare ?? defaultPrepare)(opts.runtime, projectDir);
38
- // Pass the ABSOLUTE entry path: `npx` resolves a relative entry against the
39
- // npm project root (its "local prefix"), not the spawn cwd, so a relative path
40
- // breaks for the node runtime. An absolute path is correct for every runtime;
41
- // cwd stays the project dir so the program's own relative imports resolve.
42
- const [command, ...args] = runtimeCommand(opts.runtime, entryAbs);
43
- const env = { ...process.env, STIGMER_OUT_DIR: outputDir };
44
- if (opts.orgId !== "")
45
- env.STIGMER_ORG_ID = opts.orgId;
46
- let result;
47
- try {
48
- result = await (deps.spawn ?? defaultSpawn)(command, args, { cwd: projectDir, env });
49
- }
50
- catch (err) {
51
- throw new UsageError(formatExecutionError(opts.runtime, "", err.message));
52
- }
53
- if (result.exitCode !== 0) {
54
- throw new UsageError(formatExecutionError(opts.runtime, result.stderr, `exited with code ${result.exitCode}`));
55
- }
56
- return { outputDir, stdout: result.stdout };
57
- }
58
- /** Command + args to execute an entry point for the given runtime. */
59
- export function runtimeCommand(runtime, entryPoint) {
60
- switch (runtime) {
61
- case "go":
62
- return ["go", "run", entryPoint];
63
- case "python":
64
- return ["python3", entryPoint];
65
- case "node": {
66
- const ext = extname(entryPoint).toLowerCase();
67
- // TypeScript entries run through tsx; plain JS runs on node directly.
68
- return ext === ".ts" || ext === ".tsx" || ext === ".mts" ? ["npx", "tsx", entryPoint] : ["node", entryPoint];
69
- }
70
- }
71
- }
72
- // Lightweight, runtime-specific readiness checks (no subprocess). Unlike Go we
73
- // do NOT auto-run `go mod tidy`; the entry-point run surfaces missing deps and
74
- // the user resolves them — keeping the single subprocess the synthesis itself.
75
- function defaultPrepare(runtime, projectDir) {
76
- if (runtime === "node") {
77
- if (!existsSync(join(projectDir, "package.json"))) {
78
- throw new UsageError("package.json not found: run 'npm init' to initialize a Node.js project");
79
- }
80
- if (!existsSync(join(projectDir, "node_modules"))) {
81
- throw new UsageError("node_modules not found: run 'npm install' to install dependencies");
82
- }
83
- }
84
- else if (runtime === "go" && !existsSync(join(projectDir, "go.mod"))) {
85
- throw new UsageError("go.mod not found: run 'go mod init' to initialize a Go module");
86
- }
87
- }
88
- // Real subprocess: collects stdout/stderr, resolves with the exit code.
89
- const defaultSpawn = (command, args, options) => new Promise((resolvePromise, rejectPromise) => {
90
- const child = spawn(command, [...args], { cwd: options.cwd, env: options.env });
91
- let stdout = "";
92
- let stderr = "";
93
- child.stdout?.on("data", (chunk) => {
94
- stdout += chunk.toString();
95
- });
96
- child.stderr?.on("data", (chunk) => {
97
- stderr += chunk.toString();
98
- });
99
- child.on("error", (err) => rejectPromise(err));
100
- child.on("close", (code) => resolvePromise({ exitCode: code ?? 0, stdout, stderr }));
101
- });
102
- // Actionable failure message: truncated stderr + runtime-specific guidance.
103
- // Port of Go's formatExecutionError.
104
- function formatExecutionError(runtime, stderr, fallback) {
105
- let detail = stderr.length > 800 ? `${stderr.slice(0, 800)}\n... (truncated)` : stderr;
106
- if (detail === "")
107
- detail = fallback;
108
- const guidance = runtime === "go"
109
- ? "Check for compile errors above. Run 'go build' to see full error output."
110
- : runtime === "python"
111
- ? "If you see import errors, install your dependencies (e.g. pip install -r requirements.txt)."
112
- : "If you see module errors, run 'npm install' to install dependencies.";
113
- return `SDK synthesis failed:\n${detail}\n\n${guidance}`;
114
- }
115
- //# sourceMappingURL=synthesize.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"synthesize.js","sourceRoot":"","sources":["../../../../src/resources/apply/synth/synthesize.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,EAAE;AACF,6EAA6E;AAC7E,iFAAiF;AACjF,+EAA+E;AAC/E,+BAA+B;AAC/B,gCAAgC;AAChC,8DAA8D;AAC9D,EAAE;AACF,gFAAgF;AAChF,4EAA4E;AAC5E,2EAA2E;AAC3E,4EAA4E;AAE5E,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAyCtD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAuB,EAAE,OAAuB,EAAE;IACjF,IAAI,IAAI,CAAC,UAAU,KAAK,EAAE;QAAE,MAAM,IAAI,UAAU,CAAC,+BAA+B,CAAC,CAAC;IAClF,IAAI,IAAI,CAAC,UAAU,KAAK,EAAE;QAAE,MAAM,IAAI,UAAU,CAAC,yBAAyB,CAAC,CAAC;IAE5E,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC5C,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,gCAAgC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;IACrG,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACnD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,0BAA0B,IAAI,CAAC,UAAU,EAAE,C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