@clawos-dev/clawd 0.2.636 → 0.2.638
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/cli.cjs +13 -3
- package/dist/cloud-persona-metrics.html +31 -31
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -52943,6 +52943,11 @@ var CodexSubagentTracker = class {
|
|
|
52943
52943
|
}
|
|
52944
52944
|
return [];
|
|
52945
52945
|
}
|
|
52946
|
+
/** 还有子 agent 已开始、未到终态(completed / failed)。云上热 Pod 据此判断主线程轮末后是否仍在忙 */
|
|
52947
|
+
hasRunning() {
|
|
52948
|
+
for (const state of this.agents.values()) if (state.status && !state.terminal) return true;
|
|
52949
|
+
return false;
|
|
52950
|
+
}
|
|
52946
52951
|
handleActivity(item) {
|
|
52947
52952
|
const agentId = stringValue(item.agentThreadId);
|
|
52948
52953
|
if (!agentId) return [];
|
|
@@ -53249,6 +53254,7 @@ function driveCodexThread(opts) {
|
|
|
53249
53254
|
const firstByte = createFirstByteClock(opts.now);
|
|
53250
53255
|
const approvalIds = /* @__PURE__ */ new Map();
|
|
53251
53256
|
const subagents = new CodexSubagentTracker();
|
|
53257
|
+
let subagentsRunning = false;
|
|
53252
53258
|
const effort = ctx.effort;
|
|
53253
53259
|
let exited = false;
|
|
53254
53260
|
const finish = (code) => {
|
|
@@ -53282,6 +53288,10 @@ function driveCodexThread(opts) {
|
|
|
53282
53288
|
if (turnOpen) firstByte.see(events);
|
|
53283
53289
|
sink.pushEvents(events);
|
|
53284
53290
|
}
|
|
53291
|
+
if (subagents.hasRunning() !== subagentsRunning) {
|
|
53292
|
+
subagentsRunning = !subagentsRunning;
|
|
53293
|
+
if (!subagentsRunning) opts.onSubagentsIdle?.();
|
|
53294
|
+
}
|
|
53285
53295
|
if (route === "foreground" && method === "turn/completed") {
|
|
53286
53296
|
turnOpen = false;
|
|
53287
53297
|
opts.onTurnCompleted?.(turnOutcomeOf(params), firstByte.afterFirstByteMs());
|
|
@@ -53381,7 +53391,7 @@ function driveCodexThread(opts) {
|
|
|
53381
53391
|
opts.kill(signal);
|
|
53382
53392
|
}
|
|
53383
53393
|
};
|
|
53384
|
-
return { session, finish, client };
|
|
53394
|
+
return { session, finish, client, subagentsRunning: () => subagents.hasRunning() };
|
|
53385
53395
|
}
|
|
53386
53396
|
function record2(value) {
|
|
53387
53397
|
return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
@@ -61927,7 +61937,7 @@ var import_node_path39 = __toESM(require("path"), 1);
|
|
|
61927
61937
|
var import_node_stream3 = require("stream");
|
|
61928
61938
|
var import_promises6 = require("stream/promises");
|
|
61929
61939
|
var ARTIFACT_MAX_BYTES = 200 * 1024 * 1024;
|
|
61930
|
-
var ARTIFACT_TIMEOUT_MS =
|
|
61940
|
+
var ARTIFACT_TIMEOUT_MS = 12e4;
|
|
61931
61941
|
function artifactKind(url, bin) {
|
|
61932
61942
|
const u2 = new URL(url);
|
|
61933
61943
|
if (u2.protocol !== "https:") throw new Error(`\u8D44\u4EA7\u53EA\u6536 https \u76F4\u94FE\uFF1A${url}`);
|
|
@@ -73732,7 +73742,7 @@ function computeMethodAccess(args) {
|
|
|
73732
73742
|
}
|
|
73733
73743
|
|
|
73734
73744
|
// src/version.ts
|
|
73735
|
-
var version = "0.2.
|
|
73745
|
+
var version = "0.2.638".length > 0 ? "0.2.638" : "dev";
|
|
73736
73746
|
|
|
73737
73747
|
// src/cli-probe/probe.ts
|
|
73738
73748
|
var fs84 = __toESM(require("fs"), 1);
|