@alexkroman1/aai-cli 17.0.0 → 18.0.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 (61) hide show
  1. package/dist/_console-audio.d.ts +17 -0
  2. package/dist/_console-session.d.ts +70 -0
  3. package/dist/{_dev-server-CLU9xjH5.mjs → _dev-server-Dtp4aAlo.mjs} +1 -1
  4. package/dist/_dev-server.d.ts +1 -0
  5. package/dist/_templates-DXadVNsL.mjs +135 -0
  6. package/dist/_templates.d.ts +11 -34
  7. package/dist/cli.mjs +27 -7
  8. package/dist/console-BsyE3DyB.mjs +422 -0
  9. package/dist/console.d.ts +37 -0
  10. package/dist/{dev-ChsrNHpK.mjs → dev-BGWU2zPP.mjs} +1 -1
  11. package/dist/{init-W-4k-lCF.mjs → init-CbOhyNYe.mjs} +1 -1
  12. package/dist/scaffold/CLAUDE.md +110 -102
  13. package/dist/scaffold/package.json +4 -4
  14. package/dist/start.d.ts +3 -3
  15. package/dist/{studio-DEAJGBXa.mjs → studio-BRJsw7lr.mjs} +1 -1
  16. package/dist/templates/applicant-screening-agent/agent.test.ts +17 -13
  17. package/dist/templates/applicant-screening-agent/crews.ts +4 -4
  18. package/dist/templates/code-interpreter-agent/agent.test.ts +2 -2
  19. package/dist/templates/coding-agent/agent.ts +1 -1
  20. package/dist/templates/custom-pipeline-agent/agent.ts +2 -2
  21. package/dist/templates/custom-pipeline-agent/modes.test.ts +4 -4
  22. package/dist/templates/custom-pipeline-agent/stages.test.ts +75 -83
  23. package/dist/templates/emergency-dispatch-agent/agent.eval.test.ts +1 -1
  24. package/dist/templates/entertainment-picks-agent/agent.eval.test.ts +1 -1
  25. package/dist/templates/executive-inbox-agent/agent.test.ts +35 -25
  26. package/dist/templates/executive-inbox-agent/calendar.test.ts +13 -7
  27. package/dist/templates/executive-inbox-agent/meeting.ts +2 -2
  28. package/dist/templates/front-desk-agent/agent.eval.test.ts +174 -0
  29. package/dist/templates/front-desk-agent/agent.test.ts +150 -0
  30. package/dist/templates/front-desk-agent/agent.ts +22 -0
  31. package/dist/templates/front-desk-agent/shared.ts +234 -0
  32. package/dist/templates/front-desk-agent/system-prompt.md +13 -0
  33. package/dist/templates/front-desk-agent/tools/verify_account.ts +41 -0
  34. package/dist/templates/hotel-reception-agent/agent.test.ts +1 -2
  35. package/dist/templates/hotel-reception-agent/desk-seams.test.ts +1 -2
  36. package/dist/templates/medication-safety-agent/agent.test.ts +3 -4
  37. package/dist/templates/pizza-ordering-agent/agent.eval.test.ts +68 -2
  38. package/dist/templates/push-to-talk-agent/agent.eval.test.ts +74 -0
  39. package/dist/templates/push-to-talk-agent/agent.test.ts +61 -0
  40. package/dist/templates/push-to-talk-agent/agent.ts +22 -0
  41. package/dist/templates/push-to-talk-agent/client.tsx +124 -0
  42. package/dist/templates/push-to-talk-agent/shared.ts +34 -0
  43. package/dist/templates/push-to-talk-agent/system-prompt.md +11 -0
  44. package/dist/templates/push-to-talk-agent/tools/list_notes.ts +15 -0
  45. package/dist/templates/push-to-talk-agent/tools/save_note.ts +26 -0
  46. package/dist/templates/quickstart-agent/agent.eval.test.ts +52 -0
  47. package/dist/templates/research-handoff-agent/agent.eval.test.ts +1 -1
  48. package/dist/templates/research-handoff-agent/agent.test.ts +34 -26
  49. package/dist/templates/research-planner-agent/agent.test.ts +26 -16
  50. package/dist/templates/retail-orders-agent/agent.eval.test.ts +1 -1
  51. package/dist/templates/roadside-assistance-agent/agent.eval.test.ts +87 -0
  52. package/dist/templates/roadside-assistance-agent/agent.test.ts +1 -1
  53. package/dist/templates/technical-support-agent/agent.test.ts +26 -20
  54. package/dist/templates/technical-support-agent/procedure.ts +3 -3
  55. package/dist/templates/topic-briefing-agent/agent.test.ts +38 -25
  56. package/dist/templates/topic-briefing-agent/shared.ts +10 -9
  57. package/dist/templates/travel-concierge-agent/agent.eval.test.ts +9 -7
  58. package/dist/templates/travel-concierge-agent/agent.test.ts +1 -2
  59. package/dist/templates/word-game-agent/agent.test.ts +3 -1
  60. package/package.json +4 -4
  61. package/dist/_templates-IMeKMVIj.mjs +0 -291
