@sema-agent/server 7.143.0 → 7.144.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/MIGRATION.md +166 -0
- package/USAGE.md +24 -14
- package/dist/approval-card.d.ts +31 -14
- package/dist/approval-card.js +8 -8
- package/dist/boot/execution-env.js +1 -1
- package/dist/boot/runner-deps.d.ts +10 -5
- package/dist/boot/runner-deps.js +5 -4
- package/dist/boot/shutdown.d.ts +1 -1
- package/dist/boot/shutdown.js +4 -2
- package/dist/boot/stage-01-config.js +2 -0
- package/dist/boot/stage-07-capability-layer.js +1 -1
- package/dist/boot/stage-10-http-server.js +2 -7
- package/dist/capabilities/scenarios.d.ts +14 -18
- package/dist/capabilities/scenarios.js +1 -2
- package/dist/config-d-migration.d.ts +2 -0
- package/dist/delegated-session-owner.d.ts +33 -151
- package/dist/delegated-session-owner.js +1 -83
- package/dist/entry-mode-clamp-notice.d.ts +1 -1
- package/dist/execution-placement.d.ts +7 -4
- package/dist/hooks/classic-stations.d.ts +3 -1
- package/dist/hooks/classic-stations.js +2 -0
- package/dist/http/principal-gate.d.ts +1 -1
- package/dist/http/refusal-body.d.ts +7 -3
- package/dist/http/refusal-body.js +1 -0
- package/dist/http/resume-legs.js +11 -4
- package/dist/http/routes/approvals-assistant.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lane-home-probe.d.ts +15 -0
- package/dist/lane-home-probe.js +4 -0
- package/dist/observability/corrupt-read-seat.d.ts +5 -9
- package/dist/observability/corrupt-read-seat.js +1 -2
- package/dist/observability/fail-open.d.ts +12 -8
- package/dist/observability/fail-open.js +12 -8
- package/dist/observability/run-terminal.d.ts +1 -1
- package/dist/observability/run-terminal.js +2 -2
- package/dist/parked-revive-surface.d.ts +6 -7
- package/dist/peer-inbound-face.d.ts +29 -34
- package/dist/peer-inbound-face.js +28 -63
- package/dist/plugins/caching-session-store.d.ts +0 -3
- package/dist/plugins/caching-session-store.js +0 -3
- package/dist/plugins/checkpoint-store-sql.d.ts +41 -34
- package/dist/plugins/checkpoint-store-sql.js +99 -38
- package/dist/plugins/fork-routing-session-store.d.ts +8 -1
- package/dist/plugins/fork-routing-session-store.js +6 -0
- package/dist/plugins/local-checkpoint-store.d.ts +6 -8
- package/dist/plugins/local-checkpoint-store.js +3 -2
- package/dist/plugins/local-session-store.d.ts +64 -29
- package/dist/plugins/local-session-store.js +126 -56
- package/dist/plugins/local-session-window.d.ts +4 -2
- package/dist/plugins/one-time-migrations.d.ts +12 -12
- package/dist/plugins/one-time-migrations.js +12 -12
- package/dist/plugins/pg-session-storage.d.ts +1 -9
- package/dist/plugins/pg-session-storage.js +2 -19
- package/dist/plugins/remote-env-host.d.ts +8 -4
- package/dist/plugins/remote-env-host.js +7 -9
- package/dist/plugins/remote-shell.js +12 -2
- package/dist/plugins/schema-consistency.d.ts +5 -1
- package/dist/plugins/session-fork.d.ts +1 -1
- package/dist/plugins/session-ownership.d.ts +9 -0
- package/dist/plugins/session-ownership.js +6 -0
- package/dist/plugins/session-store.d.ts +13 -16
- package/dist/plugins/session-store.js +9 -10
- package/dist/plugins/sql-json-column.d.ts +24 -2
- package/dist/plugins/sql-json-column.js +38 -3
- package/dist/plugins/store-backend.js +3 -2
- package/dist/plugins/tidb-session-store.d.ts +2 -14
- package/dist/plugins/tidb-session-store.js +2 -20
- package/dist/run-local.js +2 -1
- package/dist/runs.js +4 -0
- package/dist/security.d.ts +0 -4
- package/dist/session-error-wire.d.ts +24 -25
- package/dist/session-error-wire.js +4 -5
- package/dist/session-incarnation.d.ts +2 -2
- package/dist/session-notify-door.d.ts +2 -2
- package/dist/session-notify-door.js +5 -1
- package/dist/tool-approval.d.ts +3 -1
- package/dist/tool-approval.js +47 -18
- package/dist/trace/core-keyset-guard.d.ts +1 -1
- package/dist/trace/engine-notice-wire.d.ts +1 -1
- package/dist/trace/engine-notice-wire.js +1 -1
- package/dist/trace/ledger-sink.js +12 -4
- package/dist/trace/model-segment.d.ts +25 -6
- package/dist/trace/model-segment.js +47 -6
- package/dist/trace/project.d.ts +8 -2
- package/dist/trace/project.js +6 -4
- package/dist/trace/redact.d.ts +11 -0
- package/dist/trace/redact.js +19 -3
- package/dist/trace/self-minted-wire.d.ts +88 -9
- package/dist/trace/self-minted-wire.js +25 -3
- package/package.json +2 -2
- package/wire-changes/server@7.144.0.json +291 -0
- package/dist/session-records-skipped-notice.d.ts +0 -21
- package/dist/session-records-skipped-notice.js +0 -27
package/dist/trace/project.d.ts
CHANGED
|
@@ -219,15 +219,17 @@ export declare function screenedGate(v: unknown): GateOutcome | undefined;
|
|
|
219
219
|
* 不改原对象(调用方与账本共享引用):有变更时换一只信封,原记录一个字节不动。
|
|
220
220
|
*/
|
|
221
221
|
export declare function screenedStoredEventData(type: string, data: unknown): unknown;
|
|
222
|
-
/** `text_end` 段末帧的**唯一**铸点(三腿共用:top stream / 转发子代腿 / 子代 tail 面)。content =
|
|
222
|
+
/** `text_end` 段末帧的**唯一**铸点(三腿共用:top stream / 转发子代腿 / 子代 tail 面)。content = 引擎这一块的权威全文 ⇒ 与
|
|
223
223
|
* durable 面(`result` / 账本 `text` 行)同一只 {@link redactModelText}(认出才改写、抛则占位、不设上限)。
|
|
224
|
+
* `before` = 本段在这一块之前已喂入的模型文本(引擎的文字块是段的切片,段 = 账本 `text` 行的单位):这一块**接在本段前文之后**判、只交这一块那一截
|
|
225
|
+
* (锚在前一块、值在这一块 ⇒ 照样认得出);由登记册在块的交付点给出,缺省 = 这一块就是段首。
|
|
224
226
|
* 此前三处各自逐字透传 —— 同一份文本毫秒后在 `done.result.result` 上已脱,live 面却在凭据生成瞬间明文([ref])。
|
|
225
227
|
* 逐块的 `text_delta` 由 `trace/model-segment.ts` 的登记册铸(7.143.0 起经同一只脱敏器的放行窗,一段的逐块拼接 = 本帧 content);
|
|
226
228
|
* 本函数由登记册在段末调,三腿不再各自调。
|
|
227
229
|
* 坏形(content 非串/空串)⇒ null(丢帧,不铸「权威空段」:core 契约明言空段不发本帧,消费端收到空段会清掉已攒 delta)。
|
|
228
230
|
* 身份**四键**随行(live 现状带全四键,消费端可能已依赖);值经 {@link identityKey} —— 非空 string 才上 wire
|
|
229
231
|
* ([ref] 起不再逐字透传:坏形身份键会在 live 写口上铸出假游标)。 */
|
|
230
|
-
export declare function textEndEventData(ev: Record<string, unknown
|
|
232
|
+
export declare function textEndEventData(ev: Record<string, unknown>, before?: string): SegmentEndFields | null;
|
|
231
233
|
/**
|
|
232
234
|
* live 面的**身份四键**(core `TaskEventIdentity` 全集)—— 一个属主,两处共用({@link segmentEndFields}
|
|
233
235
|
* 与 sync 腿白名单 catch-all 的 `ident`;此前是两份手抄)。与 durable 面的 {@link identityFields} 的差别
|
|
@@ -985,6 +987,9 @@ export declare function wiringManifestFaceEventData(ev: {
|
|
|
985
987
|
* 路径或名字(引擎原样回声,不是解析后的落点 —— 多租户沙箱车道上它是这次 run 自己工作区里的相对 / 绝对路径串,帧上不出现任何别的租户
|
|
986
988
|
* 或宿主盘的信息),与已展示的工具实参 / `workspace_changed.cwd` 同一信任级(UNTRUSTED 的路径串)⇒ 过 `redactSecrets`。长度界由引擎定
|
|
987
989
|
* (`USER_ATTACHMENT_LABEL_MAX`),本仓不另截。非对象的成员丢、集外的成员键不投(同 `actor` 的白名单理由)。
|
|
990
|
+
* · `rewrittenBy[]`(core 7.62.0 [ref],只在腿的 prompt 屏 `prompt.submit` 改写过这条输入时在场)—— 改写它的扩展注册名,按改写序 ⇒ verbatim:
|
|
991
|
+
* 名字的形由引擎在注册入口判(`MOD_REGISTRATION_NAME`,能引号 / 括号 / 折句的名在入口拒),与会话行上同名位(`audit.ts` 的 `rewrittenBy: "verbatim"`)
|
|
992
|
+
* 同一读法。非数组不投、非串 / 空串成员丢、丢完为空不铸键(缺席 = 原样送达,不是空数组)。
|
|
988
993
|
*
|
|
989
994
|
* `actor` 逐键挑(禁 spread):core 已声明 `ActorAssertion` 是冻结三键形,但白名单的意义正是「core 加第
|
|
990
995
|
* 四键时由人处置」——身份对象上多出来的键裸上线是本文件反复登记的病族。
|
|
@@ -1001,6 +1006,7 @@ export declare function humanInputEventData(ev: {
|
|
|
1001
1006
|
principal?: unknown;
|
|
1002
1007
|
entryId?: unknown;
|
|
1003
1008
|
attachments?: unknown;
|
|
1009
|
+
rewrittenBy?: unknown;
|
|
1004
1010
|
eventId?: unknown;
|
|
1005
1011
|
parentToolCallId?: unknown;
|
|
1006
1012
|
}): FrameData<{
|
package/dist/trace/project.js
CHANGED
|
@@ -210,10 +210,10 @@ function projectSettlement(st) {
|
|
|
210
210
|
...(typeof st.note === "string" ? { note: redactSecrets(st.note).slice(0, SETTLEMENT_NOTE_MAX) } : {}),
|
|
211
211
|
};
|
|
212
212
|
}
|
|
213
|
-
export function textEndEventData(ev) {
|
|
213
|
+
export function textEndEventData(ev, before = "") {
|
|
214
214
|
if (typeof ev.content !== "string" || ev.content.length === 0)
|
|
215
215
|
return null;
|
|
216
|
-
return segmentEndFields(ev.content, ev);
|
|
216
|
+
return segmentEndFields(ev.content, ev, before);
|
|
217
217
|
}
|
|
218
218
|
export function liveIdentityFields(ev) {
|
|
219
219
|
return {
|
|
@@ -223,8 +223,8 @@ export function liveIdentityFields(ev) {
|
|
|
223
223
|
...(identityKey(ev.bgAgentId) !== undefined ? { bgAgentId: identityKey(ev.bgAgentId) } : {}),
|
|
224
224
|
};
|
|
225
225
|
}
|
|
226
|
-
function segmentEndFields(content, ev) {
|
|
227
|
-
return { content: redactModelText(content), ...liveIdentityFields(ev) };
|
|
226
|
+
function segmentEndFields(content, ev, before = "") {
|
|
227
|
+
return { content: redactModelText(content, before), ...liveIdentityFields(ev) };
|
|
228
228
|
}
|
|
229
229
|
export function reasoningEndEventData(ev) {
|
|
230
230
|
if (typeof ev.content !== "string" || ev.content.trim().length === 0)
|
|
@@ -811,6 +811,7 @@ export function humanInputEventData(ev) {
|
|
|
811
811
|
...(str(m.label) !== undefined ? { label: seatText("trace-frame-text", String(m.label)) } : {}),
|
|
812
812
|
}))
|
|
813
813
|
: undefined;
|
|
814
|
+
const rewrittenBy = Array.isArray(ev.rewrittenBy) ? ev.rewrittenBy.filter((n) => str(n) !== undefined) : [];
|
|
814
815
|
const actor = {
|
|
815
816
|
...(str(a.id) !== undefined ? { id: seatText("trace-frame-text", String(a.id)) } : {}),
|
|
816
817
|
...(typeof a.hostAsserted === "boolean" ? { hostAsserted: a.hostAsserted } : {}),
|
|
@@ -826,6 +827,7 @@ export function humanInputEventData(ev) {
|
|
|
826
827
|
...(Object.keys(actor).length > 0 ? { actor } : {}),
|
|
827
828
|
...(str(ev.entryId) !== undefined ? { entryId: ev.entryId } : {}),
|
|
828
829
|
...(attachments !== undefined ? { attachments } : {}),
|
|
830
|
+
...(rewrittenBy.length > 0 ? { rewrittenBy } : {}),
|
|
829
831
|
...identityFields(ev),
|
|
830
832
|
};
|
|
831
833
|
}
|
package/dist/trace/redact.d.ts
CHANGED
|
@@ -170,9 +170,15 @@ export declare const WHOLE_EXTENT: RedactionExtent;
|
|
|
170
170
|
* 不存在逐趟只前进几个码元的爬行(4095 个可见 + 4000 个控制字符曾因此平方,K=4000 约 0.2–0.3 s)。判据与读法格同源(同一批切除点收集器,零第二份「什么算不可见」)。
|
|
171
171
|
*/
|
|
172
172
|
export declare function readingHeadEnd(text: string, layout: RedactionLayout, units: number, from?: number): number;
|
|
173
|
+
/**
|
|
174
|
+
* `opts.before` = 这段文本的**前文**(同一段里先到、已经交出去的那一截):判定在 `before + text` 上做(前文里的锚照样认得出后文的值),交出的只是 `text` 那一截的读法 ——
|
|
175
|
+
* 与整段读法逐字节同一份,除了一条起头在前文里、止点在 `text` 里的跨度(它的原文字节一个不出,整枚换记号,与流式口 {@link renderRange} 同一条渲染律)。
|
|
176
|
+
* 命中只计止点在前文之后的跨度(前文那一截上一次已计)。读者:段末帧 `text_end` 的正文(引擎的一块接在本段前文之后判,`observability/run-terminal.ts` 的 `redactModelText`)。
|
|
177
|
+
*/
|
|
173
178
|
export declare function redactSecrets(text: string, opts?: {
|
|
174
179
|
observe?: boolean;
|
|
175
180
|
json?: boolean;
|
|
181
|
+
before?: string;
|
|
176
182
|
}): string;
|
|
177
183
|
/**
|
|
178
184
|
* 脱敏 + **这一遍命中了哪些档位的臂**({@link RedactionArm} 闭集两词)—— 与 {@link redactSecrets} 同一只
|
|
@@ -254,6 +260,9 @@ export declare function pendingTailReachForTest(): ReadonlyArray<{
|
|
|
254
260
|
* · **喂入**({@link RedactionStream.feed}):原文追加进本段;
|
|
255
261
|
* · **取已判定前缀**({@link RedactionStream.takeSettled}):从上次取到的位置起,已判定的那一截的脱敏读法 —— head 读法,出门区终点 = 末尾 {@link PENDING_TAIL_UNITS}
|
|
256
262
|
* 个读法单元之前;切点再退到横跨它的那一条跨度的起点(一枚可能还在长、或判定在更远处的凭据整条不出)与码点边界。按重扫节律({@link streamRescanStep})才真扫;
|
|
263
|
+
* · **交付点**({@link RedactionStream.takeAll}):已喂入的字节全部交出 —— 整段读法、文本到此为止(引擎关了一个文字块:那一块现在就要交付,不等后文);流不结束,
|
|
264
|
+
* 之后喂入的字节仍在整段上下文里判(前文的锚认得出后文的值)。一条凭据形恰横跨交付点 ⇒ 交付时那一截按到此为止判(读得出的半形出记号),之后横跨的那一条整枚换记号、
|
|
265
|
+
* 冲刷时的核对对不上(`diverged`,一段计一次)—— 判定读不到交付点之后的字节,这是交付点的定义,不是第二套规则;
|
|
257
266
|
* · **收尾冲刷**({@link RedactionStream.flush}):整段读法交出其余字节,并核对已取出的字节在整段读法下是不是同一份。
|
|
258
267
|
* 律:各次取出依次拼接 + 冲刷 = 整段读法(`redactSecrets(全段)`)逐字节 —— 只喂一次再冲刷就是整段口本身。前提是 {@link PENDING_TAIL_UNITS} 读对了每条臂的判定距离;
|
|
259
268
|
* 读错的那一形在冲刷时现形(`diverged`),调用方响亮留痕。
|
|
@@ -265,6 +274,8 @@ export interface RedactionStream {
|
|
|
265
274
|
feed(chunk: string): void;
|
|
266
275
|
/** 取已判定前缀(可为 `""`)。 */
|
|
267
276
|
takeSettled(): string;
|
|
277
|
+
/** 交付点:已喂入、还没交出的字节全部按整段读法(文本到此为止)交出(可为 `""`);流不结束、不核对(核对在冲刷,一段一次)。 */
|
|
278
|
+
takeAll(): string;
|
|
268
279
|
/** 收尾冲刷:其余字节的整段读法 + 已取出的字节与整段读法对不对得上。冲刷之后本流不再用。 */
|
|
269
280
|
flush(): {
|
|
270
281
|
readonly rest: string;
|
package/dist/trace/redact.js
CHANGED
|
@@ -4094,7 +4094,7 @@ export function readingHeadEnd(text, layout, units, from = 0) {
|
|
|
4094
4094
|
}
|
|
4095
4095
|
return text.length;
|
|
4096
4096
|
}
|
|
4097
|
-
function runRedaction(text, observe, json, wantHits, scope, layout, extent) {
|
|
4097
|
+
function runRedaction(text, observe, json, wantHits, scope, layout, extent, observeFrom = 0) {
|
|
4098
4098
|
const wantCount = wantHits || (onRedaction !== undefined && observe);
|
|
4099
4099
|
const eat = observe ? { from: -1, len: 0, capFrom: -1, capLen: 0 } : undefined;
|
|
4100
4100
|
let spans = [];
|
|
@@ -4140,7 +4140,7 @@ function runRedaction(text, observe, json, wantHits, scope, layout, extent) {
|
|
|
4140
4140
|
if (eat !== undefined && eat.capFrom >= 0)
|
|
4141
4141
|
recordFailOpen("server.redact.forensic-level-cap", `from=${eat.capFrom} len=${eat.capLen}`);
|
|
4142
4142
|
if (observe)
|
|
4143
|
-
reportHits(hits);
|
|
4143
|
+
reportHits(observeFrom === 0 ? hits : hitsOfSpans(spans.filter((sp) => sp.end > observeFrom)));
|
|
4144
4144
|
return { text: applySpans(text, spans).out, hits, spans };
|
|
4145
4145
|
}
|
|
4146
4146
|
function hitsOfSpans(spans) {
|
|
@@ -4175,7 +4175,12 @@ function createViewToOriginal(layers) {
|
|
|
4175
4175
|
};
|
|
4176
4176
|
}
|
|
4177
4177
|
export function redactSecrets(text, opts) {
|
|
4178
|
-
|
|
4178
|
+
const before = opts?.before ?? "";
|
|
4179
|
+
if (before === "")
|
|
4180
|
+
return runRedaction(text, opts?.observe ?? true, opts?.json === true, false, "free-text", "multi-line", WHOLE_EXTENT).text;
|
|
4181
|
+
const whole = before + text;
|
|
4182
|
+
const r = runRedaction(whole, opts?.observe ?? true, opts?.json === true, false, "free-text", "multi-line", WHOLE_EXTENT, before.length);
|
|
4183
|
+
return renderRange(whole, r.spans, before.length, whole.length);
|
|
4179
4184
|
}
|
|
4180
4185
|
export function redactSecretsWithArms(text, opts) {
|
|
4181
4186
|
const r = runRedaction(text, opts?.observe ?? true, opts?.json === true, true, "free-text", "multi-line", WHOLE_EXTENT);
|
|
@@ -4259,7 +4264,18 @@ function openRedactionStream(pendingTail) {
|
|
|
4259
4264
|
sent += out;
|
|
4260
4265
|
return out;
|
|
4261
4266
|
},
|
|
4267
|
+
takeAll() {
|
|
4268
|
+
if (released === buf.length)
|
|
4269
|
+
return "";
|
|
4270
|
+
const spans = runRedaction(buf, false, false, false, "free-text", "multi-line", WHOLE_EXTENT).spans;
|
|
4271
|
+
const out = renderRange(buf, spans, released, buf.length);
|
|
4272
|
+
released = scannedAt = buf.length;
|
|
4273
|
+
sent += out;
|
|
4274
|
+
return out;
|
|
4275
|
+
},
|
|
4262
4276
|
flush() {
|
|
4277
|
+
if (deliveredFrom === buf.length)
|
|
4278
|
+
return { rest: "", diverged: false };
|
|
4263
4279
|
const spans = runRedaction(buf, false, false, false, "free-text", "multi-line", WHOLE_EXTENT).spans;
|
|
4264
4280
|
const split = released > deliveredFrom && spans.some((s) => s.start < released && s.end > released);
|
|
4265
4281
|
return { rest: renderRange(buf, spans, released, buf.length), diverged: split || renderRange(buf, spans, deliveredFrom, released) !== sent };
|
|
@@ -735,17 +735,33 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
735
735
|
};
|
|
736
736
|
};
|
|
737
737
|
/**
|
|
738
|
-
* `POST /v1/side-query` 200
|
|
739
|
-
* `satisfies
|
|
740
|
-
*
|
|
738
|
+
* `POST /v1/side-query` 200 体在失败时 `errorKind` 的**整个**词闭集(机读失败种类;缺席 = 引擎没给)。词是引擎铸的闭集,本服务逐字过境(`projectSideQueryResult`),词表属主 = 引擎的 `AssistantMessage.errorKind`:
|
|
739
|
+
* `satisfies Record<…>` 穷举 —— 引擎加一个词而本表没跟 ⇒ 提货当拍 tsc 红(词逐字过境,上 wire 的那一刻就该在这里)。`since` = 这个词在本服务 wire 上出现的版本:三词随 `errorKind` 这一位
|
|
740
|
+
* 一起上(7.135.0,引擎 7.55.0);`image_unprocessable` 7.138.0(引擎 7.59.0);`tool_schema_refused` 7.143.0(引擎 7.61.0 —— 当版漏登,7.144.0 补登:本表此前是只登本版新词的 `Partial`,引擎加词不红)。
|
|
741
741
|
*/
|
|
742
742
|
readonly sideQueryErrorKind: {
|
|
743
743
|
readonly at: "POST /v1/side-query 200 体 errorKind 的值(失败时在场;引擎的词逐字过境)";
|
|
744
744
|
readonly members: {
|
|
745
|
+
input_too_long: {
|
|
746
|
+
attr: string;
|
|
747
|
+
since: string;
|
|
748
|
+
};
|
|
749
|
+
length_empty: {
|
|
750
|
+
attr: string;
|
|
751
|
+
since: string;
|
|
752
|
+
};
|
|
753
|
+
degenerate: {
|
|
754
|
+
attr: string;
|
|
755
|
+
since: string;
|
|
756
|
+
};
|
|
745
757
|
image_unprocessable: {
|
|
746
758
|
attr: string;
|
|
747
759
|
since: string;
|
|
748
760
|
};
|
|
761
|
+
tool_schema_refused: {
|
|
762
|
+
attr: string;
|
|
763
|
+
since: string;
|
|
764
|
+
};
|
|
749
765
|
};
|
|
750
766
|
};
|
|
751
767
|
/** MCP 授权记录 `authorization`(只投闭集词 `reason`,与 `errorCode:"unauthorized"` 同行)出现的三张面;投影只有 `mcp-authorization-face.ts` 的 `projectMcpAuthorization` 一只,三面同读。 */
|
|
@@ -1309,6 +1325,20 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
1309
1325
|
};
|
|
1310
1326
|
};
|
|
1311
1327
|
};
|
|
1328
|
+
/**
|
|
1329
|
+
* 运维队列行与订阅流 `pending` 帧(停驻门族)上的 `rowVerdict`(7.144.0;core 7.62.0 [ref]):这一行**本引擎续不续得了** —— core 判官 `judgeCheckpointRow` 对这一行字节的判决,
|
|
1330
|
+
* 与助手收件箱行的同名位、续跑第一级的拒同一个读者、同一答(逐字投,本服务不重算)。`satisfies Record<Extract<keyof PendingCheckpoint, "rowVerdict">, …>`:行形改名 / 删键而本表没跟 ⇒ tsc 红。
|
|
1331
|
+
* 在场律 `present-iff`:LOCAL 后端恒在;SQL 后端在「整行解不出」(计数)、「两次读之间行离开待决」或「两次读之间行的字节变了」时缺席 —— 缺席不是 `ok`。
|
|
1332
|
+
*/
|
|
1333
|
+
readonly approvalQueueRowVerdict: {
|
|
1334
|
+
readonly at: "GET /v1/approvals pending[] 行 · GET /v1/approvals/stream pending 帧(停驻门族)的 rowVerdict";
|
|
1335
|
+
readonly members: {
|
|
1336
|
+
rowVerdict: {
|
|
1337
|
+
attr: string;
|
|
1338
|
+
since: string;
|
|
1339
|
+
};
|
|
1340
|
+
};
|
|
1341
|
+
};
|
|
1312
1342
|
/**
|
|
1313
1343
|
* 运维审批队列 `pending[]` 的**行族闭集**(7.143.0):每一行 / 每一帧(`pending` 与 `resolved`)恒带 `kind`,消费方先按它分支。
|
|
1314
1344
|
* `satisfies Record<ApprovalQueueKind, …>`(闭集属主 = `approval-queue-kind.ts` 的 `APPROVAL_QUEUE_KINDS`;加一族而本表没跟 ⇒ tsc 红)。
|
|
@@ -1365,6 +1395,10 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
1365
1395
|
attr: string;
|
|
1366
1396
|
since: string;
|
|
1367
1397
|
};
|
|
1398
|
+
deadline: {
|
|
1399
|
+
attr: string;
|
|
1400
|
+
since: string;
|
|
1401
|
+
};
|
|
1368
1402
|
fromSession: {
|
|
1369
1403
|
attr: string;
|
|
1370
1404
|
since: string;
|
|
@@ -1442,6 +1476,21 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
1442
1476
|
};
|
|
1443
1477
|
};
|
|
1444
1478
|
};
|
|
1479
|
+
/**
|
|
1480
|
+
* 续跑拒体上引擎 7.62.0 新位 `detail.thrownName` 的过境键(7.144.0):引擎的行判官读不出一行(被读的成员读时抛 / 容器不是容器)⇒ 认领前拒 `reason: requirements_damaged`,
|
|
1481
|
+
* `thrownName` 点名读它时被抛出的东西的名字(引擎侧有界、不带 message)—— 在场 = 引擎缺陷,缺席 = 行的内容对不上它自述的(数据损坏),运维凭这一位分诊。
|
|
1482
|
+
* 唯一读法 = `http/refusal-body.ts` 的 `resumeRefusalFacts`(同步腿的 `checkpointRefusalAnswer` 与后台停驻 422 体读同一只;回执今天不带这一位 ⇒ 422 腿恒缺席)。
|
|
1483
|
+
* 拒体没有可 `satisfies` 的全集型,行为由对应 CHANGELOG 条的钉证(`test/durable-resume-http.test.ts`)。在场律 `present-iff`:引擎给了非空串才铸键。
|
|
1484
|
+
*/
|
|
1485
|
+
readonly requirementsDamagedBodyKey: {
|
|
1486
|
+
readonly at: "409 续跑拒体(引擎 reason requirements_damaged;<键> → 在场律)";
|
|
1487
|
+
readonly members: {
|
|
1488
|
+
readonly thrownName: {
|
|
1489
|
+
readonly attr: "present-iff the engine named what its row judge saw thrown (non-empty string)";
|
|
1490
|
+
readonly since: "7.144.0";
|
|
1491
|
+
};
|
|
1492
|
+
};
|
|
1493
|
+
};
|
|
1445
1494
|
/**
|
|
1446
1495
|
* 在飞 run 的权限模式切档口 `POST /v1/runs/:id/permission-mode`(本版新端点)200 体的键集(<键> → 在场律)。
|
|
1447
1496
|
* `satisfies Record<keyof PermissionModeVerbReply, …>`(体形属主 = `http/routes/run-permission-mode.ts`,路由按这只型铸体;键加一个而本表没跟 ⇒ tsc 红)。
|
|
@@ -1568,9 +1617,17 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
1568
1617
|
readonly attr: 500;
|
|
1569
1618
|
readonly since: "7.136.0";
|
|
1570
1619
|
};
|
|
1571
|
-
readonly "POST /v1/tasks#
|
|
1620
|
+
readonly "POST /v1/tasks#stored_log_unwalkable(\u540C\u6B65\u817F;\u5DF2\u5B58\u65E5\u5FD7\u8D70\u4E0D\u6210\u4E00\u68F5\u6811\u800C\u56DE\u653E\u6CA1\u4E22\u8BB0\u5F55:\u60AC\u7A7A\u7236 / \u81EA\u6307 / \u6210\u73AF / \u53F6\u5B50\u7F3A\u5E2D;\u96F6\u5DE5\u4F5C\u7684\u62D2;\u4F53 corrupt_session)": {
|
|
1572
1621
|
readonly attr: 500;
|
|
1573
|
-
readonly since: "7.
|
|
1622
|
+
readonly since: "7.144.0";
|
|
1623
|
+
};
|
|
1624
|
+
readonly "POST /v1/tasks#stored_log_rerooted(\u540C\u6B65\u817F;\u56DE\u653E\u4E22\u4E86\u8BB0\u5F55\u800C\u5206\u652F\u5728\u65AD\u70B9\u65AD\u5F00 \u21D2 run \u4ECE\u65AD\u70B9\u7EED\u4E0A)": {
|
|
1625
|
+
readonly attr: 200;
|
|
1626
|
+
readonly since: "7.144.0";
|
|
1627
|
+
};
|
|
1628
|
+
readonly "POST /v1/tasks#env_home_unconfirmed(\u540C\u6B65\u817F;host \u8F66\u9053\u6267\u884C\u73AF\u5883\u7684\u5BB6\u76EE\u5F55\u4E3B\u5F20\u8BC1\u4E0D\u4E86,\u5DE5\u5382\u5728\u94F8\u73AF\u5883\u4E4B\u524D\u62D2;\u96F6\u5DE5\u4F5C\u7684\u62D2;\u4F53 env.home_unconfirmed + \u5224\u5B98\u7684\u62D2\u53E5)": {
|
|
1629
|
+
readonly attr: 409;
|
|
1630
|
+
readonly since: "7.144.0";
|
|
1574
1631
|
};
|
|
1575
1632
|
readonly "POST /v1/sessions/:id/sync/import#identical_repush_blob_missing(\u4F53 missing_blob)": {
|
|
1576
1633
|
readonly attr: 422;
|
|
@@ -1588,13 +1645,13 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
1588
1645
|
readonly attr: 400;
|
|
1589
1646
|
readonly since: "7.141.0";
|
|
1590
1647
|
};
|
|
1591
|
-
readonly "POST /v1/sessions/:id/fork#stamped_archive(DB_BACKEND=local;\u6E90\u5B58\u6863\u4ECD\u5E26\u66F4\u65E9\u7248\u672C\u5199\u4E0B\u7684\u5C5E\u4E3B\u6233;\u96F6\u5199;\u4F53 conflict + \u5E26\u6233\u5B58\u6863\u7684\u56FA\u5B9A\u53E5)": {
|
|
1648
|
+
readonly "POST /v1/sessions/:id/fork#stamped_archive(DB_BACKEND=local;\u6E90\u5B58\u6863\u4ECD\u5E26\u66F4\u65E9\u7248\u672C\u5199\u4E0B\u7684\u5C5E\u4E3B\u6233;\u96F6\u5199;\u4F53 conflict.session_archive_stamped + \u5E26\u6233\u5B58\u6863\u7684\u56FA\u5B9A\u53E5)": {
|
|
1592
1649
|
readonly attr: 409;
|
|
1593
|
-
readonly since: "7.
|
|
1650
|
+
readonly since: "7.144.0";
|
|
1594
1651
|
};
|
|
1595
|
-
readonly "POST /v1/sessions/:id/sync/import/:stagingId/entries#stamped_archive(DB_BACKEND=local;\u63D0\u4EA4\u843D\u5728\u4ECD\u5E26\u5C5E\u4E3B\u6233\u7684\u5B58\u6863\u4E0A;\u884C\u51C0\u96F6\u5199;\u4F53 conflict + \u5E26\u6233\u5B58\u6863\u7684\u56FA\u5B9A\u53E5)": {
|
|
1652
|
+
readonly "POST /v1/sessions/:id/sync/import/:stagingId/entries#stamped_archive(DB_BACKEND=local;\u63D0\u4EA4\u843D\u5728\u4ECD\u5E26\u5C5E\u4E3B\u6233\u7684\u5B58\u6863\u4E0A,\u6539\u65E5\u5FD7\u7684\u5404\u5F62\u63A8\u9001\u540C\u7B54;\u884C\u51C0\u96F6\u5199;\u4F53 conflict.session_archive_stamped + \u5E26\u6233\u5B58\u6863\u7684\u56FA\u5B9A\u53E5)": {
|
|
1596
1653
|
readonly attr: 409;
|
|
1597
|
-
readonly since: "7.
|
|
1654
|
+
readonly since: "7.144.0";
|
|
1598
1655
|
};
|
|
1599
1656
|
readonly "POST /v1/tasks|/v1/tasks/stream|/v1/runs#images_url_credential(\u65B0\u63D0\u4EA4;\u4F53 request.field_invalid + field images[i].url + reason url_userinfo|url_credential_param)": {
|
|
1600
1657
|
readonly attr: 400;
|
|
@@ -2711,6 +2768,28 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
2711
2768
|
readonly attr: "whole-segment-for-late-subscriber";
|
|
2712
2769
|
readonly since: "7.143.0";
|
|
2713
2770
|
};
|
|
2771
|
+
/**
|
|
2772
|
+
* 7.144.0:文字段的状态边界只有一条 —— 段(段界谓词 + 腿终局 / 子代终态),与账本 `text` 行同一个单位;引擎的 `text_end` 关的是文字块,是这一块的交付点、不再收段
|
|
2773
|
+
* (`trace/model-segment.ts` 的 `text_end` 分支经流式口的交付口 `takeAll` 放出这一块余下的字节,段的流接着喂下一块;分歧核对只在段收时一次)。
|
|
2774
|
+
* 锚在一块、值在下一块 ⇒ 下一块的 `text_delta` 照样遮;块界上按到此为止的判定与整段判定不同(一个凭据形横跨块界:读得出的半形出遮记号、读不出的前缀半截原样出门;
|
|
2775
|
+
* 或交付时认作凭据、后文让它不再是:活流那一截是记号)⇒ 活流按到此为止、账本整段判、计数 `server.live-text.hold-diverged` 恰 +1。此前文字段在每个 `text_end` 上收掉重开。
|
|
2776
|
+
* 钉 test/live-model-text-redact.test.ts「文字脱敏单位 = 段」组。
|
|
2777
|
+
*/
|
|
2778
|
+
readonly "SSE text_delta#delta(\u6587\u5B57\u6BB5\u7684\u72B6\u6001\u8DE8\u6587\u5B57\u5757)": {
|
|
2779
|
+
readonly attr: "segment-scoped-redactor-state;text_end=block-delivery-not-segment-close;block-end-as-ended-vs-whole-differs=live-as-ended+ledger-whole+hold-diverged+1";
|
|
2780
|
+
readonly since: "7.144.0";
|
|
2781
|
+
};
|
|
2782
|
+
/** 7.144.0:`text_end.content` 仍是引擎给的那一块正文(引擎修剪过的照样),接在同段已交付的前缀之后判 ⇒ 值在本块、锚在前一块照样遮;此前孤立地过脱敏器。钉同上。 */
|
|
2783
|
+
readonly "SSE text_end#content(\u63A5\u5728\u540C\u6BB5\u524D\u7F00\u4E4B\u540E\u5224)": {
|
|
2784
|
+
readonly attr: "engine-block-content;judged-after-segment-prefix";
|
|
2785
|
+
readonly since: "7.144.0";
|
|
2786
|
+
};
|
|
2787
|
+
/** 7.144.0:账本 `text` 行的正文 = 段内各块原文依次拼接,块原文唯一定义 = `trace/model-segment.ts` 的 `blockText`(有 delta 字节 ⇒ 那些字节;一个都没有、只有 `text_end` 的块 ⇒ 它的正文),
|
|
2788
|
+
* ledger 写口与续跑腿同读;此前两条账本腿只拼 delta 字节,只有 `text_end` 的块不在行里。钉 test/live-model-text-redact.test.ts、test/durable-resume-http.test.ts「修复轮 ⑤」。 */
|
|
2789
|
+
readonly "GET /v1/runs/:id/events#text.text(\u6BB5\u6587\u672C\u542B\u53EA\u6709 text_end \u7684\u5757)": {
|
|
2790
|
+
readonly attr: "segment-text=block-texts-concat;end-only-block=text_end.content";
|
|
2791
|
+
readonly since: "7.144.0";
|
|
2792
|
+
};
|
|
2714
2793
|
};
|
|
2715
2794
|
};
|
|
2716
2795
|
};
|
|
@@ -281,7 +281,11 @@ export const SELF_MINTED_WIRE = {
|
|
|
281
281
|
sideQueryErrorKind: {
|
|
282
282
|
at: "POST /v1/side-query 200 体 errorKind 的值(失败时在场;引擎的词逐字过境)",
|
|
283
283
|
members: {
|
|
284
|
+
input_too_long: { attr: "-", since: "7.135.0" },
|
|
285
|
+
length_empty: { attr: "-", since: "7.135.0" },
|
|
286
|
+
degenerate: { attr: "-", since: "7.135.0" },
|
|
284
287
|
image_unprocessable: { attr: "-", since: "7.138.0" },
|
|
288
|
+
tool_schema_refused: { attr: "-", since: "7.143.0" },
|
|
285
289
|
},
|
|
286
290
|
},
|
|
287
291
|
mcpAuthorizationKey: {
|
|
@@ -481,6 +485,12 @@ export const SELF_MINTED_WIRE = {
|
|
|
481
485
|
classifierNoRuling: { attr: "present-iff", since: "7.136.0" },
|
|
482
486
|
},
|
|
483
487
|
},
|
|
488
|
+
approvalQueueRowVerdict: {
|
|
489
|
+
at: "GET /v1/approvals pending[] 行 · GET /v1/approvals/stream pending 帧(停驻门族)的 rowVerdict",
|
|
490
|
+
members: {
|
|
491
|
+
rowVerdict: { attr: "present-iff the row's stored bytes were judged on this listing", since: "7.144.0" },
|
|
492
|
+
},
|
|
493
|
+
},
|
|
484
494
|
approvalQueueKind: {
|
|
485
495
|
at: "GET /v1/approvals pending[].kind · GET /v1/approvals/stream pending / resolved 帧的 kind(恒带)",
|
|
486
496
|
members: {
|
|
@@ -499,6 +509,7 @@ export const SELF_MINTED_WIRE = {
|
|
|
499
509
|
content: { attr: "always", since: "7.143.0" },
|
|
500
510
|
sentAt: { attr: "always", since: "7.143.0" },
|
|
501
511
|
heldAt: { attr: "always", since: "7.143.0" },
|
|
512
|
+
deadline: { attr: "present-iff", since: "7.144.0" },
|
|
502
513
|
fromSession: { attr: "present-iff", since: "7.143.0" },
|
|
503
514
|
fromName: { attr: "present-iff", since: "7.143.0" },
|
|
504
515
|
fromScope: { attr: "present-iff", since: "7.143.0" },
|
|
@@ -532,6 +543,12 @@ export const SELF_MINTED_WIRE = {
|
|
|
532
543
|
acceptableForm: { attr: "present-iff", since: "7.137.0" },
|
|
533
544
|
},
|
|
534
545
|
},
|
|
546
|
+
requirementsDamagedBodyKey: {
|
|
547
|
+
at: "409 续跑拒体(引擎 reason requirements_damaged;<键> → 在场律)",
|
|
548
|
+
members: {
|
|
549
|
+
thrownName: { attr: "present-iff the engine named what its row judge saw thrown (non-empty string)", since: "7.144.0" },
|
|
550
|
+
},
|
|
551
|
+
},
|
|
535
552
|
permissionModeVerbBodyKey: {
|
|
536
553
|
at: "POST /v1/runs/:id/permission-mode 200 体(<键> → 在场律)",
|
|
537
554
|
members: {
|
|
@@ -574,13 +591,15 @@ export const SELF_MINTED_WIRE = {
|
|
|
574
591
|
"GET /v1/sessions/:id/sync/history/blobs/:hash#store_deployment_fault(体同上)": { attr: 503, since: "7.137.0" },
|
|
575
592
|
"GET /v1/sessions/:id/events#corrupt_archive(DB_BACKEND=local;开流之前;体 corrupt_session)": { attr: 500, since: "7.136.0" },
|
|
576
593
|
"PATCH /v1/sessions/:id#corrupt_archive(DB_BACKEND=local;体 corrupt_session)": { attr: 500, since: "7.136.0" },
|
|
577
|
-
"POST /v1/tasks#
|
|
594
|
+
"POST /v1/tasks#stored_log_unwalkable(同步腿;已存日志走不成一棵树而回放没丢记录:悬空父 / 自指 / 成环 / 叶子缺席;零工作的拒;体 corrupt_session)": { attr: 500, since: "7.144.0" },
|
|
595
|
+
"POST /v1/tasks#stored_log_rerooted(同步腿;回放丢了记录而分支在断点断开 ⇒ run 从断点续上)": { attr: 200, since: "7.144.0" },
|
|
596
|
+
"POST /v1/tasks#env_home_unconfirmed(同步腿;host 车道执行环境的家目录主张证不了,工厂在铸环境之前拒;零工作的拒;体 env.home_unconfirmed + 判官的拒句)": { attr: 409, since: "7.144.0" },
|
|
578
597
|
"POST /v1/sessions/:id/sync/import#identical_repush_blob_missing(体 missing_blob)": { attr: 422, since: "7.136.0" },
|
|
579
598
|
"PATCH /v1/sessions/:id#title_no_visible_character(体 request.field_invalid)": { attr: 400, since: "7.136.0" },
|
|
580
599
|
"POST /v1/sessions/:id/sync/import#title_no_visible_character(Phase A 体的 title;体 request.field_invalid)": { attr: 400, since: "7.136.0" },
|
|
581
600
|
"POST /v1/sessions/:id/sync/import#anchor_outside_declared_entries(Phase A 体的 anchors[i]:entryId 不在 entryIds 里 / 元素不是带串型 eventId 与 entryId 的对象;体 request.field_invalid)": { attr: 400, since: "7.141.0" },
|
|
582
|
-
"POST /v1/sessions/:id/fork#stamped_archive(DB_BACKEND=local;源存档仍带更早版本写下的属主戳;零写;体 conflict + 带戳存档的固定句)": { attr: 409, since: "7.
|
|
583
|
-
"POST /v1/sessions/:id/sync/import/:stagingId/entries#stamped_archive(DB_BACKEND=local
|
|
601
|
+
"POST /v1/sessions/:id/fork#stamped_archive(DB_BACKEND=local;源存档仍带更早版本写下的属主戳;零写;体 conflict.session_archive_stamped + 带戳存档的固定句)": { attr: 409, since: "7.144.0" },
|
|
602
|
+
"POST /v1/sessions/:id/sync/import/:stagingId/entries#stamped_archive(DB_BACKEND=local;提交落在仍带属主戳的存档上,改日志的各形推送同答;行净零写;体 conflict.session_archive_stamped + 带戳存档的固定句)": { attr: 409, since: "7.144.0" },
|
|
584
603
|
"POST /v1/tasks|/v1/tasks/stream|/v1/runs#images_url_credential(新提交;体 request.field_invalid + field images[i].url + reason url_userinfo|url_credential_param)": { attr: 400, since: "7.136.0" },
|
|
585
604
|
"POST /v1/tasks|/v1/tasks/stream|/v1/runs#a2aPeers_malformed(新提交;列表不是数组 / 条目不是对象 / 键值判不出形;体 request.field_invalid)": { attr: 400, since: "7.136.0" },
|
|
586
605
|
"POST /v1/tasks|/v1/tasks/stream|/v1/runs#a2aPeers_unknown_key(新提交;词表外的键;体 request.body_shape + unknownKeys)": { attr: 400, since: "7.136.0" },
|
|
@@ -904,6 +923,9 @@ export const SELF_MINTED_WIRE = {
|
|
|
904
923
|
"SSE text_delta#delta": { attr: "live-hold:same-redactor-stream(pending-tail-from-arm-table);concat=segment-end-content;remainder-frame-without-eventId", since: "7.143.0" },
|
|
905
924
|
"SSE reasoning_delta#delta": { attr: "live-hold:same-redactor-stream(pending-tail-from-arm-table);concat=segment-end-content;remainder-frame-without-eventId", since: "7.143.0" },
|
|
906
925
|
"GET /v1/runs/:id/subagents/:handle/stream#reasoning_end.content": { attr: "whole-segment-for-late-subscriber", since: "7.143.0" },
|
|
926
|
+
"SSE text_delta#delta(文字段的状态跨文字块)": { attr: "segment-scoped-redactor-state;text_end=block-delivery-not-segment-close;block-end-as-ended-vs-whole-differs=live-as-ended+ledger-whole+hold-diverged+1", since: "7.144.0" },
|
|
927
|
+
"SSE text_end#content(接在同段前缀之后判)": { attr: "engine-block-content;judged-after-segment-prefix", since: "7.144.0" },
|
|
928
|
+
"GET /v1/runs/:id/events#text.text(段文本含只有 text_end 的块)": { attr: "segment-text=block-texts-concat;end-only-block=text_end.content", since: "7.144.0" },
|
|
907
929
|
},
|
|
908
930
|
},
|
|
909
931
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/server",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.144.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",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@modelcontextprotocol/server": "2.4.0",
|
|
73
|
-
"@sema-agent/core": "7.
|
|
73
|
+
"@sema-agent/core": "7.62.0",
|
|
74
74
|
"@sema-agent/settings-schema": "16.0.0",
|
|
75
75
|
"e2b": "^2.28.0",
|
|
76
76
|
"libsodium-wrappers": "^0.8.4",
|