@alexkroman1/aai-cli 0.18.2 → 0.19.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 (66) hide show
  1. package/dist/{_agent-BN21AHsJ.mjs → _agent-Bj6Q_vDG.mjs} +3 -4
  2. package/dist/{_api-client-Uljj0CQi.mjs → _api-client-BlnLXkZL.mjs} +3 -4
  3. package/dist/{_artifacts-BJOYGQPp.mjs → _artifacts-Drssawoc.mjs} +1 -2
  4. package/dist/{_build-target-C08aM-Es.mjs → _build-target-CWpq0VVa.mjs} +7 -14
  5. package/dist/{_bundler-DvZDEu2p.mjs → _bundler-BLy_GtuH.mjs} +7 -8
  6. package/dist/{_client-plugins-kR43nZnb.mjs → _client-plugins-BWryIN7z.mjs} +3 -4
  7. package/dist/{_config-Dlh8PRRp.mjs → _config-yWqkB0Qz.mjs} +5 -6
  8. package/dist/{_dev-env-D9Uy5wNt.mjs → _dev-env-DP0lLryD.mjs} +1 -2
  9. package/dist/{_dev-server-C_zidzWj.mjs → _dev-server--x-e22KR.mjs} +21 -28
  10. package/dist/_mock-registry.d.ts +5 -0
  11. package/dist/{_preflight-Bv6Ct4ss.mjs → _preflight-JRzjhjeI.mjs} +2 -3
  12. package/dist/{_run-code-deno-C0AtfHeH.mjs → _run-code-deno-D69GatOo.mjs} +3 -4
  13. package/dist/{_server-common-C6j67AcZ.mjs → _server-common-BB_ojN_l.mjs} +4 -5
  14. package/dist/{_slug-api-B9cptz7Q.mjs → _slug-api-Bydkac5S.mjs} +4 -5
  15. package/dist/{_start-workers-BNdOnTal.mjs → _start-workers-DBiICf6o.mjs} +8 -38
  16. package/dist/{_studio-zympBLlD.mjs → _studio-DlJnf9D5.mjs} +5 -6
  17. package/dist/{_templates-ChZuhW66.mjs → _templates-BIzBxGOW.mjs} +5 -6
  18. package/dist/{_typecheck-gate-BNF5cboL.mjs → _typecheck-gate-B60qpe6n.mjs} +3 -4
  19. package/dist/{_ui-C0RufoYZ.mjs → _ui-DOrhK1ET.mjs} +3 -4
  20. package/dist/{_utils-ChU85MEg.mjs → _utils-W_hmhlT5.mjs} +5 -7
  21. package/dist/{_vite-env-BiyJ0GQH.mjs → _vite-env-KVEx9r2_.mjs} +1 -3
  22. package/dist/{_vitest-runner-tzyto9IU.mjs → _vitest-runner-BIh-yKTG.mjs} +4 -5
  23. package/dist/{_workflow-determinism-CLxFQ5ox.mjs → _workflow-determinism-D5xr1EyE.mjs} +2 -3
  24. package/dist/{build-BHgd-QYb.mjs → build-Dab9cZiG.mjs} +23 -29
  25. package/dist/cli.mjs +26 -31
  26. package/dist/{client-bundler-CImhqcp2.mjs → client-bundler-iQhwQ3Y-.mjs} +8 -10
  27. package/dist/client-bundler.mjs +1 -2
  28. package/dist/{console-DwycgRkC.mjs → console-CAlP2e9Z.mjs} +8 -11
  29. package/dist/{delete-ZcA3J_3o.mjs → delete-D28hn7Gp.mjs} +7 -8
  30. package/dist/{deploy-CkfkiZE3.mjs → deploy-DBgwl03r.mjs} +13 -15
  31. package/dist/{dev-BX9g6qcf.mjs → dev-GwaVXLuc.mjs} +8 -10
  32. package/dist/{eval-CUKvfxRq.mjs → eval-K7IDiaYP.mjs} +5 -6
  33. package/dist/{init-B9Uw76-_.mjs → init--gLLPng0.mjs} +9 -11
  34. package/dist/{login-Ct73CqU1.mjs → login-DknFC9Or.mjs} +8 -9
  35. package/dist/{logs-BBsUy96d.mjs → logs-tqX6e7p-.mjs} +7 -8
  36. package/dist/project-config.mjs +1 -2
  37. package/dist/scaffold/CLAUDE.md +2 -2
  38. package/dist/scaffold/agent-guide/AGENT-API.md +1 -1
  39. package/dist/scaffold/agent-guide/HOSTING.md +1 -1
  40. package/dist/scaffold/agent-guide/PROVIDERS.md +6 -2
  41. package/dist/scaffold/package.json +14 -14
  42. package/dist/{secret-CKjHRrVX.mjs → secret-BW0vS0m2.mjs} +9 -11
  43. package/dist/start.mjs +16 -22
  44. package/dist/{studio-U6DvBNAx.mjs → studio-CMT2R7x8.mjs} +11 -12
  45. package/dist/templates/coding-agent/agent.test.ts +1 -1
  46. package/dist/templates/coding-agent/chat.ts +1 -1
  47. package/dist/templates/custom-pipeline-agent/stages.test.ts +3 -1
  48. package/dist/templates/front-desk-agent/agent.test.ts +3 -1
  49. package/dist/templates/front-door-agent/agent.test.ts +9 -12
  50. package/dist/templates/home-assistant-agent/agent.test.ts +9 -6
  51. package/dist/templates/hotel-reception-agent/agent.test.ts +2 -1
  52. package/dist/templates/hotel-reception-agent/booking.ts +5 -1
  53. package/dist/templates/hotel-reception-agent/hotel.ts +15 -5
  54. package/dist/templates/hotel-reception-agent/seed.ts +1 -1
  55. package/dist/templates/kitchen-coach-agent/agent.test.ts +3 -5
  56. package/dist/templates/tabletop-rpg-agent/agent.test.ts +1 -1
  57. package/dist/templates/technical-support-agent/knowledge.ts +3 -1
  58. package/dist/templates/text-adventure-agent/agent.test.ts +4 -1
  59. package/dist/templates/transcription-workflow/agent.test.ts +3 -8
  60. package/dist/templates/transcription-workflow/workflows/stream.ts +1 -1
  61. package/dist/{test-CW5cw5fy.mjs → test-C0YRaetz.mjs} +4 -5
  62. package/dist/typecheck.mjs +4 -5
  63. package/dist/{worker-bundler-D8uCzpYP.mjs → worker-bundler-B3HezfRu.mjs} +8 -10
  64. package/dist/worker-bundler.mjs +1 -2
  65. package/dist/{workflow-5gOZMB2M.mjs → workflow-CYBoqe23.mjs} +6 -7
  66. package/package.json +16 -16
