@sema-agent/server 7.134.0 → 7.135.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 +134 -0
- package/USAGE.md +98 -30
- package/dist/adoption/plan.d.ts +1 -1
- package/dist/approval-ask-audit-store.d.ts +24 -24
- package/dist/approval-ask-machine.d.ts +2 -2
- package/dist/approval-card.d.ts +62 -150
- package/dist/approval-card.js +33 -51
- package/dist/approval-content-kind.d.ts +22 -5
- package/dist/approval-content-kind.js +8 -1
- package/dist/approval-deny-reasons.d.ts +1 -1
- package/dist/approval-gate-currency.d.ts +22 -3
- package/dist/approval-gate-currency.js +44 -18
- package/dist/approval-hmac.d.ts +7 -7
- package/dist/approval-policy-settlement.d.ts +2 -2
- package/dist/approval-reconciler.d.ts +3 -3
- package/dist/approval.d.ts +8 -8
- package/dist/approval.js +4 -2
- package/dist/auth-bridge.d.ts +1 -1
- package/dist/auto-mode-face.d.ts +4 -4
- package/dist/background-session-reap.d.ts +2 -2
- package/dist/bake-runner/main.d.ts +2 -2
- package/dist/bake-runner/runner.d.ts +4 -4
- package/dist/bench/s1/live-deps.d.ts +1 -1
- package/dist/bench/s1/run-firm.d.ts +1 -1
- package/dist/boot/coordinators.d.ts +2 -2
- package/dist/boot/coordinators.js +2 -2
- package/dist/boot/deferred-sandbox-path-env.d.ts +0 -6
- package/dist/boot/deferred-sandbox-path-env.js +0 -5
- package/dist/boot/engine-lease.d.ts +5 -5
- package/dist/boot/execution-env.d.ts +16 -15
- package/dist/boot/execution-env.js +19 -21
- package/dist/boot/fatal-exit.d.ts +2 -2
- package/dist/boot/late-binds.d.ts +1 -1
- package/dist/boot/leader.d.ts +1 -1
- package/dist/boot/memory-boundary.d.ts +2 -2
- package/dist/boot/memory-consolidation.d.ts +15 -15
- package/dist/boot/parked-revive-gate.d.ts +3 -3
- package/dist/boot/parked-revive-gate.js +3 -2
- package/dist/boot/reapers.d.ts +4 -4
- package/dist/boot/resolve-spec.d.ts +1 -1
- package/dist/boot/resolve-spec.js +28 -24
- package/dist/boot/runner-deps.d.ts +11 -11
- package/dist/boot/runner-deps.js +3 -2
- package/dist/boot/session-faces.d.ts +3 -3
- package/dist/boot/session-faces.js +11 -30
- package/dist/boot/shutdown.d.ts +5 -5
- package/dist/boot/side-query-lane.d.ts +2 -2
- package/dist/boot/stage-05-execution-env.js +4 -4
- package/dist/boot/stage-06-runners.js +0 -2
- package/dist/boot/stores.js +2 -1
- package/dist/boot/web-admin.d.ts +17 -17
- package/dist/boot/web-admin.js +5 -10
- package/dist/boot/workflow-orchestration.js +2 -9
- package/dist/brain.d.ts +11 -11
- package/dist/budget.d.ts +4 -4
- package/dist/capabilities/approvals-push.d.ts +4 -4
- package/dist/capabilities/builtin-tools.d.ts +5 -5
- package/dist/capabilities/center-plugins.d.ts +5 -5
- package/dist/capabilities/center-plugins.js +1 -1
- package/dist/capabilities/center-prompts.d.ts +1 -1
- package/dist/capabilities/center-wiring.d.ts +1 -1
- package/dist/capabilities/composite-members.d.ts +1 -1
- package/dist/capabilities/execution-lane.d.ts +5 -5
- package/dist/capabilities/execution-lane.js +2 -2
- package/dist/capabilities/hands-lane.d.ts +5 -5
- package/dist/capabilities/mcp-probe.d.ts +10 -7
- package/dist/capabilities/sandbox-file-send.d.ts +1 -18
- package/dist/capabilities/sandbox-file-send.js +0 -7
- package/dist/capabilities/scenarios.d.ts +28 -10
- package/dist/capabilities/scenarios.js +15 -5
- package/dist/capabilities/send-user-file-tool.d.ts +1 -1
- package/dist/capabilities/skills.d.ts +31 -12
- package/dist/capabilities/skills.js +23 -17
- package/dist/capabilities/tool-defer.d.ts +1 -1
- package/dist/capability-facts.d.ts +26 -25
- package/dist/capability-facts.js +14 -16
- package/dist/center-config-tier.d.ts +1 -1
- package/dist/center-credential.d.ts +4 -4
- package/dist/checkpoint-identity.d.ts +5 -0
- package/dist/checkpoint-identity.js +14 -0
- package/dist/config-catalog.d.ts +12 -12
- package/dist/config-invariants.d.ts +4 -4
- package/dist/config-invariants.js +3 -2
- package/dist/config-lkg.d.ts +1 -1
- package/dist/config-provider.d.ts +13 -13
- package/dist/config-provider.js +2 -1
- package/dist/config-types.d.ts +83 -83
- package/dist/config.d.ts +26 -24
- package/dist/config.js +12 -10
- package/dist/cross-session-settings.d.ts +1 -1
- package/dist/delegated-session-owner.d.ts +16 -13
- package/dist/delegated-session-owner.js +9 -10
- package/dist/deployment-governance.d.ts +16 -16
- package/dist/deployment-shape.d.ts +127 -0
- package/dist/deployment-shape.js +72 -0
- package/dist/device-store.d.ts +1 -1
- package/dist/device-ws-hub.d.ts +1 -1
- package/dist/egress-redirect.d.ts +1 -1
- package/dist/entry-mode-clamp-notice.d.ts +2 -2
- package/dist/env-facts.d.ts +10 -9
- package/dist/env-facts.js +1 -1
- package/dist/env-name-allowlist-knobs.d.ts +5 -5
- package/dist/exec-bounds.d.ts +2 -2
- package/dist/execution-lane-caps.d.ts +31 -43
- package/dist/execution-lane-caps.js +0 -13
- package/dist/file-history-capture.d.ts +9 -9
- package/dist/file-history-disclosure.d.ts +23 -11
- package/dist/file-history-disclosure.js +7 -12
- package/dist/fleet/drain-entry.d.ts +2 -2
- package/dist/fleet/fleet-bus.d.ts +22 -14
- package/dist/fleet/fleet-bus.js +5 -5
- package/dist/fleet/fleet-reconciler.d.ts +9 -9
- package/dist/fleet/subagent-tail-bus.d.ts +4 -4
- package/dist/fleet-client.d.ts +13 -13
- package/dist/fleet-lease.d.ts +16 -16
- package/dist/governance-http-status.d.ts +2 -2
- package/dist/hooks/hook-llm.d.ts +7 -7
- package/dist/hooks/hook-runner.d.ts +57 -30
- package/dist/hooks/hook-runner.js +36 -18
- package/dist/host-decision.d.ts +5 -5
- package/dist/host-lsp-manager.d.ts +5 -5
- package/dist/hosted-posture.d.ts +23 -13
- package/dist/hosted-posture.js +4 -9
- package/dist/http/admission.d.ts +2 -2
- package/dist/http/admission.js +20 -5
- package/dist/http/approval-sweeps.d.ts +1 -1
- package/dist/http/approval-sweeps.js +2 -1
- package/dist/http/checkpoint-ctx.d.ts +39 -13
- package/dist/http/checkpoint-ctx.js +74 -35
- package/dist/http/dispatch.d.ts +3 -3
- package/dist/http/durable-run-leg.js +4 -3
- package/dist/http/idempotency.d.ts +2 -2
- package/dist/http/mcp-dial-deadline.d.ts +7 -5
- package/dist/http/memory-compliance-failure-reply.d.ts +4 -4
- package/dist/http/owner-access.d.ts +4 -6
- package/dist/http/owner-access.js +1 -1
- package/dist/http/principal-gate.d.ts +7 -7
- package/dist/http/principal-gate.js +3 -2
- package/dist/http/readiness.d.ts +1 -1
- package/dist/http/request-guards.d.ts +4 -4
- package/dist/http/request-guards.js +2 -1
- package/dist/http/resume-ctx-read.d.ts +7 -7
- package/dist/http/resume-ctx-read.js +1 -1
- package/dist/http/resume-legs.d.ts +3 -3
- package/dist/http/resume-legs.js +11 -8
- package/dist/http/route-ctx.d.ts +29 -29
- package/dist/http/route-table.d.ts +9 -9
- package/dist/http/routes/agents-roster.d.ts +1 -1
- package/dist/http/routes/approvals-assistant.d.ts +5 -5
- package/dist/http/routes/approvals-assistant.js +55 -15
- package/dist/http/routes/background.d.ts +3 -3
- package/dist/http/routes/background.js +2 -2
- package/dist/http/routes/capabilities.d.ts +1 -1
- package/dist/http/routes/capabilities.js +16 -8
- package/dist/http/routes/config-catalog.d.ts +1 -1
- package/dist/http/routes/devices.d.ts +1 -1
- package/dist/http/routes/diagnostics.d.ts +3 -3
- package/dist/http/routes/fleet.d.ts +1 -1
- package/dist/http/routes/fleet.js +2 -1
- package/dist/http/routes/mcp-reconnect.d.ts +4 -4
- package/dist/http/routes/mcp-reconnect.js +3 -3
- package/dist/http/routes/memory-consolidation.d.ts +1 -1
- package/dist/http/routes/notify-wake.d.ts +1 -1
- package/dist/http/routes/notify-wake.js +2 -2
- package/dist/http/routes/rules.d.ts +1 -1
- package/dist/http/routes/runs.js +22 -10
- package/dist/http/routes/session-sync.d.ts +1 -1
- package/dist/http/routes/session-sync.js +73 -44
- package/dist/http/routes/sessions-list.js +1 -1
- package/dist/http/routes/sessions.js +30 -44
- package/dist/http/routes/tasks.d.ts +1 -1
- package/dist/http/routes/trace-usage.d.ts +1 -1
- package/dist/http/routes/workflows.d.ts +3 -0
- package/dist/http/routes/workflows.js +31 -28
- package/dist/http/send.d.ts +5 -5
- package/dist/http/server.d.ts +34 -34
- package/dist/http/session-inherit-env.d.ts +3 -3
- package/dist/http/sse-lifecycle.d.ts +1 -1
- package/dist/http/sse-log.d.ts +2 -2
- package/dist/http/submit-ctx.js +1 -1
- package/dist/http/sync-submit-body.d.ts +1 -1
- package/dist/http/verify-rounds.d.ts +1 -1
- package/dist/http/wire-types.d.ts +28 -21
- package/dist/instruction-source-notice.d.ts +2 -2
- package/dist/key-resolver.d.ts +3 -3
- package/dist/lane-home-probe.d.ts +1 -1
- package/dist/leader/diffout.d.ts +1 -1
- package/dist/leader/diffup.d.ts +2 -2
- package/dist/leader/endpoint.d.ts +1 -1
- package/dist/leader/fanout.d.ts +1 -1
- package/dist/leader/leader.d.ts +4 -4
- package/dist/leader/merge.d.ts +3 -3
- package/dist/leader/repair-wire.d.ts +1 -1
- package/dist/leader/wire.d.ts +6 -6
- package/dist/list-entry-display.d.ts +1 -1
- package/dist/lsp-evict.d.ts +1 -1
- package/dist/mcp-assertion-header.d.ts +1 -1
- package/dist/memory-layer-legacy-lock.d.ts +1 -1
- package/dist/memory-operator-faces.d.ts +1 -1
- package/dist/memory-posture.js +4 -2
- package/dist/memory-project-layer.d.ts +1 -1
- package/dist/memory-scope.d.ts +19 -19
- package/dist/memory-store-refusal.d.ts +4 -4
- package/dist/model-entry-headers.d.ts +2 -2
- package/dist/model-entry-refusal.d.ts +17 -17
- package/dist/model-provider.d.ts +10 -10
- package/dist/model-reach-scope.d.ts +1 -1
- package/dist/model-route-endpoint.d.ts +6 -6
- package/dist/model-route-url.d.ts +5 -5
- package/dist/model-select.d.ts +15 -6
- package/dist/model-select.js +5 -0
- package/dist/model-unreachable-notice.d.ts +3 -3
- package/dist/namespaced-rule-name.d.ts +15 -5
- package/dist/namespaced-rule-name.js +3 -2
- package/dist/observability/corrupt-read-seat.d.ts +9 -9
- package/dist/observability/cost-taxonomy.d.ts +1 -1
- package/dist/observability/err-text.d.ts +1 -1
- package/dist/observability/fail-open.d.ts +12 -8
- package/dist/observability/fail-open.js +12 -8
- package/dist/observability/metrics.d.ts +3 -3
- package/dist/observability/run-terminal.d.ts +36 -36
- package/dist/observability/secret-env-scrub.d.ts +3 -3
- package/dist/observability/tool-trace.d.ts +1 -1
- package/dist/operator-ask.d.ts +4 -4
- package/dist/orchestration/workflow-agent-session-index.d.ts +3 -3
- package/dist/orchestration/workflow-completion-inbox.d.ts +20 -5
- package/dist/orchestration/workflow-completion-inbox.js +29 -7
- package/dist/orchestration/workflow-notify-journal.d.ts +43 -19
- package/dist/orchestration/workflow-notify-journal.js +17 -0
- package/dist/outbound-dispatcher.d.ts +4 -4
- package/dist/parent-watch.d.ts +4 -4
- package/dist/parked-decide.d.ts +16 -15
- package/dist/parked-decide.js +5 -4
- package/dist/parked-revive-surface.d.ts +7 -7
- package/dist/parked-revive-surface.js +2 -3
- package/dist/peer-directory.d.ts +3 -3
- package/dist/peer-directory.js +1 -1
- package/dist/permission-rule-list.d.ts +10 -1
- package/dist/permission-rule-list.js +7 -5
- package/dist/permission-rule-vocab.d.ts +2 -2
- package/dist/plugins/adoption-log-sql.d.ts +1 -1
- package/dist/plugins/approval-ask-store-file.d.ts +8 -1
- package/dist/plugins/approval-ask-store-file.js +6 -3
- package/dist/plugins/approval-ask-store-memory.d.ts +11 -7
- package/dist/plugins/approval-ask-store-memory.js +11 -7
- package/dist/plugins/approval-ask-store-sql.d.ts +34 -15
- package/dist/plugins/approval-ask-store-sql.js +18 -5
- package/dist/plugins/approval-exemption-store.d.ts +3 -3
- package/dist/plugins/approval-nonce-store.d.ts +3 -3
- package/dist/plugins/background-agent-store-sql.d.ts +1 -1
- package/dist/plugins/background-shell-support.d.ts +2 -2
- package/dist/plugins/blob-backend.d.ts +1 -1
- package/dist/plugins/caching-session-store.d.ts +23 -32
- package/dist/plugins/caching-session-store.js +5 -17
- package/dist/plugins/checkpoint-index-columns.d.ts +81 -0
- package/dist/plugins/checkpoint-index-columns.js +62 -0
- package/dist/plugins/checkpoint-store-sql.d.ts +44 -66
- package/dist/plugins/checkpoint-store-sql.js +55 -102
- package/dist/plugins/device-store-sql.d.ts +7 -6
- package/dist/plugins/e2b-orphan-reclaim.d.ts +1 -1
- package/dist/plugins/ensure-schema-lock-policy.d.ts +1 -1
- package/dist/plugins/file-history-store-sql.d.ts +9 -7
- package/dist/plugins/file-history-store-sql.js +27 -15
- package/dist/plugins/file-run-store.d.ts +8 -8
- package/dist/plugins/fork-routing-session-store.d.ts +2 -2
- package/dist/plugins/fork-routing-session-store.js +1 -1
- package/dist/plugins/host-platform.d.ts +10 -10
- package/dist/plugins/image-bake-store-sql.d.ts +1 -1
- package/dist/plugins/image-index-sql.d.ts +1 -1
- package/dist/plugins/leader-run-store-sql.d.ts +1 -1
- package/dist/plugins/local-checkpoint-store.d.ts +10 -10
- package/dist/plugins/local-checkpoint-store.js +3 -4
- package/dist/plugins/local-session-store.d.ts +34 -38
- package/dist/plugins/local-session-store.js +20 -39
- package/dist/plugins/local-session-window.d.ts +1 -1
- package/dist/plugins/mailbox-store-sql.d.ts +2 -2
- package/dist/plugins/memory-engine-pg.d.ts +1 -1
- package/dist/plugins/memory-run-store.d.ts +4 -4
- package/dist/plugins/memory-sync-store-pg.d.ts +3 -3
- package/dist/plugins/one-time-migrations.d.ts +66 -40
- package/dist/plugins/one-time-migrations.js +115 -34
- package/dist/plugins/outcome-ledger-sql.d.ts +1 -1
- package/dist/plugins/park-commit-watch.d.ts +3 -3
- package/dist/plugins/permission-rule-store-file.d.ts +5 -5
- package/dist/plugins/permission-rule-store-file.js +12 -19
- package/dist/plugins/permission-rule-store-sql.d.ts +38 -4
- package/dist/plugins/permission-rule-store-sql.js +67 -24
- package/dist/plugins/pg-cost-quota.d.ts +1 -1
- package/dist/plugins/pg-pool.d.ts +2 -2
- package/dist/plugins/pg-pool.js +5 -2
- package/dist/plugins/pg-rate-limiter.d.ts +1 -1
- package/dist/plugins/pg-session-storage.d.ts +8 -20
- package/dist/plugins/pg-session-storage.js +14 -27
- package/dist/plugins/remote-env-adb.d.ts +10 -10
- package/dist/plugins/remote-env-device.d.ts +10 -9
- package/dist/plugins/remote-env-device.js +6 -2
- package/dist/plugins/remote-env-e2b.d.ts +3 -3
- package/dist/plugins/remote-env-host.d.ts +16 -16
- package/dist/plugins/remote-env-k8s.d.ts +8 -8
- package/dist/plugins/remote-env-local-docker.d.ts +2 -2
- package/dist/plugins/remote-env-ssh.d.ts +4 -4
- package/dist/plugins/remote-scratchpad.d.ts +2 -3
- package/dist/plugins/remote-scratchpad.js +0 -4
- package/dist/plugins/remote-shell.d.ts +6 -6
- package/dist/plugins/retention-lane-store-sql.d.ts +4 -4
- package/dist/plugins/retention-store-sql.d.ts +4 -4
- package/dist/plugins/roster-store-sql.d.ts +1 -1
- package/dist/plugins/run-store-sql.d.ts +8 -8
- package/dist/plugins/schema-consistency.d.ts +2 -2
- package/dist/plugins/schema-ensure-legs.d.ts +3 -3
- package/dist/plugins/schema-indexes.d.ts +1 -1
- package/dist/plugins/schema-live-columns.d.ts +1 -1
- package/dist/plugins/session-event-payload.d.ts +4 -4
- package/dist/plugins/session-fork.d.ts +34 -0
- package/dist/plugins/session-fork.js +29 -0
- package/dist/plugins/session-ownership.js +1 -1
- package/dist/plugins/session-placement.d.ts +1 -1
- package/dist/plugins/session-policy-store-sql.d.ts +12 -12
- package/dist/plugins/session-store.d.ts +2 -2
- package/dist/plugins/session-store.js +2 -2
- package/dist/plugins/shared-memory-store-sql.d.ts +2 -2
- package/dist/plugins/sql-driver.d.ts +8 -8
- package/dist/plugins/sql-errors.d.ts +1 -1
- package/dist/plugins/sql-json-column.d.ts +21 -21
- package/dist/plugins/sql-row-helpers.d.ts +2 -2
- package/dist/plugins/store-backend.d.ts +17 -16
- package/dist/plugins/store-backend.js +3 -3
- package/dist/plugins/store-contracts.d.ts +21 -21
- package/dist/plugins/task-attachment-store.d.ts +2 -2
- package/dist/plugins/task-list-store-sql.d.ts +1 -1
- package/dist/plugins/tidb-pool.d.ts +2 -2
- package/dist/plugins/tidb-pool.js +9 -2
- package/dist/plugins/tidb-session-store.d.ts +16 -26
- package/dist/plugins/tidb-session-store.js +15 -27
- package/dist/plugins/tool-result-store-sql.d.ts +1 -1
- package/dist/plugins/usage-window-store-sql.d.ts +3 -3
- package/dist/plugins/user-input-ledger-file.d.ts +1 -1
- package/dist/plugins/user-input-ledger-sql.d.ts +3 -3
- package/dist/plugins/web-search.d.ts +19 -5
- package/dist/plugins/web-search.js +19 -4
- package/dist/{orchestration/workflow-journal-entry.d.ts → plugins/workflow-journal-payload.d.ts} +23 -32
- package/dist/plugins/workflow-journal-payload.js +32 -0
- package/dist/plugins/workflow-journal-store-sql.d.ts +28 -14
- package/dist/plugins/workflow-journal-store-sql.js +34 -15
- package/dist/plugins/workflow-run-store-sql.d.ts +4 -4
- package/dist/posture-source.d.ts +11 -11
- package/dist/principal-jwt.d.ts +6 -6
- package/dist/project-identity.d.ts +3 -3
- package/dist/project-memory.d.ts +4 -4
- package/dist/read-face-posture.d.ts +7 -7
- package/dist/request-key-closure.d.ts +1 -1
- package/dist/request-key-closure.js +1 -1
- package/dist/request-value-closure.d.ts +15 -8
- package/dist/request-value-closure.js +2 -0
- package/dist/router/route-orchestration.d.ts +11 -16
- package/dist/router/route-orchestration.js +2 -12
- package/dist/rule-entry-list.d.ts +8 -7
- package/dist/rule-entry-list.js +2 -9
- package/dist/rules-consent.d.ts +6 -6
- package/dist/rules-consent.js +2 -0
- package/dist/run-cancel-context.d.ts +5 -5
- package/dist/run-local.d.ts +10 -10
- package/dist/runs.d.ts +13 -11
- package/dist/runs.js +15 -1
- package/dist/runtime-caps-resolver.d.ts +6 -6
- package/dist/runtime-governance.d.ts +9 -9
- package/dist/sandbox-pkg-source.d.ts +9 -31
- package/dist/sandbox-pkg-source.js +14 -8
- package/dist/sealed-key.d.ts +3 -3
- package/dist/security.d.ts +23 -26
- package/dist/security.js +12 -9
- package/dist/server-secret-env.d.ts +10 -10
- package/dist/session-children-retire.d.ts +1 -1
- package/dist/session-error-wire.d.ts +7 -7
- package/dist/session-incarnation.d.ts +52 -35
- package/dist/session-incarnation.js +23 -8
- package/dist/session-policy-wire.d.ts +27 -5
- package/dist/session-policy-wire.js +15 -1
- package/dist/session-records-skipped-notice.d.ts +1 -1
- package/dist/session-sync-kernel.d.ts +4 -4
- package/dist/session-sync.d.ts +49 -6
- package/dist/session-sync.js +52 -10
- package/dist/session-titler.d.ts +7 -6
- package/dist/session-titler.js +8 -13
- package/dist/session-watch.d.ts +3 -3
- package/dist/session-watch.js +4 -4
- package/dist/sighup-idle.d.ts +2 -2
- package/dist/spec-fields.d.ts +4 -4
- package/dist/sql-engine-posture.d.ts +3 -3
- package/dist/store-posture.d.ts +2 -2
- package/dist/stored-request-tool-axes-m19.d.ts +1 -1
- package/dist/task-a2a.d.ts +3 -1
- package/dist/task-a2a.js +34 -2
- package/dist/task-cwd.d.ts +7 -88
- package/dist/task-cwd.js +2 -15
- package/dist/task-mcp.d.ts +12 -8
- package/dist/task-mcp.js +19 -4
- package/dist/task-settings.d.ts +30 -18
- package/dist/task-settings.js +33 -3
- package/dist/task-workflow.d.ts +0 -24
- package/dist/task-workflow.js +2 -1
- package/dist/terminal.d.ts +5 -5
- package/dist/tighten-only-seats.d.ts +7 -6
- package/dist/tighten-only-seats.js +1 -1
- package/dist/tool-approval.d.ts +143 -197
- package/dist/tool-approval.js +13 -28
- package/dist/tool-rule-names.d.ts +2 -2
- package/dist/trace/core-keyset-guard.d.ts +12 -7
- package/dist/trace/engine-notice-wire.d.ts +5 -5
- package/dist/trace/engine-notice-wire.js +1 -0
- package/dist/trace/exit-seat.d.ts +31 -4
- package/dist/trace/exit-seat.js +41 -63
- package/dist/trace/ledger-events.d.ts +3 -3
- package/dist/trace/ledger-sink.d.ts +1 -1
- package/dist/trace/model-segment.d.ts +3 -3
- package/dist/trace/project.d.ts +47 -45
- package/dist/trace/project.js +33 -1
- package/dist/trace/redact.d.ts +44 -30
- package/dist/trace/redact.js +191 -89
- package/dist/trace/self-minted-wire.d.ts +35 -14
- package/dist/trace/self-minted-wire.js +8 -0
- package/dist/trace/sema-provenance.d.ts +1 -1
- package/dist/trace/task-notification-facets.d.ts +4 -4
- package/dist/trace/wire-projection-faces.d.ts +3 -3
- package/dist/trace/wire-projection-faces.js +1 -1
- package/dist/unattended-permission-mode.d.ts +5 -5
- package/dist/url-credential.d.ts +52 -0
- package/dist/url-credential.js +49 -0
- package/dist/url-refusal.d.ts +6 -2
- package/dist/url-refusal.js +8 -1
- package/dist/usage-analytics.d.ts +2 -2
- package/dist/user-input-ledger.d.ts +23 -23
- package/dist/web-admin-client/apply-effective.d.ts +5 -5
- package/dist/web-admin-client/apply-effective.js +2 -1
- package/dist/web-admin-client/apply-ledger.d.ts +2 -2
- package/dist/web-admin-client/center-request.d.ts +2 -2
- package/dist/web-admin-client/facade.d.ts +5 -5
- package/dist/web-admin-client/facade.js +1 -1
- package/dist/web-admin-client/hot-keys-registry.d.ts +2 -2
- package/dist/web-admin-client/http-client.d.ts +4 -4
- package/dist/web-admin-client/mcp-revocation.d.ts +1 -1
- package/dist/web-admin-client/pull-state.d.ts +1 -1
- package/dist/web-admin-client/read-face.d.ts +2 -2
- package/dist/web-admin-client/read-warnings.d.ts +5 -5
- package/dist/web-admin-client/restart-signal.d.ts +6 -6
- package/dist/web-admin-client/skills-mcp.d.ts +28 -3
- package/dist/web-admin-client/skills-mcp.js +29 -1
- package/dist/web-admin-client/types.d.ts +16 -9
- package/dist/workspace-space.d.ts +5 -3
- package/dist/write-protection.d.ts +2 -2
- package/package.json +4 -3
- package/scripts/drain-check-local.mjs +2 -1
- package/scripts/drain-check.mysql.sql +4 -2
- package/scripts/drain-check.pg.sql +4 -2
- package/skills/loop.md +1 -1
- package/dist/http/run-declared-families.d.ts +0 -16
- package/dist/http/run-declared-families.js +0 -12
- package/dist/orchestration/workflow-journal-entry.js +0 -27
|
@@ -10,6 +10,7 @@ import { MAX_SETTINGS_OUTPUT_STYLE_CHARS, MAX_SETTINGS_ENV_VARS, MAX_SETTINGS_EN
|
|
|
10
10
|
import { readWritableSessionPermissionRules } from "../../session-policy-wire.js";
|
|
11
11
|
import { sendJson, sendError, sendSessionError, sendSessionPolicyError, sseHeaders, httpErrorBody } from "../send.js";
|
|
12
12
|
import { fleetViewOf, gatedPrincipal, explicitOperatorOk, sessionCallerOf, sessionOwnerReadable, sendPrincipalRefusal, sendUnauthorized } from "../principal-gate.js";
|
|
13
|
+
import { headReadOf, sessionFaceOfHead } from "../../session-incarnation.js";
|
|
13
14
|
import { runRowReadableOnSessionFace } from "../owner-access.js";
|
|
14
15
|
import { assertNever, SESSION_NOT_FOUND_MESSAGE } from "../route-ctx.js";
|
|
15
16
|
import * as facts from "../../capability-facts.js";
|
|
@@ -73,9 +74,9 @@ export async function handleSessions(req, res, match, ctx) {
|
|
|
73
74
|
const { deps } = ctx;
|
|
74
75
|
const { readJson, safeDecode, sessionOwnerOk } = ctx.helpers;
|
|
75
76
|
const readOwnedSessionView = async (sessionAudit, sessionId, readOpts) => {
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
-
const owner = await
|
|
77
|
+
const headOf = headReadOf(deps.sessionStorage);
|
|
78
|
+
if (headOf !== undefined) {
|
|
79
|
+
const owner = (await headOf(sessionId))?.owner;
|
|
79
80
|
if (owner === undefined) {
|
|
80
81
|
sendError(res, 404, "not_found.session", SESSION_NOT_FOUND_MESSAGE);
|
|
81
82
|
return undefined;
|
|
@@ -88,7 +89,7 @@ export async function handleSessions(req, res, match, ctx) {
|
|
|
88
89
|
audit = await sessionAudit(sessionId, readOpts);
|
|
89
90
|
}
|
|
90
91
|
catch (e) {
|
|
91
|
-
if (
|
|
92
|
+
if (headOf !== undefined)
|
|
92
93
|
throw e;
|
|
93
94
|
throw new Error(`session view read failed before ownership could be established: ${e instanceof Error ? e.message : String(e)}`, { cause: e });
|
|
94
95
|
}
|
|
@@ -168,9 +169,11 @@ export async function handleSessions(req, res, match, ctx) {
|
|
|
168
169
|
if (mcpStatusCache.size > 1024)
|
|
169
170
|
mcpStatusCache.clear();
|
|
170
171
|
const panel = (async () => {
|
|
171
|
-
const
|
|
172
|
+
const stopDial = new AbortController();
|
|
173
|
+
const matP = materializeMcpTools(specs, principal, undefined, undefined, undefined, deps.mcpRevocations, undefined, undefined, undefined, stopDial.signal);
|
|
172
174
|
const mat = await raceDeadline(matP, MCP_DIAL_DEADLINE_MS).catch(() => null);
|
|
173
175
|
if (!mat) {
|
|
176
|
+
stopDial.abort();
|
|
174
177
|
void matP.then((m) => m?.dispose().catch(() => undefined)).catch(() => undefined);
|
|
175
178
|
return { servers: [], asOf: new Date().toISOString(), degraded: true };
|
|
176
179
|
}
|
|
@@ -187,7 +190,7 @@ export async function handleSessions(req, res, match, ctx) {
|
|
|
187
190
|
};
|
|
188
191
|
}
|
|
189
192
|
finally {
|
|
190
|
-
|
|
193
|
+
void mat.dispose().catch(() => undefined);
|
|
191
194
|
}
|
|
192
195
|
})();
|
|
193
196
|
mcpStatusCache.set(cacheKey, { at: Date.now(), panel });
|
|
@@ -252,9 +255,8 @@ export async function handleSessions(req, res, match, ctx) {
|
|
|
252
255
|
}
|
|
253
256
|
{
|
|
254
257
|
if (match.decl.id === "session-head") {
|
|
255
|
-
const
|
|
256
|
-
|
|
257
|
-
if (!getLeafId || !ownerOf) {
|
|
258
|
+
const headOf = headReadOf(deps.sessionStorage);
|
|
259
|
+
if (!headOf) {
|
|
258
260
|
sendError(res, 501, "capability.session_store_required", "session head probe requires a durable session store (DB_BACKEND=mysql|pg|local)");
|
|
259
261
|
return;
|
|
260
262
|
}
|
|
@@ -263,30 +265,14 @@ export async function handleSessions(req, res, match, ctx) {
|
|
|
263
265
|
sendError(res, 400, "request.path_malformed", "session id segment is not valid percent-encoding");
|
|
264
266
|
return;
|
|
265
267
|
}
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
const head = await getHead(headSession);
|
|
271
|
-
if (head === undefined) {
|
|
272
|
-
sendError(res, 404, "not_found.session", SESSION_NOT_FOUND_MESSAGE);
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
owner = head.owner;
|
|
276
|
-
if (!sessionOwnerOk(req, res, await sessionOwnerCellOf(deps.sessionStorage, headSession, owner ?? null)))
|
|
277
|
-
return;
|
|
278
|
-
leafId = head.leafId;
|
|
279
|
-
}
|
|
280
|
-
else {
|
|
281
|
-
owner = await ownerOf(headSession);
|
|
282
|
-
if (owner === undefined) {
|
|
283
|
-
sendError(res, 404, "not_found.session", SESSION_NOT_FOUND_MESSAGE);
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
286
|
-
if (!sessionOwnerOk(req, res, await sessionOwnerCellOf(deps.sessionStorage, headSession, owner ?? null)))
|
|
287
|
-
return;
|
|
288
|
-
leafId = await getLeafId(headSession);
|
|
268
|
+
const head = await headOf(headSession);
|
|
269
|
+
if (head === undefined) {
|
|
270
|
+
sendError(res, 404, "not_found.session", SESSION_NOT_FOUND_MESSAGE);
|
|
271
|
+
return;
|
|
289
272
|
}
|
|
273
|
+
if (!sessionOwnerOk(req, res, await sessionOwnerCellOf(deps.sessionStorage, headSession, head.owner)))
|
|
274
|
+
return;
|
|
275
|
+
const leafId = head.leafId;
|
|
290
276
|
const etag = `"${leafId ?? "empty"}"`;
|
|
291
277
|
if (req.headers["if-none-match"] === etag) {
|
|
292
278
|
res.writeHead(304, { etag }).end();
|
|
@@ -304,7 +290,7 @@ export async function handleSessions(req, res, match, ctx) {
|
|
|
304
290
|
sendError(res, 501, "capability.session_store_required", "session events require a durable session store (DB_BACKEND=mysql|pg|local)");
|
|
305
291
|
return;
|
|
306
292
|
}
|
|
307
|
-
const
|
|
293
|
+
const readOwner = async (id) => (await evFact.sessionStorage.headOf(id))?.owner;
|
|
308
294
|
const watch = evFact.watch;
|
|
309
295
|
const evSession = safeDecode(match.params.sessionId);
|
|
310
296
|
if (evSession === null) {
|
|
@@ -340,7 +326,7 @@ export async function handleSessions(req, res, match, ctx) {
|
|
|
340
326
|
return;
|
|
341
327
|
}
|
|
342
328
|
sse.sseOwnerLookups++;
|
|
343
|
-
const cellP =
|
|
329
|
+
const cellP = readOwner(evSession).then((o) => (o === undefined ? undefined : sessionOwnerCellOf(evFact.sessionStorage, evSession, o)));
|
|
344
330
|
void cellP.catch(() => undefined).then(() => { sse.sseOwnerLookups--; });
|
|
345
331
|
let stallTimer;
|
|
346
332
|
let cell;
|
|
@@ -470,7 +456,7 @@ export async function handleSessions(req, res, match, ctx) {
|
|
|
470
456
|
}
|
|
471
457
|
ownerCheckPending = true;
|
|
472
458
|
ownerCheckStartedAt = Date.now();
|
|
473
|
-
void
|
|
459
|
+
void readOwner(evSession).then((o) => {
|
|
474
460
|
ownerCheckPending = false;
|
|
475
461
|
if (!closed && o !== owner)
|
|
476
462
|
onEnd();
|
|
@@ -670,7 +656,7 @@ export async function handleSessions(req, res, match, ctx) {
|
|
|
670
656
|
}
|
|
671
657
|
const store = rowFact.sessionStorage;
|
|
672
658
|
const sessionId = match.params.sessionId;
|
|
673
|
-
const face = await store.
|
|
659
|
+
const face = sessionFaceOfHead(sessionId, await store.headOf(sessionId));
|
|
674
660
|
if (face === undefined) {
|
|
675
661
|
sendError(res, 404, "not_found.session", SESSION_NOT_FOUND_MESSAGE);
|
|
676
662
|
return;
|
|
@@ -698,7 +684,7 @@ export async function handleSessions(req, res, match, ctx) {
|
|
|
698
684
|
return;
|
|
699
685
|
}
|
|
700
686
|
const fork = forkFact.sessionStorage.fork.bind(forkFact.sessionStorage);
|
|
701
|
-
const
|
|
687
|
+
const readOwner = async (id) => (await forkFact.sessionStorage.headOf(id))?.owner;
|
|
702
688
|
const scope = fleetViewOf(req, deps, "write");
|
|
703
689
|
if (!scope.fleetWide && scope.gateOwner === null) {
|
|
704
690
|
sendUnauthorized(res, "identity");
|
|
@@ -709,12 +695,12 @@ export async function handleSessions(req, res, match, ctx) {
|
|
|
709
695
|
sendError(res, 400, "request.id_invalid", "invalid session id (must be a canonical uuid)");
|
|
710
696
|
return;
|
|
711
697
|
}
|
|
712
|
-
const owner = await
|
|
698
|
+
const owner = await readOwner(sourceId);
|
|
713
699
|
if (owner === undefined) {
|
|
714
700
|
sendError(res, 404, "not_found.session", SESSION_NOT_FOUND_MESSAGE);
|
|
715
701
|
return;
|
|
716
702
|
}
|
|
717
|
-
if (!scope.fleetWide && owner !== scope.gateOwner && !legacyUnownedSessionOk(deps.config
|
|
703
|
+
if (!scope.fleetWide && owner !== scope.gateOwner && !legacyUnownedSessionOk(deps.config, sessionCallerOf(req, deps), await sessionOwnerCellOf(forkFact.sessionStorage, sourceId, owner))) {
|
|
718
704
|
sendError(res, 404, "not_found.session", SESSION_NOT_FOUND_MESSAGE);
|
|
719
705
|
return;
|
|
720
706
|
}
|
|
@@ -736,7 +722,7 @@ export async function handleSessions(req, res, match, ctx) {
|
|
|
736
722
|
return;
|
|
737
723
|
}
|
|
738
724
|
const purge = deleteFact.purge;
|
|
739
|
-
const
|
|
725
|
+
const readOwner = async (id) => (await deleteFact.sessionStorage.headOf(id))?.owner;
|
|
740
726
|
const scope = fleetViewOf(req, deps, "write");
|
|
741
727
|
if (!scope.fleetWide && scope.gateOwner === null) {
|
|
742
728
|
sendUnauthorized(res, "identity");
|
|
@@ -747,12 +733,12 @@ export async function handleSessions(req, res, match, ctx) {
|
|
|
747
733
|
sendError(res, 400, "request.id_invalid", "invalid session id (must be a canonical uuid)");
|
|
748
734
|
return;
|
|
749
735
|
}
|
|
750
|
-
const owner = await
|
|
736
|
+
const owner = await readOwner(sessionId);
|
|
751
737
|
if (owner === undefined) {
|
|
752
738
|
sendJson(res, 200, { deleted: false });
|
|
753
739
|
return;
|
|
754
740
|
}
|
|
755
|
-
if (!scope.fleetWide && owner !== scope.gateOwner && !legacyUnownedSessionOk(deps.config
|
|
741
|
+
if (!scope.fleetWide && owner !== scope.gateOwner && !legacyUnownedSessionOk(deps.config, sessionCallerOf(req, deps), await sessionOwnerCellOf(deleteFact.sessionStorage, sessionId, owner))) {
|
|
756
742
|
sendJson(res, 200, { deleted: false });
|
|
757
743
|
return;
|
|
758
744
|
}
|
|
@@ -782,7 +768,7 @@ export async function handleSessions(req, res, match, ctx) {
|
|
|
782
768
|
return;
|
|
783
769
|
}
|
|
784
770
|
const store = policyFact.policyStore;
|
|
785
|
-
const
|
|
771
|
+
const readOwner = async (id) => (await policyFact.sessionStorage.headOf(id))?.owner;
|
|
786
772
|
const principal = gatedPrincipal(req, deps.config);
|
|
787
773
|
if (deps.config.requirePrincipal && principal === undefined) {
|
|
788
774
|
sendUnauthorized(res, "identity");
|
|
@@ -793,7 +779,7 @@ export async function handleSessions(req, res, match, ctx) {
|
|
|
793
779
|
sendError(res, 400, "request.id_invalid", "invalid session id (must be a canonical uuid)");
|
|
794
780
|
return;
|
|
795
781
|
}
|
|
796
|
-
const owner = await
|
|
782
|
+
const owner = await readOwner(sessionId);
|
|
797
783
|
if (owner === undefined) {
|
|
798
784
|
sendError(res, 404, "not_found.session", SESSION_NOT_FOUND_MESSAGE);
|
|
799
785
|
return;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* · `runSyncSubmitLeg` —— 同步腿(原 128 行匿名体);
|
|
13
13
|
* · 同步腿内 `verifyLeg` / `cascadeLeg` / `plainLeg` —— 三条模型驱动腿,判别顺序与短路语义逐字不变。
|
|
14
14
|
* 提名**只改名字不改行为**:闭包捕获的自由变量、语句顺序、settle/registry 生命周期注释全部随代码原样迁移。
|
|
15
|
-
* (
|
|
15
|
+
* ([ref] 起「这次是不是被 server 中止、为什么」读每腿自己的中止句柄 `RunAbort`,不再有按 taskId 键控的
|
|
16
16
|
* `cancelledViaVerb` 旁表与它「身份守卫内先取后删」的取值时点。)
|
|
17
17
|
*
|
|
18
18
|
* 与 runs 域共用 `ctx.legs.prepareSpec`(读体/校验/建 spec 的同一条前段)。
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* ⚠️ 三块都跑在全局 service-credential 门**之前**(与 /metrics 同款待遇)——只读 traceToken 单凭据的调用方
|
|
8
8
|
* (registry 中继的姿势)在全局门会被 401,挂门后=门内 traceToken 支持成死代码(1.148 a2 实机抓获)。
|
|
9
|
-
*
|
|
9
|
+
* [ref](7.105.0):门前不等于不设防 —— 本域坐在读路谓词段,先过 `dispatch.ts` 的 `readCredentialOk`
|
|
10
10
|
* (部署配了 service 凭据时要「service token / traceToken / 已验 principal」之一),块内这几道门在它之后。
|
|
11
11
|
* 因此本域在 `handle()` 里的位置就是契约的一部分:必须留在鉴权门上方,顺序不可与其他域对调。本域零可变状态。
|
|
12
12
|
*/
|
|
@@ -175,6 +175,9 @@ export declare const WORKFLOW_RUN_DISPOSITIONS: {
|
|
|
175
175
|
readonly id: "forward";
|
|
176
176
|
readonly scope: "forward";
|
|
177
177
|
readonly status: "forward";
|
|
178
|
+
readonly parked: {
|
|
179
|
+
readonly mint: (run: WorkflowRun) => true | undefined;
|
|
180
|
+
};
|
|
178
181
|
readonly name: {
|
|
179
182
|
readonly redact: "redactSecrets";
|
|
180
183
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { persistedPlaneOf } from "../../terminal.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { getWorkflowRun, subscribeWorkflow, deriveAgentDisplayStatus, callKeyOrdinal } from "@sema-agent/core";
|
|
3
|
+
import { getWorkflowRun, subscribeWorkflow, deriveAgentDisplayStatus, callKeyOrdinal, runParkedOf, JOURNAL_INCOMPATIBLE_ERROR_CODE, WorkflowJournalIncompatibleError } from "@sema-agent/core";
|
|
4
4
|
import { redactSteerIn, STEER_IN_MAX_CHARS, STEER_IN_MAX_REQUEST_CHARS } from "../../orchestration/workflow-agent-steer.js";
|
|
5
|
-
import {
|
|
6
|
-
import { decodeJsonColumn } from "../../plugins/sql-json-column.js";
|
|
5
|
+
import { journalEntryOfCell, journalEntryPayload, journalRowPayloadOf } from "../../plugins/workflow-journal-payload.js";
|
|
7
6
|
import { redactSecrets } from "../../trace/redact.js";
|
|
8
7
|
import { createHash } from "node:crypto";
|
|
9
8
|
import { redactHead } from "../../observability/run-terminal.js";
|
|
@@ -72,8 +71,8 @@ export async function handleWorkflows(req, res, match, ctx) {
|
|
|
72
71
|
if (journalStore === undefined)
|
|
73
72
|
throw new Error("workflow-journal reached without the workflowsJournal journal witness");
|
|
74
73
|
const jq = new URLSearchParams(match.search);
|
|
75
|
-
const jLimit = Math.min(50, Math.max(1, Number(jq.get("limit") ?? 20) || 20));
|
|
76
|
-
const jOffset = Math.max(0, Number(jq.get("offset") ?? 0) || 0);
|
|
74
|
+
const jLimit = Math.min(50, Math.max(1, Math.trunc(Number(jq.get("limit") ?? 20)) || 20));
|
|
75
|
+
const jOffset = Math.max(0, Math.trunc(Number(jq.get("offset") ?? 0)) || 0);
|
|
77
76
|
const MAX_ROW_BYTES = 64 * 1024;
|
|
78
77
|
const firstLine = (t) => (t ? redactHead(t.split("\n")[0], 300) : undefined);
|
|
79
78
|
const MAX_RESULT_CHARS = 2000;
|
|
@@ -114,31 +113,34 @@ export async function handleWorkflows(req, res, match, ctx) {
|
|
|
114
113
|
};
|
|
115
114
|
const js = journalStore;
|
|
116
115
|
let projected;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
const { payload, parked } = journalEntryPayload(
|
|
116
|
+
try {
|
|
117
|
+
if (js.loadPage) {
|
|
118
|
+
const page = await js.loadPage(wfId, scope, { offset: jOffset, limit: jLimit, maxResultBytes: MAX_ROW_BYTES });
|
|
119
|
+
projected = page.map((row) => {
|
|
120
|
+
if (row.resultJson === null) {
|
|
121
|
+
return oversizeStub(row.callKey, row.resultBytes);
|
|
122
|
+
}
|
|
123
|
+
const { payload, parked } = journalEntryPayload(journalEntryOfCell(wfId, row.callKey, row.resultJson, `workflow_journal.result for entry ${row.callKey}`));
|
|
125
124
|
return projectEntry(row.callKey, payload, parked);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
const entries = await journalStore.load(wfId, scope);
|
|
129
|
+
projected = entries
|
|
130
|
+
.sort((a, b) => callKeyOrdinal(a.callKey) - callKeyOrdinal(b.callKey))
|
|
131
|
+
.slice(jOffset, jOffset + jLimit)
|
|
132
|
+
.map((en) => {
|
|
133
|
+
const { payload, parked } = journalEntryPayload(en);
|
|
134
|
+
const bytes = Buffer.byteLength(journalRowPayloadOf(en));
|
|
135
|
+
return bytes > MAX_ROW_BYTES ? oversizeStub(en.callKey, bytes) : projectEntry(en.callKey, payload, parked);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
131
138
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
.map((en) => {
|
|
138
|
-
const { payload, parked } = journalEntryPayload(en);
|
|
139
|
-
const bytes = Buffer.byteLength(journalRowPayloadOf(en));
|
|
140
|
-
return bytes > MAX_ROW_BYTES ? oversizeStub(en.callKey, bytes) : projectEntry(en.callKey, payload, parked);
|
|
141
|
-
});
|
|
139
|
+
catch (e) {
|
|
140
|
+
if (!(e instanceof WorkflowJournalIncompatibleError))
|
|
141
|
+
throw e;
|
|
142
|
+
sendError(res, 500, JOURNAL_INCOMPATIBLE_ERROR_CODE, `this run's journal holds a record the engine cannot read (entry #${e.ordinal}): the journal cannot be listed or resumed until that record is repaired from a kept copy — do not delete it (a missing entry makes a resume run that step again)`, { ordinal: e.ordinal });
|
|
143
|
+
return;
|
|
142
144
|
}
|
|
143
145
|
sendJson(res, 200, { runId: wfId, entries: projected, ...(projected.length === jLimit ? { nextOffset: jOffset + jLimit } : {}) });
|
|
144
146
|
return;
|
|
@@ -366,6 +368,7 @@ export const WORKFLOW_RUN_DISPOSITIONS = {
|
|
|
366
368
|
id: "forward",
|
|
367
369
|
scope: "forward",
|
|
368
370
|
status: "forward",
|
|
371
|
+
parked: { mint: (run) => (runParkedOf({ status: run.status, agents: [...rowsOf(run.agents)] }) ? true : undefined) },
|
|
369
372
|
name: { redact: "redactSecrets" },
|
|
370
373
|
description: { redact: "redactSecrets" },
|
|
371
374
|
stats: { nested: WORKFLOW_RUN_STATS_DISPOSITIONS },
|
package/dist/http/send.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export declare const SSE_MAX_STREAM_MS: number;
|
|
|
51
51
|
*/
|
|
52
52
|
export declare const SSE_HEARTBEAT_IDLE_MS = 15000;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* [ref] —— 服务端**主动**收一条已开的 SSE 流:一帧 `event: error`(帧形与流帽那一帧同一套 `{type:"error", errorCode, message}`,
|
|
55
55
|
* 消费端按既有「服务端收流 ⇒ 重连」协议处置,SDK 的流读口把它当一帧事件交出再重连)后 `end()`。
|
|
56
56
|
*
|
|
57
57
|
* 收流的是分派器,不是流自己的泵:泵此刻可能正停在一次 await 上,醒来还会写一帧。Node 上 `end()` 之后、`close` 之前的那一写会发一个
|
|
@@ -102,25 +102,25 @@ export declare function httpErrorBody(e: HttpError): RefusalBody;
|
|
|
102
102
|
/** 整面拒:状态 = `e.status`,体 = {@link httpErrorBody}。手里拿着一只 `HttpError` 的路由站点一律调它。 */
|
|
103
103
|
export declare function sendHttpError(res: ServerResponse, e: HttpError): void;
|
|
104
104
|
/**
|
|
105
|
-
* 🔴 B1 /
|
|
105
|
+
* 🔴 B1 / [ref] —— `SessionPolicyError` → 应答,经 {@link sessionPolicyErrorHttp} 那**一只**映射
|
|
106
106
|
* (`src/session-policy-wire.ts`)。回 `true` = 已应答,调用点 `return`。
|
|
107
107
|
*
|
|
108
108
|
* 为什么是一只共享腿而不是每个站点一句 `instanceof`:映射本身早就收成一处了,而**咨询它的站点**只有两条
|
|
109
109
|
* **写**腿 —— 偏偏 core 7.25.0 那个新词 `corrupt` 是在**读**上抛出来的(店读不出它自己写的那一行:
|
|
110
|
-
*
|
|
110
|
+
* [ref] 的两道读回拒 + C1 的体形拒)。于是 `GET /v1/sessions/:id/policy` 与 2c 的 manifest 导出腿把它交给了
|
|
111
111
|
* 域外通用臂 ⇒ `500 internal.error "internal error"`:码丢,连带**修复路径**也丢(同一行 `PUT` 却答
|
|
112
112
|
* `500 corrupt` 并点名那一列)。一只腿之后,新站点只会忘记调它,不会再各自发明一份映射。
|
|
113
113
|
*/
|
|
114
114
|
export declare function sendSessionPolicyError(res: ServerResponse, e: unknown, sentencePrefix?: string): boolean;
|
|
115
115
|
/**
|
|
116
|
-
*
|
|
116
|
+
* [ref] —— core `SessionError` → 应答,经 {@link sessionErrorHttp} 那**一只**映射(`src/session-error-wire.ts`)。
|
|
117
117
|
* 回 `true` = 已应答,调用点 `return`;`false` = 不是 `SessionError`,或这个词在这一面上是登记过的留白(站点的既有
|
|
118
118
|
* 处置照旧 —— 通常是继续上抛到全局兜底)。
|
|
119
119
|
*
|
|
120
120
|
* 句子:属主给了固定句就发它(import 面 `invalid_session` / `placement_refused` 两句),否则发 core 的原句过既有脱敏(`redactErrorMessage`:
|
|
121
121
|
* 不抛、有上限)。core 的 `corrupt_session` 原句只点名会话 id 与跳过计数(「Session <id> is unreadable: its log has no
|
|
122
122
|
* meta header (N of M records skipped as corrupt)」),SQL 两店的原句点名 `<表>.<列>` 与行号 —— 两者都不含盘上路径
|
|
123
|
-
* (路径只进运维面:`server.session-repo.corrupt-record-skipped` 的探针行,
|
|
123
|
+
* (路径只进运维面:`server.session-repo.corrupt-record-skipped` 的探针行,[ref];SQL 两店走各自的拒绝句)。
|
|
124
124
|
*/
|
|
125
125
|
export declare function sendSessionError(res: ServerResponse, e: unknown, face: SessionErrorFace): boolean;
|
|
126
126
|
export declare function msg(e: unknown): string;
|