@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
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./nexus-root-BlPwOusj.js";
|
|
2
|
+
import { parseExecutaSpec } from "./dev-3okZmzNM.js";
|
|
2
3
|
import { isAbsolute, resolve } from "node:path";
|
|
3
4
|
import { existsSync } from "node:fs";
|
|
4
5
|
import { bold, cyan, dim, green, red, yellow } from "kleur/colors";
|
|
@@ -33,8 +34,8 @@ async function runExecutaDev(opts) {
|
|
|
33
34
|
}
|
|
34
35
|
const oneShot = !!(opts.describe || opts.health || opts.invoke);
|
|
35
36
|
const quiet = oneShot && (opts.json ?? false);
|
|
36
|
-
const { getAccount } = await import("./credentials-
|
|
37
|
-
const { ensureDevExecutaRegistered } = await import("./dev-app-cache-
|
|
37
|
+
const { getAccount } = await import("./credentials-Chkoidh5.js");
|
|
38
|
+
const { ensureDevExecutaRegistered } = await import("./dev-app-cache-TSjL4D4n.js");
|
|
38
39
|
const needsRealMint = !opts.noSampling && !opts.mockSampling || !opts.noAgent && !opts.mockAgent || !opts.noImage && !opts.mockImage || !opts.noUpload && !opts.mockUpload || opts.storage === "real";
|
|
39
40
|
let effectiveAppSlug = opts.appSlug;
|
|
40
41
|
let autoRegistered = false;
|
|
@@ -56,7 +57,7 @@ async function runExecutaDev(opts) {
|
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
|
-
const { SamplingBridge } = await import("./sampling-
|
|
60
|
+
const { SamplingBridge } = await import("./sampling-BcML4teS.js");
|
|
60
61
|
const sampling = opts.noSampling ? new SamplingBridge({ mode: "off" }) : opts.mockSampling ? new SamplingBridge({
|
|
61
62
|
mode: "mock",
|
|
62
63
|
mockFile: opts.mockSampling
|
|
@@ -65,7 +66,7 @@ async function runExecutaDev(opts) {
|
|
|
65
66
|
account: opts.samplingAccount,
|
|
66
67
|
appSlug: effectiveAppSlug
|
|
67
68
|
}) : new SamplingBridge({ mode: "off" });
|
|
68
|
-
const { AgentBridge } = await import("./agent-
|
|
69
|
+
const { AgentBridge } = await import("./agent-CaZVCPs6.js");
|
|
69
70
|
const agent = opts.noAgent ? new AgentBridge({ mode: "off" }) : opts.mockAgent ? new AgentBridge({
|
|
70
71
|
mode: "mock",
|
|
71
72
|
mockFile: opts.mockAgent
|
|
@@ -74,7 +75,7 @@ async function runExecutaDev(opts) {
|
|
|
74
75
|
account: opts.agentAccount ?? opts.samplingAccount,
|
|
75
76
|
appSlug: effectiveAppSlug
|
|
76
77
|
}) : new AgentBridge({ mode: "off" });
|
|
77
|
-
const { StorageBridge } = await import("./storage-
|
|
78
|
+
const { StorageBridge } = await import("./storage-CKTmE87u.js");
|
|
78
79
|
const storageMode = opts.storage ?? (opts.mockStorage ? "mock" : "memory");
|
|
79
80
|
const storage = new StorageBridge({
|
|
80
81
|
mode: storageMode,
|
|
@@ -84,8 +85,8 @@ async function runExecutaDev(opts) {
|
|
|
84
85
|
scopes: opts.storageScopes ? opts.storageScopes.split(",").map((s) => s.trim()).filter(Boolean) : void 0,
|
|
85
86
|
pluginName: parsed.tool_id
|
|
86
87
|
});
|
|
87
|
-
const { ExecutaRunner } = await import("./runner-
|
|
88
|
-
const { ImageBridge } = await import("./image-
|
|
88
|
+
const { ExecutaRunner } = await import("./runner-BuYbm-ex.js");
|
|
89
|
+
const { ImageBridge } = await import("./image-CSEXEfD-.js");
|
|
89
90
|
const image = opts.noImage ? new ImageBridge({ mode: "off" }) : opts.mockImage ? new ImageBridge({
|
|
90
91
|
mode: "mock",
|
|
91
92
|
mockFile: opts.mockImage
|
|
@@ -94,7 +95,7 @@ async function runExecutaDev(opts) {
|
|
|
94
95
|
account: opts.imageAccount ?? opts.samplingAccount,
|
|
95
96
|
appSlug: effectiveAppSlug
|
|
96
97
|
}) : new ImageBridge({ mode: "off" });
|
|
97
|
-
const { HostUploadBridge } = await import("./host_upload-
|
|
98
|
+
const { HostUploadBridge } = await import("./host_upload-BXeHTgJs.js");
|
|
98
99
|
const hostUpload = opts.noUpload ? new HostUploadBridge({ mode: "off" }) : opts.mockUpload ? new HostUploadBridge({
|
|
99
100
|
mode: "mock",
|
|
100
101
|
mockFile: opts.mockUpload
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { readExecutaIdentity } from "./executa-cache-
|
|
2
|
-
import { parseExecutaSpec } from "./dev-
|
|
1
|
+
import { readExecutaIdentity } from "./executa-cache-CXiEgFZY.js";
|
|
2
|
+
import { parseExecutaSpec } from "./dev-3okZmzNM.js";
|
|
3
3
|
import { isAbsolute, join, resolve } from "node:path";
|
|
4
4
|
import { chmodSync, existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { bold, cyan, dim, green, red, yellow } from "kleur/colors";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { canonicalHost } from "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { CliError } from "./client-
|
|
3
|
-
import { commitDraft, createDraft, getMySkill, getMyTool, listToolVersions, publishToolVersion, setSkillVisibility, setToolVisibility, updateMySkill, updateMyTool } from "./executas-
|
|
4
|
-
import { executaCacheMatches, invalidateExecutaCache, mintIdempotencyKey, readExecutaIdentity, writeExecutaIdentity } from "./executa-cache-
|
|
5
|
-
import { loadExecutaManifest } from "./manifest-
|
|
6
|
-
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-
|
|
2
|
+
import { CliError } from "./client-D-_z1ALk.js";
|
|
3
|
+
import { commitDraft, createDraft, getMySkill, getMyTool, listToolVersions, publishToolVersion, setSkillVisibility, setToolVisibility, updateMySkill, updateMyTool } from "./executas-CK3er6f9.js";
|
|
4
|
+
import { executaCacheMatches, invalidateExecutaCache, mintIdempotencyKey, readExecutaIdentity, writeExecutaIdentity } from "./executa-cache-CXiEgFZY.js";
|
|
5
|
+
import { loadExecutaManifest } from "./manifest-Bljz8Y6T.js";
|
|
6
|
+
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
|
|
7
7
|
import { join, relative, resolve, sep } from "node:path";
|
|
8
8
|
import { readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
9
9
|
import { bold, cyan, dim, green, yellow } from "kleur/colors";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./credentials-BTv2IfUZ.js";
|
|
2
|
+
import "./client-D-_z1ALk.js";
|
|
3
|
+
import "./executas-CK3er6f9.js";
|
|
4
|
+
import "./executa-cache-CXiEgFZY.js";
|
|
5
|
+
import { runExecutaPublish } from "./executa-publish-CkPAB34b.js";
|
|
6
|
+
import "./manifest-Bljz8Y6T.js";
|
|
7
|
+
import "./_lifecycle-shared-BpSOfVCP.js";
|
|
8
|
+
|
|
9
|
+
export { runExecutaPublish };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { CliError } from "./client-
|
|
3
|
-
import { getMyTool, listMyTools, listToolVersions } from "./executas-
|
|
4
|
-
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-
|
|
2
|
+
import { CliError } from "./client-D-_z1ALk.js";
|
|
3
|
+
import { getMyTool, listMyTools, listToolVersions } from "./executas-CK3er6f9.js";
|
|
4
|
+
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
|
|
5
5
|
import { bold, cyan, dim, green } from "kleur/colors";
|
|
6
6
|
|
|
7
7
|
//#region src/commands/executa-reads.ts
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { dirname, isAbsolute, resolve } from "node:path";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
|
|
4
|
+
//#region src/nexus-root.ts
|
|
5
|
+
/**
|
|
6
|
+
* Resolve an absolute matrix-nexus root, or null if none is found.
|
|
7
|
+
*
|
|
8
|
+
* Search order (first hit wins):
|
|
9
|
+
* 1. `explicit` (the `--matrix-nexus-root` flag).
|
|
10
|
+
* 2. `$ANNA_NEXUS_ROOT`.
|
|
11
|
+
* 3. Walk up from `cwd`.
|
|
12
|
+
* 4. Sibling `../matrix-nexus`.
|
|
13
|
+
*
|
|
14
|
+
* A candidate qualifies only if it contains
|
|
15
|
+
* `packages/anna-app-runtime-local/pyproject.toml` (the marker that also
|
|
16
|
+
* gates `nexus-source` runtime mode), so the three escape hatches can
|
|
17
|
+
* never disagree on what counts as "a matrix-nexus checkout".
|
|
18
|
+
*/
|
|
19
|
+
function findMatrixNexusRoot(explicit, cwd) {
|
|
20
|
+
const candidates = [explicit, process.env.ANNA_NEXUS_ROOT];
|
|
21
|
+
let dir = cwd;
|
|
22
|
+
while (true) {
|
|
23
|
+
candidates.push(dir);
|
|
24
|
+
const parent = dirname(dir);
|
|
25
|
+
if (parent === dir) break;
|
|
26
|
+
dir = parent;
|
|
27
|
+
}
|
|
28
|
+
candidates.push(resolve(cwd, "..", "matrix-nexus"));
|
|
29
|
+
for (const c of candidates) {
|
|
30
|
+
if (!c) continue;
|
|
31
|
+
const abs = isAbsolute(c) ? c : resolve(cwd, c);
|
|
32
|
+
if (existsSync(resolve(abs, "packages/anna-app-runtime-local/pyproject.toml"))) return abs;
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Locate the in-tree `@anna-ai/app-schema` bundle inside a matrix-nexus
|
|
38
|
+
* root, or null if it is absent / not built. The returned dir is suitable
|
|
39
|
+
* for `ANNA_APP_SCHEMA_DIR` / `loadSchemaBundle`'s override so contributors
|
|
40
|
+
* can `validate` against an UNPUBLISHED schema bump without waiting for the
|
|
41
|
+
* npm push — parity with the runtime/SDK nexus-source hatches.
|
|
42
|
+
*/
|
|
43
|
+
function nexusSchemaDir(root) {
|
|
44
|
+
const dir = resolve(root, "packages", "anna-app-schema");
|
|
45
|
+
return existsSync(resolve(dir, "dispatcher_version.txt")) ? dir : null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
export { findMatrixNexusRoot, nexusSchemaDir };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import "./apps-
|
|
3
|
-
import { CliError } from "./client-
|
|
4
|
-
import "./bundled-executas-
|
|
5
|
-
import "./executas-
|
|
6
|
-
import "./executa-cache-
|
|
7
|
-
import { runExecutaPublish } from "./executa-publish-
|
|
8
|
-
import "./manifest-
|
|
9
|
-
import { withErrorHandling } from "./_lifecycle-shared-
|
|
10
|
-
import "./app-cache-
|
|
11
|
-
import "./app-bundle-upload-
|
|
12
|
-
import { runAppsPublish } from "./apps-publish-
|
|
2
|
+
import "./apps-CCdtLmxQ.js";
|
|
3
|
+
import { CliError } from "./client-D-_z1ALk.js";
|
|
4
|
+
import "./bundled-executas-B6b8gIfp.js";
|
|
5
|
+
import "./executas-CK3er6f9.js";
|
|
6
|
+
import "./executa-cache-CXiEgFZY.js";
|
|
7
|
+
import { runExecutaPublish } from "./executa-publish-CkPAB34b.js";
|
|
8
|
+
import "./manifest-Bljz8Y6T.js";
|
|
9
|
+
import { withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
|
|
10
|
+
import "./app-cache-Bl7cE5fm.js";
|
|
11
|
+
import "./app-bundle-upload-BhAYo6yj.js";
|
|
12
|
+
import { runAppsPublish } from "./apps-publish-Dgi4lBlu.js";
|
|
13
13
|
import { resolve } from "node:path";
|
|
14
14
|
import { existsSync } from "node:fs";
|
|
15
15
|
import { red, yellow } from "kleur/colors";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { canonicalHost, getAccount } from "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { BridgeRequestError } from "./bridge-
|
|
2
|
+
import { BridgeRequestError } from "./bridge-DxBd0Fl9.js";
|
|
3
3
|
import { dirname, join, normalize, resolve } from "node:path";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { createReadStream, existsSync, readFileSync, statSync, watch } from "node:fs";
|
|
@@ -445,6 +445,26 @@ var LlmBridge = class {
|
|
|
445
445
|
message: "agent.session.history is not exposed over HTTP; available only via in-process store"
|
|
446
446
|
}
|
|
447
447
|
};
|
|
448
|
+
case "session.list": {
|
|
449
|
+
const includeExpired = Boolean(args.args?.include_expired);
|
|
450
|
+
const rawLimit = Number(args.args?.limit ?? 50);
|
|
451
|
+
const limit = Math.max(1, Math.min(100, Number.isFinite(rawLimit) ? rawLimit : 50));
|
|
452
|
+
const now = Math.floor(Date.now() / 1e3);
|
|
453
|
+
const sessions = [...this.mintedAgent.values()].filter((ms) => includeExpired || ms.expiresAt > now).slice(0, limit).map((ms) => ({
|
|
454
|
+
app_session_uuid: ms.appSessionUuid,
|
|
455
|
+
kind: "agent",
|
|
456
|
+
submode: ms.submode,
|
|
457
|
+
fixed_client_id: null,
|
|
458
|
+
label: "anna-app dev",
|
|
459
|
+
created_at: null,
|
|
460
|
+
last_active_at: null,
|
|
461
|
+
expires_at: new Date(ms.expiresAt * 1e3).toISOString()
|
|
462
|
+
}));
|
|
463
|
+
return {
|
|
464
|
+
ok: true,
|
|
465
|
+
result: { sessions }
|
|
466
|
+
};
|
|
467
|
+
}
|
|
448
468
|
case "session.delete": {
|
|
449
469
|
const apsUuid = String(args.args.app_session_uuid ?? "");
|
|
450
470
|
const ms = this.mintedAgent.get(apsUuid);
|
|
@@ -857,6 +877,11 @@ var HarnessServer = class {
|
|
|
857
877
|
"agent",
|
|
858
878
|
"session.delete"
|
|
859
879
|
],
|
|
880
|
+
[
|
|
881
|
+
"host.agent.session.list",
|
|
882
|
+
"agent",
|
|
883
|
+
"session.list"
|
|
884
|
+
],
|
|
860
885
|
[
|
|
861
886
|
"host.image.generate",
|
|
862
887
|
"image",
|
|
@@ -1133,17 +1158,34 @@ var HarnessServer = class {
|
|
|
1133
1158
|
}
|
|
1134
1159
|
async serveSdk(pathname, res) {
|
|
1135
1160
|
const sdkRel = pathname.replace(/^\/static\/anna-apps\/_sdk\/[^/]+\//, "");
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
const req = createRequire(import.meta.url);
|
|
1139
|
-
distRoot = dirname(req.resolve("@anna-ai/app-runtime"));
|
|
1140
|
-
} catch (e) {
|
|
1141
|
-
return this.text(res, 500, `@anna-ai/app-runtime is not installed: ${e.message}`);
|
|
1142
|
-
}
|
|
1161
|
+
const distRoot = this.resolveSdkDistRoot();
|
|
1162
|
+
if (!distRoot) return this.text(res, 500, "@anna-ai/app-runtime is not installed and no in-tree packages/anna-app-runtime/dist was found.");
|
|
1143
1163
|
const abs = resolve(distRoot, sdkRel);
|
|
1144
1164
|
if (!abs.startsWith(distRoot)) return this.text(res, 403, "forbidden");
|
|
1145
1165
|
return this.serveFile(abs, res);
|
|
1146
1166
|
}
|
|
1167
|
+
/**
|
|
1168
|
+
* Resolve the directory the browser SDK (`index.js` + friends) is served
|
|
1169
|
+
* from. When `--matrix-nexus-root` is set we prefer the in-tree
|
|
1170
|
+
* `packages/anna-app-runtime/dist/` so contributors run byte-identical
|
|
1171
|
+
* with the unpublished workspace SDK (parity with the Python bridge, which
|
|
1172
|
+
* already runs in-tree in `nexus-source` mode). Falls back to the
|
|
1173
|
+
* published npm package resolved from anna-app-cli's own node_modules.
|
|
1174
|
+
* Returns null if neither is available.
|
|
1175
|
+
*/
|
|
1176
|
+
resolveSdkDistRoot() {
|
|
1177
|
+
const root = this.cfg.matrixNexusRoot;
|
|
1178
|
+
if (root) {
|
|
1179
|
+
const inTree = resolve(root, "packages", "anna-app-runtime", "dist");
|
|
1180
|
+
if (existsSync(join(inTree, "index.js"))) return inTree;
|
|
1181
|
+
}
|
|
1182
|
+
try {
|
|
1183
|
+
const req = createRequire(import.meta.url);
|
|
1184
|
+
return dirname(req.resolve("@anna-ai/app-runtime"));
|
|
1185
|
+
} catch {
|
|
1186
|
+
return null;
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1147
1189
|
async serveBundleAsset(rel, res) {
|
|
1148
1190
|
const abs = resolve(this.cfg.bundleDir, normalize(rel));
|
|
1149
1191
|
if (!abs.startsWith(resolve(this.cfg.bundleDir))) return this.text(res, 403, "forbidden");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { canonicalHost } from "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { hostOf, requireAccount, withCode } from "./dev-account-
|
|
2
|
+
import { hostOf, requireAccount, withCode } from "./dev-account-CGo8k9_2.js";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import "./client-
|
|
3
|
-
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-
|
|
2
|
+
import "./client-D-_z1ALk.js";
|
|
3
|
+
import { resolveClient, withErrorHandling } from "./_lifecycle-shared-BpSOfVCP.js";
|
|
4
4
|
import { bold, cyan, dim, green, red, yellow } from "kleur/colors";
|
|
5
5
|
|
|
6
6
|
//#region src/api/tokens.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { canonicalHost } from "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import { createApp, findAppBySlug, getApp } from "./apps-
|
|
3
|
-
import { CliError } from "./client-
|
|
4
|
-
import { parseExecutaIdOverrides, readExecutasLock, substituteBundledRefs, validateBundledHandles, writeBundleToolIdSidecar, writeExecutasLock } from "./bundled-executas-
|
|
5
|
-
import { runExecutaPublish } from "./executa-publish-
|
|
6
|
-
import { loadExecutaManifest } from "./manifest-
|
|
7
|
-
import { runExecutaInstall } from "./executa-install-
|
|
8
|
-
import { appCacheMatches, readAppIdentity, writeAppIdentity } from "./app-cache-
|
|
2
|
+
import { createApp, findAppBySlug, getApp } from "./apps-CCdtLmxQ.js";
|
|
3
|
+
import { CliError } from "./client-D-_z1ALk.js";
|
|
4
|
+
import { parseExecutaIdOverrides, readExecutasLock, substituteBundledRefs, validateBundledHandles, writeBundleToolIdSidecar, writeExecutasLock } from "./bundled-executas-B6b8gIfp.js";
|
|
5
|
+
import { runExecutaPublish } from "./executa-publish-CkPAB34b.js";
|
|
6
|
+
import { loadExecutaManifest } from "./manifest-Bljz8Y6T.js";
|
|
7
|
+
import { runExecutaInstall } from "./executa-install-DQIhVHPT.js";
|
|
8
|
+
import { appCacheMatches, readAppIdentity, writeAppIdentity } from "./app-cache-Bl7cE5fm.js";
|
|
9
9
|
import { join, resolve } from "node:path";
|
|
10
10
|
import { dim, green, yellow } from "kleur/colors";
|
|
11
11
|
import { homedir } from "node:os";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anna-ai/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.26",
|
|
4
4
|
"description": "Anna App developer CLI: scaffold, validate, harness (Phase 2 MVP: init + validate).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -29,11 +29,12 @@
|
|
|
29
29
|
"test:watch": "vitest",
|
|
30
30
|
"lint": "tsc --noEmit",
|
|
31
31
|
"check:runtime-pin": "node scripts/check-runtime-pin.mjs",
|
|
32
|
-
"
|
|
32
|
+
"check:sdk-pin": "node scripts/check-sdk-pin.mjs",
|
|
33
|
+
"prepublishOnly": "pnpm lint && pnpm test && pnpm build && node scripts/check-runtime-pin.mjs && node scripts/check-sdk-pin.mjs"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@anna-ai/app-runtime": "^0.
|
|
36
|
-
"@anna-ai/app-schema": "^0.
|
|
36
|
+
"@anna-ai/app-runtime": "^0.7.0",
|
|
37
|
+
"@anna-ai/app-schema": "^0.9.0",
|
|
37
38
|
"ajv": "^8.17.1",
|
|
38
39
|
"ajv-formats": "^3.0.1",
|
|
39
40
|
"commander": "^12.1.0",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import "./apps-B1Nd8l_t.js";
|
|
3
|
-
import "./client-Dn9zThOd.js";
|
|
4
|
-
import "./bundled-executas-BNOKw4kv.js";
|
|
5
|
-
import "./executas-Cep6KEo0.js";
|
|
6
|
-
import "./executa-cache-BFoUtb4J.js";
|
|
7
|
-
import "./executa-publish-BKFq6Hz9.js";
|
|
8
|
-
import "./manifest-hXWnNFHE.js";
|
|
9
|
-
import "./_lifecycle-shared-sbea9HtH.js";
|
|
10
|
-
import "./app-cache-TcmbIIuL.js";
|
|
11
|
-
import "./app-bundle-upload-Cd4ci4rB.js";
|
|
12
|
-
import { runAppsPublish } from "./apps-publish-U_Y7svJw.js";
|
|
13
|
-
|
|
14
|
-
export { runAppsPublish };
|
package/dist/bridge-DZmZIWG0.js
DELETED
package/dist/dev-DdjwQzJ2.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "./credentials-BTv2IfUZ.js";
|
|
2
|
-
import "./client-Dn9zThOd.js";
|
|
3
|
-
import "./executas-Cep6KEo0.js";
|
|
4
|
-
import "./executa-cache-BFoUtb4J.js";
|
|
5
|
-
import { runExecutaPublish } from "./executa-publish-BKFq6Hz9.js";
|
|
6
|
-
import "./manifest-hXWnNFHE.js";
|
|
7
|
-
import "./_lifecycle-shared-sbea9HtH.js";
|
|
8
|
-
|
|
9
|
-
export { runExecutaPublish };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|