@drisp/cli 0.5.0 → 0.5.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/athena-gateway.js
CHANGED
|
@@ -2240,7 +2240,7 @@ var cachedVersion = null;
|
|
|
2240
2240
|
function readVersion() {
|
|
2241
2241
|
if (cachedVersion !== null) return cachedVersion;
|
|
2242
2242
|
try {
|
|
2243
|
-
const injected = "0.5.
|
|
2243
|
+
const injected = "0.5.1";
|
|
2244
2244
|
if (typeof injected === "string" && injected.length > 0) {
|
|
2245
2245
|
cachedVersion = injected;
|
|
2246
2246
|
return cachedVersion;
|
|
@@ -4121,4 +4121,4 @@ async function startDaemon(opts) {
|
|
|
4121
4121
|
export {
|
|
4122
4122
|
startDaemon
|
|
4123
4123
|
};
|
|
4124
|
-
//# sourceMappingURL=chunk-
|
|
4124
|
+
//# sourceMappingURL=chunk-OB4HZXR5.js.map
|
|
@@ -12732,6 +12732,7 @@ async function runDashboardRuntimeDaemon(options = {}) {
|
|
|
12732
12732
|
const feedOutbox = options.feedOutbox ?? createDashboardFeedOutbox();
|
|
12733
12733
|
const decisionInbox = options.decisionInbox ?? createDashboardDecisionInbox();
|
|
12734
12734
|
const feedDrainIntervalMs = options.feedDrainIntervalMs ?? DEFAULT_FEED_DRAIN_INTERVAL_MS;
|
|
12735
|
+
const retryInitialConnect = options.retryInitialConnect ?? true;
|
|
12735
12736
|
const startedAt = now();
|
|
12736
12737
|
let stopped = false;
|
|
12737
12738
|
let reconnectAttempt = 0;
|
|
@@ -12950,7 +12951,18 @@ async function runDashboardRuntimeDaemon(options = {}) {
|
|
|
12950
12951
|
}
|
|
12951
12952
|
}
|
|
12952
12953
|
}
|
|
12953
|
-
|
|
12954
|
+
try {
|
|
12955
|
+
await connectOnce();
|
|
12956
|
+
} catch (err) {
|
|
12957
|
+
if (!retryInitialConnect) {
|
|
12958
|
+
throw err;
|
|
12959
|
+
}
|
|
12960
|
+
log(
|
|
12961
|
+
"warn",
|
|
12962
|
+
`dashboard runtime daemon initial connect failed: ${err instanceof Error ? err.message : String(err)}`
|
|
12963
|
+
);
|
|
12964
|
+
void reconnectLoop();
|
|
12965
|
+
}
|
|
12954
12966
|
return {
|
|
12955
12967
|
snapshot() {
|
|
12956
12968
|
const executionSnapshot = pairedExecution.snapshot();
|
|
@@ -13259,4 +13271,4 @@ export {
|
|
|
13259
13271
|
startUdsServer,
|
|
13260
13272
|
sendUdsRequest
|
|
13261
13273
|
};
|
|
13262
|
-
//# sourceMappingURL=chunk-
|
|
13274
|
+
//# sourceMappingURL=chunk-PEBITVZQ.js.map
|
package/dist/cli.js
CHANGED
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
todoGlyphSet,
|
|
69
69
|
writeGatewayClientConfig,
|
|
70
70
|
wsClientOptionsForEndpoint
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-PEBITVZQ.js";
|
|
72
72
|
import {
|
|
73
73
|
generateId as generateId2
|
|
74
74
|
} from "./chunk-BTKQ67RE.js";
|
|
@@ -10680,6 +10680,22 @@ function deriveStatus(currentRun, runSummaries, errorReason) {
|
|
|
10680
10680
|
if (last.status === "SUCCEEDED") return "idle";
|
|
10681
10681
|
return "idle";
|
|
10682
10682
|
}
|
|
10683
|
+
function isCodexHarness(input) {
|
|
10684
|
+
const rawHarness = input.harness?.toLowerCase() ?? "";
|
|
10685
|
+
const rawAgentType = input.session?.agent_type?.toLowerCase() ?? "";
|
|
10686
|
+
return rawHarness.includes("codex") || rawAgentType.includes("codex");
|
|
10687
|
+
}
|
|
10688
|
+
function countDistinctTurnIds(events) {
|
|
10689
|
+
const turnIds = /* @__PURE__ */ new Set();
|
|
10690
|
+
for (const event of events) {
|
|
10691
|
+
const data = typeof event.data === "object" && event.data !== null ? event.data : {};
|
|
10692
|
+
const turnId = data["turn_id"];
|
|
10693
|
+
if (typeof turnId === "string" && turnId.length > 0) {
|
|
10694
|
+
turnIds.add(turnId);
|
|
10695
|
+
}
|
|
10696
|
+
}
|
|
10697
|
+
return turnIds.size;
|
|
10698
|
+
}
|
|
10683
10699
|
function buildHeaderModel(input) {
|
|
10684
10700
|
const {
|
|
10685
10701
|
session,
|
|
@@ -10698,6 +10714,7 @@ function buildHeaderModel(input) {
|
|
|
10698
10714
|
Math.max(1, Math.trunc(input.sessionIndex ?? sessionTotal)),
|
|
10699
10715
|
sessionTotal
|
|
10700
10716
|
) : null;
|
|
10717
|
+
const codexHarness = isCodexHarness(input);
|
|
10701
10718
|
return {
|
|
10702
10719
|
session_id: session?.session_id ?? "\u2013",
|
|
10703
10720
|
session_index: sessionIndex,
|
|
@@ -10707,7 +10724,9 @@ function buildHeaderModel(input) {
|
|
|
10707
10724
|
model_name: input.modelName ?? null,
|
|
10708
10725
|
context: { used: input.contextUsed ?? null, max: input.contextMax ?? null },
|
|
10709
10726
|
total_tokens: input.totalTokens ?? null,
|
|
10710
|
-
|
|
10727
|
+
token_label: codexHarness ? "Billable" : "Tokens",
|
|
10728
|
+
run_count: codexHarness ? input.turnCount ?? input.runCount ?? 0 : input.runCount ?? 0,
|
|
10729
|
+
run_label: codexHarness ? "Turns" : "Runs",
|
|
10711
10730
|
engine: session?.agent_type,
|
|
10712
10731
|
progress: todoPanel.todoItems.length > 0 ? { done: todoPanel.doneCount, total: todoPanel.todoItems.length } : void 0,
|
|
10713
10732
|
status,
|
|
@@ -10720,6 +10739,11 @@ function buildHeaderModel(input) {
|
|
|
10720
10739
|
function formatTokenCount(value) {
|
|
10721
10740
|
if (value === null) return "--";
|
|
10722
10741
|
if (value < 1e3) return String(value);
|
|
10742
|
+
if (value >= 1e6) {
|
|
10743
|
+
const m = value / 1e6;
|
|
10744
|
+
if (Number.isInteger(m)) return `${m}m`;
|
|
10745
|
+
return `${parseFloat(m.toFixed(1))}m`;
|
|
10746
|
+
}
|
|
10723
10747
|
const k = value / 1e3;
|
|
10724
10748
|
if (Number.isInteger(k)) return `${k}k`;
|
|
10725
10749
|
return `${parseFloat(k.toFixed(1))}k`;
|
|
@@ -10907,6 +10931,8 @@ function renderHeaderLines(model, width, hasColor, theme) {
|
|
|
10907
10931
|
const wfText = `${style("Workflow: ", palette.label)}${style(model.workflow, palette.value)}`;
|
|
10908
10932
|
const harnessText = `${style("Harness: ", palette.label)}${style(model.harness, palette.value)}`;
|
|
10909
10933
|
const modelText = `${style("Model: ", palette.label)}${style(formatModelName(model.model_name), palette.value)}`;
|
|
10934
|
+
const tokenLabel = model.token_label ?? "Tokens";
|
|
10935
|
+
const runLabel = model.run_label ?? "Runs";
|
|
10910
10936
|
const leftTokens = [
|
|
10911
10937
|
{ text: athena, priority: 100 },
|
|
10912
10938
|
{ text: divider, priority: 5 },
|
|
@@ -10917,14 +10943,14 @@ function renderHeaderLines(model, width, hasColor, theme) {
|
|
|
10917
10943
|
// Token count (e.g., "Tokens: 45.2k")
|
|
10918
10944
|
...model.total_tokens !== null ? [
|
|
10919
10945
|
{
|
|
10920
|
-
text: `${style(
|
|
10946
|
+
text: `${style(`${tokenLabel}: `, palette.label)}${style(formatTokenCount(model.total_tokens), palette.value)}`,
|
|
10921
10947
|
priority: 40
|
|
10922
10948
|
}
|
|
10923
10949
|
] : [],
|
|
10924
10950
|
// Run count (e.g., "Runs: 3")
|
|
10925
10951
|
...model.run_count > 0 ? [
|
|
10926
10952
|
{
|
|
10927
|
-
text: `${style(
|
|
10953
|
+
text: `${style(`${runLabel}: `, palette.label)}${style(String(model.run_count), palette.value)}`,
|
|
10928
10954
|
priority: 50
|
|
10929
10955
|
}
|
|
10930
10956
|
] : []
|
|
@@ -13520,6 +13546,10 @@ function AppContent({
|
|
|
13520
13546
|
verbose
|
|
13521
13547
|
});
|
|
13522
13548
|
const { runSummaries, filteredEntries, searchMatches, getEntrySearchText } = timeline;
|
|
13549
|
+
const codexTurnCount = useMemo17(
|
|
13550
|
+
() => countDistinctTurnIds(feedEvents),
|
|
13551
|
+
[feedEvents]
|
|
13552
|
+
);
|
|
13523
13553
|
const todoPanel = useTodoPanel({
|
|
13524
13554
|
tasks,
|
|
13525
13555
|
isWorking: appMode.type === "working",
|
|
@@ -14209,6 +14239,7 @@ function AppContent({
|
|
|
14209
14239
|
contextMax: tokenUsage.contextWindowSize,
|
|
14210
14240
|
totalTokens: tokenUsage.total,
|
|
14211
14241
|
runCount: runSummaries.length,
|
|
14242
|
+
turnCount: codexTurnCount,
|
|
14212
14243
|
sessionIndex: sessionScope.current,
|
|
14213
14244
|
sessionTotal: sessionScope.total,
|
|
14214
14245
|
harness,
|
|
@@ -14222,6 +14253,7 @@ function AppContent({
|
|
|
14222
14253
|
sessionAgentType,
|
|
14223
14254
|
timelineCurrentRun,
|
|
14224
14255
|
runSummaries,
|
|
14256
|
+
codexTurnCount,
|
|
14225
14257
|
metrics.failures,
|
|
14226
14258
|
metrics.blocks,
|
|
14227
14259
|
todoPanel.doneCount,
|
|
@@ -16020,7 +16052,7 @@ var cachedVersion = null;
|
|
|
16020
16052
|
function readPackageVersion() {
|
|
16021
16053
|
if (cachedVersion !== null) return cachedVersion;
|
|
16022
16054
|
try {
|
|
16023
|
-
const injected = "0.5.
|
|
16055
|
+
const injected = "0.5.1";
|
|
16024
16056
|
if (typeof injected === "string" && injected.length > 0) {
|
|
16025
16057
|
cachedVersion = injected;
|
|
16026
16058
|
return cachedVersion;
|
|
@@ -16494,6 +16526,7 @@ async function runDashboardCommand(input, deps = {}) {
|
|
|
16494
16526
|
refreshAccessToken: async () => performRefreshImpl("connect"),
|
|
16495
16527
|
makeInstanceSocketClient: deps.makeInstanceSocketClient,
|
|
16496
16528
|
executeRemoteAssignment: deps.executeRemoteAssignment,
|
|
16529
|
+
retryInitialConnect: false,
|
|
16497
16530
|
log: (level, message) => {
|
|
16498
16531
|
if (level === "error" || level === "warn") {
|
|
16499
16532
|
logError(`dashboard daemon: ${message}`);
|
package/dist/dashboard-daemon.js
CHANGED
package/dist/supervisor.js
CHANGED