@nodetool-ai/cli-apps 0.0.0-stage → 0.8.9-bootstrap.0

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 (39) hide show
  1. package/README.md +12 -2
  2. package/dist/.nodetool-build-stamp +1 -0
  3. package/dist/app-build/bundle.d.ts +15 -0
  4. package/dist/app-build/bundle.d.ts.map +1 -0
  5. package/dist/app-build/bundle.js +44 -0
  6. package/dist/app-build/bundle.js.map +1 -0
  7. package/dist/app-build/watch.d.ts +13 -0
  8. package/dist/app-build/watch.d.ts.map +1 -0
  9. package/dist/app-build/watch.js +25 -0
  10. package/dist/app-build/watch.js.map +1 -0
  11. package/dist/app-debug/app-target.d.ts +14 -0
  12. package/dist/app-debug/app-target.d.ts.map +1 -0
  13. package/dist/app-debug/app-target.js +120 -0
  14. package/dist/app-debug/app-target.js.map +1 -0
  15. package/dist/app-debug/harness.d.ts +29 -0
  16. package/dist/app-debug/harness.d.ts.map +1 -0
  17. package/dist/app-debug/harness.js +115 -0
  18. package/dist/app-debug/harness.js.map +1 -0
  19. package/dist/app-debug/index.d.ts +12 -0
  20. package/dist/app-debug/index.d.ts.map +1 -0
  21. package/dist/app-debug/index.js +9 -0
  22. package/dist/app-debug/index.js.map +1 -0
  23. package/dist/commands/app.d.ts +3 -0
  24. package/dist/commands/app.d.ts.map +1 -0
  25. package/dist/commands/app.js +405 -0
  26. package/dist/commands/app.js.map +1 -0
  27. package/dist/commands/apps.d.ts +15 -0
  28. package/dist/commands/apps.d.ts.map +1 -0
  29. package/dist/commands/apps.js +274 -0
  30. package/dist/commands/apps.js.map +1 -0
  31. package/dist/index.d.ts +19 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +16 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/nodetool.d.ts +3 -0
  36. package/dist/nodetool.d.ts.map +1 -0
  37. package/dist/nodetool.js +4 -0
  38. package/dist/nodetool.js.map +1 -0
  39. package/package.json +69 -4
