@axlsdk/studio 0.16.1 → 0.17.1
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/README.md +3 -3
- package/dist/{chunk-RE6VPUXA.js → chunk-GADFO7DZ.js} +159 -71
- package/dist/chunk-GADFO7DZ.js.map +1 -0
- package/dist/cli.cjs +173 -126
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +36 -10
- package/dist/cli.js.map +1 -1
- package/dist/client/assets/index-C3yGF34O.js +313 -0
- package/dist/client/assets/index-DNRVA4F2.css +1 -0
- package/dist/client/index.html +2 -2
- package/dist/middleware.cjs +205 -174
- package/dist/middleware.cjs.map +1 -1
- package/dist/middleware.js +37 -67
- package/dist/middleware.js.map +1 -1
- package/dist/server/index.cjs +158 -70
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +13 -0
- package/dist/server/index.d.ts +13 -0
- package/dist/server/index.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-JGQ3MSIG.js +0 -80
- package/dist/chunk-JGQ3MSIG.js.map +0 -1
- package/dist/chunk-RE6VPUXA.js.map +0 -1
- package/dist/client/assets/index-BzQe3w-R.js +0 -313
- package/dist/client/assets/index-C2nTRFWX.css +0 -1
package/dist/server/index.d.cts
CHANGED
|
@@ -20,6 +20,19 @@ type EvalTrendRun = {
|
|
|
20
20
|
model?: string;
|
|
21
21
|
/** Total run duration in ms (from `EvalResult.duration`). */
|
|
22
22
|
duration?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Multi-run group id (`metadata.runGroupId`). Forwarded so the client can
|
|
25
|
+
* detect partial batches by counting runs sharing this id and comparing
|
|
26
|
+
* against `batchAttempted`.
|
|
27
|
+
*/
|
|
28
|
+
runGroupId?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Original planned multi-run count (`metadata.batchAttempted`). Set on
|
|
31
|
+
* every run that was part of a multi-run batch; absent on single-run
|
|
32
|
+
* results. The client compares this against the count of sibling runs in
|
|
33
|
+
* the same `runGroupId` to mark partial trend points distinctly.
|
|
34
|
+
*/
|
|
35
|
+
batchAttempted?: number;
|
|
23
36
|
};
|
|
24
37
|
type EvalTrendEntry = {
|
|
25
38
|
runs: EvalTrendRun[];
|
package/dist/server/index.d.ts
CHANGED
|
@@ -20,6 +20,19 @@ type EvalTrendRun = {
|
|
|
20
20
|
model?: string;
|
|
21
21
|
/** Total run duration in ms (from `EvalResult.duration`). */
|
|
22
22
|
duration?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Multi-run group id (`metadata.runGroupId`). Forwarded so the client can
|
|
25
|
+
* detect partial batches by counting runs sharing this id and comparing
|
|
26
|
+
* against `batchAttempted`.
|
|
27
|
+
*/
|
|
28
|
+
runGroupId?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Original planned multi-run count (`metadata.batchAttempted`). Set on
|
|
31
|
+
* every run that was part of a multi-run batch; absent on single-run
|
|
32
|
+
* results. The client compares this against the count of sibling runs in
|
|
33
|
+
* the same `runGroupId` to mark partial trend points distinctly.
|
|
34
|
+
*/
|
|
35
|
+
batchAttempted?: number;
|
|
23
36
|
};
|
|
24
37
|
type EvalTrendEntry = {
|
|
25
38
|
runs: EvalTrendRun[];
|
package/dist/server/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axlsdk/studio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"description": "Local development UI for debugging, testing, and iterating on Axl agents and workflows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/server/index.cjs",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"hono": "^4.7.0",
|
|
41
41
|
"tsx": "^4.19.0",
|
|
42
42
|
"ws": "^8.0.0",
|
|
43
|
-
"@axlsdk/axl": "0.
|
|
43
|
+
"@axlsdk/axl": "0.17.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@tailwindcss/vite": "^4.1.0",
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"vite": "^6.0.0",
|
|
66
66
|
"vitest": "^3.0.0",
|
|
67
67
|
"zod": "^4.0.0",
|
|
68
|
-
"@axlsdk/testing": "0.
|
|
68
|
+
"@axlsdk/testing": "0.17.1"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@axlsdk/eval": "0.
|
|
71
|
+
"@axlsdk/eval": "0.17.1"
|
|
72
72
|
},
|
|
73
73
|
"peerDependenciesMeta": {
|
|
74
74
|
"@axlsdk/eval": {
|
package/dist/chunk-JGQ3MSIG.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
// src/cli-utils.ts
|
|
2
|
-
import { resolve } from "path";
|
|
3
|
-
import { existsSync } from "fs";
|
|
4
|
-
import { pathToFileURL } from "url";
|
|
5
|
-
var CONFIG_CANDIDATES = [
|
|
6
|
-
"axl.config.mts",
|
|
7
|
-
"axl.config.ts",
|
|
8
|
-
"axl.config.mjs",
|
|
9
|
-
"axl.config.js"
|
|
10
|
-
];
|
|
11
|
-
function findConfig(cwd) {
|
|
12
|
-
for (const name of CONFIG_CANDIDATES) {
|
|
13
|
-
const p = resolve(cwd, name);
|
|
14
|
-
if (existsSync(p)) return p;
|
|
15
|
-
}
|
|
16
|
-
return void 0;
|
|
17
|
-
}
|
|
18
|
-
function parseArgs(argv) {
|
|
19
|
-
let port = 4400;
|
|
20
|
-
let config;
|
|
21
|
-
let open = false;
|
|
22
|
-
let help = false;
|
|
23
|
-
let conditions = [];
|
|
24
|
-
let readOnly = false;
|
|
25
|
-
for (let i = 2; i < argv.length; i++) {
|
|
26
|
-
const arg = argv[i];
|
|
27
|
-
if (arg === "--port" && argv[i + 1]) {
|
|
28
|
-
port = parseInt(argv[i + 1], 10);
|
|
29
|
-
i++;
|
|
30
|
-
} else if (arg === "--config" && argv[i + 1]) {
|
|
31
|
-
config = argv[i + 1];
|
|
32
|
-
i++;
|
|
33
|
-
} else if (arg === "--conditions" && argv[i + 1]) {
|
|
34
|
-
conditions = argv[i + 1].split(",").map((c) => c.trim()).filter(Boolean);
|
|
35
|
-
i++;
|
|
36
|
-
} else if (arg === "--open") {
|
|
37
|
-
open = true;
|
|
38
|
-
} else if (arg === "--read-only" || arg === "--readonly") {
|
|
39
|
-
readOnly = true;
|
|
40
|
-
} else if (arg === "--help" || arg === "-h") {
|
|
41
|
-
help = true;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
const result = { port, config, open, help, conditions, readOnly };
|
|
45
|
-
if (isNaN(port) || port < 1 || port > 65535) {
|
|
46
|
-
result.portError = `Invalid port: ${port}. Must be between 1 and 65535.`;
|
|
47
|
-
}
|
|
48
|
-
return result;
|
|
49
|
-
}
|
|
50
|
-
function needsTsxLoader(configPath) {
|
|
51
|
-
return /\.[mc]?tsx?$/.test(configPath);
|
|
52
|
-
}
|
|
53
|
-
var tsImportFn;
|
|
54
|
-
async function importModule(filePath, parentURL) {
|
|
55
|
-
if (needsTsxLoader(filePath)) {
|
|
56
|
-
if (tsImportFn === void 0) {
|
|
57
|
-
try {
|
|
58
|
-
const mod = await import("tsx/esm/api");
|
|
59
|
-
tsImportFn = mod.tsImport ?? null;
|
|
60
|
-
} catch {
|
|
61
|
-
tsImportFn = null;
|
|
62
|
-
console.warn(
|
|
63
|
-
"[axl-studio] Warning: tsx is not installed. TypeScript config files require tsx as a dependency.\n Install it with: npm install -D tsx"
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
if (tsImportFn) {
|
|
68
|
-
return await tsImportFn(pathToFileURL(filePath).href, parentURL);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return await import(pathToFileURL(filePath).href);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export {
|
|
75
|
-
CONFIG_CANDIDATES,
|
|
76
|
-
findConfig,
|
|
77
|
-
parseArgs,
|
|
78
|
-
importModule
|
|
79
|
-
};
|
|
80
|
-
//# sourceMappingURL=chunk-JGQ3MSIG.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli-utils.ts"],"sourcesContent":["import { resolve } from 'node:path';\nimport { existsSync } from 'node:fs';\nimport { pathToFileURL } from 'node:url';\n\n// ── Config auto-detection ──────────────────────────────────────────\n\nexport const CONFIG_CANDIDATES = [\n 'axl.config.mts',\n 'axl.config.ts',\n 'axl.config.mjs',\n 'axl.config.js',\n];\n\nexport function findConfig(cwd: string): string | undefined {\n for (const name of CONFIG_CANDIDATES) {\n const p = resolve(cwd, name);\n if (existsSync(p)) return p;\n }\n return undefined;\n}\n\n// ── Parse CLI args ──────────────────────────────────────────────────\n\nexport interface CliArgs {\n port: number;\n config?: string;\n open: boolean;\n conditions: string[];\n readOnly: boolean;\n help: boolean;\n portError?: string;\n}\n\nexport function parseArgs(argv: string[]): CliArgs {\n let port = 4400;\n let config: string | undefined;\n let open = false;\n let help = false;\n let conditions: string[] = [];\n let readOnly = false;\n\n for (let i = 2; i < argv.length; i++) {\n const arg = argv[i];\n if (arg === '--port' && argv[i + 1]) {\n port = parseInt(argv[i + 1], 10);\n i++;\n } else if (arg === '--config' && argv[i + 1]) {\n config = argv[i + 1];\n i++;\n } else if (arg === '--conditions' && argv[i + 1]) {\n conditions = argv[i + 1]\n .split(',')\n .map((c) => c.trim())\n .filter(Boolean);\n i++;\n } else if (arg === '--open') {\n open = true;\n } else if (arg === '--read-only' || arg === '--readonly') {\n readOnly = true;\n } else if (arg === '--help' || arg === '-h') {\n help = true;\n }\n }\n\n const result: CliArgs = { port, config, open, help, conditions, readOnly };\n\n if (isNaN(port) || port < 1 || port > 65535) {\n result.portError = `Invalid port: ${port}. Must be between 1 and 65535.`;\n }\n\n return result;\n}\n\n// ── Extension helpers ──────────────────────────────────────────────\n\n/**\n * Returns true if the file is TypeScript and needs tsx to load.\n */\nexport function needsTsxLoader(configPath: string): boolean {\n return /\\.[mc]?tsx?$/.test(configPath);\n}\n\n// ── Module loading ────────────────────────────────────────────────\n\n// Lazily resolved tsImport function from tsx. `undefined` = not yet checked,\n// `null` = tsx not available.\nlet tsImportFn:\n | ((specifier: string, parentURL: string) => Promise<Record<string, any>>)\n | null\n | undefined;\n\n/**\n * Import a module, using tsx's `tsImport()` for TypeScript files.\n *\n * `tsImport()` handles ESM/CJS format correctly without process-wide side effects —\n * no need for `register()` hooks or ESM-forcing workarounds. Falls back to regular\n * `import()` for non-TypeScript files or when tsx is not installed.\n */\nexport async function importModule(\n filePath: string,\n parentURL: string,\n): Promise<Record<string, any>> {\n if (needsTsxLoader(filePath)) {\n if (tsImportFn === undefined) {\n try {\n const mod = await import('tsx/esm/api');\n tsImportFn = mod.tsImport ?? null;\n } catch {\n tsImportFn = null;\n console.warn(\n '[axl-studio] Warning: tsx is not installed. TypeScript config files require tsx as a dependency.\\n' +\n ' Install it with: npm install -D tsx',\n );\n }\n }\n if (tsImportFn) {\n return (await tsImportFn(pathToFileURL(filePath).href, parentURL)) as Record<string, any>;\n }\n }\n return await import(pathToFileURL(filePath).href);\n}\n"],"mappings":";AAAA,SAAS,eAAe;AACxB,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAIvB,IAAM,oBAAoB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,SAAS,WAAW,KAAiC;AAC1D,aAAW,QAAQ,mBAAmB;AACpC,UAAM,IAAI,QAAQ,KAAK,IAAI;AAC3B,QAAI,WAAW,CAAC,EAAG,QAAO;AAAA,EAC5B;AACA,SAAO;AACT;AAcO,SAAS,UAAU,MAAyB;AACjD,MAAI,OAAO;AACX,MAAI;AACJ,MAAI,OAAO;AACX,MAAI,OAAO;AACX,MAAI,aAAuB,CAAC;AAC5B,MAAI,WAAW;AAEf,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,UAAM,MAAM,KAAK,CAAC;AAClB,QAAI,QAAQ,YAAY,KAAK,IAAI,C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