@cargo-ai/cdk 1.0.2 → 1.0.4
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/README.md +65 -36
- package/build/src/cli/auth.d.ts +9 -0
- package/build/src/cli/auth.d.ts.map +1 -0
- package/build/src/cli/auth.js +100 -0
- package/build/src/cli/bin.d.ts +3 -0
- package/build/src/cli/bin.d.ts.map +1 -0
- package/build/src/cli/bin.js +9 -0
- package/build/src/cli/commands/deploy.d.ts +4 -0
- package/build/src/cli/commands/deploy.d.ts.map +1 -0
- package/build/src/cli/commands/deploy.js +531 -0
- package/build/src/cli/commands/index.d.ts +4 -0
- package/build/src/cli/commands/index.d.ts.map +1 -0
- package/build/src/cli/commands/index.js +11 -0
- package/build/src/cli/commands/init.d.ts +3 -0
- package/build/src/cli/commands/init.d.ts.map +1 -0
- package/build/src/cli/commands/init.js +76 -0
- package/build/src/cli/commands/inputTypes.d.ts +24 -0
- package/build/src/cli/commands/inputTypes.d.ts.map +1 -0
- package/build/src/cli/commands/inputTypes.js +273 -0
- package/build/src/cli/commands/templates.d.ts +6 -0
- package/build/src/cli/commands/templates.d.ts.map +1 -0
- package/build/src/cli/commands/templates.js +33 -0
- package/build/src/cli/commands/types.d.ts +4 -0
- package/build/src/cli/commands/types.d.ts.map +1 -0
- package/build/src/cli/commands/types.js +385 -0
- package/build/src/cli/deployCommands.d.ts +4 -0
- package/build/src/cli/deployCommands.d.ts.map +1 -0
- package/build/src/cli/deployCommands.js +531 -0
- package/build/src/cli/index.d.ts +4 -0
- package/build/src/cli/index.d.ts.map +1 -0
- package/build/src/cli/index.js +20 -0
- package/build/src/cli/initCommand.d.ts +3 -0
- package/build/src/cli/initCommand.d.ts.map +1 -0
- package/build/src/cli/initCommand.js +76 -0
- package/build/src/cli/inputTypes.d.ts +24 -0
- package/build/src/cli/inputTypes.d.ts.map +1 -0
- package/build/src/cli/inputTypes.js +273 -0
- package/build/src/cli/io.d.ts +38 -0
- package/build/src/cli/io.d.ts.map +1 -0
- package/build/src/cli/io.js +226 -0
- package/build/src/cli/templates.d.ts +6 -0
- package/build/src/cli/templates.d.ts.map +1 -0
- package/build/src/cli/templates.js +34 -0
- package/build/src/cli/typesCommand.d.ts +4 -0
- package/build/src/cli/typesCommand.d.ts.map +1 -0
- package/build/src/cli/typesCommand.js +385 -0
- package/build/src/cli/version.d.ts +2 -0
- package/build/src/cli/version.d.ts.map +1 -0
- package/build/src/cli/version.js +25 -0
- package/build/src/core.d.ts +1 -1
- package/build/src/core.d.ts.map +1 -1
- package/build/src/deploy/apply.d.ts +3 -0
- package/build/src/deploy/apply.d.ts.map +1 -1
- package/build/src/deploy/apply.js +2 -0
- package/build/src/deploy/destroy.d.ts.map +1 -1
- package/build/src/deploy/destroy.js +6 -0
- package/build/src/deploy/executors.live.d.ts.map +1 -1
- package/build/src/deploy/executors.live.js +49 -3
- package/build/src/deploy/readers.live.d.ts.map +1 -1
- package/build/src/deploy/readers.live.js +16 -0
- package/build/src/index.d.ts +4 -2
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +2 -1
- package/build/src/refs.d.ts +4 -1
- package/build/src/refs.d.ts.map +1 -1
- package/build/src/refs.js +5 -0
- package/build/src/resources/bundle.d.ts +4 -2
- package/build/src/resources/bundle.d.ts.map +1 -1
- package/build/src/resources/bundle.js +11 -2
- package/build/src/resources/connector.d.ts.map +1 -1
- package/build/src/resources/connector.js +3 -2
- package/build/src/resources/segment.d.ts +24 -0
- package/build/src/resources/segment.d.ts.map +1 -0
- package/build/src/resources/segment.js +34 -0
- package/build/src/resources/worker.d.ts.map +1 -1
- package/build/src/resources/worker.js +14 -7
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -4
- package/templates/blank/package.json +3 -3
- package/templates/full/README.md +21 -20
- package/templates/full/apps/dashboard/index.html +1 -1
- package/templates/full/apps/dashboard/package.json +18 -3
- package/templates/full/apps/dashboard/src/App.tsx +57 -0
- package/templates/full/apps/dashboard/src/index.css +4 -0
- package/templates/full/apps/dashboard/src/main.tsx +13 -7
- package/templates/full/apps/dashboard/tailwind.config.ts +13 -0
- package/templates/full/apps/dashboard/tsconfig.json +10 -3
- package/templates/full/apps/dashboard/vite.config.ts +22 -0
- package/templates/full/package.json +3 -3
- package/templates/full/workers/webhook/package.json +12 -1
- package/templates/full/workers/webhook/src/index.ts +53 -0
- package/templates/full/workers/webhook/tsconfig.json +14 -0
- package/templates/full/workers/webhook.ts +9 -7
- package/templates/full/apps/dashboard/package-lock.json +0 -1080
- package/templates/full/workers/webhook/index.js +0 -12
- package/templates/full/workers/webhook/package-lock.json +0 -12
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { printJsonSchemaInput, printJsonSchemaType } from "./inputTypes.js";
|
|
4
|
+
import { handleApiCall, info, success } from "./io.js";
|
|
5
|
+
// Composite natives surfaced via dedicated SDK syntax / scope helpers —
|
|
6
|
+
// excluded so we don't double-register them. Mirrors the codegen exclusion
|
|
7
|
+
// list in `packages/workflow-sdk/scripts/generateNativeIntegration.ts`
|
|
8
|
+
// (everything in the `logic` category gets dedicated syntax instead of
|
|
9
|
+
// going through `native.<slug>`).
|
|
10
|
+
const COMPOSITE_NATIVE = new Set([
|
|
11
|
+
"start",
|
|
12
|
+
"end",
|
|
13
|
+
"agent",
|
|
14
|
+
"balance",
|
|
15
|
+
"branch",
|
|
16
|
+
"delay",
|
|
17
|
+
"filter",
|
|
18
|
+
"group",
|
|
19
|
+
"humanReview",
|
|
20
|
+
"memory",
|
|
21
|
+
"split",
|
|
22
|
+
"switch",
|
|
23
|
+
"tool",
|
|
24
|
+
"variables",
|
|
25
|
+
]);
|
|
26
|
+
// Native actions the SDK already ships typed declarations + registrations
|
|
27
|
+
// for (platform-level, identical in every workspace) — skipped so the
|
|
28
|
+
// synced `.d.ts` doesn't redeclare `Native` properties with conflicting
|
|
29
|
+
// (looser) types. Source of truth lives in
|
|
30
|
+
// `packages/workflow-sdk/src/native/manifest.generated.ts`.
|
|
31
|
+
const BUNDLED_NATIVE = new Set([
|
|
32
|
+
"note",
|
|
33
|
+
"python",
|
|
34
|
+
"scoring",
|
|
35
|
+
"script",
|
|
36
|
+
]);
|
|
37
|
+
export function registerTypesCommand(parent, getApi) {
|
|
38
|
+
parent
|
|
39
|
+
.command("types")
|
|
40
|
+
.description("Generate per-workspace TypeScript types for the Cargo CDK — typed defineConnector/defineModel config + integration actions in workflow bodies")
|
|
41
|
+
.option("--dir <path>", "Repo root the generated files are written into (default: cwd)")
|
|
42
|
+
.option("--out <dir>", "Output subdirectory for generated files (default: .cargo-ai)", ".cargo-ai")
|
|
43
|
+
.action(async (opts) => {
|
|
44
|
+
const api = getApi();
|
|
45
|
+
// Match the other `cdk` commands: `--dir` selects the repo root, and the
|
|
46
|
+
// generated `.cargo-ai` lands there (not wherever the CLI happens to run).
|
|
47
|
+
if (opts.dir !== undefined)
|
|
48
|
+
process.chdir(opts.dir);
|
|
49
|
+
const baseDir = process.cwd();
|
|
50
|
+
const outDir = resolve(baseDir, opts.out);
|
|
51
|
+
info(`Fetching workspace surface…`);
|
|
52
|
+
const payload = await fetchWorkspaceSurface(api);
|
|
53
|
+
mkdirSync(outDir, { recursive: true });
|
|
54
|
+
const typesPath = resolve(outDir, "cargo-types.d.ts");
|
|
55
|
+
writeFileSync(typesPath, renderTypes(payload));
|
|
56
|
+
success(`Wrote ${relativeToBase(baseDir, typesPath)}`);
|
|
57
|
+
const eagerPath = resolve(outDir, "cargo-register.ts");
|
|
58
|
+
writeFileSync(eagerPath, renderEagerRegistration(payload));
|
|
59
|
+
success(`Wrote ${relativeToBase(baseDir, eagerPath)}`);
|
|
60
|
+
info(``);
|
|
61
|
+
info([
|
|
62
|
+
`Next steps:`,
|
|
63
|
+
` 1. Add "${relativeToBase(baseDir, outDir)}/**/*.d.ts" to your tsconfig`,
|
|
64
|
+
` include so the types are picked up (a bare dot-dir path is ignored by`,
|
|
65
|
+
` TypeScript). Enables typed defineConnector/defineModel config.`,
|
|
66
|
+
` 2. To also type integration actions inside workflow bodies, add`,
|
|
67
|
+
` \`import "./${relativeToBase(baseDir, eagerPath).replace(/\.ts$/, ".js")}";\``,
|
|
68
|
+
` to your entry file so the workspace's integrations register at runtime.`,
|
|
69
|
+
].join("\n"));
|
|
70
|
+
info(``);
|
|
71
|
+
const extractorCount = payload.extractorConfigs.reduce((n, e) => n + e.extractors.length, 0);
|
|
72
|
+
info(`Typed ${String(payload.connectorConfigs.length)} connector config(s), ${String(extractorCount)} extractor config(s), ${String(payload.integrations.length)} integration(s), ${String(payload.native.length)} native action(s).`);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
async function fetchWorkspaceSurface(api) {
|
|
76
|
+
const integrationsResult = await handleApiCall(() => api.connection.integration.list({}));
|
|
77
|
+
const nativeIntegrationResult = await handleApiCall(() => api.connection.nativeIntegration.get());
|
|
78
|
+
const rawIntegrations = integrationsResult.integrations;
|
|
79
|
+
const integrations = collectIntegrations(rawIntegrations);
|
|
80
|
+
const native = collectNative(nativeIntegrationResult.nativeIntegration.actions);
|
|
81
|
+
const connectorConfigs = collectConnectorConfigs(rawIntegrations);
|
|
82
|
+
const extractorConfigs = collectExtractorConfigs(rawIntegrations);
|
|
83
|
+
return { integrations, native, connectorConfigs, extractorConfigs };
|
|
84
|
+
}
|
|
85
|
+
// integrationSlug → connector config type. Skips integrations whose schema
|
|
86
|
+
// prints as a bare record (no typing gained — the builder already falls back to
|
|
87
|
+
// that), keeping the generated file to connectors that actually add types.
|
|
88
|
+
function collectConnectorConfigs(integrations) {
|
|
89
|
+
const out = [];
|
|
90
|
+
for (const integration of integrations) {
|
|
91
|
+
const schema = integration.connector?.config?.schema;
|
|
92
|
+
if (schema === undefined)
|
|
93
|
+
continue;
|
|
94
|
+
const typeSrc = printJsonSchemaType(schema);
|
|
95
|
+
if (typeSrc === "Record<string, unknown>")
|
|
96
|
+
continue;
|
|
97
|
+
out.push({
|
|
98
|
+
slug: integration.slug,
|
|
99
|
+
name: trimOrUndefined(integration.name),
|
|
100
|
+
typeSrc,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
out.sort((a, b) => a.slug.localeCompare(b.slug));
|
|
104
|
+
return out;
|
|
105
|
+
}
|
|
106
|
+
// integrationSlug → its extractors' config types. Skips extractors whose schema
|
|
107
|
+
// prints as a bare record, and integrations left with none.
|
|
108
|
+
function collectExtractorConfigs(integrations) {
|
|
109
|
+
const out = [];
|
|
110
|
+
for (const integration of integrations) {
|
|
111
|
+
const extractors = [];
|
|
112
|
+
for (const [slug, extractor] of Object.entries(integration.extractors ?? {}).sort(([a], [b]) => a.localeCompare(b))) {
|
|
113
|
+
const schema = extractor.config?.schema;
|
|
114
|
+
if (schema === undefined)
|
|
115
|
+
continue;
|
|
116
|
+
const typeSrc = printJsonSchemaType(schema);
|
|
117
|
+
if (typeSrc === "Record<string, unknown>")
|
|
118
|
+
continue;
|
|
119
|
+
extractors.push({ slug, typeSrc });
|
|
120
|
+
}
|
|
121
|
+
if (extractors.length === 0)
|
|
122
|
+
continue;
|
|
123
|
+
out.push({ integrationSlug: integration.slug, extractors });
|
|
124
|
+
}
|
|
125
|
+
out.sort((a, b) => a.integrationSlug.localeCompare(b.integrationSlug));
|
|
126
|
+
return out;
|
|
127
|
+
}
|
|
128
|
+
function collectIntegrations(integrations) {
|
|
129
|
+
const out = [];
|
|
130
|
+
for (const integration of integrations) {
|
|
131
|
+
const actionEntries = Object.entries(integration.actions ?? {}).sort(([a], [b]) => a.localeCompare(b));
|
|
132
|
+
if (actionEntries.length === 0)
|
|
133
|
+
continue;
|
|
134
|
+
const actions = actionEntries.map(([slug, raw]) => {
|
|
135
|
+
const meta = raw;
|
|
136
|
+
return {
|
|
137
|
+
slug,
|
|
138
|
+
name: trimOrUndefined(meta.name),
|
|
139
|
+
description: trimOrUndefined(meta.description),
|
|
140
|
+
inputTypeSrc: printJsonSchemaInput(meta.config?.schema),
|
|
141
|
+
};
|
|
142
|
+
});
|
|
143
|
+
out.push({
|
|
144
|
+
slug: integration.slug,
|
|
145
|
+
name: trimOrUndefined(integration.name),
|
|
146
|
+
description: trimOrUndefined(integration.description),
|
|
147
|
+
actions,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
out.sort((a, b) => a.slug.localeCompare(b.slug));
|
|
151
|
+
return out;
|
|
152
|
+
}
|
|
153
|
+
function collectNative(actions) {
|
|
154
|
+
const out = [];
|
|
155
|
+
for (const [slug, meta] of Object.entries(actions)) {
|
|
156
|
+
if (COMPOSITE_NATIVE.has(slug))
|
|
157
|
+
continue;
|
|
158
|
+
if (BUNDLED_NATIVE.has(slug))
|
|
159
|
+
continue;
|
|
160
|
+
const name = meta.name.length > 0 ? meta.name : slug;
|
|
161
|
+
out.push({
|
|
162
|
+
slug,
|
|
163
|
+
name,
|
|
164
|
+
description: trimOrUndefined(meta.description),
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
out.sort((a, b) => a.slug.localeCompare(b.slug));
|
|
168
|
+
return out;
|
|
169
|
+
}
|
|
170
|
+
function trimOrUndefined(value) {
|
|
171
|
+
if (typeof value !== "string")
|
|
172
|
+
return undefined;
|
|
173
|
+
const trimmed = value.trim();
|
|
174
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
175
|
+
}
|
|
176
|
+
const GENERATED_AT = new Date().toISOString();
|
|
177
|
+
const HEADER = `// THIS FILE IS GENERATED by \`cargo-ai cdk types\`. Do not edit by hand.
|
|
178
|
+
// Re-run the command to refresh after adding/removing workspace integrations
|
|
179
|
+
// or connectors.
|
|
180
|
+
// Last regenerated: ${GENERATED_AT}
|
|
181
|
+
|
|
182
|
+
`;
|
|
183
|
+
function renderTypes(payload) {
|
|
184
|
+
const blocks = [];
|
|
185
|
+
// ── @cargo-ai/cdk — typed define* config (connector + extractor schemas) ──
|
|
186
|
+
const cdkLines = [];
|
|
187
|
+
if (payload.connectorConfigs.length > 0) {
|
|
188
|
+
cdkLines.push(` interface ConnectorConfigs {`);
|
|
189
|
+
for (const c of payload.connectorConfigs) {
|
|
190
|
+
const doc = formatJsDoc({ name: c.name ?? c.slug, updatedAt: GENERATED_AT }, " ");
|
|
191
|
+
if (doc !== "")
|
|
192
|
+
cdkLines.push(doc.trimEnd());
|
|
193
|
+
cdkLines.push(` ${jsonKey(c.slug)}: ${c.typeSrc};`);
|
|
194
|
+
}
|
|
195
|
+
cdkLines.push(` }`);
|
|
196
|
+
}
|
|
197
|
+
if (payload.extractorConfigs.length > 0) {
|
|
198
|
+
cdkLines.push(` interface ExtractorConfigs {`);
|
|
199
|
+
for (const e of payload.extractorConfigs) {
|
|
200
|
+
cdkLines.push(` ${jsonKey(e.integrationSlug)}: {`);
|
|
201
|
+
for (const x of e.extractors) {
|
|
202
|
+
cdkLines.push(` ${jsonKey(x.slug)}: ${x.typeSrc};`);
|
|
203
|
+
}
|
|
204
|
+
cdkLines.push(` };`);
|
|
205
|
+
}
|
|
206
|
+
cdkLines.push(` }`);
|
|
207
|
+
}
|
|
208
|
+
if (cdkLines.length > 0) {
|
|
209
|
+
blocks.push([`declare module "@cargo-ai/cdk" {`, ...cdkLines, `}`].join("\n"));
|
|
210
|
+
}
|
|
211
|
+
// ── @cargo-ai/workflow-sdk — integration actions + natives (workflow bodies) ──
|
|
212
|
+
const wfLines = [];
|
|
213
|
+
if (payload.integrations.length > 0) {
|
|
214
|
+
wfLines.push(` interface Integrations {`);
|
|
215
|
+
for (const c of payload.integrations) {
|
|
216
|
+
const intDoc = formatJsDoc({
|
|
217
|
+
name: c.name ?? c.slug,
|
|
218
|
+
description: c.description,
|
|
219
|
+
updatedAt: GENERATED_AT,
|
|
220
|
+
}, " ");
|
|
221
|
+
if (intDoc !== "")
|
|
222
|
+
wfLines.push(intDoc.trimEnd());
|
|
223
|
+
wfLines.push(` ${jsonKey(c.slug)}: {`);
|
|
224
|
+
for (const action of c.actions) {
|
|
225
|
+
const actionDoc = formatJsDoc({
|
|
226
|
+
name: action.name,
|
|
227
|
+
description: action.description,
|
|
228
|
+
category: c.slug,
|
|
229
|
+
updatedAt: GENERATED_AT,
|
|
230
|
+
}, " ");
|
|
231
|
+
if (actionDoc !== "")
|
|
232
|
+
wfLines.push(actionDoc.trimEnd());
|
|
233
|
+
wfLines.push(` ${jsonKey(action.slug)}: IntegrationAction<${action.inputTypeSrc}, Record<string, unknown>>;`);
|
|
234
|
+
}
|
|
235
|
+
wfLines.push(` };`);
|
|
236
|
+
}
|
|
237
|
+
wfLines.push(` }`);
|
|
238
|
+
}
|
|
239
|
+
if (payload.native.length > 0) {
|
|
240
|
+
wfLines.push(` interface Native {`);
|
|
241
|
+
for (const n of payload.native) {
|
|
242
|
+
const doc = formatJsDoc({ name: n.name, description: n.description, updatedAt: GENERATED_AT }, " ");
|
|
243
|
+
if (doc !== "")
|
|
244
|
+
wfLines.push(doc.trimEnd());
|
|
245
|
+
wfLines.push(` ${jsonKey(n.slug)}: NativeAction<Record<string, unknown>, Record<string, unknown>>;`);
|
|
246
|
+
}
|
|
247
|
+
wfLines.push(` }`);
|
|
248
|
+
}
|
|
249
|
+
// The workflow-sdk augmentation needs its builder types imported; `Ref` only
|
|
250
|
+
// when a typed action input references it.
|
|
251
|
+
const preamble = [];
|
|
252
|
+
// The cdk augmentation references `EncryptionRef` at encryption-typed fields.
|
|
253
|
+
if (cdkLines.some((l) => l.includes("EncryptionRef"))) {
|
|
254
|
+
preamble.push(`import type { EncryptionRef } from "@cargo-ai/cdk";`);
|
|
255
|
+
}
|
|
256
|
+
if (wfLines.length > 0) {
|
|
257
|
+
const wfBody = wfLines.join("\n");
|
|
258
|
+
const imports = [
|
|
259
|
+
"IntegrationAction",
|
|
260
|
+
"NativeAction",
|
|
261
|
+
...(wfBody.includes("Ref<") ? ["Ref"] : []),
|
|
262
|
+
];
|
|
263
|
+
preamble.push([
|
|
264
|
+
`import type {`,
|
|
265
|
+
...imports.map((name) => ` ${name},`),
|
|
266
|
+
`} from "@cargo-ai/workflow-sdk";`,
|
|
267
|
+
].join("\n"));
|
|
268
|
+
blocks.push([`declare module "@cargo-ai/workflow-sdk" {`, wfBody, `}`].join("\n"));
|
|
269
|
+
}
|
|
270
|
+
// `declare module` only *augments* an existing module when this file is itself
|
|
271
|
+
// a module. The workflow-sdk import makes it one; when only the cdk block is
|
|
272
|
+
// emitted there's no import, so force module mode with an empty export.
|
|
273
|
+
if (preamble.length === 0)
|
|
274
|
+
preamble.push(`export {};`);
|
|
275
|
+
return `${HEADER.trim()}\n\n${[...preamble, ...blocks].join("\n\n")}\n`;
|
|
276
|
+
}
|
|
277
|
+
function renderEagerRegistration(payload) {
|
|
278
|
+
const lines = [];
|
|
279
|
+
lines.push(HEADER.trim());
|
|
280
|
+
const imports = [];
|
|
281
|
+
if (payload.integrations.length > 0)
|
|
282
|
+
imports.push("registerIntegration");
|
|
283
|
+
if (payload.native.length > 0)
|
|
284
|
+
imports.push("registerNative");
|
|
285
|
+
if (imports.length === 0) {
|
|
286
|
+
lines.push(``);
|
|
287
|
+
lines.push(`// Workspace surface is empty (no custom integrations / natives).`);
|
|
288
|
+
lines.push(``);
|
|
289
|
+
return lines.join("\n");
|
|
290
|
+
}
|
|
291
|
+
lines.push(`import { ${imports.join(", ")} } from "@cargo-ai/workflow-sdk";`);
|
|
292
|
+
lines.push(``);
|
|
293
|
+
for (const c of payload.integrations) {
|
|
294
|
+
lines.push(`registerIntegration(${JSON.stringify(c.slug)}, {`);
|
|
295
|
+
for (const action of c.actions) {
|
|
296
|
+
const displayName = action.name !== undefined && action.name.length > 0
|
|
297
|
+
? action.name
|
|
298
|
+
: `${capitalize(c.slug)} ${humanize(action.slug)}`;
|
|
299
|
+
lines.push(` ${jsonKey(action.slug)}: { name: ${JSON.stringify(displayName)} },`);
|
|
300
|
+
}
|
|
301
|
+
lines.push(`});`);
|
|
302
|
+
}
|
|
303
|
+
for (const n of payload.native) {
|
|
304
|
+
lines.push(`registerNative(${JSON.stringify(n.slug)}, ${JSON.stringify(n.name)});`);
|
|
305
|
+
}
|
|
306
|
+
lines.push(``);
|
|
307
|
+
return lines.join("\n");
|
|
308
|
+
}
|
|
309
|
+
function jsonKey(key) {
|
|
310
|
+
return /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(key) ? key : JSON.stringify(key);
|
|
311
|
+
}
|
|
312
|
+
// Render a JSDoc block above a generated declaration so editors surface the
|
|
313
|
+
// entry's metadata on hover. Returns "" when there's nothing to document.
|
|
314
|
+
function formatJsDoc(doc, indent) {
|
|
315
|
+
const body = [];
|
|
316
|
+
if (doc.name !== undefined && doc.name.trim().length > 0) {
|
|
317
|
+
body.push(doc.name.trim());
|
|
318
|
+
}
|
|
319
|
+
if (doc.description !== undefined && doc.description.trim().length > 0) {
|
|
320
|
+
if (body.length > 0)
|
|
321
|
+
body.push("");
|
|
322
|
+
for (const line of doc.description.split("\n")) {
|
|
323
|
+
body.push(line.trimEnd());
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
const tags = [];
|
|
327
|
+
if (doc.category !== undefined) {
|
|
328
|
+
const cats = Array.isArray(doc.category)
|
|
329
|
+
? doc.category.join(", ")
|
|
330
|
+
: String(doc.category);
|
|
331
|
+
if (cats.trim().length > 0) {
|
|
332
|
+
tags.push(`@category ${cats}`);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
if (doc.author !== undefined && doc.author.trim().length > 0) {
|
|
336
|
+
tags.push(`@author ${doc.author.trim()}`);
|
|
337
|
+
}
|
|
338
|
+
if (doc.version !== undefined && String(doc.version).length > 0) {
|
|
339
|
+
tags.push(`@version ${String(doc.version)}`);
|
|
340
|
+
}
|
|
341
|
+
if (doc.updatedAt !== undefined && doc.updatedAt !== null) {
|
|
342
|
+
const date = doc.updatedAt instanceof Date ? doc.updatedAt : new Date(doc.updatedAt);
|
|
343
|
+
if (!Number.isNaN(date.getTime())) {
|
|
344
|
+
tags.push(`@updated ${date.toISOString().slice(0, 10)}`);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
if (doc.see !== undefined && doc.see.trim().length > 0) {
|
|
348
|
+
tags.push(`@see ${doc.see.trim()}`);
|
|
349
|
+
}
|
|
350
|
+
if (body.length > 0 && tags.length > 0) {
|
|
351
|
+
body.push("");
|
|
352
|
+
}
|
|
353
|
+
body.push(...tags);
|
|
354
|
+
if (body.length === 0)
|
|
355
|
+
return "";
|
|
356
|
+
const out = [`${indent}/**`];
|
|
357
|
+
for (const line of body) {
|
|
358
|
+
const safe = line.replace(/\*\//g, "*\\/");
|
|
359
|
+
out.push(safe.length > 0 ? `${indent} * ${safe}` : `${indent} *`);
|
|
360
|
+
}
|
|
361
|
+
out.push(`${indent} */`);
|
|
362
|
+
return `${out.join("\n")}\n`;
|
|
363
|
+
}
|
|
364
|
+
function capitalize(s) {
|
|
365
|
+
if (s.length === 0)
|
|
366
|
+
return s;
|
|
367
|
+
const first = s[0];
|
|
368
|
+
if (first === undefined)
|
|
369
|
+
return s;
|
|
370
|
+
return first.toUpperCase() + s.slice(1);
|
|
371
|
+
}
|
|
372
|
+
function humanize(slug) {
|
|
373
|
+
return slug
|
|
374
|
+
.replace(/([A-Z])/g, " $1")
|
|
375
|
+
.replace(/[_-]+/g, " ")
|
|
376
|
+
.trim()
|
|
377
|
+
.toLowerCase();
|
|
378
|
+
}
|
|
379
|
+
function relativeToBase(base, path) {
|
|
380
|
+
if (path.startsWith(base)) {
|
|
381
|
+
const rel = path.slice(base.length);
|
|
382
|
+
return rel.startsWith("/") ? rel.slice(1) : rel;
|
|
383
|
+
}
|
|
384
|
+
return path;
|
|
385
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/cli/version.ts"],"names":[],"mappings":"AAOA,wBAAgB,cAAc,IAAI,MAAM,CAkBvC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
// Read this package's version by walking up to the nearest `@cargo-ai/cdk`
|
|
5
|
+
// package.json — a walk (not a fixed relative path) so it's independent of build
|
|
6
|
+
// layout depth.
|
|
7
|
+
export function packageVersion() {
|
|
8
|
+
let cursor = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
for (let i = 0; i < 8; i += 1) {
|
|
10
|
+
try {
|
|
11
|
+
const pkg = JSON.parse(readFileSync(join(cursor, "package.json"), "utf-8"));
|
|
12
|
+
if (pkg.name === "@cargo-ai/cdk" && typeof pkg.version === "string") {
|
|
13
|
+
return pkg.version;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
// no package.json here (or unreadable) — keep walking up
|
|
18
|
+
}
|
|
19
|
+
const parent = dirname(cursor);
|
|
20
|
+
if (parent === cursor)
|
|
21
|
+
break;
|
|
22
|
+
cursor = parent;
|
|
23
|
+
}
|
|
24
|
+
return "0.0.0";
|
|
25
|
+
}
|
package/build/src/core.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type Token = {
|
|
|
5
5
|
};
|
|
6
6
|
export declare function token(resourceId: string, field: string): Token;
|
|
7
7
|
export declare function isToken(value: unknown): value is Token;
|
|
8
|
-
export type ResourceKind = "connector" | "model" | "agent" | "play" | "tool" | "mcpServer" | "folder" | "file" | "worker" | "app" | "context" | "capacity" | "territory";
|
|
8
|
+
export type ResourceKind = "connector" | "model" | "agent" | "play" | "tool" | "mcpServer" | "folder" | "file" | "worker" | "app" | "context" | "capacity" | "territory" | "segment";
|
|
9
9
|
export type ResourceNode = {
|
|
10
10
|
readonly id: string;
|
|
11
11
|
readonly kind: ResourceKind;
|
package/build/src/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/core.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,CAAC,OA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AK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAM3D;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAmBtD"}
|
|
@@ -44,6 +44,9 @@ export type Executors = {
|
|
|
44
44
|
territory(spec: Record<string, unknown>, prior: StateEntry | undefined): Promise<Outputs & {
|
|
45
45
|
uuid: string;
|
|
46
46
|
}>;
|
|
47
|
+
segment(spec: Record<string, unknown>, prior: StateEntry | undefined): Promise<Outputs & {
|
|
48
|
+
uuid: string;
|
|
49
|
+
}>;
|
|
47
50
|
};
|
|
48
51
|
export type ApplyResult = {
|
|
49
52
|
state: State;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/deploy/apply.ts"],"names":[],"mappings":"AAgBA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,UAAU,EAChB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAK7C,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,CACP,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,KAAK,EAAE,UAAU,GAAG,SAAS,GAC5B,OAAO,CAAC,OAAO,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5D,KAAK,CACH,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,KAAK,EAAE,UAAU,GAAG,SAAS,GAC5B,OAAO,CAAC,OAAO,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvC,KAAK,CACH,IAAI,EAAE,MAAM,CAAC,MAAM,E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E,WAAW,EACrB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,GAC1C,OAAO,CAAC,WAAW,CAAC,CA6HtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"destroy.d.ts","sourceRoot":"","sources":["../../../src/deploy/destroy.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAMzC,MAAM,MAAM,aAAa,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"destroy.d.ts","sourceRoot":"","sources":["../../../src/deploy/destroy.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAMzC,MAAM,MAAM,aAAa,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AA8GtE;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,MAAM,EAAE,GACZ,OAAO,CAAC,aAAa,CAAC,CA4BxB;AAED;;;GAGG;AACH,wBAAsB,OAAO,CAC3B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,GAAG,EACR,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,GAC7B,OAAO,CAAC,aAAa,CAAC,CA4BxB"}
|
|
@@ -12,6 +12,7 @@ const REMOVE_ORDER = [
|
|
|
12
12
|
"context",
|
|
13
13
|
"capacity",
|
|
14
14
|
"territory",
|
|
15
|
+
"segment",
|
|
15
16
|
"play",
|
|
16
17
|
"agent",
|
|
17
18
|
"mcpServer",
|
|
@@ -95,6 +96,11 @@ async function remove(api, kind, uuid) {
|
|
|
95
96
|
return api.revenueOrganization.capacity.remove(uuid);
|
|
96
97
|
case "territory":
|
|
97
98
|
return api.revenueOrganization.territory.remove(uuid);
|
|
99
|
+
case "segment":
|
|
100
|
+
// Fails with `segmentLinkedToWorkflow` if a play/workflow still uses it —
|
|
101
|
+
// the error is surfaced (destroy prunes dependents first, so a CDK-managed
|
|
102
|
+
// play is already gone by the time its segment is removed).
|
|
103
|
+
return api.segmentation.segment.remove(uuid);
|
|
98
104
|
}
|
|
99
105
|
}
|
|
100
106
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executors.live.d.ts","sourceRoot":"","sources":["../../../src/deploy/executors.live.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"executors.live.d.ts","sourceRoot":"","sources":["../../../src/deploy/executors.live.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAIzC,OAAO,KAAK,EAAE,SAAS,EAAW,MAAM,YAAY,CAAC;AA4BrD,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,SAAS,CA4qBjD"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// Each executor receives the token-resolved spec (real uuids in place of tokens)
|
|
3
3
|
// and the prior state entry, and decides: prior uuid → update; else (connector/
|
|
4
4
|
// model, which have addressable slugs) exists-by-slug → adopt; else create.
|
|
5
|
+
// Explicit connector adopt (`adopt: true`) links the integration's default
|
|
6
|
+
// connector first, falling back to a slug match.
|
|
5
7
|
//
|
|
6
8
|
// This is the only file that imports @cargo-ai/api. Workspace is implicit — the
|
|
7
9
|
// authenticated client already sends the selected-workspace-uuid header.
|
|
@@ -61,15 +63,25 @@ export function liveExecutors(api) {
|
|
|
61
63
|
}
|
|
62
64
|
return out;
|
|
63
65
|
}
|
|
64
|
-
const
|
|
66
|
+
const explicitAdopt = spec["adopt"] === true;
|
|
67
|
+
const adopt = explicitAdopt ||
|
|
65
68
|
(await api.connection.connector.existsBySlug({ slug })).exists;
|
|
66
69
|
if (adopt) {
|
|
67
70
|
const { connectors } = await api.connection.connector.list({
|
|
68
71
|
integrationSlug,
|
|
69
72
|
});
|
|
70
|
-
|
|
73
|
+
// Explicit adopt (the OAuth escape hatch) links whatever connector the
|
|
74
|
+
// workspace already treats as default for this integration, falling back
|
|
75
|
+
// to a slug match. Implicit adopt (a same-slug connector already exists)
|
|
76
|
+
// recovers that exact slot, so it stays a strict slug match.
|
|
77
|
+
const found = explicitAdopt
|
|
78
|
+
? (connectors.find((c) => c.isDefault === true) ??
|
|
79
|
+
connectors.find((c) => c.slug === slug))
|
|
80
|
+
: connectors.find((c) => c.slug === slug);
|
|
71
81
|
if (found === undefined) {
|
|
72
|
-
throw new Error(
|
|
82
|
+
throw new Error(explicitAdopt
|
|
83
|
+
? `no connector found to adopt for integration "${integrationSlug}"`
|
|
84
|
+
: `connector "${slug}" reported to exist but was not found`);
|
|
73
85
|
}
|
|
74
86
|
// Mark as adopted — the CDK linked an existing connector it didn't
|
|
75
87
|
// create, so destroy must release it rather than delete it.
|
|
@@ -573,6 +585,40 @@ export function liveExecutors(api) {
|
|
|
573
585
|
const created = await api.revenueOrganization.territory.create(base);
|
|
574
586
|
return { uuid: created.territory.uuid };
|
|
575
587
|
},
|
|
588
|
+
// A segmentation segment (a named filter over a model). The model is fixed at
|
|
589
|
+
// create; everything else updates. No user-set slug (the server derives one
|
|
590
|
+
// from the name), so identity is prior.uuid; otherwise adopt by name.
|
|
591
|
+
async segment(spec, prior) {
|
|
592
|
+
const name = str(spec["name"]);
|
|
593
|
+
if (prior !== undefined) {
|
|
594
|
+
// model is immutable — update omits it.
|
|
595
|
+
await api.segmentation.segment.update({
|
|
596
|
+
uuid: prior.uuid,
|
|
597
|
+
name,
|
|
598
|
+
filter: spec["filter"],
|
|
599
|
+
sort: (spec["sort"] ?? null),
|
|
600
|
+
limit: (spec["limit"] ?? null),
|
|
601
|
+
trackingColumnSlugs: (spec["trackingColumnSlugs"] ?? null),
|
|
602
|
+
columnSlugs: (spec["columnSlugs"] ?? null),
|
|
603
|
+
});
|
|
604
|
+
return carryAdopted({ uuid: prior.uuid }, prior);
|
|
605
|
+
}
|
|
606
|
+
const { segments } = await api.segmentation.segment.all();
|
|
607
|
+
const found = segments.find((s) => s.name === name);
|
|
608
|
+
if (found !== undefined) {
|
|
609
|
+
return { uuid: found.uuid, adopted: "true" };
|
|
610
|
+
}
|
|
611
|
+
const created = await api.segmentation.segment.create({
|
|
612
|
+
name,
|
|
613
|
+
modelUuid: str(spec["modelUuid"]),
|
|
614
|
+
filter: spec["filter"],
|
|
615
|
+
sort: (spec["sort"] ?? undefined),
|
|
616
|
+
limit: (spec["limit"] ?? undefined),
|
|
617
|
+
trackingColumnSlugs: (spec["trackingColumnSlugs"] ?? undefined),
|
|
618
|
+
columnSlugs: (spec["columnSlugs"] ?? undefined),
|
|
619
|
+
});
|
|
620
|
+
return { uuid: created.segment.uuid };
|
|
621
|
+
},
|
|
576
622
|
};
|
|
577
623
|
}
|
|
578
624
|
// Carry the "adopted" marker forward across an update so destroy keeps releasing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readers.live.d.ts","sourceRoot":"","sources":["../../../src/deploy/readers.live.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAGzC,OAAO,EAA8B,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAoD5E,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"readers.live.d.ts","sourceRoot":"","sources":["../../../src/deploy/readers.live.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAGzC,OAAO,EAA8B,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAoD5E,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,WAAW,CAwRjD"}
|
|
@@ -298,5 +298,21 @@ export function liveReaders(api) {
|
|
|
298
298
|
return goneOrThrow(error);
|
|
299
299
|
}
|
|
300
300
|
},
|
|
301
|
+
async segment(entry) {
|
|
302
|
+
try {
|
|
303
|
+
const { segment } = await api.segmentation.segment.get(entry.uuid);
|
|
304
|
+
return present(pick(segment, [
|
|
305
|
+
"name",
|
|
306
|
+
"slug",
|
|
307
|
+
"modelUuid",
|
|
308
|
+
"filter",
|
|
309
|
+
"sort",
|
|
310
|
+
"limit",
|
|
311
|
+
]));
|
|
312
|
+
}
|
|
313
|
+
catch (error) {
|
|
314
|
+
return goneOrThrow(error);
|
|
315
|
+
}
|
|
316
|
+
},
|
|
301
317
|
};
|
|
302
318
|
}
|
package/build/src/index.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export type { ExtractorConfigs, ModelHandle, ModelSpec, } from "./resources/mode
|
|
|
18
18
|
export { defineModel } from "./resources/model.js";
|
|
19
19
|
export type { PlayHandle, PlaySpec } from "./resources/play.js";
|
|
20
20
|
export { definePlay } from "./resources/play.js";
|
|
21
|
+
export type { SegmentHandle, SegmentSpec } from "./resources/segment.js";
|
|
22
|
+
export { defineSegment } from "./resources/segment.js";
|
|
21
23
|
export type { TerritoryColor, TerritoryHandle, TerritoryMemberSpec, TerritorySpec, } from "./resources/territory.js";
|
|
22
24
|
export { defineTerritory } from "./resources/territory.js";
|
|
23
25
|
export type { ToolHandle, ToolSpec, ToolTriggerSpec, WorkflowDefinition, } from "./resources/tool.js";
|
|
@@ -28,7 +30,7 @@ export { createWorker, OpenAPIRoute } from "@cargo-ai/worker-sdk";
|
|
|
28
30
|
export { agentRef, defineWorkflow, toolRef, type WorkflowResourceRef, } from "@cargo-ai/workflow-sdk";
|
|
29
31
|
export type { EncryptionRef, ResourceKind, ResourceNode, SecretRef, Token, } from "./core.js";
|
|
30
32
|
export { env, isSecret, isToken, resolveSecrets, secret, token, } from "./core.js";
|
|
31
|
-
export type { AgentRef, ConnectorRef, DatasetRef, FolderRef, MemberRef, ModelRef, PlayRef, ResourceRef, ToolRef, } from "./refs.js";
|
|
32
|
-
export { connectorRef, datasetRef, folderRef, memberRef, modelRef, playRef, refUuid, } from "./refs.js";
|
|
33
|
+
export type { AgentRef, ConnectorRef, DatasetRef, FolderRef, MemberRef, ModelRef, PlayRef, ResourceRef, SegmentRef, ToolRef, } from "./refs.js";
|
|
34
|
+
export { connectorRef, datasetRef, folderRef, memberRef, modelRef, playRef, refUuid, segmentRef, } from "./refs.js";
|
|
33
35
|
export * from "./deploy/index.js";
|
|
34
36
|
//# sourceMappingURL=index.d.ts.map
|
package/build/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAUA,YAAY,EACV,aAAa,EACb,WAAW,EACX,SAAS,EACT,QAAQ,EACR,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,OAAO,GACR,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,YAAY,EACV,0BAA0B,EAC1B,aAAa,EACb,cAAc,EACd,YAAY,GACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,aAAa,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAA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