@sema-agent/server 7.49.0 → 7.51.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/USAGE.md +39 -0
- package/dist/boot/device-lane.d.ts +79 -0
- package/dist/boot/device-lane.js +63 -0
- package/dist/boot/engine-lease.d.ts +95 -0
- package/dist/boot/engine-lease.js +56 -0
- package/dist/boot/execution-env.d.ts +48 -2
- package/dist/boot/execution-env.js +57 -5
- package/dist/boot/resolve-spec.d.ts +3 -0
- package/dist/boot/resolve-spec.js +12 -9
- package/dist/boot/session-faces.d.ts +5 -0
- package/dist/boot/session-faces.js +4 -1
- package/dist/boot/shutdown.d.ts +10 -0
- package/dist/boot/shutdown.js +19 -1
- package/dist/boot/stores.js +9 -0
- package/dist/config-center/types.d.ts +10 -3
- package/dist/config-invariants.d.ts +2 -2
- package/dist/config-invariants.js +18 -0
- package/dist/config-types.d.ts +32 -1
- package/dist/config.js +69 -10
- package/dist/device-enrollment.d.ts +125 -0
- package/dist/device-enrollment.js +156 -0
- package/dist/device-store.d.ts +385 -0
- package/dist/device-store.js +407 -0
- package/dist/device-ws-hub.d.ts +182 -0
- package/dist/device-ws-hub.js +1012 -0
- package/dist/device-ws-protocol.d.ts +429 -0
- package/dist/device-ws-protocol.js +464 -0
- package/dist/env-facts.d.ts +4 -1
- package/dist/env-facts.js +1 -0
- package/dist/execution-lane-caps.d.ts +152 -0
- package/dist/execution-lane-caps.js +166 -0
- package/dist/fleet/subagent-tail-bus.d.ts +1 -1
- package/dist/fleet/subagent-tail-bus.js +10 -0
- package/dist/http/routes/approvals-assistant.js +1 -1
- package/dist/http/routes/capabilities.js +7 -2
- package/dist/http/routes/sessions.js +1 -1
- package/dist/http/routes/tasks.js +12 -6
- package/dist/http/send.d.ts +14 -0
- package/dist/http/send.js +5 -0
- package/dist/http/server.d.ts +19 -0
- package/dist/http/server.js +21 -2
- package/dist/http/wire-types.d.ts +1 -1
- package/dist/leader/wire.js +4 -2
- package/dist/main.js +10 -3
- package/dist/orchestration/hardened-vm-runner.d.ts +7 -0
- package/dist/orchestration/hardened-vm-runner.js +11 -1
- package/dist/orchestration/hardened-vm-worker-runner.js +2 -2
- package/dist/plugins/device-store-sql.d.ts +130 -0
- package/dist/plugins/device-store-sql.js +574 -0
- package/dist/plugins/remote-env-device.d.ts +271 -0
- package/dist/plugins/remote-env-device.js +727 -0
- package/dist/plugins/remote-scratchpad.js +1 -1
- package/dist/plugins/store-backend.d.ts +9 -0
- package/dist/plugins/store-backend.js +3 -0
- package/dist/plugins/usage-window-store-sql.d.ts +2 -2
- package/dist/plugins/usage-window-store-sql.js +17 -6
- package/dist/task-cwd.d.ts +25 -0
- package/dist/task-cwd.js +3 -0
- package/dist/task-settings.js +3 -1
- package/dist/trace/core-keyset-guard.d.ts +3 -3
- package/dist/trace/engine-notice-wire.d.ts +1 -1
- package/dist/trace/engine-notice-wire.js +1 -0
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const REMOTE_SCRATCHPAD_LANES = new Set(["e2b", "k8s", "local-docker", "ssh"]);
|
|
1
|
+
const REMOTE_SCRATCHPAD_LANES = new Set(["e2b", "k8s", "local-docker", "ssh", "device"]);
|
|
2
2
|
export function isRemoteScratchpadLane(provider) {
|
|
3
3
|
return provider !== undefined && REMOTE_SCRATCHPAD_LANES.has(provider);
|
|
4
4
|
}
|
|
@@ -17,6 +17,7 @@ import { TiDBCheckpointStore, PgCheckpointStore } from "./checkpoint-store-sql.j
|
|
|
17
17
|
import { TiDBImageIndex, PgImageIndex } from "./image-index-sql.js";
|
|
18
18
|
import { TiDBImageBake, PgImageBake } from "./image-bake-store-sql.js";
|
|
19
19
|
import { TiDBLeaderRunStore, PgLeaderRunStore } from "./leader-run-store-sql.js";
|
|
20
|
+
import type { DeviceStore } from "../device-store.js";
|
|
20
21
|
import { TiDBBreakerState, PgBreakerState } from "./breaker-state-sql.js";
|
|
21
22
|
import { TiDBCostQuota } from "./tidb-cost-quota.js";
|
|
22
23
|
import { PgCostQuota } from "./pg-cost-quota.js";
|
|
@@ -212,6 +213,14 @@ export interface StoreBackend {
|
|
|
212
213
|
* 缺席 ⇒ endpoint 落到显式的单副本内存降级臂(见 `leader/endpoint.ts` 的 store 缺席注)。
|
|
213
214
|
*/
|
|
214
215
|
leaderRun?(): LeaderRunStore;
|
|
216
|
+
/**
|
|
217
|
+
* device lane 的四表店(device-executor-lane-v2 §6,车A-2 交店 / 车A-4 接线)。**SQL 后端专有**,
|
|
218
|
+
* `local` 刻意省略 —— 与 {@link leaderRun} 逐字同一条理由:config 层已经把「`REMOTE_EXEC=device` 且
|
|
219
|
+
* 无外部 SQL 店」整个组合拒启了(`device-durable-store` 不变量),所以 local 车道上根本不存在一个需要
|
|
220
|
+
* 这四张表的 device worker。消费点按 `backend?.device?.()` 取,缺席 ⇒ `boot/device-lane.ts` 的
|
|
221
|
+
* `assertDeviceLaneWired` 响亮拒启(**不是**静默落进程内 stub)。
|
|
222
|
+
*/
|
|
223
|
+
device?(): DeviceStore;
|
|
215
224
|
/**
|
|
216
225
|
* #270 —— 托管留存的**破坏性**三方法(core `ManagedRetentionCapability` 的 server 侧真身)。
|
|
217
226
|
* **SQL 后端专有**,`local` 刻意省略:那三条腿是跨十余张表的单事务级联,file/in-memory 形没有事务面
|
|
@@ -26,6 +26,7 @@ import { TiDBToolResultStore, PgToolResultStore } from "./tool-result-store-sql.
|
|
|
26
26
|
import { TiDBImageIndex, PgImageIndex } from "./image-index-sql.js";
|
|
27
27
|
import { TiDBImageBake, PgImageBake } from "./image-bake-store-sql.js";
|
|
28
28
|
import { TiDBLeaderRunStore, PgLeaderRunStore } from "./leader-run-store-sql.js";
|
|
29
|
+
import { TiDBDeviceStore, PgDeviceStore } from "./device-store-sql.js";
|
|
29
30
|
import { TiDBBreakerState, PgBreakerState } from "./breaker-state-sql.js";
|
|
30
31
|
import { TiDBCostQuota } from "./tidb-cost-quota.js";
|
|
31
32
|
import { PgCostQuota } from "./pg-cost-quota.js";
|
|
@@ -96,6 +97,7 @@ class TiDBBackend {
|
|
|
96
97
|
imageIndex() { return new TiDBImageIndex(this.pool); }
|
|
97
98
|
imageBake() { return new TiDBImageBake(this.pool); }
|
|
98
99
|
leaderRun() { return new TiDBLeaderRunStore(this.pool); }
|
|
100
|
+
device() { return new TiDBDeviceStore(this.pool); }
|
|
99
101
|
retention(opts) { return new TiDBRetentionStore(this.pool, opts); }
|
|
100
102
|
retentionLane() { return new TiDBRetentionLaneStore(this.pool); }
|
|
101
103
|
breaker(onWriteFail) { return new TiDBBreakerState(this.pool, onWriteFail); }
|
|
@@ -136,6 +138,7 @@ class PgBackend {
|
|
|
136
138
|
imageIndex() { return new PgImageIndex(this.pool); }
|
|
137
139
|
imageBake() { return new PgImageBake(this.pool); }
|
|
138
140
|
leaderRun() { return new PgLeaderRunStore(this.pool); }
|
|
141
|
+
device() { return new PgDeviceStore(this.pool); }
|
|
139
142
|
retention(opts) { return new PgRetentionStore(this.pool, opts); }
|
|
140
143
|
retentionLane() { return new PgRetentionLaneStore(this.pool); }
|
|
141
144
|
breaker(onWriteFail) { return new PgBreakerState(this.pool, onWriteFail); }
|
|
@@ -30,13 +30,13 @@ export declare function ensurePgUsageWindowSchema(q: (text: string, params?: unk
|
|
|
30
30
|
export declare class TiDBUsageWindowStore implements UsageWindowStore {
|
|
31
31
|
private readonly pool;
|
|
32
32
|
constructor(pool: MySqlPool);
|
|
33
|
-
charge(key: string, tokens: number, at: number, windows: readonly UsageWindow[]): Promise<void>;
|
|
33
|
+
charge(key: string, tokens: number, at: number, windows: readonly UsageWindow[], costMicroUsd?: number | null): Promise<void>;
|
|
34
34
|
read(key: string, windows: readonly UsageWindow[], now: number): Promise<readonly UsageWindowReading[]>;
|
|
35
35
|
}
|
|
36
36
|
export declare class PgUsageWindowStore implements UsageWindowStore {
|
|
37
37
|
private readonly pool;
|
|
38
38
|
constructor(pool: PgPool);
|
|
39
|
-
charge(key: string, tokens: number, at: number, windows: readonly UsageWindow[]): Promise<void>;
|
|
39
|
+
charge(key: string, tokens: number, at: number, windows: readonly UsageWindow[], costMicroUsd?: number | null): Promise<void>;
|
|
40
40
|
read(key: string, windows: readonly UsageWindow[], now: number): Promise<readonly UsageWindowReading[]>;
|
|
41
41
|
}
|
|
42
42
|
//# sourceMappingURL=usage-window-store-sql.d.ts.map
|
|
@@ -14,13 +14,24 @@ function parseRecord(raw, key) {
|
|
|
14
14
|
}
|
|
15
15
|
const badShape = (detail) => new Error(`usage_window record for key "${key}" has an invalid shape (${detail}) — refusing to mis-count a governance window`);
|
|
16
16
|
const finite = (x) => typeof x === "number" && Number.isFinite(x);
|
|
17
|
+
const costKeys = (e) => {
|
|
18
|
+
if (e.costMicroUsd !== undefined && (typeof e.costMicroUsd !== "number" || !Number.isSafeInteger(e.costMicroUsd) || e.costMicroUsd < 0)) {
|
|
19
|
+
throw badShape("`costMicroUsd` present but not a non-negative safe integer");
|
|
20
|
+
}
|
|
21
|
+
if (e.costUnknown !== undefined && e.costUnknown !== true)
|
|
22
|
+
throw badShape("`costUnknown` present but not literal true");
|
|
23
|
+
return {
|
|
24
|
+
...(e.costMicroUsd !== undefined ? { costMicroUsd: e.costMicroUsd } : {}),
|
|
25
|
+
...(e.costUnknown === true ? { costUnknown: true } : {}),
|
|
26
|
+
};
|
|
27
|
+
};
|
|
17
28
|
const slots = r.slots.map((s) => {
|
|
18
29
|
if (s === null || typeof s !== "object")
|
|
19
30
|
throw badShape("`slots` entry is not an object");
|
|
20
31
|
const { at, tokens } = s;
|
|
21
32
|
if (!finite(at) || !finite(tokens))
|
|
22
33
|
throw badShape("`slots` entry has a non-finite-numeric `at`/`tokens`");
|
|
23
|
-
return { at, tokens };
|
|
34
|
+
return { at, tokens, ...costKeys(s) };
|
|
24
35
|
});
|
|
25
36
|
const buckets = r.buckets.map((b) => {
|
|
26
37
|
if (b === null || typeof b !== "object")
|
|
@@ -29,7 +40,7 @@ function parseRecord(raw, key) {
|
|
|
29
40
|
if (!finite(windowMs) || windowMs <= 0 || !finite(openedAt) || !finite(tokens)) {
|
|
30
41
|
throw badShape("`buckets` entry has a non-finite-numeric `windowMs`/`openedAt`/`tokens` (windowMs must be > 0)");
|
|
31
42
|
}
|
|
32
|
-
return { windowMs, openedAt, tokens };
|
|
43
|
+
return { windowMs, openedAt, tokens, ...costKeys(b) };
|
|
33
44
|
});
|
|
34
45
|
return { slots, buckets };
|
|
35
46
|
}
|
|
@@ -54,7 +65,7 @@ export class TiDBUsageWindowStore {
|
|
|
54
65
|
constructor(pool) {
|
|
55
66
|
this.pool = pool;
|
|
56
67
|
}
|
|
57
|
-
async charge(key, tokens, at, windows) {
|
|
68
|
+
async charge(key, tokens, at, windows, costMicroUsd) {
|
|
58
69
|
const c = await this.pool.getConnection();
|
|
59
70
|
try {
|
|
60
71
|
await c.beginTransaction();
|
|
@@ -68,7 +79,7 @@ export class TiDBUsageWindowStore {
|
|
|
68
79
|
throw new Error(`usage_window row for key "${key}" vanished between ensure and lock — refusing to drop a governance charge`);
|
|
69
80
|
}
|
|
70
81
|
const record = parseRecord(rows[0].record, key);
|
|
71
|
-
const next = chargeUsageRecord(record, tokens, at, windows);
|
|
82
|
+
const next = chargeUsageRecord(record, tokens, at, windows, costMicroUsd);
|
|
72
83
|
await c.query(`UPDATE ${USAGE_WINDOW_TABLE} SET record = ?, updated_at_ms = ? WHERE usage_key = ?`, [JSON.stringify(next), at, key]);
|
|
73
84
|
await c.commit();
|
|
74
85
|
}
|
|
@@ -91,7 +102,7 @@ export class PgUsageWindowStore {
|
|
|
91
102
|
constructor(pool) {
|
|
92
103
|
this.pool = pool;
|
|
93
104
|
}
|
|
94
|
-
async charge(key, tokens, at, windows) {
|
|
105
|
+
async charge(key, tokens, at, windows, costMicroUsd) {
|
|
95
106
|
const c = await this.pool.connect();
|
|
96
107
|
try {
|
|
97
108
|
await c.query("BEGIN");
|
|
@@ -105,7 +116,7 @@ export class PgUsageWindowStore {
|
|
|
105
116
|
throw new Error(`usage_window row for key "${key}" vanished between ensure and lock — refusing to drop a governance charge`);
|
|
106
117
|
}
|
|
107
118
|
const record = parseRecord(rows[0].record, key);
|
|
108
|
-
const next = chargeUsageRecord(record, tokens, at, windows);
|
|
119
|
+
const next = chargeUsageRecord(record, tokens, at, windows, costMicroUsd);
|
|
109
120
|
await c.query(`UPDATE ${USAGE_WINDOW_TABLE} SET record = $1, updated_at_ms = $2 WHERE usage_key = $3`, [JSON.stringify(next), at, key]);
|
|
110
121
|
await c.query("COMMIT");
|
|
111
122
|
}
|
package/dist/task-cwd.d.ts
CHANGED
|
@@ -17,6 +17,31 @@ export declare function cwdHonored(config: {
|
|
|
17
17
|
};
|
|
18
18
|
requirePrincipal?: boolean;
|
|
19
19
|
}): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* device lane 的**平行**判别式(device-executor-lane-v2 §4.3.3,车A-4)——「员工在自己设备的项目目录
|
|
22
|
+
* 里干活」是这条车道的存在理由,所以 caller cwd 必须被尊重。
|
|
23
|
+
*
|
|
24
|
+
* 🔴 **为什么不合并进 {@link cwdHonored}**:两闸语义不同,合并会把 host 的单用户约束**放松**。
|
|
25
|
+
* · `cwdHonored` 的 `requirePrincipal !== true` 防的是「一个租户的输入把 agent 指向 **worker 宿主**上
|
|
26
|
+
* 另一个租户/运维的目录」—— 那是一台共享机器上的跨租户穿越;
|
|
27
|
+
* · device lane 上那个穿越面**结构性不存在**:路径落在**发起者自己的设备**上,而设备归属已由
|
|
28
|
+
* `device_session` 绑定行(提交期用验证过的 principal 写下)+ 准入链的 owner 谓词验过。所以本闸
|
|
29
|
+
* **不要求**单用户 —— 多租户部署里每个员工各连各的设备,正是这条车道的正常形态。
|
|
30
|
+
* 合并两者 = 让 host 车道在多租户下也开始尊重 cwd,那是一条真实的越权面。
|
|
31
|
+
*
|
|
32
|
+
* 消费者:写侧 = `boot/resolve-spec.ts`(**单写者**,与 cwdHonored 同一处);读侧 =
|
|
33
|
+
* `plugins/remote-env-device.ts` 的工厂(`effectiveDeviceCwd`)。两侧必须同批落 —— 只开写侧会留下一个
|
|
34
|
+
* 没有消费者的登记项(这正是 A-1 把它登记进 `PLANNED_LANE_DIVERGENCES` 而不是当场开的理由)。
|
|
35
|
+
*
|
|
36
|
+
* ⚠️ 刻意**不**连带放开 `additionalDirectories`:那一位在 device v1 上诚实缺席(v2 §4.1 capability
|
|
37
|
+
* projectContext 行:「拆精确字段,device v1 对 unsupported 项显式 false,不打包沿用」)。
|
|
38
|
+
*/
|
|
39
|
+
export declare function deviceCwdHonored(config: {
|
|
40
|
+
remoteExec?: {
|
|
41
|
+
provider?: string;
|
|
42
|
+
};
|
|
43
|
+
requirePrincipal?: boolean;
|
|
44
|
+
}): boolean;
|
|
20
45
|
/**
|
|
21
46
|
* [851]P3a — the OTHER host-semantics lane: provider UNSET = the in-process single-user lane. It has NO shell
|
|
22
47
|
* hands (core prepare-task: no factory/executionEnv ⇒ StubExecutionEnv), so the perSession cwd/env registries
|
package/dist/task-cwd.js
CHANGED
|
@@ -11,6 +11,9 @@ export function isValidCwd(cwd) {
|
|
|
11
11
|
export function cwdHonored(config) {
|
|
12
12
|
return config.remoteExec?.provider === "host" && config.requirePrincipal !== true;
|
|
13
13
|
}
|
|
14
|
+
export function deviceCwdHonored(config) {
|
|
15
|
+
return config.remoteExec?.provider === "device";
|
|
16
|
+
}
|
|
14
17
|
export function inProcessSingleUserLane(config) {
|
|
15
18
|
return config.remoteExec === undefined && config.requirePrincipal !== true;
|
|
16
19
|
}
|
package/dist/task-settings.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { combinePolicies, createAllowDenyPolicy, createFsWriteGatePolicy, createPermissionRulePolicy, tightenTaskSpec, resolveReasoningProfile, rankOf, isThinkingLevel, CYBER_RISK, URL_SAFETY, HARNESS_SECTION_ANCHOR, RUN_WORKFLOW_TOOL_NAME, } from "@sema-agent/core";
|
|
2
2
|
import { findCcRuleFormNames, findUnmatchableToolNames, formatUnmatchableToolNames } from "./config.js";
|
|
3
|
+
import { CONTROL_AND_BIDI_STRIP_RE } from "./text-bidi.js";
|
|
3
4
|
import { parseHooksConfig } from "./hooks/hook-runner.js";
|
|
4
5
|
export function coercePermissionMode(raw) {
|
|
5
6
|
if (raw === "plan" || raw === "acceptEdits" || raw === "default" || raw === "bypassPermissions" || raw === "auto")
|
|
@@ -160,7 +161,8 @@ function createAskListPolicy(askNames) {
|
|
|
160
161
|
});
|
|
161
162
|
}
|
|
162
163
|
catch (e) {
|
|
163
|
-
|
|
164
|
+
const coreMsg = (e instanceof Error ? e.message : String(e)).replace(CONTROL_AND_BIDI_STRIP_RE, "");
|
|
165
|
+
throw new Error(`permissions.ask has rule(s) core cannot compile — ${coreMsg}`, { cause: e });
|
|
164
166
|
}
|
|
165
167
|
}
|
|
166
168
|
const WORKFLOW_ASK_NAMES = [RUN_WORKFLOW_TOOL_NAME];
|
|
@@ -27,9 +27,9 @@ type _GuardBgNotif = AssertAllKeysHandled<Exclude<keyof BackgroundChildEvent, Bg
|
|
|
27
27
|
type RosterProjected = "name" | "agentId" | "sessionId" | "toolUseId" | "owner" | "scope" | "sessionScoped" | "rootSessionId" | "model" | "modelFallback" | "createdAt";
|
|
28
28
|
type _GuardRoster = AssertAllKeysHandled<Exclude<keyof RosterEntry, RosterProjected>>;
|
|
29
29
|
type AskProjected = "toolName" | "toolCallId" | "args" | "message" | "sourceTaskId" | "fromSubagent" | "sourceAgentName" | "delegation" | "ruleOffers" | "persistedRuleShadowed" | "probeCause" | "ruleEvidence" | "requiresRealApproval";
|
|
30
|
-
type AskExcluded = "preview" | "principal" | "riskAxes" | "boundInputHash" | "isDelegatedChild" | "probeReason" | "hasBidiControls";
|
|
30
|
+
type AskExcluded = "preview" | "principal" | "riskAxes" | "boundInputHash" | "isDelegatedChild" | "probeReason" | "hasBidiControls" | "previewWithheld";
|
|
31
31
|
type _GuardAsk = AssertAllKeysHandled<Exclude<keyof AskRequest, AskProjected | AskExcluded>>;
|
|
32
|
-
type TaskEventHandled = "text_delta" | "reasoning_delta" | "tool_start" | "tool_end" | "turn_end" | "compacted" | "diagnostics" | "message_committed" | "status" | "task_notification" | "task_progress" | "steering_injected" | "workspace_changed" | "done" | "context_usage" | "compaction_outcome" | "human_input" | "wiring_manifest";
|
|
32
|
+
type TaskEventHandled = "text_delta" | "reasoning_delta" | "tool_start" | "tool_end" | "turn_end" | "compacted" | "diagnostics" | "message_committed" | "status" | "task_notification" | "task_progress" | "steering_injected" | "workspace_changed" | "done" | "context_usage" | "compaction_outcome" | "human_input" | "wiring_manifest" | "text_end";
|
|
33
33
|
type _GuardTaskEvent = AssertAllKeysHandled<Exclude<TaskEvent["type"], TaskEventHandled>>;
|
|
34
34
|
type MailboxProjected = "seq" | "from" | "content" | "sentAt" | "hopChain";
|
|
35
35
|
type _GuardMailbox = AssertAllKeysHandled<Exclude<keyof MailboxMessage, MailboxProjected>>;
|
|
@@ -45,7 +45,7 @@ type _GuardPermissionTraceReverse = AssertAllKeysHandled<Exclude<PermissionTrace
|
|
|
45
45
|
type AssertNonEmpty<T> = [T] extends [never] ? "EMPTY" : never;
|
|
46
46
|
type _GuardPermissionTraceNonEmpty = AssertAllKeysHandled<AssertNonEmpty<PermissionTraceKind>>;
|
|
47
47
|
type SummaryProjected = "sessionId" | "scope" | "createdAt" | "gateKind" | "severity" | "spentMicroUsd" | "deadline" | "hasBidiControls";
|
|
48
|
-
type SummaryExcluded = "token" | "toolInput" | "toolName" | "toolCallId" | "preview" | "principal" | "sourceTaskId" | "contentKind" | "restoreMode" | "checkpointId";
|
|
48
|
+
type SummaryExcluded = "token" | "toolInput" | "toolName" | "toolCallId" | "preview" | "principal" | "sourceTaskId" | "contentKind" | "restoreMode" | "checkpointId" | "previewWithheld";
|
|
49
49
|
type _GuardInboxSummary = AssertAllKeysHandled<Exclude<keyof CheckpointSummary, SummaryProjected | SummaryExcluded>>;
|
|
50
50
|
export type CoreKeysetGuards = [
|
|
51
51
|
_GuardNotification,
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* 同文件 G1 e2e 的全码扇出夹具、以及契约文档附录 D.3 那张表(含**小节标题里的码数** —— 那道门本批
|
|
15
15
|
* 刚立,立完就在下一次加码时自己咬住了)。
|
|
16
16
|
*/
|
|
17
|
-
export declare const ENGINE_NOTICE_WIRE_CODES: readonly ["memory.session_polluted", "memory.harvest_quarantined", "memory.delegation_static_mark_waived", "memory.hold_opened", "memory.hold_released", "memory.hold_disposed", "task.turn_interrupted", "task.user_steer_undrained", "task.user_followup_undrained"];
|
|
17
|
+
export declare const ENGINE_NOTICE_WIRE_CODES: readonly ["memory.session_polluted", "memory.harvest_quarantined", "memory.delegation_static_mark_waived", "memory.hold_opened", "memory.hold_released", "memory.hold_disposed", "task.turn_interrupted", "steering.parked_input_blocked", "task.user_steer_undrained", "task.user_followup_undrained"];
|
|
18
18
|
export type EngineNoticeWireCode = (typeof ENGINE_NOTICE_WIRE_CODES)[number];
|
|
19
19
|
/** 白名单谓词(单点):路由与门都读这一个,不许第二处手抄码串。 */
|
|
20
20
|
export declare function isEngineNoticeWireCode(code: string): code is EngineNoticeWireCode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/server",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.51.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",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"build:binary:run-local:darwin-arm64": "bun build --compile --target=bun-darwin-arm64 src/run-local.ts --outfile dist/run-local-darwin-arm64"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@sema-agent/core": "
|
|
58
|
-
"@sema-agent/settings-schema": "
|
|
57
|
+
"@sema-agent/core": "5.65.0",
|
|
58
|
+
"@sema-agent/settings-schema": "1.0.0",
|
|
59
59
|
"e2b": "^2.28.0",
|
|
60
60
|
"libsodium-wrappers": "^0.8.4",
|
|
61
61
|
"mysql2": "^3.22.4",
|