@@ -0,0 +1,405 @@
1
+ /**
2
+ * `nodetool app debug` and `nodetool app build` — the two app-builder harness
3
+ * commands.
4
+ *
5
+ * Runs a mini app headlessly: validates every widget binding against its
6
+ * workflows' inputs/outputs/variables, simulates the app's interactions (a Run
7
+ * button click by default, or a scripted `--interact` sequence), executes the
8
+ * workflows on the kernel runner, and reports each widget's final value. Writes
9
+ * a debug bundle and prints an agent-friendly verdict.
10
+ *
11
+ * The debug target can be an application id, an ApplicationBundle JSON file,
12
+ * or — legacy — a workflow id or workflow file whose `app_doc` is lifted into
13
+ * an application document. `build` goes the other way: a prompt or a
14
+ * `spec.json` becomes a verified `ApplicationBundle`, via `buildApp` in
15
+ * `@nodetool-ai/agents`. Its Run stage executes on the kernel, so it carries the
16
+ * same `--supervise` flags every run-shaped command does; the handle goes to
17
+ * `ExecutionSessionOptions.supervisor` inside the runner, never to `buildApp`.
18
+ * Heavy dependencies load lazily inside each action so command registration
19
+ * stays light and unit-testable.
20
+ */
21
+ import { resolve } from "node:path";
22
+ import { formatSupervisedSummary } from "@nodetool-ai/execution/debug";
23
+ import { addSupervisorOptions, parseSupervisorFlags } from "@nodetool-ai/cli-execution/supervisor";
24
+ import { numericOptionParser, parseNumericOption } from "@nodetool-ai/cli-common/numeric-options";
25
+ import { printCommandError } from "@nodetool-ai/pack-manager/command-errors";
26
+ import { trimHyphens } from "@nodetool-ai/cli-common/trimHyphens";
27
+ export function registerAppCommands(program) {
28
+ const app = program
29
+ .command("app")
30
+ .description("Work with app-builder mini apps");
31
+ app
32
+ .command("debug <application_id_or_file>")
33
+ .description("Run a mini app headlessly (validate widget wiring, simulate interactions, execute the workflows) and collect a debug bundle. Takes an application id, an ApplicationBundle JSON file, or a workflow id/file carrying a legacy app_doc")
34
+ .option("--params <json>", 'Reactive values applied before interactions, keyed by input name; a "resource:<binding id>" key seeds that collection with an array of items')
35
+ .option("--interact <json>", 'Scripted interaction steps: set, change, click, run (by operation id), cancel, seedResource — e.g. \'[{"set":{"key":"prompt","value":"hi"}},{"run":"main"}]\'')
36
+ .option("--no-run", "Static wiring check only — never execute the workflow")
37
+ .option("--out <dir>", "Bundle output directory (default: nodetool-debug/app-<id>-<timestamp>)")
38
+ .option("--timeout <ms>", "Per-run timeout in milliseconds", numericOptionParser("--timeout", { integer: true, min: 0 }))
39
+ .option("--json", "Print the full AppDebugReport as JSON to stdout")
40
+ .action(async (ref, opts) => {
41
+ try {
42
+ const { initDb, migrateSqliteDb, Application, Workflow, WorkflowVersion, AppRunError, resolveAppInstanceApplicationId } = await import("@nodetool-ai/models");
43
+ const { initMasterKey } = await import("@nodetool-ai/security");
44
+ const { getDefaultDbPath } = await import("@nodetool-ai/config");
45
+ const { runAppDebug } = await import("../app-debug/index.js");
46
+ const { debugGraphOf } = await import("@nodetool-ai/execution/app-debug");
47
+ const dbPath = getDefaultDbPath();
48
+ await migrateSqliteDb(dbPath);
49
+ initDb(dbPath);
50
+ try {
51
+ await initMasterKey();
52
+ }
53
+ catch {
54
+ // Secret decryption is best-effort for debug runs; a missing master
55
+ // key only affects nodes that need secrets.
56
+ }
57
+ const params = opts.params
58
+ ? JSON.parse(opts.params)
59
+ : undefined;
60
+ const interact = opts.interact
61
+ ? JSON.parse(opts.interact)
62
+ : undefined;
63
+ const debugOptions = {
64
+ params,
65
+ interact,
66
+ run: opts.run
67
+ };
68
+ if (opts.out) {
69
+ debugOptions.outDir = opts.out;
70
+ }
71
+ if (opts.timeout) {
72
+ debugOptions.timeoutMs = opts.timeout;
73
+ }
74
+ const report = await runAppDebug(ref, debugOptions, {
75
+ loadFromDb: async (id, version) => {
76
+ const workflow = await Workflow.find("1", id);
77
+ if (!workflow) {
78
+ return null;
79
+ }
80
+ const pinned = version === undefined ? null : await WorkflowVersion.findByVersion(id, version);
81
+ if (version !== undefined && (!pinned || pinned.user_id !== workflow.user_id)) {
82
+ return null;
83
+ }
84
+ const graph = debugGraphOf(pinned?.graph ?? workflow.graph);
85
+ return graph ? { graph, app_doc: workflow.app_doc } : null;
86
+ },
87
+ loadApplication: async (id) => {
88
+ let applicationId;
89
+ try {
90
+ applicationId = await resolveAppInstanceApplicationId("1", id);
91
+ }
92
+ catch (error) {
93
+ if (error instanceof AppRunError && error.code === "not_found") {
94
+ return null;
95
+ }
96
+ throw error;
97
+ }
98
+ const application = await Application.findById(applicationId);
99
+ return application?.user_id === "1"
100
+ ? {
101
+ id: application.id,
102
+ name: application.name,
103
+ description: application.description,
104
+ document: application.document
105
+ }
106
+ : null;
107
+ },
108
+ onLog: (line) => console.error(line.trimEnd())
109
+ });
110
+ if (opts.json) {
111
+ console.log(JSON.stringify(report, null, 2));
112
+ }
113
+ else {
114
+ printAppSummary(report);
115
+ }
116
+ process.exit(report.verdict.ok ? 0 : 1);
117
+ }
118
+ catch (e) {
119
+ process.exit(printCommandError(e, opts.json));
120
+ }
121
+ });
122
+ const build = app
123
+ .command("build <prompt_or_spec_file>")
124
+ .addHelpText("after", "\nNo-cost fixed greeting fixture (ignores the prompt):\n nodetool packs add audio --yes\n nodetool app build \"greeting fixture\" --provider fake --model fake-app-greeting --no-judge\n\nThe audio pack supplies the required Output node.\nAuthoring guide: nodetool skills read nodetool-app-builder\n")
125
+ .description("Build a mini app from a prompt (or a spec.json) and verify it: plan the workflows, author the app, check its wiring, run every interaction, and write an ApplicationBundle plus a build report. Exits 0 only when the verdict is ok")
126
+ .option("-p, --provider <name>", "Builder provider id (e.g. anthropic)")
127
+ .option("-m, --model <id>", "Builder model id")
128
+ .option("--judge-model <provider/model>", "Model that judges each interaction (env: NODETOOL_APP_JUDGE_MODEL; default: a configured model other than the builder's)")
129
+ .option("--workflow <id>", "Pin an existing workflow (repeatable, in operation order) — Plan binds it instead of planning", (value, previous = []) => [...previous, value])
130
+ .option("--max-repairs <n>", "Repair rounds allowed after the first pass")
131
+ .option("--cost-cap <usd>", "Ceiling on what the build may spend")
132
+ .option("--timeout <ms>", "Wall clock for the whole build")
133
+ .option("--out <dir>", "Bundle output directory (default: nodetool-debug/app-build-<slug>-<timestamp>)")
134
+ .option("--json", "Print the full BuildReport as JSON to stdout")
135
+ .option("--no-judge", "Skip the judge stage")
136
+ .option("--watch", "Re-build on spec-file change and print a diff of the verdict (spec-file targets only)");
137
+ // The Run stage executes on the kernel, so the same five supervisor flags
138
+ // every run-shaped command carries apply here too.
139
+ addSupervisorOptions(build).action(async (ref, opts) => {
140
+ try {
141
+ process.exit(await runAppBuild(ref, opts));
142
+ }
143
+ catch (e) {
144
+ process.exit(printCommandError(e, opts.json));
145
+ }
146
+ });
147
+ }
148
+ /**
149
+ * The `app build` action. Returns the process exit code.
150
+ *
151
+ * Everything a build needs — providers, the registry, the processing context —
152
+ * is set up once and reused, so `--watch` re-runs only the build itself.
153
+ */
154
+ async function runAppBuild(ref, opts) {
155
+ if (!opts.provider || !opts.model) {
156
+ console.error("--provider and --model are required");
157
+ return 1;
158
+ }
159
+ const model = opts.model;
160
+ const isSpecFile = /\.json$/i.test(ref);
161
+ if (opts.watch && !isSpecFile) {
162
+ console.error(`--watch re-builds on save, so it needs a spec file; "${ref}" is a prompt.`);
163
+ return 1;
164
+ }
165
+ const supervisorConfig = parseSupervisorFlags(opts);
166
+ const bounds = {};
167
+ if (opts.maxRepairs !== undefined) {
168
+ bounds.maxRepairs = parseNumericOption(opts.maxRepairs, "--max-repairs", {
169
+ integer: true,
170
+ min: 0
171
+ });
172
+ }
173
+ if (opts.costCap !== undefined) {
174
+ bounds.costCapUsd = parseNumericOption(opts.costCap, "--cost-cap", {
175
+ min: 0
176
+ });
177
+ }
178
+ if (opts.timeout !== undefined) {
179
+ bounds.timeoutMs = parseNumericOption(opts.timeout, "--timeout", {
180
+ integer: true,
181
+ min: 0
182
+ });
183
+ }
184
+ const [{ buildApp, renderBuildReportMarkdown, resolveJudgeModelSpec, PERMISSION_GATE_CONTEXT_KEY, headlessGate }, { createProviderStrict, buildConfiguredProviders }, { buildFullRegistry }, { runOnServer }, { defaultBuildOutDir, writeBuildBundle, writeRunMessages }, { initDb, Workflow }, { resolveLocalSecret }, { initMasterKey }, { getDefaultAssetsPath, getDefaultDbPath }, { ProcessingContext }, { FileStorageAdapter }] = await Promise.all([
185
+ import("@nodetool-ai/agents"),
186
+ import("@nodetool-ai/cli-providers"),
187
+ import("@nodetool-ai/cli-execution/node-registry"),
188
+ import("@nodetool-ai/cli-execution/debug/server-runner"),
189
+ import("../app-build/bundle.js"),
190
+ import("@nodetool-ai/models"),
191
+ import("@nodetool-ai/cli-local/local-secrets"),
192
+ import("@nodetool-ai/security"),
193
+ import("@nodetool-ai/config"),
194
+ import("@nodetool-ai/runtime"),
195
+ import("@nodetool-ai/storage")
196
+ ]);
197
+ initDb(getDefaultDbPath());
198
+ try {
199
+ await initMasterKey();
200
+ }
201
+ catch {
202
+ // Secret decryption is best-effort; only nodes that need secrets care.
203
+ }
204
+ const buildId = `app-build-${Date.now()}`;
205
+ // In watch mode keep a stable bundle dir so each re-build overwrites rather
206
+ // than littering timestamped directories.
207
+ const outDir = opts.out
208
+ ? resolve(opts.out)
209
+ : opts.watch
210
+ ? resolve(`nodetool-debug/${watchSlug(ref)}-watch`)
211
+ : defaultBuildOutDir(ref);
212
+ const provider = await createProviderStrict(opts.provider);
213
+ const providers = await buildConfiguredProviders();
214
+ const judge = opts.judge === false
215
+ ? { enabled: false }
216
+ : resolveJudge({
217
+ builder: provider,
218
+ builderModel: model,
219
+ explicit: opts.judgeModel,
220
+ providers,
221
+ resolveSpec: resolveJudgeModelSpec
222
+ });
223
+ if (judge.provider && !opts.json) {
224
+ console.error(`judge: ${judge.provider.provider}/${judge.model}`);
225
+ }
226
+ if (supervisorConfig && !opts.json) {
227
+ console.error(`supervisor: ${supervisorConfig.modelSpec}`);
228
+ }
229
+ const registry = await buildFullRegistry();
230
+ const context = new ProcessingContext({
231
+ jobId: buildId,
232
+ workflowId: null,
233
+ userId: "1",
234
+ secretResolver: resolveLocalSecret,
235
+ storage: new FileStorageAdapter(getDefaultAssetsPath())
236
+ });
237
+ context.set(PERMISSION_GATE_CONTEXT_KEY, headlessGate("CLI app build"));
238
+ const runOnce = async () => {
239
+ const buildOptions = {
240
+ provider,
241
+ model,
242
+ context,
243
+ registry,
244
+ providers,
245
+ judge,
246
+ // Supervision reaches the Run stage the way it reaches every other surface:
247
+ // as `ExecutionSessionOptions.supervisor`, configured inside the runner the
248
+ // build executes each interaction on. `buildApp` never sees a handle — it
249
+ // reads back what was decided from the run reports.
250
+ runOnServer: supervisorConfig
251
+ ? (input) => runOnServer({ ...input, supervisor: supervisorConfig })
252
+ : runOnServer,
253
+ loadWorkflow: async (id) => {
254
+ const workflow = (await Workflow.get(id));
255
+ if (!workflow?.graph)
256
+ return null;
257
+ const loaded = { graph: workflow.graph };
258
+ if (workflow.name) {
259
+ loaded.name = workflow.name;
260
+ }
261
+ return loaded;
262
+ },
263
+ ...bounds,
264
+ buildId,
265
+ ledger: { userId: "1" },
266
+ onLog: (line) => {
267
+ if (!opts.json)
268
+ console.error(line.trimEnd());
269
+ },
270
+ onRunMessages: (interaction, runIndex, messages) => writeRunMessages(outDir, interaction, runIndex, messages)
271
+ };
272
+ if (isSpecFile) {
273
+ buildOptions.specPath = ref;
274
+ }
275
+ else {
276
+ buildOptions.prompt = ref;
277
+ }
278
+ if (opts.workflow) {
279
+ buildOptions.pinnedWorkflowIds = opts.workflow;
280
+ }
281
+ const built = await buildApp(buildOptions);
282
+ await writeBuildBundle(outDir, built, renderBuildReportMarkdown(built));
283
+ return built;
284
+ };
285
+ const report = await runOnce();
286
+ if (opts.json) {
287
+ console.log(JSON.stringify(report, null, 2));
288
+ }
289
+ else {
290
+ printBuildSummary(report, outDir);
291
+ }
292
+ if (!opts.watch)
293
+ return report.verdict.ok ? 0 : 1;
294
+ const [{ runWatchLoop }, { snapshotBuildReport }] = await Promise.all([
295
+ import("@nodetool-ai/cli-execution/debug/watch"),
296
+ import("../app-build/watch.js")
297
+ ]);
298
+ await runWatchLoop({
299
+ file: resolve(ref),
300
+ first: report,
301
+ run: runOnce,
302
+ snapshot: snapshotBuildReport,
303
+ statusLabel: "stage",
304
+ log: (line) => console.error(line)
305
+ });
306
+ return 0;
307
+ }
308
+ /** Directory-safe slug for a watched target, mirroring `debug --watch`. */
309
+ function watchSlug(ref) {
310
+ const slug = trimHyphens(ref.replace(/[^a-zA-Z0-9_-]+/g, "-"))
311
+ .slice(0, 40) || "app";
312
+ return `app-build-${slug}`;
313
+ }
314
+ /**
315
+ * Which model judges the build. Availability is the set of configured
316
+ * providers, so the default never picks a model this machine cannot reach; an
317
+ * explicit `--judge-model` naming an unconfigured provider is an error rather
318
+ * than a silent fallback to the builder grading itself.
319
+ */
320
+ function resolveJudge(init) {
321
+ const resolution = init.resolveSpec({
322
+ explicit: init.explicit,
323
+ builderProviderId: init.builder.provider,
324
+ builderModel: init.builderModel,
325
+ isAvailable: (id) => id === init.builder.provider || id in init.providers
326
+ });
327
+ const provider = resolution.providerId === init.builder.provider
328
+ ? init.builder
329
+ : init.providers[resolution.providerId];
330
+ if (!provider) {
331
+ if (init.explicit) {
332
+ throw new Error(`--judge-model names provider "${resolution.providerId}", which is not configured. Configure it or pass a model on ${init.builder.provider}.`);
333
+ }
334
+ return { provider: init.builder, model: init.builderModel };
335
+ }
336
+ return { provider, model: resolution.model };
337
+ }
338
+ function printBuildSummary(report, outDir) {
339
+ const mark = report.verdict.ok ? "✅" : "❌";
340
+ console.log(`\n${mark} ${report.verdict.reason}`);
341
+ console.log(` ${report.spec.title || "(untitled)"} · ${report.spec.operations.length} operation(s) · ${report.spec.widgets.length} widget(s)`);
342
+ for (const stage of report.stages) {
343
+ console.log(` ${stage.stage} (round ${stage.round}): ${stage.status}${stage.detail ? ` — ${stage.detail}` : ""}`);
344
+ }
345
+ const last = report.repairs[report.repairs.length - 1];
346
+ if (last && !report.verdict.ok) {
347
+ console.log("\nOutstanding issues:");
348
+ for (const issue of last.issues) {
349
+ console.log(` - [${issue.stage}/${issue.code}] ${issue.message}`);
350
+ }
351
+ }
352
+ if (report.supervision) {
353
+ console.log(`\n${formatSupervisedSummary(report.supervision.summary)}`);
354
+ for (const entry of report.supervision.byInteraction) {
355
+ for (const item of entry.interventions) {
356
+ console.log(` ${entry.interaction}: ${item.verdict.action} on ${item.escalation.nodeId} (${item.decidedBy})`);
357
+ }
358
+ }
359
+ }
360
+ console.log(`\n cost: $${report.cost.usd.toFixed(4)}`);
361
+ console.log(`\nBuild bundle: ${outDir}`);
362
+ console.log(" report.md / report.json · spec.json" +
363
+ (report.bundle ? " · app.bundle.json" : "") +
364
+ " · interactions/");
365
+ }
366
+ function printAppSummary(report) {
367
+ const mark = report.verdict.ok ? "✅" : "❌";
368
+ console.log(`\n${mark} ${report.verdict.headline}`);
369
+ if (report.app) {
370
+ console.log(` app: ${report.app.title ?? "(untitled)"} · ${report.app.widgetCount} widget(s)`);
371
+ }
372
+ report.runs.forEach((run, i) => {
373
+ console.log(` run ${i + 1}: ${run.status} (${run.summary.counts.errored} node error(s))`);
374
+ });
375
+ for (const inv of report.invocations) {
376
+ const state = inv.timedOutMs != null
377
+ ? `timed out after ${inv.timedOutMs}ms`
378
+ : inv.status;
379
+ console.log(` ${inv.operationId} (${inv.decision}): ${state}`);
380
+ }
381
+ const variables = Object.keys(report.variables);
382
+ if (variables.length > 0) {
383
+ console.log(` variables: ${variables.join(", ")}`);
384
+ }
385
+ const bound = report.widgets.filter((w) => w.bindingMode === "read" && w.binding);
386
+ if (bound.length > 0) {
387
+ const filled = bound.filter((w) => w.hasValue).length;
388
+ console.log(` display widgets with values: ${filled}/${bound.length}`);
389
+ }
390
+ if (report.verdict.issues.length > 0) {
391
+ console.log("\nIssues:");
392
+ for (const issue of report.verdict.issues)
393
+ console.log(` - ${issue}`);
394
+ }
395
+ if (report.validation.warnings.length > 0) {
396
+ console.log("\nWarnings:");
397
+ for (const warning of report.validation.warnings)
398
+ console.log(` - ${warning}`);
399
+ }
400
+ if (report.bundleDir) {
401
+ console.log(`\nDebug bundle: ${report.bundleDir}`);
402
+ console.log(" report.md / report.json · app.json · workflow.json · server/");
403
+ }
404
+ }
405
+ //# sourceMappingURL=app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/commands/app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAOvE,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EAErB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AA0BlE,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,MAAM,GAAG,GAAG,OAAO;SAChB,OAAO,CAAC,KAAK,CAAC;SACd,WAAW,CAAC,iCAAiC,CAAC,CAAC;IAElD,GAAG;SACA,OAAO,CAAC,gCAAgC,CAAC;SACzC,WAAW,CACV,uOAAuO,CACxO;SACA,MAAM,CACL,iBAAiB,EACjB,8IAA8I,CAC/I;SACA,MAAM,CACL,mBAAmB,EACnB,+JAA+J,CAChK;SACA,MAAM,CAAC,UAAU,EAAE,uDAAuD,CAAC;SAC3E,MAAM,CACL,aAAa,EACb,wEAAwE,CACzE;SACA,MAAM,CACL,gBAAgB,EAChB,iCAAiC,EACjC,mBAAmB,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAC5D;SACA,MAAM,CAAC,QAAQ,EAAE,iDAAiD,CAAC;SACnE,MAAM,CAAC,KAAK,EAAE,GAAW,EAAE,IAAwB,EAAE,EAAE;QACtD,IAAI,CAAC;YACH,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,QAAQ,EAAE,eAAe,EAA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AC9C,OAAO,CAAC,GAAG,CAAC,OAAO,OAAO,EAAE,CAAC,CAAC;IAClC,CAAC;IACD,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;QACrB,OAAO,CAAC,GAAG,CAAC,mBAAmB,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;QACnD,OAAO,CAAC,GAAG,CACT,gEAAgE,CACjE,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * `nodetool apps` — application (mini app) bundles from the local database.
3
+ *
4
+ * An ApplicationBundle is one JSON file carrying an app together with the full
5
+ * graph of every workflow its operations bind, so an app ships as a single
6
+ * artifact. Inside the file an operation's `workflowId` is a bundle-local key;
7
+ * importing creates the workflows and rewrites the keys to the new ids.
8
+ *
9
+ * These commands talk to the local DB directly, like `workflows export-bundle`
10
+ * — no running server. The bundle logic itself is pure and lives in
11
+ * `@nodetool-ai/app-runtime`; only the row writing is here.
12
+ */
13
+ import type { Command } from "commander";
14
+ export declare function registerAppsCommands(program: Command): void;
15
+ //# sourceMappingURL=apps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/commands/apps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwHzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA+O3D"}