@clawos-dev/clawd 0.2.610 → 0.2.611
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 +34 -3
- package/dist/cloud-persona-conversations.html +1 -1
- package/dist/cloud-persona-metrics.html +72 -23
- package/dist/share-md-viewer-error.html +1 -1
- package/dist/share-md-viewer.html +1 -1
- package/dist/share-ui/assets/guest-CLszQK-o.css +32 -0
- package/dist/share-ui/guest.html +2 -2
- package/package.json +1 -1
- package/dist/share-ui/assets/guest-C6jKOcja.css +0 -32
- /package/dist/share-ui/assets/{guest-BMPo-1-u.js → guest-DJt5YvKE.js} +0 -0
package/dist/cli.cjs
CHANGED
|
@@ -51726,10 +51726,10 @@ var DashboardDataError = class extends Error {
|
|
|
51726
51726
|
code;
|
|
51727
51727
|
};
|
|
51728
51728
|
var SUBROUTES = {
|
|
51729
|
-
"cloud-persona-metrics": ["personas", "data"],
|
|
51729
|
+
"cloud-persona-metrics": ["personas", "data", "issues"],
|
|
51730
51730
|
"cloud-persona-conversations": ["personas", "threads", "thread"]
|
|
51731
51731
|
};
|
|
51732
|
-
var UPSTREAM_DOWN = { personas: "UPSTREAM_UNREACHABLE", data: "GATEWAY_UNREACHABLE", threads: "CENTER_UNREACHABLE", thread: "CENTER_UNREACHABLE" };
|
|
51732
|
+
var UPSTREAM_DOWN = { personas: "UPSTREAM_UNREACHABLE", data: "GATEWAY_UNREACHABLE", issues: "GATEWAY_UNREACHABLE", threads: "CENTER_UNREACHABLE", thread: "CENTER_UNREACHABLE" };
|
|
51733
51733
|
var NO_STORE = { "cache-control": "no-store" };
|
|
51734
51734
|
function send(res, status, contentType, body) {
|
|
51735
51735
|
res.writeHead(status, { "content-type": contentType, ...NO_STORE });
|
|
@@ -51787,6 +51787,17 @@ function createDashboardRoutes(deps) {
|
|
|
51787
51787
|
sendPassthrough(res, await deps.data.metrics({ personaId: personaId2, window: q3.get("window"), entry: q3.get("entry") }));
|
|
51788
51788
|
return true;
|
|
51789
51789
|
}
|
|
51790
|
+
if (sub === "issues") {
|
|
51791
|
+
const threadId2 = q3.get("threadId") ?? "";
|
|
51792
|
+
const cursor = q3.get("cursor");
|
|
51793
|
+
const rawSnapshot = q3.get("snapshotTo");
|
|
51794
|
+
if (!ID_RE.test(threadId2) || cursor !== null && !/^[A-Za-z0-9_-]{1,256}$/.test(cursor) || rawSnapshot !== null && (!/^[1-9]\d*$/.test(rawSnapshot) || !Number.isSafeInteger(Number(rawSnapshot))) || cursor === null !== (rawSnapshot === null)) {
|
|
51795
|
+
sendJson(res, 400, { code: "INVALID_PARAM", message: "threadId / cursor / snapshotTo \u65E0\u6548" });
|
|
51796
|
+
return true;
|
|
51797
|
+
}
|
|
51798
|
+
sendPassthrough(res, await deps.data.issues({ personaId: personaId2, threadId: threadId2, window: q3.get("window"), entry: q3.get("entry"), cursor, snapshotTo: rawSnapshot === null ? null : Number(rawSnapshot) }));
|
|
51799
|
+
return true;
|
|
51800
|
+
}
|
|
51790
51801
|
if (sub === "threads") {
|
|
51791
51802
|
const limit = q3.get("limit");
|
|
51792
51803
|
if (limit !== null && !/^\d{1,3}$/.test(limit)) {
|
|
@@ -52974,6 +52985,7 @@ function createDashboardData(deps) {
|
|
|
52974
52985
|
return visiblePersonaIds(registered, visible);
|
|
52975
52986
|
},
|
|
52976
52987
|
metrics: (q3) => deps.metrics(q3),
|
|
52988
|
+
issues: (q3) => deps.issues(q3),
|
|
52977
52989
|
async threads(q3) {
|
|
52978
52990
|
return deps.threads(mustLoginPass(), q3);
|
|
52979
52991
|
},
|
|
@@ -64672,6 +64684,24 @@ var CloudGatewayClient = class {
|
|
|
64672
64684
|
throw e;
|
|
64673
64685
|
}
|
|
64674
64686
|
}
|
|
64687
|
+
async fetchThreadIssues(q3) {
|
|
64688
|
+
const { apiKey, gatewayUrl } = await this.credentials();
|
|
64689
|
+
const qs = new URLSearchParams({ threadId: q3.threadId });
|
|
64690
|
+
if (q3.window) qs.set("window", q3.window);
|
|
64691
|
+
if (q3.entry) qs.set("entry", q3.entry);
|
|
64692
|
+
if (q3.cursor) qs.set("cursor", q3.cursor);
|
|
64693
|
+
if (q3.snapshotTo !== null) qs.set("snapshotTo", String(q3.snapshotTo));
|
|
64694
|
+
try {
|
|
64695
|
+
const res = await this.fetchImpl(`${gatewayUrl}${GATEWAY_ROUTES.metrics(q3.personaId)}/issues?${qs}`, {
|
|
64696
|
+
headers: { authorization: `Bearer ${apiKey}` },
|
|
64697
|
+
signal: AbortSignal.timeout(METRICS_TIMEOUT_MS)
|
|
64698
|
+
});
|
|
64699
|
+
return { status: res.status, body: await res.text() };
|
|
64700
|
+
} catch (e) {
|
|
64701
|
+
if (e.name === "TimeoutError") throw new Error(`\u4E91\u4E0A\u670D\u52A1 ${METRICS_TIMEOUT_MS / 1e3} \u79D2\u6CA1\u56DE`);
|
|
64702
|
+
throw e;
|
|
64703
|
+
}
|
|
64704
|
+
}
|
|
64675
64705
|
/**
|
|
64676
64706
|
* 这个人云盘上一轮末的用量(design 2026-09-19-cloud-volume-usage §3.3)。gateway 回 `volume: null` = 还没跑过任务(没有盘)。
|
|
64677
64707
|
* 没登录 / 没 key 走 credentials() 的抛法,调用方(cloud:volume:get 的 handler)把它们和网络错一并折成 null——角标不该弹错。
|
|
@@ -73457,7 +73487,7 @@ function computeMethodAccess(args) {
|
|
|
73457
73487
|
}
|
|
73458
73488
|
|
|
73459
73489
|
// src/version.ts
|
|
73460
|
-
var version = "0.2.
|
|
73490
|
+
var version = "0.2.611".length > 0 ? "0.2.611" : "dev";
|
|
73461
73491
|
|
|
73462
73492
|
// src/cli-probe/probe.ts
|
|
73463
73493
|
var fs83 = __toESM(require("fs"), 1);
|
|
@@ -77330,6 +77360,7 @@ async function startDaemon(config) {
|
|
|
77330
77360
|
registeredPersonas: async () => (await cloudGateway.listPersonas()).map((p3) => p3.personaId),
|
|
77331
77361
|
visiblePersonas: (loginPass) => centralVisiblePersonas({ api: dashboardApi(), loginPass }),
|
|
77332
77362
|
metrics: (q3) => cloudGateway.fetchMetrics(q3),
|
|
77363
|
+
issues: (q3) => cloudGateway.fetchThreadIssues(q3),
|
|
77333
77364
|
threads: (loginPass, q3) => centralPersonaThreads({ api: dashboardApi(), loginPass, ...q3 }),
|
|
77334
77365
|
thread: (loginPass, q3) => centralPersonaThread({ api: dashboardApi(), loginPass, ...q3 }),
|
|
77335
77366
|
logger
|