bitspark-agw 0.7.0-edge.16 → 0.8.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/dist/main.js +10 -66
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -18981,7 +18981,13 @@ var init_api_contracts = __esm({
|
|
|
18981
18981
|
run: RunSchema
|
|
18982
18982
|
});
|
|
18983
18983
|
DecisionsListResponseSchema = WithEventSeqSchema.extend({
|
|
18984
|
-
decisions: external_exports.array(RoutingDecisionSchema)
|
|
18984
|
+
decisions: external_exports.array(RoutingDecisionSchema),
|
|
18985
|
+
/**
|
|
18986
|
+
* Decision trace artifacts keyed by decisionId (parsed RouteDecisionTrace
|
|
18987
|
+
* JSON). Present only when the request asked for ?includeArtifacts=true;
|
|
18988
|
+
* decisions whose artifact row is missing are omitted from the map.
|
|
18989
|
+
*/
|
|
18990
|
+
artifacts: external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.any())).optional()
|
|
18985
18991
|
});
|
|
18986
18992
|
SessionsListResponseSchema = WithEventSeqSchema.extend({
|
|
18987
18993
|
sessions: external_exports.array(ConversationBindingSchema),
|
|
@@ -20712,8 +20718,7 @@ var init_projects = __esm({
|
|
|
20712
20718
|
// src/commands/runs.ts
|
|
20713
20719
|
var runs_exports = {};
|
|
20714
20720
|
__export(runs_exports, {
|
|
20715
|
-
run: () => run8
|
|
20716
|
-
runDecisions: () => runDecisions
|
|
20721
|
+
run: () => run8
|
|
20717
20722
|
});
|
|
20718
20723
|
function isOperator(client) {
|
|
20719
20724
|
const caps = readCachedCaps(client.baseUrl, client.token, null);
|
|
@@ -20802,55 +20807,7 @@ async function developerList(client, ctx, args) {
|
|
|
20802
20807
|
}
|
|
20803
20808
|
printList(ctx, data.runs, DEVELOPER_RUN_COLUMNS);
|
|
20804
20809
|
}
|
|
20805
|
-
|
|
20806
|
-
const action = args.action || "list";
|
|
20807
|
-
switch (action) {
|
|
20808
|
-
case "list": {
|
|
20809
|
-
const query = {};
|
|
20810
|
-
const limit = getFlag(args, "limit");
|
|
20811
|
-
if (limit) query.limit = limit;
|
|
20812
|
-
const data = await client.get("/api/decisions", query);
|
|
20813
|
-
if (ctx.json) {
|
|
20814
|
-
printResult(ctx, data.decisions);
|
|
20815
|
-
return;
|
|
20816
|
-
}
|
|
20817
|
-
printList(ctx, data.decisions, DECISIONS_COLUMNS);
|
|
20818
|
-
return;
|
|
20819
|
-
}
|
|
20820
|
-
case "get": {
|
|
20821
|
-
const id = requirePositional(args, 0, "id");
|
|
20822
|
-
const data = await client.get(`/api/decisions/${encodeURIComponent(id)}`);
|
|
20823
|
-
if (ctx.json) {
|
|
20824
|
-
printResult(ctx, data);
|
|
20825
|
-
return;
|
|
20826
|
-
}
|
|
20827
|
-
const d = data.decision;
|
|
20828
|
-
printRecord(ctx, {
|
|
20829
|
-
decisionId: d.decisionId,
|
|
20830
|
-
runId: d.runId ?? "-",
|
|
20831
|
-
selectedProfile: d.selectedProfile ?? "-",
|
|
20832
|
-
routeReason: d.routeReason ?? "-",
|
|
20833
|
-
modelFamily: d.modelFamily ?? "-",
|
|
20834
|
-
serviceClass: d.serviceClass ?? "-",
|
|
20835
|
-
winnerScore: d.winnerScore !== null ? d.winnerScore.toFixed(3) : "-",
|
|
20836
|
-
runnerUpScore: d.runnerUpScore !== null ? d.runnerUpScore.toFixed(3) : "-",
|
|
20837
|
-
winnerMarginAbs: d.winnerMarginAbs !== null ? d.winnerMarginAbs.toFixed(3) : "-",
|
|
20838
|
-
createdAt: formatTimestamp(d.createdAtMs)
|
|
20839
|
-
});
|
|
20840
|
-
if (data.candidates && data.candidates.length > 0) {
|
|
20841
|
-
console.log();
|
|
20842
|
-
console.log("Candidates:");
|
|
20843
|
-
printList(ctx, data.candidates, CANDIDATES_COLUMNS);
|
|
20844
|
-
}
|
|
20845
|
-
return;
|
|
20846
|
-
}
|
|
20847
|
-
default:
|
|
20848
|
-
throw new Error(`Unknown decisions action: ${action}
|
|
20849
|
-
|
|
20850
|
-
Usage: agw decisions [list|get] [args]`);
|
|
20851
|
-
}
|
|
20852
|
-
}
|
|
20853
|
-
var OPERATOR_RUN_COLUMNS, DEVELOPER_RUN_COLUMNS, DECISIONS_COLUMNS, CANDIDATES_COLUMNS;
|
|
20810
|
+
var OPERATOR_RUN_COLUMNS, DEVELOPER_RUN_COLUMNS;
|
|
20854
20811
|
var init_runs = __esm({
|
|
20855
20812
|
"src/commands/runs.ts"() {
|
|
20856
20813
|
"use strict";
|
|
@@ -20878,19 +20835,6 @@ var init_runs = __esm({
|
|
|
20878
20835
|
{ key: "totalMs", label: "DURATION", align: "right", format: (v) => formatDuration(v) },
|
|
20879
20836
|
{ key: "actualCostMicrousd", label: "COST", align: "right", format: (v) => typeof v === "number" ? formatMicrousd(v) : "-" }
|
|
20880
20837
|
];
|
|
20881
|
-
DECISIONS_COLUMNS = [
|
|
20882
|
-
{ key: "decisionId", label: "DECISION_ID", width: 8, format: (v) => typeof v === "string" ? v.slice(0, 8) : "-" },
|
|
20883
|
-
{ key: "selectedProfile", label: "PROFILE" },
|
|
20884
|
-
{ key: "routeReason", label: "REASON" },
|
|
20885
|
-
{ key: "modelFamily", label: "MODEL" },
|
|
20886
|
-
{ key: "winnerMarginAbs", label: "MARGIN", align: "right", format: (v) => typeof v === "number" ? v.toFixed(3) : "-" },
|
|
20887
|
-
{ key: "createdAtMs", label: "CREATED", format: (v) => formatTimestamp(v) }
|
|
20888
|
-
];
|
|
20889
|
-
CANDIDATES_COLUMNS = [
|
|
20890
|
-
{ key: "rank", label: "RANK", align: "right" },
|
|
20891
|
-
{ key: "profile", label: "PROFILE" },
|
|
20892
|
-
{ key: "score", label: "SCORE", align: "right", format: (v) => typeof v === "number" ? v.toFixed(3) : "-" }
|
|
20893
|
-
];
|
|
20894
20838
|
}
|
|
20895
20839
|
});
|
|
20896
20840
|
|
|
@@ -25355,7 +25299,7 @@ function printUnknownCommand(resource) {
|
|
|
25355
25299
|
// src/main.ts
|
|
25356
25300
|
init_capabilities();
|
|
25357
25301
|
init_registry();
|
|
25358
|
-
var VERSION = true ? "0.
|
|
25302
|
+
var VERSION = true ? "0.8.1" : (() => {
|
|
25359
25303
|
try {
|
|
25360
25304
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
25361
25305
|
return JSON.parse(readFileSync(join(here, "..", "package.json"), "utf-8")).version ?? "0.0.0";
|