@sema-agent/server 3.4.1 → 3.4.2
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/dist/capabilities/select-environment-tool.js +1 -1
- package/dist/capabilities/skills.js +1 -1
- package/dist/config-center/skills-mcp.d.ts +1 -1
- package/dist/config-center/skills-mcp.js +1 -1
- package/dist/env-facts.js +1 -1
- package/dist/http/routes/approvals-assistant.js +13 -0
- package/dist/http/routes/session-sync.d.ts +1 -1
- package/dist/http/routes/session-sync.js +1 -1
- package/dist/leader/grader-env-factory.d.ts +1 -1
- package/dist/leader/grader-env-factory.js +2 -2
- package/dist/leader/repair-oracle.d.ts +1 -1
- package/dist/leader/repair-oracle.js +1 -1
- package/dist/leader/repair-wire.d.ts +1 -1
- package/dist/leader/repair-wire.js +1 -1
- package/dist/main.js +1 -1
- package/dist/memory-sync.js +1 -1
- package/dist/observability/metrics.js +1 -1
- package/dist/plan-cache-probe.js +3 -1
- package/dist/plugins/approval-exemption-store.js +1 -1
- package/dist/plugins/pg-pool.js +1 -1
- package/dist/plugins/remote-env-k8s.d.ts +1 -1
- package/dist/plugins/tidb-pool.js +1 -1
- package/dist/router/route-orchestration.d.ts +1 -1
- package/dist/router/route-orchestration.js +1 -1
- package/dist/sandbox-pkg-source.d.ts +1 -1
- package/dist/sandbox-pkg-source.js +1 -1
- package/dist/session-sync-kernel.d.ts +1 -1
- package/dist/session-sync.d.ts +1 -1
- package/dist/task-settings.d.ts +1 -1
- package/dist/task-settings.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* RFC A2 (docs/design/ENV-SELECT-AND-REGION-SOURCE.md) — the model-facing `SelectEnvironment` tool.
|
|
2
|
+
* RFC A2 (sema-internal server/docs/design/ENV-SELECT-AND-REGION-SOURCE.md) — the model-facing `SelectEnvironment` tool.
|
|
3
3
|
* A 切片先行;挂载路线 = RFC 判定②(a):deployment 经 `spec.tools` 注入(同 lsp/
|
|
4
4
|
* 自定义工具),core 收编等真用起来再谈。
|
|
5
5
|
*
|
|
@@ -20,7 +20,7 @@ export function loadSkills(dir) {
|
|
|
20
20
|
};
|
|
21
21
|
// sort 保证加载顺序稳定(冲突报错的"先到者"也因此确定)。dotfile/dot 目录跳过(.DS_Store/.git 类
|
|
22
22
|
// 环境杂物,不是 skill 内容);isFileLike 兼容 symlink(Dirent.isFile() 对 symlink 恒 false,而旧扁平
|
|
23
|
-
// 实现 readFileSync 是跟链接的——不兼容会让 `
|
|
23
|
+
// 实现 readFileSync 是跟链接的——不兼容会让 skills 目录下 `foo.md -> 共享文件` 这种软链无声消失)。
|
|
24
24
|
const isFileLike = (entry, p) => entry.isFile() || (entry.isSymbolicLink() && statSync(p).isFile());
|
|
25
25
|
const isDirLike = (entry, p) => entry.isDirectory() || (entry.isSymbolicLink() && statSync(p).isDirectory());
|
|
26
26
|
for (const entry of entries.slice().sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0))) {
|
|
@@ -4,7 +4,7 @@ import type { Logger } from "../observability/logger.js";
|
|
|
4
4
|
import type { LoadedSkill } from "../capabilities/skills.js";
|
|
5
5
|
import type { CenterMcpServer, CenterSkillManifest } from "./types.js";
|
|
6
6
|
/**
|
|
7
|
-
* Merge center skills OVER the image baseline (design/41-sibling B1; `docs/MCP-SKILLS.md`). Load order =
|
|
7
|
+
* Merge center skills OVER the image baseline (design/41-sibling B1; `sema-registry docs/MCP-SKILLS.md`). Load order =
|
|
8
8
|
* `loadSkills(SKILLS_DIR)` baseline → center skills lazily fetched by hash and overlaid BY NAME (center
|
|
9
9
|
* wins on a clash → can override a built-in; guarded center-side by publisher RBAC + the publish gate).
|
|
10
10
|
* `enabled:false` is skipped. Content is verified + cached by hash (same hash fetched once). A skill whose
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { skillContentHash } from "@sema-agent/registry-core";
|
|
9
9
|
import { fetchSkillContent } from "./http-client.js";
|
|
10
10
|
/**
|
|
11
|
-
* Merge center skills OVER the image baseline (design/41-sibling B1; `docs/MCP-SKILLS.md`). Load order =
|
|
11
|
+
* Merge center skills OVER the image baseline (design/41-sibling B1; `sema-registry docs/MCP-SKILLS.md`). Load order =
|
|
12
12
|
* `loadSkills(SKILLS_DIR)` baseline → center skills lazily fetched by hash and overlaid BY NAME (center
|
|
13
13
|
* wins on a clash → can override a built-in; guarded center-side by publisher RBAC + the publish gate).
|
|
14
14
|
* `enabled:false` is skipped. Content is verified + cached by hash (same hash fetched once). A skill whose
|
package/dist/env-facts.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* RFC A1 (docs/design/ENV-SELECT-AND-REGION-SOURCE.md) — the sandbox envFacts composer (service 半场).
|
|
2
|
+
* RFC A1 (sema-internal server/docs/design/ENV-SELECT-AND-REGION-SOURCE.md) — the sandbox envFacts composer (service 半场).
|
|
3
3
|
* Shape ratified REV-1: `TaskSpec.envFacts?: { profile?, capabilities?[], pkgSource?, egress? }`.
|
|
4
4
|
* Core injects it into model context (escape+bound core-side); this module only COMPOSES the facts
|
|
5
5
|
* from deployment-trusted sources (image catalog entry + operator region config + exec-lane posture).
|
|
@@ -214,6 +214,19 @@ async function handleApprovalsAssistantBody(req, res, url, ctx, miss) {
|
|
|
214
214
|
.map((r) => {
|
|
215
215
|
const s = byGate.get(r.sessionId);
|
|
216
216
|
const gate = s ? { kind: s.gateKind, severity: s.severity ?? null, spentMicroUsd: s.spentMicroUsd ?? null, deadline: s.deadline ?? null } : null;
|
|
217
|
+
// 🔴 `needsAttention` = 「此刻有一个**可解的活门**」= `!!gate`,**不是**「run 行停着」([2034]/[2035]
|
|
218
|
+
// 附带登记的 handler↔§3 文档出入,2026-07-30 裁定 (b):改文档对齐本行,常驻钉
|
|
219
|
+
// `test/assistant-tasks-needs-attention.test.ts`)。gate 来自 `listByScope`,三个实现都只回
|
|
220
|
+
// `status='pending'` 的行 ⇒ 分歧态 = run 停在 suspended/needs_review 而 pending checkpoint 已不在。
|
|
221
|
+
// 该态**可达且周期性发生**:TTL 收割的两半(checkpointStore.reapExpired 只动 checkpoint /
|
|
222
|
+
// runStore.failSuspendedWithExpiredCheckpoint 才动 run 行)在 boot/reapers.ts 同一 tick 里互不 await。
|
|
223
|
+
// 三问:① 需要方=triage 视图,它拿这一位只做「哪张卡现在能动 + 排前面」(比较器第一级);
|
|
224
|
+
// ② 若改按 status 算,分歧态会产出**不可解之卡**——标成待处理、排进前段,而 /decide 必 404、
|
|
225
|
+
// /plan_review 与 /resume 同族拒,且与同一行的 `gate:null` 自相矛盾;现写法的代价是这段窗口里
|
|
226
|
+
// 「只渲染 needsAttention 段」的客户端看不到它;
|
|
227
|
+
// ③ 补偿=(a) 行**不消失**——它仍在本列表里带真实 `status`,「所有还停着的任务」由 status 回答;
|
|
228
|
+
// (b) failSuspendedWithExpiredCheckpoint 三个 run store 全实装、每 tick 无条件跑(不受
|
|
229
|
+
// APPROVAL_TIMEOUT_SEC 开关),窗口由 REAP_INTERVAL_SEC 封顶后收敛成 failed。
|
|
217
230
|
return { taskId: r.taskId, sessionId: r.sessionId, status: r.status, needsAttention: !!gate, gate, createdAt: r.createdAt, updatedAt: r.updatedAt };
|
|
218
231
|
})
|
|
219
232
|
.sort((a, b) => Number(b.needsAttention) - Number(a.needsAttention) || (b.gate?.severity ?? 0) - (a.gate?.severity ?? 0) || (b.gate?.spentMicroUsd ?? 0) - (a.gate?.spentMicroUsd ?? 0));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* design/158 A9 域模块 —— 2c session-sync 面(docs/DESIGN-session-sync.md §15 + §5–§10)。
|
|
2
|
+
* design/158 A9 域模块 —— 2c session-sync 面(sema-internal server/docs/DESIGN-session-sync.md §15 + §5–§10)。
|
|
3
3
|
*
|
|
4
4
|
* 路由:`/v1/sessions/:id/sync/{manifest,entries,import,plan,blobs,snapshots/:k/blobs/:b,import/:staging/entries}`。
|
|
5
5
|
* 每条都像 fork/delete 一样 owner-gated;无持久 session store 时 501(能力面与路由解析同真值)。
|
|
@@ -49,7 +49,7 @@ async function handleSessionSyncBody(req, res, url, ctx, miss) {
|
|
|
49
49
|
const { deps } = ctx;
|
|
50
50
|
const { readJson, readRawBody, safeDecode, sessionOwnerScopeForWrite } = ctx.helpers;
|
|
51
51
|
const { pendingStagings, importLeases, touchImportLease, cleanupStaging } = ctx.local.sessionSync;
|
|
52
|
-
// ── 2c session-sync (P1d) — the cloud as a SYNC PEER (docs/DESIGN-session-sync.md §15 + §5–§10) ──────────────
|
|
52
|
+
// ── 2c session-sync (P1d) — the cloud as a SYNC PEER (sema-internal server/docs/DESIGN-session-sync.md §15 + §5–§10) ──────────────
|
|
53
53
|
// The real 2c topology is TWO PROCESSES (the local shell's local backend + this cloud service); these routes let
|
|
54
54
|
// the local peer PULL a session's whole state out of the cloud or PUSH its own in. Both halves are STREAMING
|
|
55
55
|
// implementations that fan out across ALL four session subsystems (entries + fileSnapshot + sessionPolicy +
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The OUT-OF-PROCESS grader plumbing for the leader × `runRepairLoop` integration
|
|
3
|
-
* (`docs/LEADER-REPAIRLOOP-INTEGRATION.md` §3.2 + the authoritative §10 layer). Two distinct consumers:
|
|
3
|
+
* (`sema-internal server/docs/LEADER-REPAIRLOOP-INTEGRATION.md` §3.2 + the authoritative §10 layer). Two distinct consumers:
|
|
4
4
|
*
|
|
5
5
|
* - **R1 (single-agent oracle, §10.1)** — the `RepairOracle` closure (`repair-oracle.ts`) reuses the EXISTING
|
|
6
6
|
* integration sandbox as its grader at ZERO extra sandbox cost. It needs only a `GraderHandle` (a writeFile +
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The OUT-OF-PROCESS grader plumbing for the leader × `runRepairLoop` integration
|
|
3
|
-
* (`docs/LEADER-REPAIRLOOP-INTEGRATION.md` §3.2 + the authoritative §10 layer). Two distinct consumers:
|
|
3
|
+
* (`sema-internal server/docs/LEADER-REPAIRLOOP-INTEGRATION.md` §3.2 + the authoritative §10 layer). Two distinct consumers:
|
|
4
4
|
*
|
|
5
5
|
* - **R1 (single-agent oracle, §10.1)** — the `RepairOracle` closure (`repair-oracle.ts`) reuses the EXISTING
|
|
6
6
|
* integration sandbox as its grader at ZERO extra sandbox cost. It needs only a `GraderHandle` (a writeFile +
|
|
@@ -126,7 +126,7 @@ export function createGraderEnvFactory(_cfg) {
|
|
|
126
126
|
return async () => {
|
|
127
127
|
throw new Error("createGraderEnvFactory: the standalone control-plane grader is the auto-accept slice (LEADER_GRADER_FACTORY) — " +
|
|
128
128
|
"NOT wired in v1 (which reuses the integration sandbox for R1 and re-seeds it for R2). " +
|
|
129
|
-
"See docs/LEADER-REPAIRLOOP-INTEGRATION.md §3.2/§7.");
|
|
129
|
+
"See sema-internal server/docs/LEADER-REPAIRLOOP-INTEGRATION.md §3.2/§7.");
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
132
|
//# sourceMappingURL=grader-env-factory.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The PROFILE-injected `RepairOracle` closure for the leader's single-agent self-repair loop
|
|
3
|
-
* (`runRepairLoop`, core design/78 / D1). See `docs/LEADER-REPAIRLOOP-INTEGRATION.md` (§3.1 + the authoritative
|
|
3
|
+
* (`runRepairLoop`, core design/78 / D1). See `sema-internal server/docs/LEADER-REPAIRLOOP-INTEGRATION.md` (§3.1 + the authoritative
|
|
4
4
|
* §10 corrected layer). The closure GRADES a worker's candidate in an ISOLATED grader env (the reused
|
|
5
5
|
* integration sandbox, distinct from the worker env) and maps the result to a core `OracleResult`. core only
|
|
6
6
|
* fixes the `OracleResult` shape + the read-only/identity contract; the composition lives HERE so the core type
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The PROFILE-injected `RepairOracle` closure for the leader's single-agent self-repair loop
|
|
3
|
-
* (`runRepairLoop`, core design/78 / D1). See `docs/LEADER-REPAIRLOOP-INTEGRATION.md` (§3.1 + the authoritative
|
|
3
|
+
* (`runRepairLoop`, core design/78 / D1). See `sema-internal server/docs/LEADER-REPAIRLOOP-INTEGRATION.md` (§3.1 + the authoritative
|
|
4
4
|
* §10 corrected layer). The closure GRADES a worker's candidate in an ISOLATED grader env (the reused
|
|
5
5
|
* integration sandbox, distinct from the worker env) and maps the result to a core `OracleResult`. core only
|
|
6
6
|
* fixes the `OracleResult` shape + the read-only/identity contract; the composition lives HERE so the core type
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The WIRE that wraps core `runRepairLoop` onto the leader's single-agent path
|
|
3
|
-
* (`docs/LEADER-REPAIRLOOP-INTEGRATION.md` §3.3 + the authoritative §10 layer). It owns the three things the
|
|
3
|
+
* (`sema-internal server/docs/LEADER-REPAIRLOOP-INTEGRATION.md` §3.3 + the authoritative §10 layer). It owns the three things the
|
|
4
4
|
* `RepairOracle` closure (`repair-oracle.ts`) and the core engine CANNOT resolve themselves:
|
|
5
5
|
*
|
|
6
6
|
* 1. **The grader handle (R1, §10.1)** — the reused integration sandbox's writeFile/exec + `integBase`, bound by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The WIRE that wraps core `runRepairLoop` onto the leader's single-agent path
|
|
3
|
-
* (`docs/LEADER-REPAIRLOOP-INTEGRATION.md` §3.3 + the authoritative §10 layer). It owns the three things the
|
|
3
|
+
* (`sema-internal server/docs/LEADER-REPAIRLOOP-INTEGRATION.md` §3.3 + the authoritative §10 layer). It owns the three things the
|
|
4
4
|
* `RepairOracle` closure (`repair-oracle.ts`) and the core engine CANNOT resolve themselves:
|
|
5
5
|
*
|
|
6
6
|
* 1. **The grader handle (R1, §10.1)** — the reused integration sandbox's writeFile/exec + `integBase`, bound by
|
package/dist/main.js
CHANGED
|
@@ -784,7 +784,7 @@ async function main() {
|
|
|
784
784
|
// 🔴 复审 2026-07-28(E-HIGH-1)修:此键是 **ServiceDeps** 字段,原先被 spread 进 `runnerDeps`
|
|
785
785
|
// (core 的 RunnerDeps 无此字段,条件 spread 绕过 TS 多余属性检查 ⇒ 编译期无声)⇒ HTTP 面恒
|
|
786
786
|
// undefined、413 前置是死枝、超帽仍走 502。落错家的死键病族(verify-cost 先例)——接线钉见
|
|
787
|
-
// test/
|
|
787
|
+
// test/deps-literal-shape-gate.test.ts(2026-07-28 那批复审文件已按仓规折进主题文件,钉本体在 E-HIGH-1 那个 describe)。
|
|
788
788
|
snapshotBlobSqlCapBytes: backend && backend.kind !== "local" && !config.snapshotBlobStore
|
|
789
789
|
? (config.snapshotBlobSqlMaxBytes ?? (backend.kind === "mysql" ? SQL_BLOB_DEFAULT_MAX_BYTES : undefined))
|
|
790
790
|
: undefined,
|
package/dist/memory-sync.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// 142-S2.5 中心侧同步 API 的执行内核(设计 docs/design/142-S4-DATAPLANE.md §2.5;裁定:
|
|
1
|
+
// 142-S2.5 中心侧同步 API 的执行内核(设计 sema-internal server/docs/design/142-S4-DATAPLANE.md §2.5;裁定:
|
|
2
2
|
// **plan 随数据走,core 零运行时半场**——core 的 `reconcileMemoryEntries`/`nextSyncBaseline`/
|
|
3
3
|
// `screenInboundEntries` 是纯函数导出,持数据的一侧(本 server=DB 权威+per-(scope,peer) 游标)直接
|
|
4
4
|
// import 调用算 plan 并执行 CAS;API 面全在 server,core 的承诺=纯函数语义稳定。
|
|
@@ -254,7 +254,7 @@ export function createMetrics() {
|
|
|
254
254
|
// E18 resume-at: a per-turn anchor capture (getLeafId→put) failed (e.g. an un-migrated DB missing resume_anchor) —
|
|
255
255
|
// best-effort, never fails the run; this surfaces a SYSTEMATIC capture outage instead of a silent feature stoppage.
|
|
256
256
|
m.counter("resume_anchor_capture_failed", "E18 resume-at per-turn anchor captures that failed (best-effort, run unaffected)");
|
|
257
|
-
// Silent-fallback telemetry P0 batch (docs/design/SILENT-FALLBACK-TELEMETRY.md, service half):
|
|
257
|
+
// Silent-fallback telemetry P0 batch (sema-internal server/docs/design/SILENT-FALLBACK-TELEMETRY.md, service half):
|
|
258
258
|
// S4 — brain-layer liveness phases (rate_limited/retrying/reconnecting/circuit_open) were previously visible
|
|
259
259
|
// only on the live SSE stream; count them so upstream throttling/outage is graphable per phase.
|
|
260
260
|
m.counter("brain_retry_total", "Brain-layer status events (S4), by phase (rate_limited/retrying/reconnecting/circuit_open)");
|
package/dist/plan-cache-probe.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
// Verbatim from core strategy-store.ts
|
|
1
|
+
// Verbatim from core strategy-store.ts. 🔴 「keep in sync」不是靠这句话 —— lockstep 活钉在
|
|
2
|
+
// test/plan-cache-probe.test.ts(真读 core 的 dist strategy-store.js 做 set diff + 切词正则/阈值同源),
|
|
3
|
+
// 任一侧改词表当场红。2026-07-30 之前这里只有声明没有钉:删掉一个词全量零红(实测)。
|
|
2
4
|
const STOP = new Set([
|
|
3
5
|
"the", "and", "for", "with", "from", "this", "that", "into", "your", "you", "are", "was", "were", "has",
|
|
4
6
|
"have", "had", "not", "but", "all", "any", "can", "use", "using", "via", "then", "than", "out", "get",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Per-session per-toolName approval exemption ("本会话不再询问",
|
|
3
|
-
* design: docs/design/APPROVAL-SESSION-EXEMPTION.md).
|
|
3
|
+
* design: sema-internal server/docs/design/APPROVAL-SESSION-EXEMPTION.md).
|
|
4
4
|
*
|
|
5
5
|
* SEMANTICS (the boundary that keeps this an APPROVAL MEMORY, not a policy loosen): a granted row makes the
|
|
6
6
|
* F4 ask-gate SKIP the human ask for that (sessionId, canonicalToolName) — it is consulted ONLY after
|
package/dist/plugins/pg-pool.js
CHANGED
|
@@ -117,7 +117,7 @@ export const PG_SCHEMA_STATEMENTS = [
|
|
|
117
117
|
)`,
|
|
118
118
|
`CREATE INDEX IF NOT EXISTS idx_resume_anchor_session ON resume_anchor (session_id)`,
|
|
119
119
|
// Per-session per-toolName approval exemption (the PG twin — see tidb-pool.ts /
|
|
120
|
-
// docs/design/APPROVAL-SESSION-EXEMPTION.md).
|
|
120
|
+
// sema-internal server/docs/design/APPROVAL-SESSION-EXEMPTION.md).
|
|
121
121
|
`CREATE TABLE IF NOT EXISTS approval_exemption (
|
|
122
122
|
session_id VARCHAR(64) NOT NULL,
|
|
123
123
|
tool_name VARCHAR(190) NOT NULL,
|
|
@@ -69,7 +69,7 @@ export interface K8sEnvConfig {
|
|
|
69
69
|
* image/command), which are set OUTSIDE the patched fields.
|
|
70
70
|
*/
|
|
71
71
|
podSpecPatch?: PodSpecPatch;
|
|
72
|
-
/** RFC B5 (docs/design/ENV-SELECT-AND-REGION-SOURCE.md 抽象点②): operator-trusted env injected into the
|
|
72
|
+
/** RFC B5 (sema-internal server/docs/design/ENV-SELECT-AND-REGION-SOURCE.md 抽象点②): operator-trusted env injected into the
|
|
73
73
|
* sandbox container (e.g. `SEMA_PKG_SOURCE=cn|global` — the runtime package-source selector the image's
|
|
74
74
|
* pkg-source.sh hook materializes at start). Deployment-region config, NEVER task-controlled. Absent = the
|
|
75
75
|
* pod is byte-identical to today. */
|
|
@@ -305,7 +305,7 @@ export const SCHEMA_STATEMENTS = [
|
|
|
305
305
|
)`,
|
|
306
306
|
// Per-session per-toolName approval exemption ("本会话不再询问") — an APPROVAL MEMORY the
|
|
307
307
|
// F4 ask-gate consults AFTER deny/neverAuto (both always win). tool_name is CANONICAL space. GC'd with
|
|
308
|
-
// the session (E21 delete). See docs/design/APPROVAL-SESSION-EXEMPTION.md.
|
|
308
|
+
// the session (E21 delete). See sema-internal server/docs/design/APPROVAL-SESSION-EXEMPTION.md.
|
|
309
309
|
`CREATE TABLE IF NOT EXISTS approval_exemption (
|
|
310
310
|
session_id VARCHAR(64) NOT NULL,
|
|
311
311
|
tool_name VARCHAR(190) NOT NULL,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The A value router — cash out the S1 supervisor value verdict (docs/S1-VALUE-VERDICT.md §6.3) into a per-task
|
|
2
|
+
* The A value router — cash out the S1 supervisor value verdict (sema-internal server/docs/S1-VALUE-VERDICT.md §6.3) into a per-task
|
|
3
3
|
* orchestration decision: run a task as `single` / `supervisor` / `team`.
|
|
4
4
|
*
|
|
5
5
|
* The verdict, in one line: **competent tasks have SUP/TEAM dominated (pure overhead) ⇒ default single; the real
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The A value router — cash out the S1 supervisor value verdict (docs/S1-VALUE-VERDICT.md §6.3) into a per-task
|
|
2
|
+
* The A value router — cash out the S1 supervisor value verdict (sema-internal server/docs/S1-VALUE-VERDICT.md §6.3) into a per-task
|
|
3
3
|
* orchestration decision: run a task as `single` / `supervisor` / `team`.
|
|
4
4
|
*
|
|
5
5
|
* The verdict, in one line: **competent tasks have SUP/TEAM dominated (pure overhead) ⇒ default single; the real
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* RFC B5/B4 抽象点② (docs/design/ENV-SELECT-AND-REGION-SOURCE.md): the deployment-region package-source →
|
|
2
|
+
* RFC B5/B4 抽象点② (sema-internal server/docs/design/ENV-SELECT-AND-REGION-SOURCE.md): the deployment-region package-source →
|
|
3
3
|
* sandbox env derivation. ENV-FIRST: pod/sandbox env OVERRIDES the image's baked `ENV` (k8s container env wins
|
|
4
4
|
* over image config and is visible to every exec'd process; e2b sandboxEnv likewise) — so the env-overridable
|
|
5
5
|
* ecosystem pieces (pip/uv/npm/corepack/go/rustup/flutter/playwright/nuget) switch region on EXISTING images,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* RFC B5/B4 抽象点② (docs/design/ENV-SELECT-AND-REGION-SOURCE.md): the deployment-region package-source →
|
|
2
|
+
* RFC B5/B4 抽象点② (sema-internal server/docs/design/ENV-SELECT-AND-REGION-SOURCE.md): the deployment-region package-source →
|
|
3
3
|
* sandbox env derivation. ENV-FIRST: pod/sandbox env OVERRIDES the image's baked `ENV` (k8s container env wins
|
|
4
4
|
* over image config and is visible to every exec'd process; e2b sandboxEnv likewise) — so the env-overridable
|
|
5
5
|
* ecosystem pieces (pip/uv/npm/corepack/go/rustup/flutter/playwright/nuget) switch region on EXISTING images,
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { SessionTreeEntry } from "@sema-agent/core";
|
|
13
13
|
/**
|
|
14
|
-
* P1d-β (PUSH streaming, docs/DESIGN-session-sync.md §15 + the persistence synthesis) — a TWO-PHASE STAGED import
|
|
14
|
+
* P1d-β (PUSH streaming, sema-internal server/docs/DESIGN-session-sync.md §15 + the persistence synthesis) — a TWO-PHASE STAGED import
|
|
15
15
|
* handle. The whole-bundle `importSession` (session-sync.ts) buffers every entry in one JSON body (server memory ∝ session size);
|
|
16
16
|
* β instead STREAMS the entry log (NDJSON) into a SHADOW session id, validating it ONLINE per line through core's
|
|
17
17
|
* StreamingImportValidator (the single invariant gate — core 1.143.0), then ATOMICALLY swaps
|
package/dist/session-sync.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 2c session-sync — P1b ORCHESTRATION: export a session's WHOLE portable state from one StoreBackend and import it
|
|
3
|
-
* verbatim into another (the seamless local↔cloud "save state" move; docs/DESIGN-session-sync.md §5–§10). All the
|
|
3
|
+
* verbatim into another (the seamless local↔cloud "save state" move; sema-internal server/docs/DESIGN-session-sync.md §5–§10). All the
|
|
4
4
|
* per-store PRIMITIVES already exist (P1a entries + P1b snapshots/policy/anchor); this module is the COORDINATOR that
|
|
5
5
|
* (a) reads them into a {@link SessionBundle} and (b) replays them across backends in the §8 fail-closed atomic order.
|
|
6
6
|
*
|
package/dist/task-settings.d.ts
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* ——但深层不变量未变:bypass=「不加 ask 门」,恒不越部署基线(tightenTaskSpec deny-wins,基线 deny/
|
|
21
21
|
* ask 照压);精化语义见 :2xx 行内注释。旧头注的「NEVER honored/三模式白名单」是 pre-[816] 拍照。
|
|
22
22
|
*
|
|
23
|
-
* 🔴 SYNC WITH
|
|
23
|
+
* 🔴 SYNC WITH sema-cli(壳仓)的 `src/sema/settings/seam.ts`: the permissions→toolPolicy + §6.4 permissionMode derive MIRRORS
|
|
24
24
|
* the shell's LOCAL-Runner resolver — both compose the SAME core primitives (`createAllowDenyPolicy` /
|
|
25
25
|
* `combinePolicies` / `tightenTaskSpec`), so the deny-wins ENFORCEMENT is core-single-source. Only the COMPOSITION
|
|
26
26
|
* is duplicated for the remote path; a proposed follow-up extracts it to `@sema-agent/sdk` for true
|
package/dist/task-settings.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* ——但深层不变量未变:bypass=「不加 ask 门」,恒不越部署基线(tightenTaskSpec deny-wins,基线 deny/
|
|
21
21
|
* ask 照压);精化语义见 :2xx 行内注释。旧头注的「NEVER honored/三模式白名单」是 pre-[816] 拍照。
|
|
22
22
|
*
|
|
23
|
-
* 🔴 SYNC WITH
|
|
23
|
+
* 🔴 SYNC WITH sema-cli(壳仓)的 `src/sema/settings/seam.ts`: the permissions→toolPolicy + §6.4 permissionMode derive MIRRORS
|
|
24
24
|
* the shell's LOCAL-Runner resolver — both compose the SAME core primitives (`createAllowDenyPolicy` /
|
|
25
25
|
* `combinePolicies` / `tightenTaskSpec`), so the deny-wins ENFORCEMENT is core-single-source. Only the COMPOSITION
|
|
26
26
|
* is duplicated for the remote path; a proposed follow-up extracts it to `@sema-agent/sdk` for true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/server",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.2",
|
|
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",
|