@alexkroman1/aai-cli 1.10.0 → 1.11.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.
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import { a as serverOrigin, i as readProjectConfig, n as ensureApiKey, r as readGlobalConfig, t as approveServer } from "./_config-BMjZt5hG.mjs";
2
+ import { a as serverOrigin, i as readProjectConfig, n as ensureApiKey, r as readGlobalConfig, t as approveServer } from "./_config-BWYgLjiI.mjs";
3
3
  import { existsSync } from "node:fs";
4
4
  import path from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
+ import { VALID_SLUG_RE } from "@alexkroman1/aai/utils";
6
7
  //#region _agent.ts
7
8
  const DEFAULT_SERVER = "https://aai-agent.fly.dev";
8
9
  const DEFAULT_DEV_SERVER = "http://localhost:8080";
@@ -80,15 +81,6 @@ async function resolveDeployTarget(cwd, explicitServer) {
80
81
  apiKey: await ensureApiKey()
81
82
  };
82
83
  }
83
- /**
84
- * Slug shape accepted by the platform (kept in sync with `VALID_SLUG_RE` in
85
- * aai-server's schemas.ts — the server package is private, so the pattern is
86
- * duplicated here). Enforced before a slug is ever interpolated into a URL
87
- * path: `.aai/project.json` is repo-controlled, so a hostile
88
- * `"slug": "x/../admin"` must not steer a credentialed request to an
89
- * arbitrary path on an approved origin.
90
- */
91
- const VALID_SLUG_RE = /^[a-z0-9][a-z0-9_-]{0,62}[a-z0-9]$/;
92
84
  /** Like resolveDeployTarget, but requires an existing deployment (project config). */
93
85
  async function getServerInfo(cwd, explicitServer) {
94
86
  const { config, serverUrl, apiKey } = await resolveDeployTarget(cwd, explicitServer);
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as log, u as ok } from "./_ui-CKEIHAtB.mjs";
3
- import { c as validateAgentExport, r as errorMessage } from "./_utils-ECl2je7-.mjs";
4
- import { t as buildClient } from "./client-bundler-VdcgFcos.mjs";
3
+ import { c as validateAgentExport, r as errorMessage } from "./_utils-C502jKo8.mjs";
4
+ import { t as buildClient } from "./client-bundler-BO1Wm1wT.mjs";
5
5
  import { buildWorker } from "./worker-bundler.mjs";
6
6
  import path from "node:path";
7
7
  import { pathToFileURL } from "node:url";
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { a as unwrapCancel, n as log, o as CliError } from "./_ui-CKEIHAtB.mjs";
3
- import { l as writeJson, o as readJson, r as errorMessage } from "./_utils-ECl2je7-.mjs";
3
+ import { l as writeJson, o as readJson, r as errorMessage } from "./_utils-C502jKo8.mjs";
4
4
  import { existsSync } from "node:fs";
5
5
  import path from "node:path";
6
6
  import * as p from "@clack/prompts";
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as log } from "./_ui-CKEIHAtB.mjs";
3
- import { r as errorMessage, t as errorCode } from "./_utils-ECl2je7-.mjs";
4
- import { n as fallbackHtmlPlugin } from "./client-bundler-VdcgFcos.mjs";
3
+ import { r as errorMessage, t as errorCode } from "./_utils-C502jKo8.mjs";
4
+ import { n as fallbackHtmlPlugin } from "./client-bundler-BO1Wm1wT.mjs";
5
5
  import { buildWorker } from "./worker-bundler.mjs";
6
- import { createWorkerEvaluator } from "./_bundler-CKz9Q15i.mjs";
7
- import { n as ensureApiKey } from "./_config-BMjZt5hG.mjs";
6
+ import { createWorkerEvaluator } from "./_bundler-z6wTRMX8.mjs";
7
+ import { n as ensureApiKey } from "./_config-BWYgLjiI.mjs";
8
8
  import { t as resolveServerEnv } from "./_server-common-Bv-4Rskq.mjs";
9
9
  import { createRequire } from "node:module";
10
10
  import { existsSync } from "node:fs";
@@ -16,116 +16,111 @@ import getPort, { portNumbers } from "get-port";
16
16
  import pDebounce from "p-debounce";
17
17
  //#region _dev-bundler.ts
