@clawos-dev/clawd 0.2.733 → 0.2.735

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.
@@ -32959,7 +32959,7 @@ var EngineConnectPoolResponseSchema = external_exports.object({
32959
32959
  }).strict();
32960
32960
 
32961
32961
  // ../protocol/src/dashboard-schemas.ts
32962
- var DASHBOARD_PAGES = ["cloud-persona-metrics", "cloud-persona-conversations"];
32962
+ var DASHBOARD_PAGES = ["cloud-persona-metrics", "cloud-persona-conversations", "cloud-persona-schedules"];
32963
32963
  var DashboardPageSchema = external_exports.enum(DASHBOARD_PAGES);
32964
32964
  var DASHBOARD_LINK_TTL_SECONDS = 24 * 3600;
32965
32965
  var DashboardOpenUrlArgs = external_exports.object({ page: DashboardPageSchema }).strict();
package/dist/cli.cjs CHANGED
@@ -8132,7 +8132,7 @@ var init_dashboard_schemas = __esm({
8132
8132
  "../protocol/src/dashboard-schemas.ts"() {
8133
8133
  "use strict";
8134
8134
  init_zod();
8135
- DASHBOARD_PAGES = ["cloud-persona-metrics", "cloud-persona-conversations"];
8135
+ DASHBOARD_PAGES = ["cloud-persona-metrics", "cloud-persona-conversations", "cloud-persona-schedules"];
8136
8136
  DashboardPageSchema = external_exports.enum(DASHBOARD_PAGES);
8137
8137
  DASHBOARD_LINK_TTL_SECONDS = 24 * 3600;
8138
8138
  DashboardOpenUrlArgs = external_exports.object({ page: DashboardPageSchema }).strict();
@@ -53670,9 +53670,10 @@ var DashboardDataError = class extends Error {
53670
53670
  };
53671
53671
  var SUBROUTES = {
53672
53672
  "cloud-persona-metrics": ["personas", "data", "issues"],
53673
- "cloud-persona-conversations": ["personas", "threads", "thread"]
53673
+ "cloud-persona-conversations": ["personas", "threads", "thread"],
53674
+ "cloud-persona-schedules": ["personas", "schedules", "runs"]
53674
53675
  };
53675
- var UPSTREAM_DOWN = { personas: "UPSTREAM_UNREACHABLE", data: "GATEWAY_UNREACHABLE", issues: "GATEWAY_UNREACHABLE", threads: "CENTER_UNREACHABLE", thread: "CENTER_UNREACHABLE" };
53676
+ var UPSTREAM_DOWN = { personas: "UPSTREAM_UNREACHABLE", data: "GATEWAY_UNREACHABLE", issues: "GATEWAY_UNREACHABLE", threads: "CENTER_UNREACHABLE", thread: "CENTER_UNREACHABLE", schedules: "GATEWAY_UNREACHABLE", runs: "GATEWAY_UNREACHABLE" };
53676
53677
  var NO_STORE = { "cache-control": "no-store" };
53677
53678
  function send(res, status, contentType, body) {
53678
53679
  res.writeHead(status, { "content-type": contentType, ...NO_STORE });
@@ -53741,6 +53742,21 @@ function createDashboardRoutes(deps) {
53741
53742
  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) }));
53742
53743
  return true;
53743
53744
  }