@@ -0,0 +1,17 @@
1
+ /**
2
+ * `aai console`'s audio devices, as two SoX subprocesses.
3
+ *
4
+ * SoX rather than a native addon: `rec` and `play` open the system's DEFAULT
5
+ * input and output on macOS (CoreAudio), Linux (ALSA/PulseAudio) and Windows
6
+ * with one command line, and a subprocess costs this package no install-time
7
+ * build step and no binary per platform. The price is that SoX must be
8
+ * installed, which {@link missingSoxMessage} says in so many words.
9
+ *
10
+ * Both run in raw PCM16LE mono (`-t raw -b 16 -e signed-integer -c 1 -L`),
11
+ * the format the session speaks, at the rate the session announced.
12
+ */
13
+ import type { ConsoleAudio } from "./_console-session.ts";
14
+ /** What to tell a developer whose machine has no SoX. */
15
+ export declare function missingSoxMessage(binary: string): string;
16
+ /** The SoX-backed devices. */
17
+ export declare const soxAudio: ConsoleAudio;
@@ -0,0 +1,70 @@
1
+ /**
2
+ * `aai console`'s session wiring, with the audio devices abstracted away.
3
+ *
4
+ * The console is a {@link ClientSink} for `connectSession` — the same seam any
5
+ * embedder uses to run a session over its own audio I/O — and nothing more. It
6
+ * speaks no protocol and opens no socket: the session writes events and agent
7
+ * audio to the sink, and the microphone is fed straight into the connection.
8
+ *
9
+ * The devices are a {@link ConsoleAudio} so this module is testable without a
10
+ * sound card; `_console-audio.ts` is the SoX implementation the command uses.
11
+ */
12
+ import type { ClientSink } from "@alexkroman1/aai/protocol";
13
+ import type { SessionConnection } from "@alexkroman1/aai-runtime";
14
+ /** A running speaker: PCM16LE mono at the rate it was opened with. */
15
+ export type ConsolePlayer = {
16
+ write(pcm16: Uint8Array): void;
17
+ /**
18
+ * Drop whatever the device has not played yet. The runtime's pacer already
19
+ * discards what it is still holding on a barge-in; this is the part that
20
+ * already left it.
21
+ */
22
+ flush(): void;
23
+ stop(): void;
24
+ };
25
+ /** A running microphone. */
26
+ export type ConsoleCapture = {
27
+ stop(): void;
28
+ };
29
+ /** The two audio devices the console needs. */
30
+ export type ConsoleAudio = {
31
+ /** Start the microphone, delivering PCM16LE mono chunks at `sampleRate`. */
32
+ startCapture(sampleRate: number, onChunk: (pcm16: Uint8Array) => void, onError: (err: Error) => void): ConsoleCapture;
33
+ /** Open the speaker at `sampleRate`. */
34
+ startPlayback(sampleRate: number, onError: (err: Error) => void): ConsolePlayer;
35
+ };
36
+ /** Where the console prints a line of conversation. */
37
+ export type ConsolePrinter = {
38
+ user(text: string): void;
39
+ agent(text: string, interrupted?: boolean): void;
40
+ tool(name: string, args: Record<string, unknown>): void;
41
+ error(message: string, fatal: boolean): void;
42
+ };
43
+ /**
44
+ * The sink the session writes to: agent audio to the speaker, the transcript
45
+ * to the terminal.
46
+ *
47
+ * `onClosed` fires when the RUNTIME closes the sink — a session that failed to
48
+ * start, or one resumed elsewhere — so the command can stop the devices and
49
+ * exit rather than sit with a live microphone feeding nothing.
50
+ *
51
+ * `onFatal` fires on a FATAL `error.reported`, which the protocol defines as
52
+ * "the session is over". A browser shows the banner and the person hangs up;
53
+ * the telephony bridge ends the call; the console has to end itself too, or a
54
+ * session that can never speak (a provider refusing the key) leaves the
55
+ * developer talking to silence.
56
+ */
57
+ export declare function createConsoleSink(opts: {
58
+ player: ConsolePlayer;
59
+ print: ConsolePrinter;
60
+ onClosed: (reason?: string) => void;
61
+ onFatal: (message: string) => void;
62
+ }): ClientSink;
63
+ /**
64
+ * Feed a byte stream into a connection as whole PCM16 samples.
65
+ *
66
+ * A pipe hands over reads of whatever length it likes, and an odd one would
67
+ * split a sample across two chunks — every sample after it would then be read
68
+ * with its bytes swapped, which is loud noise rather than a subtle error.
69
+ */
70
+ export declare function createSampleAligner(connection: Pick<SessionConnection, "sendAudio">): (bytes: Uint8Array) => void;
@@ -697,4 +697,4 @@ async function startDevServer(opts) {
697
697
  return supervisor.close;
698
698
  }
