@alexkroman1/aai-cli 0.10.2 → 0.10.3

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,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { s as loadAgent } from "./_discover-D7HCLa_N.mjs";
2
+ import { s as loadAgent } from "./_discover-CbHCotwB.mjs";
3
3
  import { a as runCommand, o as step } from "./_ui-C9IvR7Fh.mjs";
4
4
  import path from "node:path";
5
5
  import fs from "node:fs/promises";
@@ -155,6 +155,8 @@ async function getServerInfo(cwd, explicitServer, explicitApiKey) {
155
155
  apiKey
156
156
  };
157
157
  }
158
+ /** Default local dev server URL. */
159
+ const DEFAULT_DEV_SERVER = "http://localhost:8787";
158
160
  /** Check if the CLI is running from the monorepo (dev mode). */
159
161
  function isDevMode() {
160
162
  const cliDir = path.dirname(fileURLToPath(import.meta.url));
@@ -164,7 +166,9 @@ function isDevMode() {
164
166
  }
165
167
  /** Resolve the server URL from an explicit value, project config, or default. */
166
168
  function resolveServerUrl(explicit, configUrl) {
167
- return explicit ?? configUrl ?? (isDevMode() ? "http://localhost:8787" : "https://aai-agent.fly.dev");
169
+ if (explicit) return explicit;
170
+ if (isDevMode()) return DEFAULT_DEV_SERVER;
171
+ return configUrl ?? "https://aai-agent.fly.dev";
168
172
  }
169
173
  async function fileExists(p) {
170
174
  try {
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { o as isDevMode } from "./_discover-D7HCLa_N.mjs";
2
+ import { o as isDevMode } from "./_discover-CbHCotwB.mjs";
3
3
  import { existsSync } from "node:fs";
4
4
  import path from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as getApiKey } from "./_discover-D7HCLa_N.mjs";
2
+ import { i as getApiKey } from "./_discover-CbHCotwB.mjs";
3
3
  import path from "node:path";
4
4
  import fs from "node:fs/promises";
5
5
  //#region _server-common.ts
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { l as resolveCwd, n as fileExists, t as ensureApiKeyInEnv } from "./_discover-D7HCLa_N.mjs";
2
+ import { l as resolveCwd, n as fileExists, t as ensureApiKeyInEnv } from "./_discover-CbHCotwB.mjs";
3
3
  import { readFileSync } from "node:fs";
4
4
  import path from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -35,7 +35,7 @@ function findPkgJson(dir) {
35
35
  const VERSION = JSON.parse(findPkgJson(cliDir)).version;
36
36
  async function ensureAgent(cwd, yes) {
37
37
  if (!await fileExists(path.join(cwd, "agent.ts"))) {
38
- const { runInitCommand } = await import("./init-COkINbH_.mjs");
38
+ const { runInitCommand } = await import("./init-Pa-YbNnJ.mjs");
39
39
  await runInitCommand({ yes }, { quiet: true });
40
40
  }
41
41
  }
@@ -71,7 +71,7 @@ const init = defineCommand({
71
71
  }
72
72
  },
73
73
  async run({ args }) {
74
- const { runInitCommand } = await import("./init-COkINbH_.mjs");
74
+ const { runInitCommand } = await import("./init-Pa-YbNnJ.mjs");
75
75
  await runInitCommand({
76
76
  dir: args.dir,
77
77
  template: args.template,
@@ -108,7 +108,7 @@ const dev = defineCommand({
108
108
  const cwd = resolveCwd();
109
109
  await ensureAgent(cwd, args.yes);
110
110
  await ensureApiKeyInEnv();
111
- const { runDevCommand } = await import("./dev-DCtHG1pz.mjs");
111
+ const { runDevCommand } = await import("./dev-nCt6xqmm.mjs");
112
112
  await runDevCommand({
113
113
  cwd,
114
114
  port: args.port,
@@ -150,7 +150,7 @@ const build = defineCommand({
150
150
  const { runVitest } = await import("./test-9fFn9DCf.mjs");
151
151
  runVitest(cwd);
152
152
  }
153
- const { runBuildCommand } = await import("./_build-aW_zyPpr.mjs");
153
+ const { runBuildCommand } = await import("./_build-CElA0PJB.mjs");
154
154
  await runBuildCommand(cwd);
155
155
  }
156
156
  });
@@ -178,7 +178,7 @@ const deploy = defineCommand({
178
178
  async run({ args }) {
179
179
  const cwd = resolveCwd();
180
180
  await ensureAgent(cwd, args.yes);
181
- const { runDeployCommand } = await import("./deploy-DB0PeNtc.mjs");
181
+ const { runDeployCommand } = await import("./deploy-BWF0H8UK.mjs");
182
182
  await runDeployCommand({
183
183
  cwd,
184
184
  ...args.server ? { server: args.server } : {},
@@ -198,7 +198,7 @@ const del = defineCommand({
198
198
  } },
199
199
  async run({ args }) {
200
200
  const cwd = resolveCwd();
201
- const { runDeleteCommand } = await import("./delete-DxECFYOp.mjs");
201
+ const { runDeleteCommand } = await import("./delete-DYUD8j8f.mjs");
202
202
  await runDeleteCommand({
203
203
  cwd,
204
204
  ...args.server ? { server: args.server } : {}
@@ -226,7 +226,7 @@ const start = defineCommand({
226
226
  async run({ args }) {
227
227
  const cwd = resolveCwd();
228
228
  await ensureApiKeyInEnv();
229
- const { runStartCommand } = await import("./start-DQypQkOq.mjs");
229
+ const { runStartCommand } = await import("./start-BDAtcDr3.mjs");
230
230
  await runStartCommand({
231
231
  cwd,
232
232
  port: args.port
@@ -252,7 +252,7 @@ const secret = defineCommand({
252
252
  async run({ args }) {
253
253
  const cwd = resolveCwd();
254
254
  await ensureApiKeyInEnv();
255
- const { runSecretPut } = await import("./secret-Zzv7fJ_3.mjs");
255
+ const { runSecretPut } = await import("./secret-BkN22eT1.mjs");
256
256
  await runSecretPut(cwd, args.name);
257
257
  }
258
258
  }),
@@ -269,7 +269,7 @@ const secret = defineCommand({
269
269
  async run({ args }) {
270
270
  const cwd = resolveCwd();
271
271
  await ensureApiKeyInEnv();
272
- const { runSecretDelete } = await import("./secret-Zzv7fJ_3.mjs");
272
+ const { runSecretDelete } = await import("./secret-BkN22eT1.mjs");
273
273
  await runSecretDelete(cwd, args.name);
274
274
  }
275
275
  }),
@@ -281,7 +281,7 @@ const secret = defineCommand({
281
281
  async run() {
282
282
  const cwd = resolveCwd();
283
283
  await ensureApiKeyInEnv();
284
- const { runSecretList } = await import("./secret-Zzv7fJ_3.mjs");
284
+ const { runSecretList } = await import("./secret-BkN22eT1.mjs");
285
285
  await runSecretList(cwd);
286
286
  }
287
287
  })
@@ -317,7 +317,7 @@ const rag = defineCommand({
317
317
  async run({ args }) {
318
318
  const cwd = resolveCwd();
319
319
  await ensureApiKeyInEnv();
320
- const { runRagCommand } = await import("./rag-BNfrEr4A.mjs");
320
+ const { runRagCommand } = await import("./rag-qtN4p79Q.mjs");
321
321
  await runRagCommand({
322
322
  url: args.url,
323
323
  cwd,
@@ -339,7 +339,7 @@ const doctor = defineCommand({
339
339
  } },
340
340
  async run({ args }) {
341
341
  const cwd = resolveCwd();
342
- const { runDoctorCommand } = await import("./doctor-bWuArZi6.mjs");
342
+ const { runDoctorCommand } = await import("./doctor-Dvz0rdWo.mjs");
343
343
  await runDoctorCommand({
344
344
  cwd,
345
345
  port: args.port
@@ -359,7 +359,7 @@ const generate = defineCommand({
359
359
  async run({ args }) {
360
360
  const cwd = resolveCwd();
361
361
  await ensureApiKeyInEnv();
362
- const { runGenerateCommand } = await import("./generate-D7zJtqoC.mjs");
362
+ const { runGenerateCommand } = await import("./generate-Di_Shw-X.mjs");
363
363
  await runGenerateCommand({
364
364
  cwd,
365
365
  prompt: args.prompt
@@ -387,12 +387,12 @@ const run = defineCommand({
387
387
  await ensureAgent(resolveCwd(), true);
388
388
  await ensureApiKeyInEnv();
389
389
  const cwd = resolveCwd();
390
- const { runGenerateCommand } = await import("./generate-D7zJtqoC.mjs");
390
+ const { runGenerateCommand } = await import("./generate-Di_Shw-X.mjs");
391
391
  await runGenerateCommand({
392
392
  cwd,
393
393
  prompt: args.prompt
394
394
  });
395
- const { runDeployCommand } = await import("./deploy-DB0PeNtc.mjs");
395
+ const { runDeployCommand } = await import("./deploy-BWF0H8UK.mjs");
396
396
  await runDeployCommand({
397
397
  cwd,
398
398
  ...args.server ? { server: args.server } : {}
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as getServerInfo } from "./_discover-D7HCLa_N.mjs";
2
+ import { a as getServerInfo } from "./_discover-CbHCotwB.mjs";
3
3
  import { a as runCommand, o as step } from "./_ui-C9IvR7Fh.mjs";
4
4
  //#region _delete.ts
5
5
  async function runDelete(opts) {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { c as readProjectConfig, d as writeProjectConfig, i as getApiKey, r as generateSlug, u as resolveServerUrl } from "./_discover-D7HCLa_N.mjs";
2
+ import { c as readProjectConfig, d as writeProjectConfig, i as getApiKey, r as generateSlug, u as resolveServerUrl } from "./_discover-CbHCotwB.mjs";
3
3
  import { a as runCommand, o as step, s as stepInfo } from "./_ui-C9IvR7Fh.mjs";
4
- import { buildAgentBundle } from "./_build-aW_zyPpr.mjs";
4
+ import { buildAgentBundle } from "./_build-CElA0PJB.mjs";
5
5
  //#region _deploy.ts
6
6
  async function attemptDeploy(fetchFn, url, slug, apiKey, env, worker, clientFiles) {
7
7
  try {
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import { s as loadAgent } from "./_discover-D7HCLa_N.mjs";
2
+ import { s as loadAgent } from "./_discover-CbHCotwB.mjs";
3
3
  import { a as runCommand, i as parsePort, n as info, o as step } from "./_ui-C9IvR7Fh.mjs";
4
- import { buildAgentBundle, t as createClientDevServer } from "./_build-aW_zyPpr.mjs";
5
- import { a as resolveServerEnv, i as loadAgentDef, n as bootServer, t as bootBackendServer } from "./_server-common-B6EXxxB2.mjs";
4
+ import { buildAgentBundle, t as createClientDevServer } from "./_build-CElA0PJB.mjs";
5
+ import { a as resolveServerEnv, i as loadAgentDef, n as bootServer, t as bootBackendServer } from "./_server-common-DekUfYGG.mjs";
6
6
  //#region dev.ts
7
7
  /** Build, boot, and verify the server — used by `--check` mode. */
8
8
  async function runCheckMode(cwd, port, log) {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { n as fileExists } from "./_discover-D7HCLa_N.mjs";
2
+ import { n as fileExists } from "./_discover-CbHCotwB.mjs";
3
3
  import { a as runCommand, i as parsePort, o as step } from "./_ui-C9IvR7Fh.mjs";
4
- import { i as loadAgentDef, r as envFileKeys } from "./_server-common-B6EXxxB2.mjs";
4
+ import { i as loadAgentDef, r as envFileKeys } from "./_server-common-DekUfYGG.mjs";
5
5
  import path from "node:path";
6
6
  import fs from "node:fs/promises";
7
7
  import { colorize } from "consola/utils";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as getApiKey } from "./_discover-D7HCLa_N.mjs";
2
+ import { i as getApiKey } from "./_discover-CbHCotwB.mjs";
3
3
  import path from "node:path";
4
4
  import fs from "node:fs/promises";
5
5
  import { consola } from "consola";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { l as resolveCwd, n as fileExists, o as isDevMode, p as askText, t as ensureApiKeyInEnv } from "./_discover-D7HCLa_N.mjs";
2
+ import { l as resolveCwd, n as fileExists, o as isDevMode, p as askText, t as ensureApiKeyInEnv } from "./_discover-CbHCotwB.mjs";
3
3
  import { a as runCommand, c as warn, o as step, r as interactive } from "./_ui-C9IvR7Fh.mjs";
4
4
  import path from "node:path";
5
5
  import fs from "node:fs/promises";
@@ -39,7 +39,7 @@ async function runInitCommand(opts, extra) {
39
39
  if (!dir) dir = await askText("What is your project named?", "my-voice-agent");
40
40
  const cwd = path.resolve(resolveCwd(), dir);
41
41
  if (!opts.force && await fileExists(path.join(cwd, "agent.ts"))) throw new Error(`agent.ts already exists in this directory. Use ${interactive("--force")} to overwrite.`);
42
- const { runInit } = await import("./_init-CweK2mJJ.mjs");
42
+ const { runInit } = await import("./_init-CQ6Cw4k-.mjs");
43
43
  const template = opts.template ?? "simple";
44
44
  await runCommand(async ({ log }) => {
45
45
  log(step("Create", dir));
@@ -52,7 +52,7 @@ async function runInitCommand(opts, extra) {
52
52
  process.chdir(cwd);
53
53
  delete process.env.INIT_CWD;
54
54
  if (!(opts.skipDeploy || extra?.quiet)) {
55
- const { runDeployCommand } = await import("./deploy-DB0PeNtc.mjs");
55
+ const { runDeployCommand } = await import("./deploy-BWF0H8UK.mjs");
56
56
  await runDeployCommand({ cwd });
57
57
  }
58
58
  return cwd;
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as getServerInfo } from "./_discover-D7HCLa_N.mjs";
2
+ import { a as getServerInfo } from "./_discover-CbHCotwB.mjs";
3
3
  import { a as runCommand, c as warn, n as info, o as step, t as detail } from "./_ui-C9IvR7Fh.mjs";
4
4
  import { errorMessage } from "@alexkroman1/aai/utils";
5
5
  import pLimit from "p-limit";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as getServerInfo, f as askPassword } from "./_discover-D7HCLa_N.mjs";
2
+ import { a as getServerInfo, f as askPassword } from "./_discover-CbHCotwB.mjs";
3
3
  import { a as runCommand, o as step, s as stepInfo, t as detail } from "./_ui-C9IvR7Fh.mjs";
4
4
  //#region secret.ts
5
5
  async function apiFetch(cwd, pathSuffix, init) {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { n as fileExists } from "./_discover-D7HCLa_N.mjs";
2
+ import { n as fileExists } from "./_discover-CbHCotwB.mjs";
3
3
  import { a as runCommand, i as parsePort, o as step } from "./_ui-C9IvR7Fh.mjs";
4
- import { a as resolveServerEnv, i as loadAgentDef, n as bootServer } from "./_server-common-B6EXxxB2.mjs";
4
+ import { a as resolveServerEnv, i as loadAgentDef, n as bootServer } from "./_server-common-DekUfYGG.mjs";
5
5
  import path from "node:path";
6
6
  //#region start.ts
7
7
  async function _startProductionServer(cwd, port, log) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexkroman1/aai-cli",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "aai": "dist/cli.mjs"
@@ -23,7 +23,7 @@
23
23
  "p-limit": "^7.3.0",
24
24
  "vite": "^8.0.3",
25
25
  "zod": "^4.3.6",
26
- "@alexkroman1/aai": "0.10.2"
26
+ "@alexkroman1/aai": "0.10.3"
27
27
  },
28
28
  "devDependencies": {
29
29
  "playwright": "^1.58.2",