@sema-agent/server 5.1.0 → 5.1.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.
@@ -156,7 +156,11 @@ export async function openStores(ctx) {
156
156
  rosterStore = new TiDBRosterStore(mysqlPool);
157
157
  }
158
158
  else if (backend?.kind === "local") {
159
- rosterStore = new FileRosterStore(join(config.localDataRoot ?? localRoot, "roster.json"));
159
+ // #109([2392] 提货):onCorruptRead 披露座接线——腐读响亮 warn([2195] 族:不静默折空)
160
+ // 三挂点里 server 真用的只有这一个(session-policy=自家 SQL 双店;mailbox 用的 FileMailboxStore 无此座)。
161
+ rosterStore = new FileRosterStore(join(config.localDataRoot ?? localRoot, "roster.json"), {
162
+ onCorruptRead: (info) => logger.warn("roster_corrupt_read", { path: info.path, reason: info.reason }),
163
+ });
160
164
  }
161
165
  if (rosterStore)
162
166
  logger.info("roster_store_enabled", { backend: pgPool ? "pg" : mysqlPool ? "tidb" : "file" });
@@ -123,7 +123,9 @@ export interface FleetTaskRow {
123
123
  /** One workflow row (wire subset of contract `FleetWorkflow`). */
124
124
  export interface FleetWorkflowRow {
125
125
  id: string;
126
- name: string;
126
+ /** [2400] FLEET-WORKFLOWS-1([2070]③ 同款,workflow 行此前漏网):缺席=诚实缺席,**不铸 id 冒充名**。
127
+ * 现役唯一发布者(workflow-notify-journal)恒带 redact 后的真名;此可选位只为乱序/部分 delta 诚实。 */
128
+ name?: string;
127
129
  description?: string;
128
130
  /** Owning principal (= the workflow run's scope). Same owner-gate as FleetTaskRow. NOT rendered. */
129
131
  scope?: string;
@@ -92,7 +92,7 @@ export class FleetEventBus {
92
92
  // └────────────────────────────────────────────────────────────────────────────────────────────────┘
93
93
  /** Upsert a workflow row (MERGE by `id`) + fan out. */
94
94
  publishWorkflow(delta) {
95
- const merged = { ...(this.workflows.get(delta.id) ?? { id: delta.id, name: delta.id, status: "running" }), ...delta };
95
+ const merged = { ...(this.workflows.get(delta.id) ?? { id: delta.id, status: "running" }), ...delta };
96
96
  this.workflows.set(delta.id, merged);
97
97
  this.emit({ type: "workflow", row: merged, ts: this.now() });
98
98
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/server",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "description": "Sema Server — the server/API implementation layer for Sema, wiring core, registry, model providers, and cloud agent execution. Built on @sema-agent/core.",
5
5
  "type": "module",
6
6
  "license": "BUSL-1.1",