18
18
  /**
19
- * Incremental worker builds for `aai dev`.
19
+ * Fast worker builds for `aai dev`.
20
20
  *
21
- * The deploy path (`buildWorker` in `worker-bundler.ts`) is a from-scratch
22
- * Vite/Rollup pass — right for a one-shot `aai deploy`, but 1–3 s per save
23
- * when the dev watcher runs it on every change. This module keeps a
24
- * long-lived esbuild `context()` whose `rebuild()` reuses the previous
25
- * build's work, cutting rebuilds to tens of ms. Deploy keeps Vite untouched,
26
- * so nothing that ships is produced by esbuild.
21
+ * The deploy path (`buildWorker` in `worker-bundler.ts`) is a full Vite
22
+ * pipeline pass — right for a one-shot `aai deploy`, but 1–3 s per save when
23
+ * the dev watcher runs it on every change. This module builds with Rolldown
24
+ * directly (the native bundler Vite 8 itself runs on, so it adds no install
25
+ * weight), skipping Vite's config/plugin/CSS machinery: a from-scratch build
26
+ * of a typical agent lands in tens of ms. Deploy keeps Vite untouched, so
27
+ * nothing that ships is produced by this path.
27
28
  *
28
29
  * Parity with `buildWorker` where it matters for dev:
29
30
  *
30
31
  * - single-file ESM output, unminified (dev builds never minify);
31
- * - `node:` builtins external (esbuild's `platform: "node"`), everything
32
+ * - `node:` builtins external (Rolldown's `platform: "node"`), everything
32
33
  * else — zod, workspace deps, local imports — bundled in;
33
- * - `.md` imports resolve to their raw text (esbuild's `text` loader is
34
+ * - `.md` imports resolve to their raw text (`mdPlugin` below is
34
35
  * `rawMdPlugin`'s transform), and Vite-style `?raw` suffix imports are
35
- * honored via `rawSuffixPlugin` below.
36
+ * honored via `rawSuffixPlugin`.
36
37
  *
37
- * Known dev/deploy differences, accepted: Rollup and esbuild can disagree on
38
- * `exports`-condition ordering for exotic dual-format packages, and Vite's
39
- * lib build applies `define`/`import.meta.env` replacements esbuild does not.
40
- * When a rebuild fails for anything other than a compile error in the agent's
41
- * code, the caller falls back to the cold Vite path (see `_dev-server.ts`),
42
- * so an esbuild-specific resolution gap degrades to the old slow-but-correct
43
- * behavior rather than a broken dev server.
38
+ * Known dev/deploy differences, accepted: Vite's lib build applies
39
+ * `define`/`import.meta.env` replacements this path does not. When a build
40
+ * fails for anything other than a compile error in the agent's code, the
41
+ * caller falls back to the cold Vite path (see `_dev-server.ts`), so a
42
+ * resolution gap here degrades to the old slow-but-correct behavior rather
43
+ * than a broken dev server.
44
44
  *
45
- * esbuild does not touch `process.env` (verified: no NODE_ENV write in its
46
- * JS API), so the `withPreservedNodeEnv` wrapper Vite builds need is not
47
- * required here.
45
+ * Rolldown does not touch `process.env` the way Vite's `build()` does, so
46
+ * the `withPreservedNodeEnv` wrapper Vite builds need is not required here.
48
47
  */
48
+ const RAW_NAMESPACE = "\0aai-raw:";
49
49
  /**
50
- * Vite serves `import x from "./file?raw"` as the file's text. esbuild treats
51
- * the suffix as part of the filename, so resolve it explicitly and load the
52
- * real file with the `text` loader.
50
+ * Vite serves `import x from "./file?raw"` as the file's text. Rolldown
51
+ * treats the suffix as part of the filename, so resolve it explicitly and
52
+ * load the real file as a string export.
53
53
  */