699
699
  //#endregion
700
- export { startDevServer };
700
+ export { loadWorker, resolveAgentEnv, startDevServer };
@@ -22,6 +22,7 @@ import { type FSWatcher } from "chokidar";
22
22
  * can't mask one that would be missing both here and after deploy.
23
23
  */
24
24
  export declare function agentEnvWarnings(agentDef: Pick<AgentDef, "stt" | "llm" | "tts" | "s2s" | "requiredEnv" | "page">, env: Record<string, string>, shellEnv?: Record<string, string | undefined>): string[];
25
+ export declare function resolveAgentEnv(root: string, agentDef: AgentDef): Promise<Record<string, string>>;
25
26
  /**
26
27
  * Load the agent definition by bundling agent.ts (and all its local imports)
27
28
  * into a single ESM file, then importing that. A raw `import(agent.ts?t=...)`
@@ -0,0 +1,135 @@
1
+ #!/usr/bin/env node
2
+ import { s as errorMessage } from "./_utils-D5JGcjiW.mjs";
3
+ import { t as getMonorepoRoot } from "./_agent-BzUeqOdj.mjs";
4
+ import path from "node:path";
5
+ import fs from "node:fs/promises";
6
+ import { IGNORED_WORKSPACE_DIRS, isLocalOnlyFile, layerScaffoldFiles, readScaffoldFiles, writeFileWithParents } from "@alexkroman1/aai/workspace-files";
7
+ const REPO_URL = `https://github.com/alexkroman/agent`;
8
+ /**
9
+ * Templates as shipped inside the published tarball, copied into `dist/` by
10
+ * `bundle-templates.mjs` at build time — so this resolves to `dist/` for a
11
+ * published CLI and to the (template-less) package root when running source
12
+ * in the monorepo, where the branch above wins.
13
+ *
14
+ * They used to be fetched at `init` time with giget from
15
+ * `github:alexkroman/agent/packages/aai-templates#main`. That required a
16
+ * network for every `init`, and pinned templates to `main` regardless of the
17
+ * CLI version the user had installed, so a template written against a newer
18
+ * SDK could land in a project resolving an older one. Bundling pins the two
19
+ * together by construction. It also puts the templates inside the studio's
20
+ * guest sandbox, which has the CLI in its baked toolchain but no way to fetch
21
+ * anything from GitHub.
22
+ */
23
+ function bundledTemplatesDir() {
24
+ return import.meta.dirname;
25
+ }
26
+ /** Resolve the templates root — env override, then monorepo, then bundled. */
27
+ function resolveTemplatesDir() {
28
+ const override = process.env.AAI_TEMPLATES_DIR;
29
+ if (override) return override;
30
+ const monorepoRoot = getMonorepoRoot();
31
+ if (monorepoRoot) return path.join(monorepoRoot, "packages", "aai-templates");
32
+ return bundledTemplatesDir();
33
+ }
34
+ /**
35
+ * List the shipped template names (sorted). Backs `aai templates` and the
36
+ * unknown-template error, so the discoverable list and the validated list
37
+ * can never drift.
38
+ */
39
+ async function listTemplates(root = resolveTemplatesDir()) {
40
+ const templatesDir = path.join(root, "templates");
41
+ let available;
42
+ try {
43
+ available = await fs.readdir(templatesDir, { withFileTypes: true });
44
+ } catch (err) {
45
+ throw new Error(`Templates directory is missing or unreadable at ${templatesDir} (incomplete @alexkroman1/aai-cli install?): ${errorMessage(err)}`, { cause: err });
46
+ }
47
+ return available.filter((e) => e.isDirectory()).map((e) => e.name).sort();
48
+ }
49
+ /**
50
+ * Directory holding the base scaffold — the files every project gets
51
+ * underneath its template (package.json, tsconfig, `.gitignore`, …).
52
+ *
53
+ * The scaffold is the single definition of the self-hosted entrypoint, so a
54
+ * caller needing one of its files resolves it here rather than carrying a
55
+ * second copy of that file's contents.
56
+ */
57
+ function scaffoldDir() {
58
+ return path.join(resolveTemplatesDir(), "scaffold");
59
+ }
60
+ /**
61
+ * Layer the base scaffold (package.json, tsconfig, `.gitignore`, …) into
62
+ * targetDir WITHOUT overwriting anything already there. Shared by `aai init`
63
+ * (underneath a template) and `aai pull` (underneath the studio workspace
64
+ * files — the workspace stores source, and the scaffold completes it into a
65
+ * runnable project).
66
+ *
67
+ * The rule itself is `layerScaffoldFiles` in the SDK, over file maps, because
68
+ * this is not its only caller: the studio's GitHub sync commits a workspace to
69
+ * a repository and must complete it identically, and neither package may
70
+ * import the other. This function is only the disk half — read what the rule
71
+ * needs to see, write back what it returns. Only the scaffold's own paths are
72
+ * read from the target: whether a project already has a given file is the one
73
+ * thing the rule asks about it, and `package.json`'s content the one thing it
74
+ * merges.
75
+ */
76
+ async function layerScaffold(targetDir) {
77
+ const scaffold = await readScaffoldFiles(scaffoldDir());
78
+ const existing = {};
79
+ await Promise.all([...Object.keys(scaffold), "CLAUDE.md"].map(async (rel) => {
80
+ try {
81
+ existing[rel] = await fs.readFile(path.join(targetDir, rel), "utf-8");
82
+ } catch {}
83
+ }));
84
+ const writes = layerScaffoldFiles(existing, scaffold);
85
+ await Promise.all(Object.entries(writes).map(([rel, content]) => writeFileWithParents(path.join(targetDir, rel), content)));
86
+ }
87
+ /**
88
+ * `fs.cp` filter for every copy OUT of a template or the scaffold — the runtime
89
+ * ones here and the build-time one in `bundle-templates.mjs`.
90
+ *
91
+ * A template directory is also a runnable project, so a developer who runs
92
+ * `aai dev`, `aai build` or `aai publish` inside one leaves build output and
93
+ * machine state in it: `.aai/` (which holds `project.json` — a SLUG and a
94
+ * `serverUrl` — plus a built client), `.workflow-data/`, `node_modules/`, a
95
+ * `.env`. None of it is git-tracked, and an unfiltered `fs.cp` copied all of it
96
+ * anyway, to both destinations:
97
+ *
98
+ * - into every scaffolded project, so `aai init foo --template bar` produced a
99
+ * directory already LINKED to `bar`'s last local deploy. `aai init` publishes
100
+ * by default, so the first publish either targeted a slug the user never
101
+ * chose or — for the `http://localhost:8080` a dev checkout leaves behind —
102
+ * failed outright with "Refusing to send your API key to …", the project
103
+ * staying mis-linked for every later `push`/`publish`/`secret`.
104
+ * - into `packages/aai-cli/dist/templates`, i.e. into the PUBLISHED tarball
105
+ * (`files: ["bin.mjs", "dist"]`). Measured on a real build: 26 stray
106
+ * `.aai/project.json` files and 9.4 MB of one developer's `.aai/client`
107
+ * bundles out of a 12 MB `templates/`.
108
+ *
109
+ * The vocabulary is the SDK's, not a fourth list: {@link IGNORED_WORKSPACE_DIRS}
110
+ * is already "never walk this", and {@link isLocalOnlyFile} already means "this
111
+ * exists only on a developer's machine" — including a `.env` that must not ship
112
+ * to npm, and deliberately EXCLUDING `.env.example`, which the scaffold ships as
113
+ * source and a scaffolded project cannot do without.
114
+ */
115
+ function templateCopyFilter(src) {
116
+ const name = path.basename(src);
117
+ return !(IGNORED_WORKSPACE_DIRS.has(name) || isLocalOnlyFile(name));
118
+ }
119
+ /**
120
+ * Copy a template into targetDir, merging scaffold files underneath.
121
+ */
122
+ async function downloadAndMergeTemplate(template, targetDir) {
123
+ const root = resolveTemplatesDir();
124
+ const templatesDir = path.join(root, "templates");
125
+ const names = await listTemplates(root);
126
+ if (!names.includes(template)) throw new Error(`Unknown template "${template}". Available templates: ${names.join(", ")}`);
127
+ await fs.cp(path.join(templatesDir, template), targetDir, {
128
+ recursive: true,
129
+ force: true,
130
+ filter: templateCopyFilter
131
+ });
132
+ await layerScaffold(targetDir);
133
+ }
134
+ //#endregion
135
+ export { REPO_URL, downloadAndMergeTemplate, layerScaffold, listTemplates };
@@ -21,20 +21,6 @@ export declare function bundledTemplatesDir(): string;
21
21
  * can never drift.
