@sema-agent/server 7.92.1 → 7.93.0
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/README.md +1 -0
- package/README.zh-CN.md +1 -0
- package/dist/approval-ask-machine.d.ts +1 -1
- package/dist/approval-card.d.ts +10 -7
- package/dist/approval-card.js +3 -3
- package/dist/bench/s1/arms.js +5 -6
- package/dist/bench/s1/live-deps.js +2 -2
- package/dist/boot/resolve-spec.js +1 -0
- package/dist/boot/stage-06-runners.js +3 -2
- package/dist/boot/stores.js +9 -0
- package/dist/capabilities/mcp-probe.d.ts +290 -0
- package/dist/capabilities/mcp-probe.js +318 -0
- package/dist/http/resume-legs.js +12 -10
- package/dist/http/route-ctx.d.ts +3 -0
- package/dist/http/routes/capabilities.d.ts +17 -0
- package/dist/http/routes/capabilities.js +93 -1
- package/dist/http/routes/memory-origin.d.ts +1 -1
- package/dist/http/routes/rules.js +49 -13
- package/dist/http/routes/runs.js +3 -2
- package/dist/http/routes/session-sync.js +24 -12
- package/dist/http/routes/sessions.js +12 -8
- package/dist/http/routes/tasks.js +13 -13
- package/dist/http/send.d.ts +11 -0
- package/dist/http/send.js +9 -0
- package/dist/http/server.js +3 -2
- package/dist/http/wire-types.d.ts +17 -1
- package/dist/leader/fanout.js +3 -3
- package/dist/leader/leader.js +4 -4
- package/dist/leader/repair-wire.js +2 -2
- package/dist/leader/wire.js +2 -2
- package/dist/observability/metrics.js +2 -0
- package/dist/permission-rule-vocab.d.ts +9 -9
- package/dist/plugins/file-run-store.js +3 -3
- package/dist/plugins/memory-run-store.js +3 -3
- package/dist/plugins/remote-env-host.d.ts +5 -0
- package/dist/plugins/remote-env-host.js +39 -37
- package/dist/plugins/run-store-sql.js +3 -3
- package/dist/plugins/schema-consistency.d.ts +88 -0
- package/dist/plugins/schema-consistency.js +202 -0
- package/dist/plugins/schema-ensure-legs.d.ts +55 -0
- package/dist/plugins/schema-ensure-legs.js +87 -0
- package/dist/plugins/session-policy-store-sql.js +23 -5
- package/dist/request-key-closure.js +1 -1
- package/dist/rules-consent.d.ts +42 -4
- package/dist/rules-consent.js +23 -7
- package/dist/run-local.js +2 -2
- package/dist/runs.js +14 -14
- package/dist/task-mcp.d.ts +32 -0
- package/dist/task-mcp.js +7 -0
- package/dist/terminal.d.ts +58 -4
- package/dist/terminal.js +28 -6
- package/dist/tool-approval.d.ts +22 -1
- package/dist/tool-approval.js +1 -0
- package/dist/trace/core-keyset-guard.d.ts +3 -3
- package/dist/trace/ledger-sink.js +3 -2
- package/dist/trace/project.d.ts +24 -0
- package/dist/trace/project.js +40 -37
- package/dist/trace/wire-projection-faces.d.ts +209 -0
- package/dist/trace/wire-projection-faces.js +62 -0
- package/package.json +3 -3
package/dist/trace/project.js
CHANGED
|
@@ -371,6 +371,45 @@ export function workspaceChangedEventData(ev) {
|
|
|
371
371
|
...identityFields(ev),
|
|
372
372
|
};
|
|
373
373
|
}
|
|
374
|
+
export function projectWiringManifestMcpRows(mcpIn) {
|
|
375
|
+
const str = (v) => (typeof v === "string" && v.length > 0 ? v : undefined);
|
|
376
|
+
const num = (v) => (typeof v === "number" && Number.isFinite(v) ? v : undefined);
|
|
377
|
+
const sec = (v) => (typeof v === "object" && v !== null && !Array.isArray(v) ? { ...v } : undefined);
|
|
378
|
+
if (!Array.isArray(mcpIn))
|
|
379
|
+
return undefined;
|
|
380
|
+
const rows = [];
|
|
381
|
+
for (const raw of mcpIn) {
|
|
382
|
+
const e = sec(raw);
|
|
383
|
+
if (e === undefined)
|
|
384
|
+
continue;
|
|
385
|
+
const name = str(e.name);
|
|
386
|
+
const status = str(e.status);
|
|
387
|
+
if (name === undefined || status === undefined)
|
|
388
|
+
continue;
|
|
389
|
+
const liveness = (() => {
|
|
390
|
+
const rec = sec(e.liveness);
|
|
391
|
+
if (rec === undefined)
|
|
392
|
+
return undefined;
|
|
393
|
+
const state = str(rec.state);
|
|
394
|
+
const observedAt = num(rec.observedAt);
|
|
395
|
+
if (state === undefined || !MCP_LIVENESS_STATES.includes(state) || observedAt === undefined)
|
|
396
|
+
return undefined;
|
|
397
|
+
const errorCode = str(rec.errorCode);
|
|
398
|
+
return { state, observedAt, ...(errorCode === undefined ? {} : { errorCode }) };
|
|
399
|
+
})();
|
|
400
|
+
rows.push({
|
|
401
|
+
name,
|
|
402
|
+
status,
|
|
403
|
+
...(num(e.toolCount) !== undefined ? { toolCount: e.toolCount } : {}),
|
|
404
|
+
...(str(e.source) !== undefined ? { source: e.source } : {}),
|
|
405
|
+
...(str(e.errorCode) !== undefined ? { errorCode: e.errorCode } : {}),
|
|
406
|
+
...(typeof e.delivered === "string" && MCP_DELIVERY_VERDICTS.includes(e.delivered) ? { delivered: e.delivered } : {}),
|
|
407
|
+
...(num(e.httpStatus) !== undefined ? { httpStatus: e.httpStatus } : {}),
|
|
408
|
+
...(liveness !== undefined ? { liveness } : {}),
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
return rows;
|
|
412
|
+
}
|
|
374
413
|
export function toolRosterDeltaEventData(ev) {
|
|
375
414
|
if (!Value.Check(ToolRosterDelta, ev.delta)) {
|
|
376
415
|
recordFailOpen("server.trace.tool-roster-malformed", "tool_roster_delta.delta did not fit core ToolRosterDelta");
|
|
@@ -495,43 +534,7 @@ export function wiringManifestEventData(ev) {
|
|
|
495
534
|
return dropProjectedFace("wiring_manifest.writeProtection.targetView is outside core WRITE_PROTECTION_TARGET_VIEWS");
|
|
496
535
|
return { targetView };
|
|
497
536
|
})();
|
|
498
|
-
const
|
|
499
|
-
const mcp = (() => {
|
|
500
|
-
if (!Array.isArray(mcpIn))
|
|
501
|
-
return undefined;
|
|
502
|
-
const rows = [];
|
|
503
|
-
for (const raw of mcpIn) {
|
|
504
|
-
const e = sec(raw);
|
|
505
|
-
if (e === undefined)
|
|
506
|
-
continue;
|
|
507
|
-
const name = str(e.name);
|
|
508
|
-
const status = str(e.status);
|
|
509
|
-
if (name === undefined || status === undefined)
|
|
510
|
-
continue;
|
|
511
|
-
const liveness = (() => {
|
|
512
|
-
const rec = sec(e.liveness);
|
|
513
|
-
if (rec === undefined)
|
|
514
|
-
return undefined;
|
|
515
|
-
const state = str(rec.state);
|
|
516
|
-
const observedAt = num(rec.observedAt);
|
|
517
|
-
if (state === undefined || !MCP_LIVENESS_STATES.includes(state) || observedAt === undefined)
|
|
518
|
-
return undefined;
|
|
519
|
-
const errorCode = str(rec.errorCode);
|
|
520
|
-
return { state, observedAt, ...(errorCode === undefined ? {} : { errorCode }) };
|
|
521
|
-
})();
|
|
522
|
-
rows.push({
|
|
523
|
-
name,
|
|
524
|
-
status,
|
|
525
|
-
...(num(e.toolCount) !== undefined ? { toolCount: e.toolCount } : {}),
|
|
526
|
-
...(str(e.source) !== undefined ? { source: e.source } : {}),
|
|
527
|
-
...(str(e.errorCode) !== undefined ? { errorCode: e.errorCode } : {}),
|
|
528
|
-
...(typeof e.delivered === "string" && MCP_DELIVERY_VERDICTS.includes(e.delivered) ? { delivered: e.delivered } : {}),
|
|
529
|
-
...(num(e.httpStatus) !== undefined ? { httpStatus: e.httpStatus } : {}),
|
|
530
|
-
...(liveness !== undefined ? { liveness } : {}),
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
return rows;
|
|
534
|
-
})();
|
|
537
|
+
const mcp = projectWiringManifestMcpRows(m.mcp);
|
|
535
538
|
return {
|
|
536
539
|
...(num(m.schemaVersion) !== undefined ? { schemaVersion: m.schemaVersion } : {}),
|
|
537
540
|
...(str(legIn.kind) !== undefined ? { leg: { kind: legIn.kind } } : {}),
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* S-545 —— **wire 帧投影面的登记表**([ref]「手抄投影全面下线,改由源头机器派生」在本仓第一处落点)。
|
|
3
|
+
*
|
|
4
|
+
* ## 这张表是什么(以及它**不是**什么)
|
|
5
|
+
* 每一行登记一只把 core 帧投到 wire 的构造器,只写三样**人必须裁定**的东西:
|
|
6
|
+
* · `coreType` —— 该面的键集**权威**所在的 core 型表达式。键名本身**一个都不抄**:门把这段表达式喂给
|
|
7
|
+
* `test/helpers/core-frame-keys.ts`,由 TypeScript 的类型检查器从**安装态 core 的 `.d.ts`** 里读出键集
|
|
8
|
+
* 与一枚全键 fixture。core 加键/退键 ⇒ 读数当场变,不需要任何人记得回来改表。
|
|
9
|
+
* · `excluded` / `unwrapped` —— core 有、本面**有意不投**或**拆开铺平**的键。这不是键集,是**处置**:
|
|
10
|
+
* 没有任何机器能替人决定一个键该不该上 wire,所以这一栏必须是人写的。它的正确性由门反向钉住
|
|
11
|
+
* (登记的词必须仍是 core 的键;core 退役一个键而这里留着残条目 ⇒ 红)。
|
|
12
|
+
* · `minted` —— 本仓**自铸**、core 没有的 wire 键。同样是处置,同样被反向钉住(铸键不许与 core 键重名)。
|
|
13
|
+
*
|
|
14
|
+
* ## 为什么在 `src/` 而不在 `test/`
|
|
15
|
+
* 与 `core-keyset-guard.ts` 同一条理由:它的**执行点之一是 `tsc --noEmit`** —— 那个文件的 ① 面把
|
|
16
|
+
* `NotificationExcluded` 直接读成本表这一行的 `excluded`,于是「哪几个键有意不上 wire」全仓**只有一个写者**。
|
|
17
|
+
* 旧形是两个:守卫文件一簿、`test/wire-whitelist-exhaustiveness.test.ts` 的 `KnownExcluded` 一簿,那份门注
|
|
18
|
+
* 自己写着「两处必须同时改」—— 而「必须同时改」正是 [ref] 要下线的东西(对账门不算替代,单写者才算)。
|
|
19
|
+
* 本表是纯数据、无行为,被守卫文件以 `typeof import(...)` 的**类型查询**读取(编译期擦除,零运行期边)。
|
|
20
|
+
*
|
|
21
|
+
* ## 门在哪里
|
|
22
|
+
* `test/wire-whitelist-exhaustiveness.test.ts`:对每一行喂一枚 core 型全键 fixture,真的跑一遍构造器,
|
|
23
|
+
* 断言 **投影体键集 == (core 键 − excluded − unwrapped) ∪ minted**(等式 = 两个方向一次给全:多投一枚
|
|
24
|
+
* core 没有的键、漏投一枚 core 有的键,各自一条变异负控证判别力)。同一只门还把本表与 `project.ts` 的
|
|
25
|
+
* 构造器导出清单对账 —— 新加一只投影器而不登记本表 ⇒ 红(普查不许有洞)。
|
|
26
|
+
*/
|
|
27
|
+
/** 一只帧投影构造器的登记行。 */
|
|
28
|
+
export interface WireProjectionFace {
|
|
29
|
+
/** 构造器的导出名(普查对账用;`project.ts` 与两只 HTTP 行投影都按这个名字找)。 */
|
|
30
|
+
readonly projector: string;
|
|
31
|
+
/** 该面键集权威所在的 **core 型表达式**(门把它原样写进探针文件)。 */
|
|
32
|
+
readonly coreType: string;
|
|
33
|
+
/** core 有、本面**有意不投**的键(逐键理由写在本行上方;涉及裁定的真源指向守卫文件对应面)。 */
|
|
34
|
+
readonly excluded: readonly string[];
|
|
35
|
+
/** core 有、但被**拆开铺平**成本面自身键集的壳键(壳键本身不上 wire,它的成员才是本面)。 */
|
|
36
|
+
readonly unwrapped?: readonly string[];
|
|
37
|
+
/** 本仓**自铸**、core 没有、且在场无条件的 wire 键(逐键理由写在本行上方)。 */
|
|
38
|
+
readonly minted: readonly string[];
|
|
39
|
+
/**
|
|
40
|
+
* 本仓自铸、但**只在某个条件成立时**在场的键 —— 门对它只判「允许」不判「必需」。
|
|
41
|
+
* 每一枚都要写清那个条件,而且那个条件必须是 **core 型表达不出来的**(否则它该进 `minted`,由全键
|
|
42
|
+
* fixture 逼出来)。今天唯一的一员是清标行的 `originUnknownKeys`:它的触发条件是「入参带了 core 型上
|
|
43
|
+
* **没有**的嵌套成员」,而全键 fixture 是照 core 型生成的,结构上永远触发不了它。
|
|
44
|
+
*/
|
|
45
|
+
readonly mintedConditional?: readonly string[];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* `TaskEvent` **信封**上的键 —— 这一族构造器一个都不管,所以在每一只 TaskEvent 面上统一扣除。
|
|
49
|
+
* · `type`:臂名由调用点自己拼在投影体外(`{ type: "tool_end", ...toolEndEventData(ev) }`),不是载荷键;
|
|
50
|
+
* · `sourceTaskId` / `bgAgentId`:live 腿的**四键身份**由 `liveIdentityFields` 单独挑(durable 两腿只挑两键),
|
|
51
|
+
* 属主是那只函数而不是各面构造器 —— 所以对本族构造器它们恒不在投影体里。
|
|
52
|
+
* 这是**一条统一规则**,不是十六个面各自的豁免名单:新臂进来自动适用。
|
|
53
|
+
*/
|
|
54
|
+
export declare const FRAME_ENVELOPE_KEYS: readonly ["type", "sourceTaskId", "bgAgentId"];
|
|
55
|
+
/** 探针文件要从 `@sema-agent/core` 具名导入的类型(`coreType` 表达式里用到的全部名字)。 */
|
|
56
|
+
export declare const WIRE_PROJECTION_CORE_IMPORTS: readonly ["TaskEvent", "TaskNotificationPayload", "WiringManifest", "EngineNotice", "MemoryImportReport", "OriginClearanceRow", "OriginClearanceEvent", "MemoryEntryOrigin"];
|
|
57
|
+
/**
|
|
58
|
+
* 全部帧投影面。键 = 面名(门的报错文案与负控都按它称呼这一行)。
|
|
59
|
+
*
|
|
60
|
+
* ⚠️ 加一只新构造器时**同批加一行**;不加 ⇒ 普查对账格红(这正是它存在的理由 —— 旧形下三个后进构造器
|
|
61
|
+
* 在门辖外躺了一整个提货周期,core 给那三分支加键时无人红,[ref] 审计 2.4 才补上)。
|
|
62
|
+
*/
|
|
63
|
+
export declare const WIRE_PROJECTION_FACES: {
|
|
64
|
+
readonly task_progress: {
|
|
65
|
+
readonly projector: "taskProgressEventData";
|
|
66
|
+
readonly coreType: string;
|
|
67
|
+
readonly excluded: readonly [];
|
|
68
|
+
readonly minted: readonly [];
|
|
69
|
+
};
|
|
70
|
+
readonly tool_start: {
|
|
71
|
+
readonly projector: "toolStartEventData";
|
|
72
|
+
readonly coreType: string;
|
|
73
|
+
readonly excluded: readonly [];
|
|
74
|
+
readonly minted: readonly [];
|
|
75
|
+
};
|
|
76
|
+
readonly tool_end: {
|
|
77
|
+
readonly projector: "toolEndEventData";
|
|
78
|
+
readonly coreType: string;
|
|
79
|
+
readonly excluded: readonly [];
|
|
80
|
+
readonly minted: readonly [];
|
|
81
|
+
};
|
|
82
|
+
readonly tool_progress: {
|
|
83
|
+
readonly projector: "toolProgressEventData";
|
|
84
|
+
readonly coreType: string;
|
|
85
|
+
readonly excluded: readonly [];
|
|
86
|
+
readonly minted: readonly [];
|
|
87
|
+
};
|
|
88
|
+
readonly tool_disclosure: {
|
|
89
|
+
readonly projector: "toolDisclosureEventData";
|
|
90
|
+
readonly coreType: string;
|
|
91
|
+
readonly excluded: readonly [];
|
|
92
|
+
readonly minted: readonly [];
|
|
93
|
+
};
|
|
94
|
+
readonly tool_roster_delta: {
|
|
95
|
+
readonly projector: "toolRosterDeltaEventData";
|
|
96
|
+
readonly coreType: string;
|
|
97
|
+
readonly excluded: readonly [];
|
|
98
|
+
readonly minted: readonly [];
|
|
99
|
+
};
|
|
100
|
+
readonly diagnostics: {
|
|
101
|
+
readonly projector: "diagnosticsEventData";
|
|
102
|
+
readonly coreType: string;
|
|
103
|
+
readonly excluded: readonly [];
|
|
104
|
+
readonly minted: readonly [];
|
|
105
|
+
};
|
|
106
|
+
readonly steering_injected: {
|
|
107
|
+
readonly projector: "steeringInjectedEventData";
|
|
108
|
+
readonly coreType: string;
|
|
109
|
+
readonly excluded: readonly [];
|
|
110
|
+
readonly minted: readonly [];
|
|
111
|
+
};
|
|
112
|
+
readonly workspace_changed: {
|
|
113
|
+
readonly projector: "workspaceChangedEventData";
|
|
114
|
+
readonly coreType: string;
|
|
115
|
+
readonly excluded: readonly [];
|
|
116
|
+
readonly minted: readonly [];
|
|
117
|
+
};
|
|
118
|
+
readonly status: {
|
|
119
|
+
readonly projector: "brainStatusEventData";
|
|
120
|
+
readonly coreType: string;
|
|
121
|
+
readonly excluded: readonly [];
|
|
122
|
+
readonly minted: readonly [];
|
|
123
|
+
};
|
|
124
|
+
readonly compacted: {
|
|
125
|
+
readonly projector: "compactedEventData";
|
|
126
|
+
readonly coreType: string;
|
|
127
|
+
readonly excluded: readonly [];
|
|
128
|
+
readonly minted: readonly [];
|
|
129
|
+
};
|
|
130
|
+
readonly context_usage: {
|
|
131
|
+
readonly projector: "contextUsageEventData";
|
|
132
|
+
readonly coreType: string;
|
|
133
|
+
readonly excluded: readonly [];
|
|
134
|
+
readonly minted: readonly [];
|
|
135
|
+
};
|
|
136
|
+
readonly turn_end: {
|
|
137
|
+
readonly projector: "turnEndEventData";
|
|
138
|
+
readonly coreType: string;
|
|
139
|
+
readonly excluded: readonly [];
|
|
140
|
+
readonly minted: readonly [];
|
|
141
|
+
};
|
|
142
|
+
readonly compaction_outcome: {
|
|
143
|
+
readonly projector: "compactionOutcomeEventData";
|
|
144
|
+
readonly coreType: string;
|
|
145
|
+
readonly excluded: readonly [];
|
|
146
|
+
readonly minted: readonly [];
|
|
147
|
+
};
|
|
148
|
+
readonly human_input: {
|
|
149
|
+
readonly projector: "humanInputEventData";
|
|
150
|
+
readonly coreType: string;
|
|
151
|
+
readonly excluded: readonly ["principal"];
|
|
152
|
+
readonly minted: readonly [];
|
|
153
|
+
};
|
|
154
|
+
readonly task_notification: {
|
|
155
|
+
readonly projector: "taskNotificationEventData";
|
|
156
|
+
readonly coreType: `TaskNotificationPayload & ${string}`;
|
|
157
|
+
readonly excluded: readonly ["peer", "crossSessionMessage", "crossSessionNotice"];
|
|
158
|
+
readonly unwrapped: readonly ["notification"];
|
|
159
|
+
readonly minted: readonly ["injected"];
|
|
160
|
+
};
|
|
161
|
+
readonly wiring_manifest_tenant: {
|
|
162
|
+
readonly projector: "wiringManifestEventData";
|
|
163
|
+
readonly coreType: `WiringManifest & ${string}`;
|
|
164
|
+
readonly excluded: readonly ["governance", "configFingerprint", "autoConsolidation", "readDeny"];
|
|
165
|
+
readonly unwrapped: readonly ["manifest"];
|
|
166
|
+
readonly minted: readonly [];
|
|
167
|
+
};
|
|
168
|
+
readonly wiring_manifest_operator: {
|
|
169
|
+
readonly projector: "wiringManifestOperatorEventData";
|
|
170
|
+
readonly coreType: `WiringManifest & ${string}`;
|
|
171
|
+
readonly excluded: readonly [];
|
|
172
|
+
readonly unwrapped: readonly ["manifest"];
|
|
173
|
+
readonly minted: readonly [];
|
|
174
|
+
};
|
|
175
|
+
readonly engine_notice: {
|
|
176
|
+
readonly projector: "engineNoticeEventData";
|
|
177
|
+
readonly coreType: "EngineNotice";
|
|
178
|
+
readonly excluded: readonly [];
|
|
179
|
+
readonly minted: readonly ["ts"];
|
|
180
|
+
};
|
|
181
|
+
readonly memory_import_report: {
|
|
182
|
+
readonly projector: "buildImportReportWire";
|
|
183
|
+
readonly coreType: "MemoryImportReport";
|
|
184
|
+
readonly excluded: readonly [];
|
|
185
|
+
readonly minted: readonly [];
|
|
186
|
+
};
|
|
187
|
+
readonly origin_clearance_row: {
|
|
188
|
+
readonly projector: "buildClearanceRowWire";
|
|
189
|
+
readonly coreType: "OriginClearanceRow";
|
|
190
|
+
readonly excluded: readonly ["entryText"];
|
|
191
|
+
readonly minted: readonly ["custodyBytes"];
|
|
192
|
+
readonly mintedConditional: readonly ["originUnknownKeys"];
|
|
193
|
+
};
|
|
194
|
+
readonly origin_clearance_origin: {
|
|
195
|
+
readonly projector: "buildClearanceRowWire";
|
|
196
|
+
readonly coreType: "MemoryEntryOrigin";
|
|
197
|
+
readonly excluded: readonly [];
|
|
198
|
+
readonly minted: readonly [];
|
|
199
|
+
};
|
|
200
|
+
readonly origin_clearance_event: {
|
|
201
|
+
readonly projector: "buildClearanceRowWire";
|
|
202
|
+
readonly coreType: "OriginClearanceEvent";
|
|
203
|
+
readonly excluded: readonly [];
|
|
204
|
+
readonly minted: readonly [];
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
/** 面名。 */
|
|
208
|
+
export type WireProjectionFaceName = keyof typeof WIRE_PROJECTION_FACES;
|
|
209
|
+
//# sourceMappingURL=wire-projection-faces.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export const FRAME_ENVELOPE_KEYS = ["type", "sourceTaskId", "bgAgentId"];
|
|
2
|
+
export const WIRE_PROJECTION_CORE_IMPORTS = [
|
|
3
|
+
"TaskEvent",
|
|
4
|
+
"TaskNotificationPayload",
|
|
5
|
+
"WiringManifest",
|
|
6
|
+
"EngineNotice",
|
|
7
|
+
"MemoryImportReport",
|
|
8
|
+
"OriginClearanceRow",
|
|
9
|
+
"OriginClearanceEvent",
|
|
10
|
+
"MemoryEntryOrigin",
|
|
11
|
+
];
|
|
12
|
+
const arm = (name) => `Extract<TaskEvent, { type: "${name}" }>`;
|
|
13
|
+
export const WIRE_PROJECTION_FACES = {
|
|
14
|
+
task_progress: { projector: "taskProgressEventData", coreType: arm("task_progress"), excluded: [], minted: [] },
|
|
15
|
+
tool_start: { projector: "toolStartEventData", coreType: arm("tool_start"), excluded: [], minted: [] },
|
|
16
|
+
tool_end: { projector: "toolEndEventData", coreType: arm("tool_end"), excluded: [], minted: [] },
|
|
17
|
+
tool_progress: { projector: "toolProgressEventData", coreType: arm("tool_progress"), excluded: [], minted: [] },
|
|
18
|
+
tool_disclosure: { projector: "toolDisclosureEventData", coreType: arm("tool_disclosure"), excluded: [], minted: [] },
|
|
19
|
+
tool_roster_delta: { projector: "toolRosterDeltaEventData", coreType: arm("tool_roster_delta"), excluded: [], minted: [] },
|
|
20
|
+
diagnostics: { projector: "diagnosticsEventData", coreType: arm("diagnostics"), excluded: [], minted: [] },
|
|
21
|
+
steering_injected: { projector: "steeringInjectedEventData", coreType: arm("steering_injected"), excluded: [], minted: [] },
|
|
22
|
+
workspace_changed: { projector: "workspaceChangedEventData", coreType: arm("workspace_changed"), excluded: [], minted: [] },
|
|
23
|
+
status: { projector: "brainStatusEventData", coreType: arm("status"), excluded: [], minted: [] },
|
|
24
|
+
compacted: { projector: "compactedEventData", coreType: arm("compacted"), excluded: [], minted: [] },
|
|
25
|
+
context_usage: { projector: "contextUsageEventData", coreType: arm("context_usage"), excluded: [], minted: [] },
|
|
26
|
+
turn_end: { projector: "turnEndEventData", coreType: arm("turn_end"), excluded: [], minted: [] },
|
|
27
|
+
compaction_outcome: { projector: "compactionOutcomeEventData", coreType: arm("compaction_outcome"), excluded: [], minted: [] },
|
|
28
|
+
human_input: { projector: "humanInputEventData", coreType: arm("human_input"), excluded: ["principal"], minted: [] },
|
|
29
|
+
task_notification: {
|
|
30
|
+
projector: "taskNotificationEventData",
|
|
31
|
+
coreType: `TaskNotificationPayload & ${arm("task_notification")}`,
|
|
32
|
+
excluded: ["peer", "crossSessionMessage", "crossSessionNotice"],
|
|
33
|
+
unwrapped: ["notification"],
|
|
34
|
+
minted: ["injected"],
|
|
35
|
+
},
|
|
36
|
+
wiring_manifest_tenant: {
|
|
37
|
+
projector: "wiringManifestEventData",
|
|
38
|
+
coreType: `WiringManifest & ${arm("wiring_manifest")}`,
|
|
39
|
+
excluded: ["governance", "configFingerprint", "autoConsolidation", "readDeny"],
|
|
40
|
+
unwrapped: ["manifest"],
|
|
41
|
+
minted: [],
|
|
42
|
+
},
|
|
43
|
+
wiring_manifest_operator: {
|
|
44
|
+
projector: "wiringManifestOperatorEventData",
|
|
45
|
+
coreType: `WiringManifest & ${arm("wiring_manifest")}`,
|
|
46
|
+
excluded: [],
|
|
47
|
+
unwrapped: ["manifest"],
|
|
48
|
+
minted: [],
|
|
49
|
+
},
|
|
50
|
+
engine_notice: { projector: "engineNoticeEventData", coreType: "EngineNotice", excluded: [], minted: ["ts"] },
|
|
51
|
+
memory_import_report: { projector: "buildImportReportWire", coreType: "MemoryImportReport", excluded: [], minted: [] },
|
|
52
|
+
origin_clearance_row: {
|
|
53
|
+
projector: "buildClearanceRowWire",
|
|
54
|
+
coreType: "OriginClearanceRow",
|
|
55
|
+
excluded: ["entryText"],
|
|
56
|
+
minted: ["custodyBytes"],
|
|
57
|
+
mintedConditional: ["originUnknownKeys"],
|
|
58
|
+
},
|
|
59
|
+
origin_clearance_origin: { projector: "buildClearanceRowWire", coreType: "MemoryEntryOrigin", excluded: [], minted: [] },
|
|
60
|
+
origin_clearance_event: { projector: "buildClearanceRowWire", coreType: "OriginClearanceEvent", excluded: [], minted: [] },
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=wire-projection-faces.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/server",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.93.0",
|
|
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",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"build:binary:run-local:darwin-arm64": "bun build --compile --target=bun-darwin-arm64 src/run-local.ts --outfile dist/run-local-darwin-arm64"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@sema-agent/core": "7.
|
|
62
|
+
"@sema-agent/core": "7.26.0",
|
|
63
63
|
"@sema-agent/settings-schema": "3.0.0",
|
|
64
64
|
"e2b": "^2.28.0",
|
|
65
65
|
"libsodium-wrappers": "^0.8.4",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"sharp": "^0.35.3"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@sema-agent/sdk": "
|
|
77
|
+
"@sema-agent/sdk": "11.2.0",
|
|
78
78
|
"@types/libsodium-wrappers": "^0.7.14",
|
|
79
79
|
"@types/node": "22.10.2",
|
|
80
80
|
"@types/pg": "^8.20.0",
|