@sema-agent/client-core 0.18.0 → 0.19.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 -1
- package/dist/adapt/ids.js +8 -1
- package/dist/seatContract.d.ts +8 -2
- package/dist/seatContract.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Renamed from **`@sema-agent/wire-cc-adapter`** (0.1.x, deprecated — see *Migra
|
|
|
23
23
|
|
|
24
24
|
## Scope
|
|
25
25
|
|
|
26
|
-
**Version:** 0.
|
|
26
|
+
**Version:** 0.19.0
|
|
27
27
|
|
|
28
28
|
- **Today** — the adapter seam, the whole `adapt()` pipeline (all 14 A-layer arms plus the
|
|
29
29
|
B/D/E tool-card layers), the notification/caps/model families, the adapter kernel (stream driver
|
package/dist/adapt/ids.js
CHANGED
|
@@ -11,7 +11,14 @@ export const chrome = (event) => ({ plane: 'chrome', event });
|
|
|
11
11
|
*/
|
|
12
12
|
export const transcript = (message) => ({
|
|
13
13
|
plane: 'transcript',
|
|
14
|
-
|
|
14
|
+
// 到达时戳补齐(#185-A1 正位收编,2026-08-08;此前是壳 upstreamBridge.stampTranscriptArrival
|
|
15
|
+
// 的消费端补偿,注释明记「长线正位在 client-core 的 adapt 臂」):transcript 消息不变式=恒带
|
|
16
|
+
// timestamp——CC 在 content_block_stop 取 wall-clock,而 transcript 帧正是块收尾时到达,到达
|
|
17
|
+
// 时刻本身就是同一个量。只补缺席不覆盖(wire 哪天带了就用 wire 的);壳侧补偿臂保留为双保险
|
|
18
|
+
// (its ③:不覆盖已有值 ⇒ 本补齐生效后壳臂自然零触发)。
|
|
19
|
+
message: (typeof message.timestamp === 'string'
|
|
20
|
+
? message
|
|
21
|
+
: { ...message, timestamp: new Date().toISOString() }),
|
|
15
22
|
});
|
|
16
23
|
/**
|
|
17
24
|
* [1653]:稳定键优先序 = 帧 id > seq > toolCallId,全缺才 ctx.uuid()。现役 wire 的稳定键落在
|
package/dist/seatContract.d.ts
CHANGED
|
@@ -143,6 +143,12 @@ export interface LocalSessionRecord {
|
|
|
143
143
|
uuid: string;
|
|
144
144
|
text: string;
|
|
145
145
|
}>;
|
|
146
|
+
/** [C111] B1(clay 裁「加」,2026-08-08):**快照提示位** —— `true` = 写入方(session-host)当时
|
|
147
|
+
* 确知该会话停在人门上(enterPark/reparkIfStillPending 盖戳,settleTurn 清);缺席 = **未知**
|
|
148
|
+
* (旧账本/旧端写的记录),**不是** `false` 的断言。消费端(recents/会话列表)只在 `true` 渲
|
|
149
|
+
* 「等审批」徽标,缺席/false 不渲 —— 绝不把未知渲成安全。重启恢复端必须先按引擎 approvals
|
|
150
|
+
* registry 对账再回写:盘上的 `parked` 是过去的声明,不直接当现势渲。 */
|
|
151
|
+
parked?: boolean;
|
|
146
152
|
}
|
|
147
153
|
/** design/80 D-1 的 TOCTOU 绑定**对**(REF-CC-070:此前是两个互不相干的 optional,半个 pair 照样过门)。
|
|
148
154
|
* 一位承载整对 ⇒「只有 callId 没有 inputHash」在类型层不可表达,门里也不用再补联合判据。 */
|
|
@@ -611,7 +617,7 @@ export declare const SEAT_STORE_PROPS: readonly ["sessionsStateStore", "focusedS
|
|
|
611
617
|
export declare const SEAT_EVENT_METHOD_NAMES: readonly ["onEvent", "onToolPermissionRequest"];
|
|
612
618
|
export declare const LOCAL_SESSION_EVENT_KEYS: readonly ["type", "sessionId", "message", "messages", "error", "errorCategory", "code", "request", "data", "sources", "permissionMode", "session", "userMessageUuid", "hasPreClearSession", "requestId", "outcome", "chrome"];
|
|
613
619
|
export declare const TOOL_PERMISSION_REQUEST_KEYS: readonly ["requestId", "sessionId", "toolName", "toolCallId", "input", "message", "toctouBinding", "createdAtMs"];
|
|
614
|
-
export declare const LOCAL_SESSION_RECORD_KEYS: readonly ["sessionId", "engineSessionId", "model", "title", "isRunning", "createdAt", "lastActivityAt", "queuedMessages"];
|
|
620
|
+
export declare const LOCAL_SESSION_RECORD_KEYS: readonly ["sessionId", "engineSessionId", "model", "title", "isRunning", "createdAt", "lastActivityAt", "queuedMessages", "parked"];
|
|
615
621
|
export declare const SEND_MESSAGE_REQUEST_KEYS: readonly ["sessionId", "text", "model", "userMessageUuid", "permissionMode", "attachmentIds", "reasoningEffort", "retainBackgroundProcesses", "settings"];
|
|
616
622
|
export declare const TOOL_PERMISSION_DECISION_KEYS: readonly ["sessionId", "requestId", "decision", "answer", "updatedInput", "remember"];
|
|
617
623
|
export declare const START_SESSION_OPTION_KEYS: readonly ["model", "title", "cwd", "excludeTools"];
|
|
@@ -642,7 +648,7 @@ export declare const SEAT_VALIDATOR_KEY_COVERAGE: {
|
|
|
642
648
|
readonly LocalSessionRecord: {
|
|
643
649
|
readonly guard: "isLocalSessionRecord";
|
|
644
650
|
readonly check: (s: unknown) => SeatValidation;
|
|
645
|
-
readonly validated: readonly ["sessionId", "engineSessionId", "model", "title", "isRunning", "createdAt", "lastActivityAt", "queuedMessages"];
|
|
651
|
+
readonly validated: readonly ["sessionId", "engineSessionId", "model", "title", "isRunning", "createdAt", "lastActivityAt", "queuedMessages", "parked"];
|
|
646
652
|
readonly unchecked: readonly [];
|
|
647
653
|
};
|
|
648
654
|
readonly ToolPermissionRequest: {
|
package/dist/seatContract.js
CHANGED
|
@@ -227,6 +227,9 @@ const checkLocalSessionRecord = (s) => {
|
|
|
227
227
|
if (!okQueue)
|
|
228
228
|
return bad("queuedMessages must be an array of {uuid,text}", "queuedMessages");
|
|
229
229
|
}
|
|
230
|
+
if (!isAbsent(s.parked) && typeof s.parked !== "boolean") {
|
|
231
|
+
return bad("parked must be a boolean when present", "parked");
|
|
232
|
+
}
|
|
230
233
|
return true;
|
|
231
234
|
};
|
|
232
235
|
export function isLocalSessionRecord(s) {
|
|
@@ -622,6 +625,7 @@ export const LOCAL_SESSION_RECORD_KEYS = [
|
|
|
622
625
|
"createdAt",
|
|
623
626
|
"lastActivityAt",
|
|
624
627
|
"queuedMessages",
|
|
628
|
+
"parked",
|
|
625
629
|
];
|
|
626
630
|
export const SEND_MESSAGE_REQUEST_KEYS = [
|
|
627
631
|
"sessionId",
|
|
@@ -672,7 +676,7 @@ export const SEAT_VALIDATOR_KEY_COVERAGE = {
|
|
|
672
676
|
LocalSessionRecord: {
|
|
673
677
|
guard: "isLocalSessionRecord",
|
|
674
678
|
check: checkLocalSessionRecord,
|
|
675
|
-
validated: ["sessionId", "engineSessionId", "model", "title", "isRunning", "createdAt", "lastActivityAt", "queuedMessages"],
|
|
679
|
+
validated: ["sessionId", "engineSessionId", "model", "title", "isRunning", "createdAt", "lastActivityAt", "queuedMessages", "parked"],
|
|
676
680
|
unchecked: [],
|
|
677
681
|
},
|
|
678
682
|
ToolPermissionRequest: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/client-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Client-side session runtime shared by every sema human client (TUI / web / desktop): sema wire frames (AgentEvent) -> CC session vocabulary (SDKMessage) with dual-plane output (transcript/chrome), deterministic transcript ids, lane discipline as a type, and the notification/dedup ledgers. Every CC-skin shape is collected here so the wire itself stays neutral. Blackboard [1832] design axioms; [1651]/[1652]/[1653] signed seam design. Renamed from @sema-agent/wire-cc-adapter (0.1.x).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|