22
22
  */
23
23
  export declare function listTemplates(root?: string): Promise<string[]>;
24
- type Manifest = Record<string, unknown>;
25
- /**
26
- * Fill a manifest's gaps from the scaffold's, `existing` always winning.
27
- *
28
- * The same rule the file layering uses, one level deeper: a top-level field
29
- * the manifest already declares is left alone, and for the three map fields
30
- * it is each ENTRY that is left alone. Per-entry matters both ways — a
31
- * workspace manifest pins its `dependencies` to exact installed versions and
32
- * must keep them, while a single agent-added `devDependencies` entry must not
33
- * shadow the whole toolchain block.
34
- *
35
- * Returns null when nothing was missing, so the common case writes no file.
36
- */
37
- export declare function mergeScaffoldManifest(existing: Manifest, scaffold: Manifest): Manifest | null;
38
24
  /**
39
25
  * Directory holding the base scaffold — the files every project gets
40
26
  * underneath its template (package.json, tsconfig, `.gitignore`, …).
@@ -45,30 +31,22 @@ export declare function mergeScaffoldManifest(existing: Manifest, scaffold: Mani
45
31
  */
46
32
  export declare function scaffoldDir(): string;
47
33
  /**
48
- * Layer the base scaffold (package.json, tsconfig, …) into targetDir
49
- * WITHOUT overwriting anything already there. Shared by `aai init`
34
+ * Layer the base scaffold (package.json, tsconfig, `.gitignore`, …) into
35
+ * targetDir WITHOUT overwriting anything already there. Shared by `aai init`
50
36
  * (underneath a template) and `aai pull` (underneath the studio workspace
51
37
  * files — the workspace stores source, and the scaffold completes it into a
52
- * runnable project the same way the guest's `ensureProjectShape` does
53
- * before an in-sandbox build).
38
+ * runnable project).
54
39
  *
55
- * package.json is the one file merged rather than skipped — see
56
- * {@link layerScaffoldManifest}. `CLAUDE.md` is the one file SUBSTITUTED: the
57
- * scaffold's copy is the authoring guide, and a project gets
58
- * {@link PROJECT_GUIDE_POINTER} instead.
40
+ * The rule itself is `layerScaffoldFiles` in the SDK, over file maps, because
41
+ * this is not its only caller: the studio's GitHub sync commits a workspace to
42
+ * a repository and must complete it identically, and neither package may
43
+ * import the other. This function is only the disk half — read what the rule
44
+ * needs to see, write back what it returns. Only the scaffold's own paths are
45
+ * read from the target: whether a project already has a given file is the one
46
+ * thing the rule asks about it, and `package.json`'s content the one thing it
47
+ * merges.
59
48
  */