@@ -211,7 +211,10 @@ describeAgent(agentDef, (run) => {
211
211
 
212
212
  const first = await playthrough(createSeededRandom(7));
213
213
  expect(await playthrough(createSeededRandom(7))).toEqual(first);
214
- expect([...new Set(first)].sort()).toEqual([false, true]);
214
+ expect([...new Set(first)].sort((a, b) => Number(a > b) - Number(a < b))).toEqual([
215
+ false,
216
+ true,
217
+ ]);
215
218
  expect(await playthrough(createSeededRandom(8))).not.toEqual(first);
216
219
  });
217
220
  });
@@ -1838,14 +1838,9 @@ describe("the batch run is DURABLE", () => {
1838
1838
  // One key set, so the page's summary line renders every flow's output. A field on
1839
1839
  // one flow and not the others is a panel that shows it for some runs and not
1840
1840
  // others, with nothing saying why.
1841
- expect(Object.keys(run.output as Transcript).sort()).toEqual([
1842
- "durationMs",
1843
- "elapsedMs",
1844
- "segments",
1845
- "source",
1846
- "transcript",
1847
- "words",
1848
- ]);
1841
+ expect(
1842
+ Object.keys(run.output as Transcript).sort((a, b) => Number(a > b) - Number(a < b)),
1843
+ ).toEqual(["durationMs", "elapsedMs", "segments", "source", "transcript", "words"]);
1849
1844
  });
1850
1845
 
