@sema-agent/server 7.136.0 → 7.138.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 +501 -139
- package/README.md +1 -0
- package/README.zh-CN.md +1 -0
- package/USAGE.md +149 -34
- package/deploy/sema-up/README.md +14 -0
- package/deploy/sema-up/chart/templates/sandbox-rbac.yaml +7 -1
- package/deploy/sema-up/stack/sema-stack-cluster.yaml +7 -1
- package/dist/approval-card.d.ts +21 -14
- package/dist/approval-card.js +1 -0
- package/dist/approval-content-kind.d.ts +6 -0
- package/dist/approval-content-kind.js +7 -0
- package/dist/approval-gate-currency.d.ts +48 -6
- package/dist/approval-gate-currency.js +16 -9
- package/dist/approval-hmac.d.ts +13 -1
- package/dist/approval-hmac.js +1 -1
- package/dist/approval.js +3 -3
- package/dist/audit.js +1 -0
- package/dist/auth-bridge.js +2 -2
- package/dist/background-agent-name.d.ts +5 -0
- package/dist/background-agent-name.js +5 -0
- package/dist/boot/budget-tracing.d.ts +1 -12
- package/dist/boot/deployment-mods.d.ts +46 -16
- package/dist/boot/deployment-mods.js +82 -6
- package/dist/boot/execution-env.d.ts +24 -1
- package/dist/boot/execution-env.js +69 -6
- package/dist/boot/governance-seams.d.ts +10 -17
- package/dist/boot/governance-seams.js +5 -17
- package/dist/boot/leader.d.ts +3 -0
- package/dist/boot/leader.js +1 -0
- package/dist/boot/org-delivery.js +15 -2
- package/dist/boot/reapers.d.ts +3 -0
- package/dist/boot/reapers.js +15 -1
- package/dist/boot/resolve-spec.d.ts +7 -0
- package/dist/boot/resolve-spec.js +36 -26
- package/dist/boot/retention-lane.d.ts +11 -5
- package/dist/boot/retention-lane.js +2 -2
- package/dist/boot/runner-deps.d.ts +7 -3
- package/dist/boot/runner-deps.js +1 -0
- package/dist/boot/stage-03-store-backend.d.ts +1 -1
- package/dist/boot/stage-04-stores.d.ts +2 -13
- package/dist/boot/stage-05-execution-env.d.ts +6 -13
- package/dist/boot/stage-05-execution-env.js +17 -5
- package/dist/boot/stage-06-runners.d.ts +6 -13
- package/dist/boot/stage-06-runners.js +10 -3
- package/dist/boot/stage-07-capability-layer.d.ts +7 -13
- package/dist/boot/stage-07-capability-layer.js +3 -3
- package/dist/boot/stage-08-reapers.d.ts +7 -13
- package/dist/boot/stage-08-reapers.js +2 -1
- package/dist/boot/stage-09-leader.d.ts +7 -13
- package/dist/boot/stage-09-leader.js +2 -2
- package/dist/boot/stage-10-http-server.d.ts +7 -13
- package/dist/boot/stage-10-http-server.js +6 -3
- package/dist/boot/stores.d.ts +1 -1
- package/dist/boot/web-admin.d.ts +5 -2
- package/dist/boot/web-admin.js +3 -3
- package/dist/brain.js +5 -5
- package/dist/broker/broker.d.ts +89 -0
- package/dist/broker/broker.js +287 -0
- package/dist/broker/constants.d.ts +39 -0
- package/dist/broker/constants.js +15 -0
- package/dist/broker/http1.d.ts +111 -0
- package/dist/broker/http1.js +256 -0
- package/dist/broker/lease-book.d.ts +87 -0
- package/dist/broker/lease-book.js +142 -0
- package/dist/broker/lease-file.d.ts +60 -0
- package/dist/broker/lease-file.js +127 -0
- package/dist/broker/main.d.ts +2 -0
- package/dist/broker/main.js +20 -0
- package/dist/budget.d.ts +17 -15
- package/dist/budget.js +2 -2
- package/dist/capabilities/composite-members.d.ts +2 -1
- package/dist/capabilities/composite-members.js +2 -1
- package/dist/capabilities/engine-capabilities.js +1 -0
- package/dist/capabilities/mcp-probe.d.ts +36 -11
- package/dist/capabilities/mcp-probe.js +44 -5
- package/dist/capabilities/scenarios.d.ts +23 -8
- package/dist/capabilities/scenarios.js +13 -8
- package/dist/capabilities/skills.d.ts +28 -5
- package/dist/capabilities/skills.js +8 -0
- package/dist/capability-facts.d.ts +6 -0
- package/dist/capability-facts.js +5 -0
- package/dist/center-credential-renewer.js +5 -1
- package/dist/checkpoint-ctx-seal-m28.d.ts +3 -10
- package/dist/checkpoint-ctx-seal-m28.js +1 -1
- package/dist/checkpoint-identity.d.ts +13 -6
- package/dist/config-catalog.js +16 -7
- package/dist/config-types.d.ts +24 -7
- package/dist/config.d.ts +1 -1
- package/dist/config.js +42 -13
- package/dist/deployment-governance.d.ts +2 -2
- package/dist/deployment-governance.js +7 -9
- package/dist/deployment-shape.d.ts +6 -6
- package/dist/device-ws-protocol.d.ts +1 -0
- package/dist/device-ws-protocol.js +2 -1
- package/dist/file-history-disclosure.d.ts +4 -2
- package/dist/file-history-disclosure.js +2 -0
- package/dist/gate-settlement.d.ts +71 -0
- package/dist/gate-settlement.js +40 -0
- package/dist/hooks/classic-stations.d.ts +12 -54
- package/dist/hooks/classic-stations.js +1 -0
- package/dist/hooks/command-spawn.d.ts +2 -2
- package/dist/hooks/hook-runner.js +14 -14
- package/dist/http/admission.js +14 -9
- package/dist/http/approval-sweeps.js +4 -3
- package/dist/http/caller-trust.d.ts +2 -1
- package/dist/http/caller-trust.js +1 -3
- package/dist/http/checkpoint-ctx.d.ts +48 -7
- package/dist/http/checkpoint-ctx.js +40 -0
- package/dist/http/dispatch.d.ts +4 -0
- package/dist/http/dispatch.js +18 -10
- package/dist/http/durable-run-leg.d.ts +5 -1
- package/dist/http/durable-run-leg.js +5 -3
- package/dist/http/health-self-report.d.ts +2 -2
- package/dist/http/memory-compliance-failure-reply.js +3 -0
- package/dist/http/principal-gate.d.ts +15 -10
- package/dist/http/principal-gate.js +48 -9
- package/dist/http/resume-legs.d.ts +7 -31
- package/dist/http/resume-legs.js +185 -126
- package/dist/http/route-ctx.d.ts +38 -53
- package/dist/http/route-ctx.js +2 -5
- package/dist/http/routes/a2a-serve.js +10 -4
- package/dist/http/routes/agents-roster.d.ts +1 -1
- package/dist/http/routes/agents-roster.js +5 -1
- package/dist/http/routes/approvals-assistant.js +24 -10
- package/dist/http/routes/capabilities.js +23 -11
- package/dist/http/routes/mcp-reconnect.d.ts +3 -2
- package/dist/http/routes/mcp-reconnect.js +7 -7
- package/dist/http/routes/memory-consolidation.d.ts +1 -1
- package/dist/http/routes/memory-origin.d.ts +1 -1
- package/dist/http/routes/rules.js +3 -3
- package/dist/http/routes/runs.js +13 -8
- package/dist/http/routes/session-sync.js +42 -6
- package/dist/http/routes/sessions.js +6 -3
- package/dist/http/routes/side-query.js +2 -3
- package/dist/http/routes/tasks.js +794 -780
- package/dist/http/server.d.ts +35 -25
- package/dist/http/stored-body-replay.d.ts +3 -3
- package/dist/http/stored-body-replay.js +6 -1
- package/dist/http/wire-types.d.ts +66 -33
- package/dist/identity-source.d.ts +65 -0
- package/dist/identity-source.js +45 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/leader/wire.d.ts +7 -0
- package/dist/leader/wire.js +5 -4
- package/dist/mcp-assertion-header.d.ts +51 -40
- package/dist/mcp-assertion-header.js +10 -11
- package/dist/mcp-authorization-face.d.ts +27 -0
- package/dist/mcp-authorization-face.js +15 -0
- package/dist/memory-operator-faces.d.ts +13 -4
- package/dist/memory-operator-faces.js +1 -17
- package/dist/memory-store-refusal.d.ts +3 -3
- package/dist/memory-sync-client.js +72 -57
- package/dist/memory-sync.d.ts +1 -1
- package/dist/model-entry-refusal.d.ts +2 -0
- package/dist/model-entry-refusal.js +11 -0
- package/dist/model-route-gap.d.ts +6 -22
- package/dist/model-route-gap.js +7 -5
- package/dist/model-select.d.ts +6 -17
- package/dist/model-select.js +0 -3
- package/dist/mods-declaration.d.ts +110 -0
- package/dist/mods-declaration.js +109 -0
- package/dist/namespaced-rule-name.d.ts +1 -1
- package/dist/observability/err-text.d.ts +5 -0
- package/dist/observability/err-text.js +9 -0
- package/dist/observability/fail-open.d.ts +17 -1
- package/dist/observability/fail-open.js +17 -1
- package/dist/observability/metrics.js +1 -1
- package/dist/observability/run-terminal.js +1 -0
- package/dist/observability/secret-env-scrub.d.ts +1 -1
- package/dist/observability/secret-env-scrub.js +1 -1
- package/dist/operator-ask.d.ts +2 -2
- package/dist/org-delivery-gate.js +1 -1
- package/dist/org-memory-admission.d.ts +2 -2
- package/dist/org-memory-admission.js +39 -2
- package/dist/parked-decide.d.ts +15 -2
- package/dist/parked-decide.js +17 -10
- package/dist/peer-directory.js +2 -0
- package/dist/peer-seat.d.ts +150 -0
- package/dist/peer-seat.js +239 -0
- package/dist/permission-rule-list.d.ts +2 -2
- package/dist/permission-rule-vocab.d.ts +7 -7
- package/dist/permission-rule-vocab.js +3 -3
- package/dist/plain-string-record.d.ts +38 -0
- package/dist/plain-string-record.js +38 -0
- package/dist/plugins/background-agent-store-sql.js +6 -3
- package/dist/plugins/caching-session-store.d.ts +5 -0
- package/dist/plugins/caching-session-store.js +6 -0
- package/dist/plugins/checkpoint-store-sql.d.ts +34 -29
- package/dist/plugins/checkpoint-store-sql.js +14 -14
- package/dist/plugins/file-history-store-sql.js +10 -16
- package/dist/plugins/file-run-store.js +8 -2
- package/dist/plugins/k8s-exec-protocol.d.ts +69 -13
- package/dist/plugins/k8s-exec-protocol.js +116 -28
- package/dist/plugins/k8s-pod-delete-failure.d.ts +25 -0
- package/dist/plugins/k8s-pod-delete-failure.js +17 -0
- package/dist/plugins/k8s-pod-reaper.d.ts +106 -0
- package/dist/plugins/k8s-pod-reaper.js +122 -0
- package/dist/plugins/local-checkpoint-store.d.ts +4 -17
- package/dist/plugins/local-checkpoint-store.js +3 -4
- package/dist/plugins/local-session-store.d.ts +66 -27
- package/dist/plugins/local-session-store.js +60 -28
- package/dist/plugins/mailbox-store-sql.d.ts +11 -3
- package/dist/plugins/mailbox-store-sql.js +103 -15
- package/dist/plugins/memory-run-store.js +2 -0
- package/dist/plugins/memory-sync-store-pg.d.ts +16 -5
- package/dist/plugins/memory-sync-store-tidb.d.ts +3 -3
- package/dist/plugins/one-time-migrations.d.ts +34 -12
- package/dist/plugins/one-time-migrations.js +51 -9
- package/dist/plugins/permission-rule-store-file.js +2 -2
- package/dist/plugins/permission-rule-store-sql.d.ts +17 -17
- package/dist/plugins/permission-rule-store-sql.js +37 -30
- package/dist/plugins/pg-pool.js +4 -0
- package/dist/plugins/pg-session-storage.d.ts +10 -2
- package/dist/plugins/pg-session-storage.js +20 -7
- package/dist/plugins/remote-env-adb.d.ts +6 -1
- package/dist/plugins/remote-env-adb.js +2 -1
- package/dist/plugins/remote-env-device.d.ts +6 -1
- package/dist/plugins/remote-env-device.js +5 -1
- package/dist/plugins/remote-env-e2b.d.ts +5 -0
- package/dist/plugins/remote-env-e2b.js +2 -1
- package/dist/plugins/remote-env-file-error.d.ts +8 -1
- package/dist/plugins/remote-env-file-error.js +7 -1
- package/dist/plugins/remote-env-host.d.ts +10 -2
- package/dist/plugins/remote-env-host.js +8 -2
- package/dist/plugins/remote-env-k8s.d.ts +140 -11
- package/dist/plugins/remote-env-k8s.js +277 -15
- package/dist/plugins/remote-env-local-docker.d.ts +5 -0
- package/dist/plugins/remote-env-local-docker.js +2 -1
- package/dist/plugins/remote-env-ssh.d.ts +6 -1
- package/dist/plugins/remote-env-ssh.js +2 -1
- package/dist/plugins/retention-store-sql.d.ts +14 -2
- package/dist/plugins/retention-store-sql.js +6 -0
- package/dist/plugins/run-store-sql.js +10 -4
- package/dist/plugins/session-fork.d.ts +10 -13
- package/dist/plugins/session-fork.js +5 -25
- package/dist/plugins/session-ownership.d.ts +24 -3
- package/dist/plugins/session-ownership.js +24 -5
- package/dist/plugins/session-workspace-cell.d.ts +17 -0
- package/dist/plugins/session-workspace-cell.js +38 -0
- package/dist/plugins/sql-errors.d.ts +23 -2
- package/dist/plugins/sql-errors.js +15 -0
- package/dist/plugins/store-backend.js +7 -7
- package/dist/plugins/store-contracts.d.ts +10 -1
- package/dist/plugins/store-fault.d.ts +2 -2
- package/dist/plugins/store-fault.js +4 -2
- package/dist/plugins/tidb-pool.js +13 -0
- package/dist/plugins/tidb-session-store.d.ts +17 -2
- package/dist/plugins/tidb-session-store.js +18 -7
- package/dist/plugins/tool-result-store-sql.d.ts +13 -6
- package/dist/plugins/tool-result-store-sql.js +8 -7
- package/dist/plugins/worktree-isolation.d.ts +3 -2
- package/dist/plugins/worktree-isolation.js +1 -7
- package/dist/project-identity.d.ts +1 -14
- package/dist/project-identity.js +0 -4
- package/dist/request-key-closure.js +1 -1
- package/dist/request-value-closure.d.ts +31 -2
- package/dist/request-value-closure.js +7 -1
- package/dist/rule-entry-list.d.ts +3 -2
- package/dist/rule-entry-list.js +2 -2
- package/dist/rules-consent.js +12 -7
- package/dist/run-local.d.ts +2 -2
- package/dist/run-local.js +12 -6
- package/dist/runs.d.ts +7 -1
- package/dist/runs.js +8 -2
- package/dist/runtime-governance.d.ts +5 -5
- package/dist/sandbox-git-lease.d.ts +49 -0
- package/dist/sandbox-git-lease.js +60 -0
- package/dist/sandbox-git-plane.d.ts +84 -0
- package/dist/sandbox-git-plane.js +105 -0
- package/dist/security.d.ts +16 -4
- package/dist/security.js +8 -3
- package/dist/server-secret-env.d.ts +12 -3
- package/dist/server-secret-env.js +18 -2
- package/dist/session-error-wire.d.ts +14 -6
- package/dist/session-error-wire.js +2 -1
- package/dist/session-incarnation.d.ts +4 -5
- package/dist/session-incarnation.js +2 -2
- package/dist/session-policy-wire.d.ts +1 -1
- package/dist/session-policy-wire.js +2 -2
- package/dist/session-sync.d.ts +1 -1
- package/dist/session-workspace.d.ts +130 -0
- package/dist/session-workspace.js +83 -0
- package/dist/spec-fields.d.ts +44 -14
- package/dist/spec-fields.js +33 -12
- package/dist/standing-answer-grant.d.ts +2 -13
- package/dist/standing-answer-grant.js +0 -7
- package/dist/stored-request-prompt-profile-m30.d.ts +49 -0
- package/dist/stored-request-prompt-profile-m30.js +25 -0
- package/dist/task-a2a.d.ts +44 -14
- package/dist/task-a2a.js +46 -20
- package/dist/task-mcp.d.ts +34 -21
- package/dist/task-mcp.js +46 -22
- package/dist/task-settings.d.ts +2 -2
- package/dist/tool-approval.d.ts +43 -9
- package/dist/tool-approval.js +57 -15
- package/dist/tool-rule-names.d.ts +5 -0
- package/dist/trace/core-keyset-guard.d.ts +34 -19
- package/dist/trace/engine-notice-wire.d.ts +1 -1
- package/dist/trace/engine-notice-wire.js +4 -0
- package/dist/trace/exit-seat.d.ts +20 -1
- package/dist/trace/exit-seat.js +5 -2
- package/dist/trace/extension-call-face.d.ts +33 -0
- package/dist/trace/extension-call-face.js +39 -0
- package/dist/trace/ledger-sink.d.ts +4 -5
- package/dist/trace/ledger-sink.js +3 -7
- package/dist/trace/project.d.ts +62 -10
- package/dist/trace/project.js +49 -9
- package/dist/trace/redact.d.ts +18 -6
- package/dist/trace/redact.js +154 -60
- package/dist/trace/self-minted-wire.d.ts +500 -7
- package/dist/trace/self-minted-wire.js +182 -1
- package/dist/trace/wire-projection-faces.d.ts +7 -5
- package/dist/trace/wire-projection-faces.js +9 -4
- package/dist/user-authored-text.d.ts +2 -2
- package/dist/user-authored-text.js +16 -1
- package/dist/web-admin-client/apply-effective.js +0 -1
- package/dist/web-admin-client/center-request.d.ts +23 -4
- package/dist/web-admin-client/center-request.js +42 -8
- package/dist/web-admin-client/http-client.js +6 -6
- package/dist/web-admin-client/skills-mcp.d.ts +8 -4
- package/dist/web-admin-client/skills-mcp.js +31 -18
- package/dist/web-admin-client/types.d.ts +10 -5
- package/docs/DEVICE-EXECUTOR-PROTOCOL.md +11 -5
- package/package.json +3 -3
- package/wire-changes/server@7.137.0.json +825 -0
- package/wire-changes/server@7.138.0.json +446 -0
package/deploy/sema-up/README.md
CHANGED
|
@@ -170,6 +170,20 @@ server 的 `<数据根>/sealed-key/` 存着停驻任务续跑上下文里请求
|
|
|
170
170
|
- PVC 的 `accessModes` 建好后不可改:副本数跨过 1 的边界时 `helm upgrade` 会撞「spec is immutable」;卷里是私钥,换卷前先结掉停驻行或备份钥匙文件。
|
|
171
171
|
PVC 带 `helm.sh/resource-policy: keep`:`helm uninstall` 与把 `enabled` 改成 `false` 的 upgrade 都不删它(确认不要了再 `kubectl -n <ns> delete pvc sema-server-sealed-key`)。
|
|
172
172
|
|
|
173
|
+
## 升级时的副本更新(7.137.0:停驻任务的请求体改写)
|
|
174
|
+
|
|
175
|
+
7.137.0 起服时把 7.136.x 及以前停驻的任务存下的请求体原地改写(请求键 `promptProfile` 换成布尔 `promptLean`;窗内每次起服都扫,细节见随包 `MIGRATION.md` 7.137.0 节第 4 条)。
|
|
176
|
+
改写过的体 7.136.x 读不懂,所以升级序是**先停光 7.136.x 副本,再起第一个 7.137.0 副本** —— 滚动更新做不到这一点。
|
|
177
|
+
|
|
178
|
+
**升级前先缩光副本,按安装路径分三种**(滚动更新做不到「先停光 7.136.x、再起第一个本版副本」;下面三段各管一种安装路径,照你的那一种做):
|
|
179
|
+
|
|
180
|
+
- **Helm 形安装**(`kube-up.sh` 的 `--kube=existing` / `--kube=k3s`;`--kube=machines` 下设了 `STACK_ENGINE=helm`):图表只在钥匙卷是 `ReadWriteOnce` 时给 Deployment 写 `Recreate`;缺省的多副本(`server.replicas: 3`、`ReadWriteMany`)不写更新策略,`helm upgrade` 走 Kubernetes 缺省的滚动更新 —— 第一只本版 pod 起服改写存体时 7.136.x 副本还在跑。所以升级前先 `kubectl -n <命名空间> scale deploy/sema-server --replicas=0`(启用 `serverV4pro` 时同样缩 `deploy/sema-server-v4pro`),等旧 pod 退光,再 `helm upgrade`(重跑 `sema-up` / `kube-up.sh` 在这些安装形上走的就是这条),升完核副本数回到 `server.replicas`。
|
|
181
|
+
- **`--kube=machines` 缺省形**(不设 `STACK_ENGINE` = `render`;`cluster-up.sh` 渲染清单后 `kubectl apply`,不是 Helm):清单里 `sema-server` 的副本数按机器数取 2(少于 3 台)或 3(3 台及以上),没有 `strategy` 键 = Kubernetes 缺省的滚动更新,也没有 `serverV4pro`。所以升级前先 `kubectl -n sema scale deploy/sema-server --replicas=0`(第一台机器上写 `k3s kubectl`),等旧 pod 退光,再 `kubectl apply`(重跑 `sema-up` 做的就是这一步;清单里的 `replicas` 把副本数写回 2 或 3),升完核副本数。
|
|
182
|
+
- **compose 两档**(`--profile=full-single` / `local-plus`):`server` 服务只有一只容器、没有副本数键 —— 没有第二只旧副本在滚动更新里陪跑,零动作。
|
|
183
|
+
|
|
184
|
+
已经滚动升过的:等最后一只 7.136.x 副本退出之后,`kubectl -n <命名空间> rollout restart deploy/sema-server`(启用 `serverV4pro` 时再加 `deploy/sema-server-v4pro`)重起一轮本版副本 —— 起服即改写窗内没改写到的任务(重启用的配置里须 `DURABLE_APPROVAL=true` —— 多租户部署缺省关,要显式写,且多租户还需 `OPERATOR_PRINCIPALS` 非空,否则起服拒(拒句点名出路);起服日志里 `checkpoint_ctx_prompt_profile_rewritten`(M30)与 `checkpoint_ctx_credentials_sealed`(M28)两行都出现、且 M30 那一行是 `"window":"open"`,才说明守卫过了、改写跑过 —— M28 的窗先关,窗关后它那一行 `"window":"closed"` 属正常)。
|
|
185
|
+
Helm 形里,未启用 `serverV4pro`、钥匙卷是 `ReadWriteOnce` 的形(`server.replicas=1`、或随包 `values-full-single.yaml` 这类显式盖 `ReadWriteOnce` 的形)图表对 `deploy/sema-server` 本来用 `Recreate`,旧 pod 先停,零动作;启用 `serverV4pro` 时两只 Deployment 各自 `Recreate`、互不等待,仍按上面 Helm 形一条先把两只都缩到 0。
|
|
186
|
+
|
|
173
187
|
## 凭据纪律
|
|
174
188
|
|
|
175
189
|
全部凭据生成一次、落 `~/.sema-up/<project>/.env`(0600),重跑**绝不轮换**;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# ── 沙箱 lane RBAC(k8s+kata;pod 五动词 + 缓存卷四动词 + 出网自检的两只只读:本 ns 的 NetworkPolicy、集群的节点表)────────────────────────────────
|
|
1
|
+
# ── 沙箱 lane RBAC(k8s+kata;pod 五动词 + 缓存卷四动词 + 沙箱秘密座 create + 出网自检的两只只读:本 ns 的 NetworkPolicy、集群的节点表)────────────────────────────────
|
|
2
2
|
apiVersion: v1
|
|
3
3
|
kind: ServiceAccount
|
|
4
4
|
metadata:
|
|
@@ -33,6 +33,12 @@ rules:
|
|
|
33
33
|
- apiGroups: [""]
|
|
34
34
|
resources: [persistentvolumeclaims]
|
|
35
35
|
verbs: [get, create, delete, deletecollection]
|
|
36
|
+
# 沙箱秘密座:K8S_SANDBOX_ENV 点名的值只进每只 pod 自己的 Secret(pod spec 只带 secretKeyRef;Secret 属于 pod,随 pod 由集群回收)
|
|
37
|
+
# 动词 = 适配器为 env Secret 真发的调用:create;不读回(无 get)、不删(随属主 pod 由集群 GC)。名单非空而缺它 ⇒ server 起服拒(起服 SelfSubjectAccessReview 问的正是它)
|
|
38
|
+
# 成员 git 凭据平面(本版恒关)打开时,租约 Secret 还要 patch —— 那时再加
|
|
39
|
+
- apiGroups: [""]
|
|
40
|
+
resources: [secrets]
|
|
41
|
+
verbs: [create]
|
|
36
42
|
# 起服的出网自检读本 ns 的 NetworkPolicy(只读)
|
|
37
43
|
- apiGroups: [networking.k8s.io]
|
|
38
44
|
resources: [networkpolicies]
|
|
@@ -92,7 +92,7 @@ kind: Service
|
|
|
92
92
|
metadata: { name: sema-minio, namespace: sema }
|
|
93
93
|
spec: { selector: { app: sema-minio }, ports: [{ name: s3, port: 9000 }, { name: console, port: 9001 }] }
|
|
94
94
|
---
|
|
95
|
-
# ── 沙箱 lane RBAC(k8s+kata
|
|
95
|
+
# ── 沙箱 lane RBAC(k8s+kata;pod 五动词 + 缓存卷四动词 + 沙箱秘密座 create + 出网自检的两只只读:本 ns 的 NetworkPolicy、集群的节点表)────────────────────────────────
|
|
96
96
|
apiVersion: v1
|
|
97
97
|
kind: ServiceAccount
|
|
98
98
|
metadata: { name: sema-runner, namespace: sema-sandbox }
|
|
@@ -122,6 +122,12 @@ rules:
|
|
|
122
122
|
- apiGroups: [""]
|
|
123
123
|
resources: [persistentvolumeclaims]
|
|
124
124
|
verbs: [get, create, delete, deletecollection]
|
|
125
|
+
# 沙箱秘密座:K8S_SANDBOX_ENV 点名的值只进每只 pod 自己的 Secret(pod spec 只带 secretKeyRef;Secret 属于 pod,随 pod 由集群回收)
|
|
126
|
+
# 动词 = 适配器为 env Secret 真发的调用:create;不读回(无 get)、不删(随属主 pod 由集群 GC)。名单非空而缺它 ⇒ server 起服拒(起服 SelfSubjectAccessReview 问的正是它)
|
|
127
|
+
# 成员 git 凭据平面(本版恒关)打开时,租约 Secret 还要 patch —— 那时再加
|
|
128
|
+
- apiGroups: [""]
|
|
129
|
+
resources: [secrets]
|
|
130
|
+
verbs: [create]
|
|
125
131
|
# 起服的出网自检读本 ns 的 NetworkPolicy(只读)
|
|
126
132
|
- apiGroups: [networking.k8s.io]
|
|
127
133
|
resources: [networkpolicies]
|
package/dist/approval-card.d.ts
CHANGED
|
@@ -84,6 +84,7 @@ export declare const RuleOfferSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
84
84
|
rule: z.ZodString;
|
|
85
85
|
match: z.ZodEnum<{
|
|
86
86
|
name: "name";
|
|
87
|
+
tool: "tool";
|
|
87
88
|
host: "host";
|
|
88
89
|
path: "path";
|
|
89
90
|
exact: "exact";
|
|
@@ -102,6 +103,7 @@ export declare const RuleOfferSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
102
103
|
rule: z.ZodString;
|
|
103
104
|
match: z.ZodEnum<{
|
|
104
105
|
name: "name";
|
|
106
|
+
tool: "tool";
|
|
105
107
|
host: "host";
|
|
106
108
|
path: "path";
|
|
107
109
|
exact: "exact";
|
|
@@ -552,21 +554,21 @@ export declare const ApprovalCardSchema: z.ZodObject<{
|
|
|
552
554
|
rememberRefused: z.ZodOptional<z.ZodLiteral<true>>;
|
|
553
555
|
approvalCard: z.ZodOptional<z.ZodEnum<{
|
|
554
556
|
question: "question";
|
|
555
|
-
plan: "plan";
|
|
556
557
|
skill: "skill";
|
|
558
|
+
plan: "plan";
|
|
557
559
|
shell: "shell";
|
|
558
560
|
workflow: "workflow";
|
|
559
|
-
|
|
561
|
+
fetch: "fetch";
|
|
560
562
|
"file-write": "file-write";
|
|
563
|
+
"file-edit": "file-edit";
|
|
561
564
|
"notebook-edit": "notebook-edit";
|
|
562
|
-
fetch: "fetch";
|
|
563
565
|
generic: "generic";
|
|
564
566
|
}>>;
|
|
565
567
|
inputHasBidi: z.ZodOptional<z.ZodLiteral<true>>;
|
|
566
568
|
allowRuleShadowed: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
567
569
|
member: z.ZodEnum<{
|
|
568
|
-
hook: "hook";
|
|
569
570
|
skill: "skill";
|
|
571
|
+
hook: "hook";
|
|
570
572
|
deployment: "deployment";
|
|
571
573
|
request: "request";
|
|
572
574
|
persisted: "persisted";
|
|
@@ -579,6 +581,7 @@ export declare const ApprovalCardSchema: z.ZodObject<{
|
|
|
579
581
|
rule: z.ZodString;
|
|
580
582
|
match: z.ZodEnum<{
|
|
581
583
|
name: "name";
|
|
584
|
+
tool: "tool";
|
|
582
585
|
host: "host";
|
|
583
586
|
path: "path";
|
|
584
587
|
exact: "exact";
|
|
@@ -597,6 +600,7 @@ export declare const ApprovalCardSchema: z.ZodObject<{
|
|
|
597
600
|
rule: z.ZodString;
|
|
598
601
|
match: z.ZodEnum<{
|
|
599
602
|
name: "name";
|
|
603
|
+
tool: "tool";
|
|
600
604
|
host: "host";
|
|
601
605
|
path: "path";
|
|
602
606
|
exact: "exact";
|
|
@@ -665,8 +669,8 @@ export declare const ApprovalCardSchema: z.ZodObject<{
|
|
|
665
669
|
}, z.core.$strict>>>;
|
|
666
670
|
personalRuleDotsAbsent: z.ZodOptional<z.ZodCustom<AskEvidenceAbsence, AskEvidenceAbsence>>;
|
|
667
671
|
}, z.core.$strict>>;
|
|
668
|
-
askClass: z.ZodOptional<z.ZodCustom<"mode" | "hook" | "org_rule" | "write_protection" | "target_unresolved" | "content_question" | "ask_rule" | "denial_limit_fallback" | "ancestor" | "dangerous_delete" | "unverifiable_delete" | "unverifiable_shell_text" | "transcript_write" | "rule_unreadable" | "classifier_no_ruling" | "requires_user_interaction" | "cross_boundary" | "operator_forced" | "shell_floor" | "
|
|
669
|
-
classes: z.ZodOptional<z.ZodArray<z.ZodCustom<"mode" | "hook" | "org_rule" | "write_protection" | "target_unresolved" | "content_question" | "ask_rule" | "denial_limit_fallback" | "ancestor" | "dangerous_delete" | "unverifiable_delete" | "unverifiable_shell_text" | "transcript_write" | "rule_unreadable" | "classifier_no_ruling" | "requires_user_interaction" | "cross_boundary" | "operator_forced" | "shell_floor" | "
|
|
672
|
+
askClass: z.ZodOptional<z.ZodCustom<"probe" | "mode" | "hook" | "org_rule" | "write_protection" | "target_unresolved" | "content_question" | "ask_rule" | "denial_limit_fallback" | "ancestor" | "dangerous_delete" | "unverifiable_delete" | "unverifiable_shell_text" | "transcript_write" | "rule_unreadable" | "classifier_no_ruling" | "requires_user_interaction" | "cross_boundary" | "operator_forced" | "shell_floor" | "write_protection_on_disk" | "tool_marks_mcp" | "tool_marks_a2a" | "policy_rra" | "artifact_shared_read" | "unstated" | "ordinary", "probe" | "mode" | "hook" | "org_rule" | "write_protection" | "target_unresolved" | "content_question" | "ask_rule" | "denial_limit_fallback" | "ancestor" | "dangerous_delete" | "unverifiable_delete" | "unverifiable_shell_text" | "transcript_write" | "rule_unreadable" | "classifier_no_ruling" | "requires_user_interaction" | "cross_boundary" | "operator_forced" | "shell_floor" | "write_protection_on_disk" | "tool_marks_mcp" | "tool_marks_a2a" | "policy_rra" | "artifact_shared_read" | "unstated" | "ordinary">>;
|
|
673
|
+
classes: z.ZodOptional<z.ZodArray<z.ZodCustom<"probe" | "mode" | "hook" | "org_rule" | "write_protection" | "target_unresolved" | "content_question" | "ask_rule" | "denial_limit_fallback" | "ancestor" | "dangerous_delete" | "unverifiable_delete" | "unverifiable_shell_text" | "transcript_write" | "rule_unreadable" | "classifier_no_ruling" | "requires_user_interaction" | "cross_boundary" | "operator_forced" | "shell_floor" | "write_protection_on_disk" | "tool_marks_mcp" | "tool_marks_a2a" | "policy_rra" | "artifact_shared_read" | "unstated" | "ordinary", "probe" | "mode" | "hook" | "org_rule" | "write_protection" | "target_unresolved" | "content_question" | "ask_rule" | "denial_limit_fallback" | "ancestor" | "dangerous_delete" | "unverifiable_delete" | "unverifiable_shell_text" | "transcript_write" | "rule_unreadable" | "classifier_no_ruling" | "requires_user_interaction" | "cross_boundary" | "operator_forced" | "shell_floor" | "write_protection_on_disk" | "tool_marks_mcp" | "tool_marks_a2a" | "policy_rra" | "artifact_shared_read" | "unstated" | "ordinary">>>;
|
|
670
674
|
fromSubagent: z.ZodOptional<z.ZodLiteral<true>>;
|
|
671
675
|
sourceTaskId: z.ZodOptional<z.ZodString>;
|
|
672
676
|
sourceAgentName: z.ZodOptional<z.ZodString>;
|
|
@@ -704,21 +708,21 @@ export declare const ApprovalCardEnvelopeSchema: z.ZodObject<{
|
|
|
704
708
|
rememberRefused: z.ZodOptional<z.ZodLiteral<true>>;
|
|
705
709
|
approvalCard: z.ZodOptional<z.ZodEnum<{
|
|
706
710
|
question: "question";
|
|
707
|
-
plan: "plan";
|
|
708
711
|
skill: "skill";
|
|
712
|
+
plan: "plan";
|
|
709
713
|
shell: "shell";
|
|
710
714
|
workflow: "workflow";
|
|
711
|
-
|
|
715
|
+
fetch: "fetch";
|
|
712
716
|
"file-write": "file-write";
|
|
717
|
+
"file-edit": "file-edit";
|
|
713
718
|
"notebook-edit": "notebook-edit";
|
|
714
|
-
fetch: "fetch";
|
|
715
719
|
generic: "generic";
|
|
716
720
|
}>>;
|
|
717
721
|
inputHasBidi: z.ZodOptional<z.ZodLiteral<true>>;
|
|
718
722
|
allowRuleShadowed: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
719
723
|
member: z.ZodEnum<{
|
|
720
|
-
hook: "hook";
|
|
721
724
|
skill: "skill";
|
|
725
|
+
hook: "hook";
|
|
722
726
|
deployment: "deployment";
|
|
723
727
|
request: "request";
|
|
724
728
|
persisted: "persisted";
|
|
@@ -731,6 +735,7 @@ export declare const ApprovalCardEnvelopeSchema: z.ZodObject<{
|
|
|
731
735
|
rule: z.ZodString;
|
|
732
736
|
match: z.ZodEnum<{
|
|
733
737
|
name: "name";
|
|
738
|
+
tool: "tool";
|
|
734
739
|
host: "host";
|
|
735
740
|
path: "path";
|
|
736
741
|
exact: "exact";
|
|
@@ -749,6 +754,7 @@ export declare const ApprovalCardEnvelopeSchema: z.ZodObject<{
|
|
|
749
754
|
rule: z.ZodString;
|
|
750
755
|
match: z.ZodEnum<{
|
|
751
756
|
name: "name";
|
|
757
|
+
tool: "tool";
|
|
752
758
|
host: "host";
|
|
753
759
|
path: "path";
|
|
754
760
|
exact: "exact";
|
|
@@ -817,8 +823,8 @@ export declare const ApprovalCardEnvelopeSchema: z.ZodObject<{
|
|
|
817
823
|
}, z.core.$strict>>>;
|
|
818
824
|
personalRuleDotsAbsent: z.ZodOptional<z.ZodCustom<AskEvidenceAbsence, AskEvidenceAbsence>>;
|
|
819
825
|
}, z.core.$strict>>;
|
|
820
|
-
askClass: z.ZodOptional<z.ZodCustom<"mode" | "hook" | "org_rule" | "write_protection" | "target_unresolved" | "content_question" | "ask_rule" | "denial_limit_fallback" | "ancestor" | "dangerous_delete" | "unverifiable_delete" | "unverifiable_shell_text" | "transcript_write" | "rule_unreadable" | "classifier_no_ruling" | "requires_user_interaction" | "cross_boundary" | "operator_forced" | "shell_floor" | "
|
|
821
|
-
classes: z.ZodOptional<z.ZodArray<z.ZodCustom<"mode" | "hook" | "org_rule" | "write_protection" | "target_unresolved" | "content_question" | "ask_rule" | "denial_limit_fallback" | "ancestor" | "dangerous_delete" | "unverifiable_delete" | "unverifiable_shell_text" | "transcript_write" | "rule_unreadable" | "classifier_no_ruling" | "requires_user_interaction" | "cross_boundary" | "operator_forced" | "shell_floor" | "
|
|
826
|
+
askClass: z.ZodOptional<z.ZodCustom<"probe" | "mode" | "hook" | "org_rule" | "write_protection" | "target_unresolved" | "content_question" | "ask_rule" | "denial_limit_fallback" | "ancestor" | "dangerous_delete" | "unverifiable_delete" | "unverifiable_shell_text" | "transcript_write" | "rule_unreadable" | "classifier_no_ruling" | "requires_user_interaction" | "cross_boundary" | "operator_forced" | "shell_floor" | "write_protection_on_disk" | "tool_marks_mcp" | "tool_marks_a2a" | "policy_rra" | "artifact_shared_read" | "unstated" | "ordinary", "probe" | "mode" | "hook" | "org_rule" | "write_protection" | "target_unresolved" | "content_question" | "ask_rule" | "denial_limit_fallback" | "ancestor" | "dangerous_delete" | "unverifiable_delete" | "unverifiable_shell_text" | "transcript_write" | "rule_unreadable" | "classifier_no_ruling" | "requires_user_interaction" | "cross_boundary" | "operator_forced" | "shell_floor" | "write_protection_on_disk" | "tool_marks_mcp" | "tool_marks_a2a" | "policy_rra" | "artifact_shared_read" | "unstated" | "ordinary">>;
|
|
827
|
+
classes: z.ZodOptional<z.ZodArray<z.ZodCustom<"probe" | "mode" | "hook" | "org_rule" | "write_protection" | "target_unresolved" | "content_question" | "ask_rule" | "denial_limit_fallback" | "ancestor" | "dangerous_delete" | "unverifiable_delete" | "unverifiable_shell_text" | "transcript_write" | "rule_unreadable" | "classifier_no_ruling" | "requires_user_interaction" | "cross_boundary" | "operator_forced" | "shell_floor" | "write_protection_on_disk" | "tool_marks_mcp" | "tool_marks_a2a" | "policy_rra" | "artifact_shared_read" | "unstated" | "ordinary", "probe" | "mode" | "hook" | "org_rule" | "write_protection" | "target_unresolved" | "content_question" | "ask_rule" | "denial_limit_fallback" | "ancestor" | "dangerous_delete" | "unverifiable_delete" | "unverifiable_shell_text" | "transcript_write" | "rule_unreadable" | "classifier_no_ruling" | "requires_user_interaction" | "cross_boundary" | "operator_forced" | "shell_floor" | "write_protection_on_disk" | "tool_marks_mcp" | "tool_marks_a2a" | "policy_rra" | "artifact_shared_read" | "unstated" | "ordinary">>>;
|
|
822
828
|
fromSubagent: z.ZodOptional<z.ZodLiteral<true>>;
|
|
823
829
|
sourceTaskId: z.ZodOptional<z.ZodString>;
|
|
824
830
|
sourceAgentName: z.ZodOptional<z.ZodString>;
|
|
@@ -933,7 +939,8 @@ export declare function buildApprovalRequestFrame(input: {
|
|
|
933
939
|
/**
|
|
934
940
|
* 🔴 **呈卡帧的活面事实座**(呈卡腿上旧族退役之后,开卡帧的全部事实都由本族承载)。
|
|
935
941
|
*
|
|
936
|
-
*
|
|
942
|
+
* 这十一个座是活卡帧 `tool_approval` 上有、而卡(`ApprovalCardSchema`,`card_json` 的耐久信封)上**没有**的那几位(`approvalCard` 7.136.0 起也在卡上,见本注末段;
|
|
943
|
+
* `requestedBy` = 扩展经 `$.tool.call` 自己发起的调用是谁要的,部署座装运维声明的 mod 包之后可达):
|
|
937
944
|
* 卡外的事实此前只骑活卡帧,呈卡腿的消费方靠「两帧按 approvalId 合读」拿到它们。呈卡腿自此只发本族帧 ⇒ 它们挪到**活铸**的
|
|
938
945
|
* 呈卡帧顶层,同名同型同值 —— 值取自同一只帧对象(活卡帧的那一次铸定,`tool-approval.ts` 的 `askBroadcast`),本仓不另算一遍。
|
|
939
946
|
*
|
|
@@ -946,7 +953,7 @@ export declare function buildApprovalRequestFrame(input: {
|
|
|
946
953
|
* 同一次读定、同值)。按上一句的规矩它该离表(活铸帧顶层这一份退役 —— wire BREAKING,下游 sdk 的孪生表同改),本版按 additive 交付、未退役:
|
|
947
954
|
* 一个事实两处读,登记为待收的债,收法 = 离表 + 消费方改读 `card.approvalCard`,不是在这里加第三处。
|
|
948
955
|
*/
|
|
949
|
-
export declare const APPROVAL_REQUEST_LIVE_FACT_KEYS: readonly ["mandated", "mandate", "origin", "boundGrantDigest", "boundGrants", "classifierNoRuling", "boundGrantAbsence", "approvalCard", "readRootCandidate", "probeReason"];
|
|
956
|
+
export declare const APPROVAL_REQUEST_LIVE_FACT_KEYS: readonly ["mandated", "mandate", "origin", "boundGrantDigest", "boundGrants", "classifierNoRuling", "boundGrantAbsence", "approvalCard", "readRootCandidate", "probeReason", "requestedBy"];
|
|
950
957
|
/** 呈卡帧活面事实座的类型面 = 活卡帧同名座的 `Pick`(同型由构造保证,不手抄)。 */
|
|
951
958
|
export type ApprovalRequestLiveFacts = Pick<ToolApprovalFrame, (typeof APPROVAL_REQUEST_LIVE_FACT_KEYS)[number]>;
|
|
952
959
|
/**
|
package/dist/approval-card.js
CHANGED
|
@@ -19,6 +19,12 @@
|
|
|
19
19
|
* 不是卡的渲染读法,不在本模块的规则里。
|
|
20
20
|
*/
|
|
21
21
|
export { ASK_USER_QUESTION_TOOL_NAME } from "@sema-agent/core";
|
|
22
|
+
/**
|
|
23
|
+
* core 7.56.0 [ref]:停驻行是不是**引擎自己的问题工具**的(content-ask)—— 读**行的记录**:引擎铸的挂载点 `pendingAction.engineMounted: true` 与保留名同在。
|
|
24
|
+
* 调用方自己挂的同名工具不带挂载点(引擎只给引擎挂载的工具铸这一位),本版之前停驻的行也没有 ⇒ 都不是。读者:两只决定铸点(顶层 `/decide` 与停驻子代赎回腿)——
|
|
25
|
+
* 引擎问题工具的决定**不转** `updatedInput`(解析器忽略它,而认领前的编辑复判会在问题专用的 resume-edit 策略下把它拒成 `resume.constraint_rejected`)。
|
|
26
|
+
*/
|
|
27
|
+
export declare function isEngineQuestionRow(pendingAction: unknown): boolean;
|
|
22
28
|
import { PAUSE_REGISTRY, type GateKind, type ToolApprovalCard } from "@sema-agent/core";
|
|
23
29
|
/**
|
|
24
30
|
* 一格卡词的**闭集窄读**(三个载体共用这一只:活 ask、LOCAL 店的停驻门、SQL 店读出的门子树)。成员 ⇒ 那个词;缺席 ⇒ `undefined`(不计);
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
export { ASK_USER_QUESTION_TOOL_NAME } from "@sema-agent/core";
|
|
2
|
+
import { ASK_USER_QUESTION_TOOL_NAME as QUESTION_TOOL_NAME } from "@sema-agent/core";
|
|
3
|
+
export function isEngineQuestionRow(pendingAction) {
|
|
4
|
+
if (pendingAction === null || typeof pendingAction !== "object")
|
|
5
|
+
return false;
|
|
6
|
+
const pa = pendingAction;
|
|
7
|
+
return pa.kind === "tool_approval" && pa.engineMounted === true && pa.toolName === QUESTION_TOOL_NAME;
|
|
8
|
+
}
|
|
2
9
|
import { PAUSE_REGISTRY, TOOL_APPROVAL_CARDS, facetOf, isGateKind, parkedApprovalCardOf } from "@sema-agent/core";
|
|
3
10
|
import { recordFailOpen } from "./observability/fail-open.js";
|
|
4
11
|
import { redactSecrets } from "./trace/redact.js";
|
|
@@ -8,10 +8,26 @@
|
|
|
8
8
|
*
|
|
9
9
|
* ## 判官
|
|
10
10
|
* 问题:**这把 gate token 是不是该会话当前待决的审批门?**(应答口的答法:`resumeCheckpoint` 的 stale 臂 —— 回显的 token ≠ 该会话当前待决的审批门 ⇒ `409 approval_stale`。)
|
|
11
|
+
* · {@link sightsCurrentGate} —— 「决断方回显的**门身份**(token / `checkpointId`)是不是当前门的同一面」的**唯一**比较(`approval_stale` 律,两道决断门一条,见下一节);
|
|
12
|
+
* 本仓每一处拿**决断方 / 读口给的那把**门身份比「是不是当前门」都经它(`/decide` 的 token 回显、计划审阅的身份回显、下面的 {@link readGateCurrency});
|
|
13
|
+
* 服务端对**自己选出的那张卡**的复核不是回显比较,不经它(`drivePlanReview` 的卡令牌复核答认领输家 `409 conflict.not_resumable`、唤醒腿的赢家比较);
|
|
14
|
+
* 射程:本判官问的是「**哪扇门**」;`/decide` 的 [ref] 第二源问的是「**哪只调用**」(回显的 `boundCallId` vs 载入行的 `toolCallId`)—— 两问不同,所以是两条比较,
|
|
15
|
+
* 不是「不能并」:它们共用同一个 409 答复,缺值规则各按各的问题定(说不出门身份 ⇒ 判「不是」;行上没有 `toolCallId` ⇒ 那一问不判,交引擎的绑定等值校验 fail-closed 兜)。
|
|
16
|
+
* 过期决断的 409 一族(门身份 / 调用绑定两问怎么排成一族、老行那一形答哪个码)是 7.138.0 的设计票(DEBTS-server,主会话开票);
|
|
11
17
|
* · {@link currentApprovalGateToken} —— 该会话当前待决的审批门(审批门型优先,没有再退到任一待决行);应答口读它,读口读它,别处不再内联第二份;
|
|
12
18
|
* · {@link readGateCurrency} —— 一把 token 对着它的读数:`current`(带那一行)/ `absent`(店里没有这一行)/ `settled`(行在,但不再是当前待决门:已结算、已过期、被取代);
|
|
13
19
|
* · {@link createParkedGateRead} —— 协调器读口的门读席:把读数译成读口要的四种读法({@link ParkedGateReading}),`state` 闭集不加字。
|
|
14
20
|
*
|
|
21
|
+
* ## `approval_stale` 律(两道决断门一条;[ref] 把计划审阅收进来)
|
|
22
|
+
* 一句话:**决断体带了「决断方看到的那道门」,而它不是该会话此刻在这道门上待决的那道门 ⇒ `409 approval_stale`,不落决断,拒体带当前门的回显坐标;不带 ⇒ 照旧受理。**
|
|
23
|
+
* 门的身份有两个面,**同一次铸**在同一行上(core 的每个停驻铸点把 `token` 与 `checkpointId` 一起铸;重开翻的是同一行、两面都不变)⇒ 在带身份的行上两面一一对应:
|
|
24
|
+
* · 能力面 `checkpointToken` —— 秘密,永不外发;`/decide` 的老回显键(直连门上拒收);
|
|
25
|
+
* · 身份面 `checkpointId` —— 非秘密(park 结果的 `terminal.checkpointId`、运维队列 / 收件行上的那一个);计划审阅能回显的只有它。
|
|
26
|
+
* 读法只有 `checkpoint-identity.ts` 的信任边界那一只:core 5.42.0 之前铸的老行没有它、没过边界的值不算它 ⇒ 这样的门**说不出**自己的身份面。
|
|
27
|
+
* 判官 {@link sightsCurrentGate} 只做一件事:回显的那一面 = 当前门的同一面。当前门没有那一面(老行 / 不可信值 / 调用方没读行)⇒ 不是(fail-closed:拒,不放)。
|
|
28
|
+
* 「当前门」由每道门按**自己的门型**选(`/decide` = {@link currentApprovalGateToken};计划审阅 = 它的选卡读),判官门型无关。
|
|
29
|
+
* 不把能力面先解成身份面再比:两面在同一行上同生同灭,比能力面就是比这一行;先解一次只会在快路上多一次店读,并在老行上(两边都读不出身份面)把两道不同的门判成同一道。
|
|
30
|
+
*
|
|
15
31
|
* ## 一个读数只取自一个时刻([ref])
|
|
16
32
|
* 门身份就是 token:引擎重开一张门(`reopen`:续跑腿在被批准的动作开跑之前失败)翻的是**同一行**(resolved → pending,token 不变)。所以「这张卡此刻在哪」可以在两次店读之间
|
|
17
33
|
* 来回变(待决 → 被决 → 被重开);判官的分类只用**同一时刻成立**的读数:
|
|
@@ -33,8 +49,10 @@
|
|
|
33
49
|
* 表明说 `decided` ⇒ 往下读;明说 `void` ⇒ `void`(没有人决过它,答案无处兑现 —— 已过期〔取消 / 收割〕、仍待决却不是当前门〔被取代,应答口答 stale〕、
|
|
34
50
|
* 结算种类是引擎窗到期 / 宿主 SLA 扫 / 无人可答的失败族);**表外 ⇒ `unknown`**(读不懂的词撑不起「有人决过」,也撑不起「没有人决过它」);
|
|
35
51
|
* ② 结算赢家的门记录 `resolvedOutcome.gateOutcome` 先过 core 唯一的门记录筛 `screenGateOutcome`(**档案读法**:读回的耐久行,闭集 = 今日成员 ∪ 已退役词;
|
|
36
|
-
* 坏形记缺陷、绝不抛;本仓 `trace/project.ts` 投影同一种记录也只经这一只筛),有缺陷 ⇒ `unknown
|
|
37
|
-
*
|
|
52
|
+
* 坏形记缺陷、绝不抛;本仓 `trace/project.ts` 投影同一种记录也只经这一只筛),有缺陷 ⇒ `unknown`,过了筛才读它的成员。core 7.56.0 [ref] 起筛自己判
|
|
53
|
+
* I10(`settlement.when` 是有限数)与 I11(调用方把赢家的 `decision` 一并交给筛:它是赢家拿得出的词,方向与记录的结算种类 / 处置同向)—— 本判官在同一次筛调用里
|
|
54
|
+
* 交 `winnerDecision`,时刻与方向的手判随之退役;
|
|
55
|
+
* ③ 分类之前记录要**读得全**:有结算记录、赢家绑的是这一行的调用且判词是 allow / deny(与
|
|
38
56
|
* `findDecidedApprovalsForBinding` 同一只 {@link approvalDecisionOfWinner})—— 缺一个都是 `unknown`(**不编一个首决**;读口答 404,应答口对已结算的门答 409 `approval_stale`,两口不同判;
|
|
39
57
|
* `void` 也要读得全:绑在别的调用上的结算说的不是这张卡);读全了再按**结算种类**表分类:人 / 策略的四个种类 ⇒ `decided`(理由取自赢家的 `reason`),其余十个 ⇒ `void`
|
|
40
58
|
* (按种类不按当事方:跨版本稳定的是种类词,变过义的是当事方词 —— 此前版本的策略拒记 `policy_refused` + `who.party:"none"`,此后记 `"policy"`,按当事方查会把那一代合法历史记录读成 `void`);
|
|
@@ -42,14 +60,38 @@
|
|
|
42
60
|
* `unknown` 的这一类(`decision_unreadable`)带上读不出的那几处(缺陷句,非空):读口答 404 `tool_approval.not_pending`,并记一行 error(首句 + 计数)。
|
|
43
61
|
* 行没了 ⇒ `unknown`(`row_absent`;应答口 PARKED 臂的 404 `not_found.approval` 同判)。
|
|
44
62
|
*
|
|
45
|
-
* ## 盲区(core
|
|
46
|
-
* ·
|
|
47
|
-
*
|
|
48
|
-
* 只有坏行 / 手改行才走得到这两处。候引擎的筛把时刻、方向与种类 × 当事方配对一并判了,两个读者同时退掉各自的手判(配对今天没有手判可退 —— 它无人判)。
|
|
63
|
+
* ## 盲区(core 的筛仍不判的一处,如实写下)
|
|
64
|
+
* · 种类 × 当事方的配对(结算种类与 `settlement.who` 的当事方是否相配)—— 筛不判(core KL-1265-b),本判官也不核:读的是种类。只有坏行 / 手改行才走得到。
|
|
65
|
+
* (时刻与方向两处自 core 7.56.0 [ref] 起由筛判:I10 / I11。trace 投影读同一种记录、经同一只筛,零改即得 I10 —— 坏时刻在两个读者那里是同一个答法。)
|
|
49
66
|
*/
|
|
50
67
|
import { type Checkpoint, type CheckpointToken, type SettlementKind } from "@sema-agent/core";
|
|
51
68
|
import { type PendingRowBinding } from "./plugins/checkpoint-store-sql.js";
|
|
52
69
|
import { type ParkedGateRead } from "./tool-approval.js";
|
|
70
|
+
/**
|
|
71
|
+
* 决断方回显的「我看到的那道门」—— 门的两个身份面之一(两面的来历与读法见模块头注「`approval_stale` 律」)。
|
|
72
|
+
* `face` 就是回显它的那个体键名:`/decide` 的 `checkpointToken`,计划审阅的 `checkpointId`。
|
|
73
|
+
*/
|
|
74
|
+
export type GateSighting = {
|
|
75
|
+
readonly face: "checkpointToken" | "checkpointId";
|
|
76
|
+
readonly value: string;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* 当前门的身份面。能力面恒在;身份面在场 ⇔ 行上的 `checkpointId` 过了信任边界 —— 老行 / 没过边界 / 调用方没读行时缺席,
|
|
80
|
+
* 缺席读作「说不出它的身份面」(判官据此对身份面回显答「不是」),**不**读作「没有门」。
|
|
81
|
+
*/
|
|
82
|
+
export interface CurrentGateFaces {
|
|
83
|
+
readonly checkpointToken: string;
|
|
84
|
+
readonly checkpointId?: string;
|
|
85
|
+
}
|
|
86
|
+
/** 一道已载入的当前门 → 它的两个身份面(身份面只经 {@link trustedCheckpointId};它含 token 的形在这里就被当成缺席,永不上比较、永不上 wire)。 */
|
|
87
|
+
export declare function currentGateFacesOf(token: string, row: {
|
|
88
|
+
readonly checkpointId?: unknown;
|
|
89
|
+
}): CurrentGateFaces;
|
|
90
|
+
/**
|
|
91
|
+
* `approval_stale` 律的**唯一**判官:回显的那一面是不是当前门的同一面(律全文见模块头注)。没有当前门(`null` / `undefined`)⇒ 不是;
|
|
92
|
+
* 当前门说不出回显的那一面 ⇒ 不是(fail-closed)。调用点:`/decide` 的 token 回显、计划审阅的身份回显、本模块的 {@link readGateCurrency}。
|
|
93
|
+
*/
|
|
94
|
+
export declare function sightsCurrentGate(sighting: GateSighting, current: CurrentGateFaces | null | undefined): boolean;
|
|
53
95
|
/** 判官要的两个店口(三后端同形;窄接口让测试与装配都不必拿整只店)。 */
|
|
54
96
|
export interface GateCurrencyStore {
|
|
55
97
|
get(token: CheckpointToken): Promise<Checkpoint | null>;
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
-
import { REOPEN_REASONS, screenGateOutcome } from "@sema-agent/core";
|
|
1
|
+
import { REOPEN_REASONS, checkpointRevOf, screenGateOutcome } from "@sema-agent/core";
|
|
2
2
|
import { approvalDecisionOfWinner } from "./plugins/checkpoint-store-sql.js";
|
|
3
3
|
import {} from "./tool-approval.js";
|
|
4
4
|
import { APPROVAL_GATE_KINDS } from "./approval-content-kind.js";
|
|
5
|
+
import { trustedCheckpointId } from "./checkpoint-identity.js";
|
|
6
|
+
export function currentGateFacesOf(token, row) {
|
|
7
|
+
const checkpointId = trustedCheckpointId(row.checkpointId, token);
|
|
8
|
+
return checkpointId === undefined ? { checkpointToken: token } : { checkpointToken: token, checkpointId };
|
|
9
|
+
}
|
|
10
|
+
export function sightsCurrentGate(sighting, current) {
|
|
11
|
+
if (current === null || current === undefined)
|
|
12
|
+
return false;
|
|
13
|
+
const face = current[sighting.face];
|
|
14
|
+
return face !== undefined && face === sighting.value;
|
|
15
|
+
}
|
|
5
16
|
export async function currentApprovalGateToken(cs, sessionId) {
|
|
6
17
|
return (await cs.findPendingTokenBySession(sessionId, undefined, { gateKinds: APPROVAL_GATE_KINDS })) ?? (await cs.findPendingTokenBySession(sessionId));
|
|
7
18
|
}
|
|
8
|
-
function revisionOf(cp) {
|
|
9
|
-
return cp.rev ?? 0;
|
|
10
|
-
}
|
|
11
19
|
const GATE_READ_ROUNDS = 3;
|
|
12
20
|
export async function readGateCurrency(cs, gateToken) {
|
|
13
21
|
const token = gateToken;
|
|
@@ -17,10 +25,11 @@ export async function readGateCurrency(cs, gateToken) {
|
|
|
17
25
|
return { kind: "absent" };
|
|
18
26
|
if (row.status !== "pending")
|
|
19
27
|
return { kind: "settled", checkpoint: row };
|
|
20
|
-
const
|
|
28
|
+
const currentToken = await currentApprovalGateToken(cs, row.sessionId);
|
|
29
|
+
const isCurrent = sightsCurrentGate({ face: "checkpointToken", value: gateToken }, currentToken ? { checkpointToken: currentToken } : null);
|
|
21
30
|
const again = await cs.get(token);
|
|
22
31
|
if (again !== null && again.status === "pending") {
|
|
23
|
-
if (
|
|
32
|
+
if (checkpointRevOf(again) === checkpointRevOf(row))
|
|
24
33
|
return isCurrent ? { kind: "current", checkpoint: again } : { kind: "settled", checkpoint: again };
|
|
25
34
|
if (round === GATE_READ_ROUNDS)
|
|
26
35
|
throw new Error(`the checkpoint row moved between reads in ${GATE_READ_ROUNDS} rounds in a row (decided and reopened each time): there is no single-instant reading of its gate`);
|
|
@@ -68,14 +77,12 @@ function decisionReading(checkpoint, gateBoundCallId) {
|
|
|
68
77
|
function readWinner(checkpoint, gateBoundCallId) {
|
|
69
78
|
const winner = checkpoint.resolvedOutcome;
|
|
70
79
|
const recorded = winner?.gateOutcome;
|
|
71
|
-
const [defect, ...more] = screenGateOutcome(recorded, { reading: "archive" });
|
|
80
|
+
const [defect, ...more] = screenGateOutcome(recorded, { reading: "archive", ...(winner !== undefined ? { winnerDecision: winner.decision } : {}) });
|
|
72
81
|
if (defect !== undefined)
|
|
73
82
|
return unreadable([defect, ...more]);
|
|
74
83
|
const settlement = recorded?.settlement;
|
|
75
84
|
if (settlement === undefined)
|
|
76
85
|
return unreadable(["the gate record carries no settlement: no decider and no time"]);
|
|
77
|
-
if (!Number.isFinite(settlement.when))
|
|
78
|
-
return unreadable(["settlement.when is not a finite epoch-ms time"]);
|
|
79
86
|
const boundCallId = gateBoundCallId ?? (checkpoint.pendingAction.kind === "tool_approval" ? checkpoint.pendingAction.toolCallId : "");
|
|
80
87
|
const direction = approvalDecisionOfWinner(winner, boundCallId);
|
|
81
88
|
if (direction === null)
|
package/dist/approval-hmac.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ import type { ApprovalHmacKey } from "./auth-keys.js";
|
|
|
20
20
|
* `reason`,以及 [ref] 起的 `permissionModeAfter`)。⇒ 「同一张卡上把 approve 的档偷偷调宽」这件事,
|
|
21
21
|
* 结构上只有 HMAC 这一把拦得住;往 `cnf.bnd` 里加位既不解决它,还会把一份合法 JWT 绑死在一个它签发时
|
|
22
22
|
* 根本不知道的值上。**本次([ref] F1)只动 HMAC 这一把,`approvalBnd` 一个字节不动。**
|
|
23
|
+
* [ref] 同一判断:`plan_review` 的门身份 `checkpointId` 进 HMAC 的扩展对象,不进 `cnf.bnd` —— 计划审阅的 `cnf.bnd` 绑的是会话(它的第二位是一次性 nonce),
|
|
24
|
+
* 签发 JWT 的一方不知道此刻是哪道计划门;知道的是作决断的那一方,而 HMAC 正是它签的。
|
|
23
25
|
*
|
|
24
26
|
* ── 🔴 字节构造规则(权威定义;跨仓签名器照此实现,docs/ASSISTANT-WIRE-CONTRACT.md §6.2 同源)──────────
|
|
25
27
|
* 被 HMAC 的是下面这个字符串的 **UTF-8 字节**:
|
|
@@ -81,7 +83,7 @@ export declare function questionAnswerFromProjection(p: QuestionAnswerProjection
|
|
|
81
83
|
* 下面那两条编译期门当场红。**不许有第三种在场判**:恒 `!== undefined`(不是真值判、也不是 `?? null`
|
|
82
84
|
* 折叠)—— `null` 与缺席在扩展位上是两个不同的被签值(「签名方明说这次不动」≠「签名方不知道有这个键」)。
|
|
83
85
|
*/
|
|
84
|
-
export declare const APPROVAL_ENVELOPE_EXT_KEYS: readonly ["answer", "permissionModeAfter"];
|
|
86
|
+
export declare const APPROVAL_ENVELOPE_EXT_KEYS: readonly ["answer", "checkpointId", "permissionModeAfter"];
|
|
85
87
|
export type ApprovalEnvelopeExtKey = (typeof APPROVAL_ENVELOPE_EXT_KEYS)[number];
|
|
86
88
|
/** The canonical envelope both {@link approvalHmacMessage} (the signer's/verifier's shared byte-rule) and
|
|
87
89
|
* {@link verifyApprovalHmac} take — ONE named type so the two signatures cannot silently drift into two
|
|
@@ -105,6 +107,16 @@ export interface ApprovalEnvelope {
|
|
|
105
107
|
* 值是 {@link projectQuestionAnswer} 的产物,不是请求体上那个对象(理由见该函数)。
|
|
106
108
|
*/
|
|
107
109
|
answer?: QuestionAnswerProjection;
|
|
110
|
+
/**
|
|
111
|
+
* 🔴 **[ref](7.137.0)—— `plan_review` 决断方看到的那道门(`checkpointId`)进签名载荷。**
|
|
112
|
+
*
|
|
113
|
+
* 计划审阅的证明只绑会话(`cnf.bnd` = 会话 + 一次性 nonce + 内容哈希),不绑门 ⇒ 决断体上的门身份是这次决断**落在哪道门**的唯一陈述
|
|
114
|
+
* (不是当前门 ⇒ `409 approval_stale`)。不签它,能改写线上字节的一方就能把它摘掉(陈旧保护整个不在)或换掉;拒收它则把这项保护在直连门部署上整个关掉。
|
|
115
|
+
* 判据扩成一句:**凡决定这次决断落在哪道门、续跑能做什么 / 落什么账的决裁字段都在签名信封里**。
|
|
116
|
+
* 与 `permissionModeAfter` 同形:在场才进扩展对象,缺席 ⇒ 字节与不认识它的签名器逐字相同(既有签名器零改动);带了不签 ⇒ `401 approval_mac_invalid`。
|
|
117
|
+
* `/decide` 不送它(那道门的门身份是 `boundCallId` / `boundInputHash`,已在前五位)。
|
|
118
|
+
*/
|
|
119
|
+
checkpointId?: string;
|
|
108
120
|
/**
|
|
109
121
|
* 🔴 **[ref] 合并复审 F1 [high]**(7.86.0 立,[ref] 把它从裸尾位挪进扩展对象)—— `plan_review` 的
|
|
110
122
|
* `permissionModeAfter` 选的是**批准之后这条 run 有没有手**(`acceptEdits` = 工作目录内的写不再逐次
|
package/dist/approval-hmac.js
CHANGED
|
@@ -5,7 +5,7 @@ export function projectQuestionAnswer(a) {
|
|
|
5
5
|
export function questionAnswerFromProjection(p) {
|
|
6
6
|
return { answers: p.map(([header, selected, note]) => ({ header, selected: [...selected], ...(note === null ? {} : { note }) })) };
|
|
7
7
|
}
|
|
8
|
-
export const APPROVAL_ENVELOPE_EXT_KEYS = ["answer", "permissionModeAfter"];
|
|
8
|
+
export const APPROVAL_ENVELOPE_EXT_KEYS = ["answer", "checkpointId", "permissionModeAfter"];
|
|
9
9
|
const APPROVAL_ENVELOPE_HEAD_KEYS = ["sessionId", "boundCallId", "boundInputHash", "decision", "reason"];
|
|
10
10
|
export function approvalHmacMessage(env) {
|
|
11
11
|
const head = [env.sessionId, env.boundCallId ?? null, env.boundInputHash ?? null, env.decision, env.reason ?? null];
|
package/dist/approval.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createApprovalPolicy,
|
|
1
|
+
import { createApprovalPolicy, isCoveringRuleName, ruleNameCovers } from "@sema-agent/core";
|
|
2
2
|
import { operatorAlwaysHumanAsk, operatorAsk, requestAlwaysHumanAsk } from "./operator-ask.js";
|
|
3
3
|
import { ASK_USER_QUESTION_TOOL_NAME } from "./approval-content-kind.js";
|
|
4
4
|
import { isExplicitPosture } from "./posture-source.js";
|
|
@@ -116,10 +116,10 @@ export function createDeploymentListExemption(store, sessionId, logger, leg) {
|
|
|
116
116
|
}
|
|
117
117
|
function createNameSetMatcher(names) {
|
|
118
118
|
const exact = new Set(names);
|
|
119
|
-
const covering = names.filter((name) =>
|
|
119
|
+
const covering = names.filter((name) => isCoveringRuleName(name, NAME_TABLE_BEHAVIOR));
|
|
120
120
|
if (covering.length === 0)
|
|
121
121
|
return (toolName) => exact.has(toolName);
|
|
122
|
-
return (toolName) => exact.has(toolName) || covering.some((rule) =>
|
|
122
|
+
return (toolName) => exact.has(toolName) || covering.some((rule) => ruleNameCovers(rule, toolName));
|
|
123
123
|
}
|
|
124
124
|
export const AUTO_APPROVE_BUDGET_APPROVER = "auto_approve_budget";
|
|
125
125
|
function budgetSeatAnswer(req, requireHit, signal) {
|
package/dist/audit.js
CHANGED
|
@@ -126,6 +126,7 @@ const MESSAGE_READ_TREATMENT = {
|
|
|
126
126
|
user: {
|
|
127
127
|
role: "verbatim", content: "verbatim", timestamp: "verbatim", enginePrefixChars: "verbatim", engineSegments: "verbatim",
|
|
128
128
|
engineMinted: "verbatim", engineNoteKey: "verbatim", provenance: "verbatim", actor: "verbatim",
|
|
129
|
+
runOrigin: "verbatim",
|
|
129
130
|
taskId: "verbatim",
|
|
130
131
|
attachment: "verbatim",
|
|
131
132
|
},
|
package/dist/auth-bridge.js
CHANGED
|
@@ -2,6 +2,7 @@ import { createPublicKey, verify as cryptoVerify } from "node:crypto";
|
|
|
2
2
|
import { AUTH_BRIDGE_ALGS, DEFAULT_CLOCK_SKEW_SEC, DEFAULT_JWKS_REFRESH_MIN_INTERVAL_SEC, DEFAULT_OFFLINE_GRACE_SEC, WEB_ADMIN_JWKS_PATH, WebAdminJwks, classifyTimeClaims, jwksWithinOfflineGrace, shouldForceJwksRefresh, toVerifiedIdentity, } from "@sema-agent/settings-schema/api/auth-bridge";
|
|
3
3
|
import { readTokenScope } from "@sema-agent/settings-schema/api/scopes";
|
|
4
4
|
import { buildDisplaySafeUrl } from "./trace/redact.js";
|
|
5
|
+
import { centerJwksFetch } from "./web-admin-client/center-request.js";
|
|
5
6
|
export function authBridgeIssuerOf(config) {
|
|
6
7
|
if (config.authBridgeIssuer !== undefined)
|
|
7
8
|
return { issuer: config.authBridgeIssuer, source: "explicit" };
|
|
@@ -49,7 +50,6 @@ export function createWebAdminJwtVerifier(opts) {
|
|
|
49
50
|
const refreshMin = opts.jwksRefreshMinIntervalSec ?? DEFAULT_JWKS_REFRESH_MIN_INTERVAL_SEC;
|
|
50
51
|
const offlineGraceSec = opts.offlineGraceSec ?? DEFAULT_OFFLINE_GRACE_SEC;
|
|
51
52
|
const jwksTtlSec = opts.jwksTtlSec ?? DEFAULT_JWKS_TTL_SEC;
|
|
52
|
-
const doFetch = opts.fetchImpl ?? fetch;
|
|
53
53
|
const now = opts.nowMs ?? Date.now;
|
|
54
54
|
const keys = new Map();
|
|
55
55
|
let lastFetchAttemptMs;
|
|
@@ -66,7 +66,7 @@ export function createWebAdminJwtVerifier(opts) {
|
|
|
66
66
|
inflight = (async () => {
|
|
67
67
|
lastFetchAttemptMs = now();
|
|
68
68
|
try {
|
|
69
|
-
const res = await
|
|
69
|
+
const res = await centerJwksFetch(jwksUrl, { timeoutMs: JWKS_FETCH_TIMEOUT_MS, fetchImpl: opts.fetchImpl });
|
|
70
70
|
if (!res.ok)
|
|
71
71
|
throw new Error(`jwks HTTP ${res.status}`);
|
|
72
72
|
const cl = Number(res.headers.get("content-length"));
|
|
@@ -28,18 +28,7 @@ export declare function createBudgetAndTracing(ctx: BudgetTracingCtx): {
|
|
|
28
28
|
fleetUsage: import("../fleet-client.js").FleetUsageBins | undefined;
|
|
29
29
|
fleetLease: import("../fleet-lease.js").FleetLeaseManager | undefined;
|
|
30
30
|
tracer: import("@sema-agent/core").TracerHook;
|
|
31
|
-
sideQueryAccounting: (
|
|
32
|
-
model: string;
|
|
33
|
-
usage?: {
|
|
34
|
-
input?: number;
|
|
35
|
-
output?: number;
|
|
36
|
-
cacheRead?: number;
|
|
37
|
-
cacheWrite?: number;
|
|
38
|
-
cost?: {
|
|
39
|
-
total?: number;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
}) => void;
|
|
31
|
+
sideQueryAccounting: import("../budget.js").SideQueryAccounting;
|
|
43
32
|
toolResultStore: import("../plugins/store-backend.js").ToolResultStoreFull | undefined;
|
|
44
33
|
sessionPolicyStore: import("@sema-agent/core").SessionPolicyStore | undefined;
|
|
45
34
|
fileHistoryStore: import("../plugins/store-backend.js").ServiceFileHistoryStore | undefined;
|