@alexkroman1/aai-cli 13.3.0 → 14.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.
- package/dist/{_agent-Clbq3a4h.mjs → _agent-BzUeqOdj.mjs} +32 -9
- package/dist/_agent.d.ts +23 -0
- package/dist/{_bundler-DEkjO1d8.mjs → _bundler-DolUCMxu.mjs} +8 -7
- package/dist/_cli-common.d.ts +45 -6
- package/dist/{_config-ZY2euhdh.mjs → _config-DYzC6WMD.mjs} +2 -2
- package/dist/_dev-env.d.ts +1 -1
- package/dist/{_dev-server-C13xuGB1.mjs → _dev-server-CSMqF8PN.mjs} +20 -22
- package/dist/_dev-vite-config.d.ts +3 -3
- package/dist/{_init-Ci4QGjp8.mjs → _init-CQ8idAwo.mjs} +9 -23
- package/dist/{_output-DbJt9gsl.mjs → _output-DBP9Op_d.mjs} +22 -13
- package/dist/_output.d.ts +10 -9
- package/dist/{_preflight-B2laWPdU.mjs → _preflight-CcAR577V.mjs} +2 -2
- package/dist/_resource-commands.d.ts +9 -9
- package/dist/{_server-common-BV4_CrP3.mjs → _server-common-vILJp3it.mjs} +1 -1
- package/dist/{_slug-api-DlKpj91X.mjs → _slug-api-CGvc2YSQ.mjs} +18 -9
- package/dist/_slug-api.d.ts +19 -0
- package/dist/{_studio-DTi3EdXQ.mjs → _studio-DnR_BqFp.mjs} +7 -3
- package/dist/_studio-commands.d.ts +13 -13
- package/dist/{_templates-V4l5sZJy.mjs → _templates-CK4oKoeX.mjs} +3 -3
- package/dist/{_typecheck-gate-sV4N5F93.mjs → _typecheck-gate-U3jcil8L.mjs} +3 -2
- package/dist/_typecheck-gate.d.ts +3 -1
- package/dist/{_utils-Dhd058D9.mjs → _utils-D5JGcjiW.mjs} +43 -1
- package/dist/_utils.d.ts +35 -0
- package/dist/{_workflow-determinism-C9l8uC2R.mjs → _workflow-determinism-CvpqMpdh.mjs} +18 -26
- package/dist/_workflow-determinism.d.ts +3 -3
- package/dist/{build-CWyFGe-W.mjs → build-Mxk8gWvX.mjs} +46 -7
- package/dist/build.d.ts +5 -0
- package/dist/cli.d.ts +1 -2
- package/dist/cli.mjs +117 -135
- package/dist/{client-bundler-CT-_26c5.mjs → client-bundler-BJgREAh6.mjs} +1 -1
- package/dist/client-bundler.mjs +1 -1
- package/dist/{delete-RqlQZ6Y_.mjs → delete-BdFnbnVR.mjs} +4 -4
- package/dist/{deploy-B7f3CK7v.mjs → deploy-uAJ4NukN.mjs} +11 -11
- package/dist/{dev-DamXieW_.mjs → dev-DApPSaE_.mjs} +3 -3
- package/dist/{eval-h3DTVfRw.mjs → eval-BK47A_K5.mjs} +3 -3
- package/dist/{init-D-vFrV8h.mjs → init-DukDxECd.mjs} +11 -19
- package/dist/{login-CDiemNmC.mjs → login-DaLrPOFg.mjs} +4 -6
- package/dist/{logs-DGwPNCzB.mjs → logs-7BRwq0cG.mjs} +21 -14
- package/dist/project-config.mjs +1 -1
- package/dist/scaffold/CLAUDE.md +84 -56
- package/dist/scaffold/package.json +4 -4
- package/dist/scaffold/server.mjs +129 -25
- package/dist/{secret-V1w7y9-j.mjs → secret-Cjp912yF.mjs} +5 -5
- package/dist/secret.d.ts +8 -6
- package/dist/{studio-BpMCfUNx.mjs → studio-CpHlNHUZ.mjs} +13 -15
- package/dist/templates/call-audit/agent.test.ts +11 -6
- package/dist/templates/call-audit/agent.ts +2 -2
- package/dist/templates/call-audit/client.tsx +27 -42
- package/dist/templates/call-audit/workflows/audit.ts +7 -5
- package/dist/templates/call-audit/workflows/ingest.ts +7 -7
- package/dist/templates/call-audit/workflows/media.ts +12 -37
- package/dist/templates/call-audit/workflows/summarize.ts +8 -8
- package/dist/templates/call-audit/workflows/sync-api.ts +3 -3
- package/dist/templates/dispatch-center/agent.test.ts +7 -7
- package/dist/templates/dispatch-center/client.tsx +53 -61
- package/dist/templates/dispatch-center/shared.ts +0 -8
- package/dist/templates/dispatch-center/tools/ops_dashboard.ts +4 -1
- package/dist/templates/embedded-assets/agent.eval.test.ts +4 -2
- package/dist/templates/health-assistant/agent.eval.test.ts +4 -2
- package/dist/templates/infocom-adventure/client.tsx +40 -36
- package/dist/templates/link-digest/agent.test.ts +3 -3
- package/dist/templates/link-digest/agent.ts +2 -2
- package/dist/templates/link-digest/client.tsx +27 -17
- package/dist/templates/link-digest/workflows/digest.ts +13 -16
- package/dist/templates/night-owl/agent.eval.test.ts +4 -2
- package/dist/templates/night-owl/client.tsx +8 -2
- package/dist/templates/pipeline-simple/agent.test.ts +2 -2
- package/dist/templates/pizza-ordering/client.tsx +5 -4
- package/dist/templates/pizza-ordering/shared.ts +3 -8
- package/dist/templates/pizza-ordering/tools/add_pizza.ts +3 -2
- package/dist/templates/pizza-ordering/tools/place_order.ts +3 -2
- package/dist/templates/pizza-ordering/tools/remove_pizza.ts +3 -2
- package/dist/templates/pizza-ordering/tools/update_pizza.ts +3 -2
- package/dist/templates/pizza-ordering/tools/view_order.ts +3 -2
- package/dist/templates/plan-and-execute/agent.test.ts +10 -5
- package/dist/templates/plan-and-execute/client.tsx +2 -2
- package/dist/templates/podcast-digest/agent.test.ts +20 -11
- package/dist/templates/podcast-digest/client.tsx +16 -22
- package/dist/templates/podcast-digest/workflows/digest.ts +21 -19
- package/dist/templates/podcast-digest/workflows/feeds.ts +61 -33
- package/dist/templates/podcast-digest/workflows/slack.ts +7 -7
- package/dist/templates/recap-workflow/agent.eval.test.ts +21 -13
- package/dist/templates/recap-workflow/agent.test.ts +27 -23
- package/dist/templates/recap-workflow/workflows/recap.ts +24 -28
- package/dist/templates/redline/agent.eval.test.ts +5 -8
- package/dist/templates/redline/agent.test.ts +1 -1
- package/dist/templates/redline/client.tsx +36 -34
- package/dist/templates/redline/workflows/redline.ts +17 -17
- package/dist/templates/research-workflow/agent.eval.test.ts +5 -5
- package/dist/templates/research-workflow/agent.test.ts +10 -7
- package/dist/templates/research-workflow/workflows/research.ts +28 -30
- package/dist/templates/retail/agent.test.ts +17 -15
- package/dist/templates/retail/cancel.ts +7 -6
- package/dist/templates/retail/client.tsx +39 -58
- package/dist/templates/retail/payment.ts +4 -3
- package/dist/templates/retail/pending.test.ts +19 -19
- package/dist/templates/retail/store.test.ts +5 -5
- package/dist/templates/retail/swap.ts +8 -11
- package/dist/templates/solo-rpg/agent.eval.test.ts +2 -16
- package/dist/templates/solo-rpg/agent.test.ts +12 -12
- package/dist/templates/solo-rpg/client.tsx +3 -3
- package/dist/templates/spoken-summary/agent.test.ts +9 -9
- package/dist/templates/spoken-summary/agent.ts +3 -3
- package/dist/templates/spoken-summary/client.tsx +23 -30
- package/dist/templates/spoken-summary/workflows/summarize.ts +11 -11
- package/dist/templates/spoken-summary/workflows/transcribe.ts +14 -14
- package/dist/templates/support-line/client.tsx +4 -3
- package/dist/templates/support-line/prompts.ts +0 -2
- package/dist/templates/transcription-workflow/agent.test.ts +20 -12
- package/dist/templates/transcription-workflow/agent.ts +2 -2
- package/dist/templates/transcription-workflow/client.tsx +15 -14
- package/dist/templates/transcription-workflow/recover.ts +1 -1
- package/dist/templates/transcription-workflow/run-panel.tsx +34 -14
- package/dist/templates/transcription-workflow/total-latency.tsx +46 -20
- package/dist/templates/transcription-workflow/workflows/batch.ts +15 -15
- package/dist/templates/transcription-workflow/workflows/downsample.ts +1 -1
- package/dist/templates/transcription-workflow/workflows/normalize.ts +15 -19
- package/dist/templates/transcription-workflow/workflows/stream.ts +12 -12
- package/dist/templates/transcription-workflow/workflows/sync-api.ts +3 -3
- package/dist/templates/transcription-workflow/workflows/transcribe.ts +23 -34
- package/dist/templates/travel-concierge/agent.eval.test.ts +2 -2
- package/dist/templates/travel-concierge/agent.test.ts +15 -7
- package/dist/templates/travel-concierge/client.tsx +2 -2
- package/dist/templates/travel-concierge/shared.ts +10 -14
- package/dist/templates/travel-concierge/tools/lookup_booking.ts +4 -3
- package/dist/templates/travel-concierge/tools/search_car_rentals.ts +3 -2
- package/dist/templates/travel-concierge/tools/search_excursions.ts +3 -2
- package/dist/templates/travel-concierge/tools/search_flights.ts +3 -2
- package/dist/templates/travel-concierge/tools/search_hotels.ts +3 -2
- package/dist/{test-guenJUxi.mjs → test-D032V2cA.mjs} +4 -17
- package/dist/typecheck.mjs +1 -1
- package/dist/worker-bundler.mjs +1 -1
- package/dist/{workflow-BZyKLkhV.mjs → workflow-CVioyO3V.mjs} +6 -5
- package/package.json +4 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { formatMoney } from "@alexkroman1/aai/utils";
|
|
1
2
|
import { z } from "zod";
|
|
2
|
-
import { CAR_RENTALS,
|
|
3
|
+
import { CAR_RENTALS, requireDesk, tripSlot } from "../shared.ts";
|
|
3
4
|
|
|
4
5
|
/** Their `search_car_rentals`, by city and tier. */
|
|
5
6
|
export default tripSlot.tool({
|
|
@@ -30,7 +31,7 @@ export default tripSlot.tool({
|
|
|
30
31
|
id: c.id,
|
|
31
32
|
vendor: c.vendor,
|
|
32
33
|
tier: c.tier,
|
|
33
|
-
perDay:
|
|
34
|
+
perDay: formatMoney(c.pricePerDay),
|
|
34
35
|
})),
|
|
35
36
|
};
|
|
36
37
|
},
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { formatMoney } from "@alexkroman1/aai/utils";
|
|
1
2
|
import { z } from "zod";
|
|
2
|
-
import { EXCURSIONS,
|
|
3
|
+
import { EXCURSIONS, requireDesk, tripSlot } from "../shared.ts";
|
|
3
4
|
|
|
4
5
|
/** Their `search_trip_recommendations` — city plus a loose keyword, matched
|
|
5
6
|
* against the name and the kind so "boat" and "sail" both land. */
|
|
@@ -34,7 +35,7 @@ export default tripSlot.tool({
|
|
|
34
35
|
id: e.id,
|
|
35
36
|
name: e.name,
|
|
36
37
|
kind: e.kind,
|
|
37
|
-
price:
|
|
38
|
+
price: formatMoney(e.price),
|
|
38
39
|
})),
|
|
39
40
|
};
|
|
40
41
|
},
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { formatMoney } from "@alexkroman1/aai/utils";
|
|
1
2
|
import { z } from "zod";
|
|
2
|
-
import { FLIGHTS,
|
|
3
|
+
import { FLIGHTS, requireDesk, tripSlot } from "../shared.ts";
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Their `search_flights`, with the same "be generous" behaviour their flight
|
|
@@ -38,7 +39,7 @@ export default tripSlot.tool({
|
|
|
38
39
|
route: f.route,
|
|
39
40
|
departs: f.departs,
|
|
40
41
|
arrives: f.arrives,
|
|
41
|
-
fare:
|
|
42
|
+
fare: formatMoney(f.fare),
|
|
42
43
|
seatsLeft: f.seatsLeft,
|
|
43
44
|
})),
|
|
44
45
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { formatMoney } from "@alexkroman1/aai/utils";
|
|
1
2
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
+
import { HOTELS, requireDesk, tripSlot } from "../shared.ts";
|
|
3
4
|
|
|
4
5
|
/** Their `search_hotels`, with `price_tier` collapsed to a nightly ceiling —
|
|
5
6
|
* a caller says "under two hundred", not "midscale". */
|
|
@@ -33,7 +34,7 @@ export default tripSlot.tool({
|
|
|
33
34
|
name: h.name,
|
|
34
35
|
area: h.area,
|
|
35
36
|
stars: h.stars,
|
|
36
|
-
perNight:
|
|
37
|
+
perNight: formatMoney(h.pricePerNight),
|
|
37
38
|
})),
|
|
38
39
|
};
|
|
39
40
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as ok, n as fail } from "./_output-
|
|
2
|
+
import { a as ok, n as fail } from "./_output-DBP9Op_d.mjs";
|
|
3
3
|
import { n as log, r as notify } from "./_ui-DCt4qZrk.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { a as errorCode, i as compareCodeUnits, l as formatCappedList, r as binFromPackageJson, s as errorMessage$1 } from "./_utils-D5JGcjiW.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import { existsSync, readdirSync } from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
@@ -140,11 +140,6 @@ function coveredList(ran) {
|
|
|
140
140
|
if (ran === false) return [];
|
|
141
141
|
return typeof ran === "string" ? [ran] : ran;
|
|
142
142
|
}
|
|
143
|
-
/** Code-unit comparison — see {@link projectSpecFiles} for why not `localeCompare`. */
|
|
144
|
-
function compareCodeUnits(a, b) {
|
|
145
|
-
if (a < b) return -1;
|
|
146
|
-
return a > b ? 1 : 0;
|
|
147
|
-
}
|
|
148
143
|
/** One directory of {@link projectSpecFiles}, recursing into the ones that count. */
|
|
149
144
|
function collectSpecs(dir, prefix, out) {
|
|
150
145
|
let entries;
|
|
@@ -160,14 +155,6 @@ function collectSpecs(dir, prefix, out) {
|
|
|
160
155
|
} else if (SPEC_FILE_RE.test(e.name) && !e.name.includes(".eval.test.")) out.push(rel);
|
|
161
156
|
}
|
|
162
157
|
}
|
|
163
|
-
/** How many unrun spec names a message prints before it starts counting. */
|
|
164
|
-
const MAX_NAMED_SPECS = 10;
|
|
165
|
-
/** The unrun set as one phrase — capped, because a project may hold hundreds. */
|
|
166
|
-
function formatSpecList(files) {
|
|
167
|
-
const named = files.slice(0, MAX_NAMED_SPECS).join(", ");
|
|
168
|
-
const rest = files.length - MAX_NAMED_SPECS;
|
|
169
|
-
return rest > 0 ? `${named}, and ${rest} more` : named;
|
|
170
|
-
}
|
|
171
158
|
/**
|
|
172
159
|
* The remedy, named the same way wherever the narrowing is reported.
|
|
173
160
|
*
|
|
@@ -191,7 +178,7 @@ function warnUnrunSpecs(cwd, ran) {
|
|
|
191
178
|
if (skipped.length === 0) return;
|
|
192
179
|
const ranList = coveredList(ran);
|
|
193
180
|
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:`;
|
|
194
|
-
notify("warn", `${preamble} ${
|
|
181
|
+
notify("warn", `${preamble} ${formatCappedList(skipped)}. ${WIDEN_HINT}`);
|
|
195
182
|
}
|
|
196
183
|
/**
|
|
197
184
|
* Execute agent tests and return structured result.
|
|
@@ -249,7 +236,7 @@ async function executeTest(cwd, opts = {}) {
|
|
|
249
236
|
*/
|
|
250
237
|
function incomplete(ran, unrun) {
|
|
251
238
|
const preamble = ran === false ? `\`aai test\` found no agent.test.ts, so it ran nothing, but ${unrun.length} spec file(s) exist` : `\`aai test\` ran ${ran.join(", ")} only — ${unrun.length} other spec file(s) in this project were not run`;
|
|
252
|
-
return fail("incomplete_run", `${preamble}: ${
|
|
239
|
+
return fail("incomplete_run", `${preamble}: ${formatCappedList(unrun)}. An unrun spec is not a passing one, so this is not a green result.`, WIDEN_HINT);
|
|
253
240
|
}
|
|
254
241
|
//#endregion
|
|
255
242
|
export { TEST_FILES, classifyVitestError, executeTest, runVitest };
|
package/dist/typecheck.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { f as readPackageJson, n as binFromManifest, s as errorMessage } from "./_utils-D5JGcjiW.mjs";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { spawn } from "node:child_process";
|
package/dist/worker-bundler.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { a as errorCode } from "./_utils-D5JGcjiW.mjs";
|
|
3
3
|
import { n as withPreservedNodeEnv } from "./_vite-env-kejF0p2L.mjs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as ok, n as fail, t as CliError } from "./_output-
|
|
2
|
+
import { a as ok, n as fail, t as CliError } from "./_output-DBP9Op_d.mjs";
|
|
3
3
|
import { n as log } from "./_ui-DCt4qZrk.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { m as stripTrailingSlash } from "./_utils-D5JGcjiW.mjs";
|
|
5
|
+
import { i as readProjectConfig } from "./_config-DYzC6WMD.mjs";
|
|
6
|
+
import { n as getServerInfo } from "./_agent-BzUeqOdj.mjs";
|
|
6
7
|
import { errorMessage, omitUndefined } from "@alexkroman1/aai/utils";
|
|
7
8
|
import { createWorkflowApiClient } from "@alexkroman1/aai/workflow-api";
|
|
8
9
|
//#region src/workflow.ts
|
|
@@ -38,7 +39,7 @@ const DEFAULT_RUN_LIMIT = 20;
|
|
|
38
39
|
/**
|
|
39
40
|
* The base URL {@link createWorkflowApiClient} is given for `--agent`.
|
|
40
41
|
*
|
|
41
|
-
* A dev server has no slug: `
|
|
42
|
+
* A dev server has no slug: `createRuntimeServer` mounts the workflow API at
|
|
42
43
|
* `WORKFLOW_API_PREFIX` on the ORIGIN, where the platform serves it under
|
|
43
44
|
* `/:slug`. So targeting one is not a matter of a different origin — it is the
|
|
44
45
|
* absence of the path segment, which nothing in this command could express.
|
|
@@ -61,7 +62,7 @@ function agentBaseUrl(raw) {
|
|
|
61
62
|
const url = URL.parse(raw);
|
|
62
63
|
if (url === null) throw new CliError("bad_agent_url", `--agent is not a URL: ${JSON.stringify(raw)}`, HINT_URL);
|
|
63
64
|
if (url.protocol !== "http:" && url.protocol !== "https:") throw new CliError("bad_agent_url", `--agent must be http or https, not ${url.protocol.replace(":", "")}`, HINT_URL);
|
|
64
|
-
return raw
|
|
65
|
+
return stripTrailingSlash(raw);
|
|
65
66
|
}
|
|
66
67
|
/**
|
|
67
68
|
* A client for the agent's workflow API, plus the bearer when one was given.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexkroman1/aai-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"p-timeout": "^7.0.1",
|
|
53
53
|
"vite": "^8.2.2",
|
|
54
54
|
"zod": "^4.5.4",
|
|
55
|
-
"@alexkroman1/aai": "
|
|
56
|
-
"@alexkroman1/aai-runtime": "
|
|
57
|
-
"@alexkroman1/aai-ui": "
|
|
55
|
+
"@alexkroman1/aai": "14.0.0",
|
|
56
|
+
"@alexkroman1/aai-runtime": "14.0.0",
|
|
57
|
+
"@alexkroman1/aai-ui": "14.0.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"playwright": "^1.62.1",
|