54
54
  const rawSuffixPlugin = {
55
- name: "raw-suffix",
56
- setup(build) {
57
- build.onResolve({ filter: /\?raw$/ }, (args) => ({
58
- path: path.resolve(args.resolveDir, args.path.slice(0, -4)),
59
- namespace: "aai-raw"
60
- }));
61
- build.onLoad({
62
- filter: /.*/,
63
- namespace: "aai-raw"
64
- }, async (args) => ({
65
- contents: await fs.readFile(args.path, "utf8"),
66
- loader: "text"
67
- }));
55
+ name: "aai-raw-suffix",
56
+ resolveId: {
57
+ filter: { id: /\?raw$/ },
58
+ handler(id, importer) {
59
+ const file = id.slice(0, -4);
60
+ const base = importer ? path.dirname(importer) : process.cwd();
61
+ return RAW_NAMESPACE + path.resolve(base, file);
62
+ }
63
+ },
64
+ load: {
65
+ filter: { id: new RegExp(`^${RAW_NAMESPACE}`) },
66
+ async handler(id) {
67
+ const text = await fs.readFile(id.slice(9), "utf8");
68
+ return `export default ${JSON.stringify(text)};`;
69
+ }
70
+ }
71
+ };
72
+ /** `.md` imports resolve to their raw text (rawMdPlugin parity). */
73
+ const mdPlugin = {
74
+ name: "aai-raw-md",
75
+ load: {
76
+ filter: { id: /\.md$/ },
77
+ async handler(id) {
78
+ const text = await fs.readFile(id, "utf8");
79
+ return `export default ${JSON.stringify(text)};`;
80
+ }
68
81
  }
69
82
  };
70
83
  /**
71
- * True for esbuild build failures — compile/resolve errors in the code being
72
- * built (the esbuild analog of a Rollup diagnostic). Anything else coming out
73
- * of `rebuild()` is an esbuild-infrastructure problem, which callers treat as
74
- * "fall back to the cold Vite path" rather than "the user's code is broken".
84
+ * True for bundler build failures — compile/resolve errors in the code being
85
+ * built (Rolldown aggregates its diagnostics onto an `errors` array, the same
86
+ * shape esbuild used). Anything else coming out of `build()` is a
87
+ * bundler-infrastructure problem, which callers treat as "fall back to the
88
+ * cold Vite path" rather than "the user's code is broken".
75
89
  */
76
- function isEsbuildBuildFailure(err) {
90
+ function isBundlerBuildFailure(err) {
77
91
  return err instanceof Error && "errors" in err && Array.isArray(err.errors);
78
92
  }
79
93
  /**
80
- * Create an incremental dev builder for the agent at `cwd`.
94
+ * Create a dev builder for the agent at `cwd`.
81
95
  *
82
- * The context is created lazily on first `build()` and kept across calls
83
- * that reuse is the entire point. A rebuild that fails for a non-compile
84
- * reason drops the context so the next call starts from a clean one.
96
+ * Each `build()` is a from-scratch Rolldown pass native-code bundling is
97
+ * fast enough (tens of ms for a typical agent) that no incremental context
98
+ * is worth holding between saves. `dispose()` exists for interface parity
99
+ * with resource-holding builders and is a no-op.
85
100
  */
86
101
  function createDevWorkerBuilder(cwd) {
87
- let ctx;
88
- async function ensureContext() {
89
- if (ctx) return ctx;
90
- const { context } = await import("esbuild");
91
- ctx = await context({
92
- entryPoints: [path.join(cwd, "agent.ts")],
93
- absWorkingDir: cwd,
94
- bundle: true,
95
- format: "esm",
96
- platform: "node",
97
- target: "node20",
98
- write: false,
99
- outfile: "worker.js",
100
- minify: false,
101
- logLevel: "silent",
102
- loader: { ".md": "text" },
103
- plugins: [rawSuffixPlugin]
104
- });
105
- return ctx;
106
- }
107
102
  return {
108
103
  async build() {
109
- const active = await ensureContext();
110
- let result;
104
+ const { rolldown } = await import("rolldown");
105
+ const bundle = await rolldown({
106
+ input: path.join(cwd, "agent.ts"),
107
+ cwd,
108
+ platform: "node",
109
+ logLevel: "silent",
110
+ plugins: [rawSuffixPlugin, mdPlugin]
111
+ });
111
112
  try {
112
- result = await active.rebuild();
113
- } catch (err) {
114
- if (!isEsbuildBuildFailure(err)) {
115
- ctx = void 0;
116
- await active.dispose().catch(() => void 0);
117
- }
118
- throw err;
113
+ const file = (await bundle.generate({
114
+ format: "esm",
115
+ minify: false
116
+ })).output[0];
117
+ if (!file) throw new Error("Rolldown produced no output for agent.ts");
118
+ return file.code;
119
+ } finally {
120
+ await bundle.close().catch(() => void 0);
119
121
  }
120
- const file = result.outputFiles?.[0];
121
- if (!file) throw new Error("esbuild produced no output for agent.ts");
122
- return file.text;
123
122
  },
124
- async dispose() {
125
- const active = ctx;
126
- ctx = void 0;
127
- await active?.dispose().catch(() => void 0);
128
- }
123
+ async dispose() {}
129
124
  };
130
125
  }
131
126
  //#endregion
@@ -175,11 +170,11 @@ function devBindHost() {
175
170
  * stay in Node's ESM registry, so edits to them are ignored on reload.
176
171
  * Bundling picks them up.
177
172
  *
178
- * The bundle comes from the incremental esbuild builder (`_dev-bundler.ts`)
173
+ * The bundle comes from the fast Rolldown builder (`_dev-bundler.ts`)
179
174
  * rather than the deploy path's cold Vite build — a save rebuilds in tens of
180
175
  * ms instead of 1–3 s. Compile errors in the agent's code propagate (the
181
176
  * restart loop reports them and keeps the old server); any other builder
182
- * failure falls back to the cold Vite build so an esbuild-specific gap can't
177
+ * failure falls back to the cold Vite build so a Rolldown-specific gap can't
183
178
  * take the dev loop down. Evaluation goes through the memoizing evaluator so
184
179
  * a no-op save doesn't leak another module into the ESM registry.
185
180
  */
@@ -188,7 +183,7 @@ async function loadAgentDefWith(cwd, builder, evaluate) {
188
183
  try {
189
184
  code = await builder.build();
190
185
  } catch (err) {
191
- if (isEsbuildBuildFailure(err)) throw err;
186
+ if (isBundlerBuildFailure(err)) throw err;
192
187
  code = await buildWorker(cwd);
193
188
  }
194
189
  return evaluate(code);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { a as isEexist, l as writeJson, o as readJson, r as errorMessage } from "./_utils-ECl2je7-.mjs";
3
- import { r as isDevMode, t as getMonorepoRoot } from "./_agent-Ba5Ykp05.mjs";
2
+ import { a as isEexist, l as writeJson, o as readJson, r as errorMessage } from "./_utils-C502jKo8.mjs";
3
+ import { r as isDevMode, t as getMonorepoRoot } from "./_agent-Ds5LyAq5.mjs";
4
4
  import { existsSync } from "node:fs";
5
5
  import path from "node:path";
6
6
  import fs from "node:fs/promises";
@@ -1,27 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import path from "node:path";
3
3
  import fs from "node:fs/promises";
4
+ import { errorDetail, errorMessage, errorMessage as errorMessage$1 } from "@alexkroman1/aai/utils";
4
5
  //#region _utils.ts
5
6
  /** Resolve the working directory from INIT_CWD or process.cwd(). */
6
7
  function resolveCwd() {
7
8
  return process.env.INIT_CWD || process.cwd();
8
9
  }
9
- /**
10
- * Extract a message from an unknown error. Local copy of `errorMessage` from
11
- * `@alexkroman1/aai` — importing the root barrel pulls zod into every CLI
12
- * invocation (including `aai --help`), so the one-liner lives here instead.
13
- */
14
- function errorMessage(err) {
15
- return err instanceof Error ? err.message : String(err);
16
- }
17
- /**
18
- * Extract a stack (falling back to the message) from an unknown error. Local
19
- * copy of `errorDetail` from `@alexkroman1/aai` for the same reason as
20
- * {@link errorMessage} above.
21
- */
22
- function errorDetail(err) {
23
- return err instanceof Error ? err.stack ?? err.message : String(err);
24
- }
25
10
  /** The `code` of a Node errno-style error (`"ENOENT"`, `"EPIPE"`, …), or undefined. */
26
11
  function errorCode(err) {
27
12
  return err instanceof Error && "code" in err && typeof err.code === "string" ? err.code : void 0;
@@ -94,4 +79,4 @@ async function writeJson(filePath, data, opts = {}) {
94
79
  }
95
80
  }
96
81
  //#endregion
97
- export { isEexist as a, validateAgentExport as c, fileExists as i, writeJson as l, errorDetail as n, readJson as o, errorMessage as r, resolveCwd as s, errorCode as t };
82
+ export { isEexist as a, validateAgentExport as c, fileExists as i, writeJson as l, errorDetail as n, readJson as o, errorMessage$1 as r, resolveCwd as s, errorCode as t };
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { c as getOutputMode, d as writeLine, i as silenceOutput, l as installStdoutGuard, n as log, o as CliError, s as fail } from "./_ui-CKEIHAtB.mjs";
3
- import { i as fileExists, r as errorMessage, s as resolveCwd } from "./_utils-ECl2je7-.mjs";
3
+ import { i as fileExists, r as errorMessage, s as resolveCwd } from "./_utils-C502jKo8.mjs";
4
4
  import { existsSync, readFileSync } from "node:fs";
5
5
  import path from "node:path";
6
6
  import { fileURLToPath } from "node:url";
@@ -119,7 +119,7 @@ const init = defineCommand({
119
119
  },
120
120
  async run({ args }) {
121
121
  await runCommand(args, async (mode) => {
122
- const { executeInit } = await import("./init-CFwZf8q1.mjs");
122
+ const { executeInit } = await import("./init-BC7sUpmo.mjs");
123
123
  return executeInit({
124
124
  dir: args.dir,
125
125
  force: args.force,
@@ -143,7 +143,7 @@ const dev = defineCommand({
143
143
  async run({ args }) {
144
144
  await runCommand(args, async () => {
145
145
  const cwd = await setup({ agent: true });
146
- const { executeDev } = await import("./dev-CtE0d-Gs.mjs");
146
+ const { executeDev } = await import("./dev-BkOmi66P.mjs");
147
147
  return executeDev({
148
148
  cwd,
149
149
  port: args.port
@@ -160,7 +160,7 @@ const test = defineCommand({
160
160
  async run({ args }) {
161
161
  await runCommand(args, async () => {
162
162
  const cwd = await setup();
163
- const { executeTest } = await import("./test-DXPY9Bqq.mjs");
163
+ const { executeTest } = await import("./test-B3BkLNn_.mjs");
164
164
  return executeTest(cwd);
165
165
  });
166
166
  }
@@ -181,7 +181,7 @@ const build = defineCommand({
181
181
  await runCommand(args, async () => {
182
182
  const cwd = await setup({ agent: true });
183
183
  if (!args.skipTests) {
184
- const { classifyVitestError, runVitest } = await import("./test-DXPY9Bqq.mjs");
184
+ const { classifyVitestError, runVitest } = await import("./test-B3BkLNn_.mjs");
185
185
  const toCliError = (err) => {
186
186
  const { code, message } = classifyVitestError(err);
187
187
  return new CliError(code, message, "Re-run with --skipTests to build without tests", { cause: err });
@@ -192,7 +192,7 @@ const build = defineCommand({
192
192
  throw toCliError(err);
193
193
  }
194
194
  }
195
- const { executeBuild } = await import("./_bundler-CKz9Q15i.mjs");
195
+ const { executeBuild } = await import("./_bundler-z6wTRMX8.mjs");
196
196
  return executeBuild(cwd);
197
197
  });
198
198
  }
@@ -209,7 +209,7 @@ const deploy = defineCommand({
209
209
  async run({ args }) {
210
210
  await runCommand(args, async () => {
211
211
  const cwd = await setup({ agent: true });
212
- const { executeDeploy } = await import("./deploy-Ds1spTPC.mjs");
212
+ const { executeDeploy } = await import("./deploy-b-3G8tdt.mjs");
213
213
  return executeDeploy({
214
214
  cwd,
215
215
  ...args.server ? { server: args.server } : {}
@@ -229,7 +229,7 @@ const del = defineCommand({
229
229
  async run({ args }) {
230
230
  await runCommand(args, async () => {
231
231
  const cwd = await setup();
232
- const { executeDelete } = await import("./delete-xZ8PzM_4.mjs");
232
+ const { executeDelete } = await import("./delete-CKNJodJg.mjs");
233
233
  return executeDelete({
234
234
  cwd,
235
235
  ...args.server ? { server: args.server } : {}
@@ -260,7 +260,7 @@ const secret = defineCommand({
260
260
  async run({ args }) {
261
261
  await runCommand(args, async (mode) => {
262
262
  const cwd = await setup();
263
- const { executeSecretPut, readStdin } = await import("./secret-B4LRmUhF.mjs");
263
+ const { executeSecretPut, readStdin } = await import("./secret-Daqz2l7g.mjs");
264
264
  const value = mode === "json" ? await readStdin() : void 0;
265
265
  if (mode === "json" && !value) throw new CliError("no_input", "No value provided", "Pipe secret value to stdin");
266
266
  return executeSecretPut(cwd, args.name, value, args.server);
@@ -284,7 +284,7 @@ const secret = defineCommand({
284
284
  async run({ args }) {
285
285
  await runCommand(args, async () => {
286
286
  const cwd = await setup();
287
- const { executeSecretDelete } = await import("./secret-B4LRmUhF.mjs");
287
+ const { executeSecretDelete } = await import("./secret-Daqz2l7g.mjs");
288
288
  return executeSecretDelete(cwd, args.name, args.server);
289
289
  });
290
290
  }
@@ -301,7 +301,7 @@ const secret = defineCommand({
301
301
  async run({ args }) {
302
302
  await runCommand(args, async () => {
303
303
  const cwd = await setup();
304
- const { executeSecretList } = await import("./secret-B4LRmUhF.mjs");
304
+ const { executeSecretList } = await import("./secret-Daqz2l7g.mjs");
305
305
  return executeSecretList(cwd, args.server);
306
306
  });
307
307
  }
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as fileExists, r as errorMessage } from "./_utils-ECl2je7-.mjs";
2
+ import { i as fileExists, r as errorMessage } from "./_utils-C502jKo8.mjs";
3
3
  import { t as withPreservedNodeEnv } from "./_vite-env-DNb9R8xq.mjs";
4
4
  import { existsSync, unlinkSync, writeFileSync } from "node:fs";
5
5
  import path from "node:path";
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { t as buildClient } from "./client-bundler-VdcgFcos.mjs";
2
+ import { t as buildClient } from "./client-bundler-BO1Wm1wT.mjs";
3
3
  export { buildClient };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as log, u as ok } from "./_ui-CKEIHAtB.mjs";
3
- import { n as getServerInfo } from "./_agent-Ba5Ykp05.mjs";
3
+ import { n as getServerInfo } from "./_agent-Ds5LyAq5.mjs";
4
4
  import { t as apiRequest } from "./_api-client-a6cPMebU.mjs";
5
5
  //#region delete.ts
6
6
  async function runDelete(opts) {
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as log, t as fmtUrl, u as ok } from "./_ui-CKEIHAtB.mjs";
3
- import { r as errorMessage } from "./_utils-ECl2je7-.mjs";
4
- import { buildAgentBundle } from "./_bundler-CKz9Q15i.mjs";
5
- import { o as writeProjectConfig } from "./_config-BMjZt5hG.mjs";
3
+ import { r as errorMessage } from "./_utils-C502jKo8.mjs";
4
+ import { buildAgentBundle } from "./_bundler-z6wTRMX8.mjs";
5
+ import { o as writeProjectConfig } from "./_config-BWYgLjiI.mjs";
6
6
  import { t as resolveServerEnv } from "./_server-common-Bv-4Rskq.mjs";
7
- import { i as resolveDeployTarget } from "./_agent-Ba5Ykp05.mjs";
7
+ import { i as resolveDeployTarget } from "./_agent-Ds5LyAq5.mjs";
8
8
  import { t as apiRequest } from "./_api-client-a6cPMebU.mjs";
9
9
  import { gzipSync } from "node:zlib";
10
10
  //#region _deploy.ts
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as log, r as parsePort, t as fmtUrl, u as ok } from "./_ui-CKEIHAtB.mjs";
3
- import { n as errorDetail } from "./_utils-ECl2je7-.mjs";
3
+ import { n as errorDetail } from "./_utils-C502jKo8.mjs";
4
4
  import path from "node:path";
5
5
  import pc from "picocolors";
6
6
  //#region dev.ts
@@ -11,7 +11,7 @@ import pc from "picocolors";
11
11
  async function executeDev(opts) {
12
12
  const port = parsePort(opts.port);
13
13
  const agentName = path.basename(path.resolve(opts.cwd));
14
- const { startDevServer } = await import("./_dev-server-DZl-xNwH.mjs");
14
+ const { startDevServer } = await import("./_dev-server-DgjcUw14.mjs");
15
15
  let cleanup;
16
16
  let shuttingDown = false;
17
17
  const onSignal = () => {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { a as unwrapCancel, n as log, u as ok } from "./_ui-CKEIHAtB.mjs";
3
- import { i as fileExists, o as readJson, r as errorMessage, s as resolveCwd } from "./_utils-ECl2je7-.mjs";
4
- import { r as isDevMode, t as getMonorepoRoot } from "./_agent-Ba5Ykp05.mjs";
3
+ import { i as fileExists, o as readJson, r as errorMessage, s as resolveCwd } from "./_utils-C502jKo8.mjs";
4
+ import { r as isDevMode, t as getMonorepoRoot } from "./_agent-Ds5LyAq5.mjs";
5
5
  import path from "node:path";
6
6
  import * as p from "@clack/prompts";
7
7
  import pc from "picocolors";
@@ -74,7 +74,7 @@ function resolveTargetDir(dir) {
74
74
  }
75
75
  /** Run deploy after init and return deploy metadata if successful. */
76
76
  async function tryDeploy(cwd, server) {
77
- const { executeDeploy } = await import("./deploy-Ds1spTPC.mjs");
77
+ const { executeDeploy } = await import("./deploy-b-3G8tdt.mjs");
78
78
  try {
79
79
  const result = await executeDeploy({
80
80
  cwd,
@@ -92,7 +92,7 @@ async function tryDeploy(cwd, server) {
92
92
  }
93
93
  /** Scaffold the project, optionally showing a spinner. */
94
94
  async function scaffoldProject(dir, cwd, template, silent) {
95
- const { runInit } = await import("./_init-BznoJC91.mjs");
95
+ const { runInit } = await import("./_init-BxI5nkzm.mjs");
96
96
  if (silent) {
97
97
  await runInit({
98
98
  targetDir: cwd,
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { a as unwrapCancel, n as log, s as fail, u as ok } from "./_ui-CKEIHAtB.mjs";
3
- import { n as getServerInfo } from "./_agent-Ba5Ykp05.mjs";
3
+ import { n as getServerInfo } from "./_agent-Ds5LyAq5.mjs";
4
4
  import { t as apiRequest } from "./_api-client-a6cPMebU.mjs";
5
5
  import * as p from "@clack/prompts";
6
6
  import { text } from "node:stream/consumers";
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as log, s as fail, u as ok } from "./_ui-CKEIHAtB.mjs";
3
- import { r as errorMessage, t as errorCode } from "./_utils-ECl2je7-.mjs";
3
+ import { r as errorMessage, t as errorCode } from "./_utils-C502jKo8.mjs";
4
4
  import { createRequire } from "node:module";
5
5
  import { existsSync, readFileSync } from "node:fs";
6
6
  import path from "node:path";
@@ -53,7 +53,7 @@ async function buildWorker(cwd, opts = {}) {
53
53
  fileName: "worker"
54
54
  },
55
55
  target: "node20",
56
- minify: opts.minify ? "esbuild" : false,
56
+ minify: opts.minify ? "oxc" : false,
57
57
  write: false,
58
58
  rollupOptions: { output: { entryFileNames: "[name].js" } }
59
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexkroman1/aai-cli",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "aai": "dist/cli.mjs"
@@ -23,17 +23,17 @@
23
23
  "chokidar": "^5.0.0",
24
24
  "citty": "^0.2.2",
25
25
  "env-paths": "^4.0.0",
26
- "esbuild": "^0.28.1",
27
26
  "execa": "^10.0.0",
28
27
  "get-port": "^7.2.0",
29
28
  "giget": "^3.3.0",
30
29
  "ofetch": "^1.5.1",
31
30
  "p-debounce": "^5.1.0",
32
31
  "picocolors": "^1.1.1",
32
+ "rolldown": "~1.1.4",
33
33
  "vite": "^8.1.5",
34
34
  "zod": "^4.4.3",
35
- "@alexkroman1/aai": "1.10.0",
36
- "@alexkroman1/aai-ui": "1.10.0"
35
+ "@alexkroman1/aai": "1.11.0",
36
+ "@alexkroman1/aai-ui": "1.11.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "playwright": "^1.61.1",