@sema-agent/server 7.52.1 → 7.53.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 +2 -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 +2 -0
- 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/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/retention-lane.d.ts +1 -1
- package/dist/boot/runner-deps.d.ts +33 -27
- package/dist/boot/runner-deps.js +2 -1
- 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/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 +3 -3
- 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 +20 -7
- package/dist/config-center/apply-effective.js +45 -0
- package/dist/config-center/apply-ledger.d.ts +6 -6
- package/dist/config-center/facade.d.ts +3 -2
- 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 +1 -1
- 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 +23 -19
- package/dist/config-invariants.d.ts +1 -1
- package/dist/config-provider.d.ts +2 -2
- 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-store.d.ts +2 -2
- package/dist/device-ws-hub.d.ts +3 -3
- 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 +20 -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 +38 -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 +9 -9
- 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 +1 -5
- package/dist/observability/fail-open.js +0 -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.js +5 -0
- 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 +2 -2
- 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 +5 -5
- 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 +4 -0
- 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.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 +7 -7
- 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 +171 -160
- package/dist/tool-approval.js +33 -28
- package/dist/trace/core-keyset-guard.d.ts +19 -5
- package/dist/trace/engine-notice-wire.d.ts +6 -6
- package/dist/trace/injection-tier.d.ts +2 -2
- package/dist/trace/ledger-events.d.ts +3 -3
- package/dist/trace/ledger-sink.d.ts +7 -7
- package/dist/trace/project.d.ts +30 -30
- 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 +5 -5
package/dist/config-types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** [ref] A1: the ServiceConfig TYPE face, split out of the 1.8k-line loader module (config.ts)
|
|
2
2
|
* so pure-type consumers (http/server, plugins/*, hooks/hook-llm, security, brain, sema-registry)
|
|
3
3
|
* depend on a LEAF with zero runtime edges — this is the substantive step that dissolves the
|
|
4
4
|
* type-closed edges into config.ts (lens2 §A). TYPES ONLY: loadConfig and every runtime value stay
|
|
@@ -14,7 +14,7 @@ import type { UnattendedApprovalPolicy } from "./tool-approval.js";
|
|
|
14
14
|
import type { InfraCostRates } from "./observability/cost-taxonomy.js";
|
|
15
15
|
import type { Autonomy, CommandRule } from "./runtime-governance.js";
|
|
16
16
|
import type { GitApiKind } from "./git-api-kind.js";
|
|
17
|
-
/**
|
|
17
|
+
/** [ref]:记忆向量面的 embedder 坐标(env `MEMORY_EMBEDDER_*` 解析结果;单一属主 = 本类型,
|
|
18
18
|
* `plugins/memory-embedder.ts` 的工厂直接消费它,不复制形状)。语义与三问见
|
|
19
19
|
* {@link ServiceConfigFlat.memoryEmbedder}。纯数据 —— 端点原文照存(拼 `/embeddings` 是 transport
|
|
20
20
|
* 的活,与 `memorySync.url` 的尾斜杠口径一致)。 */
|
|
@@ -31,13 +31,13 @@ export interface MemoryEmbedderConfig {
|
|
|
31
31
|
apiKey?: string;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* [ref] §4 —— 托管留存的**灰度档**闭集。`as const` 数组是词表的唯一真源(config 解析、能力位、审计行
|
|
35
35
|
* 的 `mode` 列共读它);两词之外的值在启动期响亮拒 —— 一个拼错的档位静默落回 `audit-only` 会让运维
|
|
36
36
|
* 以为在删、其实没删,而拼成别的方向就是反过来那件更坏的事。
|
|
37
37
|
*/
|
|
38
38
|
export declare const RETENTION_MODES: readonly ["audit-only", "enforce"];
|
|
39
39
|
export type RetentionMode = (typeof RETENTION_MODES)[number];
|
|
40
|
-
/**
|
|
40
|
+
/** [ref] §3/§4 —— sweep lane 的节律与灰度档(语义与三问见 {@link ServiceConfigFlat.retentionSweep})。 */
|
|
41
41
|
export interface RetentionSweepConfig {
|
|
42
42
|
/** `audit-only` = 照跑照判、只记 `audit_only` 行,**不调任何破坏性方法**;`enforce` = 真删。默认前者。 */
|
|
43
43
|
mode: RetentionMode;
|
|
@@ -45,7 +45,7 @@ export interface RetentionSweepConfig {
|
|
|
45
45
|
intervalSec: number;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* [ref] D2 —— 周期腿节律的**下界**(秒)。一轮 consolidation 读全库(~1e5 prompt tokens)且
|
|
49
49
|
* core 自带 24h 的时间闸,比这更密的节律只可能是把分钟/毫秒当成秒写的手滑。夹取(不是拒启)方向安全:
|
|
50
50
|
* 夹上去只会**少**跑,而这条腿花的是钱。
|
|
51
51
|
* ⚠️ 今天这条夹取**还够不着**:本 build 没有周期腿,任何正值在解析期就拒启(见
|
|
@@ -54,7 +54,7 @@ export interface RetentionSweepConfig {
|
|
|
54
54
|
*/
|
|
55
55
|
export declare const MEMORY_CONSOLIDATION_MIN_INTERVAL_SEC = 300;
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* [ref] D1/D2 —— consolidation driver 阀门的三根旋钮(语义与三问见
|
|
58
58
|
* {@link ServiceConfigFlat.memoryConsolidationDriver})。纯数据。
|
|
59
59
|
*/
|
|
60
60
|
export interface MemoryConsolidationDriverConfig {
|
|
@@ -122,7 +122,7 @@ export interface A2aServeSkill {
|
|
|
122
122
|
*
|
|
123
123
|
* `url` is REQUIRED here because it is required when the knob is on: a public discovery document that
|
|
124
124
|
* cannot say where to call is a broken card, and the reachable address is the operator's to declare —
|
|
125
|
-
*
|
|
125
|
+
* [ref] `FLEET_ADVERTISE_ADDRESS` precedent, 不自猜可达地址(deriving it from the request `Host` header
|
|
126
126
|
* would let an anonymous caller decide what our public card advertises).
|
|
127
127
|
*/
|
|
128
128
|
export interface A2aServeConfig {
|
|
@@ -144,15 +144,15 @@ export interface A2aServeConfig {
|
|
|
144
144
|
* off (the control plane never mounts). The runner-facing facts (the runner principal, the build-host CACHE_BASE,
|
|
145
145
|
* the default base ref) live here so image-api injects only VETTED, server-fixed values into the build.sh argv —
|
|
146
146
|
* operator free-text never reaches the runner. */
|
|
147
|
-
/**
|
|
147
|
+
/** [ref] 车3([ref] 流内审批协议)的配置面。总开关默认 **true**(clay 裁 2026-08-08,[ref] 翻真验证后;
|
|
148
148
|
* 树上已生效,发布线落在 7.4.0 之后的下一个发布);四个从属旋钮只在开关为真时生效
|
|
149
149
|
* (语义与「谁需要 / 谁被伤 / 什么补偿」三问见 `ServiceConfigFlat.streamApproval` 的注)。 */
|
|
150
150
|
export interface StreamApprovalConfig {
|
|
151
|
-
/** 协议总开关。`STREAM_APPROVAL_ENABLED`,默认 **true**(clay 裁 2026-08-08
|
|
151
|
+
/** 协议总开关。`STREAM_APPROVAL_ENABLED`,默认 **true**(clay 裁 2026-08-08,[ref] 翻真验证后;7.5.0 起)。显式 false ⇒ 全链逐字 7.3.0 前行为(唯一干净还原键)。
|
|
152
152
|
* 翻真要等回决端点(车4)与对账收敛器(车5)到位——在此之前是个不完整协议(有卡无正规回决口、
|
|
153
153
|
* 有 PARKING 无收敛器、跨副本回决无唤醒路径)。 */
|
|
154
154
|
enabled: boolean;
|
|
155
|
-
/** 开关为真时作为 `ToolApprovalCoordinator` 的 `ttlMs`(
|
|
155
|
+
/** 开关为真时作为 `ToolApprovalCoordinator` 的 `ttlMs`([ref] §3.3 的「配置窗默认」)。
|
|
156
156
|
* `STREAM_ASK_WINDOW_MS`,默认 **300000**(同裁与 sync 腿既有 5min 活卡窗对齐)。`0` = 运维显式关窗 ⇒ 恒 park(§3.3 窗=0 语义)。
|
|
157
157
|
* 开关为假 ⇒ 本值不参与,窗保持既有 `DEFAULT_APPROVAL_TTL_MS`(5min)。 */
|
|
158
158
|
windowMs: number;
|
|
@@ -161,12 +161,12 @@ export interface StreamApprovalConfig {
|
|
|
161
161
|
replayMax: number;
|
|
162
162
|
/** 写侧准入门(§0 X-2)的 per-task 未决 ask 上限。超限 ⇒ 在落 pending/建 timer/发帧**之前**返回
|
|
163
163
|
* `"unavailable"`(park 路由;**缺省 park 政策下永不 deny**——过载 bypass 到 park 是 §3.3 的硬条款。
|
|
164
|
-
*
|
|
164
|
+
* [ref] R-13 C:`UNATTENDED_APPROVAL_POLICY=deny` 的部署按自声明当场拒,理由见该键域注)。
|
|
165
165
|
* `STREAM_APPROVAL_ADMIT_MAX_PER_TASK`,默认 **32**。消费点在刀 3b。 */
|
|
166
166
|
admitMaxPerTask: number;
|
|
167
167
|
/** 同上,per-owner(租户)维。`STREAM_APPROVAL_ADMIT_MAX_PER_OWNER`,默认 **256**。 */
|
|
168
168
|
admitMaxPerOwner: number;
|
|
169
|
-
/**
|
|
169
|
+
/** [ref] 车5 §5 治理旋钮(全部 `numEnvBounded` 有界解析,§9 C6)—— 对账收敛器每 tick **每段**
|
|
170
170
|
* (PARKING / 孤儿 STREAM_PENDING)最多处理的行数。超出的下轮接着扫(靠 `deferReconcile` 的队列
|
|
171
171
|
* 轮转保证「接着」是真的,不是永远同一批)。`STREAM_APPROVAL_RECONCILE_BATCH`,默认 **200**,
|
|
172
172
|
* 有界 [1, 10000]。 */
|
|
@@ -184,12 +184,12 @@ export interface StreamApprovalConfig {
|
|
|
184
184
|
* 默认 **7d**,有界 [60000, 90d]。 */
|
|
185
185
|
orphanTtlMs: number;
|
|
186
186
|
/**
|
|
187
|
-
*
|
|
188
|
-
* 默认 **3600000**(1h),有界 [60000, 86400000](60s ~ 24h),坏值/越界**拒启**(
|
|
187
|
+
* [ref](案A,[ref] / core [ref])—— **零活流铸造**的 ask 的悬挂窗。`UNREACHED_ASK_TTL_MS`,
|
|
188
|
+
* 默认 **3600000**(1h),有界 [60000, 86400000](60s ~ 24h),坏值/越界**拒启**([ref] A 档)。
|
|
189
189
|
*
|
|
190
190
|
* 三问(behavior-facing 硬条款):
|
|
191
191
|
* · **谁需要**:workflow 恒后台跑(CC 220 parity)⇒ 子代 ask 到达时 (owner, session) 键域常无活 SSE。
|
|
192
|
-
* 改形前那一刻即答 `"unavailable"`,合成整条命令死拒([
|
|
192
|
+
* 改形前那一刻即答 `"unavailable"`,合成整条命令死拒([ref] 车道2 实证)。悬挂让人稍后经
|
|
193
193
|
* `/v1/approvals` / 壳队列 / attach 补投三通道回来答它。1h 是「人不在场但当天会回来」的尺度。
|
|
194
194
|
* · **谁被伤**:悬挂 ask 占一格写侧准入配额(`STREAM_APPROVAL_ADMIT_MAX_PER_TASK`,默认 32)且占一条
|
|
195
195
|
* 持久行,窗越长积压越久;显式声明无人值守的部署(`UNATTENDED_APPROVAL_POLICY=deny`)**完全不受
|
|
@@ -252,7 +252,7 @@ export interface ServiceConfigFlat {
|
|
|
252
252
|
*
|
|
253
253
|
* 🔴 **缺席 = 不传给引擎**(不是"传个默认值"):此前这里是硬编码 `maxRetries: 2`,而显式传参**压过**
|
|
254
254
|
* 引擎默认 ⇒ core 抬默认对 server 部署一点效果都没有。缺席不传之后,引擎默认当家、core 抬默认自动继承。
|
|
255
|
-
* (五报清查 R1① 的 server 半场,黑板 [
|
|
255
|
+
* (五报清查 R1① 的 server 半场,黑板 [ref]/[ref];anthropic 腿早有 `ANTHROPIC_MAX_RETRIES` 出口,
|
|
256
256
|
* 这条只是把同样的出口补给限流 provider 真正走的那条腿。) */
|
|
257
257
|
gatewayMaxRetries?: number;
|
|
258
258
|
/** Optional Anthropic Messages API ROUTE (cloud). Selected for models whose `provider` is
|
|
@@ -274,7 +274,7 @@ export interface ServiceConfigFlat {
|
|
|
274
274
|
* env 没配时以前会铸成 `2` 再显式传给引擎,把引擎默认写死在 server 这一层。 */
|
|
275
275
|
maxRetries?: number;
|
|
276
276
|
};
|
|
277
|
-
/** Resilience brain stack (1.38,
|
|
277
|
+
/** Resilience brain stack (1.38, [ref]): tiered timeouts + an optional circuit breaker layered
|
|
278
278
|
* UNDER the existing failover (gatewayFallbackUrls). Every field defaults to off/disabled, so the
|
|
279
279
|
* brain composition stays byte-identical until an operator opts in. The breaker only changes
|
|
280
280
|
* behaviour when paired with ≥2 gateway routes (it fast-fails a tripped primary so failover switches
|
|
@@ -282,10 +282,10 @@ export interface ServiceConfigFlat {
|
|
|
282
282
|
* cross-replica shared state (TiDB adapter) is a documented follow-up. */
|
|
283
283
|
resilience: {
|
|
284
284
|
/** Abort fetch if response headers don't arrive within this many ms → retryable [network].
|
|
285
|
-
* Default 30s ([
|
|
285
|
+
* Default 30s ([ref] fleet audit). 0 = off. */
|
|
286
286
|
connectTimeoutMs: number;
|
|
287
287
|
/** Cancel an open SSE stream if no content/thinking delta arrives within this many ms.
|
|
288
|
-
* Default 120s ([
|
|
288
|
+
* Default 120s ([ref] fleet audit — core's idle timer only arms after the first token,
|
|
289
289
|
* so this is the only guard for a stream that opens and never emits). 0 = off. */
|
|
290
290
|
firstTokenTimeoutMs: number;
|
|
291
291
|
/** Mid-stream stall watchdog (1.40.1): after output starts, re-armed on every delta; silence for
|
|
@@ -339,7 +339,7 @@ export interface ServiceConfigFlat {
|
|
|
339
339
|
/** Role → model map (1.24): `subagent`/`summarize` → the cheap model when `MODEL_CHEAP_ID` is set
|
|
340
340
|
* (council lenses + compaction get cheap), `default`/`team`/`synthesize` stay on the main model. */
|
|
341
341
|
roles: ModelRoles;
|
|
342
|
-
/**
|
|
342
|
+
/** [ref] / [ref] —— **`@`-mention 允许名单**(registry-core `models.atModelAllowlist` 的服务端消费面)。
|
|
343
343
|
* 语义(registry-core `ModelsDomain.atModelAllowlist` 的 JSDoc 同源):**缺席/空 = 全部启用模型都可被用户点选**;非空 = 用户
|
|
344
344
|
* 逐 turn 选择通道只能落在名单内的 catalog name 上。
|
|
345
345
|
*
|
|
@@ -368,7 +368,7 @@ export interface ServiceConfigFlat {
|
|
|
368
368
|
/** B1 /health 活体 store 探测:后台缓存探针间隔 ms(STORE_PROBE_INTERVAL_MS;0=显式关,负/非数 boot
|
|
369
369
|
* 响亮拒)。只对 SQL 后端接线;探针原语=backend.dbNowMs()(S10 时钟探针的真 DB 往返,零新 SQL 面)。 */
|
|
370
370
|
storeProbeIntervalMs: number;
|
|
371
|
-
/** Long-term memory (
|
|
371
|
+
/** Long-term memory ([ref] S1, clay 2026-07-08): the injection-first file-based memory ENGINE
|
|
372
372
|
* (core `RunnerDeps.memoryBackend` + `MemoryEngine`) is the ONLY memory plane — the legacy MemoryStore
|
|
373
373
|
* path (MEMORY_BACKEND/EMBEDDING_* SQL/file note stores) was dropped without migration. Default ON;
|
|
374
374
|
* `MEMORY_ENGINE=off` is the explicit kill-switch. Single-user only — main.ts gates the wiring on
|
|
@@ -387,7 +387,7 @@ export interface ServiceConfigFlat {
|
|
|
387
387
|
/** The single-user deployment's one memory scope name (env MEMORY_SCOPE; default "local" under
|
|
388
388
|
* single-user). Feeds `spec.memory.scope` — the new engine consumes the same normalized scopes. */
|
|
389
389
|
memoryScope?: string;
|
|
390
|
-
/**
|
|
390
|
+
/** [ref](core 5.26.0 `TaskSpec.memoryPersistenceCapable`)—— 本部署对「这台机器上的任务**能不能**把
|
|
391
391
|
* 用户说的『记住 X』落到持久处」的**自我声明**,env `MEMORY_PERSISTENCE_CAPABLE`,三态:
|
|
392
392
|
* · 缺席(默认)⇒ 键不上 TaskSpec,core 按自己的 roster 推断(已知落盘路 = 挂载且未排除的文件写工具
|
|
393
393
|
* 或可写 shell;remote 执行环境的手带写的是沙箱盘,不算够得着 host 记忆根);
|
|
@@ -396,7 +396,7 @@ export interface ServiceConfigFlat {
|
|
|
396
396
|
* 收窄的官方恢复路径);
|
|
397
397
|
* · `false` ⇒ 强制披露只读/无持久面,并关掉文件工具往记忆根的写通道(披露不会被存储事实推翻)。
|
|
398
398
|
*
|
|
399
|
-
* 🔴 **`false` 自 core 5.27.0 起还多一层**([
|
|
399
|
+
* 🔴 **`false` 自 core 5.27.0 起还多一层**([ref] F2,[ref] 提货):declared-false 的会话是**受限会话**
|
|
400
400
|
* —— materialize/search/harvest 一律按**已提交账**(ledger + shadow)供给,磁盘上无事务背书的分歧
|
|
401
401
|
* 既不收编也不供给,而是留盘 + 响亮点名(`restricted_divergence`,`HarvestRejectionCode` 新成员),
|
|
402
402
|
* 等下一次**非受限**会话走正常门收编。这补上了 5.26.0 自己登记的那条残余(读侧入站同步收编磁盘分歧
|
|
@@ -412,7 +412,7 @@ export interface ServiceConfigFlat {
|
|
|
412
412
|
* 客户端表态(per-run 暂停写,writeScope:null),`memoryPersistenceCapable` 是**部署**声明(operator 面,
|
|
413
413
|
* 与请求无关)。两轴任一取「否」方向即只读方向 —— 客户端能收紧本次运行,永远不能靠表态把部署声明的
|
|
414
414
|
* `false` 撑开(operator 旋钮不挂客户端表态派生腿)。
|
|
415
|
-
* ⚠️ **别把两轴的「只读」当成同一件事**([
|
|
415
|
+
* ⚠️ **别把两轴的「只读」当成同一件事**([ref] F2 修后口径,逐字对齐 core):**受限**是**会话级的
|
|
416
416
|
* verdict 单键**(= 这里的 declared-false),而 `writeScope:null` 的只读**平面**(`memoryWrite:false` 的
|
|
417
417
|
* per-run 暂停 / org 层默认只读 / 双根非写面)**保持 adopt-on-read 原样** —— 受限是会话的**声明**,
|
|
418
418
|
* 永远不是平面的**结构**。所以:一次 `memoryWrite:false` 的运行照常收编磁盘上的新内容(用户手改、
|
|
@@ -431,18 +431,18 @@ export interface ServiceConfigFlat {
|
|
|
431
431
|
maxPushEntries?: number;
|
|
432
432
|
maxPullEntries?: number;
|
|
433
433
|
};
|
|
434
|
-
/**
|
|
434
|
+
/** [ref](黑板 [ref]/[ref] 两裁):记忆检索的**向量面**接线 —— OpenAI 兼容 `/embeddings` 端点。
|
|
435
435
|
* env 四键(+ 可选 key):`MEMORY_EMBEDDER_ENDPOINT` / `MEMORY_EMBEDDER_MODEL` / `MEMORY_EMBEDDER_DIM`
|
|
436
436
|
* (+ `MEMORY_EMBEDDER_TIMEOUT_MS` / `MEMORY_EMBEDDER_API_KEY`)。三问:
|
|
437
437
|
*
|
|
438
438
|
* ① **谁需要**:pg 记忆后端的部署。core 的记忆引擎三档(`vectorMode = lexical|portable|native`)不是
|
|
439
|
-
* 档位旋钮,而是「后端上限 × embedder 在场」的**推断结果**([
|
|
440
|
-
* 只会造出「选了 native 却没 embedder」这类矛盾态)。本仓在
|
|
439
|
+
* 档位旋钮,而是「后端上限 × embedder 在场」的**推断结果**([ref] 裁①:不开档位 env —— 显式选档
|
|
440
|
+
* 只会造出「选了 native 却没 embedder」这类矛盾态)。本仓在 [ref] 之前从未注入过 embedder,所以
|
|
441
441
|
* pg 部署的检索**恒 lexical**(词面 jaccard),向量列空转。配上这几键 = 该部署真正拿到语义检索。
|
|
442
442
|
* ② **半配为何拒启**:三键里少任何一件,「向量面」都无从组装。静默忽略的后果不是功能缺席,而是
|
|
443
443
|
* **operator 以为开了**——检索照常返回结果(词面档),质量差异只在最终答案里,任何日志都不报。
|
|
444
444
|
* 所以照 `MEMORY_SYNC_*` / `REQUIRED_ENVS_BY_LANE` 的同款姿势整拒并点名缺哪几键。
|
|
445
|
-
* ③ **维度守卫为何是拒启不是 warn**:向量列写错维度是**静默毒库**形([
|
|
445
|
+
* ③ **维度守卫为何是拒启不是 warn**:向量列写错维度是**静默毒库**形([ref] 裁③)——错长度的向量
|
|
446
446
|
* 既不会让 DB 报错(本仓 pg 记忆表的 embedding 是 `jsonb`,无维度约束),也不会让检索报错(维度
|
|
447
447
|
* 不匹配的行只是悄悄退回词面档),只会让「向量面开着」这句话变成谎。所以坏 DIM(非正整数)在
|
|
448
448
|
* boot 期拒;运行期真维度不符(模型换了 / 端点指错)由 embedder 自己抛,绝不截断补零。
|
|
@@ -450,11 +450,11 @@ export interface ServiceConfigFlat {
|
|
|
450
450
|
* ⚠️ 后端门:只有 `MEMORY_ENGINE_BACKEND=pg` 收这几键 —— tidb 记忆后端 v1 无向量档(传 embedder
|
|
451
451
|
* 它自己就 fail-loud 拒),file 引擎压根没有 embedder 接缝。配错后端 = 拒启点名。 */
|
|
452
452
|
memoryEmbedder?: MemoryEmbedderConfig;
|
|
453
|
-
/**
|
|
453
|
+
/** [ref] 件A(clay 三裁 [ref]):org 记忆准入模式。`enforce`(默认)=判决即结果;`audit`=判决
|
|
454
454
|
* 照算但纯观察零行为变化(不整拒、不窄化 writeScope,只记 would-deny/would-narrow)——运维诊断位,
|
|
455
455
|
* 非发布步骤(audit-first 灰度步按裁2 免除)。env `MEMORY_ORG_ADMISSION_MODE`(enumEnv 二值)。 */
|
|
456
456
|
memoryOrgAdmissionMode: "audit" | "enforce";
|
|
457
|
-
/**
|
|
457
|
+
/** [ref](core 5.45.0 [ref],[ref] 裁定① 的部署半场):委派臂的**证据标准** —— 一次委派调用要不要把
|
|
458
458
|
* 本会话的记忆标记成 polluted,按哪一档证据判。env `MEMORY_DELEGATION_EVIDENCE`,两词闭集:
|
|
459
459
|
* · `static-face` —— core 的缺省行为逐字:委派的 attestation 缺失/未知 **且** 静态工具面够得着外部
|
|
460
460
|
* 内容 ⇒ 标记(能力过近似:可能性即暴露);
|
|
@@ -467,7 +467,7 @@ export interface ServiceConfigFlat {
|
|
|
467
467
|
* 自身被分类为污染的照标。
|
|
468
468
|
*
|
|
469
469
|
* 🔴 **缺席 = 不铸键**(不复制上游缺省 —— 上游改缺省之日起本仓不会成为第二份真源;`readFace` 同姿态)。
|
|
470
|
-
* 坏值 ⇒ 启动期响亮拒(
|
|
470
|
+
* 坏值 ⇒ 启动期响亮拒([ref]);core 侧 `prepareConfigDoors` 另有一道同判的门
|
|
471
471
|
* (`config.memory_delegation_evidence`,精确拼写、绝不真值判),两道门同向不冲突。
|
|
472
472
|
*
|
|
473
473
|
* ⚠️ **部署席 ONLY**(与 `readDenyBuiltinTiers` 同判,core 侧的设计):TaskSpec 上没有同名键,也不在受治
|
|
@@ -478,19 +478,19 @@ export interface ServiceConfigFlat {
|
|
|
478
478
|
* 异常收尾(crash/salvage)的前台子代同样不按静态面标记(链上仍记 `incomplete`)。已标记的会话永不
|
|
479
479
|
* 回滚清洗,本键只管**新**标记。 */
|
|
480
480
|
memoryDelegationEvidence?: "static-face" | "attested-only";
|
|
481
|
-
/**
|
|
481
|
+
/** [ref] 件4(core 5.46.0 [ref] §13-3 的部署半场,[ref]①/[ref]②):记忆 **provenance 总开关** ——
|
|
482
482
|
* 一个会话被判为「已暴露」之后,它的记忆写要怎么处置。env `MEMORY_PROVENANCE`,两词闭集:
|
|
483
483
|
* · `carry` —— core 缺省行为逐字:**普通**记忆写照常提交,但带上引擎铸的 `origin` 标记(随条目走
|
|
484
484
|
* 后端/同步/导出包);指令形文件(feedback / pinned / triggers / applies-when)仍被扣下隔离;
|
|
485
485
|
* 派生索引的会话散文照回滚;内容扫描门原样跑(**标记不是豁免**);
|
|
486
|
-
* · `off` ——
|
|
486
|
+
* · `off` —— [ref] 之前的行为:不铸 origin 标记,已暴露会话的 harvest **一条都不收**(整体
|
|
487
487
|
* 隔离候人审)。⚠️ 已提交的标记在编辑时照样带下去 —— `off` 停的是**铸**,从不抹掉已记的事实。
|
|
488
488
|
*
|
|
489
489
|
* 与 {@link memoryDelegationEvidence} **正交**(core 顶注明写,四种组合全合法):那一键决定
|
|
490
490
|
* **什么时候**把会话判为已暴露(证据标准),本键决定判为暴露之后**对写做什么**(带标收录 vs 整体隔离)。
|
|
491
491
|
*
|
|
492
492
|
* 🔴 **缺席 = 不铸键**(不复制上游缺省;`readFace` / `memoryDelegationEvidence` 同姿态)。
|
|
493
|
-
* 坏值 ⇒ 启动期响亮拒(
|
|
493
|
+
* 坏值 ⇒ 启动期响亮拒([ref] + 「部署级旋钮坏值禁静默回默认」);core 侧 `prepareConfigDoors` 另有
|
|
494
494
|
* 一道同判的门(`config.memory_provenance`,精确拼写、绝不真值判),两道门同向不冲突。
|
|
495
495
|
*
|
|
496
496
|
* ⚠️ **部署席 ONLY**(与 `memoryDelegationEvidence` 同判,core 侧的设计):TaskSpec 上没有同名键,
|
|
@@ -498,7 +498,7 @@ export interface ServiceConfigFlat {
|
|
|
498
498
|
* ⚠️ **不冻进 checkpoint**:resume 的那条腿跟**当前**部署配置走(core 成文)。
|
|
499
499
|
* 运维读面 = `GET /v1/diagnostics/wiring` 的 `memoryPosture.provenance`(`null`=本部署未设)。 */
|
|
500
500
|
memoryProvenance?: "off" | "carry";
|
|
501
|
-
/**
|
|
501
|
+
/** [ref] §3.1(core 7.0.0 片3,[ref] S-1b):本部署的记忆 **capture 姿态** —— per-principal
|
|
502
502
|
* `RuntimeCaps.allowMemoryOptOut` verdict 被读进的那个框。env `MEMORY_CAPTURE_POLICY`,三词闭集:
|
|
503
503
|
* · `open`(≡ 缺席时 core 的缺省)—— `TaskSpec.memory.capture:"off"` 声明按面值生效;只有 resolver 的
|
|
504
504
|
* **显式** `false` 拒它(`memory.capture_optout_denied`,terminal)。resolver **故障**(throw / 非
|
|
@@ -521,7 +521,7 @@ export interface ServiceConfigFlat {
|
|
|
521
521
|
* 运维读面 = `GET /v1/diagnostics/wiring` 的 `memoryPosture.capturePolicy`(`null`=本部署未设)。 */
|
|
522
522
|
memoryCapturePolicy?: "open" | "governed" | "capture-required";
|
|
523
523
|
/**
|
|
524
|
-
*
|
|
524
|
+
* [ref](core 5.58 [ref] 片②)—— 记忆 **consolidation driver 阀门**的三根旋钮。
|
|
525
525
|
* **恒在场**(不是可选块,与 {@link retentionSweep} 同姿态):三根都有文档化的缺省,而缺省本身
|
|
526
526
|
* 是一条要能被读出来的姿态 —— `{enabled:false, intervalSec:0, scopes:[]}` = 「阀门关着」。
|
|
527
527
|
*
|
|
@@ -533,7 +533,7 @@ export interface ServiceConfigFlat {
|
|
|
533
533
|
* 语义与解析见 {@link MemoryConsolidationDriverConfig} 与 config.ts 的 `parseMemoryDomain`。
|
|
534
534
|
*/
|
|
535
535
|
memoryConsolidationDriver: MemoryConsolidationDriverConfig;
|
|
536
|
-
/** debt
|
|
536
|
+
/** debt [ref]-B(core 5.48 C18 提货件):委派入口 caps 的部署旋钮 —— env `DELEGATION_MAX_CONCURRENT` /
|
|
537
537
|
* `DELEGATION_MAX_PER_SESSION`(整数,numEnvBounded 响亮拒坏值)。**缺席 = 不铸键**(core 自缺省
|
|
538
538
|
* CC parity 20/200;`memoryDelegationEvidence` 同姿态);两键各自独立可设,pair 合法性
|
|
539
539
|
* (maxConcurrent ≤ maxCumulativePerSession)由 core prepare 的 `config.delegation_entry_caps`
|
|
@@ -553,12 +553,12 @@ export interface ServiceConfigFlat {
|
|
|
553
553
|
/** 件A 目录 unavailable 退避窗(ms)——取数失败的退避语义(bound center hammering),不是策略负结果。
|
|
554
554
|
* 默认 10s。env `MEMORY_ORG_UNAVAILABLE_BACKOFF_MS`(numEnvBounded)。 */
|
|
555
555
|
memoryOrgUnavailableBackoffMs: number;
|
|
556
|
-
/**
|
|
556
|
+
/** [ref] v1b + [ref]: opt-in remote execution backend (PEER adapters, chosen by REMOTE_EXEC). Unset
|
|
557
557
|
* (OA/review deployments) → in-process stub env, zero behavior change. Secrets (apiKey/privateKey) ONLY from env.
|
|
558
558
|
* - `e2b` → per-task E2B Firecracker VM (isolated, suspendable). The default code-agent worker.
|
|
559
559
|
* - `k8s` → per-task Kata pod on our k3s (isolated, NOT suspendable — no managed memory
|
|
560
560
|
* snapshot). Self-hosted sandbox lane; auth = explicit K8S_* env or in-cluster service account.
|
|
561
|
-
* - `ssh` → a real host over SSH (NOT isolated/suspendable;
|
|
561
|
+
* - `ssh` → a real host over SSH (NOT isolated/suspendable; [ref] §5). AI-orchestrated batch deploy.
|
|
562
562
|
* - `adb` → a real device over ADB (NOT isolated/suspendable). On-device APP testing. */
|
|
563
563
|
remoteExec?: {
|
|
564
564
|
provider: "e2b";
|
|
@@ -569,7 +569,7 @@ export interface ServiceConfigFlat {
|
|
|
569
569
|
allowInternetAccess?: boolean;
|
|
570
570
|
sandboxEnv?: Record<string, string>;
|
|
571
571
|
mountPath?: string;
|
|
572
|
-
/**
|
|
572
|
+
/** [ref]:崩溃遗留沙盒回收腿(E2B_ORPHAN_RECLAIM,默认 true;判据与 v1 边界见
|
|
573
573
|
* plugins/e2b-orphan-reclaim.ts 头注)。 */
|
|
574
574
|
orphanReclaim?: boolean;
|
|
575
575
|
} | {
|
|
@@ -626,9 +626,9 @@ export interface ServiceConfigFlat {
|
|
|
626
626
|
/** `DEVICE_MAX_INFLIGHT_PER_DEVICE`(§11-O3 clay 已裁 = 4)。 */
|
|
627
627
|
maxInflightPerDevice?: number;
|
|
628
628
|
/** `DEVICE_MAX_PREAUTH_PER_REMOTE`(默认 8;字面 `off` = 显式停用 per-remote 层)= 未鉴权
|
|
629
|
-
* 握手的 per-remote 并发帽(
|
|
629
|
+
* 握手的 per-remote 并发帽([ref]/[ref]:帽键是裸 remoteAddress——XFF 反代 / 公司 NAT 部署
|
|
630
630
|
* 形会把全员折叠成单键,per-remote 层退化成共享预算而非公平层,`off` + 全局帽 64 是诚实形)。
|
|
631
|
-
* 坏值拒启(
|
|
631
|
+
* 坏值拒启([ref] A 档),词表与拒因见 config.ts `parseDevicePreAuthPerRemoteEnv`。 */
|
|
632
632
|
maxPreAuthPerRemote?: number | "off";
|
|
633
633
|
/** `DEVICE_SUPERSEDE`(默认 `stale_only`)= 同 deviceId 二连的顶替策略(§5.2)。 */
|
|
634
634
|
supersede?: "stale_only" | "deny";
|
|
@@ -647,7 +647,7 @@ export interface ServiceConfigFlat {
|
|
|
647
647
|
env?: Record<string, string>;
|
|
648
648
|
};
|
|
649
649
|
/**
|
|
650
|
-
* SVC-3 git-WORKTREE ISOLATION (
|
|
650
|
+
* SVC-3 git-WORKTREE ISOLATION ([ref] CORE-6). Opt-in (WORKTREE_ISOLATION_ENABLED + WORKTREE_REPO_ROOT).
|
|
651
651
|
* When set, the deployment's `executionEnvFactory` is wrapped so an agent core marks `isolation:"worktree"`
|
|
652
652
|
* (via the TRUSTED RunInternals — never a TaskSpec) runs in its OWN detached git worktree under `repoRoot`.
|
|
653
653
|
* Operator-supplied ONLY (never a task input). v1 covers the `host` lane (the TOC fan-out lane); other lanes
|
|
@@ -688,11 +688,11 @@ export interface ServiceConfigFlat {
|
|
|
688
688
|
};
|
|
689
689
|
/** Which SQL engine the durable stores run on (clay 2026-06-21 PG migration). Canonical value is `mysql`
|
|
690
690
|
* = any MySQL-protocol server — MySQL, TiDB, MariaDB — over the same mysql2 pool; `pg` (PostgreSQL
|
|
691
|
-
* dialect) reads `pg` below. [
|
|
691
|
+
* dialect) reads `pg` below. [ref]/[ref]B-3(5.0.0):the env value `tidb` and the TIDB_* coord names
|
|
692
692
|
* are RETIRED — `tidb` is rejected by the enum and any TIDB_* env in place refuses to start with the
|
|
693
693
|
* MYSQL_* replacement named (see RETIRED_ENVS in config.ts). `mysql` reads MYSQL_* coords only.
|
|
694
694
|
* TiDB itself stays fully supported (any MySQL-protocol engine works — memory no longer needs a VECTOR
|
|
695
|
-
* column since
|
|
695
|
+
* column since [ref] moved it onto the file engine). Env: DB_BACKEND. */
|
|
696
696
|
dbBackend: "mysql" | "pg" | "local" | "memory";
|
|
697
697
|
/** clay 拍(2026-07-27):operator 是否显式设了 DB_BACKEND。main.ts 的降级判据——**默认推导**的
|
|
698
698
|
* local(裸 boot)在 mkdir/ensure 失败时降级 memory + warn + gauge(auto-DB 不可达先例);
|
|
@@ -706,14 +706,14 @@ export interface ServiceConfigFlat {
|
|
|
706
706
|
* `local` backend reads it. */
|
|
707
707
|
localDataRoot?: string;
|
|
708
708
|
/**
|
|
709
|
-
*
|
|
709
|
+
* [ref] 件B(`RUN_STORE_STRICT_HYDRATE`,普查表第 29 行的**终局格**)—— file 后端的**可选** fail-closed
|
|
710
710
|
* 启动门。`true` ⇒ `FileRunStore.hydrate()` 列不出 `runs/` 时**拒启**(error 级遗言带绝对路径 + 异常
|
|
711
711
|
* 文案,然后抛);缺省 **false** ⇒ 件6 的既有形逐字不变(带病起动 + 一行 error + P-DEBT 计数)。
|
|
712
712
|
*
|
|
713
713
|
* 为什么默认是 off:件6 当年把「不拒启」写成了刻意保留的行为,默认翻面等于替所有存量部署做主。
|
|
714
714
|
* 为什么值得有这根旋钮:空账起动之后每一次 `getRun` 恒 miss,而「恒 miss」与「本来就没有这条 run」
|
|
715
715
|
* 在 wire 上同形(#43 现场就是这么被误读的)—— 把 run 账本当真账本用的部署有权要求「读不出就别起」。
|
|
716
|
-
* 坏值**拒启**(
|
|
716
|
+
* 坏值**拒启**([ref] A 档):静默回默认会让 operator 要的 fail-closed 被无声吃掉。
|
|
717
717
|
*
|
|
718
718
|
* 只有 `local`(file)后端读它;SQL 后端的 hydrate 不经这条路。
|
|
719
719
|
*/
|
|
@@ -759,7 +759,7 @@ export interface ServiceConfigFlat {
|
|
|
759
759
|
* 实证,大字节归对象存储);`SNAPSHOT_BLOB_ALLOW_SQL_BYTES=true` 显式接受 SQL 店 + (a) 的帽
|
|
760
760
|
* (单机/测试台形)。严格 "true" 判——这是安全姿势开关,不收宽松真值。 */
|
|
761
761
|
snapshotBlobAllowSql: boolean;
|
|
762
|
-
/**
|
|
762
|
+
/** [ref] twin 保留条款(core [ref] §片2):per-file rewind 历史的**边界上限**,键形与 core
|
|
763
763
|
* `FileStorageBackendOptions.fileHistory.retention.keep` **同域同名**(local 腿原样透传给 core 的 File 店;
|
|
764
764
|
* SQL 双生店构造期同调 core `resolveFileHistoryRetention` —— 一套语义,三条车道)。缺席 = core 缺省
|
|
765
765
|
* (100,由 core 兑现,本仓不复制那个数);`{ keep: "unbounded" }` 是唯一的「不剪」拼法。坏值在
|
|
@@ -768,14 +768,14 @@ export interface ServiceConfigFlat {
|
|
|
768
768
|
fileHistory?: {
|
|
769
769
|
retention?: FileHistoryRetentionPolicy;
|
|
770
770
|
};
|
|
771
|
-
/** plugins 域 clone host 白名单(`PLUGINS_ALLOW_HOSTS`,缺省 github.com;契约 [
|
|
771
|
+
/** plugins 域 clone host 白名单(`PLUGINS_ALLOW_HOSTS`,缺省 github.com;契约 [ref]① 双保险面,
|
|
772
772
|
* 消费在 capabilities/center-plugins.ts)。 */
|
|
773
773
|
pluginsAllowHosts: string[];
|
|
774
|
-
/** 监听绑址([
|
|
774
|
+
/** 监听绑址([ref] cli 实锤:此前 `HOST` **零消费**、`listen(port)` 恒绑所有接口)。
|
|
775
775
|
* `BIND_HOST`(兼容 `HOST`)。显式值恒生效;缺省见 {@link resolveBindHost}——**无鉴权写面
|
|
776
776
|
* (allowUnauthedWrites 且零凭证)自动收窄到 127.0.0.1**,其余维持全接口(既有部署零影响)。 */
|
|
777
777
|
bindHost?: string;
|
|
778
|
-
/** [
|
|
778
|
+
/** [ref]③ `bindHost` 的取值来源(BIND_HOST 显式 / HOST 兼容名 / 未设)。`"HOST"` 时 main.ts 打一行
|
|
779
779
|
* 启动告警:zsh 常把 HOST 设成机器名,`{...process.env}` 起底的壳会静默继承给引擎——bind 面被 shell
|
|
780
780
|
* 环境暗配而部署者不知情(HOST=机器名解析到 LAN 口时=静默扩暴露面)。 */
|
|
781
781
|
bindHostSource?: "BIND_HOST" | "HOST";
|
|
@@ -783,11 +783,11 @@ export interface ServiceConfigFlat {
|
|
|
783
783
|
* 复审 F10:同 tick 邻居(workflowOrphanGraceMs/attachmentUnboundTtlMs/scratchpadSweepTtlMs)都有
|
|
784
784
|
* 旋钮——存量对象巨大的部署要调慢/停掉,不该被迫取消 MinIO 配置(那会连带关掉整个附件面)。 */
|
|
785
785
|
attachmentOrphanGraceMs: number;
|
|
786
|
-
/** ⚠️ INERT since
|
|
786
|
+
/** ⚠️ INERT since [ref](workspace 浏览面随整树快照纪元退役,消费点归零)。键**保留**:center 热推
|
|
787
787
|
* 可能仍携带它,删键会让整份推送按未知键处置——正式摘除走 settings-schema 的弃用车道。 */
|
|
788
788
|
workspaceFileMaxBytes: number;
|
|
789
789
|
/** SendUserFile dual-track public-link issuance (design settled cross-repo 2026-07-14; S3_PUBLIC_* are
|
|
790
|
-
* [
|
|
790
|
+
* [ref]② cross-repo contract names — never rename). Enabled iff the adapter-held MinIO/S3 creds are set:
|
|
791
791
|
* `endpoint` = MINIO_ENDPOINT (the shared snapshot-lane name, wins when both are set) with S3_ENDPOINT
|
|
792
792
|
* as the external-S3 compat alias (one address serving both internal + public faces), plus
|
|
793
793
|
* MINIO_ACCESS_KEY + MINIO_SECRET_KEY (optional MINIO_REGION) — any of the three unset/empty ⇒ the whole
|
|
@@ -869,19 +869,19 @@ export interface ServiceConfigFlat {
|
|
|
869
869
|
* sema-registry `EffectiveConfig.runtime` (structured config, not an env scalar). undefined = unmanaged. */
|
|
870
870
|
commandPolicy?: CommandRule[];
|
|
871
871
|
/**
|
|
872
|
-
*
|
|
872
|
+
* [ref] 件B —— 本部署的**合规档位**(core `RunnerDeps.compliancePostureResolver` 的供数)。
|
|
873
873
|
* env `COMPLIANCE_PROFILE`(闭集 `hipaa|zdr`)+ `COMPLIANCE_ADDITIONAL_DENIES`(闭集能力名 csv,
|
|
874
874
|
* **只能收紧** profile 的内建 floor)。两个词表都是 core 的闭集,拼错一律 boot 拒 —— 一个拼错的
|
|
875
|
-
* 能力名等于「标着 hipaa 的部署根本没在执行那一条」(
|
|
875
|
+
* 能力名等于「标着 hipaa 的部署根本没在执行那一条」([ref] §3.2)。
|
|
876
876
|
*
|
|
877
877
|
* 🔴 **档位是部署级、不是 per-principal**:core 的座席按 principal 取值,但本仓能拿到的**唯一真源**
|
|
878
|
-
* 是部署配置面(
|
|
878
|
+
* 是部署配置面([ref] §1 表:center 侧的档位真源标着「新建」= 尚不存在)。所以 resolver 对每个
|
|
879
879
|
* principal 返回同一份档位 —— 诚实的窄实现,而不是一条永远查不到值的 center 假腿。
|
|
880
880
|
* 缺席 = 无合规限制(core 契约),现存部署逐字零影响。
|
|
881
881
|
*/
|
|
882
882
|
compliancePosture?: CompliancePosture;
|
|
883
883
|
/**
|
|
884
|
-
*
|
|
884
|
+
* [ref] 件C —— **管理员锁定层**的部署声明(core `RunnerDeps.lockedConfig.keys`)。
|
|
885
885
|
* env `LOCKED_CONFIG_KEYS`(csv;词表 = core 的 `LOCKED_KEY_REGISTRY` 闭集,未知键 boot 拒 =
|
|
886
886
|
* `config.locked_registry`「不解析的安全控件不得半开」)。
|
|
887
887
|
*
|
|
@@ -891,17 +891,17 @@ export interface ServiceConfigFlat {
|
|
|
891
891
|
*/
|
|
892
892
|
lockedConfigKeys?: readonly LockedKey[];
|
|
893
893
|
/**
|
|
894
|
-
*
|
|
894
|
+
* [ref] 件D —— **托管留存期**声明(core `RunnerDeps.retentionPolicy`)。env `RETENTION_MAX_AGE_DAYS`
|
|
895
895
|
* (有限非负数;坏值 boot 拒 —— 删数据的旋钮不许 NaN 流通)。
|
|
896
896
|
*
|
|
897
897
|
* 🔴 语义边界(成文,别当成"数据会被删"):core **只**拿它做启动期能力校验(锁着 + 店未声明
|
|
898
898
|
* `retention:"managed"` ⇒ 拒启),引擎自己在任务路径上从不删数据;真执行(调度/重试/副本协调/审计)
|
|
899
|
-
* 是部署侧的活,本仓**尚未**建(
|
|
899
|
+
* 是部署侧的活,本仓**尚未**建([ref] §5.2「server 半场四件皆新建」)。所以配了策略而没有任何
|
|
900
900
|
* managed 店时,启动会打一条 `retention_policy_not_executed` 的响亮 warn。
|
|
901
901
|
*/
|
|
902
902
|
retentionPolicy?: RetentionPolicy;
|
|
903
903
|
/**
|
|
904
|
-
*
|
|
904
|
+
* [ref] 车2 —— 托管留存 **sweep lane** 的两个旋钮(设计稿 `DESIGN-270-retention-lane.md` §3/§4)。
|
|
905
905
|
* `retentionPolicy` 说的是「保留多久」(一句声明),本格说的是「谁在什么节律上按那句话删」。
|
|
906
906
|
* **恒在场**(不是可选块):两根都有文档化的缺省,而缺省本身是一条要能被读出来的姿态 ——
|
|
907
907
|
* `{mode:"audit-only", intervalSec:0}` = 「lane 关着,真开起来也先只记账」。
|
|
@@ -914,14 +914,22 @@ export interface ServiceConfigFlat {
|
|
|
914
914
|
* CANNOT decide (a requester approving its own high-risk op would defeat the gate). **Empty/unset =
|
|
915
915
|
* legacy behavior** (the shared service token IS the operator boundary — back-compat). */
|
|
916
916
|
operatorPrincipals: string[];
|
|
917
|
+
/**
|
|
918
|
+
* DESIGN-278 §5 S2([ref])—— `GET /v1/config/catalog`(配置目录自描述端点)的显式旋钮。
|
|
919
|
+
* 默认 **ON**(设计稿 §0.5:合规部署可关)。端点本身已是 operator-only(`explicitOperatorOk`,
|
|
920
|
+
* 空名单=谁都不是),本键给的是「即便 operator 也不许从 wire 读部署事实」的合规姿态:关 ⇒ 路径
|
|
921
|
+
* 不存在(404 族,与 memory-consolidation 阀门同判:旋钮没开 ≠ 能力缺失)、能力位 `configCatalog`
|
|
922
|
+
* 同步翻假。`CONFIG_CATALOG_ENABLED=false`。
|
|
923
|
+
*/
|
|
924
|
+
configCatalogEnabled: boolean;
|
|
917
925
|
/** Tool names that are always denied. */
|
|
918
926
|
approvalDeny: string[];
|
|
919
|
-
/**
|
|
927
|
+
/** [ref] durable-checkpoint (core 1.67): when true (+ a TiDB pool), F4 uses durable **suspend/resume**
|
|
920
928
|
* instead of poll-blocking — a gated tool `ask` suspends the task (status:"suspended" + checkpoint), an
|
|
921
|
-
* operator resumes it on any replica. Default OFF([
|
|
929
|
+
* operator resumes it on any replica. Default OFF([ref] A-5:轮询车道已退役,OFF+门意图 ⇒ core UNGATED
|
|
922
930
|
* 告警,不再有回退门形). `DURABLE_APPROVAL=true`. */
|
|
923
931
|
durableApproval: boolean;
|
|
924
|
-
/**
|
|
932
|
+
/** [ref] seam #2 (preemption) / [ref] ("失败≠没做完" third state): when true (+ durable mode), the
|
|
925
933
|
* /v1/runs durable path opts every task into core `resourceSuspend` — a budget/turns/walltime limit OR a
|
|
926
934
|
* scheduler preempt (`POST /v1/assistant/tasks/:id/preempt`) durably SUSPENDS the task (resumable via
|
|
927
935
|
* `POST /v1/assistant/tasks/:id/resume`) instead of FAILING. 🔴 PRECONDITION for `preemptSignal` to fire at
|
|
@@ -934,25 +942,25 @@ export interface ServiceConfigFlat {
|
|
|
934
942
|
* resume happens long before this; the deadline only reaps abandonment. `RESOURCE_SUSPEND_TTL_SEC`. */
|
|
935
943
|
resourceSuspendTtlSec: number;
|
|
936
944
|
/**
|
|
937
|
-
* [
|
|
945
|
+
* [ref] 件 S-3 —— **跨片总额**:一条任务在整条 park→resume→再 park 链上允许烧掉的 token 总量。
|
|
938
946
|
* `RESOURCE_SUSPEND_TOTAL_TOKENS`,**0 / 缺省 = 不设**(维持现状)。
|
|
939
947
|
*
|
|
940
948
|
* 🔴 为什么这是一根独立的旋钮、而不是 `MAX_TASK_TOKENS` 的同义词:`limits.maxTokens` 是 core 的
|
|
941
949
|
* **per-SLICE 窗**(core `types.d.ts` 逐字:"PER-SLICE windows, not whole-task totals"),而一次 resume
|
|
942
950
|
* 会**重开满窗**。跨片总额是唯一能跨越 park 边界约束总量的轴 —— core 把它冻在 checkpoint 的
|
|
943
951
|
* resource ledger 上,`remainingTokens(ledger)` 在 total 缺席时回 `undefined` = **无天花板**。
|
|
944
|
-
* [
|
|
952
|
+
* [ref](plan_review approve 后一条 resume 腿烧 75 万 token 无产出)的三个叠加因子之一就是本值缺席。
|
|
945
953
|
*
|
|
946
954
|
* 🔒 **冻结语义**:core 把它冻在 checkpoint 的 resource ledger 上("Set ONLY on the FIRST slice";
|
|
947
955
|
* `debitLedger` 逐字 `prior ?? total`)⇒ 续跑腿重供**无效**,「一次 resume 刷新不了自己的额度」这条
|
|
948
956
|
* 安全语义由 core 保证。本仓每片都供值是无害的(首片生效,其后被 prior 挡掉)。
|
|
949
957
|
*/
|
|
950
958
|
resourceSuspendTotalTokens: number;
|
|
951
|
-
/** [
|
|
959
|
+
/** [ref] 件 S-3 —— 跨片总额的 **$ 轴**(`totalTokens` 的姊妹,语义与冻结形同上)。
|
|
952
960
|
* `RESOURCE_SUSPEND_TOTAL_BUDGET_USD`,0 / 缺省 = 不设。可为小数(美元)。 */
|
|
953
961
|
resourceSuspendTotalBudgetUsd: number;
|
|
954
962
|
/**
|
|
955
|
-
* [
|
|
963
|
+
* [ref] 件 S-3 —— 跨片 **片数**上限:整条 resume 链最多几片,超出 core 以 `"suspend.loop"` 收场。
|
|
956
964
|
* `RESOURCE_SUSPEND_MAX_SLICES`,0 / 缺省 = 不设。
|
|
957
965
|
*
|
|
958
966
|
* 它是**零进展 slice 循环**的兜底(两条总额才是主约束),与重启环的 `maxSuspends` 是两个独立计数。
|
|
@@ -965,28 +973,28 @@ export interface ServiceConfigFlat {
|
|
|
965
973
|
* 级旋钮本就该跟着当期部署走,但别把它误读成「冻在链上」。钉:test/resource-suspend.test.ts 的上游契约格。
|
|
966
974
|
*/
|
|
967
975
|
resourceSuspendMaxSlices: number;
|
|
968
|
-
/**
|
|
976
|
+
/** [ref] D-E (upgrade-budget): max NORMAL gated tool calls AUTO-APPROVED per run-leg before the rest
|
|
969
977
|
* escalate to a human — a circuit-breaker against a runaway/inflated approval loop (an AI stuck re-asking),
|
|
970
978
|
* NOT a cap on safety asks. 0 = OFF (every gated tool asks a human — unchanged, back-compat default). Clamped
|
|
971
979
|
* to ≤10000 (the hard ceiling). A Supervisor deployment sets this high to get "the AI auto-approves routine
|
|
972
980
|
* asks, the human only sees the rest". `APPROVAL_AUTO_BUDGET`. */
|
|
973
981
|
approvalAutoBudget: number;
|
|
974
|
-
/**
|
|
982
|
+
/** [ref] D-E (inv#2 — safety asks are never budgetable): gated tools that ALWAYS require a human even when
|
|
975
983
|
* the auto-budget is on — the "irreversible / never auto-approve" set. empty = the budget may auto-approve any
|
|
976
984
|
* required tool THIS layer sees. `APPROVAL_NEVER_AUTO`.
|
|
977
985
|
*
|
|
978
|
-
* 🔴 **NOT the only human-gate under an auto-budget**(2026-08-10
|
|
986
|
+
* 🔴 **NOT the only human-gate under an auto-budget**(2026-08-10 修口,[ref] 件2)。这里原来写的是
|
|
979
987
|
* "(In-service every gated ask is gate.kind=\"human\", so this set is the ONLY way to keep an irreversible
|
|
980
988
|
* tool human-gated under an auto-budget.)" —— 两句都已过期,且过期方向是**高估本旋钮的责任**:
|
|
981
|
-
* ·
|
|
982
|
-
* · core 5.24.0(
|
|
989
|
+
* · [ref] D-2 起,带 egress / irreversibility 静态标记的工具铸的是 `irreversible_ask`,不是 `human`;
|
|
990
|
+
* · core 5.24.0([ref]/[ref]/[ref])起,带 `requiresRealApproval` 的 ask 一律铸
|
|
983
991
|
* `irreversible_ask` + `gate.realApproval:{origin}` + checkpoint v8 —— **不再铸可预算的 `human`**。
|
|
984
992
|
* 而 `requiresRealApproval` 的生产者(`createTranscriptIntegrityPolicy` / `createUnverifiableDeletePolicy`)
|
|
985
993
|
* 被 core 在 `prepare-task.js` 里**无条件**焊进每一条策略链,所以这条路径在**每一个**部署上都活着,
|
|
986
994
|
* 不是 org 治理部署的专属面。
|
|
987
995
|
* ⇒ 本旋钮承担的是**本层**(`createDurableAskPolicy` 的 per-leg 计数预算)的 inv#2;安全类 ask 另有
|
|
988
996
|
* core 侧那两层守卫兜底,两层各自独立、不互为前提。消费侧钉:`test/durable-approval-policy.test.ts`
|
|
989
|
-
*
|
|
997
|
+
* 的「[ref] 件2」describe(含反向锚:普通调用仍走预算自动批)。
|
|
990
998
|
*
|
|
991
999
|
* 🔴 **NOT required to be a subset of `approvalRequire`**(2026-07-31 修口)。这里原来写的是
|
|
992
1000
|
* "Subset of approvalRequire",而 `approval.ts` 的 inv#2 执行面逐字相反:
|
|
@@ -996,7 +1004,7 @@ export interface ServiceConfigFlat {
|
|
|
996
1004
|
* 「只配 APPROVAL_NEVER_AUTO」这一形被判成"零门意图" ⇒ 落进单用户 allow-all 基线 ⇒ 那张表
|
|
997
1005
|
* 从未进入任何 policy。判定现在单源在 `hasOperatorGateIntent()`(与 inv#2 同文件)。 */
|
|
998
1006
|
approvalNeverAuto: string[];
|
|
999
|
-
/**
|
|
1007
|
+
/** [ref] D-G (HMAC = integrity, not identity; ✅ WIRED — the "SCAFFOLD, not yet wired" note here was STALE,
|
|
1000
1008
|
* corrected 2026-07-25: consumed by `verifyDirectDoorProof` → `verifyApprovalHmac`, reached from the live decide
|
|
1001
1009
|
* routes — the two `verifyDirectDoorProof(` call sites in `http/routes/approvals-assistant.ts`): the
|
|
1002
1010
|
* sema-registry-managed, ROTATING key-set used to verify an
|
|
@@ -1005,12 +1013,12 @@ export interface ServiceConfigFlat {
|
|
|
1005
1013
|
* accurate description of every stock deployment. sema-registry mints + rotates the set; the shape is
|
|
1006
1014
|
* provisional (ASK-CENTER-2026-06-17). */
|
|
1007
1015
|
approvalHmacKeys: ApprovalHmacKey[];
|
|
1008
|
-
/**
|
|
1016
|
+
/** [ref] D-G: open the DIRECT-connect /decide door (a CLI/desktop client without the BFF). When true, this
|
|
1009
1017
|
* worker is in DIRECT MODE — it REQUIRES the crypto direct-door proof (signed principal JWT + HMAC envelope) and
|
|
1010
1018
|
* treats the trusted `x-agent-principal` header as UNTRUSTED (the BFF runs on a separate non-direct worker). Off
|
|
1011
1019
|
* (default) ⇒ the BFF trusted-header door is byte-identical. `DIRECT_APPROVAL_DOOR=true`. */
|
|
1012
1020
|
directApprovalDoor: boolean;
|
|
1013
|
-
/**
|
|
1021
|
+
/** [ref] D-G: the issuer's PUBLIC JWKS (non-secret, config-projected like operatorPrincipals) the worker
|
|
1014
1022
|
* verifies a direct client's principal JWT against. Empty ⇒ no trust anchor ⇒ the direct door cannot open.
|
|
1015
1023
|
* `PRINCIPAL_JWT_PUBKEYS` (JSON [{kid,alg,key(PEM),status}]). */
|
|
1016
1024
|
principalJwtPubkeys: PrincipalJwtKey[];
|
|
@@ -1022,16 +1030,16 @@ export interface ServiceConfigFlat {
|
|
|
1022
1030
|
principalJwtMaxTtlSec: number;
|
|
1023
1031
|
/** Computed: the direct door is truly active (all anchors present). Off ⇒ direct branch never runs. */
|
|
1024
1032
|
directDoorActive: boolean;
|
|
1025
|
-
/**
|
|
1033
|
+
/** [ref] b (item 3): the INFRA cost rates the service owns (the engine prices only LLM tokens), composed
|
|
1026
1034
|
* with core's costBreakdown for the supervisor cost surface. All default 0 (= not priced, like MODEL_COST_*).
|
|
1027
1035
|
* `INFRA_COST_TOOL_CALL` / `INFRA_COST_SANDBOX_SEC` / `INFRA_COST_EGRESS_GB` (micro-USD). */
|
|
1028
1036
|
infraCostRates: InfraCostRates;
|
|
1029
|
-
/** v2 leader endpoint (
|
|
1037
|
+
/** v2 leader endpoint ([ref]): enable POST/GET /v1/leader. Requires an ISOLATED remote-exec backend —
|
|
1030
1038
|
* REMOTE_EXEC=e2b, OR REMOTE_EXEC=k8s (Kata pod-sandbox) WITH an S3/MinIO config for the workspace-durable
|
|
1031
1039
|
* snapshot/merge (main.ts:524) — + (deploy) git on the host + a durable remote with creds. Orthogonal to the
|
|
1032
1040
|
* D-G direct door (auth axis) — a worker can be direct-mode + kata + leader at once. Default OFF. `LEADER_ENABLED=true`. */
|
|
1033
1041
|
leaderEnabled: boolean;
|
|
1034
|
-
/**
|
|
1042
|
+
/** [ref] A6 (correctness-first knob): `LEADER_FANOUT_ENABLED=false` pins the leader router to the
|
|
1035
1043
|
* deterministic single route (never fans out, zero router cost). Default true (router decides). */
|
|
1036
1044
|
leaderFanoutEnabled: boolean;
|
|
1037
1045
|
/** A value router (S1 verdict §6.3 cash-out, src/router/route-orchestration.ts): auto-decide per-task
|
|
@@ -1040,7 +1048,7 @@ export interface ServiceConfigFlat {
|
|
|
1040
1048
|
* mechanism dark; enable after a live validation (the router only ever TIGHTENS via tightenTaskSpec + honors
|
|
1041
1049
|
* caller-explicit modes, so enabling can't loosen any gate). */
|
|
1042
1050
|
routerEnabled: boolean;
|
|
1043
|
-
/** S8 LLM self-orchestration (
|
|
1051
|
+
/** S8 LLM self-orchestration ([ref]): mount core's `run_workflow` tool so a strong model can author a
|
|
1044
1052
|
* deterministic JS orchestration script, run under the HARDENED-vm sandbox (src/orchestration/hardened-vm-runner.ts).
|
|
1045
1053
|
* DEFAULT OFF (`SELF_ORCHESTRATION_ENABLED=true`). When off, core is FAIL-CLOSED (tool not mounted, prompt not
|
|
1046
1054
|
* injected) — zero impact. When on: the hard runner + a CONSERVATIVE governance baseline (workflow children are
|
|
@@ -1059,7 +1067,7 @@ export interface ServiceConfigFlat {
|
|
|
1059
1067
|
* (置了也只 boot warn 一次,行为零变——半配置 fail-loud)。⚠️ 非 postureOn:observer 是实验面,
|
|
1060
1068
|
* core ships dark,单用户 turnkey 也不默认开 —— 只认显式 "true"。合成序见 applyObserverEnvOptIn。 */
|
|
1061
1069
|
experimentalObserverAgents: boolean;
|
|
1062
|
-
/** S8 governance baseline: the model NAMES an LLM-authored workflow script may pick (
|
|
1070
|
+
/** S8 governance baseline: the model NAMES an LLM-authored workflow script may pick ([ref] §2.5). Empty ⇒
|
|
1063
1071
|
* FAIL-CLOSED (the script cannot pick a model → spawned children use the workflow's default role). NEVER the
|
|
1064
1072
|
* whole catalog. `SELF_ORCHESTRATION_MODELS=a,b`. */
|
|
1065
1073
|
selfOrchestrationModels: string[];
|
|
@@ -1074,7 +1082,7 @@ export interface ServiceConfigFlat {
|
|
|
1074
1082
|
* pinning). Either durable form means a background run's record SURVIVES a restart, which is what lets the
|
|
1075
1083
|
* at-least-once completion notify re-derive a run's terminal state after a crash. `memory` = the ephemeral
|
|
1076
1084
|
* `InMemoryWorkflowRunStore` (process-local; no crash recovery, no notify journal) — an explicit opt-out for
|
|
1077
|
-
* a single-instance/ephemeral deployment. (
|
|
1085
|
+
* a single-instance/ephemeral deployment. ([ref]: the old docblock claimed `file` was the default and
|
|
1078
1086
|
* omitted `auto` entirely — a reader picking a backend off this comment would never learn the SQL twin
|
|
1079
1087
|
* exists.) `WORKFLOW_RUN_STORE=auto|file|memory`. Only consulted when SELF_ORCHESTRATION_ENABLED. */
|
|
1080
1088
|
workflowRunStoreBackend: "auto" | "file" | "memory";
|
|
@@ -1089,9 +1097,9 @@ export interface ServiceConfigFlat {
|
|
|
1089
1097
|
* the TOC shell `SchedulerDaemon` reads the SAME store to fire due intents. DEFAULT OFF (the model self-scheduling
|
|
1090
1098
|
* is a power; multi-tenant deployments route scheduling to center, not this host daemon). `SCHEDULER_ENABLED=true`. */
|
|
1091
1099
|
schedulerEnabled: boolean;
|
|
1092
|
-
/**
|
|
1100
|
+
/** [ref] C4: host-lane project-memory injection (CLAUDE.md + git narrative). Default **ON** (subject to the
|
|
1093
1101
|
* host-lane + single-user gate), so "open like CC" works without config. `PROJECT_MEMORY_ENABLED=false` opts out.
|
|
1094
|
-
*
|
|
1102
|
+
* [ref] B4 (lens4 N8): this was `projectMemoryDisabled` — the ONE negative boolean on a ServiceConfig whose
|
|
1095
1103
|
* other 16 flags are positive `*Enabled`/`*Allowed`, so every read site had to invert twice. 🪦 server 3.0.0:
|
|
1096
1104
|
* the retired env name `PROJECT_MEMORY_DISABLED` is a **fail-loud tombstone** — setting it (any value) refuses
|
|
1097
1105
|
* boot with a message naming this knob; it is no longer read. */
|
|
@@ -1105,13 +1113,13 @@ export interface ServiceConfigFlat {
|
|
|
1105
1113
|
* 中心让同步 boot 挂 ~5.7s(SYN 重传节奏,8s fetch 超时内)——本地 TOC 用户的「启动 5 秒」就是它。
|
|
1106
1114
|
* 默认 1500;调大(≥8000)≈旧的全阻塞行为。`CONFIG_BOOT_FETCH_BUDGET_MS`。 */
|
|
1107
1115
|
configBootFetchBudgetMs: number;
|
|
1108
|
-
/** [
|
|
1116
|
+
/** [ref]②/[ref]③ supportsSessionWakeup host-signal (core 1.309 ScheduleWakeup 治本位): the SHELL knows
|
|
1109
1117
|
* whether a resident daemon exists to honor session wakeups — when it spawns a headless engine with none,
|
|
1110
1118
|
* it sets `SCHEDULER_SESSION_WAKEUP=false` and core's ScheduleWakeup refuses up front (fail-loud) instead
|
|
1111
|
-
* of parking a wakeup that would never fire (TB background-reap族 [
|
|
1119
|
+
* of parking a wakeup that would never fire (TB background-reap族 [ref]②b). Default ON (the co-resident
|
|
1112
1120
|
* TOC daemon does honor its own sessions' wakeups); opt-out only — SCHEDULER_ENABLED 同门. */
|
|
1113
1121
|
schedulerSessionWakeup: boolean;
|
|
1114
|
-
/** [
|
|
1122
|
+
/** [ref]/[ref] session-lifetime 同族 host-signal(5.6.0):headless 部署(spawn 时已知无常驻 daemon
|
|
1115
1123
|
* 收割 session-lifetime 记录)设 `SCHEDULER_SESSION_LIFETIME=false` ⇒ capability 面
|
|
1116
1124
|
* `supportsSessionLifetime:false` ⇒ core 的 CronCreate 前门拒收 durable:false(fail-closed 于工具层),
|
|
1117
1125
|
* backend.schedule 第二道同拒——session 记录不落盘=孤儿不产生。Default ON(co-resident TOC daemon
|
|
@@ -1125,7 +1133,7 @@ export interface ServiceConfigFlat {
|
|
|
1125
1133
|
* handsReadOnly, read-only from start) is unaffected/independent. */
|
|
1126
1134
|
planModeEnabled: boolean;
|
|
1127
1135
|
/**
|
|
1128
|
-
* [
|
|
1136
|
+
* [ref]⑥(core 5.56 `Hooks.timeoutMs` 座)—— **每一只 hook 席位单次调用的时间上限**(ms)。
|
|
1129
1137
|
* `HOOKS_TIMEOUT_MS`;**缺席 = 不铸键**,由 core 自默认(600s = CC 自己的数;server 不复制上游默认)。
|
|
1130
1138
|
*
|
|
1131
1139
|
* 🔴 `0` 是有效值(core 契约逐字:写下零的部署说了一件事 —— 每个席位立即到期),不是「未设」;
|
|
@@ -1146,10 +1154,10 @@ export interface ServiceConfigFlat {
|
|
|
1146
1154
|
* Running rows are never reaped (that is the orphan-grace sweep's job). Default 30 days, floor 1m.
|
|
1147
1155
|
* `WORKFLOW_RUN_RETENTION_MS`. */
|
|
1148
1156
|
workflowRunRetentionMs: number;
|
|
1149
|
-
/**
|
|
1157
|
+
/** [ref]-T1 — core 5.8.0 部署级治理窗(`RunnerDeps.usageWindows`):滑动窗内跨任务预算,
|
|
1150
1158
|
* key=principal(缺席=GLOBAL 一口锅,per-key 各一份额度——混流部署语义见 USAGE.md)。
|
|
1151
1159
|
* `USAGE_WINDOWS` 单键 JSON 数组(每项 {windowMs, maxTokens?, maxCostUsd?, anchor});
|
|
1152
|
-
* 缺省未设=关(零行为变化)。
|
|
1160
|
+
* 缺省未设=关(零行为变化)。[ref](core 7.0.0):`maxCostUsd` 是与 maxTokens **对等**的第二只
|
|
1153
1161
|
* ceiling(绝对美元;whichever fills first 即耗尽;缺席的 ceiling 不参与——非 0、非 ∞)——两者
|
|
1154
1162
|
* each optional on its own、**at least one required**(双缺=parseUsageWindows 响亮拒)。fail-loud:
|
|
1155
1163
|
* 坏 JSON/空数组/坏值/未知 anchor → boot throw(parseUsageWindows)。窗形变更≈重开账(first-use
|
|
@@ -1161,11 +1169,11 @@ export interface ServiceConfigFlat {
|
|
|
1161
1169
|
maxCostUsd?: number;
|
|
1162
1170
|
anchor: "first-use" | "rolling";
|
|
1163
1171
|
}[];
|
|
1164
|
-
/** core 1.364 durable background agents([
|
|
1172
|
+
/** core 1.364 durable background agents([ref] 提货单③):reaper 经 `TaskRegistry.reapDurableAgents`
|
|
1165
1173
|
* (联合 reap——条件删赢了才 release 转录 session;裸 store.reap 会 strand 转录)按 scope 清 TERMINAL
|
|
1166
1174
|
* `a*` 行,老于此值的删。SQL twins 走 DISTINCT-scope 枚举;local FileBackgroundAgentStore 单租户
|
|
1167
1175
|
* scope="default"。Default 7 days, floor 1m。`BG_AGENT_RETENTION_MS`。
|
|
1168
|
-
* 🔴
|
|
1176
|
+
* 🔴 [ref]([ref]②,设计判定 2026-08-30):这根旋钮**同时是子代转录(placed 分区)的生效留存视界**——
|
|
1169
1177
|
* 联合 reap 行赢删才 release 转录,分区孤儿腿 `olderThanMs` 同源(core `reapDurableAgentsLane` 亲核),
|
|
1170
1178
|
* retention lane 对 placed 显式让权(retention-store-sql.ts 第五腿)。core 词表常量
|
|
1171
1179
|
* `SUBAGENT_TRANSCRIPT_RETENTION_DAYS_DEFAULT`(30d)在 core dist 零消费,本服务未按它跑;天数形
|
|
@@ -1175,24 +1183,24 @@ export interface ServiceConfigFlat {
|
|
|
1175
1183
|
* failed/stoppedBy=system(诚实终态,跨实例读面永不虚构存活)。core 契约要求 ≥10min(60s 心跳的
|
|
1176
1184
|
* 安全裕度),**下限 10min 硬钳**。Default 15min。`BG_AGENT_STALE_RUNNING_MS`。 */
|
|
1177
1185
|
backgroundAgentStaleRunningMs: number;
|
|
1178
|
-
/** core 1.382(
|
|
1186
|
+
/** core 1.382([ref],[ref] 提货单④)`TaskRegistry.reconcileParkedAgents` 的 stale-claim 清算窗
|
|
1179
1187
|
* ——core 该整块逻辑被 `opts.staleClaimMaxAgeMs !== undefined` 门住,缺席 = **整块清算永不运行**
|
|
1180
1188
|
* (claim 后 claimer 进程崩死的行永久卡在"已 claim 不可再 claim"态,只能等 checkpoint TTL 自然过期;
|
|
1181
1189
|
* checkpoint 已 resolved 但 finalize 未落的行——人已做出的审批决定——同样不会被诚实翻 failed)。
|
|
1182
|
-
* cli 复查([
|
|
1190
|
+
* cli 复查([ref] F1)抓获:server 侧此前调用漏传本项,清算臂结构性不可达。Default 1h(claim→drive→
|
|
1183
1191
|
* finalize 正常全链本应秒级完成,1h 是给"进程慢但仍在跑"的宽松裕度)。`BG_AGENT_PARK_CLAIM_STALE_MS`。 */
|
|
1184
1192
|
backgroundAgentParkClaimStaleMs: number;
|
|
1185
|
-
/** [
|
|
1193
|
+
/** [ref] MED2:agent_roster 的 TTL 清理窗(core [ref]②③ 派给部署的半场——task-scoped 具名 spawn
|
|
1186
1194
|
* 每 run 一新行,无清理=线性无界)。按行的 recorded_at_ms(最后 upsert 触碰)删;SQL twins 扩展面,
|
|
1187
1195
|
* File/Memory 店 core 自带 maxAgeMs。Default 30 days, floor 1m。`ROSTER_RETENTION_MS`。 */
|
|
1188
1196
|
rosterRetentionMs: number;
|
|
1189
|
-
/**
|
|
1197
|
+
/** [ref] 车4 件1(codex R1-high②):`leader_run` 行停在 `running` 超过这个时长即被清算成 `failed`
|
|
1190
1198
|
* 并写清 WHY —— 驱动它的副本已经死了,没有任何东西在跑。**不是接管**(见 store 的
|
|
1191
1199
|
* `reapStaleRunning` 头注)。默认 26h(leader run 的文档上限 24h + 余量),下限 1m。
|
|
1192
1200
|
* Env: `LEADER_RUN_STALE_MS`。`LEADER_ENABLED=false` 的部署上这条腿根本不注册。 */
|
|
1193
1201
|
leaderRunStaleMs: number;
|
|
1194
1202
|
/** 修8(三路复审 absorb-2):periodic scratchpad sweep TTL — the reaper removes per-session scratchpad dirs
|
|
1195
|
-
* ([
|
|
1203
|
+
* ([ref]③ ensureScratchpadDir) whose mtime is older than this (env-facts.ts `sweepStaleScratchpads`; the E21
|
|
1196
1204
|
* session-DELETE purge is the primary lifecycle, this sweep is the orphan backstop). Default 7 days, floor 1m
|
|
1197
1205
|
* when enabled; `SCRATCHPAD_SWEEP_TTL_MS=0`(or negative)disables the sweep entirely. */
|
|
1198
1206
|
scratchpadSweepTtlMs: number;
|
|
@@ -1219,7 +1227,7 @@ export interface ServiceConfigFlat {
|
|
|
1219
1227
|
* documented core-side); the server only passes it through. `SENSITIVE_WRITE_PATTERNS` (comma-separated):
|
|
1220
1228
|
* explicitly set = FULL REPLACEMENT of the recommended set (not a merge); `off` or an empty value = disabled
|
|
1221
1229
|
* (empty array); unset = core's recommended set.
|
|
1222
|
-
* 🔴 **施加点 = governance 层,无条件(
|
|
1230
|
+
* 🔴 **施加点 = governance 层,无条件([ref] / [ref] issue #29;搬家前「composed into the fs-write gate fold
|
|
1223
1231
|
* on host-semantics lanes — task-settings.ts」的旧描述已作废)**:与 `AUTONOMY`/`MANUAL_MODE_SHELL_GATE`
|
|
1224
1232
|
* 同拍,resolve-spec 预铸成一条纯 DENY policy 递给 `applyRuntimeGovernance`,**不看客户端 settings/
|
|
1225
1233
|
* permissionMode 的在场性、不看落在哪个模式臂、不看执行 lane**。旧家把它唯一的合成点挂在
|
|
@@ -1234,17 +1242,17 @@ export interface ServiceConfigFlat {
|
|
|
1234
1242
|
* ⚠️ 非法模式(不含任何路径段,如 `"/"`)在 boot 期 fail-loud(createResolveSpec 先编译一次)——
|
|
1235
1243
|
* **对存量部署是行为变更**:搬家前这种坏值只在 default/auto/acceptEdits 三臂上每请求炸,只跑
|
|
1236
1244
|
* headless 的部署带着坏值也能起服务;现在起不来(方向=运维当场看见,而不是每任务一条 500)。
|
|
1237
|
-
* ✅ 旧注写的「沙箱 lane 相对形有一格无人裁决(cwd 里的守卫段看不见)」自 core 5.19.0(
|
|
1245
|
+
* ✅ 旧注写的「沙箱 lane 相对形有一格无人裁决(cwd 里的守卫段看不见)」自 core 5.19.0([ref])起
|
|
1238
1246
|
* 已收口:守卫按 `ToolCallRequest.cwd` 解析写目标,两条 lane 同得。剩余射程边界(引擎未盖戳的直接
|
|
1239
1247
|
* 调用形)成文在 `deployment-governance.ts` 的 `RelativeTargetLexicalEnv` 类注。 */
|
|
1240
1248
|
sensitiveWritePatterns: string[];
|
|
1241
|
-
/** [
|
|
1249
|
+
/** [ref]§四 opt-in (cli[ref]② finding, core[ref] suggested mechanism): the CC manual-family permission
|
|
1242
1250
|
* modes (default/auto/acceptEdits) gate every fs WRITE hand tool (Write/Edit/NotebookEdit) but never touched
|
|
1243
1251
|
* Bash — a model can `echo -n '…' > file` straight past the write-approval card. `MANUAL_MODE_SHELL_GATE`
|
|
1244
1252
|
* opts a deployment into ALSO tightening `TaskSpec.shellGate` (core `bashReversibilityProbe` under
|
|
1245
1253
|
* `"classify"` asks on constructively-irreversible commands — shell redirects etc. — **plus** the boundary
|
|
1246
1254
|
* case in the 🔴 note below; it is not a "constructive-irreversibility only" filter).
|
|
1247
|
-
* 🔴 **施加点 = governance 层,无条件(
|
|
1255
|
+
* 🔴 **施加点 = governance 层,无条件([ref] / [ref] 分单②;搬家前的旧描述已作废)**:与 `AUTONOMY`
|
|
1248
1256
|
* 同拍在 `applyRuntimeGovernance`(runtime-governance.ts)里施加,**不看客户端 settings/permissionMode
|
|
1249
1257
|
* 的在场性、不看落在哪个模式臂、不看执行 lane**。旧家挂在 task-settings 的 default/auto/acceptEdits 三臂
|
|
1250
1258
|
* + host-lane fs-write wiring 上,等于让一个部署级旋钮的生死由客户端表态决定(print/headless 腿不 stamp
|
|
@@ -1252,7 +1260,7 @@ export interface ServiceConfigFlat {
|
|
|
1252
1260
|
* rank 合成:与 autonomy 派生值取大(`ask`→`"always"` 压过 `"classify"`),对 base 只升不降。
|
|
1253
1261
|
* 客户端 settings 折叠在其后、tighten-only,拿不掉这个值;SUP 路由姿态只会把它抬到 `"always"`。
|
|
1254
1262
|
* 🔴 **语义随 core 版本演进(2026-07-31 核)**:`"classify"` 下「纯读自动放行」这句自 core 2.7.0 起
|
|
1255
|
-
* **不再无条件成立** ——
|
|
1263
|
+
* **不再无条件成立** —— [ref] 给 classifier 加了 root 边界扫描,core 内部自铸 boundary
|
|
1256
1264
|
* (`prepare-task.ts` 的 `shellReadBoundary`:roots=任务 root+additionalRoots+additionalReadRoots,
|
|
1257
1265
|
* cwd=活 handsCwd),
|
|
1258
1266
|
* **读到 roots 之外的路径同样会 ask**(server 侧零接线即得:我们只传 shellGate,边界是 core 自算的)。
|
|
@@ -1262,7 +1270,7 @@ export interface ServiceConfigFlat {
|
|
|
1262
1270
|
* other value (incl. `"off"`) is treated as unset — this knob has no "off" value to opt BACK OUT with once a
|
|
1263
1271
|
* session's baseline already tightened elsewhere (tightenTaskSpec would reject that as a loosen anyway). */
|
|
1264
1272
|
manualModeShellGate?: "always" | "classify";
|
|
1265
|
-
/** [
|
|
1273
|
+
/** [ref]④ defer face (EXPERIMENTAL, default OFF): mark the default scenario's LONG-TAIL first-party tools
|
|
1266
1274
|
* (today = SelectEnvironment only) `defer:true` (core tool-disclosure: the model sees a placeholder until it
|
|
1267
1275
|
* ToolSearch-loads the schema). Assessment says the win is marginal for us (spec.tools total ≈4.2k tokens, of
|
|
1268
1276
|
* which Agent + the Task quartet ≈3.2k are CC-core posture = must stay inline; the deferrable tail is
|
|
@@ -1270,7 +1278,7 @@ export interface ServiceConfigFlat {
|
|
|
1270
1278
|
* hiding it behind ToolSearch suppresses exactly the spontaneous use it exists for). MCP tools are ALWAYS
|
|
1271
1279
|
* auto-deferred by core regardless of this flag. `TOOL_DEFER_LONGTAIL=true` opts in. */
|
|
1272
1280
|
toolDeferLongtail: boolean;
|
|
1273
|
-
/** LSP code-intelligence tool (
|
|
1281
|
+
/** LSP code-intelligence tool ([ref] §13.1): mount core's `lsp` tool, routed to an E2B LSP sidecar. Requires
|
|
1274
1282
|
* REMOTE_EXEC=e2b. Default OFF (the on-the-fly language-server install is heavy until an E2B template bakes it).
|
|
1275
1283
|
* `LSP_ENABLED=true`. */
|
|
1276
1284
|
lspEnabled: boolean;
|
|
@@ -1279,7 +1287,7 @@ export interface ServiceConfigFlat {
|
|
|
1279
1287
|
* server binary on PATH, and it DEGRADES gracefully (ENOENT → grep/read) + spawns lazily/cached, so it is DEFAULT
|
|
1280
1288
|
* ON for the host lane (CC-parity); set `LSP_HOST_ENABLED=false` to opt out. (`REMOTE_EXEC=host` only — ssh/adb/
|
|
1281
1289
|
* local-docker can't reach a local child process to the right filesystem.)
|
|
1282
|
-
*
|
|
1290
|
+
* [ref] B4 (lens4 N7): this lane used to share `LSP_ENABLED` with `lspEnabled` above — one env name driving
|
|
1283
1291
|
* two OPPOSITE defaults. It now has its own knob. 🪦 server 3.0.0: `LSP_ENABLED=false` (the pre-split host
|
|
1284
1292
|
* opt-out) is a **fail-loud tombstone** — it refuses boot naming `LSP_HOST_ENABLED`; `LSP_ENABLED=true` keeps
|
|
1285
1293
|
* its own meaning (the sandbox lane's opt-in above) and is unaffected. */
|
|
@@ -1290,7 +1298,7 @@ export interface ServiceConfigFlat {
|
|
|
1290
1298
|
* 10s hard-cut would kill long turns); floor 10s. Env: DRAIN_GRACE_MS. SIGINT (Ctrl-C dev
|
|
1291
1299
|
* ergonomics) and a SECOND SIGTERM skip the drain and hard-stop immediately. */
|
|
1292
1300
|
drainGraceMs: number;
|
|
1293
|
-
/** B3 (shell [
|
|
1301
|
+
/** B3 (shell [ref]②): SIGHUP idle window. SIGHUP means "the process-group owner's terminal went away" — but
|
|
1294
1302
|
* under the shared-engine shape (several shell sessions on one config, engine rides the FIRST shell's process
|
|
1295
1303
|
* group per the T11 anti-orphan call) other live sessions may still be using this engine, so an unconditional
|
|
1296
1304
|
* drain kills a peer mid-turn (499) and 503s new submits. Instead SIGHUP arms an idle watch: shut down only
|
|
@@ -1299,7 +1307,7 @@ export interface ServiceConfigFlat {
|
|
|
1299
1307
|
* T11 stands, just bounded instead of immediate. A SECOND SIGHUP (or SIGTERM) escalates to the normal drain
|
|
1300
1308
|
* path. Default 120s, floor 5s. Env: SIGHUP_IDLE_GRACE_MS. */
|
|
1301
1309
|
sighupIdleGraceMs: number;
|
|
1302
|
-
/**
|
|
1310
|
+
/** [ref](黑板 [ref]):引擎 **parent 监视**。壳自 spawn 引擎的同机形里,壳被 SIGKILL(崩溃/强杀,
|
|
1303
1311
|
* 没有任何清理钩子)后引擎被 reparent 到 init 而**继续活着** —— 孤儿引擎占端口、占库连接、占模型
|
|
1304
1312
|
* 配额,而且再没有人会给它发 SIGTERM(T11 的进程组腿只覆盖信号送得到的形)。设了本键 = 引擎每 15s
|
|
1305
1313
|
* 用 `process.kill(pid, 0)` 探一拍这个 pid,**连续两拍** ESRCH(父不在)才判死;判死后走与 SIGTERM
|
|
@@ -1310,7 +1318,7 @@ export interface ServiceConfigFlat {
|
|
|
1310
1318
|
* 已知残余(成文,不收窄):两拍窗口内 pid 被系统复用 ⇒ 探活看到的是**新**进程,监视判"父还活着"
|
|
1311
1319
|
* 而不自退。监视是**尽力自愈**、不是强一致的父子生命周期绑定。 Env: `SEMA_PARENT_PID`。 */
|
|
1312
1320
|
parentPid?: number;
|
|
1313
|
-
/**
|
|
1321
|
+
/** [ref](黑板 [ref]②):引擎**附着租约自退**总开关。壳自 spawn 引擎的本机形里,壳退出之后引擎
|
|
1314
1322
|
* 继续活着 = 占端口/占库连接/占模型配额的孤儿。设了本键 = 引擎每 15s 自查一次「还有没有人附着」,
|
|
1315
1323
|
* **三合取**(无附着 SSE 流 ∧ 无在飞 run ∧ 无非探针 HTTP 触点)**持续**满 {@link engineLingerMs}
|
|
1316
1324
|
* 才自退,且自退走的是与 SIGTERM **逐字同一条** graceful drain 腿(不是裸 `process.exit`)。
|
|
@@ -1319,11 +1327,11 @@ export interface ServiceConfigFlat {
|
|
|
1319
1327
|
* 与 {@link parentPid} 是**两件**:那条问「生我的 pid 还在吗」(多壳共享一引擎时结构性问错),
|
|
1320
1328
|
* 这条问「还有没有人附着」。两条可同时装,各走各的判据。 Env: `ENGINE_AUTO_EXIT`(默认 off)。 */
|
|
1321
1329
|
engineAutoExit: boolean;
|
|
1322
|
-
/**
|
|
1330
|
+
/** [ref]:自退前三合取必须**持续**成立的静默窗。默认 60s —— 防的是**壳重启窗**:壳崩了/重启的 1-3s
|
|
1323
1331
|
* 里附着数确实是 0,窗太短就在用户眼皮底下把引擎杀了,窗内任何一次重连即把计时清零。
|
|
1324
1332
|
* {@link engineAutoExit} 关着时本值不生效,但**照样解析、坏值照样拒启**(部署级旋钮的解析不挂在
|
|
1325
1333
|
* 另一个旋钮的表态上 —— 否则手滑值躺在配置里,等哪天有人打开自退时当场生效且从没人报过警)。
|
|
1326
|
-
* **坏值拒启**(
|
|
1334
|
+
* **坏值拒启**([ref] A 档):非安全整数 / 落在 `[1000, 86400000]`(1s…24h)之外一律 boot 期 throw
|
|
1327
1335
|
* 带指路 —— 「把 60(秒)填进一个毫秒键」是这类旋钮最常见的手滑,而 60ms 的 linger 等于把整条防误杀
|
|
1328
1336
|
* 腿静默摘掉;上界那一侧同样承重(codex R1-F2):`1e100` 能过朴素的「正整数吗」检查,而 elapsed
|
|
1329
1337
|
* **永远追不上它** ⇒ 看着配好了、自退其实整件失效。要「永不自退」请用 `ENGINE_AUTO_EXIT=false`。
|
|
@@ -1344,26 +1352,26 @@ export interface ServiceConfigFlat {
|
|
|
1344
1352
|
* stream (the durable-suspend leg is wired separately). A CC cap → posture-gated (single-user turnkey →
|
|
1345
1353
|
* ON; multi-tenant opt-in); `ASK_QUESTION_ENABLED=true/false` overrides. */
|
|
1346
1354
|
askQuestionEnabled: boolean;
|
|
1347
|
-
/**
|
|
1355
|
+
/** [ref] 裁2:AskUserQuestion 的**裁量窗**——每 run 腿的并发帽 / 总量帽 / 无人应答的释放窗。窗用尽或到期
|
|
1348
1356
|
* 不是拒绝、也不是替人作答:协调器报 `unavailable`,落点(durable park / 非 durable 合成续跑)归 core。
|
|
1349
1357
|
* `QUESTION_MAX_CONCURRENT_PER_RUN`(默认 2)/ `QUESTION_MAX_TOTAL_PER_RUN`(20)/ `QUESTION_TTL_MS`
|
|
1350
1358
|
* (300000),越界值启动期响亮拒(照 `MCP_ELICITATION_*` 同门,不静默夹取)。缺席 ⇒ 协调器出厂窗
|
|
1351
1359
|
* {@link import("./question.js").DEFAULT_QUESTION_THROTTLE}(与本旋钮族默认逐字同值)。 */
|
|
1352
1360
|
questionThrottle?: QuestionThrottle;
|
|
1353
|
-
/** [
|
|
1361
|
+
/** [ref]/[ref]② live tool-approval HITL — mount the ToolApprovalCoordinator on `RunnerDeps.onAsk` + the
|
|
1354
1362
|
* `POST /v1/tool-approvals/:id/respond` route so a policy `ask` (the fs-write gate, ask-lists, non-durable safety
|
|
1355
1363
|
* asks) routes to the live human as the CC three-choice card on the run's stream (core 1.290 sync-ask leg). A CC
|
|
1356
1364
|
* cap → posture-gated like askQuestion (single-user turnkey → ON; multi-tenant opt-in);
|
|
1357
|
-
* `TOOL_APPROVAL_ENABLED=true/false` overrides. Absent ⇒ core's headless auto-deny stands ([
|
|
1365
|
+
* `TOOL_APPROVAL_ENABLED=true/false` overrides. Absent ⇒ core's headless auto-deny stands ([ref]⑤ fail-closed). */
|
|
1358
1366
|
toolApprovalEnabled: boolean;
|
|
1359
1367
|
/**
|
|
1360
|
-
*
|
|
1361
|
-
*
|
|
1368
|
+
* [ref] 车二(core [ref] 持久化权限规则「不再询问」车道)**总开关**。`PERMISSION_RULES_ENABLED`,
|
|
1369
|
+
* **[ref] 起默认 ON**(clay [ref] 裁)。
|
|
1362
1370
|
*
|
|
1363
1371
|
* 🔴 它曾经默认 OFF,而那个默认有**唯一**一条理由(codex 车二 round7 [high] 一):这条车道**只会加
|
|
1364
1372
|
* 放行、不会减**,而车二**没有撤销面**——列出 / 删除自己已存规则的口子没建,core 的
|
|
1365
1373
|
* `removePersistedRule` 在包里但本仓零调用点。一次误导入的全局规则因此会一直生效,租户自己拿它没
|
|
1366
|
-
*
|
|
1374
|
+
* 办法,只能找运维改库。[ref] 交付的正是那条撤销面本身(`GET /v1/rules` + `DELETE /v1/rules`,后者
|
|
1367
1375
|
* 恒经 `removePersistedRule` 产墓碑)加上 operator 的超范围回收腿 ⇒ **前置条件兑现,默认翻转**。
|
|
1368
1376
|
* 记这段史不是怀旧:哪天有人想把某条「只加放行」的车道默认打开,判据就是这一条 —— 收得回来才敢开。
|
|
1369
1377
|
*
|
|
@@ -1379,15 +1387,15 @@ export interface ServiceConfigFlat {
|
|
|
1379
1387
|
/** 运维是否**显式**设过 `PERMISSION_RULES_ENABLED`(取值之外的一位,同 {@link dbBackendExplicit} 的
|
|
1380
1388
|
* 姿势)。唯一消费者 = boot 期休眠行审计:对显式表过态的部署说「N 只桶随默认 ON 激活」是假话。 */
|
|
1381
1389
|
permissionRulesEnabledExplicit: boolean;
|
|
1382
|
-
/**
|
|
1390
|
+
/** [ref] 车2([ref] §3.3 D3,窗长三元的安全余量):`ToolApprovalCoordinator` 的可选 `windowMarginMs`
|
|
1383
1391
|
* 构造项——有效窗 = `min(ttlMs, legRemainingMs − 本值)`,余量不足 ⇒ 不开窗直接走窗到期同路(park)。
|
|
1384
1392
|
* 仅在装配点把 `ToolApprovalRunContext.legDeadlineMonotonic` 传给协调器(车3 的活)时才实际生效——本
|
|
1385
1393
|
* 旋钮本身缺省对现行为零影响(D1)。`STREAM_ASK_WINDOW_MARGIN_MS`,默认 10000(10s)。ttl 概念沿用既有
|
|
1386
1394
|
* `approvalTimeoutSec` 族,本旋钮不新增第二个 TTL 概念。 */
|
|
1387
1395
|
streamAskWindowMarginMs: number;
|
|
1388
|
-
/**
|
|
1396
|
+
/** [ref] 车3([ref] 流内审批协议)总开关 + 四个从属旋钮。
|
|
1389
1397
|
*
|
|
1390
|
-
* **现行默认(clay 裁 2026-08-08 走 (a)
|
|
1398
|
+
* **现行默认(clay 裁 2026-08-08 走 (a),[ref] 翻真验证后)**:`STREAM_APPROVAL_ENABLED` 默认 **true**
|
|
1391
1399
|
* = 协议整体默认 **ON**;`STREAM_ASK_WINDOW_MS` 默认 **300000**(5min,与 sync 腿既有活卡窗、与
|
|
1392
1400
|
* `DEFAULT_APPROVAL_TTL_MS` 对齐——「开协议」不再顺带把窗砍短)。⚠️ 版本坐标:翻转**已在树上生效**,
|
|
1393
1401
|
* 发布线上落在 7.4.0 之后的下一个发布,所以一台自报 7.4.0 的**已发布** worker 仍是 OFF,别只按
|
|
@@ -1412,20 +1420,20 @@ export interface ServiceConfigFlat {
|
|
|
1412
1420
|
* `STREAM_APPROVAL_ADHOC_GRACE_MS` / `STREAM_APPROVAL_ORPHAN_TTL_MS`(后四键 = 车5 收敛器)。 */
|
|
1413
1421
|
streamApproval: StreamApprovalConfig;
|
|
1414
1422
|
/**
|
|
1415
|
-
*
|
|
1423
|
+
* [ref] R-13 C(`UNATTENDED_APPROVAL_POLICY`;裁定 [ref]Q1「裁2:A+C」/[ref] 裁②)——一只治理 ask
|
|
1416
1424
|
* 到了而**没有任何人**能答时,这条部署要什么终局。闭集 `park`(缺省)/ `deny`,**坏值 boot 拒启**
|
|
1417
|
-
* (
|
|
1425
|
+
* ([ref] A 档:一个拼错的词若被当成「未设」静默回缺省,运维会以为自己关掉了 park 积压而实际没有)。
|
|
1418
1426
|
*
|
|
1419
1427
|
* **谁需要**:auto / headless / 无人值守部署(夜间批处理、CI 里的 agent、没有任何人盯屏的 worker)。
|
|
1420
1428
|
* 它们的 park 是死信:run 挂起候一个永远不会来的人,占着 checkpoint 与配额直到 TTL。
|
|
1421
1429
|
* **谁被伤**:配了 `deny` 却其实有人的部署 —— 那些本可以补批的操作变成当场拒绝。补偿 = 这是**显式**
|
|
1422
1430
|
* 一句声明,缺省永远是 `park`;改回来只需删掉这一行 env。
|
|
1423
|
-
* **不看任何客户端表态**(纯部署级;memory: operator-knob-must-be-unconditional ——
|
|
1431
|
+
* **不看任何客户端表态**(纯部署级;memory: operator-knob-must-be-unconditional —— [ref] shellGate 让
|
|
1424
1432
|
* 一个部署级旋钮的生死由客户端 posture 决定,同病犯过两次)。
|
|
1425
1433
|
*
|
|
1426
1434
|
* 施加点 = `ToolApprovalCoordinator` 的构造参 `unattendedPolicy` **一处**,五条「无人可答」的臂读同一
|
|
1427
1435
|
* 个值(设计稿 §1 的表:(a) 有店窗到期赢 CAS /(b) 无店窗到期 /(c) 店报错 catch /(d) windowZero 与
|
|
1428
|
-
* headless 腿 /(e) 断连强转 + emit 全灭 + 写侧准入超限 + **投递集合入口活性过滤清空**(
|
|
1436
|
+
* headless 腿 /(e) 断连强转 + emit 全灭 + 写侧准入超限 + **投递集合入口活性过滤清空**([ref] 归
|
|
1429
1437
|
* 位:与「查无活流」同一件事实的两个时刻,详见 `askBroadcast` 的该臂注))。`"timeout"` 宿主自报只留在 (b)(c) ——
|
|
1430
1438
|
* 结束等待的确实是本仓的窗;其余三臂结束等待的是容量/连接/装配,自报恒缺席。
|
|
1431
1439
|
*
|
|
@@ -1450,9 +1458,9 @@ export interface ServiceConfigFlat {
|
|
|
1450
1458
|
* 自行收敛成 DENIED/VOID,不会凭空生出 park;残余 = 那类行的归因记成 `routing_failure`。
|
|
1451
1459
|
*/
|
|
1452
1460
|
unattendedApprovalPolicy: UnattendedApprovalPolicy;
|
|
1453
|
-
/** [
|
|
1454
|
-
* 安全论证:主 LLM 与子 agent 同 root 同信任域,主 LLM 本就能写这棵树([
|
|
1455
|
-
* 安全增益≈0(只防绕路不防直路的门不是边界);实测产品代价=[
|
|
1461
|
+
/** [ref]① (clay A 案 = workflow 权限全面 CC parity): workflow 子 agent 的默认权限基线与主 LLM 同权(base `{}`)。
|
|
1462
|
+
* 安全论证:主 LLM 与子 agent 同 root 同信任域,主 LLM 本就能写这棵树([ref] ask 门照管),单独钳子 agent 的
|
|
1463
|
+
* 安全增益≈0(只防绕路不防直路的门不是边界);实测产品代价=[ref]A 死锁。`WORKFLOW_AGENTS_READONLY=true` =
|
|
1456
1464
|
* TOB 保守部署的可选旋钮:workflow 子 agent 基线加 handsReadOnly(1.190 前的旧默认)。默认 off。 */
|
|
1457
1465
|
workflowAgentsReadOnly: boolean;
|
|
1458
1466
|
/** Sandbox-image-pool BAKE job API (IMAGE-API-DESIGN.md §P2): enable /v1/images/bakes* (operator-submit + the
|
|
@@ -1465,22 +1473,22 @@ export interface ServiceConfigFlat {
|
|
|
1465
1473
|
/** Task Trace API (S1): persist the agent's reasoning/thinking into the durable run event log (for the CC-style
|
|
1466
1474
|
* trace UI). Default ON; `TRACE_THINKING=false` disables capture for sensitive deployments. Redacted on persist. */
|
|
1467
1475
|
traceThinking: boolean;
|
|
1468
|
-
/**
|
|
1476
|
+
/** [ref](core 5.30.0 readFace 部署座席):READ 容纳面。缺席=不铸(core 引擎默认 roots,server 不写死
|
|
1469
1477
|
* 上游默认);显式坏词启动期响亮拒。只影响读面,写面永不受它管(core 契约)。 */
|
|
1470
1478
|
readFace?: "open" | "roots";
|
|
1471
|
-
/**
|
|
1479
|
+
/** [ref]:部署级 READ deny 追加表(additive-only,core 内建表永不可缩)。env=JSON 数组
|
|
1472
1480
|
* [{pattern, caseSensitive?}],boot 时用 core `compileReadDeny` 预验——坏形拒启。缺席=不铸。 */
|
|
1473
1481
|
readDenyPatterns?: {
|
|
1474
1482
|
pattern: string;
|
|
1475
1483
|
caseSensitive: boolean;
|
|
1476
1484
|
}[];
|
|
1477
|
-
/**
|
|
1485
|
+
/** [ref] 件 G5(core 5.33.0 [ref],clay 裁定件):**内建** deny 表的档位选择(闭集四档:credentials /
|
|
1478
1486
|
* shell-history / browser / wallet)。`READ_DENY_BUILTIN_TIERS`=逗号分隔;`none`=显式空姿态(core 的
|
|
1479
1487
|
* `[]`:一档内建都不要);坏档名 / 空串**启动期响亮拒**(校验用 core 自己的 `resolveReadDenyBuiltins`)。
|
|
1480
1488
|
* 缺席=不铸 ⇒ core 自默认(除 shell-history 外全开)。**仅 deployment 席**:TaskSpec 上没有同名键,
|
|
1481
1489
|
* 任务/受治脚本无法据此放宽自己的部署(core 侧的设计,与本仓「部署级旋钮无条件施加」同向)。 */
|
|
1482
1490
|
readDenyBuiltinTiers?: readonly string[];
|
|
1483
|
-
/**
|
|
1491
|
+
/** [ref] 件 G5:按**行名**(内建表的 canonical pattern)删内建条目,在档位选择**之后**生效。
|
|
1484
1492
|
* `READ_DENY_BUILTIN_EXCLUDE`=逗号分隔;不在表里的行名 / 空串**启动期响亮拒**。
|
|
1485
1493
|
* 🔴 不变量(判据帖 G5b):删内建**绝不**削弱任务自己显式声明的 deny —— 那是另一层(additions)。 */
|
|
1486
1494
|
readDenyBuiltinExclude?: readonly string[];
|
|
@@ -1594,11 +1602,11 @@ export type ServiceApprovalConfig = Pick<ServiceConfigFlat, "approvalRequire" |
|
|
|
1594
1602
|
export type ServiceMemoryConfig = Pick<ServiceConfigFlat, "memoryEngineEnabled" | "memoryEngineDir" | "memoryEngineRemoteLaneAllowed" | "memoryEngineBackend" | "memoryScope" | "memoryPersistenceCapable" | "memorySync" | "memoryEmbedder" | "memoryOrgAdmissionMode" | "memoryDelegationEvidence" | "memoryProvenance" | "memoryCapturePolicy" | "memoryConsolidationDriver" | "memoryOrgDirectoryJson" | "memoryOrgGrantTtlMs" | "memoryOrgUnavailableBackoffMs" | "projectMemoryEnabled" | "syncImportLeaseStaleSec">;
|
|
1595
1603
|
/** 组:auth(鉴权 / 身份 / 治理棒)。`commandPolicy` 只有 sema-registry 腿(无 env 标量形),故 env 解析
|
|
1596
1604
|
* 函数不产出它,但它与 `autonomy` 是同一根治理棒的两半,归本组。
|
|
1597
|
-
*
|
|
1605
|
+
* [ref] 的三件部署治理声明(`compliancePosture`/`lockedConfigKeys`/`retentionPolicy`)同归本组:
|
|
1598
1606
|
* 三者都是 operator 在配置面写下的**治理声明**(与 autonomy/commandPolicy 同族),不是存储旋钮
|
|
1599
1607
|
* ——`retentionPolicy` 尤其容易被误归 store 组:它的消费点是 core 的启动期能力校验与将来的调度面,
|
|
1600
1608
|
* config 这一层它只是一句声明。 */
|
|
1601
|
-
export type ServiceAuthConfig = Pick<ServiceConfigFlat, "authToken" | "authTokens" | "allowUnauthedWrites" | "corsOrigins" | "principalHeader" | "requirePrincipal" | "autonomy" | "commandPolicy" | "compliancePosture" | "lockedConfigKeys" | "retentionPolicy" | "retentionSweep" | "operatorPrincipals" | "principalJwtPubkeys" | "principalJwtIss" | "principalJwtAud" | "principalJwtMaxTtlSec" | "bindHost" | "bindHostSource">;
|
|
1609
|
+
export type ServiceAuthConfig = Pick<ServiceConfigFlat, "authToken" | "authTokens" | "allowUnauthedWrites" | "corsOrigins" | "principalHeader" | "requirePrincipal" | "autonomy" | "commandPolicy" | "compliancePosture" | "lockedConfigKeys" | "configCatalogEnabled" | "retentionPolicy" | "retentionSweep" | "operatorPrincipals" | "principalJwtPubkeys" | "principalJwtIss" | "principalJwtAud" | "principalJwtMaxTtlSec" | "bindHost" | "bindHostSource">;
|
|
1602
1610
|
/** 组:orchestration(编排 + 执行车道 + 沙箱面 + workflow/后台 agent 存留)。 */
|
|
1603
1611
|
export type ServiceOrchestrationConfig = Pick<ServiceConfigFlat, "remoteExec" | "worktreeIsolation" | "leaderEnabled" | "leaderFanoutEnabled" | "routerEnabled" | "selfOrchestrationEnabled" | "selfOrchestrationModels" | "selfOrchestrationWorkerIsolation" | "forkEnabled" | "experimentalObserverAgents" | "schedulerEnabled" | "schedulerSessionWakeup" | "schedulerSessionLifetime" | "schedulerStorePath" | "planModeEnabled" | "hooksTimeoutMs" | "workflowRunStoreBackend" | "workflowOrphanGraceMs" | "workflowJournalRetentionMs" | "workflowRunRetentionMs" | "usageWindows" | "workflowAgentsReadOnly" | "workflowSizeGuideline" | "backgroundAgentRetentionMs" | "backgroundAgentStaleRunningMs" | "backgroundAgentParkClaimStaleMs" | "delegationEntryCaps" | "rosterRetentionMs" | "leaderRunStaleMs" | "scratchpadSweepTtlMs" | "sandboxPkgSource" | "sessionAutoTitle" | "selectEnvironmentTool" | "envFactsEnabled" | "toolDeferLongtail" | "lspEnabled" | "lspHostEnabled" | "imageBakes" | "readFace" | "readDenyPatterns" | "readDenyBuiltinTiers" | "readDenyBuiltinExclude">;
|
|
1604
1612
|
/** 组:limitsHttp(HTTP 面 + 各类上限/配额/回收窗)。 */
|