@anna-ai/cli 0.1.23 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{_lifecycle-shared-sbea9HtH.js → _lifecycle-shared-BpSOfVCP.js} +1 -1
- package/dist/{agent-DyXJhaZ0.js → agent-CaZVCPs6.js} +1 -1
- package/dist/{app-bundle-upload-Cd4ci4rB.js → app-bundle-upload-BhAYo6yj.js} +3 -3
- package/dist/{apps-B57i8xeb.js → apps-3VcdHIBK.js} +3 -3
- package/dist/{apps-cut-BG6Ib3x4.js → apps-cut-BCicQFRY.js} +13 -12
- package/dist/{apps-destructive-DQIFqYE2.js → apps-destructive-DWF4eTHn.js} +4 -4
- package/dist/{apps-discard-BveXHAgF.js → apps-discard-BoY4zMJw.js} +13 -12
- package/dist/{apps-grants-D3i6GxX_.js → apps-grants-DgvymPBT.js} +3 -3
- package/dist/{apps-publish-U_Y7svJw.js → apps-publish-Dgi4lBlu.js} +8 -8
- package/dist/apps-publish-Do7M5je3.js +14 -0
- package/dist/{apps-push-x5reIQHx.js → apps-push-CixatuQG.js} +14 -13
- package/dist/{apps-release-ByIgz6lx.js → apps-release-DJFG4BV3.js} +5 -5
- package/dist/{apps-status-BYo97Nh5.js → apps-status-F6aVlzDW.js} +3 -3
- package/dist/{apps-submit-review-D-cPtZtc.js → apps-submit-review-BVmZlhmB.js} +4 -4
- package/dist/{apps-sync-meta-CTHwGlzI.js → apps-sync-meta-CQQC_Heb.js} +5 -5
- package/dist/{apps-versions-Ca-AAMLL.js → apps-versions-BIKsJzIT.js} +3 -3
- package/dist/{bridge-CBew_Ytl.js → bridge-DxBd0Fl9.js} +1 -1
- package/dist/bridge-hzqNFm9-.js +3 -0
- package/dist/{bundled-executas-BNOKw4kv.js → bundled-executas-B6b8gIfp.js} +1 -1
- package/dist/{bundled-executas-CNaV2C_O.js → bundled-executas-DeBhDjd8.js} +2 -2
- package/dist/cli.js +51 -46
- package/dist/{confirm-C-4haiIg.js → confirm-h_qMrx0I.js} +1 -1
- package/dist/{dev-CyFATq6R.js → dev-3okZmzNM.js} +19 -22
- package/dist/dev-C5r439wM.js +4 -0
- package/dist/{doctor-oqYeEjLv.js → doctor-giNqYnla.js} +10 -22
- package/dist/{executa-cache-WBkCLic7.js → executa-cache-Kx3rfQD-.js} +1 -1
- package/dist/{executa-destructive-Dpo58lxI.js → executa-destructive-PL2ooHpZ.js} +4 -4
- package/dist/{executa-dev-DFp1ckAn.js → executa-dev-Cr9Yepph.js} +10 -9
- package/dist/{executa-install-DnBG8UJA.js → executa-install-DQIhVHPT.js} +2 -2
- package/dist/executa-install-DjXE_-U-.js +7 -0
- package/dist/{executa-publish-BKFq6Hz9.js → executa-publish-CkPAB34b.js} +5 -5
- package/dist/executa-publish-IXWSwva0.js +9 -0
- package/dist/{executa-reads-cd-8ZRjI.js → executa-reads-CjGZq1yP.js} +3 -3
- package/dist/{manifest-hXWnNFHE.js → manifest-Bljz8Y6T.js} +1 -1
- package/dist/nexus-root-BlPwOusj.js +49 -0
- package/dist/{publish-R3JAl9Hm.js → publish-BYWuujP3.js} +11 -11
- package/dist/{server-BzfmXVJD.js → server-Cp7mYV9t.js} +50 -8
- package/dist/{storage-BCj754in.js → storage-CKTmE87u.js} +1 -1
- package/dist/{token-BGjbb2aU.js → token-Cg7BZGp6.js} +2 -2
- package/dist/{working-orchestration-CIpQ_JMY.js → working-orchestration-Dd1ETQ3c.js} +7 -7
- package/package.json +5 -4
- package/dist/apps-publish-D403z305.js +0 -14
- package/dist/bridge-DZmZIWG0.js +0 -3
- package/dist/dev-DdjwQzJ2.js +0 -3
- package/dist/executa-install-viq3kiV7.js +0 -6
- package/dist/executa-publish-DaYvxbbW.js +0 -9
- /package/dist/{app-cache-TcmbIIuL.js → app-cache-Bl7cE5fm.js} +0 -0
- /package/dist/{apps-B1Nd8l_t.js → apps-CCdtLmxQ.js} +0 -0
- /package/dist/{client-Dn9zThOd.js → client-D-_z1ALk.js} +0 -0
- /package/dist/{credentials-DklPMD22.js → credentials-Chkoidh5.js} +0 -0
- /package/dist/{dev-account-CD6hTr7M.js → dev-account-CGo8k9_2.js} +0 -0
- /package/dist/{dev-app-cache-DMQLQ93-.js → dev-app-cache-TSjL4D4n.js} +0 -0
- /package/dist/{executa-cache-BFoUtb4J.js → executa-cache-CXiEgFZY.js} +0 -0
- /package/dist/{executa-init-By0kMPaF.js → executa-init-DXea7yRN.js} +0 -0
- /package/dist/{executa-register-BX29VfcD.js → executa-register-BUiPzPIU.js} +0 -0
- /package/dist/{executas-Cep6KEo0.js → executas-CK3er6f9.js} +0 -0
- /package/dist/{fixture-C9VLX3os.js → fixture-BvP5umlN.js} +0 -0
- /package/dist/{host_upload-wKM0jQoL.js → host_upload-BXeHTgJs.js} +0 -0
- /package/dist/{image-CBSlNb-9.js → image-CSEXEfD-.js} +0 -0
- /package/dist/{login-D4cU2Jcp.js → login-BGZjMAlh.js} +0 -0
- /package/dist/{logout-DOpL3vXX.js → logout-mh2_QlyM.js} +0 -0
- /package/dist/{runner-4-ugGH5e.js → runner-BuYbm-ex.js} +0 -0
- /package/dist/{sampling-finZ8aNJ.js → sampling-BcML4teS.js} +0 -0
- /package/dist/{whoami-DarmijoA.js → whoami-l_kIkfbI.js} +0 -0
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { printMascot } from "./mascot-wlYTJqMs.js";
|
|
3
|
+
import { findMatrixNexusRoot, nexusSchemaDir } from "./nexus-root-BlPwOusj.js";
|
|
3
4
|
import { dirname, extname, join, relative, resolve } from "node:path";
|
|
4
5
|
import { createRequire } from "node:module";
|
|
5
6
|
import { Command } from "commander";
|
|
@@ -62,16 +63,17 @@ function runInit(opts) {
|
|
|
62
63
|
|
|
63
64
|
//#endregion
|
|
64
65
|
//#region src/schema-bundle.ts
|
|
65
|
-
function resolveSchemaDir() {
|
|
66
|
+
function resolveSchemaDir(dirOverride) {
|
|
66
67
|
if (process.env.ANNA_APP_SCHEMA_DIR) return process.env.ANNA_APP_SCHEMA_DIR;
|
|
68
|
+
if (dirOverride) return dirOverride;
|
|
67
69
|
const req = createRequire(import.meta.url);
|
|
68
70
|
const methodsAbs = req.resolve("@anna-ai/app-schema/methods");
|
|
69
71
|
return resolve(dirname(methodsAbs), "..");
|
|
70
72
|
}
|
|
71
|
-
function loadSchemaBundle() {
|
|
73
|
+
function loadSchemaBundle(dirOverride) {
|
|
72
74
|
let dir;
|
|
73
75
|
try {
|
|
74
|
-
dir = resolveSchemaDir();
|
|
76
|
+
dir = resolveSchemaDir(dirOverride);
|
|
75
77
|
} catch (e) {
|
|
76
78
|
throw new Error(`Could not locate @anna-ai/app-schema: ${e.message}\nRun \`pnpm install\` (or set ANNA_APP_SCHEMA_DIR to a local checkout).`);
|
|
77
79
|
}
|
|
@@ -393,8 +395,10 @@ function readBundleSources(dir) {
|
|
|
393
395
|
function runValidate(opts) {
|
|
394
396
|
const errors = [];
|
|
395
397
|
const warnings = [];
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
+
const nexusRoot = findMatrixNexusRoot(opts.matrixNexusRoot, opts.cwd);
|
|
399
|
+
const schemaOverride = nexusRoot ? nexusSchemaDir(nexusRoot) : null;
|
|
400
|
+
const bundle = loadSchemaBundle(schemaOverride ?? void 0);
|
|
401
|
+
console.log(kleur.gray(`[validate] @anna-ai/app-schema dispatcher_version=${bundle.dispatcherVersion} (${bundle.dir})` + (schemaOverride ? " [nexus-source]" : "")));
|
|
398
402
|
const manifest = readManifest(opts.manifestPath);
|
|
399
403
|
const schemaIssues = validateManifestSchema(bundle, manifest);
|
|
400
404
|
for (const i of schemaIssues) errors.push(`schema ${i.path}: ${i.message}`);
|
|
@@ -453,19 +457,20 @@ program.command("init <dir>").description("Scaffold a new Anna App project").opt
|
|
|
453
457
|
});
|
|
454
458
|
process.exit(code);
|
|
455
459
|
});
|
|
456
|
-
program.command("validate").description("Run schema + ACL checks on a manifest+bundle").option("--manifest <path>", "manifest.json path", "manifest.json").option("--bundle <dir>", "bundle directory (default: ./bundle)").option("--strict", "Enable strict checks (host_api ACL grep)", false).action(async (opts) => {
|
|
460
|
+
program.command("validate").description("Run schema + ACL checks on a manifest+bundle").option("--manifest <path>", "manifest.json path", "manifest.json").option("--bundle <dir>", "bundle directory (default: ./bundle)").option("--strict", "Enable strict checks (host_api ACL grep)", false).option("--matrix-nexus-root <path>", "matrix-nexus checkout: validate against its in-tree (possibly unpublished) @anna-ai/app-schema bundle instead of the npm package (auto-detected if omitted; can also use $ANNA_NEXUS_ROOT)").action(async (opts) => {
|
|
457
461
|
const cwd = process.cwd();
|
|
458
462
|
const result = runValidate({
|
|
459
463
|
cwd,
|
|
460
464
|
manifestPath: resolve(cwd, opts.manifest),
|
|
461
465
|
bundleDir: opts.bundle ? resolve(cwd, opts.bundle) : null,
|
|
462
|
-
strict: opts.strict
|
|
466
|
+
strict: opts.strict,
|
|
467
|
+
matrixNexusRoot: opts.matrixNexusRoot
|
|
463
468
|
});
|
|
464
469
|
const code = printResult(result);
|
|
465
470
|
process.exit(code);
|
|
466
471
|
});
|
|
467
472
|
program.command("dev").description("Run a local harness (in-process dispatcher + iframe + SSE relay)").option("--manifest <path>", "manifest.json path", "manifest.json").option("--bundle <dir>", "bundle directory (default: ./bundle)").option("--slug <slug>", "App slug (overrides manifest.slug/name)").option("--view <name>", "View name to open (default: manifest default)").option("--matrix-nexus-root <path>", "matrix-nexus checkout (auto-detected if omitted; can also use $ANNA_NEXUS_ROOT)").option("--port <number>", "HTTP port", "5180").option("--user-id <id>", "Harness user_id", "1").option("--cwd <dir>", "Project root (default: cwd)").option("--no-watch", "Disable bundle file watcher (default: enabled)").option("--executa <spec>", "Explicit executa registration; repeatable. Spec: comma-separated key=value (dir=<path>[,tool_id=<id>][,type=python|node|go|binary][,command=\"<argv>\"]). When only `dir=` is given, the executa is auto-detected from executa.json / pyproject.toml / package.json / go.mod. Overrides directory auto-discovery under <manifest-dir>/executas/.", (val, prev) => prev ? [...prev, val] : [val]).option("--no-llm", "Disable LLM bridge (anna.llm/agent return llm_disabled)").option("--mock-llm <fixture>", "Serve canned LLM responses from a JSONL fixture").option("--llm-account <host>", "Saved account host to use (default: current)").option("--llm-app-slug <slug>", "Override the manifest slug used to register / look up the dev AnnaApp (default: manifest.slug)").option("--storage <mode>", "Storage backend: \"legacy\" (in-memory runtime_state, default) or \"aps\" (real nexus APS via /api/v1/storage/* — requires `anna-app login`).", "legacy").action(async (opts) => {
|
|
468
|
-
const { runDev, parseExecutaSpec } = await import("./dev-
|
|
473
|
+
const { runDev, parseExecutaSpec } = await import("./dev-C5r439wM.js");
|
|
469
474
|
const cwd = opts.cwd ?? process.cwd();
|
|
470
475
|
let executas;
|
|
471
476
|
if (opts.executa && opts.executa.length > 0) {
|
|
@@ -500,7 +505,7 @@ program.command("dev").description("Run a local harness (in-process dispatcher +
|
|
|
500
505
|
});
|
|
501
506
|
const fixture = program.command("fixture").description("Inspect / replay harness recordings (Phase 6)");
|
|
502
507
|
fixture.command("verify <file>").description("Schema + invariant checks on a harness JSONL recording").option("--json", "Emit machine-readable JSON", false).action(async (file, opts) => {
|
|
503
|
-
const { runFixtureVerify } = await import("./fixture-
|
|
508
|
+
const { runFixtureVerify } = await import("./fixture-BvP5umlN.js");
|
|
504
509
|
const code = await runFixtureVerify({
|
|
505
510
|
file,
|
|
506
511
|
json: opts.json
|
|
@@ -508,7 +513,7 @@ fixture.command("verify <file>").description("Schema + invariant checks on a har
|
|
|
508
513
|
process.exit(code);
|
|
509
514
|
});
|
|
510
515
|
fixture.command("summarize <file>").description("Print a human-readable digest of a harness recording").option("--json", "Emit machine-readable JSON", false).action(async (file, opts) => {
|
|
511
|
-
const { runFixtureSummarize } = await import("./fixture-
|
|
516
|
+
const { runFixtureSummarize } = await import("./fixture-BvP5umlN.js");
|
|
512
517
|
const code = await runFixtureSummarize({
|
|
513
518
|
file,
|
|
514
519
|
json: opts.json
|
|
@@ -516,7 +521,7 @@ fixture.command("summarize <file>").description("Print a human-readable digest o
|
|
|
516
521
|
process.exit(code);
|
|
517
522
|
});
|
|
518
523
|
fixture.command("replay <file>").description("Dry-run replay of a harness recording (Phase 6 MVP)").option("--manifest <path>", "manifest.json path", "manifest.json").action(async (file, opts) => {
|
|
519
|
-
const { runFixtureReplay } = await import("./fixture-
|
|
524
|
+
const { runFixtureReplay } = await import("./fixture-BvP5umlN.js");
|
|
520
525
|
const code = await runFixtureReplay({
|
|
521
526
|
file,
|
|
522
527
|
manifest: opts.manifest
|
|
@@ -524,12 +529,12 @@ fixture.command("replay <file>").description("Dry-run replay of a harness record
|
|
|
524
529
|
process.exit(code);
|
|
525
530
|
});
|
|
526
531
|
program.command("doctor").description("Check environment for `anna-app dev` (uv, matrix-nexus, dev key)").option("--matrix-nexus-root <path>", "matrix-nexus checkout (optional)").action(async (opts) => {
|
|
527
|
-
const { runDoctor } = await import("./doctor-
|
|
532
|
+
const { runDoctor } = await import("./doctor-giNqYnla.js");
|
|
528
533
|
const code = await runDoctor({ matrixNexusRoot: opts.matrixNexusRoot });
|
|
529
534
|
process.exit(code);
|
|
530
535
|
});
|
|
531
536
|
program.command("login").description("Device-flow login against a nexus host; saves a PAT to ~/.config/anna/credentials.json").requiredOption("--host <url>", "nexus base URL, e.g. https://nexus.example.com").option("--no-browser", "Do not open a browser window automatically", false).action(async (opts) => {
|
|
532
|
-
const { runLogin } = await import("./login-
|
|
537
|
+
const { runLogin } = await import("./login-BGZjMAlh.js");
|
|
533
538
|
const code = await runLogin({
|
|
534
539
|
host: opts.host,
|
|
535
540
|
noBrowser: opts.browser === false
|
|
@@ -537,7 +542,7 @@ program.command("login").description("Device-flow login against a nexus host; sa
|
|
|
537
542
|
process.exit(code);
|
|
538
543
|
});
|
|
539
544
|
program.command("logout").description("Remove a saved PAT entry").option("--host <url>", "Account to remove (default: current)").option("--all", "Remove every saved account", false).action(async (opts) => {
|
|
540
|
-
const { runLogout } = await import("./logout-
|
|
545
|
+
const { runLogout } = await import("./logout-mh2_QlyM.js");
|
|
541
546
|
const code = await runLogout({
|
|
542
547
|
host: opts.host,
|
|
543
548
|
all: opts.all
|
|
@@ -545,7 +550,7 @@ program.command("logout").description("Remove a saved PAT entry").option("--host
|
|
|
545
550
|
process.exit(code);
|
|
546
551
|
});
|
|
547
552
|
program.command("whoami").description("Show the current account (and any others)").option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
|
|
548
|
-
const { runWhoami } = await import("./whoami-
|
|
553
|
+
const { runWhoami } = await import("./whoami-l_kIkfbI.js");
|
|
549
554
|
const code = await runWhoami({ json: opts.json });
|
|
550
555
|
process.exit(code);
|
|
551
556
|
});
|
|
@@ -561,7 +566,7 @@ executa.command("init <dir>").description("Scaffold a standalone Executa plugin
|
|
|
561
566
|
console.error(`✗ unknown template "${opts.template}" — expected python | node | go`);
|
|
562
567
|
process.exit(2);
|
|
563
568
|
}
|
|
564
|
-
const { runExecutaInit } = await import("./executa-init-
|
|
569
|
+
const { runExecutaInit } = await import("./executa-init-DXea7yRN.js");
|
|
565
570
|
const code = runExecutaInit({
|
|
566
571
|
targetDir: dir,
|
|
567
572
|
slug,
|
|
@@ -572,12 +577,12 @@ executa.command("init <dir>").description("Scaffold a standalone Executa plugin
|
|
|
572
577
|
process.exit(code);
|
|
573
578
|
});
|
|
574
579
|
executa.command("register").description("Register a HARNESS AnnaApp(kind=executa) so `executa dev --storage real` (and agent / sampling / image / upload real-mode flows) can mint tokens for a local executa subprocess. Does NOT publish the executa itself — use `executa publish` for that. Lists/deletes via `apps list` / `apps delete`.").requiredOption("--tool-id <id>", "Executa tool_id (matches executa.json tool_id / executable_name)").option("--slug <slug>", "App slug (default: executa-<tool_id>; must be lowercase + hyphens)").option("--name <name>", "Human-readable display name (default: <tool_id>)").option("--account <host>", "Saved account host (default: current)").action(async (opts) => {
|
|
575
|
-
const { runExecutaRegister } = await import("./executa-register-
|
|
580
|
+
const { runExecutaRegister } = await import("./executa-register-BUiPzPIU.js");
|
|
576
581
|
const code = await runExecutaRegister(opts);
|
|
577
582
|
process.exit(code);
|
|
578
583
|
});
|
|
579
584
|
executa.command("install").description("Install a local-dev shim for an Executa under its minted tool_id so the Agent can discover it via 'Rediscover Local' (for distribution_type: local). Resolves the tool_id from .anna/executa.json (written by `executa publish` / `apps push`) unless --tool-id is given.").option("--dir <path>", "Executa project dir (default: CWD)").option("--tool-id <id>", "Install the shim under this exact id (default: minted id from .anna/executa.json, else executa.json tool_id)").option("--bin-dir <path>", "Install dir for the shim (default: ~/.anna/executa/bin)").option("--force", "Overwrite an existing shim of the same name", false).option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
|
|
580
|
-
const { runExecutaInstall } = await import("./executa-install-
|
|
585
|
+
const { runExecutaInstall } = await import("./executa-install-DjXE_-U-.js");
|
|
581
586
|
const code = await runExecutaInstall({
|
|
582
587
|
dir: opts.dir,
|
|
583
588
|
toolId: opts.toolId,
|
|
@@ -588,7 +593,7 @@ executa.command("install").description("Install a local-dev shim for an Executa
|
|
|
588
593
|
process.exit(code);
|
|
589
594
|
});
|
|
590
595
|
executa.command("dev").description("Run one Executa plugin in isolation (REPL or one-shot describe/invoke)").option("--dir <path>", "Executa project dir (default: CWD)").option("--spec <spec>", "Override discovery: comma-separated key=value (tool_id=...,type=...,command=\"...\")").option("--describe", "Print MANIFEST and exit", false).option("--health", "Print health and exit", false).option("--invoke <tool>", "Invoke one tool and exit").option("--args <json>", "JSON object passed as tool arguments", "{}").option("--json", "One-shot: emit compact JSON (no banners)", false).option("--no-sampling", "Hard-disable sampling reverse RPC (returns sampling_disabled)").option("--mock-sampling <fixture>", "Serve canned sampling responses from a JSONL fixture (offline)").option("--app-slug <slug>", "Forward sampling to nexus on behalf of this dev AnnaApp slug").option("--sampling-account <host>", "Saved account host for nexus sampling (default: current)").option("--no-agent", "Hard-disable agent reverse RPC (returns agent_not_granted)").option("--mock-agent <fixture>", "Serve canned agent/* responses from a JSONL fixture (offline)").option("--agent-account <host>", "Saved account host for nexus agent (default: --sampling-account or current)").option("--storage <mode>", "Storage backend: off | memory | mock | real (default: memory)").option("--mock-storage <fixture>", "Serve canned storage/* + files/* responses from a JSONL fixture").option("--storage-account <host>", "Saved account host for nexus storage (default: --sampling-account or current)").option("--storage-scopes <list>", "Comma-separated scopes for real storage tokens (default: user,app,tool)").option("--no-image", "Hard-disable image reverse RPC (returns image_not_granted)").option("--mock-image <fixture>", "Serve canned image/generate + image/edit responses from a JSONL fixture").option("--image-account <host>", "Saved account host for nexus image (default: --sampling-account or current)").option("--no-upload", "Hard-disable host/uploadFile reverse RPC (returns upload_not_granted)").option("--mock-upload <fixture>", "Serve canned host/uploadFile responses from a JSONL fixture").option("--upload-account <host>", "Saved account host for nexus uploads (default: --sampling-account or current)").action(async (opts) => {
|
|
591
|
-
const { runExecutaDev } = await import("./executa-dev-
|
|
596
|
+
const { runExecutaDev } = await import("./executa-dev-Cr9Yepph.js");
|
|
592
597
|
const storageMode = opts.storage === void 0 ? void 0 : (() => {
|
|
593
598
|
const m = opts.storage;
|
|
594
599
|
if (m === "off" || m === "memory" || m === "mock" || m === "real") return m;
|
|
@@ -625,7 +630,7 @@ executa.command("dev").description("Run one Executa plugin in isolation (REPL or
|
|
|
625
630
|
});
|
|
626
631
|
const apps = program.command("apps").description("Anna App publish lifecycle commands");
|
|
627
632
|
apps.command("list").description("List the Anna Apps you authored, with lifecycle status").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
|
|
628
|
-
const { runAppsList } = await import("./apps-
|
|
633
|
+
const { runAppsList } = await import("./apps-3VcdHIBK.js");
|
|
629
634
|
process.exit(await runAppsList({
|
|
630
635
|
account: opts.account,
|
|
631
636
|
json: opts.json
|
|
@@ -640,7 +645,7 @@ apps.command("publish").description("Publish or update an Anna App (manifest.jso
|
|
|
640
645
|
console.error(`✗ --bump must be patch|minor|major (got: ${opts.bump})`);
|
|
641
646
|
process.exit(2);
|
|
642
647
|
}
|
|
643
|
-
const { runAppsPublish } = await import("./apps-publish-
|
|
648
|
+
const { runAppsPublish } = await import("./apps-publish-Do7M5je3.js");
|
|
644
649
|
process.exit(await runAppsPublish({
|
|
645
650
|
cwd: opts.cwd,
|
|
646
651
|
manifest: opts.manifest,
|
|
@@ -673,7 +678,7 @@ apps.command("push").description("Upsert the mutable working draft (manifest + b
|
|
|
673
678
|
process.exit(2);
|
|
674
679
|
}
|
|
675
680
|
}
|
|
676
|
-
const { runAppsPush } = await import("./apps-push-
|
|
681
|
+
const { runAppsPush } = await import("./apps-push-CixatuQG.js");
|
|
677
682
|
process.exit(await runAppsPush({
|
|
678
683
|
cwd: opts.cwd,
|
|
679
684
|
manifest: opts.manifest,
|
|
@@ -692,7 +697,7 @@ apps.command("push").description("Upsert the mutable working draft (manifest + b
|
|
|
692
697
|
}));
|
|
693
698
|
});
|
|
694
699
|
apps.command("cut <version>").description("Snapshot the working draft into an immutable version (freeze deps)").option("--changelog <text>", "Override the working draft changelog for this version").option("--slug <slug>", "App slug (default: resolve from .anna/app.json cache)").option("--cwd <dir>", "Project root for identity cache (default: cwd)").option("--dry-run", "Resolve target but don't cut", false).option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (version, opts) => {
|
|
695
|
-
const { runAppsCut } = await import("./apps-cut-
|
|
700
|
+
const { runAppsCut } = await import("./apps-cut-BCicQFRY.js");
|
|
696
701
|
process.exit(await runAppsCut({
|
|
697
702
|
version,
|
|
698
703
|
changelog: opts.changelog,
|
|
@@ -704,7 +709,7 @@ apps.command("cut <version>").description("Snapshot the working draft into an im
|
|
|
704
709
|
}));
|
|
705
710
|
});
|
|
706
711
|
apps.command("discard").description("Drop the mutable working draft (leaves cut versions intact)").option("--slug <slug>", "App slug (default: resolve from .anna/app.json cache)").option("--cwd <dir>", "Project root for identity cache (default: cwd)").option("--dry-run", "Resolve target but don't discard", false).option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
|
|
707
|
-
const { runAppsDiscard } = await import("./apps-discard-
|
|
712
|
+
const { runAppsDiscard } = await import("./apps-discard-BoY4zMJw.js");
|
|
708
713
|
process.exit(await runAppsDiscard({
|
|
709
714
|
slug: opts.slug,
|
|
710
715
|
cwd: opts.cwd,
|
|
@@ -714,7 +719,7 @@ apps.command("discard").description("Drop the mutable working draft (leaves cut
|
|
|
714
719
|
}));
|
|
715
720
|
});
|
|
716
721
|
apps.command("release <version>").description("Freeze & publish an existing remote version (go live)").option("--slug <slug>", "App slug (default: resolve from .anna/app.json cache)").option("--cwd <dir>", "Project root for identity cache (default: cwd)").option("--allow-create", "If the version isn't on the server, run 'apps publish' first, then release", false).option("--dry-run", "Resolve target + pre-flight but don't publish", false).option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (version, opts) => {
|
|
717
|
-
const { runAppsRelease } = await import("./apps-release-
|
|
722
|
+
const { runAppsRelease } = await import("./apps-release-DJFG4BV3.js");
|
|
718
723
|
process.exit(await runAppsRelease({
|
|
719
724
|
version,
|
|
720
725
|
slug: opts.slug,
|
|
@@ -726,7 +731,7 @@ apps.command("release <version>").description("Freeze & publish an existing remo
|
|
|
726
731
|
}));
|
|
727
732
|
});
|
|
728
733
|
apps.command("sync-meta").description("Push mutable store metadata (name/tagline/…) from the manifest").option("--cwd <dir>", "Project root (default: cwd)").option("--manifest <path>", "manifest.json path", "manifest.json").option("--dry-run", "Print the metadata diff but don't PATCH", false).option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
|
|
729
|
-
const { runAppsSyncMeta } = await import("./apps-sync-meta-
|
|
734
|
+
const { runAppsSyncMeta } = await import("./apps-sync-meta-CQQC_Heb.js");
|
|
730
735
|
process.exit(await runAppsSyncMeta({
|
|
731
736
|
cwd: opts.cwd,
|
|
732
737
|
manifest: opts.manifest,
|
|
@@ -736,7 +741,7 @@ apps.command("sync-meta").description("Push mutable store metadata (name/tagline
|
|
|
736
741
|
}));
|
|
737
742
|
});
|
|
738
743
|
apps.command("submit-review [slug]").description("Move an app into review (DRAFT/REJECTED → PENDING_REVIEW)").option("--cwd <dir>", "Project root for identity cache (default: cwd)").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (slug, opts) => {
|
|
739
|
-
const { runAppsSubmitReview } = await import("./apps-submit-review-
|
|
744
|
+
const { runAppsSubmitReview } = await import("./apps-submit-review-BVmZlhmB.js");
|
|
740
745
|
process.exit(await runAppsSubmitReview({
|
|
741
746
|
slug,
|
|
742
747
|
cwd: opts.cwd,
|
|
@@ -745,7 +750,7 @@ apps.command("submit-review [slug]").description("Move an app into review (DRAFT
|
|
|
745
750
|
}));
|
|
746
751
|
});
|
|
747
752
|
apps.command("status <slug>").description("Show server-known state for one Anna App").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (slug, opts) => {
|
|
748
|
-
const { runAppsStatus } = await import("./apps-status-
|
|
753
|
+
const { runAppsStatus } = await import("./apps-status-F6aVlzDW.js");
|
|
749
754
|
process.exit(await runAppsStatus({
|
|
750
755
|
slug,
|
|
751
756
|
account: opts.account,
|
|
@@ -753,7 +758,7 @@ apps.command("status <slug>").description("Show server-known state for one Anna
|
|
|
753
758
|
}));
|
|
754
759
|
});
|
|
755
760
|
apps.command("versions <slug>").description("List all server versions of one Anna App").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (slug, opts) => {
|
|
756
|
-
const { runAppsVersions } = await import("./apps-versions-
|
|
761
|
+
const { runAppsVersions } = await import("./apps-versions-BIKsJzIT.js");
|
|
757
762
|
process.exit(await runAppsVersions({
|
|
758
763
|
slug,
|
|
759
764
|
account: opts.account,
|
|
@@ -761,7 +766,7 @@ apps.command("versions <slug>").description("List all server versions of one Ann
|
|
|
761
766
|
}));
|
|
762
767
|
});
|
|
763
768
|
apps.command("grants <slug>").description("Show currently granted scopes/quota for one Anna App").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (slug, opts) => {
|
|
764
|
-
const { runAppsGrants } = await import("./apps-grants-
|
|
769
|
+
const { runAppsGrants } = await import("./apps-grants-DgvymPBT.js");
|
|
765
770
|
process.exit(await runAppsGrants({
|
|
766
771
|
slug,
|
|
767
772
|
account: opts.account,
|
|
@@ -769,7 +774,7 @@ apps.command("grants <slug>").description("Show currently granted scopes/quota f
|
|
|
769
774
|
}));
|
|
770
775
|
});
|
|
771
776
|
apps.command("unpublish <slug>").description("Flip a PUBLISHED app back to APPROVED (private)").option("--yes", "Acknowledge the destructive operation", false).option("--confirm <slug>", "Slug confirmation (must match target)").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (slug, opts) => {
|
|
772
|
-
const { runAppsUnpublish } = await import("./apps-destructive-
|
|
777
|
+
const { runAppsUnpublish } = await import("./apps-destructive-DWF4eTHn.js");
|
|
773
778
|
process.exit(await runAppsUnpublish({
|
|
774
779
|
slug,
|
|
775
780
|
yes: opts.yes,
|
|
@@ -779,7 +784,7 @@ apps.command("unpublish <slug>").description("Flip a PUBLISHED app back to APPRO
|
|
|
779
784
|
}));
|
|
780
785
|
});
|
|
781
786
|
apps.command("archive <slug>").description("Archive an Anna App (hides it from end users)").option("--yes", "Acknowledge the destructive operation", false).option("--confirm <slug>", "Slug confirmation (must match target)").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (slug, opts) => {
|
|
782
|
-
const { runAppsArchive } = await import("./apps-destructive-
|
|
787
|
+
const { runAppsArchive } = await import("./apps-destructive-DWF4eTHn.js");
|
|
783
788
|
process.exit(await runAppsArchive({
|
|
784
789
|
slug,
|
|
785
790
|
yes: opts.yes,
|
|
@@ -789,7 +794,7 @@ apps.command("archive <slug>").description("Archive an Anna App (hides it from e
|
|
|
789
794
|
}));
|
|
790
795
|
});
|
|
791
796
|
apps.command("unarchive <slug>").description("Restore an archived Anna App back to APPROVED").option("--yes", "Acknowledge the operation", false).option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (slug, opts) => {
|
|
792
|
-
const { runAppsUnarchive } = await import("./apps-destructive-
|
|
797
|
+
const { runAppsUnarchive } = await import("./apps-destructive-DWF4eTHn.js");
|
|
793
798
|
process.exit(await runAppsUnarchive({
|
|
794
799
|
slug,
|
|
795
800
|
yes: opts.yes,
|
|
@@ -798,7 +803,7 @@ apps.command("unarchive <slug>").description("Restore an archived Anna App back
|
|
|
798
803
|
}));
|
|
799
804
|
});
|
|
800
805
|
apps.command("delete <slug>").description("Hard-delete an Anna App (refused by server if installs exist)").option("--yes", "Acknowledge the destructive operation", false).option("--confirm <slug>", "Slug confirmation (must match target)").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (slug, opts) => {
|
|
801
|
-
const { runAppsDelete } = await import("./apps-destructive-
|
|
806
|
+
const { runAppsDelete } = await import("./apps-destructive-DWF4eTHn.js");
|
|
802
807
|
process.exit(await runAppsDelete({
|
|
803
808
|
slug,
|
|
804
809
|
yes: opts.yes,
|
|
@@ -808,14 +813,14 @@ apps.command("delete <slug>").description("Hard-delete an Anna App (refused by s
|
|
|
808
813
|
}));
|
|
809
814
|
});
|
|
810
815
|
executa.command("list").description("List Executas owned by the current PAT").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
|
|
811
|
-
const { runExecutaList } = await import("./executa-reads-
|
|
816
|
+
const { runExecutaList } = await import("./executa-reads-CjGZq1yP.js");
|
|
812
817
|
process.exit(await runExecutaList({
|
|
813
818
|
account: opts.account,
|
|
814
819
|
json: opts.json
|
|
815
820
|
}));
|
|
816
821
|
});
|
|
817
822
|
executa.command("status <ref>").description("Show server-known state for one Executa (slug or tool_id)").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (ref, opts) => {
|
|
818
|
-
const { runExecutaStatus } = await import("./executa-reads-
|
|
823
|
+
const { runExecutaStatus } = await import("./executa-reads-CjGZq1yP.js");
|
|
819
824
|
process.exit(await runExecutaStatus({
|
|
820
825
|
ref,
|
|
821
826
|
account: opts.account,
|
|
@@ -823,7 +828,7 @@ executa.command("status <ref>").description("Show server-known state for one Exe
|
|
|
823
828
|
}));
|
|
824
829
|
});
|
|
825
830
|
executa.command("versions <ref>").description("List immutable version snapshots for one Executa").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (ref, opts) => {
|
|
826
|
-
const { runExecutaVersions } = await import("./executa-reads-
|
|
831
|
+
const { runExecutaVersions } = await import("./executa-reads-CjGZq1yP.js");
|
|
827
832
|
process.exit(await runExecutaVersions({
|
|
828
833
|
ref,
|
|
829
834
|
account: opts.account,
|
|
@@ -839,7 +844,7 @@ executa.command("publish").description("Mint or update an Executa (executa.json
|
|
|
839
844
|
console.error(`✗ --bump must be patch|minor|major (got: ${opts.bump})`);
|
|
840
845
|
process.exit(2);
|
|
841
846
|
}
|
|
842
|
-
const { runExecutaPublish } = await import("./executa-publish-
|
|
847
|
+
const { runExecutaPublish } = await import("./executa-publish-IXWSwva0.js");
|
|
843
848
|
process.exit(await runExecutaPublish({
|
|
844
849
|
cwd: opts.cwd,
|
|
845
850
|
manifest: opts.manifest,
|
|
@@ -852,7 +857,7 @@ executa.command("publish").description("Mint or update an Executa (executa.json
|
|
|
852
857
|
}));
|
|
853
858
|
});
|
|
854
859
|
executa.command("unpublish <slug>").description("Flip an Executa's visibility back to private").option("--yes", "Acknowledge the destructive operation", false).option("--confirm <slug>", "Slug confirmation (must match target)").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (slug, opts) => {
|
|
855
|
-
const { runExecutaUnpublish } = await import("./executa-destructive-
|
|
860
|
+
const { runExecutaUnpublish } = await import("./executa-destructive-PL2ooHpZ.js");
|
|
856
861
|
process.exit(await runExecutaUnpublish({
|
|
857
862
|
slug,
|
|
858
863
|
yes: opts.yes,
|
|
@@ -862,7 +867,7 @@ executa.command("unpublish <slug>").description("Flip an Executa's visibility ba
|
|
|
862
867
|
}));
|
|
863
868
|
});
|
|
864
869
|
executa.command("yank <ref>").description("Hard-delete one Executa version (<slug>@<version>)").option("--yes", "Acknowledge the destructive operation", false).option("--confirm <slug>", "Slug confirmation (must match target)").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (ref, opts) => {
|
|
865
|
-
const { runExecutaYank } = await import("./executa-destructive-
|
|
870
|
+
const { runExecutaYank } = await import("./executa-destructive-PL2ooHpZ.js");
|
|
866
871
|
process.exit(await runExecutaYank({
|
|
867
872
|
ref,
|
|
868
873
|
yes: opts.yes,
|
|
@@ -872,7 +877,7 @@ executa.command("yank <ref>").description("Hard-delete one Executa version (<slu
|
|
|
872
877
|
}));
|
|
873
878
|
});
|
|
874
879
|
executa.command("delete <slug>").description("Hard-delete an Executa").option("--yes", "Acknowledge the destructive operation", false).option("--confirm <slug>", "Slug confirmation (must match target)").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (slug, opts) => {
|
|
875
|
-
const { runExecutaDelete } = await import("./executa-destructive-
|
|
880
|
+
const { runExecutaDelete } = await import("./executa-destructive-PL2ooHpZ.js");
|
|
876
881
|
process.exit(await runExecutaDelete({
|
|
877
882
|
slug,
|
|
878
883
|
yes: opts.yes,
|
|
@@ -884,7 +889,7 @@ executa.command("delete <slug>").description("Hard-delete an Executa").option("-
|
|
|
884
889
|
executa.command("cache-clear").description("Delete the local `.anna/executa.json` identity cache. Use after the server-side Executa has been deleted/recreated, or when switching host. Next `executa publish` will re-mint via the idempotency key.").option("--cwd <dir>", "Project root (default: cwd)").action(async (opts) => {
|
|
885
890
|
const { resolve: resolve$1 } = await import("node:path");
|
|
886
891
|
const { existsSync: existsSync$1 } = await import("node:fs");
|
|
887
|
-
const { executaCachePath, invalidateExecutaCache } = await import("./executa-cache-
|
|
892
|
+
const { executaCachePath, invalidateExecutaCache } = await import("./executa-cache-Kx3rfQD-.js");
|
|
888
893
|
const cwd = resolve$1(opts.cwd ?? process.cwd());
|
|
889
894
|
const p = executaCachePath(cwd);
|
|
890
895
|
if (!existsSync$1(p)) {
|
|
@@ -897,7 +902,7 @@ executa.command("cache-clear").description("Delete the local `.anna/executa.json
|
|
|
897
902
|
});
|
|
898
903
|
const token = program.command("token").description("Manage developer PATs (list / revoke / scopes)");
|
|
899
904
|
token.command("list").description("List the caller's PATs (most-recent first)").option("--include-revoked", "Also show revoked PATs", false).option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
|
|
900
|
-
const { runTokenList } = await import("./token-
|
|
905
|
+
const { runTokenList } = await import("./token-Cg7BZGp6.js");
|
|
901
906
|
process.exit(await runTokenList({
|
|
902
907
|
includeRevoked: opts.includeRevoked,
|
|
903
908
|
account: opts.account,
|
|
@@ -910,7 +915,7 @@ token.command("revoke <id>").description("Revoke one of the caller's PATs by id"
|
|
|
910
915
|
console.error(`✗ token id must be a positive integer (got: ${id})`);
|
|
911
916
|
process.exit(2);
|
|
912
917
|
}
|
|
913
|
-
const { runTokenRevoke } = await import("./token-
|
|
918
|
+
const { runTokenRevoke } = await import("./token-Cg7BZGp6.js");
|
|
914
919
|
process.exit(await runTokenRevoke({
|
|
915
920
|
id: idNum,
|
|
916
921
|
account: opts.account,
|
|
@@ -918,7 +923,7 @@ token.command("revoke <id>").description("Revoke one of the caller's PATs by id"
|
|
|
918
923
|
}));
|
|
919
924
|
});
|
|
920
925
|
token.command("scopes").description("Print the available PAT scope catalogue").option("--account <host>", "Saved account host (default: current)").option("--json", "Emit machine-readable JSON", false).action(async (opts) => {
|
|
921
|
-
const { runTokenScopes } = await import("./token-
|
|
926
|
+
const { runTokenScopes } = await import("./token-Cg7BZGp6.js");
|
|
922
927
|
process.exit(await runTokenScopes({
|
|
923
928
|
account: opts.account,
|
|
924
929
|
json: opts.json
|
|
@@ -933,7 +938,7 @@ program.command("publish").description("Auto-detect cwd and publish (apps publis
|
|
|
933
938
|
console.error(`✗ --bump must be patch|minor|major (got: ${opts.bump})`);
|
|
934
939
|
process.exit(2);
|
|
935
940
|
}
|
|
936
|
-
const { runTopLevelPublish } = await import("./publish-
|
|
941
|
+
const { runTopLevelPublish } = await import("./publish-BYWuujP3.js");
|
|
937
942
|
process.exit(await runTopLevelPublish({
|
|
938
943
|
cwd: opts.cwd,
|
|
939
944
|
bump: opts.bump,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { findMatrixNexusRoot, nexusSchemaDir } from "./nexus-root-BlPwOusj.js";
|
|
1
2
|
import { dirname, isAbsolute, resolve } from "node:path";
|
|
2
3
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
3
4
|
import { bold, cyan, dim, green, red, yellow } from "kleur/colors";
|
|
@@ -31,6 +32,11 @@ async function runDev(opts) {
|
|
|
31
32
|
}
|
|
32
33
|
const matrixNexusRoot = await resolveMatrixNexusRoot(opts.matrixNexusRoot, cwd);
|
|
33
34
|
const mode = matrixNexusRoot ? "nexus-source" : "uvx";
|
|
35
|
+
let schemaSource = null;
|
|
36
|
+
if (matrixNexusRoot && !process.env.ANNA_APP_SCHEMA_DIR) {
|
|
37
|
+
schemaSource = nexusSchemaDir(matrixNexusRoot);
|
|
38
|
+
if (schemaSource) process.env.ANNA_APP_SCHEMA_DIR = schemaSource;
|
|
39
|
+
}
|
|
34
40
|
const storageMode = opts.storageMode === "aps" ? "aps" : "legacy";
|
|
35
41
|
if (opts.storageMode && opts.storageMode !== "legacy" && opts.storageMode !== "aps") {
|
|
36
42
|
console.error(red(`✗ --storage must be "legacy" or "aps", got "${opts.storageMode}"`));
|
|
@@ -43,8 +49,8 @@ async function runDev(opts) {
|
|
|
43
49
|
}
|
|
44
50
|
process.env.ANNA_APP_RUNTIME_STORAGE_MODE = "aps";
|
|
45
51
|
}
|
|
46
|
-
const { PythonBridge, PINNED_RUNTIME_VERSION } = await import("./bridge-
|
|
47
|
-
const { HarnessServer } = await import("./server-
|
|
52
|
+
const { PythonBridge, PINNED_RUNTIME_VERSION } = await import("./bridge-hzqNFm9-.js");
|
|
53
|
+
const { HarnessServer } = await import("./server-Cp7mYV9t.js");
|
|
48
54
|
const bridge = new PythonBridge({
|
|
49
55
|
mode,
|
|
50
56
|
matrixNexusRoot: matrixNexusRoot ?? void 0,
|
|
@@ -56,7 +62,12 @@ async function runDev(opts) {
|
|
|
56
62
|
if (mode === "nexus-source") {
|
|
57
63
|
console.log(` matrix-nexus root ${dim(matrixNexusRoot)}`);
|
|
58
64
|
console.log(` runtime ${dim("nexus-source (uv run)")}`);
|
|
59
|
-
|
|
65
|
+
console.log(` browser sdk ${dim("in-tree packages/anna-app-runtime/dist")}`);
|
|
66
|
+
console.log(` schema ${dim(schemaSource ? "in-tree packages/anna-app-schema" : process.env.ANNA_APP_SCHEMA_DIR ? `override ${process.env.ANNA_APP_SCHEMA_DIR}` : "npm @anna-ai/app-schema")}`);
|
|
67
|
+
} else {
|
|
68
|
+
console.log(` runtime ${dim(`uvx anna-app-runtime-local@${PINNED_RUNTIME_VERSION}`)}`);
|
|
69
|
+
console.log(` browser sdk ${dim("npm @anna-ai/app-runtime")}`);
|
|
70
|
+
}
|
|
60
71
|
console.log(` spawning python bridge…`);
|
|
61
72
|
try {
|
|
62
73
|
await bridge.start();
|
|
@@ -79,7 +90,7 @@ async function runDev(opts) {
|
|
|
79
90
|
if (executas.length > 0) console.log(` executas ${dim(executas.map((e) => e.tool_id).join(", "))}`);
|
|
80
91
|
const bundledResolved = resolveBundledHandles(dirname(manifestPath), executas);
|
|
81
92
|
if (Object.keys(bundledResolved).length > 0) {
|
|
82
|
-
const { substituteBundledRefs, writeBundleToolIdSidecar } = await import("./bundled-executas-
|
|
93
|
+
const { substituteBundledRefs, writeBundleToolIdSidecar } = await import("./bundled-executas-DeBhDjd8.js");
|
|
83
94
|
try {
|
|
84
95
|
manifest = substituteBundledRefs(manifest, bundledResolved);
|
|
85
96
|
writeBundleToolIdSidecar(bundleDir, bundledResolved);
|
|
@@ -149,8 +160,8 @@ async function runDev(opts) {
|
|
|
149
160
|
* registered `appSlug`.
|
|
150
161
|
*/
|
|
151
162
|
async function resolveRealLlm(args) {
|
|
152
|
-
const { getAccount } = await import("./credentials-
|
|
153
|
-
const { ensureDevAppRegistered } = await import("./dev-app-cache-
|
|
163
|
+
const { getAccount } = await import("./credentials-Chkoidh5.js");
|
|
164
|
+
const { ensureDevAppRegistered } = await import("./dev-app-cache-TSjL4D4n.js");
|
|
154
165
|
const acc = getAccount(args.account);
|
|
155
166
|
if (!acc) {
|
|
156
167
|
console.error(red("✗ no developer PAT on disk — run `anna-app login --host <nexus-url>` first.\n (or use `--no-llm` / `--mock-llm <fixture>` to develop offline.)"));
|
|
@@ -179,7 +190,7 @@ async function resolveRealLlm(args) {
|
|
|
179
190
|
account: args.account,
|
|
180
191
|
appSlug: entry.slug,
|
|
181
192
|
onAppSlugNotFound: async () => {
|
|
182
|
-
const { invalidateDevAppCache } = await import("./dev-app-cache-
|
|
193
|
+
const { invalidateDevAppCache } = await import("./dev-app-cache-TSjL4D4n.js");
|
|
183
194
|
invalidateDevAppCache(args.cwd);
|
|
184
195
|
const fresh = getAccount(args.account);
|
|
185
196
|
if (!fresh) throw new Error("PAT not found while re-registering dev app — run `anna-app login` again");
|
|
@@ -486,21 +497,7 @@ function parseExecutaSpec(spec, cwd) {
|
|
|
486
497
|
};
|
|
487
498
|
}
|
|
488
499
|
async function resolveMatrixNexusRoot(explicit, cwd) {
|
|
489
|
-
|
|
490
|
-
let dir = cwd;
|
|
491
|
-
while (true) {
|
|
492
|
-
candidates.push(dir);
|
|
493
|
-
const parent = dirname(dir);
|
|
494
|
-
if (parent === dir) break;
|
|
495
|
-
dir = parent;
|
|
496
|
-
}
|
|
497
|
-
candidates.push(resolve(cwd, "..", "matrix-nexus"));
|
|
498
|
-
for (const c of candidates) {
|
|
499
|
-
if (!c) continue;
|
|
500
|
-
const abs = isAbsolute(c) ? c : resolve(cwd, c);
|
|
501
|
-
if (existsSync(resolve(abs, "packages/anna-app-runtime-local/pyproject.toml"))) return abs;
|
|
502
|
-
}
|
|
503
|
-
return null;
|
|
500
|
+
return findMatrixNexusRoot(explicit, cwd);
|
|
504
501
|
}
|
|
505
502
|
|
|
506
503
|
//#endregion
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { findMatrixNexusRoot, nexusSchemaDir } from "./nexus-root-BlPwOusj.js";
|
|
2
|
+
import { PINNED_RUNTIME_VERSION } from "./bridge-DxBd0Fl9.js";
|
|
3
|
+
import { resolve } from "node:path";
|
|
3
4
|
import { existsSync, statSync } from "node:fs";
|
|
4
5
|
import { spawnSync } from "node:child_process";
|
|
5
6
|
import { bold, dim, green, red, yellow } from "kleur/colors";
|
|
@@ -26,9 +27,13 @@ async function runDoctor(opts) {
|
|
|
26
27
|
console.log(dim(` first 'anna-app dev' will install via 'uvx anna-app-runtime-local@${PINNED_RUNTIME_VERSION}' (one-time)`));
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
const nexus =
|
|
30
|
-
if (nexus)
|
|
31
|
-
|
|
30
|
+
const nexus = findMatrixNexusRoot(opts.matrixNexusRoot, process.cwd());
|
|
31
|
+
if (nexus) {
|
|
32
|
+
console.log(` ${green("✓")} nexus ${dim(nexus)} ${dim("(contributor mode)")}`);
|
|
33
|
+
const schemaDir = nexusSchemaDir(nexus);
|
|
34
|
+
if (schemaDir) console.log(` ${green("✓")} schema ${dim(schemaDir)} ${dim("(in-tree; used by dev/validate)")}`);
|
|
35
|
+
else console.log(` ${yellow("·")} schema ${yellow("in-tree packages/anna-app-schema not found")} ${dim("(npm bundle will be used)")}`);
|
|
36
|
+
} else console.log(` ${yellow("·")} nexus ${dim("not found")} ${dim("(uvx mode will be used)")}`);
|
|
32
37
|
const keyPath = resolve(homedir(), ".anna-app", "dev.key");
|
|
33
38
|
if (!existsSync(keyPath)) console.log(` ${yellow("·")} key ${dim(keyPath)} ${yellow("(missing — will be auto-created on first run)")}`);
|
|
34
39
|
else {
|
|
@@ -47,23 +52,6 @@ async function runDoctor(opts) {
|
|
|
47
52
|
console.log(red(`\n ${failed} required check(s) failed`));
|
|
48
53
|
return 1;
|
|
49
54
|
}
|
|
50
|
-
async function resolveNexusRoot(explicit, cwd) {
|
|
51
|
-
const candidates = [explicit, process.env.ANNA_NEXUS_ROOT];
|
|
52
|
-
let dir = cwd;
|
|
53
|
-
while (true) {
|
|
54
|
-
candidates.push(dir);
|
|
55
|
-
const parent = dirname(dir);
|
|
56
|
-
if (parent === dir) break;
|
|
57
|
-
dir = parent;
|
|
58
|
-
}
|
|
59
|
-
candidates.push(resolve(cwd, "..", "matrix-nexus"));
|
|
60
|
-
for (const c of candidates) {
|
|
61
|
-
if (!c) continue;
|
|
62
|
-
const abs = isAbsolute(c) ? c : resolve(cwd, c);
|
|
63
|
-
if (existsSync(resolve(abs, "packages/anna-app-runtime-local/pyproject.toml"))) return abs;
|
|
64
|
-
}
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
55
|
|
|
68
56
|
//#endregion
|
|
69
57
|
export { runDoctor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { executaCacheMatches, executaCachePath, invalidateExecutaCache, mintIdempotencyKey, readExecutaIdentity, writeExecutaIdentity } from "./executa-cache-
|
|
2
|
+
import { executaCacheMatches, executaCachePath, invalidateExecutaCache, mintIdempotencyKey, readExecutaIdentity, writeExecutaIdentity } from "./executa-cache-CXiEgFZY.js";
|
|
3
3
|
|
|
4
4
|
export { executaCachePath, invalidateExecutaCache };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { CliError } from "./client-
|
|
3
|
-
import { deleteMyTool, listMyTools, listToolVersions, unpublishTool, yankToolVersion } from "./executas-
|
|
4
|
-
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-
|
|
5
|
-
import { ensureDestructiveAllowed } from "./confirm-
|
|
2
|
+
import { CliError } from "./client-D-_z1ALk.js";
|
|
3
|
+
import { deleteMyTool, listMyTools, listToolVersions, unpublishTool, yankToolVersion } from "./executas-CK3er6f9.js";
|
|
4
|
+
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
|
|
5
|
+
import { ensureDestructiveAllowed } from "./confirm-h_qMrx0I.js";
|
|
6
6
|
import { dim, green, yellow } from "kleur/colors";
|
|
7
7
|
|
|
8
8
|
//#region src/commands/executa-destructive.ts
|