@sema-agent/server 7.52.1 → 7.54.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 +7 -1
- package/dist/adoption/plan.d.ts +3 -3
- package/dist/adoption/quiesce.d.ts +1 -1
- package/dist/adoption/sql.d.ts +2 -2
- package/dist/adoption/wire.d.ts +1 -1
- package/dist/approval-ask-machine.d.ts +2 -2
- package/dist/approval-card.d.ts +18 -18
- package/dist/approval-deny-reasons.d.ts +1 -1
- package/dist/approval-hmac.d.ts +2 -2
- package/dist/approval-reconciler.d.ts +14 -14
- package/dist/approval.d.ts +2 -2
- package/dist/audit.d.ts +4 -4
- package/dist/auth-keys.d.ts +6 -6
- package/dist/bench/l8/artifact.d.ts +6 -1
- package/dist/bench/l8/artifact.js +2 -27
- package/dist/bench/l8/escape.d.ts +3 -3
- package/dist/bench/l8/index.d.ts +1 -1
- package/dist/bench/s1/arms.d.ts +3 -3
- package/dist/bench/s1/oracle.d.ts +2 -2
- package/dist/bench/s1/reviewer.d.ts +1 -1
- package/dist/bench/s1/row.d.ts +5 -5
- package/dist/bench/s1/runner-ctx.d.ts +3 -3
- package/dist/boot/config-center.d.ts +14 -7
- package/dist/boot/config-center.js +4 -2
- package/dist/boot/coordinators.d.ts +4 -4
- package/dist/boot/crash-last.d.ts +1 -1
- package/dist/boot/device-lane.d.ts +3 -3
- package/dist/boot/engine-lease.d.ts +4 -4
- package/dist/boot/governance-seams.d.ts +5 -5
- package/dist/boot/leader.d.ts +5 -5
- package/dist/boot/leader.js +2 -0
- package/dist/boot/limit-sync.d.ts +1 -1
- package/dist/boot/memory-boundary.d.ts +5 -5
- package/dist/boot/memory-consolidation.d.ts +8 -2
- package/dist/boot/memory-consolidation.js +1 -0
- package/dist/boot/org-memory.d.ts +5 -5
- package/dist/boot/parked-revive-gate.d.ts +6 -6
- package/dist/boot/permission-rules-audit.d.ts +2 -2
- package/dist/boot/reapers.d.ts +8 -8
- package/dist/boot/resolve-spec.d.ts +4 -4
- package/dist/boot/resolve-spec.js +1 -3
- package/dist/boot/retention-lane.d.ts +1 -1
- package/dist/boot/runner-deps.d.ts +53 -27
- package/dist/boot/runner-deps.js +16 -9
- package/dist/boot/runtime-caps.d.ts +4 -4
- package/dist/boot/session-faces.d.ts +1 -1
- package/dist/boot/shutdown.d.ts +10 -10
- package/dist/boot/shutdown.js +1 -1
- package/dist/boot/side-query-lane.d.ts +14 -14
- package/dist/boot/stores.js +5 -0
- package/dist/boot/task-list-lane.d.ts +3 -3
- package/dist/boot/webfetch-summarize-lane.d.ts +9 -9
- package/dist/boot/workflow-orchestration.d.ts +1 -1
- package/dist/bounded-session-map.d.ts +1 -1
- package/dist/brain.d.ts +3 -3
- package/dist/budget.d.ts +3 -3
- package/dist/canonical-json.d.ts +53 -0
- package/dist/canonical-json.js +48 -0
- package/dist/capabilities/center-prompts.d.ts +13 -13
- package/dist/capabilities/collab-workflows.d.ts +1 -1
- package/dist/capabilities/hands-lane.d.ts +4 -4
- package/dist/capabilities/memory-notice.d.ts +4 -4
- package/dist/capabilities/prompt.d.ts +2 -2
- package/dist/capabilities/sandbox-file-send.d.ts +2 -2
- package/dist/capabilities/scenarios.d.ts +16 -16
- package/dist/capabilities/skills.d.ts +1 -1
- package/dist/capabilities/team.d.ts +13 -12
- package/dist/capabilities/tool-defer.d.ts +6 -6
- package/dist/config-catalog.d.ts +139 -0
- package/dist/config-catalog.js +556 -0
- package/dist/config-center/apply-effective.d.ts +42 -30
- package/dist/config-center/apply-effective.js +69 -62
- package/dist/config-center/apply-ledger.d.ts +6 -6
- package/dist/config-center/effective-keys.d.ts +30 -0
- package/dist/config-center/effective-keys.js +49 -0
- package/dist/config-center/facade.d.ts +6 -5
- package/dist/config-center/facade.js +1 -1
- package/dist/config-center/hot-keys-registry.d.ts +2 -2
- package/dist/config-center/http-client.d.ts +5 -5
- package/dist/config-center/mcp-revocation.d.ts +6 -4
- package/dist/config-center/mcp-revocation.js +2 -12
- package/dist/config-center/restart-signal.d.ts +11 -1
- package/dist/config-center/restart-signal.js +4 -10
- package/dist/config-center/skills-mcp.d.ts +2 -2
- package/dist/config-center/stage-limits.d.ts +3 -3
- package/dist/config-center/types.d.ts +42 -59
- package/dist/config-invariants.d.ts +1 -1
- package/dist/config-lkg.js +7 -1
- package/dist/config-provider.d.ts +2 -2
- package/dist/config-provider.js +1 -1
- package/dist/config-types.d.ts +140 -132
- package/dist/config.d.ts +22 -22
- package/dist/config.js +2 -1
- package/dist/degenerate-instrument.d.ts +1 -1
- package/dist/deployment-governance.d.ts +13 -13
- package/dist/device-enrollment.d.ts +5 -3
- package/dist/device-store.d.ts +17 -3
- package/dist/device-store.js +2 -0
- package/dist/device-ws-hub.d.ts +10 -5
- package/dist/device-ws-hub.js +25 -5
- package/dist/device-ws-protocol.d.ts +3 -3
- package/dist/digest-form.d.ts +1 -1
- package/dist/elicitation.d.ts +1 -1
- package/dist/env-facts.d.ts +7 -7
- package/dist/execution-lane-caps.d.ts +5 -5
- package/dist/fleet/fleet-bus.d.ts +53 -53
- package/dist/fleet/fleet-reconciler.d.ts +2 -2
- package/dist/fleet/fleet-terminal-window.d.ts +1 -1
- package/dist/fleet/subagent-tail-bus.d.ts +3 -3
- package/dist/fleet-client.d.ts +3 -3
- package/dist/fleet-lease.d.ts +1 -1
- package/dist/hooks/branch-transcript.d.ts +2 -2
- package/dist/hooks/cc-agent-hook-prompt.d.ts +2 -2
- package/dist/hooks/cc-stop-prompt.d.ts +2 -2
- package/dist/hooks/hook-llm.d.ts +1 -1
- package/dist/hooks/hook-runner.d.ts +5 -5
- package/dist/http/active-run-conflict.d.ts +31 -33
- package/dist/http/active-run-conflict.js +4 -2
- package/dist/http/route-ctx.d.ts +22 -22
- package/dist/http/routes/a2a-serve.d.ts +2 -2
- package/dist/http/routes/admin-config-refresh.d.ts +1 -1
- package/dist/http/routes/admin-drain.d.ts +4 -4
- package/dist/http/routes/admin-memory-optout.d.ts +5 -5
- package/dist/http/routes/adoption.d.ts +1 -1
- package/dist/http/routes/agents-roster.d.ts +1 -1
- package/dist/http/routes/approvals-assistant.d.ts +6 -6
- package/dist/http/routes/approvals-assistant.js +4 -1
- package/dist/http/routes/capabilities.d.ts +1 -1
- package/dist/http/routes/capabilities.js +1 -0
- package/dist/http/routes/config-catalog.d.ts +28 -0
- package/dist/http/routes/config-catalog.js +42 -0
- package/dist/http/routes/diagnostics.d.ts +2 -2
- package/dist/http/routes/fleet.d.ts +1 -1
- package/dist/http/routes/images.d.ts +1 -1
- package/dist/http/routes/leader.d.ts +1 -1
- package/dist/http/routes/memory-bundle.d.ts +4 -4
- package/dist/http/routes/memory-compliance.d.ts +7 -7
- package/dist/http/routes/memory-consolidation.d.ts +1 -1
- package/dist/http/routes/memory-origin.d.ts +9 -9
- package/dist/http/routes/memory-policy.d.ts +3 -3
- package/dist/http/routes/notify-wake.d.ts +1 -1
- package/dist/http/routes/observability.d.ts +1 -1
- package/dist/http/routes/retention-ops.d.ts +1 -1
- package/dist/http/routes/rules.d.ts +3 -3
- package/dist/http/routes/run-memory-capture.d.ts +1 -1
- package/dist/http/routes/runs.d.ts +3 -3
- package/dist/http/routes/runs.js +12 -17
- package/dist/http/routes/session-sync.d.ts +2 -2
- package/dist/http/routes/sessions-list.d.ts +1 -1
- package/dist/http/routes/sessions.d.ts +9 -1
- package/dist/http/routes/sessions.js +60 -0
- package/dist/http/routes/shared-memory.d.ts +1 -1
- package/dist/http/routes/side-query.d.ts +1 -1
- package/dist/http/routes/tasks.d.ts +1 -1
- package/dist/http/routes/trace-usage.d.ts +1 -1
- package/dist/http/routes/workflows.d.ts +1 -1
- package/dist/http/run-meta.d.ts +1 -1
- package/dist/http/send.d.ts +6 -6
- package/dist/http/server.d.ts +84 -67
- package/dist/http/server.js +39 -10
- package/dist/http/sse-lifecycle.d.ts +1 -1
- package/dist/http/sse-log.d.ts +6 -6
- package/dist/http/verify-rounds.d.ts +3 -3
- package/dist/http/wire-gate.d.ts +2 -2
- package/dist/http/wire-types.d.ts +57 -38
- package/dist/key-resolver.d.ts +1 -1
- package/dist/leader/diffout.d.ts +2 -2
- package/dist/leader/diffup.d.ts +1 -1
- package/dist/leader/endpoint.d.ts +1 -1
- package/dist/leader/fanout.d.ts +6 -6
- package/dist/leader/grader-env-factory.d.ts +1 -1
- package/dist/leader/leader.d.ts +12 -12
- package/dist/leader/merge.d.ts +3 -3
- package/dist/leader/planner.d.ts +5 -5
- package/dist/leader/repair-oracle.d.ts +1 -1
- package/dist/leader/wire.d.ts +21 -9
- package/dist/leader/wire.js +6 -5
- package/dist/lsp/manager.d.ts +2 -2
- package/dist/lsp/types.d.ts +1 -1
- package/dist/lsp/ws-transport.d.ts +2 -2
- package/dist/main.js +12 -2
- package/dist/mcp-content-origin.d.ts +1 -1
- package/dist/memory-bundle-engine.d.ts +5 -3
- package/dist/memory-bundle-engine.js +2 -2
- package/dist/memory-operator-faces.d.ts +41 -11
- package/dist/memory-operator-faces.js +12 -0
- package/dist/memory-origin-fence.d.ts +1 -1
- package/dist/memory-origin-fence.js +2 -13
- package/dist/memory-posture.d.ts +6 -6
- package/dist/memory-scope.d.ts +7 -7
- package/dist/model-select.d.ts +5 -5
- package/dist/observability/cost-quota.d.ts +6 -6
- package/dist/observability/cost-taxonomy.d.ts +2 -2
- package/dist/observability/fail-open.d.ts +17 -5
- package/dist/observability/fail-open.js +16 -4
- package/dist/observability/metrics.d.ts +1 -1
- package/dist/observability/prompt-manifest.d.ts +8 -8
- package/dist/observability/rate-limit.d.ts +2 -2
- package/dist/observability/secret-env-scrub.d.ts +1 -1
- package/dist/observability/tool-trace.d.ts +1 -1
- package/dist/orchestration/hardened-vm-runner.d.ts +6 -6
- package/dist/orchestration/hardened-vm-worker-runner.d.ts +1 -1
- package/dist/orchestration/subagent-steer.d.ts +3 -3
- package/dist/orchestration/workflow-agent-steer.d.ts +1 -1
- package/dist/orchestration/workflow-completion-inbox.d.ts +6 -6
- package/dist/orchestration/workflow-notify-journal.d.ts +6 -6
- package/dist/parent-watch.d.ts +1 -1
- package/dist/parked-decide.d.ts +11 -11
- package/dist/plan-cache-probe.d.ts +1 -1
- package/dist/plugins/adoption-log-sql.d.ts +4 -4
- package/dist/plugins/approval-ask-store-memory.d.ts +1 -1
- package/dist/plugins/approval-ask-store-memory.js +12 -0
- package/dist/plugins/approval-ask-store-sql.d.ts +39 -17
- package/dist/plugins/approval-ask-store-sql.js +23 -6
- package/dist/plugins/approval-payload-fingerprint.d.ts +23 -0
- package/dist/plugins/approval-payload-fingerprint.js +23 -0
- package/dist/plugins/background-agent-store-sql.d.ts +8 -8
- package/dist/plugins/background-shell-support.d.ts +12 -12
- package/dist/plugins/blob-backend.d.ts +3 -3
- package/dist/plugins/breaker-state-sql.d.ts +3 -3
- package/dist/plugins/caching-session-store.d.ts +6 -6
- package/dist/plugins/checkpoint-store-sql.d.ts +162 -66
- package/dist/plugins/checkpoint-store-sql.js +76 -33
- package/dist/plugins/device-store-sql.d.ts +4 -3
- package/dist/plugins/e2b-orphan-reclaim.d.ts +3 -3
- package/dist/plugins/file-history-store-sql.d.ts +9 -8
- package/dist/plugins/file-run-store.d.ts +27 -27
- package/dist/plugins/fork-routing-session-store.d.ts +9 -9
- package/dist/plugins/image-bake-store-sql.d.ts +1 -1
- package/dist/plugins/image-index-sql.d.ts +2 -2
- package/dist/plugins/k8s-bg-scripts.d.ts +1 -1
- package/dist/plugins/k8s-exec-protocol.d.ts +1 -1
- package/dist/plugins/leader-run-store-sql.d.ts +1 -1
- package/dist/plugins/local-checkpoint-store.d.ts +26 -17
- package/dist/plugins/local-checkpoint-store.js +21 -11
- package/dist/plugins/local-session-store.d.ts +5 -5
- package/dist/plugins/mailbox-store-sql.d.ts +6 -6
- package/dist/plugins/memory-embedder-fingerprint.d.ts +2 -2
- package/dist/plugins/memory-engine-pg.d.ts +1 -1
- package/dist/plugins/memory-engine-tidb.d.ts +1 -1
- package/dist/plugins/memory-key-guards.d.ts +3 -3
- package/dist/plugins/memory-optout-grant-store-sql.d.ts +10 -10
- package/dist/plugins/memory-origin-law.d.ts +13 -13
- package/dist/plugins/memory-run-store.d.ts +12 -12
- package/dist/plugins/outcome-ledger-sql.d.ts +3 -3
- package/dist/plugins/permission-rule-store-file.d.ts +3 -3
- package/dist/plugins/permission-rule-store-sql.d.ts +38 -33
- package/dist/plugins/permission-rule-store-sql.js +7 -12
- package/dist/plugins/pg-cost-quota.d.ts +2 -2
- package/dist/plugins/pg-pool.d.ts +29 -2
- package/dist/plugins/pg-pool.js +50 -2
- package/dist/plugins/pg-query.d.ts +1 -1
- package/dist/plugins/pg-rate-limiter.d.ts +2 -2
- package/dist/plugins/pg-session-storage.d.ts +9 -9
- package/dist/plugins/remote-env-adb.d.ts +1 -1
- package/dist/plugins/remote-env-device.d.ts +6 -4
- package/dist/plugins/remote-env-device.js +4 -1
- package/dist/plugins/remote-env-e2b.d.ts +11 -11
- package/dist/plugins/remote-env-file-error.d.ts +2 -2
- package/dist/plugins/remote-env-host.d.ts +10 -10
- package/dist/plugins/remote-env-k8s.d.ts +7 -7
- package/dist/plugins/remote-env-local-docker.d.ts +1 -1
- package/dist/plugins/remote-env-ssh.d.ts +9 -9
- package/dist/plugins/remote-scratchpad.d.ts +1 -1
- package/dist/plugins/resume-anchor-store-sql.d.ts +1 -1
- package/dist/plugins/retention-lane-store-sql.d.ts +2 -2
- package/dist/plugins/retention-store-sql.d.ts +11 -11
- package/dist/plugins/roster-store-sql.d.ts +6 -8
- package/dist/plugins/run-store-sql.d.ts +12 -12
- package/dist/plugins/scheduler-support.d.ts +1 -1
- package/dist/plugins/send-user-file.d.ts +1 -1
- package/dist/plugins/session-capture-record-store-sql.d.ts +99 -0
- package/dist/plugins/session-capture-record-store-sql.js +110 -0
- package/dist/plugins/session-placement.d.ts +1 -1
- package/dist/plugins/session-policy-store-sql.d.ts +2 -2
- package/dist/plugins/session-store.d.ts +3 -3
- package/dist/plugins/shared-memory-store-sql.d.ts +5 -5
- package/dist/plugins/sql-driver.d.ts +7 -7
- package/dist/plugins/sql-errors.d.ts +2 -2
- package/dist/plugins/sql-escape.d.ts +1 -1
- package/dist/plugins/sql-row-helpers.d.ts +1 -1
- package/dist/plugins/store-backend.d.ts +32 -19
- package/dist/plugins/store-backend.js +5 -1
- package/dist/plugins/store-contracts.d.ts +9 -9
- package/dist/plugins/task-list-store-sql.d.ts +3 -3
- package/dist/plugins/tidb-cost-quota.d.ts +3 -3
- package/dist/plugins/tidb-pool.d.ts +13 -0
- package/dist/plugins/tidb-pool.js +9 -0
- package/dist/plugins/tidb-rate-limiter.d.ts +2 -2
- package/dist/plugins/tidb-session-storage.d.ts +2 -2
- package/dist/plugins/tidb-session-store.d.ts +11 -11
- package/dist/plugins/tool-result-store-sql.d.ts +8 -8
- package/dist/plugins/usage-window-store-sql.d.ts +3 -3
- package/dist/plugins/web-search.d.ts +7 -7
- package/dist/plugins/workflow-journal-store-sql.d.ts +6 -6
- package/dist/plugins/workflow-run-store-sql.d.ts +1 -1
- package/dist/plugins/write-behind-counter.d.ts +6 -6
- package/dist/principal-jwt.d.ts +2 -2
- package/dist/project-memory.d.ts +1 -1
- package/dist/prompts-domain-validate.d.ts +8 -8
- package/dist/question.d.ts +3 -3
- package/dist/resource-suspend.d.ts +4 -4
- package/dist/resource-window.d.ts +3 -3
- package/dist/router/route-orchestration.d.ts +1 -1
- package/dist/rules-consent.d.ts +48 -40
- package/dist/run-local.d.ts +5 -5
- package/dist/runs.d.ts +19 -19
- package/dist/runtime-caps-resolver.d.ts +6 -6
- package/dist/runtime-governance.d.ts +11 -7
- package/dist/runtime-governance.js +23 -1
- package/dist/security.d.ts +13 -13
- package/dist/session-leaf-bus.d.ts +1 -1
- package/dist/session-sync-content.d.ts +4 -4
- package/dist/session-sync-kernel.d.ts +2 -2
- package/dist/session-sync.d.ts +13 -13
- package/dist/session-titler.d.ts +1 -1
- package/dist/session-watch.d.ts +3 -3
- package/dist/shared-memory-scope-authorizer.d.ts +4 -4
- package/dist/sighup-idle.d.ts +1 -1
- package/dist/spec-fields.d.ts +20 -20
- package/dist/ssh-host-key.d.ts +5 -5
- package/dist/store-live-probe.d.ts +2 -2
- package/dist/task-cwd.d.ts +11 -11
- package/dist/task-mcp.d.ts +5 -5
- package/dist/task-settings.d.ts +35 -35
- package/dist/task-workflow.d.ts +3 -3
- package/dist/text-bidi.d.ts +1 -1
- package/dist/tool-approval.d.ts +186 -182
- package/dist/tool-approval.js +247 -120
- package/dist/trace/core-keyset-guard.d.ts +19 -5
- package/dist/trace/engine-notice-wire.d.ts +7 -7
- package/dist/trace/engine-notice-wire.js +2 -0
- package/dist/trace/injection-tier.d.ts +11 -21
- package/dist/trace/injection-tier.js +3 -4
- package/dist/trace/ledger-events.d.ts +3 -3
- package/dist/trace/ledger-sink.d.ts +7 -7
- package/dist/trace/project.d.ts +31 -30
- package/dist/trace/project.js +1 -0
- package/dist/turn-activity.d.ts +4 -4
- package/dist/usage-analytics.d.ts +1 -1
- package/dist/wall-clock-jump-guard.d.ts +3 -3
- package/package.json +6 -6
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { stableStringify } from "./restart-signal.js";
|
|
1
2
|
export function createMcpRevocationLedger(onChange) {
|
|
2
3
|
let baseline;
|
|
3
4
|
let seen;
|
|
@@ -40,19 +41,8 @@ export function enabledMcpEntries(mcp) {
|
|
|
40
41
|
const out = new Map();
|
|
41
42
|
for (const s of mcp.servers) {
|
|
42
43
|
if (s.enabled !== false)
|
|
43
|
-
out.set(s.name,
|
|
44
|
+
out.set(s.name, stableStringify(s));
|
|
44
45
|
}
|
|
45
46
|
return out;
|
|
46
47
|
}
|
|
47
|
-
function fingerprintOf(v) {
|
|
48
|
-
if (v === null || typeof v !== "object")
|
|
49
|
-
return JSON.stringify(v) ?? "null";
|
|
50
|
-
if (Array.isArray(v))
|
|
51
|
-
return `[${v.map(fingerprintOf).join(",")}]`;
|
|
52
|
-
const obj = v;
|
|
53
|
-
return `{${Object.keys(obj)
|
|
54
|
-
.sort()
|
|
55
|
-
.map((k) => `${JSON.stringify(k)}:${fingerprintOf(obj[k])}`)
|
|
56
|
-
.join(",")}}`;
|
|
57
|
-
}
|
|
58
48
|
//# sourceMappingURL=mcp-revocation.js.map
|
|
@@ -12,7 +12,7 @@ export interface RestartSliceCtx {
|
|
|
12
12
|
* 所以它们的变化不该产生 restart 理由 —— 否则 center 改一个本机用不上的键,整片 fleet 会为一次
|
|
13
13
|
* 对自己毫无影响的发布滚动重启一遍。缺席 = 没有 env 覆盖 ⇒ 整域都算数(与旧行为一致)。 */
|
|
14
14
|
readFaceEnvHeld?: readonly ("face" | "denyPatterns" | "denyBuiltinTiers" | "denyBuiltinExclude")[];
|
|
15
|
-
/**
|
|
15
|
+
/** [ref](core 5.50 [ref]):撤销台账腿已接线(`RunnerDeps.mcpRevocations` 席在场且 refresh 拍在喂)。
|
|
16
16
|
* true ⇒ mcp 片的**纯删除向**(current 的 enabled 集是 boot 集的逐字子集)不再签 restart —— 删除已被
|
|
17
17
|
* 台账即时承接(core 每次 dispatch 前探 isRevoked),再签就是为一个已生效的变更滚动重启 fleet。
|
|
18
18
|
* 新增/改址/域整体出现或消失仍签(新 mount / 改址只能 restart 才生效)。缺席/false = 旧语义照签
|
|
@@ -31,6 +31,16 @@ export interface RestartSignal {
|
|
|
31
31
|
/** Epoch ms when this restart first became required (stable across refreshes while `reasons` is unchanged). */
|
|
32
32
|
since: number;
|
|
33
33
|
}
|
|
34
|
+
/** Canonical, key-sorted JSON (array order preserved) so two semantically-equal effective slices fingerprint
|
|
35
|
+
* identically regardless of object key order from the center serializer.
|
|
36
|
+
*
|
|
37
|
+
* ⚠️ [ref](2026-08-31)如实登记:这**不是** `src/canonical-json.ts#canonicalJson`(core 逐字港,全仓单源)——
|
|
38
|
+
* 两者在 JSON 形输入上逐字节相同(golden 交叉读数已证),但本函数把 `undefined` 值键**保留为 `"k":null`**,
|
|
39
|
+
* 共享件按 `JSON.stringify` 语义**省略**。restart 指纹的输入是进程内构造的切片对象(zod 解析产物 + rest 展开/
|
|
40
|
+
* 挑字段),`{k: undefined}` 形原则上可达,而它与 `{}` 是否同指纹 = 本轴上的**行为**(多签/少签一次 fleet 滚动
|
|
41
|
+
* 重启),不是序列化器的私事 ⇒ 语义不恒等不合并;字节钉 test/canonical-json-golden.test.ts,K→O 统一另立件
|
|
42
|
+
* 走三问。导出只为 mcp-revocation 同源改调(两处此前各持一份逐字相同的复刻)与 golden 直钉,不是公共 API。 */
|
|
43
|
+
export declare function stableStringify(v: unknown): string;
|
|
34
44
|
/** Restart-to-apply slices that DIFFER between this process's BOOT config and a freshly-pulled one. Empty =
|
|
35
45
|
* nothing baked-at-boot changed (only hot-apply slices moved, or nothing) → no restart needed. An orchestrator
|
|
36
46
|
* can auto rolling-restart on a non-empty result WITHOUT a restart loop, because the comparison is always
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveActiveTiers } from "@sema-agent/settings-schema";
|
|
2
|
-
import {
|
|
2
|
+
import { resolveDefaultModelName } from "./apply-effective.js";
|
|
3
3
|
const RESTART_SLICES = ["skills", "mcp", "a2a", "scenarios", "runtime-gates", "models-tiers", "degrade-route", "read-face"];
|
|
4
|
-
function stableStringify(v) {
|
|
4
|
+
export function stableStringify(v) {
|
|
5
5
|
if (v === null || typeof v !== "object")
|
|
6
6
|
return JSON.stringify(v) ?? "null";
|
|
7
7
|
if (Array.isArray(v))
|
|
@@ -38,14 +38,8 @@ function restartSliceValue(eff, slice, ctx) {
|
|
|
38
38
|
case "scenarios":
|
|
39
39
|
return enabledOnly(eff.scenarios?.scenarios);
|
|
40
40
|
case "runtime-gates": {
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
return null;
|
|
44
|
-
const present = {};
|
|
45
|
-
for (const k of RUNTIME_GATE_KEYS)
|
|
46
|
-
if (!HOT_RUNTIME_GATE_KEYS.has(k) && runtimeGatePresent(rt, k))
|
|
47
|
-
present[k] = rt[k];
|
|
48
|
-
return Object.keys(present).length ? present : null;
|
|
41
|
+
const ar = eff.governance?.approvalRequire;
|
|
42
|
+
return Array.isArray(ar) ? { approvalRequire: ar } : null;
|
|
49
43
|
}
|
|
50
44
|
case "models-tiers": {
|
|
51
45
|
const active = eff.models ? resolveActiveTiers(eff.models) : undefined;
|
|
@@ -4,7 +4,7 @@ import type { Logger } from "../observability/logger.js";
|
|
|
4
4
|
import type { LoadedSkill } from "../capabilities/skills.js";
|
|
5
5
|
import type { CenterA2aPeer, CenterMcpServer, CenterSkillManifest } from "./types.js";
|
|
6
6
|
/**
|
|
7
|
-
* Merge center skills OVER the image baseline (
|
|
7
|
+
* Merge center skills OVER the image baseline ([ref]-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
|
|
@@ -28,7 +28,7 @@ export declare function resolveMcpServers(mcp: {
|
|
|
28
28
|
servers: CenterMcpServer[];
|
|
29
29
|
}, logger?: Logger): ScopedMcpServer[];
|
|
30
30
|
/** The MCP servers applicable to a scenario: tagged with it, or untagged (global). undefined when none.
|
|
31
|
-
*
|
|
31
|
+
* [ref]:alias 窗撤销,单键命中(同 `skillsForScenario`)。 */
|
|
32
32
|
export declare function mcpForScenario(servers: ScopedMcpServer[] | undefined, scenario: string): McpServerSpec[] | undefined;
|
|
33
33
|
/**
|
|
34
34
|
* DESIGN-269 §2.1 —— resolve center A2A peers (`/effective.a2a`) into core `A2aServerSpec`s + the scenarios
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* [ref] 批1 —— limitsHttp 组的 **stage 半场**([ref] 手法 A′ + B 簇1)。
|
|
3
3
|
*
|
|
4
4
|
* 形与 `stageApprovalRequire` 同族:一切可抛/可判的事在 stage 做,commit 段只剩纯赋值。三条本域纪律:
|
|
5
5
|
*
|
|
6
6
|
* 1. **非粘**(applyRuntimeHot 的 NON-STICKY 同源):每次 apply 都从 **env 基线**重算 `present ? center : baseline`
|
|
7
7
|
* ——center 撤键 ⇒ 回 env 底。「缺席=保上一个 center 值」会把一次已经撤回的限额永久冻在进程里。
|
|
8
|
-
* 2. **整批原子**(
|
|
9
|
-
* 合法键也不落地,旧值继续服务,拒因响亮点名键(
|
|
8
|
+
* 2. **整批原子**([ref] §0③ + §4 混批零变异):本域任一键坏值/任一跨键不变量不过 ⇒ **整批拒**,
|
|
9
|
+
* 合法键也不落地,旧值继续服务,拒因响亮点名键([ref] 法)。半应用一个限额面 = 运营看到的数字与真门
|
|
10
10
|
* 不是同一代,比整批拒糟得多。
|
|
11
11
|
* 3. **判据单源**:跨键不变量走 `config-invariants.ts` 的同一张表(boot 与 stage 同表);数值下限走
|
|
12
12
|
* config.ts 导出的同一组 floor 常量(env 腿夹取、center 腿拒——**判据阈值同源,处置刻意不同**:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* config-center wire types — the config-center `/api/config/effective` payload shapes (`CenterModel`,
|
|
3
|
-
* `
|
|
3
|
+
* `CenterSkillManifest`, `CenterMcpServer`, `CenterA2aPeer`, `EffectiveConfig`) plus the per-principal
|
|
4
4
|
* execution/session-mirror ruling shapes riding the caps view (`ExecutionRuling`/`SessionMirrorRuling`).
|
|
5
|
-
* Pure type/interface declarations — no runtime logic. Split out of `facade.ts` (
|
|
5
|
+
* Pure type/interface declarations — no runtime logic. Split out of `facade.ts` ([ref] A13,
|
|
6
6
|
* internal-lossless: the facade re-exports every symbol below unchanged).
|
|
7
7
|
*/
|
|
8
8
|
import type { ToolContentOrigin } from "@sema-agent/core";
|
|
@@ -30,11 +30,11 @@ export interface CenterModel {
|
|
|
30
30
|
vision?: boolean;
|
|
31
31
|
contextWindow?: number;
|
|
32
32
|
maxTokens?: number;
|
|
33
|
-
/** [
|
|
33
|
+
/** [ref]① 1M dual-window (core 1.289 `Model.autoCompactTokens`): an EXPLICIT roster value wins the
|
|
34
34
|
* contextWindow derivation in toModel (applyAutoCompactWindow). Declared on the type face (codex F5) so the
|
|
35
35
|
* config-provider local-lane projection carries it — toModel keeps its structural read for older shapes. */
|
|
36
36
|
autoCompactTokens?: number;
|
|
37
|
-
/**
|
|
37
|
+
/** [ref] D2 (core 1.226): chars ≈ 1 token for this model's tokenizer, feeding every structural
|
|
38
38
|
* (non-usage-anchored) token estimate. CJK-heavy models should declare 2–3; absent → env default → core 4. */
|
|
39
39
|
charsPerToken?: number;
|
|
40
40
|
cost?: {
|
|
@@ -47,7 +47,7 @@ export interface CenterModel {
|
|
|
47
47
|
* 记账时固化进 UsageEntry.{weightedTokens,quotaWeightAtUse} 与 lease weightedTokens 轴;改倍率只影响
|
|
48
48
|
* 此后记账,不回算窗口内历史(registry types.d.ts 同句契约)。 */
|
|
49
49
|
quotaWeight?: number;
|
|
50
|
-
/**
|
|
50
|
+
/** [ref] L2②: per-model declarative thinking config (center roster). defaultThinking = this model's DEFAULT
|
|
51
51
|
* tier (resolution chain spec.thinking ?? role.thinking ?? model.defaultThinking); reasoningEffortLevels (openai
|
|
52
52
|
* endpoints) = tiers the endpoint accepts. Validated against core's ThinkingLevel in toModel; "off" is dropped. */
|
|
53
53
|
defaultThinking?: string;
|
|
@@ -58,10 +58,10 @@ export interface CenterModel {
|
|
|
58
58
|
* the ONLY way to keep per-model tuning that lived in env (`MODEL_FREQUENCY_PENALTY` etc.) — see the
|
|
59
59
|
* review-gw heterogeneous-roster migration. MUST be static per published version (prompt-cache prefix). */
|
|
60
60
|
extraBody?: Record<string, unknown>;
|
|
61
|
-
/** registry-core 0.10.13 ([
|
|
61
|
+
/** registry-core 0.10.13 ([ref]/[ref]⑤c): per-model behavior-slot mitigation sentences, mirrors core
|
|
62
62
|
* `Model.promptGuidance` (core 1.303+ assembles them into the volatile tail's per-model position).
|
|
63
63
|
* Same category as `extraBody`: logical model metadata, carried verbatim — without this projection the
|
|
64
|
-
* configured sentences parse fine in registry-core but never reach the assembly face ([
|
|
64
|
+
* configured sentences parse fine in registry-core but never reach the assembly face ([ref]① 排雷:
|
|
65
65
|
* the missing leg made every promptGuidance pilot a false control). */
|
|
66
66
|
promptGuidance?: string[];
|
|
67
67
|
enabled?: boolean;
|
|
@@ -71,24 +71,6 @@ export type CenterRoleTarget = {
|
|
|
71
71
|
} | {
|
|
72
72
|
select: unknown;
|
|
73
73
|
};
|
|
74
|
-
export interface CenterTeam {
|
|
75
|
-
name: string;
|
|
76
|
-
members: {
|
|
77
|
-
role: string;
|
|
78
|
-
modelRole?: string;
|
|
79
|
-
model?: string;
|
|
80
|
-
systemPrompt?: string;
|
|
81
|
-
}[];
|
|
82
|
-
rounds: number;
|
|
83
|
-
synthesizer?: {
|
|
84
|
-
role: string;
|
|
85
|
-
modelRole?: string;
|
|
86
|
-
systemPrompt?: string;
|
|
87
|
-
};
|
|
88
|
-
scenario?: string;
|
|
89
|
-
maxTranscriptTokens?: number;
|
|
90
|
-
enabled?: boolean;
|
|
91
|
-
}
|
|
92
74
|
/** Skill MANIFEST entry (content is NOT inline — fetched by hash; see `fetchSkillContent`). */
|
|
93
75
|
export interface CenterSkillManifest {
|
|
94
76
|
name: string;
|
|
@@ -109,7 +91,7 @@ export interface CenterMcpServer {
|
|
|
109
91
|
* loop unless an operator explicitly opts it in. */
|
|
110
92
|
elicitation?: boolean;
|
|
111
93
|
/**
|
|
112
|
-
*
|
|
94
|
+
* [ref](core 5.60.0)—— 声明**这台 server 的整套工具**带回来的内容属于哪一类,映射到
|
|
113
95
|
* `McpServerSpec.contentOrigin`。`"local"` / `"execution"` ⇒ 这台 server 的调用不再给本会话记忆打
|
|
114
96
|
* 「已接触外来内容」标(`execution` 仍留在 `execIsExternalContent` 那只旋钮的射程内);`"external"` 是
|
|
115
97
|
* 显式 PIN,而**PIN 不是空操作** —— 它会取消 `trustedTools` 对这台 server 的按名豁免。
|
|
@@ -121,9 +103,13 @@ export interface CenterMcpServer {
|
|
|
121
103
|
* 所以它的家在 center 下发这条腿;请求腿那半场的门与结构性兑现见 `task-mcp.ts`
|
|
122
104
|
* 的 `assertRequestMcpContentOrigin` 顶注。
|
|
123
105
|
*
|
|
124
|
-
* ⚠️
|
|
125
|
-
*
|
|
126
|
-
* `
|
|
106
|
+
* ⚠️ **两条腿今天都到不了这里**([ref]③ / [ref]③ / [ref],2026-08-31 双绊线实测更正 —— 本注旧版那句
|
|
107
|
+
* 「远端 /effective.mcp 腿是直读 JSON,今天就通」**不成立**,doc-rot):settings-schema(原 registry-core)
|
|
108
|
+
* 的 `McpServerSpec` 是默认 strip 的 zod object 且没有 `contentOrigin` 可选键,本地腿在 FileConfigStore 的
|
|
109
|
+
* `parseDomainLoud(DOMAIN_SCHEMAS.mcp)`、远端腿在消费端边界 `readEffectiveWire`([ref] 裁B)**各被剥一次**。
|
|
110
|
+
* 修在 sema-settings-schema(补同名可选枚举键 + 发包),本仓提货后 `config-provider.ts` 的映射加一行即通;
|
|
111
|
+
* 两条 `it.fails` 绊线(test/config-center-wire-read.test.ts + test/config-provider.test.ts)在上游到货时
|
|
112
|
+
* 自动翻红逼销账。
|
|
127
113
|
*/
|
|
128
114
|
contentOrigin?: ToolContentOrigin;
|
|
129
115
|
transport: {
|
|
@@ -132,7 +118,7 @@ export interface CenterMcpServer {
|
|
|
132
118
|
args?: string[];
|
|
133
119
|
envRefs?: Record<string, string>;
|
|
134
120
|
}
|
|
135
|
-
/** `principalHeader` (
|
|
121
|
+
/** `principalHeader` ([ref]): the header name into which the runner injects the task's authenticated
|
|
136
122
|
* end-user principal per-task, so a consumer MCP (e.g. oa-mcp) can enforce per-user RBAC. Not a ref — a
|
|
137
123
|
* literal header name. The runner fills the value (never the model). */
|
|
138
124
|
| {
|
|
@@ -159,14 +145,14 @@ export interface CenterA2aPeer {
|
|
|
159
145
|
/** env-NAME refs (header-name → ENV_NAME) resolved from THIS service's env at boot. A peer with ANY
|
|
160
146
|
* unset ref is SKIPPED wholesale (fail-safe — never dial a peer half-credentialed). */
|
|
161
147
|
headerRefs?: Record<string, string>;
|
|
162
|
-
/**
|
|
148
|
+
/** [ref], same contract as the MCP side: the header name the runner injects the task's authenticated
|
|
163
149
|
* end-user principal into. Not a ref — a literal header NAME (the runner fills the value, never the model). */
|
|
164
150
|
principalHeader?: string;
|
|
165
151
|
/** Optional allowlist of the peer's skill ids to mount (others are not mounted). */
|
|
166
152
|
allowSkills?: string[];
|
|
167
153
|
}
|
|
168
154
|
/**
|
|
169
|
-
* #A4([
|
|
155
|
+
* #A4([ref] 窗三件批 件1;[ref]/[ref] 承诺件)—— READ 容纳面的 center 下发形(`CenterA2aPeer` 的
|
|
170
156
|
* 同族:一个 additive 顶层域,server 声明它才不会被静默丢弃)。四个成员逐一对应部署 env 的四键
|
|
171
157
|
* (`READ_FACE` / `READ_DENY_PATTERNS` / `READ_DENY_BUILTIN_TIERS` / `READ_DENY_BUILTIN_EXCLUDE`),
|
|
172
158
|
* 消费半场 = `config-center/read-face.ts` `applyCenterReadFace`。
|
|
@@ -192,11 +178,11 @@ export interface CenterReadFace {
|
|
|
192
178
|
denyBuiltinExclude?: string[];
|
|
193
179
|
}
|
|
194
180
|
/**
|
|
195
|
-
*
|
|
181
|
+
* [ref] 批1 的 wire 面(`EffectiveConfig.limits`)。**全 optional**:缺席 = 本域不管这一键 ⇒ 该键回 env
|
|
196
182
|
* 基线(非粘,applyRuntimeHot 的 NON-STICKY 同族纪律 —— 「缺席=保上一个 center 值」会把撤回的治理永久冻住)。
|
|
197
183
|
*
|
|
198
184
|
* 🔴 类型是**到货 JSON 的声明**,不是运行时保证(local 腿的 eff 来自原始 JSON):每个键在 stage 侧都
|
|
199
|
-
* 逐个验型验域,坏值 ⇒ 整批拒 + 旧值继续服务(
|
|
185
|
+
* 逐个验型验域,坏值 ⇒ 整批拒 + 旧值继续服务([ref] 响亮拒)。
|
|
200
186
|
*/
|
|
201
187
|
export interface EffectiveLimits {
|
|
202
188
|
/** 每 principal 每分钟请求上限;**0 = 关**(关断哨兵,不是缺席)。 */
|
|
@@ -234,7 +220,7 @@ export interface EffectiveLimits {
|
|
|
234
220
|
export interface EffectiveConfig {
|
|
235
221
|
version: number;
|
|
236
222
|
updatedAt: string;
|
|
237
|
-
/** [
|
|
223
|
+
/** [ref]B-6:default/tierGroups/activeTierGroup 收进类型面(registry-core 0.13.0 已声明,
|
|
238
224
|
* types.d.ts:641/679/724)——此前 wire 面靠「JSON verbatim + 消费方结构读」逃逸,投影/消费两侧
|
|
239
225
|
* 各自 as 宽铸。tierGroups 上游是 ZodDefault(合规 center 恒发),但本类型描述的是**到货 JSON**
|
|
240
226
|
* (含非合规/旧存量 center),故仍标 optional——消费方 resolveActiveTiers 自身容缺。 */
|
|
@@ -246,14 +232,8 @@ export interface EffectiveConfig {
|
|
|
246
232
|
tierGroups?: unknown;
|
|
247
233
|
activeTierGroup?: string;
|
|
248
234
|
};
|
|
249
|
-
/**
|
|
250
|
-
*
|
|
251
|
-
* permanent builtin base). */
|
|
252
|
-
teams?: {
|
|
253
|
-
teams: CenterTeam[];
|
|
254
|
-
};
|
|
255
|
-
/** registry-core 0.7 collab domain (teams' successor) — consumed by the slice-① read-only
|
|
256
|
-
* projection (projectCollabToTeams → registerTeams). Both lanes carry it: the remote worker /effective view
|
|
235
|
+
/** registry-core 0.7 collab domain (teams' successor) — consumed by the slice-1.5 projection
|
|
236
|
+
* (projectCollabToWorkflows → registerCollabWorkflows). Both lanes carry it: the remote worker /effective view
|
|
257
237
|
* ships collab, and local FileConfigStore reads config.d/collab.json (PORTABLE_DOMAINS includes collab). */
|
|
258
238
|
collab?: {
|
|
259
239
|
templates: CollabTemplateWire[];
|
|
@@ -281,25 +261,26 @@ export interface EffectiveConfig {
|
|
|
281
261
|
enabled?: boolean;
|
|
282
262
|
}>;
|
|
283
263
|
};
|
|
284
|
-
/**
|
|
285
|
-
*
|
|
286
|
-
*
|
|
264
|
+
/** `runtime` 域 = **限额残余五键**,与 settings-schema `RuntimeConfig` 的键集逐字相等([ref] 件3 对账门
|
|
265
|
+
* test/settings-schema-consumption-gates.test.ts 读 dist `RuntimeConfig.shape` 钉集合等式)。全部 center
|
|
266
|
+
* `.optional()`(center `f95438a`):缺席 = 不管 → 保 env;在场(含显式 0 = "publish OFF")= 覆盖。
|
|
267
|
+
* [ref] 批1 起五键全是**热**键(属主 stage-limits,boot+refresh 双腿);`limits` 域是它们的继任发布位
|
|
268
|
+
* (两处同现 ⇒ limits 赢,见 {@link EffectiveConfig.limits})。
|
|
269
|
+
*
|
|
270
|
+
* 🔴 治理三件(autonomy / commandPolicy / approvalRequire)**不在这里**([ref] 件3 退役键清除):它们自
|
|
271
|
+
* settings-schema 0.6 起住 `governance` 域,0.7.1 撤了 runtime 位的双写镜像;此后 `RuntimeConfig` 是 strip
|
|
272
|
+
* 的 zod object,两条腿(远端 `readEffectiveWire` / 本地 FileConfigStore→`buildEffective`)都把旧位 strip
|
|
273
|
+
* 掉、由 `legacyGovernanceFromRuntime` 抬进 governance ⇒ 本仓在 runtime 位上读它们的每一行都是死码。
|
|
274
|
+
* 旧类型面上留着这三键,让 `runtime-gates` 重启片一直读着一个生产上恒缺席的位(审批闸收紧静默不生效)。 */
|
|
287
275
|
runtime?: {
|
|
288
276
|
rateLimitPerMin?: number;
|
|
289
|
-
approvalRequire?: string[];
|
|
290
277
|
maxTaskCostUsd?: number;
|
|
291
278
|
maxTaskTokens?: number;
|
|
292
279
|
maxPrincipalCostUsd?: number;
|
|
293
280
|
costQuotaWindowSec?: number;
|
|
294
|
-
/** Runtime governance second baton (center §10): autonomy mode + per-command rules. UNLIKE the 6 gates above,
|
|
295
|
-
* these are per-request HOT (read live in resolveSpec, not baked into boot middleware) → applied on boot AND
|
|
296
|
-
* refresh by `applyRuntimeHot` (NOT in RUNTIME_GATE_KEYS / restart-to-apply). Same presence rule (undefined =
|
|
297
|
-
* unmanaged → keep). */
|
|
298
|
-
autonomy?: Autonomy;
|
|
299
|
-
commandPolicy?: CommandRule[];
|
|
300
281
|
};
|
|
301
282
|
/**
|
|
302
|
-
*
|
|
283
|
+
* [ref] 批1 —— **limitsHttp 组的热更新发布域**([ref] §6 批1)。
|
|
303
284
|
*
|
|
304
285
|
* 🔴 为什么是**新顶层域**而不是往 `runtime` 里加键(亲验,不是推测):registry-core 的 `RuntimeConfig`
|
|
305
286
|
* 是 zod `"strip"` 对象,`runtime` 里的未知键在**两条腿上都会被静默剥掉**(local 腿实测
|
|
@@ -320,21 +301,23 @@ export interface EffectiveConfig {
|
|
|
320
301
|
limits?: EffectiveLimits;
|
|
321
302
|
/** 142-S4(registry-core 0.10.0 第 15 域):center 项目登记簿。wire 面 verbatim JSON —
|
|
322
303
|
* registry-core `ProjectsConfig` 的形状是 `{projects: Record<projectId, ProjectRegistration>}`(skills/mcp
|
|
323
|
-
* 同款域包裹)。[
|
|
304
|
+
* 同款域包裹)。[ref]B-8:裸 Record 联合臂随 apply-effective 的宽读一起删(0.13.0 只有包裹形,
|
|
324
305
|
* 裸形无 producer)。消费=applyEffective → config.projects(displayName/gitRemotes/defaultScopes
|
|
325
306
|
* 三个 runtime 字段;审计字段不进 ServiceConfig)。 */
|
|
326
307
|
projects?: {
|
|
327
308
|
projects?: Record<string, unknown>;
|
|
328
309
|
};
|
|
329
|
-
/**
|
|
330
|
-
*
|
|
331
|
-
*
|
|
310
|
+
/** settings-schema 0.6 起治理三件(autonomy/commandPolicy/approvalRequire)的**唯一**承运域(0.7.1 撤
|
|
311
|
+
* runtime 位双写镜像;顺序契约当年已走完:消费端先切、center 再撤)。键集与 schema `GovernanceConfig.shape`
|
|
312
|
+
* 逐字相等([ref] 件3 对账门钉)。消费:autonomy/commandPolicy 逐请求热(`stageRuntimeHot`,boot+refresh);
|
|
313
|
+
* approvalRequire boot-baked(`stageApprovalGate`,refresh 不写)⇒ 变更由 `runtime-gates` 重启片通告。
|
|
314
|
+
* 同一 presence 规则(undefined = 不管 → 保 env / 回基线)。 */
|
|
332
315
|
governance?: {
|
|
333
316
|
autonomy?: Autonomy;
|
|
334
317
|
commandPolicy?: CommandRule[];
|
|
335
318
|
approvalRequire?: string[];
|
|
336
319
|
};
|
|
337
|
-
/** plugins 域(registry-core 0.5 additive;契约冻结 [
|
|
320
|
+
/** plugins 域(registry-core 0.5 additive;契约冻结 [ref]②/[ref]/[ref]①,消费半场 2026-07-28
|
|
338
321
|
* 开工车):center 只存"插件从哪来"(PluginSpec 引用,永不承载可执行字节);worker 半场在
|
|
339
322
|
* capabilities/center-plugins.ts `applyCenterPlugins`(https-only+ALLOW_HOSTS 纵深复验/sha 钉扎/
|
|
340
323
|
* 隔离 clone/LKG/撞名让位)。此前本 interface 无此键 ⇒ wire 上的 plugins 被 server 静默丢弃。 */
|
package/dist/config-lkg.js
CHANGED
|
@@ -47,7 +47,7 @@ export async function loadLkg(path, worker) {
|
|
|
47
47
|
const eff = p.effective;
|
|
48
48
|
if (typeof eff.version !== "number")
|
|
49
49
|
return { reason: "bad effective.version" };
|
|
50
|
-
for (const [domain, arrayKey] of [["models", "models"], ["
|
|
50
|
+
for (const [domain, arrayKey] of [["models", "models"], ["skills", "skills"], ["mcp", "servers"], ["scenarios", "scenarios"], ["runtime", null]]) {
|
|
51
51
|
const v = eff[domain];
|
|
52
52
|
if (v === undefined)
|
|
53
53
|
continue;
|
|
@@ -59,6 +59,12 @@ export async function loadLkg(path, worker) {
|
|
|
59
59
|
return { reason: `bad effective.${domain}.${arrayKey}` };
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
+
{
|
|
63
|
+
const rt = eff.runtime;
|
|
64
|
+
if (rt && (rt.autonomy !== undefined || rt.commandPolicy !== undefined || rt.approvalRequire !== undefined)) {
|
|
65
|
+
return { reason: "legacy runtime governance keys (pre-0.7.1 mirror shape; no contract producer since LKG shipped) — refusing rather than silently dropping governance" };
|
|
66
|
+
}
|
|
67
|
+
}
|
|
62
68
|
const promptsRaw = p.effective.prompts;
|
|
63
69
|
if (promptsRaw !== undefined && !validatePromptsDomain(promptsRaw).ok)
|
|
64
70
|
return { reason: "prompts face fails re-validation" };
|
|
@@ -3,7 +3,7 @@ import { type EffectiveConfig as AgentConfigEffective } from "@sema-agent/settin
|
|
|
3
3
|
import { fetchEffective as remoteFetchEffective, fetchSkillContent as remoteFetchSkillContent, type EffectiveConfig } from "./config-center/facade.js";
|
|
4
4
|
/** Result of a `fetchEffective` — EXACTLY the config-center's return: the effective config + its etag, or
|
|
5
5
|
* `null` for "unchanged" (remote 304; local: the version matched the caller's prior etag).
|
|
6
|
-
* `domainErrors`([
|
|
6
|
+
* `domainErrors`([ref] registry-core 0.10.12 tolerant seam,local lane only):catalog 域坏文件不再
|
|
7
7
|
* 连坐全包回落 env——坏域按该域 schema default 落+错误单列,好域照常生效;caller(main.ts)对每条打
|
|
8
8
|
* per-domain warn 点名坏域。gate 域(governance/rosters/…)坏文件 tolerant 仍 throw(READ 容错不放宽
|
|
9
9
|
* gate fail-loud,registry-core 半场精化)——那条路走既有的整包 catch。 */
|
|
@@ -101,7 +101,7 @@ export declare class LocalConfigProvider implements ConfigProvider {
|
|
|
101
101
|
#private;
|
|
102
102
|
readonly kind: "local";
|
|
103
103
|
private readonly store;
|
|
104
|
-
/** [
|
|
104
|
+
/** [ref]b 可观测性:config_loaded 日志要能回答「到底读的哪个目录」——复验实录:只设 LOCAL_DATA_ROOT 时
|
|
105
105
|
* config.d 静默读不到且 0 模型无告警(CONFIG_LOCAL_DIR 才是本 lane 的选目录旋钮)。 */
|
|
106
106
|
readonly root: string;
|
|
107
107
|
constructor(root: string, store?: FileConfigStore);
|
package/dist/config-provider.js
CHANGED
|
@@ -126,8 +126,8 @@ export function mapToServiceEffective(eff, version) {
|
|
|
126
126
|
...(eff.models.tierGroups !== undefined ? { tierGroups: eff.models.tierGroups } : {}),
|
|
127
127
|
...(eff.models.activeTierGroup !== undefined ? { activeTierGroup: eff.models.activeTierGroup } : {}),
|
|
128
128
|
},
|
|
129
|
-
teams: { teams: [] },
|
|
130
129
|
...(eff.collab?.templates?.length ? { collab: { templates: eff.collab.templates } } : {}),
|
|
130
|
+
...(eff.plugins?.plugins?.length ? { plugins: { plugins: eff.plugins.plugins } } : {}),
|
|
131
131
|
skills: {
|
|
132
132
|
skills: (eff.skills.skills ?? []).map((s) => ({
|
|
133
133
|
name: s.name,
|