1851
1846
  test("reports the elapsed from the run's OWN start, not the resuming walk's", async () => {
@@ -342,7 +342,7 @@ export async function transcribeStreamFlow(input: { recording: string }, ctx: Wo
342
342
  */
343
343
  let baseline: UploadProgressView | undefined;
344
344
 
345
- for (;;) {
345
+ while (true) {
346
346
  const at = await ctx.step("probeUpload", () => probeUpload(input.recording));
347
347
  // Every poll, because this is only ever read at the END — the run breaks out
348
348
  // on a `complete` view, whose prefix is the whole file. Updating it inside a
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import { D as ok, l as formatCappedList, w as fail } from "./_utils-ChU85MEg.mjs";
3
- import { t as defaultUi } from "./_ui-C0RufoYZ.mjs";
4
- import { i as unrunSpecFiles, n as classifyVitestError, r as runVitest, t as WIDEN_HINT } from "./_vitest-runner-tzyto9IU.mjs";
5
- //#region src/test.ts
2
+ import { D as ok, l as formatCappedList, w as fail } from "./_utils-W_hmhlT5.mjs";
3
+ import { t as defaultUi } from "./_ui-DOrhK1ET.mjs";
4
+ import { i as unrunSpecFiles, n as classifyVitestError, r as runVitest, t as WIDEN_HINT } from "./_vitest-runner-BIh-yKTG.mjs";
5
+ // src/test.ts
6
6
  /**
7
7
  * `aai test` — run agent tests via vitest.
8
8
  *
@@ -99,5 +99,4 @@ async function executeTest(cwd, opts = {}, deps = {}) {
99
99
  function noNarrowTarget(unrun) {
100
100
  return fail("incomplete_run", `\`aai test --only\` found no ${TEST_FILES[0]}, so it ran nothing, but ${unrun.length} spec file(s) exist: ${formatCappedList(unrun)}. An unrun spec is not a passing one, so this is not a green result.`, WIDEN_HINT);
101
101
  }
102
- //#endregion
103
102
  export { TEST_FILES, executeTest };
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import { h as readPackageJson, n as binFromManifest, s as errorMessage } from "./_utils-ChU85MEg.mjs";
2
+ import { spawn } from "node:child_process";
3
3
  import { existsSync } from "node:fs";
4
4
  import path from "node:path";
5
- import { spawn } from "node:child_process";
6
- //#region src/typecheck.ts
5
+ import { h as readPackageJson, n as binFromManifest, s as errorMessage } from "./_utils-W_hmhlT5.mjs";
6
+ // src/typecheck.ts
7
7
  /**
8
8
  * Project typechecking — `tsc --noEmit` over the project's own tsconfig.
9
9
  *
@@ -48,7 +48,7 @@ const OUTPUT_CAP = 16e3;
48
48
  */
49
49
  function findTypescriptPackage(cwd) {
50
50
  let dir = path.resolve(cwd);
51
- for (;;) {
51
+ while (true) {
52
52
  const candidate = path.join(dir, "node_modules", "typescript");
53
53
  if (existsSync(path.join(candidate, "package.json"))) return candidate;
54
54
  const parent = path.dirname(dir);
@@ -181,5 +181,4 @@ async function typecheckProject(cwd) {
181
181
  output: `Type check failed:\n${result.output.trim()}`
182
182
  };
183
183
  }
184
- //#endregion
185
184
  export { typecheckProject };
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
- import { a as errorCode } from "./_utils-ChU85MEg.mjs";
3
- import { n as withPreservedNodeEnv, r as devSourceViteConfig } from "./_vite-env-BiyJ0GQH.mjs";
4
- import { createRequire } from "node:module";
5
- import { realpathSync } from "node:fs";
6
- import path from "node:path";
7
- import { isRecord } from "@alexkroman1/aai/utils";
8
2
  import fs from "node:fs/promises";
3
+ import path from "node:path";
9
4
  import { invariant, isRegistryModuleFile } from "@alexkroman1/aai/internal";
10
5
  import { build, mergeConfig } from "vite";
6
+ import { n as withPreservedNodeEnv, r as devSourceViteConfig } from "./_vite-env-KVEx9r2_.mjs";
7
+ import { a as errorCode } from "./_utils-W_hmhlT5.mjs";
8
+ import { realpathSync } from "node:fs";
9
+ import { createRequire } from "node:module";
11
10
  import { CARTESIA_KIND, DEEPGRAM_KIND, ELEVENLABS_KIND, stageMembers } from "@alexkroman1/aai/host-internal";
12
- //#region src/_vendor-openers.ts
11
+ import { isRecord } from "@alexkroman1/aai/utils";
12
+ // src/_vendor-openers.ts
13
13
  /**
14
14
  * Leave an undeclared vendor's STT/TTS opener out of the worker bundle.
15
15
  *
@@ -155,8 +155,7 @@ function omitVendorOpeners(cwd, kinds) {
155
155
  }
156
156
  };
157
157
  }
158
- //#endregion
159
- //#region src/worker-bundler.ts
158
+ // src/worker-bundler.ts
160
159
  /**
161
160
  * Generated wrapper entry, written under `.aai/` for the duration of the
162
161
  * build (the CLI's own scratch dir — dot-paths are ignored by the dev
@@ -331,5 +330,4 @@ async function buildWorker(cwd, options = {}) {
331
330
  invariant(chunk !== void 0, "bundle.worker.entry-chunk", () => ({ kinds: output.output.map((o) => o.type) }));
332
331
  return chunk.code;
333
332
  }
334
- //#endregion
335
333
  export { discoverModuleFiles as n, vendorsToOmit as r, buildWorker as t };
@@ -1,3 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import { n as discoverModuleFiles, t as buildWorker } from "./worker-bundler-D8uCzpYP.mjs";
3
- export { buildWorker, discoverModuleFiles };
2
+ export { t as buildWorker, n as discoverModuleFiles } from "./worker-bundler-B3HezfRu.mjs";
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import { C as CliError, D as ok, w as fail, y as stripTrailingSlash } from "./_utils-ChU85MEg.mjs";
3
- import { t as defaultUi } from "./_ui-C0RufoYZ.mjs";
4
- import { i as readProjectConfig } from "./_config-Dlh8PRRp.mjs";
5
- import { n as getServerInfo } from "./_agent-BN21AHsJ.mjs";
6
- import { t as DEFAULT_REQUEST_TIMEOUT_MS } from "./_api-client-Uljj0CQi.mjs";
7
2
  import { errorMessage, isRecord, omitUndefined } from "@alexkroman1/aai/utils";
8
3
  import { createWorkflowApiClient } from "@alexkroman1/aai/workflow-api";
9
- //#region src/workflow.ts
4
+ import { n as getServerInfo } from "./_agent-Bj6Q_vDG.mjs";
5
+ import { t as DEFAULT_REQUEST_TIMEOUT_MS } from "./_api-client-BlnLXkZL.mjs";
6
+ import { i as readProjectConfig } from "./_config-yWqkB0Qz.mjs";
7
+ import { C as CliError, D as ok, w as fail, y as stripTrailingSlash } from "./_utils-W_hmhlT5.mjs";
8
+ import { t as defaultUi } from "./_ui-DOrhK1ET.mjs";
9
+ // src/workflow.ts
10
10
  /**
11
11
  * `aai workflow` — reading and steering a deployed agent's durable runs from a
12
12
  * terminal.
@@ -282,5 +282,4 @@ async function executeWorkflowCancel(cwd, runId, opts, ui = defaultUi, deps = RE
282
282
  const HINT_BROKER = "The agent may declare no workflows, or its sandbox may still be starting — try again shortly. Pass --token if the agent sets AAI_WORKFLOW_API_TOKEN.";
283
283
  /** What a body that is not the workflow API's shape is told. */
284
284
  const HINT_BAD_RESPONSE = "That target does not answer like an aai agent's workflow API. Check --agent (or the project's deployment) points at an aai agent, then try again.";
285
- //#endregion
286
285
  export { executeWorkflowCancel, executeWorkflowList, executeWorkflowRuns, executeWorkflowShow };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexkroman1/aai-cli",
3
- "version": "0.18.2",
3
+ "version": "0.19.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -46,27 +46,27 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "@clack/prompts": "^1.8.1",
50
- "chokidar": "^5.0.0",
49
+ "@clack/prompts": "^1.9.0",
50
+ "chokidar": "^6.0.0",
51
51
  "citty": "^0.2.2",
52
52
  "env-paths": "^4.0.0",
53
- "execa": "^10.0.1",
53
+ "execa": "^10.2.1",
54
54
  "get-port": "^7.2.0",
55
55
  "ofetch": "^1.5.1",
56
- "p-debounce": "^5.1.1",
57
- "p-timeout": "^7.0.2",
58
- "vite": "^8.3.1",
59
- "xstate": "^5.33.2",
60
- "zod": "^4.6.5",
61
- "@alexkroman1/aai": "0.18.2",
62
- "@alexkroman1/aai-runtime": "0.18.2",
63
- "@alexkroman1/aai-ui": "0.18.2"
56
+ "p-debounce": "^6.0.0",
57
+ "p-timeout": "^8.1.0",
58
+ "vite": "^8.3.8",
59
+ "xstate": "^5.33.4",
60
+ "zod": "^4.6.7",
61
+ "@alexkroman1/aai": "0.19.0",
62
+ "@alexkroman1/aai-runtime": "0.19.0",
63
+ "@alexkroman1/aai-ui": "0.19.0"
64
64
  },
65
65
  "devDependencies": {
66
- "playwright": "^1.63.0",
67
- "tsdown": "^0.22.14",
68
- "verdaccio": "^6.10.4",
69
- "vitest": "^5.0.1",
66
+ "playwright": "^1.65.1",
67
+ "tsdown": "^0.23.7",
68
+ "verdaccio": "^7.1.2",
69
+ "vitest": "^5.1.1",
70
70
  "aai-templates": "0.5.0"
71
71
  },
72
72
  "peerDependencies": {