53745
+ if (sub === "schedules") {
53746
+ sendPassthrough(res, await deps.data.schedules({ personaId: personaId2 }));
53747
+ return true;
53748
+ }
53749
+ if (sub === "runs") {
53750
+ const scheduleId = q3.get("id") ?? "";
53751
+ const limit = q3.get("limit");
53752
+ const before = q3.get("before");
53753
+ if (!/^[0-9a-f-]{36}$/.test(scheduleId) || limit !== null && !/^\d{1,3}$/.test(limit) || before !== null && !/^[1-9]\d{0,15}$/.test(before)) {
53754
+ sendJson(res, 400, { code: "INVALID_PARAM", message: "id / limit / before \u65E0\u6548" });
53755
+ return true;
53756
+ }
53757
+ sendPassthrough(res, await deps.data.schedules({ personaId: personaId2, scheduleId, limit: limit === null ? null : Number(limit), before: before === null ? null : Number(before) }));
53758
+ return true;
53759
+ }
53744
53760
  if (sub === "threads") {
53745
53761
  const limit = q3.get("limit");
53746
53762
  if (limit !== null && !/^\d{1,3}$/.test(limit)) {
@@ -54109,6 +54125,7 @@ function createDashboardData(deps) {
54109
54125
  },
54110
54126
  metrics: (q3) => deps.metrics(q3),
54111
54127
  issues: (q3) => deps.issues(q3),
54128
+ schedules: (q3) => deps.schedules(q3),
54112
54129
  async threads(q3) {
54113
54130
  return deps.threads(mustLoginPass(), q3);
54114
54131
  },
@@ -58342,7 +58359,9 @@ var GATEWAY_ROUTES = {
58342
58359
  volume: () => "/me/volume",
58343
58360
  workspace: (personaId2) => `/p/${encodeURIComponent(personaId2)}/workspace`,
58344
58361
  fork: (personaId2) => `/p/${encodeURIComponent(personaId2)}/fork`,
58345
- metrics: (personaId2) => `/metrics/${encodeURIComponent(personaId2)}`
58362
+ metrics: (personaId2) => `/metrics/${encodeURIComponent(personaId2)}`,
58363
+ schedules: (personaId2) => `/schedules/${encodeURIComponent(personaId2)}`,
58364
+ scheduleRuns: (personaId2, scheduleId) => `/schedules/${encodeURIComponent(personaId2)}/${encodeURIComponent(scheduleId)}/runs`
58346
58365
  };
58347
58366
  var METRICS_TIMEOUT_MS = 3e4;
58348
58367
  var trimSlash = (u2) => u2.replace(/\/+$/, "");
@@ -58542,6 +58561,27 @@ var CloudGatewayClient = class {
58542
58561
  throw e;
58543
58562
  }
58544
58563
  }
58564
+ /**
58565
+ * 看板的定时任务页(design 2026-10-27-cloud-schedule):gateway 回什么原样转(状态码 + body),鉴权同 fetchMetrics。
58566
+ * 带 scheduleId = 展开一条任务的运行记录一页(limit / before 分页)
58567
+ */
58568
+ async fetchSchedules(q3) {
58569
+ const { apiKey, gatewayUrl } = await this.credentials();
58570
+ const qs = new URLSearchParams();
58571
+ if (q3.limit != null) qs.set("limit", String(q3.limit));
58572
+ if (q3.before != null) qs.set("before", String(q3.before));
58573
+ const path113 = q3.scheduleId ? GATEWAY_ROUTES.scheduleRuns(q3.personaId, q3.scheduleId) + (qs.size ? `?${qs}` : "") : GATEWAY_ROUTES.schedules(q3.personaId);
58574
+ try {
58575
+ const res = await this.fetchImpl(gatewayUrl + path113, {
58576
+ headers: { authorization: `Bearer ${apiKey}` },
58577
+ signal: AbortSignal.timeout(METRICS_TIMEOUT_MS)
58578
+ });
58579
+ return { status: res.status, body: await res.text() };
58580
+ } catch (e) {
58581
+ if (e.name === "TimeoutError") throw new Error(`\u4E91\u4E0A\u670D\u52A1 ${METRICS_TIMEOUT_MS / 1e3} \u79D2\u6CA1\u56DE`);
58582
+ throw e;
58583
+ }
58584
+ }
58545
58585
  async fetchThreadIssues(q3) {
58546
58586
  const { apiKey, gatewayUrl } = await this.credentials();
58547
58587
  const qs = new URLSearchParams({ threadId: q3.threadId });
@@ -76222,7 +76262,7 @@ function computeMethodAccess(args) {
76222
76262
  }
76223
76263
 
76224
76264
  // src/version.ts
76225
- var version = "0.2.733".length > 0 ? "0.2.733" : "dev";
76265
+ var version = "0.2.735".length > 0 ? "0.2.735" : "dev";
76226
76266
 
76227
76267
  // src/cli-probe/probe.ts
76228
76268
  var fs87 = __toESM(require("fs"), 1);
@@ -80176,6 +80216,7 @@ async function startDaemon(config) {
80176
80216
  visiblePersonas: (loginPass) => centralVisiblePersonas({ api: dashboardApi(), loginPass }),
80177
80217
  metrics: (q3) => cloudGateway.fetchMetrics(q3),
80178
80218
  issues: (q3) => cloudGateway.fetchThreadIssues(q3),
80219
+ schedules: (q3) => cloudGateway.fetchSchedules(q3),
80179
80220
  threads: (loginPass, q3) => centralPersonaThreads({ api: dashboardApi(), loginPass, ...q3 }),
80180
80221
  thread: (loginPass, q3) => centralPersonaThread({ api: dashboardApi(), loginPass, ...q3 }),
80181
80222
  logger