@anna-ai/cli 0.1.17 → 0.1.19

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.
@@ -0,0 +1,3 @@
1
+ import { BridgeRequestError, PINNED_RUNTIME_VERSION, PythonBridge } from "./bridge-mkb_EM-y.js";
2
+
3
+ export { PINNED_RUNTIME_VERSION, PythonBridge };
@@ -9,7 +9,7 @@ import { createInterface } from "node:readline";
9
9
  * `uvx <pkg>@<version>` so end users always run the dispatcher version
10
10
  * the CLI was tested against.
11
11
  */
12
- const PINNED_RUNTIME_VERSION = "0.2.0a4";
12
+ const PINNED_RUNTIME_VERSION = "0.2.0a6";
13
13
  /**
14
14
  * Throwable from a {@link RequestHandler} to send a structured JSON-RPC
15
15
  * error back to the python bridge with a stable string ``code`` (e.g.
package/dist/cli.js CHANGED
@@ -451,7 +451,7 @@ program.command("validate").description("Run schema + ACL checks on a manifest+b
451
451
  process.exit(code);
452
452
  });
453
453
  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) => {
454
- const { runDev, parseExecutaSpec } = await import("./dev-Bi6rkb1x.js");
454
+ const { runDev, parseExecutaSpec } = await import("./dev-D8o7xi0W.js");
455
455
  const cwd = opts.cwd ?? process.cwd();
456
456
  let executas;
457
457
  if (opts.executa && opts.executa.length > 0) {
@@ -510,7 +510,7 @@ fixture.command("replay <file>").description("Dry-run replay of a harness record
510
510
  process.exit(code);
511
511
  });
512
512
  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) => {
513
- const { runDoctor } = await import("./doctor-Dxkx0eqv.js");
513
+ const { runDoctor } = await import("./doctor-CgJYokiR.js");
514
514
  const code = await runDoctor({ matrixNexusRoot: opts.matrixNexusRoot });
515
515
  process.exit(code);
516
516
  });
@@ -571,7 +571,7 @@ executa.command("register").description("Register a standalone executa with nexu
571
571
  process.exit(code);
572
572
  });
573
573
  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) => {
574
- const { runExecutaDev } = await import("./executa-dev-BzhSd_A2.js");
574
+ const { runExecutaDev } = await import("./executa-dev-BeC6a8S8.js");
575
575
  const storageMode = opts.storage === void 0 ? void 0 : (() => {
576
576
  const m = opts.storage;
577
577
  if (m === "off" || m === "memory" || m === "mock" || m === "real") return m;
@@ -0,0 +1,3 @@
1
+ import { parseExecutaSpec, runDev } from "./dev-b1j-dEM2.js";
2
+
3
+ export { parseExecutaSpec, runDev };
@@ -43,8 +43,8 @@ async function runDev(opts) {
43
43
  }
44
44
  process.env.ANNA_APP_RUNTIME_STORAGE_MODE = "aps";
45
45
  }
46
- const { PythonBridge, PINNED_RUNTIME_VERSION } = await import("./bridge-B1vq1oG3.js");
47
- const { HarnessServer } = await import("./server-6WHNkydc.js");
46
+ const { PythonBridge, PINNED_RUNTIME_VERSION } = await import("./bridge-B3Vwr4cg.js");
47
+ const { HarnessServer } = await import("./server-BgJGmEpv.js");
48
48
  const bridge = new PythonBridge({
49
49
  mode,
50
50
  matrixNexusRoot: matrixNexusRoot ?? void 0,
@@ -1,4 +1,4 @@
1
- import { PINNED_RUNTIME_VERSION } from "./bridge-Dffh9JUd.js";
1
+ import { PINNED_RUNTIME_VERSION } from "./bridge-mkb_EM-y.js";
2
2
  import { dirname, isAbsolute, resolve } from "node:path";
3
3
  import { existsSync, statSync } from "node:fs";
4
4
  import { spawnSync } from "node:child_process";
@@ -1,4 +1,4 @@
1
- import { parseExecutaSpec } from "./dev-BUetXnfG.js";
1
+ import { parseExecutaSpec } from "./dev-b1j-dEM2.js";
2
2
  import { isAbsolute, resolve } from "node:path";
3
3
  import { existsSync } from "node:fs";
4
4
  import { bold, cyan, dim, green, red, yellow } from "kleur/colors";
@@ -1,5 +1,5 @@
1
1
  import { canonicalHost, getAccount } from "./credentials-BTv2IfUZ.js";
2
- import { BridgeRequestError } from "./bridge-Dffh9JUd.js";
2
+ import { BridgeRequestError } from "./bridge-mkb_EM-y.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";
@@ -44,7 +44,7 @@ var LlmBridge = class {
44
44
  * - ``aps``: the bridge claims storage and forwards to real nexus APS
45
45
  * via ``/api/v1/storage/*`` with a Bearer ``storage_token``. */
46
46
  handles(ns, method) {
47
- if (ns === "llm" && method === "complete") return true;
47
+ if (ns === "llm" && (method === "complete" || method === "embed")) return true;
48
48
  if (ns === "agent" && method.startsWith("session.")) return true;
49
49
  if (ns === "image" && (method === "generate" || method === "edit")) return true;
50
50
  if (ns === "upload" && (method === "inline" || method === "negotiate" || method === "confirm")) return true;
@@ -55,7 +55,7 @@ var LlmBridge = class {
55
55
  * ``LlmBridge.handles(ns, method)`` without an instance. Returns the
56
56
  * legacy (no-storage) decision since options aren't available here. */
57
57
  static handles(ns, method) {
58
- if (ns === "llm" && method === "complete") return true;
58
+ if (ns === "llm" && (method === "complete" || method === "embed")) return true;
59
59
  if (ns === "agent" && method.startsWith("session.")) return true;
60
60
  if (ns === "image" && (method === "generate" || method === "edit")) return true;
61
61
  if (ns === "upload" && (method === "inline" || method === "negotiate" || method === "confirm")) return true;
@@ -285,6 +285,14 @@ var LlmBridge = class {
285
285
  result
286
286
  };
287
287
  }
288
+ if (args.ns === "llm" && args.method === "embed") {
289
+ const ms = await this.mintComplete(args.windowUuid);
290
+ const result = await this.postJson(`${canonicalHost(acc.host)}/api/v1/copilot/app/embed`, ms.appSessionToken, args.args);
291
+ return {
292
+ ok: true,
293
+ result
294
+ };
295
+ }
288
296
  if (args.ns === "agent") switch (args.method) {
289
297
  case "session.create": {
290
298
  const ms = await this.mintAgent(args.args);
@@ -646,6 +654,11 @@ var HarnessServer = class {
646
654
  "llm",
647
655
  "complete"
648
656
  ],
657
+ [
658
+ "host.llm.embed",
659
+ "llm",
660
+ "embed"
661
+ ],
649
662
  [
650
663
  "host.agent.session.create",
651
664
  "agent",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anna-ai/cli",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "description": "Anna App developer CLI: scaffold, validate, harness (Phase 2 MVP: init + validate).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,3 +0,0 @@
1
- import { BridgeRequestError, PINNED_RUNTIME_VERSION, PythonBridge } from "./bridge-Dffh9JUd.js";
2
-
3
- export { PINNED_RUNTIME_VERSION, PythonBridge };
@@ -1,3 +0,0 @@
1
- import { parseExecutaSpec, runDev } from "./dev-BUetXnfG.js";
2
-
3
- export { parseExecutaSpec, runDev };