60
49
  export declare function layerScaffold(targetDir: string): Promise<void>;
61
- /**
62
- * `templateCopyFilter` plus the scaffold's own `CLAUDE.md`, which is the
63
- * authoring guide rather than a file a project wants — see
64
- * {@link PROJECT_GUIDE_POINTER}.
65
- *
66
- * Only the scaffold copy filters it. A TEMPLATE's `CLAUDE.md` would be that
67
- * template's own notes and belongs in the project it seeds, so
68
- * {@link downloadAndMergeTemplate} keeps using the unfiltered version. Matched
69
- * on the full path rather than the basename for the same reason.
70
- */
71
- export declare function scaffoldCopyFilter(src: string, scaffold?: string): boolean;
72
50
  /**
73
51
  * `fs.cp` filter for every copy OUT of a template or the scaffold — the runtime
74
52
  * ones here and the build-time one in `bundle-templates.mjs`.
@@ -102,4 +80,3 @@ export declare function templateCopyFilter(src: string): boolean;
102
80
  * Copy a template into targetDir, merging scaffold files underneath.
103
81
  */
104
82
  export declare function downloadAndMergeTemplate(template: string, targetDir: string): Promise<void>;
105
- export {};
package/dist/cli.mjs CHANGED
@@ -396,7 +396,7 @@ const list = defineExec({
396
396
  args: { ...platformArgs },
397
397
  cwd: "any",
398
398
  async run({ args, cwd }) {
399
- const { executeList } = await import("./studio-DEAJGBXa.mjs");
399
+ const { executeList } = await import("./studio-BRJsw7lr.mjs");
400
400
  return executeList({
401
401
  cwd,
402
402
  server: args.server
@@ -428,7 +428,7 @@ const pull = defineExec({
428
428
  },
429
429
  cwd: "any",
430
430
  async run({ args, cwd }) {
431
- const { executePull } = await import("./studio-DEAJGBXa.mjs");
431
+ const { executePull } = await import("./studio-BRJsw7lr.mjs");
432
432
  return executePull({
433
433
  cwd,
434
434
  project: args.project,
@@ -449,7 +449,7 @@ const push = defineExec({
449
449
  },
450
450
  cwd: "agent",
451
451
  async run({ args, cwd }) {
452
- const { executePush } = await import("./studio-DEAJGBXa.mjs");
452
+ const { executePush } = await import("./studio-BRJsw7lr.mjs");
453
453
  return executePush({
454
454
  cwd,
455
455
  server: args.server,
@@ -472,7 +472,7 @@ const publish = defineExec({
472
472
  },
473
473
  cwd: "agent",
474
474
  async run({ args, cwd }) {
475
- const { executePublish } = await import("./studio-DEAJGBXa.mjs");
475
+ const { executePublish } = await import("./studio-BRJsw7lr.mjs");
476
476
  return executePublish({
477
477
  cwd,
478
478
  server: args.server,
@@ -701,7 +701,7 @@ const init = defineExec({
701
701
  },
702
702
  cwd: "none",
703
703
  async run({ args, mode }) {
704
- const { executeInit } = await import("./init-W-4k-lCF.mjs");
704
+ const { executeInit } = await import("./init-CbOhyNYe.mjs");
705
705
  return executeInit({
706
706
  dir: args.dir,
707
707
  force: args.force,
@@ -730,7 +730,7 @@ const dev = defineExec({
730
730
  },
731
731
  cwd: "agent",
732
732
  async run({ args, cwd }) {
733
- const { executeDev } = await import("./dev-ChsrNHpK.mjs");
733
+ const { executeDev } = await import("./dev-BGWU2zPP.mjs");
734
734
  return executeDev({
735
735
  cwd,
736
736
  port: args.port,
@@ -738,6 +738,25 @@ const dev = defineExec({
738
738
  });
739
739
  }
740
740
  });
741
+ const consoleCommand = defineExec({
742
+ meta: {
743
+ name: "console",
744
+ description: "Talk to the agent through your microphone and speakers"
745
+ },
746
+ args: { verbose: {
747
+ type: "boolean",
748
+ description: "Print the runtime's session log to stderr"
749
+ } },
750
+ cwd: "agent",
751
+ async run({ args, cwd, mode }) {
752
+ const { executeConsole } = await import("./console-BsyE3DyB.mjs");
753
+ return executeConsole({
754
+ cwd,
755
+ verbose: args.verbose,
756
+ mode
757
+ });
758
+ }
759
+ });
741
760
  const start = defineExec({
742
761
  meta: {
743
762
  name: "start",
@@ -895,7 +914,7 @@ const templates = defineExec({
895
914
  args: { json: sharedArgs.json },
896
915
  cwd: "none",
897
916
  async run({ mode }) {
898
- const { listTemplates } = await import("./_templates-IMeKMVIj.mjs");
917
+ const { listTemplates } = await import("./_templates-DXadVNsL.mjs");
899
918
  const names = await listTemplates();
900
919
  if (mode === "human") {
901
920
  for (const name of names) log.message(name);
@@ -912,6 +931,7 @@ const mainCommand = defineCommand({
912
931
  subCommands: {
913
932
  init,
914
933
  dev,
934
+ console: consoleCommand,
915
935
  start,
916
936
  test,
917
937
  eval: evalCommand,