@alexkroman1/aai-cli 0.18.1 → 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.
- package/dist/{_agent-BN21AHsJ.mjs → _agent-Bj6Q_vDG.mjs} +3 -4
- package/dist/{_api-client-Uljj0CQi.mjs → _api-client-BlnLXkZL.mjs} +3 -4
- package/dist/{_artifacts-BJOYGQPp.mjs → _artifacts-Drssawoc.mjs} +1 -2
- package/dist/{_build-target-C08aM-Es.mjs → _build-target-CWpq0VVa.mjs} +7 -14
- package/dist/{_bundler-DvZDEu2p.mjs → _bundler-BLy_GtuH.mjs} +7 -8
- package/dist/{_client-plugins-kR43nZnb.mjs → _client-plugins-BWryIN7z.mjs} +3 -4
- package/dist/{_config-Dlh8PRRp.mjs → _config-yWqkB0Qz.mjs} +5 -6
- package/dist/{_dev-env-D9Uy5wNt.mjs → _dev-env-DP0lLryD.mjs} +1 -2
- package/dist/{_dev-server-C_zidzWj.mjs → _dev-server--x-e22KR.mjs} +21 -28
- package/dist/_mock-registry.d.ts +5 -0
- package/dist/{_preflight-Bv6Ct4ss.mjs → _preflight-JRzjhjeI.mjs} +2 -3
- package/dist/{_run-code-deno-C0AtfHeH.mjs → _run-code-deno-D69GatOo.mjs} +3 -4
- package/dist/{_server-common-C6j67AcZ.mjs → _server-common-BB_ojN_l.mjs} +4 -5
- package/dist/{_slug-api-B9cptz7Q.mjs → _slug-api-Bydkac5S.mjs} +4 -5
- package/dist/{_start-workers-BNdOnTal.mjs → _start-workers-DBiICf6o.mjs} +8 -38
- package/dist/{_studio-zympBLlD.mjs → _studio-DlJnf9D5.mjs} +5 -6
- package/dist/{_templates-ChZuhW66.mjs → _templates-BIzBxGOW.mjs} +5 -6
- package/dist/{_typecheck-gate-BNF5cboL.mjs → _typecheck-gate-B60qpe6n.mjs} +3 -4
- package/dist/{_ui-C0RufoYZ.mjs → _ui-DOrhK1ET.mjs} +3 -4
- package/dist/{_utils-ChU85MEg.mjs → _utils-W_hmhlT5.mjs} +5 -7
- package/dist/{_vite-env-BiyJ0GQH.mjs → _vite-env-KVEx9r2_.mjs} +1 -3
- package/dist/{_vitest-runner-tzyto9IU.mjs → _vitest-runner-BIh-yKTG.mjs} +4 -5
- package/dist/{_workflow-determinism-CLxFQ5ox.mjs → _workflow-determinism-D5xr1EyE.mjs} +2 -3
- package/dist/{build-BHgd-QYb.mjs → build-Dab9cZiG.mjs} +23 -29
- package/dist/cli.mjs +26 -31
- package/dist/{client-bundler-CImhqcp2.mjs → client-bundler-iQhwQ3Y-.mjs} +8 -10
- package/dist/client-bundler.mjs +1 -2
- package/dist/{console-DwycgRkC.mjs → console-CAlP2e9Z.mjs} +8 -11
- package/dist/{delete-ZcA3J_3o.mjs → delete-D28hn7Gp.mjs} +7 -8
- package/dist/{deploy-CkfkiZE3.mjs → deploy-DBgwl03r.mjs} +13 -15
- package/dist/{dev-BX9g6qcf.mjs → dev-GwaVXLuc.mjs} +8 -10
- package/dist/{eval-CUKvfxRq.mjs → eval-K7IDiaYP.mjs} +5 -6
- package/dist/{init-B9Uw76-_.mjs → init--gLLPng0.mjs} +9 -11
- package/dist/{login-Ct73CqU1.mjs → login-DknFC9Or.mjs} +8 -9
- package/dist/{logs-BBsUy96d.mjs → logs-tqX6e7p-.mjs} +7 -8
- package/dist/project-config.mjs +1 -2
- package/dist/scaffold/CLAUDE.md +2 -2
- package/dist/scaffold/agent-guide/AGENT-API.md +1 -1
- package/dist/scaffold/agent-guide/HOSTING.md +1 -1
- package/dist/scaffold/agent-guide/PROVIDERS.md +6 -2
- package/dist/scaffold/package.json +14 -14
- package/dist/{secret-CKjHRrVX.mjs → secret-BW0vS0m2.mjs} +9 -11
- package/dist/start.mjs +16 -22
- package/dist/{studio-U6DvBNAx.mjs → studio-CMT2R7x8.mjs} +11 -12
- package/dist/templates/coding-agent/agent.test.ts +1 -1
- package/dist/templates/coding-agent/chat.ts +1 -1
- package/dist/templates/custom-pipeline-agent/stages.test.ts +3 -1
- package/dist/templates/front-desk-agent/agent.test.ts +3 -1
- package/dist/templates/front-door-agent/agent.test.ts +9 -12
- package/dist/templates/home-assistant-agent/agent.test.ts +9 -6
- package/dist/templates/hotel-reception-agent/agent.test.ts +2 -1
- package/dist/templates/hotel-reception-agent/booking.ts +5 -1
- package/dist/templates/hotel-reception-agent/hotel.ts +15 -5
- package/dist/templates/hotel-reception-agent/seed.ts +1 -1
- package/dist/templates/kitchen-coach-agent/agent.test.ts +3 -5
- package/dist/templates/tabletop-rpg-agent/agent.test.ts +1 -1
- package/dist/templates/technical-support-agent/knowledge.ts +3 -1
- package/dist/templates/text-adventure-agent/agent.test.ts +4 -1
- package/dist/templates/transcription-workflow/agent.test.ts +3 -8
- package/dist/templates/transcription-workflow/workflows/stream.ts +1 -1
- package/dist/{test-CW5cw5fy.mjs → test-C0YRaetz.mjs} +4 -5
- package/dist/typecheck.mjs +4 -5
- package/dist/{worker-bundler-D8uCzpYP.mjs → worker-bundler-B3HezfRu.mjs} +8 -10
- package/dist/worker-bundler.mjs +1 -2
- package/dist/{workflow-5gOZMB2M.mjs → workflow-CYBoqe23.mjs} +6 -7
- package/package.json +16 -16
|
@@ -24,8 +24,7 @@ function devSourceViteConfig(env = process.env) {
|
|
|
24
24
|
ssr: { resolve: { conditions: [...defaultServerConditions, DEV_SOURCE_CONDITION] } }
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
//#region src/_vite-env.ts
|
|
27
|
+
// src/_vite-env.ts
|
|
29
28
|
/**
|
|
30
29
|
* Packages resolved from the project root rather than from whichever
|
|
31
30
|
* `node_modules` happens to sit above the importing file.
|
|
@@ -101,5 +100,4 @@ async function withPreservedNodeEnv(fn, env = process.env) {
|
|
|
101
100
|
}
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
|
-
//#endregion
|
|
105
103
|
export { withPreservedNodeEnv as n, devSourceViteConfig as r, DEDUPED_PEERS as t };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as errorCode, i as compareCodeUnits, l as formatCappedList, r as binFromPackageJson, s as errorMessage$1 } from "./_utils-ChU85MEg.mjs";
|
|
3
|
-
import { t as defaultUi } from "./_ui-C0RufoYZ.mjs";
|
|
4
|
-
import { createRequire } from "node:module";
|
|
5
2
|
import { existsSync, readdirSync } from "node:fs";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
6
4
|
import path from "node:path";
|
|
7
5
|
import { omitUndefined } from "@alexkroman1/aai/utils";
|
|
8
6
|
import { execaSync } from "execa";
|
|
9
|
-
|
|
7
|
+
import { t as defaultUi } from "./_ui-DOrhK1ET.mjs";
|
|
8
|
+
import { a as errorCode, i as compareCodeUnits, l as formatCappedList, r as binFromPackageJson, s as errorMessage$1 } from "./_utils-W_hmhlT5.mjs";
|
|
9
|
+
// src/_vitest-runner.ts
|
|
10
10
|
/**
|
|
11
11
|
* Running vitest over an agent project's specs — the launcher three commands
|
|
12
12
|
* share.
|
|
@@ -207,5 +207,4 @@ function warnUnrunSpecs(cwd, ran, ui = defaultUi) {
|
|
|
207
207
|
const preamble = ranList.length === 0 ? `No agent.test.ts, so vitest ran nothing. ${skipped.length} spec file(s) exist and were NOT run:` : `vitest ran ${ranList.join(", ")} only. ${skipped.length} other spec file(s) were NOT run:`;
|
|
208
208
|
ui.notify("warn", `${preamble} ${formatCappedList(skipped)}. ${WIDEN_HINT}`);
|
|
209
209
|
}
|
|
210
|
-
//#endregion
|
|
211
210
|
export { unrunSpecFiles as i, classifyVitestError as n, runVitest as r, WIDEN_HINT as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import path from "node:path";
|
|
3
2
|
import { readFile, readdir } from "node:fs/promises";
|
|
4
|
-
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
// src/_workflow-determinism.ts
|
|
5
5
|
/**
|
|
6
6
|
* A COMPUTED step identity in the project's own `workflows/`.
|
|
7
7
|
*
|
|
@@ -194,5 +194,4 @@ function determinismWarnings(findings) {
|
|
|
194
194
|
if (findings.length === 0) return [];
|
|
195
195
|
return [...findings.map((found) => `${found.file}:${found.line} computes a ctx.${found.method} identity: ${found.text}`), REMEDY];
|
|
196
196
|
}
|
|
197
|
-
//#endregion
|
|
198
197
|
export { scanWorkflowDeterminism as n, determinismWarnings as t };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { _ as DENO_CONFIG_FILE, a as resolveDeploySteps, b as DENO_ENTRY_SOURCE, c as VERCEL_FUNCTION_DIR, d as vercelFunctionConfigSource, f as modalAppSource, g as MODAL_OUTPUT_DIR, h as MODAL_ENTRY_SOURCE, i as resolveBuildTarget, l as VERCEL_OUTPUT_DIR, m as MODAL_ENTRY_FILE, n as SECRET_NAME_PLACEHOLDER, o as VERCEL_BUILD_CONFIG_SOURCE, p as MODAL_APP_FILE, r as TARGET_OUTPUTS, s as VERCEL_ENTRY_SOURCE, u as VERCEL_STATIC_DIR, v as DENO_CONFIG_SOURCE, x as DENO_OUTPUT_DIR, y as DENO_ENTRY_FILE } from "./_build-target-C08aM-Es.mjs";
|
|
3
|
-
import { C as CliError, D as ok } from "./_utils-ChU85MEg.mjs";
|
|
4
|
-
import { t as defaultUi } from "./_ui-C0RufoYZ.mjs";
|
|
5
|
-
import { n as withPreservedNodeEnv } from "./_vite-env-BiyJ0GQH.mjs";
|
|
6
|
-
import { n as WORKER_ARTIFACT_REL, t as CLIENT_ARTIFACT_REL } from "./_artifacts-BJOYGQPp.mjs";
|
|
7
|
-
import { r as declaredEnvNames, t as DEPLOY_ENV_DECLARATION_FILE } from "./_server-common-C6j67AcZ.mjs";
|
|
8
|
-
import { r as evalWorkerBundle, t as buildAgentBundle } from "./_bundler-DvZDEu2p.mjs";
|
|
9
|
-
import { assertTypechecks } from "./_typecheck-gate-BNF5cboL.mjs";
|
|
10
|
-
import { n as classifyVitestError, r as runVitest } from "./_vitest-runner-tzyto9IU.mjs";
|
|
11
|
-
import { n as scanWorkflowDeterminism, t as determinismWarnings } from "./_workflow-determinism-CLxFQ5ox.mjs";
|
|
12
|
-
import { TEST_FILES } from "./test-CW5cw5fy.mjs";
|
|
13
|
-
import path from "node:path";
|
|
14
2
|
import fs from "node:fs/promises";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { DEFAULT_SYSTEM_PROMPT } from "@alexkroman1/aai";
|
|
5
|
+
import { agentConfigWarnings } from "@alexkroman1/aai/manifest";
|
|
6
|
+
import { n as WORKER_ARTIFACT_REL, t as CLIENT_ARTIFACT_REL } from "./_artifacts-Drssawoc.mjs";
|
|
7
|
+
import { _ as DENO_CONFIG_FILE, a as resolveDeploySteps, b as DENO_ENTRY_SOURCE, c as VERCEL_FUNCTION_DIR, d as vercelFunctionConfigSource, f as modalAppSource, g as MODAL_OUTPUT_DIR, h as MODAL_ENTRY_SOURCE, i as resolveBuildTarget, l as VERCEL_OUTPUT_DIR, m as MODAL_ENTRY_FILE, n as SECRET_NAME_PLACEHOLDER, o as VERCEL_BUILD_CONFIG_SOURCE, p as MODAL_APP_FILE, r as TARGET_OUTPUTS, u as VERCEL_STATIC_DIR, v as DENO_CONFIG_SOURCE, x as DENO_OUTPUT_DIR, y as DENO_ENTRY_FILE } from "./_build-target-CWpq0VVa.mjs";
|
|
8
|
+
import { r as evalWorkerBundle, t as buildAgentBundle } from "./_bundler-BLy_GtuH.mjs";
|
|
9
|
+
import { defaultClientDir } from "@alexkroman1/aai-ui/client-dir";
|
|
15
10
|
import { invariant } from "@alexkroman1/aai/internal";
|
|
16
11
|
import { build } from "vite";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
|
|
12
|
+
import { n as withPreservedNodeEnv } from "./_vite-env-KVEx9r2_.mjs";
|
|
13
|
+
import { C as CliError, D as ok } from "./_utils-W_hmhlT5.mjs";
|
|
14
|
+
import { r as declaredEnvNames, t as DEPLOY_ENV_DECLARATION_FILE } from "./_server-common-BB_ojN_l.mjs";
|
|
15
|
+
import { assertTypechecks } from "./_typecheck-gate-B60qpe6n.mjs";
|
|
16
|
+
import { t as defaultUi } from "./_ui-DOrhK1ET.mjs";
|
|
17
|
+
import { n as classifyVitestError, r as runVitest } from "./_vitest-runner-BIh-yKTG.mjs";
|
|
18
|
+
import { n as scanWorkflowDeterminism, t as determinismWarnings } from "./_workflow-determinism-D5xr1EyE.mjs";
|
|
19
|
+
import { TEST_FILES } from "./test-C0YRaetz.mjs";
|
|
20
|
+
// src/_target-bundle.ts
|
|
21
21
|
/**
|
|
22
22
|
* Bundling a deployment target's ENTRY into one self-contained ESM file.
|
|
23
23
|
*
|
|
@@ -176,8 +176,7 @@ async function copyRuntimeFiles(cwd, outDir) {
|
|
|
176
176
|
await fs.copyFile(from, to);
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
|
|
180
|
-
//#region src/_target-output.ts
|
|
179
|
+
// src/_target-output.ts
|
|
181
180
|
/**
|
|
182
181
|
* The SELF-CONTAINED deployment directory — the half two targets share.
|
|
183
182
|
*
|
|
@@ -231,8 +230,7 @@ async function emitSelfContainedOutput(cwd, target, options = {}) {
|
|
|
231
230
|
await fs.cp(clientSource, path.join(outputDir, CLIENT_ARTIFACT_REL), { recursive: true });
|
|
232
231
|
return outputDir;
|
|
233
232
|
}
|
|
234
|
-
|
|
235
|
-
//#region src/_deno-output.ts
|
|
233
|
+
// src/_deno-output.ts
|
|
236
234
|
/**
|
|
237
235
|
* Assemble a self-contained Deno Deploy directory — `.aai/deno/`.
|
|
238
236
|
*
|
|
@@ -261,8 +259,7 @@ async function emitDenoOutput(cwd, options = {}) {
|
|
|
261
259
|
}, options);
|
|
262
260
|
await fs.writeFile(path.join(outputDir, DENO_CONFIG_FILE), DENO_CONFIG_SOURCE, "utf-8");
|
|
263
261
|
}
|
|
264
|
-
|
|
265
|
-
//#region src/_modal-output.ts
|
|
262
|
+
// src/_modal-output.ts
|
|
266
263
|
/**
|
|
267
264
|
* Assemble a self-contained Modal deployment directory — `.aai/modal/`.
|
|
268
265
|
*
|
|
@@ -291,8 +288,7 @@ async function emitModalOutput(cwd, options) {
|
|
|
291
288
|
}, emitOptions);
|
|
292
289
|
await fs.writeFile(path.join(outputDir, MODAL_APP_FILE), modalAppSource({ name }), "utf-8");
|
|
293
290
|
}
|
|
294
|
-
|
|
295
|
-
//#region src/_vercel-output.ts
|
|
291
|
+
// src/_vercel-output.ts
|
|
296
292
|
/**
|
|
297
293
|
* Assemble a PREBUILT Vercel deployment — `.vercel/output/` — from what
|
|
298
294
|
* `aai build` just produced.
|
|
@@ -338,15 +334,14 @@ async function emitVercelOutput(cwd, options = {}) {
|
|
|
338
334
|
await fs.mkdir(functionDir, { recursive: true });
|
|
339
335
|
await fs.writeFile(path.join(outputDir, "config.json"), VERCEL_BUILD_CONFIG_SOURCE, "utf-8");
|
|
340
336
|
await fs.writeFile(path.join(functionDir, ".vc-config.json"), vercelFunctionConfigSource(), "utf-8");
|
|
341
|
-
const bundle = options.bundle ?? ((dir) => bundleTargetEntry(dir,
|
|
337
|
+
const bundle = options.bundle ?? ((dir) => bundleTargetEntry(dir, "// Generated by `aai build --target vercel` — do not edit, and do not commit.\n// Vercel invokes this handler per request and delivers a WebSocket upgrade\n// through its request context. See @alexkroman1/aai-cli/start.\nimport { createProjectServer } from \"@alexkroman1/aai-cli/start\";\n\nconst server = (await createProjectServer({ cwd: import.meta.dirname })).node;\n\nconst REQUEST_CONTEXT = Symbol.for(\"@vercel/request-context\");\n\nexport default function handler(req, res) {\n if (req.method === \"GET\" && req.headers.upgrade?.toLowerCase() === \"websocket\") {\n const upgrade = globalThis[REQUEST_CONTEXT]?.get?.()?.upgradeWebSocket?.();\n if (upgrade) {\n server.emit(\"upgrade\", upgrade.req, upgrade.socket, upgrade.head);\n if (!res.headersSent && !res.writableEnded) {\n res.statusCode = 204;\n res.end();\n }\n return;\n }\n }\n server.emit(\"request\", req, res);\n}\n", "vercel"));
|
|
342
338
|
await fs.writeFile(path.join(functionDir, "index.mjs"), await bundle(cwd), "utf-8");
|
|
343
339
|
await copyRuntimeFiles(cwd, functionDir);
|
|
344
340
|
const clientSource = await targetPathExists(path.join(cwd, CLIENT_ARTIFACT_REL, "index.html")) ? path.join(cwd, CLIENT_ARTIFACT_REL) : defaultClientDir();
|
|
345
341
|
await fs.cp(clientSource, staticDir, { recursive: true });
|
|
346
342
|
await fs.cp(clientSource, path.join(functionDir, CLIENT_ARTIFACT_REL), { recursive: true });
|
|
347
343
|
}
|
|
348
|
-
|
|
349
|
-
//#region src/build.ts
|
|
344
|
+
// src/build.ts
|
|
350
345
|
/**
|
|
351
346
|
* `aai build` — bundle the agent without deploying, behind the same gates
|
|
352
347
|
* deploy runs (tests, then typecheck), so the command previews the deploy
|
|
@@ -562,7 +557,7 @@ async function emitTargetFiles(cwd, target, agent) {
|
|
|
562
557
|
*/
|
|
563
558
|
async function missingDeployEnv(cwd, target, env = process.env, config) {
|
|
564
559
|
if (TARGET_OUTPUTS[target].dir === void 0) return [];
|
|
565
|
-
const derived = config ? (await import("./_preflight-
|
|
560
|
+
const derived = config ? (await import("./_preflight-JRzjhjeI.mjs")).requiredEnvNames(config) : [];
|
|
566
561
|
const declared = await declaredEnvNames(cwd, [DEPLOY_ENV_DECLARATION_FILE]);
|
|
567
562
|
return [.../* @__PURE__ */ new Set([...declared, ...derived])].filter((name) => {
|
|
568
563
|
const value = env[name];
|
|
@@ -587,5 +582,4 @@ function missingEnvWarnings(missing, target, agentName) {
|
|
|
587
582
|
return `${name} is declared in ${DEPLOY_ENV_DECLARATION_FILE} but has no value in this build's environment, so the deployed agent will see none. ${fix}, then deploy again.`;
|
|
588
583
|
});
|
|
589
584
|
}
|
|
590
|
-
//#endregion
|
|
591
585
|
export { executeBuild };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as BUILD_TARGETS } from "./_build-target-C08aM-Es.mjs";
|
|
3
|
-
import { C as CliError, D as ok, E as installStdoutGuard, O as oweExitCode, T as getOutputMode, _ as resolveCwd, c as fileExists, f as parseDecimalInt, h as readPackageJson, k as resultLine, p as parseServerFlag, s as errorMessage$1, t as AGENT_ENTRY, w as fail } from "./_utils-ChU85MEg.mjs";
|
|
4
|
-
import { r as parsePort, t as defaultUi } from "./_ui-C0RufoYZ.mjs";
|
|
5
2
|
import { existsSync } from "node:fs";
|
|
6
3
|
import path from "node:path";
|
|
7
4
|
import { fileURLToPath } from "node:url";
|
|
8
5
|
import { isRecord, omitUndefined, plural } from "@alexkroman1/aai/utils";
|
|
9
6
|
import { defineCommand, runMain, showUsage } from "citty";
|
|
7
|
+
import { t as BUILD_TARGETS } from "./_build-target-CWpq0VVa.mjs";
|
|
8
|
+
import { C as CliError, D as ok, E as installStdoutGuard, O as oweExitCode, T as getOutputMode, _ as resolveCwd, c as fileExists, f as parseDecimalInt, h as readPackageJson, k as resultLine, p as parseServerFlag, s as errorMessage$1, t as AGENT_ENTRY, w as fail } from "./_utils-W_hmhlT5.mjs";
|
|
9
|
+
import { r as parsePort, t as defaultUi } from "./_ui-DOrhK1ET.mjs";
|
|
10
10
|
import { styleText } from "node:util";
|
|
11
|
-
|
|
11
|
+
// src/_cli-common.ts
|
|
12
12
|
/** Shared arg definitions for citty commands. */
|
|
13
13
|
const sharedArgs = {
|
|
14
14
|
server: {
|
|
@@ -368,8 +368,7 @@ function refuseExtraPositionals(spec, positionals) {
|
|
|
368
368
|
const name = isRecord(spec.meta) && typeof spec.meta.name === "string" ? spec.meta.name : "";
|
|
369
369
|
throw new CliError("usage", `Unexpected ${extras.length === 1 ? "argument" : "arguments"}: ${extras.join(" ")}`, `\`${name}\` takes ${declared === 0 ? "no" : `at most ${declared}`} positional ${declared === 1 ? "argument" : "arguments"}. Run it with --help to see what it accepts.`);
|
|
370
370
|
}
|
|
371
|
-
|
|
372
|
-
//#region src/_help.ts
|
|
371
|
+
// src/_help.ts
|
|
373
372
|
/**
|
|
374
373
|
* `aai --help`: the root usage, grouped by what a command acts on.
|
|
375
374
|
*
|
|
@@ -480,8 +479,7 @@ function renderRootHelp(opts) {
|
|
|
480
479
|
lines.push(`Use ${styleText("cyan", "aai <command> --help")} for more information about a command.`);
|
|
481
480
|
return lines.join("\n");
|
|
482
481
|
}
|
|
483
|
-
|
|
484
|
-
//#region src/_resource-commands.ts
|
|
482
|
+
// src/_resource-commands.ts
|
|
485
483
|
/**
|
|
486
484
|
* Refuse `aai secret put NAME value` instead of dropping the value.
|
|
487
485
|
*
|
|
@@ -528,8 +526,8 @@ const dirArg = {
|
|
|
528
526
|
* a command nobody invoked.
|
|
529
527
|
*/
|
|
530
528
|
const REAL_EXECUTORS = {
|
|
531
|
-
secret: () => import("./secret-
|
|
532
|
-
logs: () => import("./logs-
|
|
529
|
+
secret: () => import("./secret-BW0vS0m2.mjs"),
|
|
530
|
+
logs: () => import("./logs-tqX6e7p-.mjs")
|
|
533
531
|
};
|
|
534
532
|
/**
|
|
535
533
|
* Build `aai secret` and `aai logs` over `load`. The seam a spec hands fake
|
|
@@ -629,8 +627,7 @@ function createResourceCommands(load = REAL_EXECUTORS) {
|
|
|
629
627
|
};
|
|
630
628
|
}
|
|
631
629
|
const { secret, logs } = createResourceCommands();
|
|
632
|
-
|
|
633
|
-
//#region src/_studio-commands.ts
|
|
630
|
+
// src/_studio-commands.ts
|
|
634
631
|
/**
|
|
635
632
|
* The fast-forward override `push` and `publish` share — `publish` pushes
|
|
636
633
|
* first, so the two must always describe the same thing to the user.
|
|
@@ -650,7 +647,7 @@ const list = defineExec({
|
|
|
650
647
|
args: { ...platformArgs },
|
|
651
648
|
cwd: "any",
|
|
652
649
|
async run({ args, cwd, ui }) {
|
|
653
|
-
const { executeList } = await import("./studio-
|
|
650
|
+
const { executeList } = await import("./studio-CMT2R7x8.mjs");
|
|
654
651
|
return executeList({
|
|
655
652
|
cwd,
|
|
656
653
|
server: args.server
|
|
@@ -682,7 +679,7 @@ const pull = defineExec({
|
|
|
682
679
|
},
|
|
683
680
|
cwd: "any",
|
|
684
681
|
async run({ args, cwd, ui }) {
|
|
685
|
-
const { executePull } = await import("./studio-
|
|
682
|
+
const { executePull } = await import("./studio-CMT2R7x8.mjs");
|
|
686
683
|
return executePull({
|
|
687
684
|
cwd,
|
|
688
685
|
project: args.project,
|
|
@@ -703,7 +700,7 @@ const push = defineExec({
|
|
|
703
700
|
},
|
|
704
701
|
cwd: "agent",
|
|
705
702
|
async run({ args, cwd, ui }) {
|
|
706
|
-
const { executePush } = await import("./studio-
|
|
703
|
+
const { executePush } = await import("./studio-CMT2R7x8.mjs");
|
|
707
704
|
return executePush({
|
|
708
705
|
cwd,
|
|
709
706
|
server: args.server,
|
|
@@ -726,7 +723,7 @@ const publish = defineExec({
|
|
|
726
723
|
},
|
|
727
724
|
cwd: "agent",
|
|
728
725
|
async run({ args, cwd, ui }) {
|
|
729
|
-
const { executePublish } = await import("./studio-
|
|
726
|
+
const { executePublish } = await import("./studio-CMT2R7x8.mjs");
|
|
730
727
|
return executePublish({
|
|
731
728
|
cwd,
|
|
732
729
|
server: args.server,
|
|
@@ -804,7 +801,7 @@ const workflowOpts = (args) => ({
|
|
|
804
801
|
* Build the group over `load`, which resolves the executors only when a verb
|
|
805
802
|
* runs (the lazy import above). The seam a spec hands fake executors through.
|
|
806
803
|
*/
|
|
807
|
-
function createWorkflowCommand(load = () => import("./workflow-
|
|
804
|
+
function createWorkflowCommand(load = () => import("./workflow-CYBoqe23.mjs")) {
|
|
808
805
|
const workflowList = defineExec({
|
|
809
806
|
meta: {
|
|
810
807
|
name: "list",
|
|
@@ -889,8 +886,7 @@ function createWorkflowCommand(load = () => import("./workflow-5gOZMB2M.mjs")) {
|
|
|
889
886
|
});
|
|
890
887
|
}
|
|
891
888
|
const workflow = createWorkflowCommand();
|
|
892
|
-
|
|
893
|
-
//#region src/cli.ts
|
|
889
|
+
// src/cli.ts
|
|
894
890
|
const cliDir = path.dirname(fileURLToPath(import.meta.url));
|
|
895
891
|
/**
|
|
896
892
|
* Read this CLI's own version from its package.json (one level up in both the
|
|
@@ -945,7 +941,7 @@ const init = defineExec({
|
|
|
945
941
|
},
|
|
946
942
|
cwd: "none",
|
|
947
943
|
async run({ args, mode, ui }) {
|
|
948
|
-
const { executeInit } = await import("./init
|
|
944
|
+
const { executeInit } = await import("./init--gLLPng0.mjs");
|
|
949
945
|
return executeInit({
|
|
950
946
|
dir: args.dir,
|
|
951
947
|
force: args.force,
|
|
@@ -986,7 +982,7 @@ const dev = defineExec({
|
|
|
986
982
|
},
|
|
987
983
|
cwd: "agent",
|
|
988
984
|
async run({ args, cwd, ui }) {
|
|
989
|
-
const { executeDev } = await import("./dev-
|
|
985
|
+
const { executeDev } = await import("./dev-GwaVXLuc.mjs");
|
|
990
986
|
return executeDev({
|
|
991
987
|
cwd,
|
|
992
988
|
port: args.port,
|
|
@@ -1007,7 +1003,7 @@ const consoleCommand = defineExec({
|
|
|
1007
1003
|
} },
|
|
1008
1004
|
cwd: "agent",
|
|
1009
1005
|
async run({ args, cwd, mode, ui }) {
|
|
1010
|
-
const { executeConsole } = await import("./console-
|
|
1006
|
+
const { executeConsole } = await import("./console-CAlP2e9Z.mjs");
|
|
1011
1007
|
return executeConsole({
|
|
1012
1008
|
cwd,
|
|
1013
1009
|
verbose: args.verbose,
|
|
@@ -1048,7 +1044,7 @@ const start = defineExec({
|
|
|
1048
1044
|
cwd: "agent",
|
|
1049
1045
|
async run({ args, cwd, ui }) {
|
|
1050
1046
|
const { executeStart } = await import("./start.mjs");
|
|
1051
|
-
const workerOptions = await import("./_start-workers-
|
|
1047
|
+
const workerOptions = await import("./_start-workers-DBiICf6o.mjs").then((n) => n.i);
|
|
1052
1048
|
const workers = workerOptions.resolveWorkers(args.workers);
|
|
1053
1049
|
const ignored = ["drain-timeout", "max-calls-per-worker"].filter((flag) => args[flag] !== void 0);
|
|
1054
1050
|
if (workers === 1 && ignored.length > 0) {
|
|
@@ -1082,7 +1078,7 @@ const test = defineExec({
|
|
|
1082
1078
|
},
|
|
1083
1079
|
cwd: "agent",
|
|
1084
1080
|
async run({ args, cwd, ui }) {
|
|
1085
|
-
const { executeTest } = await import("./test-
|
|
1081
|
+
const { executeTest } = await import("./test-C0YRaetz.mjs");
|
|
1086
1082
|
return executeTest(cwd, { only: args.only === true }, { ui });
|
|
1087
1083
|
}
|
|
1088
1084
|
});
|
|
@@ -1094,7 +1090,7 @@ const evalCommand = defineExec({
|
|
|
1094
1090
|
args: { json: sharedArgs.json },
|
|
1095
1091
|
cwd: "agent",
|
|
1096
1092
|
async run({ cwd, ui }) {
|
|
1097
|
-
const { executeEval } = await import("./eval-
|
|
1093
|
+
const { executeEval } = await import("./eval-K7IDiaYP.mjs");
|
|
1098
1094
|
return executeEval(cwd, { ui });
|
|
1099
1095
|
}
|
|
1100
1096
|
});
|
|
@@ -1120,7 +1116,7 @@ const build = defineExec({
|
|
|
1120
1116
|
},
|
|
1121
1117
|
cwd: "agent",
|
|
1122
1118
|
async run({ args, cwd, ui }) {
|
|
1123
|
-
const { executeBuild } = await import("./build-
|
|
1119
|
+
const { executeBuild } = await import("./build-Dab9cZiG.mjs");
|
|
1124
1120
|
return executeBuild({
|
|
1125
1121
|
cwd,
|
|
1126
1122
|
skipTests: args["skip-tests"],
|
|
@@ -1148,7 +1144,7 @@ const deploy = defineExec({
|
|
|
1148
1144
|
},
|
|
1149
1145
|
cwd: "agent",
|
|
1150
1146
|
async run({ args, cwd, ui }) {
|
|
1151
|
-
const { executeDeploy } = await import("./deploy-
|
|
1147
|
+
const { executeDeploy } = await import("./deploy-DBgwl03r.mjs");
|
|
1152
1148
|
return executeDeploy({
|
|
1153
1149
|
cwd,
|
|
1154
1150
|
server: args.server,
|
|
@@ -1172,7 +1168,7 @@ const del = defineExec({
|
|
|
1172
1168
|
},
|
|
1173
1169
|
cwd: "any",
|
|
1174
1170
|
async run({ args, cwd, ui }) {
|
|
1175
|
-
const { executeDelete } = await import("./delete-
|
|
1171
|
+
const { executeDelete } = await import("./delete-D28hn7Gp.mjs");
|
|
1176
1172
|
return executeDelete({
|
|
1177
1173
|
cwd,
|
|
1178
1174
|
server: args.server,
|
|
@@ -1188,7 +1184,7 @@ const login = defineExec({
|
|
|
1188
1184
|
args: { ...platformArgs },
|
|
1189
1185
|
cwd: "none",
|
|
1190
1186
|
async run({ args, ui }) {
|
|
1191
|
-
const { executeLogin } = await import("./login-
|
|
1187
|
+
const { executeLogin } = await import("./login-DknFC9Or.mjs");
|
|
1192
1188
|
return executeLogin({ server: args.server }, { ui });
|
|
1193
1189
|
}
|
|
1194
1190
|
});
|
|
@@ -1200,7 +1196,7 @@ const templates = defineExec({
|
|
|
1200
1196
|
args: { json: sharedArgs.json },
|
|
1201
1197
|
cwd: "none",
|
|
1202
1198
|
async run({ mode, ui }) {
|
|
1203
|
-
const { listTemplates } = await import("./_templates-
|
|
1199
|
+
const { listTemplates } = await import("./_templates-BIzBxGOW.mjs");
|
|
1204
1200
|
const names = await listTemplates();
|
|
1205
1201
|
if (mode === "human") {
|
|
1206
1202
|
for (const name of names) ui.log.message(name);
|
|
@@ -1364,5 +1360,4 @@ if (process.env.VITEST !== "true") {
|
|
|
1364
1360
|
process.exitCode = 1;
|
|
1365
1361
|
});
|
|
1366
1362
|
}
|
|
1367
|
-
//#endregion
|
|
1368
1363
|
export { bareAaiPublish, mainCommand };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { c as fileExists, s as errorMessage$1 } from "./_utils-ChU85MEg.mjs";
|
|
3
|
-
import { n as defaultClientPlugins } from "./_client-plugins-kR43nZnb.mjs";
|
|
4
|
-
import { n as withPreservedNodeEnv, r as devSourceViteConfig, t as DEDUPED_PEERS } from "./_vite-env-BiyJ0GQH.mjs";
|
|
5
|
-
import { existsSync, unlinkSync, writeFileSync } from "node:fs";
|
|
6
|
-
import path from "node:path";
|
|
7
|
-
import { omitUndefined } from "@alexkroman1/aai/utils";
|
|
8
2
|
import fs from "node:fs/promises";
|
|
3
|
+
import path from "node:path";
|
|
9
4
|
import { isTextAssetPath, requestPath } from "@alexkroman1/aai/internal";
|
|
5
|
+
import { omitUndefined } from "@alexkroman1/aai/utils";
|
|
10
6
|
import { build, mergeConfig } from "vite";
|
|
11
|
-
|
|
7
|
+
import { n as defaultClientPlugins } from "./_client-plugins-BWryIN7z.mjs";
|
|
8
|
+
import { existsSync, unlinkSync, writeFileSync } from "node:fs";
|
|
9
|
+
import { c as fileExists, s as errorMessage$1 } from "./_utils-W_hmhlT5.mjs";
|
|
10
|
+
import { n as withPreservedNodeEnv, r as devSourceViteConfig, t as DEDUPED_PEERS } from "./_vite-env-KVEx9r2_.mjs";
|
|
11
|
+
// src/_default-html.ts
|
|
12
12
|
/**
|
|
13
13
|
* Default index.html for agents with a custom client.tsx but no index.html.
|
|
14
14
|
* Used by both the dev server (Vite HMR) and the production bundler.
|
|
@@ -72,8 +72,7 @@ function writeTempHtml(root) {
|
|
|
72
72
|
}
|
|
73
73
|
return cleanup;
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
//#region src/client-bundler.ts
|
|
75
|
+
// src/client-bundler.ts
|
|
77
76
|
const DEFAULT_OUT_DIR = ".aai/client";
|
|
78
77
|
/**
|
|
79
78
|
* Build the client SPA with Vite if `client.tsx` exists.
|
|
@@ -129,5 +128,4 @@ async function readClientDir(clientDir) {
|
|
|
129
128
|
}));
|
|
130
129
|
return files;
|
|
131
130
|
}
|
|
132
|
-
//#endregion
|
|
133
131
|
export { fallbackHtmlPlugin as n, buildClient as t };
|
package/dist/client-bundler.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { D as ok, o as errorDetail, s as errorMessage, w as fail } from "./_utils-ChU85MEg.mjs";
|
|
3
|
-
import { t as defaultUi } from "./_ui-C0RufoYZ.mjs";
|
|
4
|
-
import { n as createWorkerEvaluator } from "./_bundler-DvZDEu2p.mjs";
|
|
5
|
-
import { loadWorker, t as resolveAgentEnv } from "./_dev-server-C_zidzWj.mjs";
|
|
6
2
|
import { styleText } from "node:util";
|
|
7
|
-
import { spawn } from "node:child_process";
|
|
8
3
|
import { connectSession, createRuntime, ensureSessionStateSchema, ensureWorkflowJournalSchema } from "@alexkroman1/aai-runtime";
|
|
9
4
|
import { withHostCredentialFallback } from "@alexkroman1/aai-runtime/internal";
|
|
10
5
|
import pTimeout from "p-timeout";
|
|
11
|
-
|
|
6
|
+
import { n as createWorkerEvaluator } from "./_bundler-BLy_GtuH.mjs";
|
|
7
|
+
import { spawn } from "node:child_process";
|
|
8
|
+
import { loadWorker, t as resolveAgentEnv } from "./_dev-server--x-e22KR.mjs";
|
|
9
|
+
import { D as ok, o as errorDetail, s as errorMessage, w as fail } from "./_utils-W_hmhlT5.mjs";
|
|
10
|
+
import { t as defaultUi } from "./_ui-DOrhK1ET.mjs";
|
|
11
|
+
// src/_console-audio.ts
|
|
12
12
|
/**
|
|
13
13
|
* `aai console`'s audio devices, as two SoX subprocesses.
|
|
14
14
|
*
|
|
@@ -157,8 +157,7 @@ function createSoxAudio(spawnFn = spawn) {
|
|
|
157
157
|
}
|
|
158
158
|
/** The SoX-backed devices. */
|
|
159
159
|
const soxAudio = createSoxAudio();
|
|
160
|
-
|
|
161
|
-
//#region src/_console-session.ts
|
|
160
|
+
// src/_console-session.ts
|
|
162
161
|
/**
|
|
163
162
|
* The sink the session writes to: agent audio to the speaker, the transcript
|
|
164
163
|
* to the terminal.
|
|
@@ -247,8 +246,7 @@ function createSampleAligner(connection) {
|
|
|
247
246
|
if (whole > 0) connection.sendAudio(data.subarray(0, whole));
|
|
248
247
|
};
|
|
249
248
|
}
|
|
250
|
-
|
|
251
|
-
//#region src/console.ts
|
|
249
|
+
// src/console.ts
|
|
252
250
|
/**
|
|
253
251
|
* `aai console` — talk to the agent through this machine's microphone and
|
|
254
252
|
* speakers, with the conversation printed in the terminal. No server, no
|
|
@@ -442,5 +440,4 @@ function signalled() {
|
|
|
442
440
|
dispose
|
|
443
441
|
};
|
|
444
442
|
}
|
|
445
|
-
//#endregion
|
|
446
443
|
export { executeConsole };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as CliError, D as ok } from "./_utils-ChU85MEg.mjs";
|
|
3
|
-
import { t as defaultUi } from "./_ui-C0RufoYZ.mjs";
|
|
4
|
-
import { c as writeProjectConfig } from "./_config-Dlh8PRRp.mjs";
|
|
5
|
-
import { i as requireDeployedSlug } from "./_agent-BN21AHsJ.mjs";
|
|
6
|
-
import { a as apiRequest, n as HINT_NOT_DEPLOYED, o as apiTestSeam } from "./_api-client-Uljj0CQi.mjs";
|
|
7
|
-
import { t as REAL_STUDIO_DEPS, u as studioProjectApiUrl } from "./_studio-zympBLlD.mjs";
|
|
8
2
|
import { omitUndefined } from "@alexkroman1/aai/utils";
|
|
9
|
-
|
|
3
|
+
import { i as requireDeployedSlug } from "./_agent-Bj6Q_vDG.mjs";
|
|
4
|
+
import { a as apiRequest, n as HINT_NOT_DEPLOYED, o as apiTestSeam } from "./_api-client-BlnLXkZL.mjs";
|
|
5
|
+
import { c as writeProjectConfig } from "./_config-yWqkB0Qz.mjs";
|
|
6
|
+
import { C as CliError, D as ok } from "./_utils-W_hmhlT5.mjs";
|
|
7
|
+
import { t as REAL_STUDIO_DEPS, u as studioProjectApiUrl } from "./_studio-DlJnf9D5.mjs";
|
|
8
|
+
import { t as defaultUi } from "./_ui-DOrhK1ET.mjs";
|
|
9
|
+
// src/delete.ts
|
|
10
10
|
async function runDelete(opts, request = apiRequest) {
|
|
11
11
|
await request(`${opts.url}/${opts.slug}`, {
|
|
12
12
|
method: "DELETE",
|
|
@@ -71,5 +71,4 @@ async function executeDelete(opts, ui = defaultUi, deps = REAL_STUDIO_DEPS) {
|
|
|
71
71
|
ui.log.success(`Deleted ${serverUrl}/${slug}`);
|
|
72
72
|
return ok({ slug });
|
|
73
73
|
}
|
|
74
|
-
//#endregion
|
|
75
74
|
export { executeDelete };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { D as ok, s as errorMessage$1 } from "./_utils-ChU85MEg.mjs";
|
|
3
|
-
import { n as fmtUrl, t as defaultUi } from "./_ui-C0RufoYZ.mjs";
|
|
4
|
-
import { o as updateProjectConfig } from "./_config-Dlh8PRRp.mjs";
|
|
5
|
-
import { a as resolveServerEnv } from "./_server-common-C6j67AcZ.mjs";
|
|
6
|
-
import { i as evalWorkerConfig, t as buildAgentBundle } from "./_bundler-DvZDEu2p.mjs";
|
|
7
|
-
import { o as resolveDeployTarget } from "./_agent-BN21AHsJ.mjs";
|
|
8
|
-
import { assertTypechecks } from "./_typecheck-gate-BNF5cboL.mjs";
|
|
9
|
-
import { n as scanWorkflowDeterminism, t as determinismWarnings } from "./_workflow-determinism-CLxFQ5ox.mjs";
|
|
10
|
-
import { a as apiRequest, o as apiTestSeam, s as checkedResponse } from "./_api-client-Uljj0CQi.mjs";
|
|
11
|
-
import { s as projectNameFromDir } from "./_studio-zympBLlD.mjs";
|
|
12
2
|
import { isRecord, omitUndefined } from "@alexkroman1/aai/utils";
|
|
3
|
+
import { o as resolveDeployTarget } from "./_agent-Bj6Q_vDG.mjs";
|
|
4
|
+
import { i as evalWorkerConfig, t as buildAgentBundle } from "./_bundler-BLy_GtuH.mjs";
|
|
5
|
+
import { o as updateProjectConfig } from "./_config-yWqkB0Qz.mjs";
|
|
13
6
|
import { gzipSync } from "node:zlib";
|
|
14
|
-
|
|
7
|
+
import { a as apiRequest, o as apiTestSeam, s as checkedResponse } from "./_api-client-BlnLXkZL.mjs";
|
|
8
|
+
import { D as ok, s as errorMessage$1 } from "./_utils-W_hmhlT5.mjs";
|
|
9
|
+
import { a as resolveServerEnv } from "./_server-common-BB_ojN_l.mjs";
|
|
10
|
+
import { s as projectNameFromDir } from "./_studio-DlJnf9D5.mjs";
|
|
11
|
+
import { assertTypechecks } from "./_typecheck-gate-B60qpe6n.mjs";
|
|
12
|
+
import { n as fmtUrl, t as defaultUi } from "./_ui-DOrhK1ET.mjs";
|
|
13
|
+
import { n as scanWorkflowDeterminism, t as determinismWarnings } from "./_workflow-determinism-D5xr1EyE.mjs";
|
|
14
|
+
// src/_deploy.ts
|
|
15
15
|
async function runDeploy(opts) {
|
|
16
16
|
const body = gzipSync(JSON.stringify({
|
|
17
17
|
...omitUndefined({ slug: opts.slug }),
|
|
@@ -35,8 +35,7 @@ async function runDeploy(opts) {
|
|
|
35
35
|
});
|
|
36
36
|
return checkedResponse(data, (value) => isRecord(value) && typeof value.slug === "string", `the deploy route at ${opts.url}`);
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
//#region src/deploy.ts
|
|
38
|
+
// src/deploy.ts
|
|
40
39
|
async function executeDeploy(opts, ui = defaultUi) {
|
|
41
40
|
const { cwd } = opts;
|
|
42
41
|
const { config: projectConfig, serverUrl, apiKey } = await resolveDeployTarget(cwd, opts.server);
|
|
@@ -44,7 +43,7 @@ async function executeDeploy(opts, ui = defaultUi) {
|
|
|
44
43
|
skip: opts.skipTypecheck,
|
|
45
44
|
ui
|
|
46
45
|
});
|
|
47
|
-
const preflightModule = import("./_preflight-
|
|
46
|
+
const preflightModule = import("./_preflight-JRzjhjeI.mjs");
|
|
48
47
|
const bundle = await buildAgentBundle(cwd, { minify: true });
|
|
49
48
|
const slug = projectConfig?.slug ?? projectNameFromDir(cwd) ?? void 0;
|
|
50
49
|
const uploadEnv = {
|
|
@@ -93,5 +92,4 @@ async function executeDeploy(opts, ui = defaultUi) {
|
|
|
93
92
|
...webhooks.length > 0 ? { webhooks } : {}
|
|
94
93
|
});
|
|
95
94
|
}
|
|
96
|
-
//#endregion
|
|
97
95
|
export { executeDeploy };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as CliError, D as ok, o as errorDetail } from "./_utils-ChU85MEg.mjs";
|
|
3
|
-
import { n as fmtUrl, r as parsePort, t as defaultUi } from "./_ui-C0RufoYZ.mjs";
|
|
4
|
-
import { n as devBindHost } from "./_dev-env-D9Uy5wNt.mjs";
|
|
5
2
|
import path from "node:path";
|
|
6
|
-
import { omitUndefined } from "@alexkroman1/aai/utils";
|
|
7
3
|
import { styleText } from "node:util";
|
|
8
|
-
import {
|
|
4
|
+
import { omitUndefined } from "@alexkroman1/aai/utils";
|
|
9
5
|
import { startTracing } from "@alexkroman1/aai-runtime/tracing";
|
|
6
|
+
import { n as devBindHost } from "./_dev-env-DP0lLryD.mjs";
|
|
7
|
+
import { spawn } from "node:child_process";
|
|
10
8
|
import pTimeout from "p-timeout";
|
|
11
|
-
|
|
9
|
+
import { C as CliError, D as ok, o as errorDetail } from "./_utils-W_hmhlT5.mjs";
|
|
10
|
+
import { n as fmtUrl, r as parsePort, t as defaultUi } from "./_ui-DOrhK1ET.mjs";
|
|
11
|
+
// src/_dev-tunnel.ts
|
|
12
12
|
/**
|
|
13
13
|
* `aai dev --tunnel` — a public URL for the dev server, and a hook to hand it
|
|
14
14
|
* to whoever must dial in.
|
|
@@ -210,15 +210,14 @@ async function stopGroup(child, exited, killGroup, graceMs = HOOK_KILL_GRACE_MS)
|
|
|
210
210
|
});
|
|
211
211
|
signal("SIGKILL");
|
|
212
212
|
}
|
|
213
|
-
|
|
214
|
-
//#region src/dev.ts
|
|
213
|
+
// src/dev.ts
|
|
215
214
|
/** {@link DevDeps} with every default filled in (the dev server loaded lazily). */
|
|
216
215
|
async function resolveDevDeps(deps) {
|
|
217
216
|
return {
|
|
218
217
|
ui: deps.ui ?? defaultUi,
|
|
219
218
|
startQuickTunnel: deps.startQuickTunnel ?? startQuickTunnel,
|
|
220
219
|
runPublicUrlHook: deps.runPublicUrlHook ?? runPublicUrlHook,
|
|
221
|
-
startDevServer: deps.startDevServer ?? (await import("./_dev-server-
|
|
220
|
+
startDevServer: deps.startDevServer ?? (await import("./_dev-server--x-e22KR.mjs")).startDevServer
|
|
222
221
|
};
|
|
223
222
|
}
|
|
224
223
|
/**
|
|
@@ -333,5 +332,4 @@ async function runHook(ui, run, command, url, cwd, timeoutMs, extra = {}) {
|
|
|
333
332
|
ui.notify("warn", `--on-public-url could not run ${phase}: ${errorDetail(err)}`);
|
|
334
333
|
}
|
|
335
334
|
}
|
|
336
|
-
//#endregion
|
|
337
335
|
export { executeDev };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { D as ok, w as fail } from "./_utils-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as classifyVitestError, r as runVitest } from "./_vitest-runner-
|
|
6
|
-
|
|
2
|
+
import { D as ok, w as fail } from "./_utils-W_hmhlT5.mjs";
|
|
3
|
+
import { a as resolveServerEnv } from "./_server-common-BB_ojN_l.mjs";
|
|
4
|
+
import { t as defaultUi } from "./_ui-DOrhK1ET.mjs";
|
|
5
|
+
import { n as classifyVitestError, r as runVitest } from "./_vitest-runner-BIh-yKTG.mjs";
|
|
6
|
+
// src/eval.ts
|
|
7
7
|
/**
|
|
8
8
|
* `aai eval` — run the agent's behaviour evals via vitest.
|
|
9
9
|
*
|
|
@@ -70,5 +70,4 @@ async function executeEval(cwd, deps = {}) {
|
|
|
70
70
|
return fail(code, message);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
//#endregion
|
|
74
73
|
export { executeEval };
|