@sema-agent/server 7.138.0 → 7.140.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION.md +457 -7
- package/README.md +7 -4
- package/README.zh-CN.md +6 -4
- package/USAGE.md +91 -41
- package/deploy/sema-up/README.md +1 -1
- package/deploy/sema-up/lib/lanes.json +3 -2
- package/dist/adoption/runner.js +1 -1
- package/dist/adoption/sql.js +1 -1
- package/dist/adoption/wire.d.ts +3 -3
- package/dist/approval-card.d.ts +26 -26
- package/dist/bench/s1/arms.d.ts +1 -1
- package/dist/bench/s1/arms.js +1 -3
- package/dist/bench/s1/live-deps.js +3 -2
- package/dist/bench/s1/row.d.ts +5 -2
- package/dist/bench/s1/row.js +2 -22
- package/dist/bench/s1/run-firm.js +2 -2
- package/dist/boot/adoption.js +1 -1
- package/dist/boot/device-lane.d.ts +8 -3
- package/dist/boot/device-lane.js +7 -2
- package/dist/boot/execution-env.d.ts +4 -2
- package/dist/boot/execution-env.js +28 -34
- package/dist/boot/execution-lane.d.ts +9 -1
- package/dist/boot/execution-lane.js +6 -1
- package/dist/boot/governance-seams.d.ts +3 -2
- package/dist/boot/governance-seams.js +9 -11
- package/dist/boot/memory-boundary.d.ts +14 -51
- package/dist/boot/memory-boundary.js +10 -20
- package/dist/boot/memory-consolidation.d.ts +15 -11
- package/dist/boot/memory-consolidation.js +25 -14
- package/dist/boot/resolve-spec.d.ts +4 -6
- package/dist/boot/resolve-spec.js +10 -13
- package/dist/boot/retention-lane.d.ts +5 -5
- package/dist/boot/retention-lane.js +0 -6
- package/dist/boot/runner-deps.d.ts +6 -4
- package/dist/boot/runner-deps.js +3 -1
- package/dist/boot/session-faces.d.ts +0 -3
- package/dist/boot/session-faces.js +15 -8
- package/dist/boot/stage-02-web-admin-pull.js +2 -2
- package/dist/boot/stage-03-store-backend.d.ts +2 -6
- package/dist/boot/stage-03-store-backend.js +2 -3
- package/dist/boot/stage-04-stores.d.ts +2 -6
- package/dist/boot/stage-04-stores.js +5 -5
- package/dist/boot/stage-05-execution-env.d.ts +2 -6
- package/dist/boot/stage-05-execution-env.js +2 -2
- package/dist/boot/stage-06-runners.d.ts +2 -6
- package/dist/boot/stage-06-runners.js +2 -3
- package/dist/boot/stage-07-capability-layer.d.ts +2 -6
- package/dist/boot/stage-08-reapers.d.ts +2 -6
- package/dist/boot/stage-09-leader.d.ts +2 -6
- package/dist/boot/stage-09-leader.js +1 -2
- package/dist/boot/stage-10-http-server.d.ts +2 -6
- package/dist/boot/stage-10-http-server.js +7 -6
- package/dist/boot/stores.d.ts +3 -6
- package/dist/boot/stores.js +27 -40
- package/dist/boot/task-list-lane.d.ts +1 -1
- package/dist/boot/task-list-lane.js +1 -1
- package/dist/boot/web-admin.js +37 -11
- package/dist/capabilities/execution-lane.d.ts +2 -2
- package/dist/capabilities/mcp-probe.js +1 -1
- package/dist/capabilities/scenarios.d.ts +1 -1
- package/dist/capability-facts.d.ts +15 -7
- package/dist/capability-facts.js +8 -3
- package/dist/config-catalog.js +9 -8
- package/dist/config-invariants.d.ts +23 -3
- package/dist/config-invariants.js +42 -0
- package/dist/config-provider.d.ts +33 -37
- package/dist/config-provider.js +51 -30
- package/dist/config-types.d.ts +21 -7
- package/dist/config.d.ts +33 -0
- package/dist/config.js +46 -16
- package/dist/delegated-session-owner.d.ts +4 -3
- package/dist/delegated-session-owner.js +1 -1
- package/dist/deployment-shape.d.ts +10 -9
- package/dist/deployment-shape.js +4 -4
- package/dist/device-enrollment.d.ts +41 -2
- package/dist/device-enrollment.js +27 -12
- package/dist/device-store.d.ts +58 -85
- package/dist/device-store.js +19 -49
- package/dist/device-ws-hub.js +2 -1
- package/dist/env-name-allowlist-knobs.d.ts +5 -4
- package/dist/exec-cut.d.ts +60 -0
- package/dist/exec-cut.js +36 -0
- package/dist/execution-lane-caps.d.ts +115 -105
- package/dist/execution-lane-caps.js +76 -82
- package/dist/execution-placement.d.ts +259 -0
- package/dist/execution-placement.js +199 -0
- package/dist/field-conflict.d.ts +3 -2
- package/dist/field-conflict.js +1 -0
- package/dist/hosted-posture.d.ts +2 -2
- package/dist/http/admission.js +8 -19
- package/dist/http/checkpoint-ctx.d.ts +21 -12
- package/dist/http/checkpoint-ctx.js +4 -2
- package/dist/http/claimed-run.d.ts +1 -1
- package/dist/http/durable-run-leg.js +9 -5
- package/dist/http/execution-context.d.ts +218 -0
- package/dist/http/execution-context.js +330 -0
- package/dist/http/memory-compliance-failure-reply.d.ts +3 -1
- package/dist/http/memory-compliance-failure-reply.js +5 -0
- package/dist/http/memory-layer-reply.d.ts +30 -0
- package/dist/http/memory-layer-reply.js +24 -0
- package/dist/http/resume-legs.js +63 -36
- package/dist/http/retired-service-deps.d.ts +1 -1
- package/dist/http/retired-service-deps.js +1 -1
- package/dist/http/route-ctx.d.ts +14 -8
- package/dist/http/routes/adoption.js +1 -1
- package/dist/http/routes/background.d.ts +29 -1
- package/dist/http/routes/background.js +29 -2
- package/dist/http/routes/devices.d.ts +13 -19
- package/dist/http/routes/devices.js +21 -26
- package/dist/http/routes/memory-bundle.js +3 -0
- package/dist/http/routes/memory-compliance.js +8 -1
- package/dist/http/routes/memory-consolidation.js +12 -1
- package/dist/http/routes/memory-origin.js +14 -2
- package/dist/http/routes/memory-policy.js +5 -0
- package/dist/http/routes/session-sync.js +110 -15
- package/dist/http/routes/sessions.d.ts +6 -0
- package/dist/http/routes/sessions.js +143 -22
- package/dist/http/routes/side-query.d.ts +12 -4
- package/dist/http/routes/side-query.js +4 -5
- package/dist/http/routes/tasks.js +41 -33
- package/dist/http/server.d.ts +40 -44
- package/dist/http/server.js +13 -2
- package/dist/http/session-inherit-env.d.ts +3 -4
- package/dist/http/session-inherit-env.js +1 -1
- package/dist/http/wire-types.d.ts +8 -12
- package/dist/identity-source.d.ts +1 -1
- package/dist/identity-source.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/lane-home-probe.d.ts +68 -42
- package/dist/lane-home-probe.js +53 -30
- package/dist/leader/wire.js +5 -4
- package/dist/memory-bundle-engine.d.ts +16 -9
- package/dist/memory-bundle-engine.js +29 -6
- package/dist/memory-operator-faces.d.ts +85 -30
- package/dist/memory-operator-faces.js +136 -30
- package/dist/memory-project-layer.d.ts +3 -21
- package/dist/memory-project-layer.js +11 -8
- package/dist/memory-scope-stores.d.ts +73 -0
- package/dist/memory-scope-stores.js +86 -0
- package/dist/memory-scope.d.ts +29 -5
- package/dist/memory-scope.js +16 -4
- package/dist/memory-sync-client.d.ts +70 -18
- package/dist/memory-sync-client.js +215 -117
- package/dist/memory-sync.d.ts +1 -1
- package/dist/memory-sync.js +3 -2
- package/dist/observability/cost-taxonomy.d.ts +2 -2
- package/dist/observability/fail-open.d.ts +12 -0
- package/dist/observability/fail-open.js +12 -0
- package/dist/observability/run-terminal.js +0 -1
- package/dist/orchestration/workflow-notify-journal.js +4 -4
- package/dist/org-memory-admission.d.ts +4 -3
- package/dist/org-memory-admission.js +6 -6
- package/dist/parked-decide.d.ts +34 -9
- package/dist/parked-decide.js +12 -19
- package/dist/parked-revive-surface.d.ts +12 -15
- package/dist/parked-revive-surface.js +3 -6
- package/dist/peer-seat.d.ts +13 -7
- package/dist/peer-seat.js +37 -3
- package/dist/plugins/adoption-log-sql.js +4 -4
- package/dist/plugins/approval-ask-store-file.d.ts +7 -0
- package/dist/plugins/approval-ask-store-file.js +11 -0
- package/dist/plugins/approval-ask-store-memory.d.ts +6 -0
- package/dist/plugins/approval-ask-store-memory.js +12 -0
- package/dist/plugins/approval-ask-store-sql.d.ts +22 -5
- package/dist/plugins/approval-ask-store-sql.js +44 -26
- package/dist/plugins/approval-nonce-store.js +4 -4
- package/dist/plugins/blob-backend.d.ts +4 -4
- package/dist/plugins/blob-backend.js +7 -7
- package/dist/plugins/breaker-state-sql.js +2 -2
- package/dist/plugins/caching-session-store.d.ts +6 -2
- package/dist/plugins/caching-session-store.js +9 -3
- package/dist/plugins/checkpoint-index-columns.js +2 -2
- package/dist/plugins/checkpoint-store-sql.d.ts +6 -5
- package/dist/plugins/checkpoint-store-sql.js +21 -23
- package/dist/plugins/device-store-sql.d.ts +25 -51
- package/dist/plugins/device-store-sql.js +68 -122
- package/dist/plugins/ensure-index.d.ts +1 -2
- package/dist/plugins/execution-placement-sql.d.ts +151 -0
- package/dist/plugins/execution-placement-sql.js +223 -0
- package/dist/plugins/file-history-store-sql.d.ts +9 -8
- package/dist/plugins/file-history-store-sql.js +9 -9
- package/dist/plugins/file-run-store.d.ts +6 -1
- package/dist/plugins/file-run-store.js +4 -0
- package/dist/plugins/fork-routing-session-store.d.ts +6 -0
- package/dist/plugins/fork-routing-session-store.js +16 -0
- package/dist/plugins/image-bake-store-sql.js +9 -9
- package/dist/plugins/image-index-sql.js +11 -11
- package/dist/plugins/leader-run-store-sql.js +4 -4
- package/dist/plugins/local-session-store.d.ts +149 -50
- package/dist/plugins/local-session-store.js +382 -107
- package/dist/plugins/mailbox-store-sql.d.ts +2 -1
- package/dist/plugins/mailbox-store-sql.js +4 -4
- package/dist/plugins/memory-engine-tidb.js +5 -5
- package/dist/plugins/memory-key-guards.d.ts +4 -0
- package/dist/plugins/memory-key-guards.js +1 -0
- package/dist/plugins/memory-optout-grant-store-sql.js +1 -1
- package/dist/plugins/memory-run-store.d.ts +1 -1
- package/dist/plugins/memory-sync-store-tidb.js +3 -3
- package/dist/plugins/one-time-migrations.d.ts +117 -8
- package/dist/plugins/one-time-migrations.js +408 -38
- package/dist/plugins/org-delivery-quota-store.js +2 -2
- package/dist/plugins/outcome-ledger-sql.d.ts +2 -2
- package/dist/plugins/outcome-ledger-sql.js +2 -2
- package/dist/plugins/permission-rule-store-sql.d.ts +17 -19
- package/dist/plugins/permission-rule-store-sql.js +29 -32
- package/dist/plugins/pg-pool.d.ts +7 -3
- package/dist/plugins/pg-session-storage.d.ts +31 -20
- package/dist/plugins/pg-session-storage.js +120 -52
- package/dist/plugins/remote-env-adb.d.ts +18 -19
- package/dist/plugins/remote-env-adb.js +91 -66
- package/dist/plugins/remote-env-device.d.ts +23 -31
- package/dist/plugins/remote-env-device.js +19 -17
- package/dist/plugins/remote-env-e2b.d.ts +27 -21
- package/dist/plugins/remote-env-e2b.js +91 -45
- package/dist/plugins/remote-env-file-error.d.ts +3 -1
- package/dist/plugins/remote-env-file-error.js +9 -3
- package/dist/plugins/remote-env-host.d.ts +31 -34
- package/dist/plugins/remote-env-host.js +91 -72
- package/dist/plugins/remote-env-k8s.d.ts +13 -29
- package/dist/plugins/remote-env-k8s.js +63 -55
- package/dist/plugins/remote-env-local-docker.d.ts +24 -12
- package/dist/plugins/remote-env-local-docker.js +49 -61
- package/dist/plugins/remote-env-ssh.d.ts +11 -19
- package/dist/plugins/remote-env-ssh.js +74 -57
- package/dist/plugins/remote-shell.d.ts +100 -3
- package/dist/plugins/remote-shell.js +166 -2
- package/dist/plugins/resume-anchor-store-sql.js +2 -2
- package/dist/plugins/retention-lane-store-sql.d.ts +1 -1
- package/dist/plugins/retention-lane-store-sql.js +2 -2
- package/dist/plugins/retention-store-sql.d.ts +10 -7
- package/dist/plugins/retention-store-sql.js +13 -7
- package/dist/plugins/run-store-sql.d.ts +13 -3
- package/dist/plugins/run-store-sql.js +20 -15
- package/dist/plugins/schema-consistency.d.ts +21 -11
- package/dist/plugins/schema-consistency.js +15 -9
- package/dist/plugins/schema-drift-sentence.d.ts +27 -0
- package/dist/plugins/schema-drift-sentence.js +38 -0
- package/dist/plugins/schema-ensure-legs.d.ts +2 -3
- package/dist/plugins/schema-ensure-legs.js +2 -2
- package/dist/plugins/schema-live-columns.d.ts +1 -1
- package/dist/plugins/session-capture-record-store-sql.js +1 -1
- package/dist/plugins/session-fork.d.ts +54 -0
- package/dist/plugins/session-fork.js +38 -1
- package/dist/plugins/session-row-sql.d.ts +22 -0
- package/dist/plugins/session-row-sql.js +81 -0
- package/dist/plugins/session-rules-column.d.ts +1 -1
- package/dist/plugins/session-rules-column.js +1 -1
- package/dist/plugins/session-store.d.ts +1 -1
- package/dist/plugins/session-workspace-cell.d.ts +1 -1
- package/dist/plugins/session-workspace-cell.js +1 -1
- package/dist/plugins/shared-memory-store-sql.js +2 -2
- package/dist/plugins/sql-driver.d.ts +10 -5
- package/dist/plugins/sql-driver.js +6 -6
- package/dist/plugins/sql-errors.js +1 -1
- package/dist/plugins/store-backend.d.ts +5 -7
- package/dist/plugins/store-backend.js +23 -11
- package/dist/plugins/store-contracts.d.ts +25 -5
- package/dist/plugins/task-list-store-sql.js +11 -11
- package/dist/plugins/tidb-pool.d.ts +12 -7
- package/dist/plugins/tidb-pool.js +13 -7
- package/dist/plugins/tidb-session-storage.js +4 -4
- package/dist/plugins/tidb-session-store.d.ts +57 -26
- package/dist/plugins/tidb-session-store.js +127 -59
- package/dist/plugins/tool-result-store-sql.d.ts +5 -4
- package/dist/plugins/tool-result-store-sql.js +21 -13
- package/dist/plugins/user-input-ledger-sql.js +2 -2
- package/dist/plugins/workflow-journal-store-sql.js +5 -5
- package/dist/plugins/workflow-run-store-sql.js +19 -19
- package/dist/plugins/write-behind-counter.d.ts +2 -3
- package/dist/plugins/write-behind-counter.js +5 -5
- package/dist/project-memory.d.ts +9 -15
- package/dist/project-memory.js +5 -4
- package/dist/request-key-closure.js +1 -1
- package/dist/request-value-closure.d.ts +6 -7
- package/dist/request-value-closure.js +1 -3
- package/dist/resource-suspend.d.ts +14 -12
- package/dist/resource-suspend.js +1 -1
- package/dist/resource-window.d.ts +4 -3
- package/dist/run-local.d.ts +6 -0
- package/dist/run-local.js +34 -35
- package/dist/runs.d.ts +10 -5
- package/dist/runs.js +52 -66
- package/dist/security.d.ts +38 -12
- package/dist/security.js +8 -2
- package/dist/server-secret-env.d.ts +9 -5
- package/dist/session-children-retire.d.ts +27 -9
- package/dist/session-children-retire.js +9 -5
- package/dist/session-incarnation.d.ts +20 -10
- package/dist/session-incarnation.js +5 -3
- package/dist/session-policy-wire.d.ts +1 -1
- package/dist/session-row.d.ts +114 -5
- package/dist/session-row.js +55 -5
- package/dist/session-titler.d.ts +2 -2
- package/dist/sql-engine-posture.d.ts +1 -1
- package/dist/sql-engine-posture.js +1 -1
- package/dist/{plugins → stores-sql}/background-agent-store-sql.d.ts +2 -2
- package/dist/{plugins → stores-sql}/background-agent-store-sql.js +8 -8
- package/dist/{plugins → stores-sql}/session-policy-store-sql.d.ts +7 -5
- package/dist/{plugins → stores-sql}/session-policy-store-sql.js +12 -12
- package/dist/{plugins → stores-sql}/usage-window-store-sql.d.ts +1 -1
- package/dist/{plugins → stores-sql}/usage-window-store-sql.js +3 -3
- package/dist/task-a2a.d.ts +1 -1
- package/dist/task-a2a.js +5 -6
- package/dist/task-cwd.d.ts +6 -1
- package/dist/task-mcp.d.ts +22 -9
- package/dist/task-mcp.js +17 -9
- package/dist/terminal.d.ts +27 -0
- package/dist/terminal.js +6 -0
- package/dist/tool-approval.d.ts +6 -0
- package/dist/tool-approval.js +8 -1
- package/dist/trace/project.d.ts +1 -0
- package/dist/trace/project.js +1 -0
- package/dist/trace/redact.d.ts +3 -1
- package/dist/trace/redact.js +80 -28
- package/dist/trace/self-minted-wire.d.ts +169 -2
- package/dist/trace/self-minted-wire.js +54 -1
- package/dist/url-refusal.d.ts +1 -1
- package/dist/web-admin-client/apply-effective.d.ts +17 -3
- package/dist/web-admin-client/apply-effective.js +20 -10
- package/dist/web-admin-client/candidate-gate.d.ts +11 -7
- package/dist/web-admin-client/candidate-gate.js +1 -1
- package/dist/web-admin-client/http-client.d.ts +5 -4
- package/dist/web-admin-client/http-client.js +2 -2
- package/dist/web-admin-client/read-warnings.d.ts +7 -17
- package/dist/web-admin-client/read-warnings.js +5 -9
- package/dist/web-admin-client/skills-mcp.js +3 -2
- package/dist/web-admin-client/types.d.ts +6 -0
- package/package.json +3 -3
- package/wire-changes/server@7.139.0.json +348 -0
- package/wire-changes/server@7.140.0.json +184 -0
- package/dist/http/device-placement.d.ts +0 -175
- package/dist/http/device-placement.js +0 -145
|
@@ -129,6 +129,10 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
129
129
|
readonly attr: 409;
|
|
130
130
|
readonly since: "7.108.0";
|
|
131
131
|
};
|
|
132
|
+
readonly "memory.erasure_store_unjudged": {
|
|
133
|
+
readonly attr: 409;
|
|
134
|
+
readonly since: "7.140.0";
|
|
135
|
+
};
|
|
132
136
|
readonly "internal.memory_control_plane_corrupt": {
|
|
133
137
|
readonly attr: 500;
|
|
134
138
|
readonly since: "7.108.0";
|
|
@@ -649,6 +653,26 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
649
653
|
};
|
|
650
654
|
};
|
|
651
655
|
};
|
|
656
|
+
/** `GET /v1/sessions/:id/background` 的 `rows[]` 上本版新出现的键:`sessionId` —— 后台 agent 行的子会话 id(引擎绑定之后才在,别的行型恒缺席;只是 id,不授读权)。 */
|
|
657
|
+
readonly sessionBackgroundRowKey: {
|
|
658
|
+
readonly at: "GET /v1/sessions/:id/background rows[] 行键(<键> → 在场律)";
|
|
659
|
+
readonly members: {
|
|
660
|
+
sessionId: {
|
|
661
|
+
attr: string;
|
|
662
|
+
since: string;
|
|
663
|
+
};
|
|
664
|
+
};
|
|
665
|
+
};
|
|
666
|
+
/** 会话列表行(`GET /v1/sessions` 的 `sessions[]`;同一只投影 = `PATCH /v1/sessions/:id` 的 200 体与 409 `conflict.session_row_changed` 的 `currentRow`)上本版新出现的键:`rowTag` —— 行标签(条件写的前置条件值;读时派生、零存储)。 */
|
|
667
|
+
readonly sessionsListRowKey: {
|
|
668
|
+
readonly at: "GET /v1/sessions sessions[] 行键 = PATCH /v1/sessions/:id 200 体 = 409 conflict.session_row_changed currentRow(<键> → 在场律)";
|
|
669
|
+
readonly members: {
|
|
670
|
+
rowTag: {
|
|
671
|
+
attr: string;
|
|
672
|
+
since: string;
|
|
673
|
+
};
|
|
674
|
+
};
|
|
675
|
+
};
|
|
652
676
|
/** `tool_end` 帧 `gate.disposition`(denied 臂)上的键(<臂>#<键> → 在场律;回放面 `GET /v1/runs/:id/events` 同读):`extension` —— hook 层拒且拒者的扩展注册名已知时 = 那张注册的名字(过出口座)。 */
|
|
653
677
|
readonly toolEndGateDispositionKey: {
|
|
654
678
|
readonly at: "tool_end gate.disposition 键(<臂>#<键> → 在场律)";
|
|
@@ -765,6 +789,10 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
765
789
|
attr: string;
|
|
766
790
|
since: string;
|
|
767
791
|
};
|
|
792
|
+
fork_target: {
|
|
793
|
+
attr: string;
|
|
794
|
+
since: string;
|
|
795
|
+
};
|
|
768
796
|
scratchpad_root: {
|
|
769
797
|
attr: string;
|
|
770
798
|
since: string;
|
|
@@ -1242,6 +1270,75 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
1242
1270
|
readonly attr: 200;
|
|
1243
1271
|
readonly since: "7.137.0";
|
|
1244
1272
|
};
|
|
1273
|
+
readonly "POST /v1/tasks|/v1/tasks/stream|/v1/runs#rewindFiles(\u65B0\u63D0\u4EA4;\u4F53 request.body_shape + unknownKeys [rewindFiles])": {
|
|
1274
|
+
readonly attr: 400;
|
|
1275
|
+
readonly since: "7.139.0";
|
|
1276
|
+
};
|
|
1277
|
+
readonly "POST /v1/side-query#uncoded_error_with_preflight_prefix(\u6CA1\u6709\u5F15\u64CE\u7801\u3001\u82F1\u6587\u5F00\u5934\u4E0E\u524D\u7F00\u8868\u540C\u5F62\u7684\u9519\u8BEF;\u4F53 internal.error)": {
|
|
1278
|
+
readonly attr: 500;
|
|
1279
|
+
readonly since: "7.139.0";
|
|
1280
|
+
};
|
|
1281
|
+
readonly "PATCH /v1/sessions/:id#mirror_row(\u53EA\u8BFB\u955C\u50CF\u884C\u4E0A\u7684\u5199,\u5E26\u4E0D\u5E26 expectedRowTag;\u4F53 conflict.session_mirror + forkPath)": {
|
|
1282
|
+
readonly attr: 409;
|
|
1283
|
+
readonly since: "7.139.0";
|
|
1284
|
+
};
|
|
1285
|
+
readonly "PATCH /v1/sessions/:id#owner_changed_after_gate(\u95E8\u90A3\u4E00\u8BFB\u4E4B\u540E\u540C\u4E00\u4F1A\u8BDD\u7684\u5C5E\u4E3B\u88AB\u6539;\u4F53 not_found.session)": {
|
|
1286
|
+
readonly attr: 404;
|
|
1287
|
+
readonly since: "7.139.0";
|
|
1288
|
+
};
|
|
1289
|
+
readonly "PATCH /v1/sessions/:id#expectedRowTag_stale(\u884C\u5DF2\u4E0D\u5728\u90A3\u53EA\u6807\u7B7E\u4E0A;\u4F53 conflict.session_row_changed + currentRow)": {
|
|
1290
|
+
readonly attr: 409;
|
|
1291
|
+
readonly since: "7.139.0";
|
|
1292
|
+
};
|
|
1293
|
+
readonly "PATCH /v1/sessions/:id#expectedRowTag_current(\u884C\u4ECD\u5728\u90A3\u53EA\u6807\u7B7E\u4E0A;\u4F53 = \u5217\u8868\u884C)": {
|
|
1294
|
+
readonly attr: 200;
|
|
1295
|
+
readonly since: "7.139.0";
|
|
1296
|
+
};
|
|
1297
|
+
readonly "GET /v1/memory/entries/:entryId/provenance|POST /v1/memory/erase|GET /v1/memory/origin/clearances|POST /v1/memory/origin/entries/:entryId/clear#layer_unaddressed_two_stores(\u4E0D\u70B9\u540D\u5C42\u7684\u6761\u76EE id / \u5E97\u7EA7\u8D26\u672C\u8BF7\u6C42,\u672C\u90E8\u7F72\u70B9\u540D\u7684\u5C42\u5206\u4F4F\u4E24\u53EA\u5E97;\u4F53 request.memory_layer)": {
|
|
1298
|
+
readonly attr: 400;
|
|
1299
|
+
readonly since: "7.140.0";
|
|
1300
|
+
};
|
|
1301
|
+
readonly "POST /v1/memory/erase|POST /v1/sessions/:id/memory/erase#erasure_store_unjudged(\u62B9\u9664\u843D\u5230\u90E8\u7F72\u7684\u5E97\u4E4B\u5916\u7684\u90A3\u53EA\u5E97:\u70B9\u540D\u7684\u5C42\u4F4F\u5728\u4E2A\u4EBA\u6302\u8F7D\u4E0A,\u6216\u6309\u4F1A\u8BDD\u62B9\u9664\u800C\u8FD9\u53EA\u4F1A\u8BDD\u5728\u53E6\u4E00\u53EA\u5E97\u6709\u8D21\u732E / \u90A3\u53EA\u5E97\u7684\u8D26\u8BFB\u4E0D\u51FA;\u4F53 memory.erasure_store_unjudged,\u4EC0\u4E48\u90FD\u6CA1\u5220)": {
|
|
1302
|
+
readonly attr: 409;
|
|
1303
|
+
readonly since: "7.140.0";
|
|
1304
|
+
};
|
|
1305
|
+
readonly "POST /v1/memory/export|POST /v1/memory/import|GET /v1/memory/origin/external|POST /v1/memory/erase#layers_span_two_stores(\u8BF7\u6C42\u70B9\u540D\u7684\u5C42\u5206\u4F4F\u4E24\u53EA\u5E97;\u4F53 request.memory_layer)": {
|
|
1306
|
+
readonly attr: 400;
|
|
1307
|
+
readonly since: "7.140.0";
|
|
1308
|
+
};
|
|
1309
|
+
readonly "\u8BB0\u5FC6\u8BF8\u53E3 + POST /v1/admin/memory/consolidation/run|GET /v1/admin/memory/consolidation|GET /v1/memory/export|POST /v1/memory/sync/:scope#layer_unreadable(\u8BF7\u6C42\u70B9\u540D\u7684\u5C42\u5F15\u64CE\u8BFB\u4E0D\u51FA;\u4F53 request.memory_layer)": {
|
|
1310
|
+
readonly attr: 400;
|
|
1311
|
+
readonly since: "7.140.0";
|
|
1312
|
+
};
|
|
1313
|
+
};
|
|
1314
|
+
};
|
|
1315
|
+
/**
|
|
1316
|
+
* 记忆动词的**层座**(`<端点>#<查询串 | 体>.scope` → 读法):不点名层的动词(条目 id / 会话 id / 店级账本)多一个可选的 `scope`,只用来定店;唯一读法 =
|
|
1317
|
+
* `http/memory-layer-reply.ts` 的 `readLayerSeat`(在场而不是非空串 ⇒ 400、面不调)。只登本版新增的座。
|
|
1318
|
+
*/
|
|
1319
|
+
readonly memoryLayerSeatKey: {
|
|
1320
|
+
readonly at: "记忆动词的层座(<端点>#<query | body>.scope → 读法;只登本版新增的)";
|
|
1321
|
+
readonly members: {
|
|
1322
|
+
readonly "GET /v1/memory/entries/:entryId/provenance#query.scope": {
|
|
1323
|
+
readonly attr: "optional;non-empty-string else 400 request.field_invalid;names the layer whose store answers";
|
|
1324
|
+
readonly since: "7.140.0";
|
|
1325
|
+
};
|
|
1326
|
+
readonly "GET /v1/memory/origin/clearances#query.scope": {
|
|
1327
|
+
readonly attr: "optional;non-empty-string else 400 request.field_invalid;names the layer whose store answers";
|
|
1328
|
+
readonly since: "7.140.0";
|
|
1329
|
+
};
|
|
1330
|
+
readonly "POST /v1/memory/origin/entries/:entryId/clear#body.scope": {
|
|
1331
|
+
readonly attr: "optional;non-empty-string else 400 request.field_invalid;names the layer whose store answers;not passed to the engine";
|
|
1332
|
+
readonly since: "7.140.0";
|
|
1333
|
+
};
|
|
1334
|
+
readonly "GET /v1/sessions/:id/memory-status#query.scope": {
|
|
1335
|
+
readonly attr: "optional;non-empty-string else 400 request.field_invalid;names the layer whose store answers;absent ⇒ every store of this deployment, folded;cache keyed by (session, store control plane)";
|
|
1336
|
+
readonly since: "7.140.0";
|
|
1337
|
+
};
|
|
1338
|
+
readonly "POST /v1/sessions/:id/memory/erase#body.scope": {
|
|
1339
|
+
readonly attr: "optional;non-empty-string else 400 request.field_invalid;names the layer whose store answers;absent ⇒ the deployment's store;selector still minted from the path";
|
|
1340
|
+
readonly since: "7.140.0";
|
|
1341
|
+
};
|
|
1245
1342
|
};
|
|
1246
1343
|
};
|
|
1247
1344
|
/**
|
|
@@ -1351,6 +1448,22 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
1351
1448
|
readonly attr: "unsupported (a body field of POST /v1/assistant/tasks/:id/plan_review — send it there, this door never reads it): checkpointId";
|
|
1352
1449
|
readonly since: "7.137.0";
|
|
1353
1450
|
};
|
|
1451
|
+
readonly "400 request.body_shape#PATCH /v1/sessions/:id": {
|
|
1452
|
+
readonly attr: "the body must be a JSON object carrying at least one of `title` and `pinned` (and, optionally, `expectedRowTag`), and nothing else";
|
|
1453
|
+
readonly since: "7.139.0";
|
|
1454
|
+
};
|
|
1455
|
+
readonly "400 request.field_invalid#PATCH /v1/sessions/:id.expectedRowTag": {
|
|
1456
|
+
readonly attr: "expectedRowTag must be the `rowTag` string a session list row carries (43 characters: letters, digits, `-` and `_`)";
|
|
1457
|
+
readonly since: "7.139.0";
|
|
1458
|
+
};
|
|
1459
|
+
readonly "409 conflict.session_mirror#PATCH /v1/sessions/:id": {
|
|
1460
|
+
readonly attr: "this session is a read-only mirror of a session whose writer is elsewhere — it cannot be renamed or pinned here; fork it (forkPath) to continue here; nothing was written";
|
|
1461
|
+
readonly since: "7.139.0";
|
|
1462
|
+
};
|
|
1463
|
+
readonly "409 conflict.session_row_changed#PATCH /v1/sessions/:id": {
|
|
1464
|
+
readonly attr: "the session row changed since the rowTag you sent was read — nothing was written; currentRow is the row as it stands now: decide again, then send its rowTag";
|
|
1465
|
+
readonly since: "7.139.0";
|
|
1466
|
+
};
|
|
1354
1467
|
};
|
|
1355
1468
|
};
|
|
1356
1469
|
/**
|
|
@@ -1366,6 +1479,27 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
1366
1479
|
};
|
|
1367
1480
|
};
|
|
1368
1481
|
};
|
|
1482
|
+
/**
|
|
1483
|
+
* 会话行写口 `PATCH /v1/sessions/:id`:体受理键里本版新增的一键与它两只 409 拒体上的键(`<面>#<键>` → 读法 / 在场律)。受理闭集属主 = `session-row.ts` 的体读者 `readSessionRowPatch`;
|
|
1484
|
+
* `conflict.session_mirror#forkPath` 是执行面同码同键,本版新出现的面是 PATCH。
|
|
1485
|
+
*/
|
|
1486
|
+
readonly sessionRowWriteKey: {
|
|
1487
|
+
readonly at: "PATCH /v1/sessions/:id 体受理键与 409 拒体键(<面>#<键> → 读法 / 在场律;只登本版新增的)";
|
|
1488
|
+
readonly members: {
|
|
1489
|
+
readonly "body#expectedRowTag": {
|
|
1490
|
+
readonly attr: "optional;43×[A-Za-z0-9_-] else 400 request.field_invalid;alone 400 request.body_shape;stale⇒409 conflict.session_row_changed";
|
|
1491
|
+
readonly since: "7.139.0";
|
|
1492
|
+
};
|
|
1493
|
+
readonly "409 conflict.session_row_changed#currentRow": {
|
|
1494
|
+
readonly attr: "always";
|
|
1495
|
+
readonly since: "7.139.0";
|
|
1496
|
+
};
|
|
1497
|
+
readonly "409 conflict.session_mirror#forkPath": {
|
|
1498
|
+
readonly attr: "always";
|
|
1499
|
+
readonly since: "7.139.0";
|
|
1500
|
+
};
|
|
1501
|
+
};
|
|
1502
|
+
};
|
|
1369
1503
|
/**
|
|
1370
1504
|
* `409 approval_stale` 拒体上的键,按出现面登记(`<端点>#<键>` → 在场律)。`currentPending` 的值形是每道门一形(`wire-types.ts` 的 `ApprovalStaleCurrentPending`:
|
|
1371
1505
|
* 这道门的决断体回显的那几位);本表只登本版新出现的面(`/decide` 那一形早于本表,不在这里)。
|
|
@@ -1625,8 +1759,32 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
1625
1759
|
readonly since: "7.136.0";
|
|
1626
1760
|
};
|
|
1627
1761
|
readonly "GET /v1/config/catalog#rows[K8S_SANDBOX_ENV].semantics": {
|
|
1628
|
-
readonly attr: "values-only-in-the-pod-own-secret;role-needs-secrets-create;denied-refuses-boot";
|
|
1629
|
-
readonly since: "7.
|
|
1762
|
+
readonly attr: "values-only-in-the-pod-own-secret;role-needs-secrets-create;denied-refuses-boot;own-credential-name-refuses-boot";
|
|
1763
|
+
readonly since: "7.139.0";
|
|
1764
|
+
};
|
|
1765
|
+
readonly "GET /v1/config/catalog#rows[K8S_NAMESPACE].semantics": {
|
|
1766
|
+
readonly attr: "required-no-default;absent-or-blank-refuses-boot";
|
|
1767
|
+
readonly since: "7.139.0";
|
|
1768
|
+
};
|
|
1769
|
+
readonly "GET /v1/config/catalog#rows[E2B_SANDBOX_ENV].semantics": {
|
|
1770
|
+
readonly attr: "own-credential-name-refuses-boot";
|
|
1771
|
+
readonly since: "7.139.0";
|
|
1772
|
+
};
|
|
1773
|
+
readonly "GET /v1/config/catalog#rows[DOCKER_SANDBOX_ENV].semantics": {
|
|
1774
|
+
readonly attr: "own-credential-name-refuses-boot";
|
|
1775
|
+
readonly since: "7.139.0";
|
|
1776
|
+
};
|
|
1777
|
+
readonly "GET /v1/config/catalog#rows[CONFIG_PROVIDER].semantics": {
|
|
1778
|
+
readonly attr: "remote-without-center-url-refuses-boot";
|
|
1779
|
+
readonly since: "7.139.0";
|
|
1780
|
+
};
|
|
1781
|
+
readonly "GET /v1/config/catalog#rows[RETENTION_MODE].semantics": {
|
|
1782
|
+
readonly attr: "enforce-without-horizon-or-cadence-refuses-boot";
|
|
1783
|
+
readonly since: "7.139.0";
|
|
1784
|
+
};
|
|
1785
|
+
readonly "GET /v1/config/catalog#rows[RETENTION_SWEEP_INTERVAL_SEC].semantics": {
|
|
1786
|
+
readonly attr: "cadence-without-horizon-refuses-boot";
|
|
1787
|
+
readonly since: "7.139.0";
|
|
1630
1788
|
};
|
|
1631
1789
|
/**
|
|
1632
1790
|
* MCP 远端失败句在面板与重拨回执上的出口读法:出口座的 `mcp-remote-text` 行(`trace/exit-seat.ts`)—— 与 trace / 通告同一个脱敏器(引擎记号 `[redacted]` = 已抹的值,原样;
|
|
@@ -1657,6 +1815,15 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
1657
1815
|
readonly attr: "names-engine-notice:model.capability_downgraded";
|
|
1658
1816
|
readonly since: "7.137.0";
|
|
1659
1817
|
};
|
|
1818
|
+
/**
|
|
1819
|
+
* 7.140.0:会话记忆状态不带层座 ⇒ 本部署每一只店的引擎答案按一条折叠律合成一份(`memory-operator-faces.ts` `foldPlaneStatuses`;契约 §9 开头):
|
|
1820
|
+
* 计数相加 / 最近一次取大 / 任一店有采集记录即 true / 任一店读不出 ⇒ 那一键缺席。一只店 ⇒ 恒等(单店部署字节同上一版)。
|
|
1821
|
+
* 钉 test/memory-operator-faces.test.ts「逐店折叠律」、test/memory-layer-seat-http.test.ts「会话记忆状态不带层座」。
|
|
1822
|
+
*/
|
|
1823
|
+
readonly "GET /v1/sessions/:id/memory-status#committedCount|foldedCount|lastCaptureAt|captureOptedOut|optOutSource(\u4E0D\u5E26\u5C42\u5EA7)": {
|
|
1824
|
+
readonly attr: "fold-across-deployment-stores(sum|max|any-record|absent-if-any-unreadable);one-store⇒identity";
|
|
1825
|
+
readonly since: "7.140.0";
|
|
1826
|
+
};
|
|
1660
1827
|
};
|
|
1661
1828
|
};
|
|
1662
1829
|
};
|
|
@@ -45,6 +45,7 @@ export const SELF_MINTED_WIRE = {
|
|
|
45
45
|
"memory.erasure_evidence_unavailable": { attr: 409, since: "7.108.0" },
|
|
46
46
|
"memory.erasure_selector_mismatch": { attr: 409, since: "7.108.0" },
|
|
47
47
|
"memory.erasure_census_incomplete": { attr: 409, since: "7.108.0" },
|
|
48
|
+
"memory.erasure_store_unjudged": { attr: 409, since: "7.140.0" },
|
|
48
49
|
"internal.memory_control_plane_corrupt": { attr: 500, since: "7.108.0" },
|
|
49
50
|
},
|
|
50
51
|
},
|
|
@@ -233,6 +234,18 @@ export const SELF_MINTED_WIRE = {
|
|
|
233
234
|
supportsThinkingOff: { attr: "always", since: "7.138.0" },
|
|
234
235
|
},
|
|
235
236
|
},
|
|
237
|
+
sessionBackgroundRowKey: {
|
|
238
|
+
at: "GET /v1/sessions/:id/background rows[] 行键(<键> → 在场律)",
|
|
239
|
+
members: {
|
|
240
|
+
sessionId: { attr: "present-iff background agent row bound to a child session", since: "7.139.0" },
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
sessionsListRowKey: {
|
|
244
|
+
at: "GET /v1/sessions sessions[] 行键 = PATCH /v1/sessions/:id 200 体 = 409 conflict.session_row_changed currentRow(<键> → 在场律)",
|
|
245
|
+
members: {
|
|
246
|
+
rowTag: { attr: "present-iff the row can be written conditionally (the store has the row write primitive and the row carries an incarnation)", since: "7.139.0" },
|
|
247
|
+
},
|
|
248
|
+
},
|
|
236
249
|
toolEndGateDispositionKey: {
|
|
237
250
|
at: "tool_end gate.disposition 键(<臂>#<键> → 在场律)",
|
|
238
251
|
members: {
|
|
@@ -283,6 +296,7 @@ export const SELF_MINTED_WIRE = {
|
|
|
283
296
|
file_history_restore: { attr: "-", since: "7.133.0" },
|
|
284
297
|
skills_disabled: { attr: "-", since: "7.133.0" },
|
|
285
298
|
existing_session: { attr: "-", since: "7.133.0" },
|
|
299
|
+
fork_target: { attr: "-", since: "7.139.0" },
|
|
286
300
|
scratchpad_root: { attr: "-", since: "7.133.0" },
|
|
287
301
|
ask_answer: { attr: "-", since: "7.133.0" },
|
|
288
302
|
policy_person_ask: { attr: "-", since: "7.133.0" },
|
|
@@ -441,6 +455,26 @@ export const SELF_MINTED_WIRE = {
|
|
|
441
455
|
"POST /v1/tasks|/v1/tasks/stream|/v1/runs#限制侧名内带 *(agents[i].denyTools)": { attr: 200, since: "7.137.0" },
|
|
442
456
|
"POST /v1/assistant/tasks/:id/plan_review#checkpointId_not_current(体带的门身份不是该会话此刻待决的 plan 门;体 approval_stale + currentPending { checkpointId }?;不落决断、零状态改动)": { attr: 409, since: "7.137.0" },
|
|
443
457
|
"POST /v1/assistant/tasks/:id/plan_review#checkpointId_current(体带当前门的身份;受理形与不带键同)": { attr: 200, since: "7.137.0" },
|
|
458
|
+
"POST /v1/tasks|/v1/tasks/stream|/v1/runs#rewindFiles(新提交;体 request.body_shape + unknownKeys [rewindFiles])": { attr: 400, since: "7.139.0" },
|
|
459
|
+
"POST /v1/side-query#uncoded_error_with_preflight_prefix(没有引擎码、英文开头与前缀表同形的错误;体 internal.error)": { attr: 500, since: "7.139.0" },
|
|
460
|
+
"PATCH /v1/sessions/:id#mirror_row(只读镜像行上的写,带不带 expectedRowTag;体 conflict.session_mirror + forkPath)": { attr: 409, since: "7.139.0" },
|
|
461
|
+
"PATCH /v1/sessions/:id#owner_changed_after_gate(门那一读之后同一会话的属主被改;体 not_found.session)": { attr: 404, since: "7.139.0" },
|
|
462
|
+
"PATCH /v1/sessions/:id#expectedRowTag_stale(行已不在那只标签上;体 conflict.session_row_changed + currentRow)": { attr: 409, since: "7.139.0" },
|
|
463
|
+
"PATCH /v1/sessions/:id#expectedRowTag_current(行仍在那只标签上;体 = 列表行)": { attr: 200, since: "7.139.0" },
|
|
464
|
+
"GET /v1/memory/entries/:entryId/provenance|POST /v1/memory/erase|GET /v1/memory/origin/clearances|POST /v1/memory/origin/entries/:entryId/clear#layer_unaddressed_two_stores(不点名层的条目 id / 店级账本请求,本部署点名的层分住两只店;体 request.memory_layer)": { attr: 400, since: "7.140.0" },
|
|
465
|
+
"POST /v1/memory/erase|POST /v1/sessions/:id/memory/erase#erasure_store_unjudged(抹除落到部署的店之外的那只店:点名的层住在个人挂载上,或按会话抹除而这只会话在另一只店有贡献 / 那只店的账读不出;体 memory.erasure_store_unjudged,什么都没删)": { attr: 409, since: "7.140.0" },
|
|
466
|
+
"POST /v1/memory/export|POST /v1/memory/import|GET /v1/memory/origin/external|POST /v1/memory/erase#layers_span_two_stores(请求点名的层分住两只店;体 request.memory_layer)": { attr: 400, since: "7.140.0" },
|
|
467
|
+
"记忆诸口 + POST /v1/admin/memory/consolidation/run|GET /v1/admin/memory/consolidation|GET /v1/memory/export|POST /v1/memory/sync/:scope#layer_unreadable(请求点名的层引擎读不出;体 request.memory_layer)": { attr: 400, since: "7.140.0" },
|
|
468
|
+
},
|
|
469
|
+
},
|
|
470
|
+
memoryLayerSeatKey: {
|
|
471
|
+
at: "记忆动词的层座(<端点>#<query | body>.scope → 读法;只登本版新增的)",
|
|
472
|
+
members: {
|
|
473
|
+
"GET /v1/memory/entries/:entryId/provenance#query.scope": { attr: "optional;non-empty-string else 400 request.field_invalid;names the layer whose store answers", since: "7.140.0" },
|
|
474
|
+
"GET /v1/memory/origin/clearances#query.scope": { attr: "optional;non-empty-string else 400 request.field_invalid;names the layer whose store answers", since: "7.140.0" },
|
|
475
|
+
"POST /v1/memory/origin/entries/:entryId/clear#body.scope": { attr: "optional;non-empty-string else 400 request.field_invalid;names the layer whose store answers;not passed to the engine", since: "7.140.0" },
|
|
476
|
+
"GET /v1/sessions/:id/memory-status#query.scope": { attr: "optional;non-empty-string else 400 request.field_invalid;names the layer whose store answers;absent ⇒ every store of this deployment, folded;cache keyed by (session, store control plane)", since: "7.140.0" },
|
|
477
|
+
"POST /v1/sessions/:id/memory/erase#body.scope": { attr: "optional;non-empty-string else 400 request.field_invalid;names the layer whose store answers;absent ⇒ the deployment's store;selector still minted from the path", since: "7.140.0" },
|
|
444
478
|
},
|
|
445
479
|
},
|
|
446
480
|
refusalSentenceForm: {
|
|
@@ -471,6 +505,10 @@ export const SELF_MINTED_WIRE = {
|
|
|
471
505
|
"400 request.field_invalid#plan_review.checkpointId.not_non_empty_string": { attr: "checkpointId must be a non-empty string (the identity of the plan gate you decided on: …)", since: "7.137.0" },
|
|
472
506
|
"400 request.field_invalid#plan_review.checkpointId.too_large": { attr: "checkpointId too large (max <n> chars)", since: "7.137.0" },
|
|
473
507
|
"400 request.body_shape#/decide.checkpointId(落 unsupportedKeys)": { attr: "unsupported (a body field of POST /v1/assistant/tasks/:id/plan_review — send it there, this door never reads it): checkpointId", since: "7.137.0" },
|
|
508
|
+
"400 request.body_shape#PATCH /v1/sessions/:id": { attr: "the body must be a JSON object carrying at least one of `title` and `pinned` (and, optionally, `expectedRowTag`), and nothing else", since: "7.139.0" },
|
|
509
|
+
"400 request.field_invalid#PATCH /v1/sessions/:id.expectedRowTag": { attr: "expectedRowTag must be the `rowTag` string a session list row carries (43 characters: letters, digits, `-` and `_`)", since: "7.139.0" },
|
|
510
|
+
"409 conflict.session_mirror#PATCH /v1/sessions/:id": { attr: "this session is a read-only mirror of a session whose writer is elsewhere — it cannot be renamed or pinned here; fork it (forkPath) to continue here; nothing was written", since: "7.139.0" },
|
|
511
|
+
"409 conflict.session_row_changed#PATCH /v1/sessions/:id": { attr: "the session row changed since the rowTag you sent was read — nothing was written; currentRow is the row as it stands now: decide again, then send its rowTag", since: "7.139.0" },
|
|
474
512
|
},
|
|
475
513
|
},
|
|
476
514
|
decisionBodyKey: {
|
|
@@ -479,6 +517,14 @@ export const SELF_MINTED_WIRE = {
|
|
|
479
517
|
"POST /v1/assistant/tasks/:id/plan_review#checkpointId": { attr: "optional;non-empty-string≤128;not-current⇒409 approval_stale;direct-door:signed-envelope-ext", since: "7.137.0" },
|
|
480
518
|
},
|
|
481
519
|
},
|
|
520
|
+
sessionRowWriteKey: {
|
|
521
|
+
at: "PATCH /v1/sessions/:id 体受理键与 409 拒体键(<面>#<键> → 读法 / 在场律;只登本版新增的)",
|
|
522
|
+
members: {
|
|
523
|
+
"body#expectedRowTag": { attr: "optional;43×[A-Za-z0-9_-] else 400 request.field_invalid;alone 400 request.body_shape;stale⇒409 conflict.session_row_changed", since: "7.139.0" },
|
|
524
|
+
"409 conflict.session_row_changed#currentRow": { attr: "always", since: "7.139.0" },
|
|
525
|
+
"409 conflict.session_mirror#forkPath": { attr: "always", since: "7.139.0" },
|
|
526
|
+
},
|
|
527
|
+
},
|
|
482
528
|
approvalStaleBodyKey: {
|
|
483
529
|
at: "409 approval_stale 拒体(<端点>#<键> → 在场律)",
|
|
484
530
|
members: {
|
|
@@ -552,12 +598,19 @@ export const SELF_MINTED_WIRE = {
|
|
|
552
598
|
"GET /v1/config/catalog#rows[WORKSPACE_SNAPSHOT_BUCKET].semantics": { attr: "boot-checks-bucket;runtime-latest-no-such-bucket-fails-run", since: "7.136.0" },
|
|
553
599
|
"GET /v1/config/catalog#rows[WORKSPACE_SNAPSHOT_PREFIX].semantics": { attr: "multi-segment-prefix;bad-segment-refuses-boot", since: "7.136.0" },
|
|
554
600
|
"GET /v1/config/catalog#rows[WORKSPACE_SNAPSHOT_PREFIX].derivedDefaultNote": { attr: "absent=>kata", since: "7.136.0" },
|
|
555
|
-
"GET /v1/config/catalog#rows[K8S_SANDBOX_ENV].semantics": { attr: "values-only-in-the-pod-own-secret;role-needs-secrets-create;denied-refuses-boot", since: "7.
|
|
601
|
+
"GET /v1/config/catalog#rows[K8S_SANDBOX_ENV].semantics": { attr: "values-only-in-the-pod-own-secret;role-needs-secrets-create;denied-refuses-boot;own-credential-name-refuses-boot", since: "7.139.0" },
|
|
602
|
+
"GET /v1/config/catalog#rows[K8S_NAMESPACE].semantics": { attr: "required-no-default;absent-or-blank-refuses-boot", since: "7.139.0" },
|
|
603
|
+
"GET /v1/config/catalog#rows[E2B_SANDBOX_ENV].semantics": { attr: "own-credential-name-refuses-boot", since: "7.139.0" },
|
|
604
|
+
"GET /v1/config/catalog#rows[DOCKER_SANDBOX_ENV].semantics": { attr: "own-credential-name-refuses-boot", since: "7.139.0" },
|
|
605
|
+
"GET /v1/config/catalog#rows[CONFIG_PROVIDER].semantics": { attr: "remote-without-center-url-refuses-boot", since: "7.139.0" },
|
|
606
|
+
"GET /v1/config/catalog#rows[RETENTION_MODE].semantics": { attr: "enforce-without-horizon-or-cadence-refuses-boot", since: "7.139.0" },
|
|
607
|
+
"GET /v1/config/catalog#rows[RETENTION_SWEEP_INTERVAL_SEC].semantics": { attr: "cadence-without-horizon-refuses-boot", since: "7.139.0" },
|
|
556
608
|
"GET /v1/sessions/:id/mcp#servers[].error": { attr: "exit-seat:mcp-remote-text(engine-mark=masked-value)+truncate:200", since: "7.138.0" },
|
|
557
609
|
"POST /v1/sessions/:id/mcp/reconnect#reason|status.error|listingIncomplete.error": { attr: "exit-seat:mcp-remote-text(engine-mark=masked-value)+truncate:200", since: "7.138.0" },
|
|
558
610
|
"GET /v1/config/catalog#rows[MODEL_VISION].semantics": { attr: "names-engine-notice:model.capability_downgraded", since: "7.137.0" },
|
|
559
611
|
"GET /v1/config/catalog#rows[MODEL_VISION].derivedDefaultNote": { attr: "names-engine-notice:model.capability_downgraded", since: "7.137.0" },
|
|
560
612
|
"GET /v1/config/catalog#rows[MODEL_CHEAP_VISION].semantics": { attr: "names-engine-notice:model.capability_downgraded", since: "7.137.0" },
|
|
613
|
+
"GET /v1/sessions/:id/memory-status#committedCount|foldedCount|lastCaptureAt|captureOptedOut|optOutSource(不带层座)": { attr: "fold-across-deployment-stores(sum|max|any-record|absent-if-any-unreadable);one-store⇒identity", since: "7.140.0" },
|
|
561
614
|
},
|
|
562
615
|
},
|
|
563
616
|
};
|
package/dist/url-refusal.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* 拒句从源头不含解析记号 —— 判官只给规则词,值只经本模块的展示律出现。
|
|
13
13
|
*
|
|
14
14
|
* ## 读者
|
|
15
|
-
* 中心基址三席 + 公告地址 + 请求期 `centerFetch`(`web-admin-client/center-request.ts` `pathBaseUrlRefusal`:禁 userinfo / query / fragment)·
|
|
15
|
+
* 中心基址三席 + 公告地址 + 记忆同步中心基址 `MEMORY_SYNC_URL` + 请求期 `centerFetch`(`web-admin-client/center-request.ts` `pathBaseUrlRefusal`:禁 userinfo / query / fragment)·
|
|
16
16
|
* 续签 issuer(只问形)· 模型路由三键(`model-route-url.ts`:禁 userinfo / fragment,query 照收)· `MEMORY_EMBEDDER_ENDPOINT` 与
|
|
17
17
|
* `A2A_SERVE_URL`(禁 userinfo)· `SANDBOX_PKG_SOURCE=custom` 六只地址(形 + 带凭据,后者的判官是契约包根的 `findUrlCredential`,拒句经 {@link buildUrlCredentialRefusal})。
|
|
18
18
|
* 「scheme 只有判官与展示铸点读」由 `test/config-url-display-safe.test.ts` 的读者普查门钉住。
|
|
@@ -94,9 +94,11 @@ export declare function withModelPlaneOf<E extends EffectiveConfig>(target: E, s
|
|
|
94
94
|
*/
|
|
95
95
|
export declare function fullyLandedForLkg(read: ConfigCandidateRead, report: ApplyReport | undefined): boolean;
|
|
96
96
|
/**
|
|
97
|
-
* [ref]:组拒码 → 铸它的那条模型面不变量 ——
|
|
98
|
-
*
|
|
99
|
-
* (
|
|
97
|
+
* [ref]:组拒码 → 铸它的那条模型面不变量 —— **以码为键**。组拒码闭集的属主是 settings-schema `MODEL_PLANE_REFUSAL_CODES`,每个码恰有**一个铸码方**,
|
|
98
|
+
* 分两本账(下面两个表 + 三道编译门;那边加一个码而这两本都没收 ⇒ 本仓 tsc 红):
|
|
99
|
+
* · 本表 = **本仓模型面 stage 自己铸**的码 → 铸它的不变量。模型面 stage 的组拒按**码**铸(码是判决那刻的数据),不变量 id 由本表派生 —— 一个 id 两个码
|
|
100
|
+
* (`model-route-endpoint`)时码不可能从 id 反推,反过来查才是全函数;
|
|
101
|
+
* · {@link ENGINE_MINTED_PLANE_REFUSAL_CODES} = 契约包出码、执法者是本仓但**今天未执法**的码(名字里的 ENGINE 沿契约包的词义 = worker,即本仓),本仓 stage 现在不铸。
|
|
100
102
|
*/
|
|
101
103
|
export declare const PLANE_REFUSAL_INVARIANT_OF: {
|
|
102
104
|
readonly "config.default_model_missing": "default-model-resolvable";
|
|
@@ -104,6 +106,18 @@ export declare const PLANE_REFUSAL_INVARIANT_OF: {
|
|
|
104
106
|
readonly "config.model_route_endpoint_missing": "model-route-endpoint";
|
|
105
107
|
readonly "config.gateway_fallback_without_primary": "model-route-endpoint";
|
|
106
108
|
};
|
|
109
|
+
/**
|
|
110
|
+
* 契约包出码、执法者是本仓但今天**未执法**的两只组拒码:本地配置腿上「管模型面的目录会顶替已声明的 env 表、决定不是 `replaced`」那道闸,与「每个任务都要解的 summarize 落不到可服务条目」的不变量。
|
|
111
|
+
*
|
|
112
|
+
* 词义:settings-schema 发布说明里的「engine / 引擎一侧」指**本仓(worker)**,不是 `@sema-agent/core` —— 这两码要的全部输入(本地配置腿、env 表、模型面 stage 与组拒口)只在本仓,core 里没有读
|
|
113
|
+
* `MODEL_ID` / `config.d` 的地方、也没有组拒码。(契约包自己有几处把同一个词写成 core 7.58.0,那是它的叫法错。)所以本仓 stage 现在没有对应的不变量、不铸这两个码,不是因为「归引擎」,而是**还没做**,两码各自候什么:
|
|
114
|
+
* · `CATALOG_REPLACES_ENV_MODELS_CODE`:执法是一整组跨仓件 —— 开机迁移 SS-M11(铸决定文档)· 本地腿每拍读决定(读数身份进候选的 etag)· 目录信任判官走根级文档 · 命令行 / 桌面 / 客户端核心三个写者先接契约包的计划助手;
|
|
115
|
+
* 候设计票。在那之前,候选目录管着模型面而 env 表也声明了时,仍照旧由目录服务(与升级前逐位同)。
|
|
116
|
+
* · `SUMMARIZE_MODEL_MISSING_CODE`:码的前提是「summarize 落不到可服务条目 ⇒ 采纳后每个任务都被拒」,而本仓所钉 core 7.59.0 起非严格座位(summarize 在内)点名目录里没有的词时读作未设、沿自己的回落链走
|
|
117
|
+
* (summarize 的链是 → default,即回落缺省模型)并通告 `model.role_defaulted`;链上没有可解的模型才拒 —— 前提与所钉 core 相抵,候上游(settings-schema / core)重定义或退役这个码;在那之前 summarize 角色绑到不可用条目时仍是角色绑定那一行 warn(`ROLE_BINDING_UNAVAILABLE_HINT`),不是组拒。
|
|
118
|
+
* 两码开始被铸之后,它们进 `/health.modelRefusals.plane` 的座位是**另案设计**(现在没有座:见 `model-plane-face.ts` 对「装配期被引擎整份拒收」的披露),不在这张表里偷铸一个不变量替它占位。
|
|
119
|
+
*/
|
|
120
|
+
export declare const ENGINE_MINTED_PLANE_REFUSAL_CODES: readonly ["config.catalog_replaces_env_models", "config.summarize_model_missing"];
|
|
107
121
|
/**
|
|
108
122
|
* [ref] —— **「无中心配置」档的候选**:中心凭证换人时,server 把在用的中心配置降到这一档({@link applyEffective} 吃它,和吃任何候选走同一条 stage → swap → commit)。
|
|
109
123
|
* 它的意思是「**撤回**中心配置」—— 中心下发的每个热面回 env 底:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { expandTiers, resolveTaskModel as coreResolveTaskModel } from "@sema-agent/core";
|
|
2
|
-
import { WEB_ADMIN_ENV, narrowAtMention, resolveActiveTiers, resolveCatalogDefaultModel } from "@sema-agent/settings-schema";
|
|
1
|
+
import { expandTiers, modelOriginOf, resolveTaskModel as coreResolveTaskModel } from "@sema-agent/core";
|
|
2
|
+
import { CATALOG_REPLACES_ENV_MODELS_CODE, SUMMARIZE_MODEL_MISSING_CODE, WEB_ADMIN_ENV, narrowAtMention, resolveActiveTiers, resolveCatalogDefaultModel } from "@sema-agent/settings-schema";
|
|
3
3
|
import { modelKeyPoison } from "../key-resolver.js";
|
|
4
4
|
import { buildEnvModelIdNotServedNotice, mintCapabilityKeys, readAtMention, servedModelTableLeg } from "../model-select.js";
|
|
5
|
-
import { applyAutoCompactWindow, buildModelCostKey, parseAutonomy, unmatchableToolNamesRefusal } from "../config.js";
|
|
5
|
+
import { applyAutoCompactWindow, buildModelCostKey, ownCredentialHitsInForce, parseAutonomy, unmatchableToolNamesRefusal } from "../config.js";
|
|
6
6
|
import { NAME_TABLE_BEHAVIOR } from "../namespaced-rule-name.js";
|
|
7
7
|
import { buildModelCompat, readModelCompat } from "../model-compat.js";
|
|
8
8
|
import { buildModelHeadersKey } from "../model-entry-headers.js";
|
|
@@ -118,7 +118,7 @@ export function applyEffective(config, eff, logger, opts) {
|
|
|
118
118
|
}
|
|
119
119
|
const mp = staged.modelPlaneGroup.stages.models;
|
|
120
120
|
if (mp !== undefined) {
|
|
121
|
-
declareCandidateWithheldEnv(mp.modelApiKeyEnv, staged.version);
|
|
121
|
+
declareCandidateWithheldEnv(config, mp.modelApiKeyEnv, staged.version);
|
|
122
122
|
if (opts.swapPlane !== undefined) {
|
|
123
123
|
try {
|
|
124
124
|
opts.swapPlane({ models: mp.models, tiers: mp.activeTiers });
|
|
@@ -171,17 +171,25 @@ export function applyEffective(config, eff, logger, opts) {
|
|
|
171
171
|
logger?.info("web_admin_projects", { projects: Object.keys(staged.projects) });
|
|
172
172
|
return true;
|
|
173
173
|
}
|
|
174
|
-
function declareCandidateWithheldEnv(modelApiKeyEnv, version) {
|
|
174
|
+
function declareCandidateWithheldEnv(seats, modelApiKeyEnv, version) {
|
|
175
|
+
const entries = Object.entries(modelApiKeyEnv)
|
|
176
|
+
.map(([model, envName]) => `${model}→${envName}`)
|
|
177
|
+
.join(", ");
|
|
175
178
|
try {
|
|
176
179
|
declareServerWithheldEnv(modelApiKeyEnv);
|
|
177
180
|
}
|
|
178
181
|
catch (err) {
|
|
179
|
-
const entries = Object.entries(modelApiKeyEnv)
|
|
180
|
-
.map(([model, envName]) => `${model}→${envName}`)
|
|
181
|
-
.join(", ");
|
|
182
182
|
throw new Error(`model catalog (effective v${version}): a model entry's apiKeyEnv names a variable the engine cannot withhold from model-driven shells — ` +
|
|
183
183
|
`the candidate is refused whole and the current generation keeps serving; fix that entry's apiKeyEnv (entries: ${entries}). Engine: ${err instanceof Error ? err.message : String(err)}`);
|
|
184
184
|
}
|
|
185
|
+
const handedOn = ownCredentialHitsInForce(seats);
|
|
186
|
+
if (handedOn.length === 0)
|
|
187
|
+
return;
|
|
188
|
+
withdrawServerWithheldEnv();
|
|
189
|
+
throw new Error(`model catalog (effective v${version}): a model entry's apiKeyEnv names a variable a name-list env knob hands on — ` +
|
|
190
|
+
handedOn.map((h) => `env ${h.knob} hands on ${h.name}, which this candidate makes ${h.problem}`).join("; ") +
|
|
191
|
+
`; or point that entry's apiKeyEnv at a variable no name list hands on. The name lists are read at boot (changing one takes a restart); ` +
|
|
192
|
+
`the candidate is refused whole and the current generation keeps serving (entries: ${entries}).`);
|
|
185
193
|
}
|
|
186
194
|
function commitStaged(config, staged) {
|
|
187
195
|
const mp = staged.modelPlaneGroup.stages.models;
|
|
@@ -240,13 +248,14 @@ export const PLANE_REFUSAL_INVARIANT_OF = {
|
|
|
240
248
|
"config.model_route_endpoint_missing": "model-route-endpoint",
|
|
241
249
|
"config.gateway_fallback_without_primary": "model-route-endpoint",
|
|
242
250
|
};
|
|
251
|
+
export const ENGINE_MINTED_PLANE_REFUSAL_CODES = [CATALOG_REPLACES_ENV_MODELS_CODE, SUMMARIZE_MODEL_MISSING_CODE];
|
|
243
252
|
function modelPlaneGroupReport(group) {
|
|
244
253
|
return {
|
|
245
254
|
applied: MODEL_PLANE_DOMAINS.flatMap((d) => (group.stages[d] !== undefined ? MODEL_PLANE_SURFACES[d] : [])),
|
|
246
255
|
...(group.rejected !== undefined ? { rejected: { keys: group.rejected.keys, reason: group.rejected.reason } } : {}),
|
|
247
256
|
};
|
|
248
257
|
}
|
|
249
|
-
const ROLE_BINDING_UNAVAILABLE_HINT = "
|
|
258
|
+
const ROLE_BINDING_UNAVAILABLE_HINT = "alias/tier expansion cannot mint this name, so the engine does not hold it: a strict seat (default, classifier) refuses the task loud; any other role reads as unset and falls back along its own chain with a model.role_defaulted notice (refused only when nothing on that chain resolves) — bind the role to a usable model, or make the entry usable (see the entry's own warn)";
|
|
250
259
|
export const NO_CENTER_EFFECTIVE = deepFreeze({ version: 0, updatedAt: "", models: { models: [], roles: {} }, mcp: { servers: [] } });
|
|
251
260
|
export const isNoCenterEffective = (eff) => eff === NO_CENTER_EFFECTIVE;
|
|
252
261
|
function deepFreeze(v) {
|
|
@@ -636,7 +645,8 @@ function engineDefaultOfSelect(select, models, activeTiers) {
|
|
|
636
645
|
catch (err) {
|
|
637
646
|
return { unresolved: err instanceof Error ? err.message : String(err) };
|
|
638
647
|
}
|
|
639
|
-
const
|
|
648
|
+
const origin = modelOriginOf(picked);
|
|
649
|
+
const name = Object.keys(models).find((n) => models[n] === origin);
|
|
640
650
|
return name !== undefined ? { name } : { unresolved: "the engine picked a model object that is not an entry of the usable catalog" };
|
|
641
651
|
}
|
|
642
652
|
export function logEffectiveDiff(config, eff, logger) {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 配置候选的**唯一判官**:一份候选(中心有效视图,或本地 `config.d` 读出的那份)能不能收 —— 只有这一种判法。
|
|
3
3
|
*
|
|
4
|
-
* 判据(三件,任一即拒;每条拒因带成因词,闭集 {@link CandidateRejectReason}):读腿交出的 `domainErrors`(
|
|
4
|
+
* 判据(三件,任一即拒;每条拒因带成因词,闭集 {@link CandidateRejectReason}):读腿交出的 `domainErrors`(某个域判形失败 / 拼错键 / 悬空引用:那个域已落
|
|
5
5
|
* schema 缺省)与 prompts 面的判官(`judgePromptsWire`:契约包的 wire 形再交引擎 verify —— 中心层只有一种形)—— 成因 `domain_invalid`;读腿交出的
|
|
6
|
-
* `
|
|
7
|
-
*
|
|
6
|
+
* `refusedDocuments`(读它的域之前契约就拒了的那份文档 —— 契约的类型 `ConfigDocumentRefusal`:带事实的退役域 = 墓碑,或 `config.d` 里契约的文件层拒的一份 ——
|
|
7
|
+
* 空 / 坏 JSON / 不是对象 / 读失败)—— 成因就是那份发现自带的词(契约闭集 `CONFIG_DOCUMENT_REFUSAL_REASONS`),拒行的 `domain` 是它的 `document`。
|
|
8
|
+
* 任一 ⇒ `rejected`:**整份候选不收**,一个域都不应用。
|
|
9
|
+
* 被拒文档此前要么在读腿整包抛、走「源不可达」那条臂(墓碑;门控域的坏文件),要么被读成「域按缺省落 + 域诊断」(目录域的坏文件);现在读腿只交数据,
|
|
8
10
|
* 坏候选只有本判官一种判法。
|
|
9
11
|
* 读腿的逐条丢弃(`droppedEntries`)不在这里 —— 颗粒是条目的失效留在条目上,候选照收(调用方响亮点名)。
|
|
10
12
|
*
|
|
@@ -27,23 +29,25 @@
|
|
|
27
29
|
* (盘上 LKG 的读回复判也经本判官,`config-lkg.ts`)。
|
|
28
30
|
*/
|
|
29
31
|
import type { PublishedPromptArtifact } from "@sema-agent/core";
|
|
32
|
+
import type { ConfigDocumentRefusal, ConfigDocumentRefusalReason } from "@sema-agent/settings-schema";
|
|
30
33
|
import type { EffectiveConfig } from "./types.js";
|
|
31
34
|
/** 读腿交出的一条域级诊断(与 `FetchEffectiveResult.domainErrors` 同形;error 文案已在产出边界脱敏)。 */
|
|
32
35
|
export interface CandidateDomainError {
|
|
33
36
|
readonly domain: string;
|
|
34
37
|
readonly error: string;
|
|
35
38
|
}
|
|
36
|
-
/** 判官拒一份候选的成因(闭集):某个域判形失败(含 prompts 面)
|
|
37
|
-
|
|
39
|
+
/** 判官拒一份候选的成因(闭集):某个域判形失败(含 prompts 面)`domain_invalid` ∪ 被拒文档自带的词(契约闭集 `CONFIG_DOCUMENT_REFUSAL_REASONS`:
|
|
40
|
+
* `empty` / `invalid_json` / `not_object` / `io` 文件层,`retired_domain` 墓碑)—— 被拒文档的词表只在契约一处定义,这里派生(契约加词 ⇒ 按词穷举的读者编译红)。 */
|
|
41
|
+
export type CandidateRejectReason = "domain_invalid" | ConfigDocumentRefusalReason;
|
|
38
42
|
/** 拒判里的一条:哪一域、为什么(读腿 / 契约包的原句)、成因词。`config_candidate_rejected` 行的 `errors` 就是这一列。 */
|
|
39
43
|
export interface CandidateDomainRejection extends CandidateDomainError {
|
|
40
44
|
readonly reason: CandidateRejectReason;
|
|
41
45
|
}
|
|
42
|
-
/** 判官的输入:一份读出来的候选。`
|
|
46
|
+
/** 判官的输入:一份读出来的候选。`refusedDocuments` = 读腿交出的被拒文档(两条读腿同形,契约的类型 `ConfigDocumentRefusal`;判官只读文档名、拒句与成因词)。 */
|
|
43
47
|
export interface ConfigCandidateRead {
|
|
44
48
|
readonly effective: EffectiveConfig;
|
|
45
49
|
readonly domainErrors?: readonly CandidateDomainError[];
|
|
46
|
-
readonly
|
|
50
|
+
readonly refusedDocuments?: readonly Pick<ConfigDocumentRefusal, "document" | "error" | "reason">[];
|
|
47
51
|
}
|
|
48
52
|
export type ConfigCandidateVerdict =
|
|
49
53
|
/** `prompts` = 候选的中心层(引擎 verify 过的发布形 artifact;候选不带 prompts 键 ⇒ `undefined` = 撤下中心层、内置提示词服务)。 */
|
|
@@ -5,7 +5,7 @@ export function judgeConfigCandidate(r) {
|
|
|
5
5
|
const errors = [
|
|
6
6
|
...(r.domainErrors ?? []).map((de) => ({ domain: de.domain, error: de.error, reason: "domain_invalid" })),
|
|
7
7
|
...(promptsGate !== undefined && !promptsGate.ok ? [{ domain: "prompts", error: promptsGate.error, reason: "domain_invalid" }] : []),
|
|
8
|
-
...(r.
|
|
8
|
+
...(r.refusedDocuments ?? []).map((d) => ({ domain: d.document, error: d.error, reason: d.reason })),
|
|
9
9
|
];
|
|
10
10
|
if (errors.length === 0)
|
|
11
11
|
return { verdict: "clean", prompts: promptsGate?.ok ? promptsGate.artifact : undefined };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { type EffectiveReadWarning, type EntitlementRuntimeCaps } from "@sema-agent/settings-schema";
|
|
1
|
+
import { type ConfigDocumentRefusal, type EffectiveReadWarning, type EntitlementRuntimeCaps } from "@sema-agent/settings-schema";
|
|
2
2
|
import type { ScenarioRuling } from "../capabilities/scenarios.js";
|
|
3
3
|
import type { EffectiveConfig, ExecutionRuling } from "./types.js";
|
|
4
|
-
import { type DroppedConfigEntry, type
|
|
4
|
+
import { type DroppedConfigEntry, type UnreadConfigFile } from "./read-warnings.js";
|
|
5
5
|
import { type CenterEndpoint } from "./center-request.js";
|
|
6
6
|
/** GET the effective config (Bearer + ETag). null = 304 (unchanged). Throws on transport/HTTP error, and on a
|
|
7
7
|
* payload that is not an effective config at all(非对象 / version 非有限数 / gate 域坏形——[ref] 裁B)。
|
|
8
|
-
* `
|
|
8
|
+
* `refusedDocuments`:被拒文档(契约类型 `ConfigDocumentRefusal`,与本地腿同键同义;wire 上只有一种 —— 带事实的退役域,墓碑,成因词 `retired_domain`)不抛 —— 交成发现、那一键不进 effective,
|
|
9
|
+
* 候选判官整拒这份候选。
|
|
9
10
|
* `domainErrors`:坏 catalog 域(schema default 已落)逐域单列——与本地腿 `FetchEffectiveResult` 同键同义,
|
|
10
11
|
* boot/refresh 的候选门直接消费。`droppedEntries`([ref] ②):schema 逐条丢掉的条目(坐标 + 字段诊断)——
|
|
11
12
|
* **不**进候选门,调用方响亮点名、其余照用(分面单点 `splitFoldedReadWarnings`,与本地腿同一只)。
|
|
@@ -25,7 +26,7 @@ export declare function fetchEffective(center: CenterEndpoint, etag: string | un
|
|
|
25
26
|
}>;
|
|
26
27
|
droppedEntries?: DroppedConfigEntry[];
|
|
27
28
|
unreadFiles?: UnreadConfigFile[];
|
|
28
|
-
|
|
29
|
+
refusedDocuments?: ConfigDocumentRefusal[];
|
|
29
30
|
readWarnings: readonly EffectiveReadWarning[];
|
|
30
31
|
credentialIdentity: string;
|
|
31
32
|
} | null>;
|
|
@@ -10,7 +10,7 @@ export async function fetchEffective(center, etag, fetchImpl, worker) {
|
|
|
10
10
|
if (!res.ok)
|
|
11
11
|
throw new Error(`web-admin HTTP ${res.status}`);
|
|
12
12
|
const warnings = [];
|
|
13
|
-
const { body,
|
|
13
|
+
const { body, refusedDocuments } = separateRetiredDomains(await res.json());
|
|
14
14
|
const wire = readEffectiveWire(body, (w) => warnings.push(w));
|
|
15
15
|
const { domainErrors, droppedEntries, droppedCatalogEntries, unreadFiles } = splitFoldedReadWarnings(warnings, "center");
|
|
16
16
|
const effective = withDroppedCatalogEntries(wire, droppedCatalogEntries);
|
|
@@ -22,7 +22,7 @@ export async function fetchEffective(center, etag, fetchImpl, worker) {
|
|
|
22
22
|
...(domainErrors.length > 0 ? { domainErrors } : {}),
|
|
23
23
|
...(droppedEntries.length > 0 ? { droppedEntries } : {}),
|
|
24
24
|
...(unreadFiles.length > 0 ? { unreadFiles } : {}),
|
|
25
|
-
...(
|
|
25
|
+
...(refusedDocuments.length > 0 ? { refusedDocuments: [...refusedDocuments] } : {}),
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
export async function fetchPrincipalCaps(center, principal, etag, fetchImpl, worker) {
|
|
@@ -25,29 +25,19 @@
|
|
|
25
25
|
* 留在条目上,只有颗粒更粗的失效才动候选。
|
|
26
26
|
*/
|
|
27
27
|
import { z } from "zod";
|
|
28
|
-
import { type
|
|
29
|
-
/**
|
|
30
|
-
* 退役域的一条**发现**(两条读腿同形)。读腿只把契约包的墓碑(`RetiredDomainError`)换成数据交出去 —— 判决只在候选判官
|
|
31
|
-
* (`candidate-gate.ts` 的 `judgeConfigCandidate`,成因 `retired_domain`):与域判形失败同一条回落链(候选 → 盘上 LKG → env)、同一行
|
|
32
|
-
* `config_candidate_rejected`、刷新拍同形(拍跑完,候选被判拒是结论)。拉取层的抛只剩 I/O 与载荷形(不是一份 effective)两种。
|
|
33
|
-
* `error` = 契约包铸的整句(墓碑表那一行:退役版本、事实今天住哪、一次性迁移 id)—— 模板句,不含任何配置值,所以不过 `redactConfigError`
|
|
34
|
-
* (那道脱敏把引号段换成指纹,会把句中点名的域名换掉)。
|
|
35
|
-
*/
|
|
36
|
-
export type RetiredDomainFinding = {
|
|
37
|
-
readonly domain: RetiredDomainName;
|
|
38
|
-
readonly error: string;
|
|
39
|
-
readonly migration: string;
|
|
40
|
-
};
|
|
41
|
-
/** 墓碑 → 发现;不是墓碑 ⇒ `undefined`(调用方照原样抛)。两条读腿的唯一换装点。 */
|
|
42
|
-
export declare function retiredDomainFindingOf(e: unknown): RetiredDomainFinding | undefined;
|
|
28
|
+
import { type ConfigDocumentRefusal, type DroppedEntryIdentity, type DroppedEntryReasonCode, type EffectiveReadWarning } from "@sema-agent/settings-schema";
|
|
43
29
|
/**
|
|
44
30
|
* 远端读腿在过契约读腿(`readEffectiveWire`)**之前**把退役域键分出去:wire 体上每个退役域键过契约的同一只墓碑(`refuseRetiredDomain`)——
|
|
45
|
-
* 带事实 ⇒
|
|
31
|
+
* 带事实 ⇒ 一份被拒文档(契约的类型 `ConfigDocumentRefusal` 的墓碑臂:`document` = 退役域名,`reason: "retired_domain"`,`error` / `migration` 取
|
|
32
|
+
* `RetiredDomainError` 的同名字段)、这一键从体上拿掉(其余域照读、版本照读,判官整拒这份候选);缺席 / `{}` ⇒ 不理会(契约读腿自己丢 `{}`)。
|
|
46
33
|
* 体不是对象 ⇒ 原样交回、不判(载荷形错,契约读腿抛)。墓碑判据只在契约包,这里只分键。
|
|
34
|
+
* 被拒文档是两条读腿同形的发现(判决只在候选判官 `candidate-gate.ts` 的 `judgeConfigCandidate`,成因词 = 发现自带的 `reason`):本地腿的被拒文档是契约整目录拒单
|
|
35
|
+
* `inspectBundle` 的原样(`config-provider.ts`),wire 上没有文件层,只有这一种墓碑。`error` 本模块不脱敏(与折叠产物同律):各腿在自己的产出边界上过
|
|
36
|
+
* `redactSecrets` 兜底、不过 `redactConfigError`(句子不含配置值;引号段读法会把句中点名的域名换成指纹)。
|
|
47
37
|
*/
|
|
48
38
|
export declare function separateRetiredDomains(body: unknown): {
|
|
49
39
|
readonly body: unknown;
|
|
50
|
-
readonly
|
|
40
|
+
readonly refusedDocuments: readonly ConfigDocumentRefusal[];
|
|
51
41
|
};
|
|
52
42
|
/** 折叠产物:`scope` 决定消费方做什么 —— `"domain"` 进候选门(`domainErrors`),`"entry"` 进逐条丢弃面(`droppedEntries`),
|
|
53
43
|
* `"unread"` 进读腿不读的文件面(`unreadFiles`;点名不判拒)。 */
|