@sema-agent/server 7.148.0 → 7.150.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 +551 -9
- package/README.md +17 -2
- package/README.zh-CN.md +5 -1
- package/USAGE.md +126 -68
- package/dist/adoption/wire.d.ts +3 -3
- package/dist/approval-card.d.ts +33 -33
- package/dist/approval-gate-currency.d.ts +1 -1
- package/dist/approval-leg-origin.d.ts +33 -0
- package/dist/approval-leg-origin.js +4 -0
- package/dist/audit.d.ts +1 -1
- package/dist/audit.js +2 -2
- package/dist/auth-bridge.d.ts +9 -1
- package/dist/auth-bridge.js +4 -4
- package/dist/auth-keys.d.ts +10 -1
- package/dist/auth-keys.js +8 -0
- package/dist/background-session-reap.d.ts +1 -1
- package/dist/boot/deferred-sandbox-path-env.d.ts +5 -3
- package/dist/boot/deferred-sandbox-path-env.js +1 -2
- package/dist/boot/execution-env.js +10 -11
- package/dist/boot/execution-lane.d.ts +6 -4
- package/dist/boot/execution-lane.js +3 -1
- package/dist/boot/org-delivery.d.ts +3 -2
- package/dist/boot/parked-revive-gate.d.ts +5 -5
- package/dist/boot/parked-revive-gate.js +2 -3
- package/dist/boot/resolve-spec.d.ts +4 -5
- package/dist/boot/resolve-spec.js +66 -28
- package/dist/boot/retention-lane.d.ts +1 -1
- package/dist/boot/runner-deps.js +3 -1
- package/dist/boot/session-faces.js +21 -21
- package/dist/boot/stage-01-config.d.ts +1 -0
- package/dist/boot/stage-01-config.js +4 -3
- package/dist/boot/stage-02-web-admin-pull.d.ts +1 -0
- package/dist/boot/stage-02-web-admin-pull.js +10 -2
- package/dist/boot/stage-03-store-backend.d.ts +1 -0
- package/dist/boot/stage-03-store-backend.js +4 -4
- package/dist/boot/stage-04-stores.d.ts +1 -0
- package/dist/boot/stage-05-execution-env.d.ts +1 -0
- package/dist/boot/stage-06-runners.d.ts +2 -1
- package/dist/boot/stage-06-runners.js +1 -2
- package/dist/boot/stage-07-capability-layer.d.ts +2 -1
- package/dist/boot/stage-07-capability-layer.js +1 -1
- package/dist/boot/stage-08-reapers.d.ts +2 -1
- package/dist/boot/stage-09-leader.d.ts +2 -1
- package/dist/boot/stage-10-http-server.d.ts +35 -2
- package/dist/boot/stage-10-http-server.js +9 -4
- package/dist/boot/stores.d.ts +3 -0
- package/dist/boot/stores.js +22 -19
- package/dist/boot/web-admin.d.ts +1 -1
- package/dist/capabilities/tool-defer.d.ts +1 -1
- package/dist/capability-facts.d.ts +70 -60
- package/dist/capability-facts.js +45 -49
- package/dist/card-settle-stored-scope.d.ts +56 -0
- package/dist/card-settle-stored-scope.js +27 -0
- package/dist/card-void.d.ts +7 -12
- package/dist/card-void.js +2 -7
- package/dist/config-catalog.d.ts +12 -0
- package/dist/config-catalog.js +37 -33
- package/dist/config-invariants.d.ts +5 -4
- package/dist/config-invariants.js +4 -4
- package/dist/config-types.d.ts +49 -16
- package/dist/config.d.ts +6 -5
- package/dist/config.js +35 -24
- package/dist/context-window-notice.d.ts +31 -0
- package/dist/context-window-notice.js +28 -0
- package/dist/deployment-governance.d.ts +7 -28
- package/dist/deployment-governance.js +1 -14
- package/dist/deployment-shape.d.ts +20 -11
- package/dist/deployment-shape.js +1 -0
- package/dist/device-ws-hub.d.ts +1 -0
- package/dist/device-ws-hub.js +64 -28
- package/dist/device-ws-protocol.d.ts +20 -6
- package/dist/device-ws-protocol.js +9 -2
- package/dist/engine-identity.d.ts +7 -1
- package/dist/engine-identity.js +5 -0
- package/dist/env-name-allowlist-knobs.d.ts +6 -5
- package/dist/env-name-allowlist-knobs.js +5 -0
- package/dist/execution-lane-caps.d.ts +20 -5
- package/dist/execution-lane-caps.js +18 -4
- package/dist/field-conflict.d.ts +2 -2
- package/dist/fleet/engine-signal.d.ts +14 -1
- package/dist/fleet/engine-signal.js +5 -1
- package/dist/fleet/fleet-reconciler.d.ts +1 -1
- package/dist/fleet/serving-lease.d.ts +18 -3
- package/dist/fleet/serving-lease.js +81 -35
- package/dist/fleet-client.d.ts +13 -11
- package/dist/fleet-client.js +53 -33
- package/dist/history-anchor.js +1 -1
- package/dist/hitl-delivery.d.ts +1 -3
- package/dist/hitl-delivery.js +1 -1
- package/dist/hooks/command-spawn.d.ts +7 -2
- package/dist/hooks/command-spawn.js +13 -6
- package/dist/hooks/hook-runner.d.ts +5 -0
- package/dist/hooks/hook-runner.js +11 -7
- package/dist/http/active-run-conflict.d.ts +3 -7
- package/dist/http/active-run-conflict.js +2 -2
- package/dist/http/admission.js +5 -5
- package/dist/http/approval-sweeps.js +5 -3
- package/dist/http/caller-trust.d.ts +2 -2
- package/dist/http/caller-trust.js +3 -3
- package/dist/http/checkpoint-ctx.d.ts +18 -63
- package/dist/http/checkpoint-ctx.js +1 -24
- package/dist/http/claim-heartbeat.d.ts +6 -6
- package/dist/http/claim-heartbeat.js +6 -6
- package/dist/http/claimed-run.d.ts +16 -9
- package/dist/http/claimed-run.js +8 -0
- package/dist/http/dispatch.js +7 -5
- package/dist/http/durable-run-leg.d.ts +8 -1
- package/dist/http/durable-run-leg.js +34 -15
- package/dist/http/execution-context.d.ts +115 -14
- package/dist/http/execution-context.js +130 -40
- package/dist/http/owner-access.d.ts +246 -21
- package/dist/http/owner-access.js +186 -8
- package/dist/http/principal-gate.d.ts +18 -11
- package/dist/http/principal-gate.js +3 -1
- package/dist/http/readiness.d.ts +4 -2
- package/dist/http/resume-ctx-read.d.ts +14 -3
- package/dist/http/resume-ctx-read.js +24 -3
- package/dist/http/resume-legs.d.ts +35 -3
- package/dist/http/resume-legs.js +262 -106
- package/dist/http/route-ctx.d.ts +29 -11
- package/dist/http/routes/a2a-serve.js +17 -14
- package/dist/http/routes/approvals-assistant.d.ts +3 -2
- package/dist/http/routes/approvals-assistant.js +11 -11
- package/dist/http/routes/capabilities.js +5 -4
- package/dist/http/routes/config-catalog.d.ts +1 -1
- package/dist/http/routes/diagnostics.d.ts +3 -1
- package/dist/http/routes/diagnostics.js +30 -5
- package/dist/http/routes/mcp-reconnect.js +2 -2
- package/dist/http/routes/memory-origin.d.ts +1 -1
- package/dist/http/routes/notify-wake.js +2 -3
- package/dist/http/routes/principal-inbox.d.ts +3 -1
- package/dist/http/routes/principal-inbox.js +3 -2
- package/dist/http/routes/projects.d.ts +1 -0
- package/dist/http/routes/projects.js +5 -3
- package/dist/http/routes/retention-ops.d.ts +1 -1
- package/dist/http/routes/run-permission-mode.d.ts +1 -1
- package/dist/http/routes/run-permission-mode.js +2 -2
- package/dist/http/routes/runs.d.ts +1 -1
- package/dist/http/routes/runs.js +33 -37
- package/dist/http/routes/session-memory-sync.js +4 -5
- package/dist/http/routes/session-sync.d.ts +24 -5
- package/dist/http/routes/session-sync.js +45 -37
- package/dist/http/routes/sessions-list.d.ts +1 -1
- package/dist/http/routes/sessions.d.ts +1 -1
- package/dist/http/routes/sessions.js +18 -44
- package/dist/http/routes/tasks.js +136 -101
- package/dist/http/routes/trace-usage.js +14 -14
- package/dist/http/routes/workflows.d.ts +1 -0
- package/dist/http/routes/workflows.js +20 -38
- package/dist/http/server.d.ts +12 -9
- package/dist/http/server.js +35 -6
- package/dist/http/stored-body-replay.d.ts +3 -24
- package/dist/http/stored-body-replay.js +2 -12
- package/dist/http/submit-ctx.d.ts +2 -2
- package/dist/http/submit-ctx.js +5 -5
- package/dist/http/submit-replay.d.ts +15 -2
- package/dist/http/submit-replay.js +10 -4
- package/dist/http/wire-types.d.ts +6 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -0
- package/dist/leader/endpoint.js +9 -8
- package/dist/leg-facts.d.ts +13 -2
- package/dist/leg-facts.js +2 -0
- package/dist/local-store-declaration.d.ts +54 -0
- package/dist/local-store-declaration.js +59 -0
- package/dist/mcp-assertion-header.d.ts +1 -1
- package/dist/mcp-assertion-header.js +1 -1
- package/dist/mcp-authorization-face.d.ts +18 -14
- package/dist/mcp-authorization-face.js +3 -2
- package/dist/memory-project-layer.js +1 -1
- package/dist/memory-scope.d.ts +4 -4
- package/dist/memory-scope.js +4 -4
- package/dist/memory-store-refusal.d.ts +1 -1
- package/dist/memory-sync-client.js +2 -2
- package/dist/model-context-window.d.ts +50 -11
- package/dist/model-context-window.js +20 -1
- package/dist/model-entry-refusal.d.ts +5 -4
- package/dist/model-entry-refusal.js +17 -3
- package/dist/model-reach-scope.d.ts +2 -1
- package/dist/observability/corrupt-read-seat.d.ts +1 -1
- package/dist/observability/fail-open.d.ts +19 -7
- package/dist/observability/fail-open.js +19 -7
- package/dist/observability/logger.d.ts +7 -0
- package/dist/observability/logger.js +3 -1
- package/dist/observability/metrics.js +1 -1
- package/dist/observability/run-terminal.d.ts +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/org-delivery-gate.d.ts +31 -6
- package/dist/org-delivery-gate.js +7 -4
- package/dist/owner-faces.d.ts +30 -5
- package/dist/owner-faces.js +2 -0
- package/dist/park-row-commit.d.ts +67 -0
- package/dist/park-row-commit.js +76 -0
- package/dist/parked-decide.d.ts +9 -7
- package/dist/parked-decide.js +25 -6
- package/dist/peer-directory.d.ts +1 -1
- package/dist/peer-seat.d.ts +1 -1
- package/dist/peer-seat.js +52 -59
- package/dist/plugins/adoption-log-sql.d.ts +3 -3
- package/dist/plugins/adoption-log-sql.js +19 -19
- package/dist/plugins/approval-ask-store-sql.d.ts +1 -1
- package/dist/plugins/approval-ask-store-sql.js +3 -5
- package/dist/plugins/approval-exemption-skill-cutoff.d.ts +64 -0
- package/dist/plugins/approval-exemption-skill-cutoff.js +122 -0
- package/dist/plugins/approval-exemption-skill-m46.d.ts +0 -6
- package/dist/plugins/approval-exemption-skill-m46.js +6 -10
- package/dist/plugins/approval-exemption-store.d.ts +26 -1
- package/dist/plugins/approval-exemption-store.js +28 -19
- package/dist/plugins/ensure-schema-lock-policy.d.ts +36 -3
- package/dist/plugins/ensure-schema-lock-policy.js +75 -9
- package/dist/plugins/exec-path-law.d.ts +34 -0
- package/dist/plugins/exec-path-law.js +13 -0
- package/dist/plugins/file-run-store.d.ts +22 -9
- package/dist/plugins/file-run-store.js +51 -23
- package/dist/plugins/local-checkpoint-store.d.ts +8 -1
- package/dist/plugins/local-checkpoint-store.js +5 -1
- package/dist/plugins/local-data-root-admission.d.ts +52 -0
- package/dist/plugins/local-data-root-admission.js +100 -0
- package/dist/plugins/local-engine-high-water.d.ts +28 -7
- package/dist/plugins/local-engine-high-water.js +27 -22
- package/dist/plugins/local-session-store.d.ts +134 -49
- package/dist/plugins/local-session-store.js +149 -108
- package/dist/plugins/memory-run-store.d.ts +14 -9
- package/dist/plugins/memory-run-store.js +48 -22
- package/dist/plugins/one-time-migration-marker.d.ts +19 -3
- package/dist/plugins/one-time-migration-marker.js +7 -1
- package/dist/plugins/one-time-migrations.d.ts +110 -59
- package/dist/plugins/one-time-migrations.js +224 -136
- package/dist/plugins/org-delivery-quota-store.d.ts +34 -11
- package/dist/plugins/org-delivery-quota-store.js +29 -14
- package/dist/plugins/permission-rule-store-sql.d.ts +1 -1
- package/dist/plugins/permission-rule-store-sql.js +5 -9
- package/dist/plugins/pg-pool.d.ts +1 -1
- package/dist/plugins/pg-pool.js +14 -12
- package/dist/plugins/posix-shell-fs.js +4 -2
- package/dist/plugins/remote-env-adb.js +3 -2
- package/dist/plugins/remote-env-device.d.ts +3 -2
- package/dist/plugins/remote-env-device.js +8 -6
- package/dist/plugins/remote-env-e2b.d.ts +4 -8
- package/dist/plugins/remote-env-e2b.js +21 -15
- package/dist/plugins/remote-env-host.d.ts +51 -10
- package/dist/plugins/remote-env-host.js +97 -31
- package/dist/plugins/remote-env-k8s.js +7 -4
- package/dist/plugins/remote-env-local-docker.d.ts +6 -3
- package/dist/plugins/remote-env-local-docker.js +11 -25
- package/dist/plugins/remote-env-ssh.js +4 -3
- package/dist/plugins/remote-shell.d.ts +3 -1
- package/dist/plugins/remote-shell.js +3 -3
- package/dist/plugins/replica-registration.d.ts +35 -0
- package/dist/plugins/replica-registration.js +48 -0
- package/dist/plugins/retention-lane-store-sql.d.ts +1 -1
- package/dist/plugins/run-store-sql.d.ts +27 -8
- package/dist/plugins/run-store-sql.js +46 -18
- package/dist/plugins/scenario-prefix-switch-m42.d.ts +8 -12
- package/dist/plugins/scenario-prefix-switch-m42.js +9 -6
- package/dist/plugins/schema-consistency.d.ts +91 -5
- package/dist/plugins/schema-consistency.js +189 -7
- package/dist/plugins/schema-drift-sentence.d.ts +6 -5
- package/dist/plugins/schema-drift-sentence.js +13 -5
- package/dist/plugins/serving-requirement.d.ts +49 -0
- package/dist/plugins/serving-requirement.js +53 -0
- package/dist/plugins/session-placement.d.ts +5 -4
- package/dist/plugins/shell-sentinel-owner-m48.d.ts +22 -0
- package/dist/plugins/shell-sentinel-owner-m48.js +6 -0
- package/dist/plugins/stop-then-start-sentence.d.ts +55 -0
- package/dist/plugins/stop-then-start-sentence.js +51 -0
- package/dist/plugins/store-backend.d.ts +23 -9
- package/dist/plugins/store-backend.js +58 -24
- package/dist/plugins/store-contracts.d.ts +45 -5
- package/dist/plugins/store-contracts.js +19 -0
- package/dist/plugins/tidb-pool.d.ts +11 -6
- package/dist/plugins/tidb-pool.js +22 -12
- package/dist/plugins/workspace-custody.d.ts +44 -0
- package/dist/plugins/workspace-custody.js +47 -0
- package/dist/process-instance.d.ts +3 -0
- package/dist/process-instance.js +7 -0
- package/dist/project-context.d.ts +66 -0
- package/dist/project-context.js +70 -0
- package/dist/project-identity.d.ts +8 -7
- package/dist/project-identity.js +40 -17
- package/dist/project-layer-key.d.ts +13 -2
- package/dist/project-layer-key.js +9 -1
- package/dist/question.d.ts +9 -21
- package/dist/question.js +28 -19
- package/dist/read-deny-floor-notice.d.ts +36 -0
- package/dist/read-deny-floor-notice.js +40 -0
- package/dist/{plain-string-record.d.ts → request-declaration-disposition.d.ts} +9 -23
- package/dist/request-declaration-disposition.js +39 -0
- package/dist/run-cancel-card.d.ts +28 -0
- package/dist/run-cancel-card.js +20 -0
- package/dist/run-cancel-context.d.ts +10 -0
- package/dist/run-cancel-context.js +1 -0
- package/dist/run-local.js +28 -13
- package/dist/runs.d.ts +31 -7
- package/dist/runs.js +34 -16
- package/dist/security.d.ts +3 -3
- package/dist/server-secret-env.d.ts +34 -20
- package/dist/server-secret-env.js +61 -18
- package/dist/session-agent.d.ts +4 -12
- package/dist/session-agent.js +0 -6
- package/dist/session-children-retire.d.ts +6 -3
- package/dist/session-children-retire.js +2 -5
- package/dist/session-incarnation.d.ts +18 -4
- package/dist/session-incarnation.js +4 -1
- package/dist/session-notify-door.d.ts +4 -4
- package/dist/session-notify-door.js +5 -6
- package/dist/session-rules-seat.d.ts +4 -3
- package/dist/session-rules-seat.js +3 -11
- package/dist/session-sync.js +3 -3
- package/dist/session-workspace.d.ts +3 -3
- package/dist/store-admission.d.ts +33 -0
- package/dist/store-admission.js +49 -0
- package/dist/store-posture.d.ts +5 -0
- package/dist/store-posture.js +18 -1
- package/dist/stores-sql/checkpoint-store-sql.d.ts +22 -3
- package/dist/stores-sql/checkpoint-store-sql.js +109 -23
- package/dist/stores-sql/file-history-store-sql.d.ts +1 -1
- package/dist/stores-sql/file-history-store-sql.js +3 -5
- package/dist/stores-sql/retention-store-sql.d.ts +1 -1
- package/dist/stores-sql/tool-result-store-sql.d.ts +1 -1
- package/dist/stores-sql/tool-result-store-sql.js +4 -6
- package/dist/task-a2a.d.ts +3 -8
- package/dist/task-a2a.js +25 -27
- package/dist/task-cwd.d.ts +27 -10
- package/dist/task-cwd.js +3 -0
- package/dist/task-mcp.d.ts +3 -3
- package/dist/task-mcp.js +1 -1
- package/dist/task-settings.d.ts +13 -0
- package/dist/task-settings.js +14 -7
- package/dist/terminal.d.ts +2 -0
- package/dist/terminal.js +21 -6
- package/dist/tool-approval.d.ts +50 -41
- package/dist/tool-approval.js +96 -73
- package/dist/trace/engine-notice-wire.d.ts +38 -21
- package/dist/trace/engine-notice-wire.js +25 -4
- package/dist/trace/ledger-sink.d.ts +3 -1
- package/dist/trace/project.d.ts +8 -5
- package/dist/trace/project.js +11 -9
- package/dist/trace/projection-table.d.ts +33 -2
- package/dist/trace/redact.d.ts +12 -0
- package/dist/trace/redact.js +5 -1
- package/dist/trace/self-minted-wire.d.ts +268 -56
- package/dist/trace/self-minted-wire.js +110 -40
- package/dist/trace/tool-card.d.ts +3 -0
- package/dist/trace/tool-card.js +24 -0
- package/dist/trace/tool-output-media.d.ts +2 -1
- package/dist/unattended-permission-mode.d.ts +1 -1
- package/dist/web-admin-client/apply-effective.d.ts +1 -1
- package/dist/web-admin-client/apply-effective.js +22 -9
- package/dist/web-admin-client/effective-keys.d.ts +1 -1
- package/dist/web-admin-client/skills-mcp.d.ts +1 -1
- package/docs/DEVICE-EXECUTOR-PROTOCOL.md +57 -29
- package/docs/error-text-lexicon.json +317 -0
- package/package.json +4 -2
- package/scripts/embed-minimal.mjs +183 -0
- package/wire-changes/server@7.149.0.json +372 -0
- package/wire-changes/server@7.150.0.json +335 -0
- package/dist/plain-string-record.js +0 -70
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { persistedPlaneOf } from "../../terminal.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import {
|
|
3
|
+
import { 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
5
|
import { journalEntryOfCell, journalEntryPayload, journalRowPayloadOf } from "../../plugins/workflow-journal-payload.js";
|
|
6
6
|
import { redactSecrets } from "../../trace/redact.js";
|
|
@@ -10,30 +10,18 @@ import { projectByTable } from "../../trace/projection-table.js";
|
|
|
10
10
|
const JOURNAL_PROJECTION_MEMO_CAP = 1024;
|
|
11
11
|
const journalProjectionMemo = new Map();
|
|
12
12
|
import { sendJson, sendError, sseHeaders } from "../send.js";
|
|
13
|
-
import {
|
|
13
|
+
import { explicitOperatorOk } from "../principal-gate.js";
|
|
14
14
|
import { partsOf } from "../../owner-brands.js";
|
|
15
|
-
import { taskSpecIdentityOf } from "../../engine-identity.js";
|
|
16
15
|
import { assertNever } from "../route-ctx.js";
|
|
17
|
-
import {
|
|
16
|
+
import { admitWorkflowRun, enter, judgeWorkflowRun, listVisibleWorkflows, refuse } from "../owner-access.js";
|
|
18
17
|
import * as facts from "../../capability-facts.js";
|
|
19
18
|
import { steerBodyKeyIssue } from "../../request-key-closure.js";
|
|
20
|
-
function sendWorkflowAbsent(res) {
|
|
21
|
-
sendError(res, 404, "not_found.workflow", "workflow not found");
|
|
22
|
-
}
|
|
23
|
-
const WORKFLOW_SESSION_ASSERTION = {
|
|
24
|
-
"workflow-detail": { phase: "accept", label: "workflow.detail" },
|
|
25
|
-
"workflow-journal": { phase: "accept", label: "workflow.journal" },
|
|
26
|
-
"workflow-stream": { phase: "accept", label: "workflow.stream" },
|
|
27
|
-
"workflow-agent-steer": { phase: "accept", label: "workflow.agent-steer" },
|
|
28
|
-
};
|
|
29
19
|
export async function handleWorkflows(req, res, match, ctx) {
|
|
30
20
|
const { deps } = ctx;
|
|
31
21
|
{
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
34
|
-
sendPrincipalRefusal(res, req, deps.config);
|
|
22
|
+
const wfEntry = enter(req, res, deps, match.decl.id);
|
|
23
|
+
if (wfEntry === undefined)
|
|
35
24
|
return;
|
|
36
|
-
}
|
|
37
25
|
let journalStore;
|
|
38
26
|
if (match.decl.id === "workflow-journal") {
|
|
39
27
|
const journalFace = facts.workflowsJournal(deps);
|
|
@@ -49,7 +37,6 @@ export async function handleWorkflows(req, res, match, ctx) {
|
|
|
49
37
|
return;
|
|
50
38
|
}
|
|
51
39
|
const runStore = runs.store;
|
|
52
|
-
const scope = taskSpecIdentityOf(subject === undefined ? undefined : partsOf(subject)).principal ?? "default";
|
|
53
40
|
const wfId = match.params.runId;
|
|
54
41
|
const isStream = match.decl.id === "workflow-stream";
|
|
55
42
|
if (match.decl.id === "workflows-list") {
|
|
@@ -57,7 +44,7 @@ export async function handleWorkflows(req, res, match, ctx) {
|
|
|
57
44
|
const statusFilter = q.get("status");
|
|
58
45
|
const limit = Math.min(100, Math.max(1, Number(q.get("limit") ?? 50) || 50));
|
|
59
46
|
const sessionFilter = q.get("session");
|
|
60
|
-
const sessionRuns = await
|
|
47
|
+
const sessionRuns = await listVisibleWorkflows(wfEntry, runStore, {
|
|
61
48
|
...(statusFilter ? { status: statusFilter } : {}),
|
|
62
49
|
limit,
|
|
63
50
|
...(sessionFilter !== null ? { session: sessionFilter } : {}),
|
|
@@ -71,15 +58,11 @@ export async function handleWorkflows(req, res, match, ctx) {
|
|
|
71
58
|
sendJson(res, 200, { workflows: redacted });
|
|
72
59
|
return;
|
|
73
60
|
}
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
sendWorkflowAbsent(res);
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
if (!sessionAsserted(WORKFLOW_SESSION_ASSERTION[match.decl.id], req, run.originatingSessionId, callerOf(req, deps).operator)) {
|
|
80
|
-
sendWorkflowAbsent(res);
|
|
61
|
+
const wfAdmitted = await admitWorkflowRun(wfEntry, res, runStore, wfId);
|
|
62
|
+
if (wfAdmitted === undefined)
|
|
81
63
|
return;
|
|
82
|
-
|
|
64
|
+
const run = wfAdmitted.row;
|
|
65
|
+
const scope = run.scope;
|
|
83
66
|
if (match.decl.id === "workflow-journal") {
|
|
84
67
|
if (journalStore === undefined)
|
|
85
68
|
throw new Error("workflow-journal reached without the workflowsJournal journal witness");
|
|
@@ -182,12 +165,11 @@ export async function handleWorkflowAgentSteer(req, res, match, ctx) {
|
|
|
182
165
|
sendWorkflowsUnavailable(res, runs.why);
|
|
183
166
|
return;
|
|
184
167
|
}
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
if (deps.config.requirePrincipal && principal === undefined) {
|
|
188
|
-
sendPrincipalRefusal(res, req, deps.config);
|
|
168
|
+
const steerEntry = enter(req, res, deps, match.decl.id);
|
|
169
|
+
if (steerEntry === undefined)
|
|
189
170
|
return;
|
|
190
|
-
|
|
171
|
+
const subject = steerEntry.caller.subject;
|
|
172
|
+
const principal = subject === undefined ? undefined : partsOf(subject).person;
|
|
191
173
|
const wfRunId = safeDecode(match.params.runId);
|
|
192
174
|
const label = safeDecode(match.params.label);
|
|
193
175
|
if (wfRunId === null || label === null) {
|
|
@@ -211,14 +193,14 @@ export async function handleWorkflowAgentSteer(req, res, match, ctx) {
|
|
|
211
193
|
return;
|
|
212
194
|
}
|
|
213
195
|
const trusted = explicitOperatorOk(principal, deps.config);
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
sendWorkflowAbsent(res);
|
|
196
|
+
const wfVerdict = await judgeWorkflowRun(steerEntry, runs.store, wfRunId);
|
|
197
|
+
if (wfVerdict === "session_mismatch") {
|
|
198
|
+
refuse(steerEntry, res, "session_mismatch");
|
|
218
199
|
return;
|
|
219
200
|
}
|
|
220
|
-
|
|
221
|
-
|
|
201
|
+
const wfRun = typeof wfVerdict === "object" ? wfVerdict.row : undefined;
|
|
202
|
+
if (!trusted && wfRun === undefined) {
|
|
203
|
+
refuse(steerEntry, res, wfVerdict === "missing" ? "missing" : "not_visible");
|
|
222
204
|
return;
|
|
223
205
|
}
|
|
224
206
|
const sendNotRunningWf = (error) => sendError(res, 409, "steering.not_running", error);
|
package/dist/http/server.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { SideQueryAccounting } from "../budget.js";
|
|
|
4
4
|
import type { SessionPurgeOutcome } from "../session-deletion.js";
|
|
5
5
|
import type { IncomingMessage } from "node:http";
|
|
6
6
|
import { type Runner, type RunnerDeps, type TaskSpec, type TaskResult, type WorkflowRunStore, type MemoryEntry, type MemoryExportBundle, type MemoryImportReport, type SideQuerySpec, type SideQueryResult, type Brain, type EngineNotice } from "@sema-agent/core";
|
|
7
|
+
import type { ProjectContext } from "../project-context.js";
|
|
7
8
|
import type { TaskRequestBody } from "./wire-types.js";
|
|
8
9
|
import type { ServiceConfig } from "../config-types.js";
|
|
9
10
|
import { type SessionMirrorRuling } from "../web-admin-client/facade.js";
|
|
@@ -130,7 +131,9 @@ export interface ServiceCoreDeps {
|
|
|
130
131
|
* 已过期,按新行为改。
|
|
131
132
|
* `opts.unattendedLeg`([ref] 候裁 18,codex r3 F1;[ref] ① 改形):续跑家族在 ctx 带无人值守标(`CheckpointCtx.unattendedLeg`)时递 `true` ——
|
|
132
133
|
* 装配器在**全部折叠之后**经首跑同一只合并口 `withUnattendedLeg` 重挂那条腿(`default` + 按类作答的 onAsk)。只由续跑腿
|
|
133
|
-
* 按服务端写的 ctx 位递,绝不从请求体读。
|
|
134
|
+
* 按服务端写的 ctx 位递,绝不从请求体读。
|
|
135
|
+
* `opts.projectContext`(项目上下文继承):续跑家族把提交腿冻结的那一份(`CheckpointCtx.projectContext`,服务端写)原样递回 —— 装配器在续跑腿上只重放它、不读登记簿;
|
|
136
|
+
* 新提交腿不递(装配器自己在头部判)。同样只由续跑腿按服务端写的 ctx 位递,绝不从请求体读。 */
|
|
134
137
|
/** `opts.execution`(必填):这条腿的执行上下文(`http/execution-context.ts`;只 `fresh` / `continuation` 两形,`root` 恒在)。装配器要用这条腿的根会话
|
|
135
138
|
* (场景设施的分区键、受理见证)读 `opts.execution.root` —— 它与 server 随后盖进 spec 的根是同一个值,装配器自己不写根。 */
|
|
136
139
|
/** `opts.lease`(必填):这条腿的**宿主租约** —— 装配在它之下登记本腿交给引擎的对端声明(`peerDesk.declare(草稿, opts.lease)`)。
|
|
@@ -141,6 +144,7 @@ export interface ServiceCoreDeps {
|
|
|
141
144
|
liveStream?: boolean;
|
|
142
145
|
onNotice?: (notice: EngineNotice) => void;
|
|
143
146
|
unattendedLeg?: true;
|
|
147
|
+
projectContext?: ProjectContext;
|
|
144
148
|
lease: PeerLease;
|
|
145
149
|
execution: ExecutionRoot;
|
|
146
150
|
}) => ResolvedTaskSpec | Promise<ResolvedTaskSpec>;
|
|
@@ -606,7 +610,7 @@ export interface ServiceSeamDeps {
|
|
|
606
610
|
/** [ref] §10.2 —— 跨主体投递门(`createOrgDeliveryGate` 的产物,`boot/stage-06-runners.ts` 装配的唯一实例)。
|
|
607
611
|
* `POST /v1/principal-inbox/messages` 只经它投递;缺席 = 本部署没声明收件箱消费方(`PRINCIPAL_INBOX_ASSISTANT` 未设)⇒
|
|
608
612
|
* 那一口 501、能力位 `principalInboxDelivery` false(同读事实 `principalInboxDelivery`)。 */
|
|
609
|
-
orgDeliveryGate?: import("
|
|
613
|
+
orgDeliveryGate?: import("../org-delivery-gate.js").ServerOrgDeliveryGate;
|
|
610
614
|
/** WEB-SETUP-RECON 附B — org sessionMirror 治理态的 SERVICE 半场 = **观测面(audit),非执法面**。
|
|
611
615
|
* 裁定 (c):「该镜像而未镜像」发生在数据产生端(壳)——本 server 是镜像**目标**,只看得见到达的 push;
|
|
612
616
|
* 没到达的会话对 server 不存在(无客户端会话清单、无心跳契约),required 锁的真执法只能在壳(CC
|
|
@@ -659,10 +663,9 @@ export interface ServiceObservabilityDeps {
|
|
|
659
663
|
* 缺席 = 该道门不存在(不是「默认放行的门」——两者在事故复盘里语义完全不同)。 */
|
|
660
664
|
export interface ServiceGovernanceDeps {
|
|
661
665
|
/** 鉴权桥(registry-core api/auth-bridge):registry 用户 JWT → principal。缺席=分支不存在
|
|
662
|
-
* (bearer 只认 SERVICE_AUTH_TOKEN(S),现状不变)
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
};
|
|
666
|
+
* (bearer 只认 SERVICE_AUTH_TOKEN(S),现状不变)。席上的型就是工厂 `createWebAdminJwtVerifier` 铸的那一种(含只读成员 `issuer` = 它验的 issuer):
|
|
667
|
+
* 与配置里的桥成对(在不在、验的是谁),`createHttpServer` 构造期判。 */
|
|
668
|
+
webAdminJwtVerifier?: import("../auth-bridge.js").WebAdminJwtVerifier;
|
|
666
669
|
/** Per-principal rate limiter for task/run endpoints. In-memory (single replica) or TiDB-backed
|
|
667
670
|
* (cross-replica soft limit) — both satisfy RateGate. */
|
|
668
671
|
rateLimiter?: RateGate;
|
|
@@ -756,8 +759,8 @@ export interface ServiceDeploymentDeps {
|
|
|
756
759
|
* 缺席(嵌入方 / 夹具)= 两项恒 0,两个读数逐字同 7.145.x。
|
|
757
760
|
*/
|
|
758
761
|
sessionResidentBackground?: () => SessionResidentCounts;
|
|
759
|
-
/** 编排器片 2 件 3:服务租约此刻的读数(`fleet/serving-lease.ts`
|
|
760
|
-
* (非 fleet 成员 /
|
|
762
|
+
/** 编排器片 2 件 3:服务租约此刻的读数(`fleet/serving-lease.ts` 的客户端交出;唯一读者 `fleet/engine-signal.ts` 的 `memberLeaseOf` —— 引擎信号铸点
|
|
763
|
+
* 与计费准入判经它同读,只在 `config.fleetGeneration` 在场〔成员〕时读)。缺席 = 没装租约客户端(非 fleet 成员 / 测试夹具)⇒ `none`。 */
|
|
761
764
|
servingLease?: () => import("../fleet/engine-signal.js").ServingLeaseView;
|
|
762
765
|
/** boot ready 门(b):false = 布防(`CONFIG_REQUIRE_ROSTER=true`)且首次 effective pull 尚未落 roster
|
|
763
766
|
* (worker 只有占位模型)。就绪原因 `model_roster_pending`(`http/readiness.ts`):计费提交 503 + `/readyz` 503 +
|
|
@@ -801,7 +804,7 @@ export interface ServiceDeploymentDeps {
|
|
|
801
804
|
/** [ref] 追加件:`POST /v1/admin/config/refresh` 的实现面 —— 触发**一次既有**的 refresh 拍(在飞则 join)。
|
|
802
805
|
* 缺席 / 回 `"not-wired"` = 本部署没有配置管道 ⇒ 该口诚实 4xx(绝不吞成 200)。 */
|
|
803
806
|
configRefreshNow?: () => Promise<"triggered" | "not-wired" | "failed">;
|
|
804
|
-
/**
|
|
807
|
+
/** [ref] §5 S2([ref]):center **当前在管**的 ServiceConfig 键集 —— `GET /v1/config/catalog`
|
|
805
808
|
* 判 `effectiveLane`(env 占位/center 在管/默认)的 center 半场。缺席或返回 undefined = 本部署
|
|
806
809
|
* 没有配置管道(纯 env worker / 测试夹具)⇒ 目录把每条 center 腿如实标「不在管」(additive)。 */
|
|
807
810
|
webAdminManagedKeys?: () => ReadonlySet<string> | undefined;
|
package/dist/http/server.js
CHANGED
|
@@ -5,6 +5,7 @@ import {} from "../web-admin-client/facade.js";
|
|
|
5
5
|
import { describeValueShape } from "@sema-agent/settings-schema";
|
|
6
6
|
import { HttpError } from "../security.js";
|
|
7
7
|
import { SessionDeletingError, SessionForkInProgressError } from "../execution-placement.js";
|
|
8
|
+
import { ORG_DELIVERY_QUOTA_UNREADABLE_SENTENCE, OrgDeliveryQuotaUnreadableError } from "../plugins/org-delivery-quota-store.js";
|
|
8
9
|
import {} from "../memory-sync.js";
|
|
9
10
|
import {} from "../orchestration/workflow-agent-steer.js";
|
|
10
11
|
import {} from "../orchestration/workflow-completion-inbox.js";
|
|
@@ -25,8 +26,9 @@ import { createRunConcurrencyGate, liveRunIdsOf } from "./run-concurrency-cap.js
|
|
|
25
26
|
import { sqlEngineSeatIssue } from "../sql-engine-posture.js";
|
|
26
27
|
import { parkDecisionStoreRefusal } from "../orchestration/workflow-park-decision.js";
|
|
27
28
|
import { CHECKPOINT_CTX_SEALING_REQUIRED } from "./checkpoint-ctx.js";
|
|
29
|
+
import { SERVING_LEASE_MEMBERSHIP_REQUIRED } from "../fleet/engine-signal.js";
|
|
28
30
|
import { PARKED_REVIVE_EXECUTION_SEAT_REQUIRED } from "../parked-decide.js";
|
|
29
|
-
import {
|
|
31
|
+
import { a2aAudienceVerifiedSourceRefusal, operatorDeclarationRefusal } from "../config-invariants.js";
|
|
30
32
|
import { retiredServiceDepsRefusal } from "./retired-service-deps.js";
|
|
31
33
|
import { createAdmission, MAX_SKILL_CONTENT_CHARS, MAX_SYSTEM_PROMPT_CHARS, MAX_OUTPUT_SCHEMA_CHARS, validateUserSkills } from "./admission.js";
|
|
32
34
|
import { createResumeLegs } from "./resume-legs.js";
|
|
@@ -37,7 +39,9 @@ import { createApprovalSweeps } from "./approval-sweeps.js";
|
|
|
37
39
|
export { routeLabel, isBillableSubmitPath, isCredentialGatedRewrite, isMethodDispatchedSubmitPath };
|
|
38
40
|
export { MAX_SKILL_CONTENT_CHARS, MAX_SYSTEM_PROMPT_CHARS, MAX_OUTPUT_SCHEMA_CHARS, validateUserSkills };
|
|
39
41
|
import { explicitOperatorOk } from "./principal-gate.js";
|
|
40
|
-
import { configuredIdentitySources } from "../identity-source.js";
|
|
42
|
+
import { authBridgeIssuerOf, configuredIdentitySources } from "../identity-source.js";
|
|
43
|
+
import { normalizeBridgeIssuer } from "../auth-bridge.js";
|
|
44
|
+
import { buildDisplaySafeUrl } from "../trace/redact.js";
|
|
41
45
|
export { explicitOperatorOk };
|
|
42
46
|
class DrainYieldingPreemptBook extends Map {
|
|
43
47
|
drainingNow;
|
|
@@ -73,6 +77,12 @@ export function createHttpServer(rawDeps) {
|
|
|
73
77
|
if (!Array.isArray(deps.deploymentMods)) {
|
|
74
78
|
throw new Error("createHttpServer: the deploymentMods seat is required — it is how the server learns whether a prompt screen runs on its legs (the same registrations the Runners carry as `mods`); pass `[]` for an embedding without mods; refusing to start rather than store objective text before the screen decides");
|
|
75
79
|
}
|
|
80
|
+
if (typeof deps.peerDesk?.lease !== "function" || typeof deps.peerDesk.declare !== "function" || typeof deps.peerDesk.seat?.answer !== "function") {
|
|
81
|
+
throw new Error("createHttpServer: the peerDesk seat is required — it is the one registry of the MCP / A2A credential pieces a send carries, and the submission and resume funnels open their host leases over it; pass `createPeerDesk()` (package root, zero IO — an embedding without MCP / A2A credentials passes one too), the very desk each Runner carries as `peerSeat: desk.seat`; refusing to start rather than answer every submission with a 500 at its first lease");
|
|
82
|
+
}
|
|
83
|
+
if (typeof deps.scenarioGate !== "function" || typeof deps.scenarioGate.known !== "function") {
|
|
84
|
+
throw new Error("createHttpServer: the scenarioGate seat is required — it is the one reading of which scenario names this deployment serves and lets a principal use, and the capability status face, the two session panels and the scenario request header all ask it; pass the gate that `createScenarioGate` (package root) mints from your config, scenario table and principal caps on its \"peek\" leg; refusing to start rather than answer those reads with a 500");
|
|
85
|
+
}
|
|
76
86
|
{
|
|
77
87
|
const retired = retiredServiceDepsRefusal(deps);
|
|
78
88
|
if (retired !== undefined)
|
|
@@ -97,11 +107,23 @@ export function createHttpServer(rawDeps) {
|
|
|
97
107
|
"the service boot builds one from that same issuer; inject a verifier for it, or remove the bridge and the center from the config, " +
|
|
98
108
|
"since /health.auth, the owner gates and the one-time migrations read the bridge from the config alone; refusing to start rather than report SSO sign-in that verifies nobody");
|
|
99
109
|
}
|
|
110
|
+
const configured = authBridgeIssuerOf(deps.config);
|
|
111
|
+
const verifier = deps.webAdminJwtVerifier;
|
|
112
|
+
if (verifier !== undefined && configured !== undefined) {
|
|
113
|
+
const verifies = verifier.issuer;
|
|
114
|
+
if (typeof verifies !== "string" || normalizeBridgeIssuer(verifies) !== normalizeBridgeIssuer(configured.issuer)) {
|
|
115
|
+
throw new Error(`createHttpServer: the injected webAdminJwtVerifier verifies issuer ${typeof verifies === "string" ? buildDisplaySafeUrl(verifies) : `<${describeValueShape(verifies)}>`}, ` +
|
|
116
|
+
`but the config's auth bridge issuer is ${buildDisplaySafeUrl(configured.issuer)} (authBridgeIssuer / AUTH_BRIDGE_ISSUER, or the center base webAdmin.baseUrl when that is unset) — ` +
|
|
117
|
+
"the gate would accept one issuer's tokens while /health.center.issuer reports another; the config is the only place the deployment's issuer is read, " +
|
|
118
|
+
"so inject a verifier whose `issuer` member (the issuer it verifies tokens for) is that one, or change the config to the issuer the verifier verifies " +
|
|
119
|
+
"(the values are shown display-safe: credentials, query and fragment are folded); refusing to start rather than verify tokens for an issuer this deployment does not report");
|
|
120
|
+
}
|
|
121
|
+
}
|
|
100
122
|
}
|
|
101
123
|
{
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
104
|
-
throw new Error(
|
|
124
|
+
const audienceSourceFailure = a2aAudienceVerifiedSourceRefusal(deps.config.a2aServe, configuredIdentitySources(deps.config).length === 0);
|
|
125
|
+
if (audienceSourceFailure !== undefined)
|
|
126
|
+
throw new Error(audienceSourceFailure);
|
|
105
127
|
}
|
|
106
128
|
{
|
|
107
129
|
const issue = sqlEngineSeatIssue(deps.backend, deps.sqlEngine);
|
|
@@ -127,6 +149,8 @@ export function createHttpServer(rawDeps) {
|
|
|
127
149
|
throw new Error(`createHttpServer: ${CHECKPOINT_CTX_SEALING_REQUIRED}`);
|
|
128
150
|
if (deps.parkedReviveSurface !== undefined && deps.sessionStorage?.executionPlacement === undefined)
|
|
129
151
|
throw new Error(`createHttpServer: ${PARKED_REVIVE_EXECUTION_SEAT_REQUIRED}`);
|
|
152
|
+
if (deps.servingLease !== undefined && deps.config.fleetGeneration === undefined)
|
|
153
|
+
throw new Error(`createHttpServer: ${SERVING_LEASE_MEMBERSHIP_REQUIRED}`);
|
|
130
154
|
const idemCache = new IdempotencyCache();
|
|
131
155
|
const inflightRuns = new Map();
|
|
132
156
|
const preemptableRuns = new DrainYieldingPreemptBook(() => deps.drainState?.draining === true);
|
|
@@ -162,7 +186,7 @@ export function createHttpServer(rawDeps) {
|
|
|
162
186
|
if (deps.drainState)
|
|
163
187
|
deps.drainState.yieldInflight = () => preemptableRuns.yieldAll();
|
|
164
188
|
if (deps.hookWakeBus) {
|
|
165
|
-
|
|
189
|
+
const deliverHookWake = async (sessionId, text) => {
|
|
166
190
|
try {
|
|
167
191
|
validatePendingSteer({ text, trusted: false });
|
|
168
192
|
}
|
|
@@ -197,6 +221,7 @@ export function createHttpServer(rawDeps) {
|
|
|
197
221
|
return false;
|
|
198
222
|
}
|
|
199
223
|
};
|
|
224
|
+
deps.hookWakeBus.deliver = deliverHookWake;
|
|
200
225
|
}
|
|
201
226
|
const { quotaExceeded, ownerCostQuotaDenied, ownerFleetLeaseDenied, ownerLeaseDenied, ownerQuotaDenied, leaseDenied, usageWindowDenialFor, usageWindowDenied, rateLimited, safeDecode, readJson, readRawBody } = createRequestGuards({ deps });
|
|
202
227
|
const { prepareSpec } = createAdmission({ deps, readJson, runnerFor });
|
|
@@ -227,6 +252,10 @@ export function createHttpServer(rawDeps) {
|
|
|
227
252
|
sendError(res, 409, err.code, err.message);
|
|
228
253
|
return;
|
|
229
254
|
}
|
|
255
|
+
if (err instanceof OrgDeliveryQuotaUnreadableError) {
|
|
256
|
+
sendError(res, 500, "internal.org_delivery_quota_unreadable", ORG_DELIVERY_QUOTA_UNREADABLE_SENTENCE);
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
230
259
|
sendOpenFaceFault(res, err);
|
|
231
260
|
});
|
|
232
261
|
});
|
|
@@ -1,29 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 「这条停驻行的持久化体在本版上能否重放」—— **唯一**判据(四问一只,外加 `settings.env` 凭据一臂;五个问点同调:续跑驱动段 `resume-legs.ts` `resolveResumeSpecOrBlocked`、
|
|
3
|
-
* plan_review 的 prepare 段、SLA 拒扫腿的跳过臂 `approval-sweeps.ts`、终态 run 的 steer 铸唤醒卡之前 `routes/runs.ts`;`resolveSpec` 本身留作提交腿的拒点)。
|
|
4
|
-
* 四问的规则、记号、拒句与删除条件的属主 = `http/checkpoint-ctx.ts` 顶注;答复 = 那里的 `storedBodyReplayAnswer`。
|
|
5
|
-
*
|
|
6
|
-
* 为什么判据住在这里而不是 `checkpoint-ctx.ts`:模式词问要读体的**生效模式词**(`task-settings.ts` `storedBodyPermissionMode`,请求设置的解析层)与本部署此刻的
|
|
7
|
-
* **入口地板**(`runtime-governance.ts` `autonomyModeFloor`)—— 这两只属主带着配置层的包外依赖;`checkpoint-ctx.ts` 被随包的本地排空脚本经编译产物 import,
|
|
8
|
-
* 它的闭包只许 node 内建 / 引擎包根(`test/drain-check-local.test.ts` 的闭包门)。判据只有这一只,allow 读法问、工具名清单问与退役请求键问的谓词照旧住在各自属主里。
|
|
9
|
-
*/
|
|
10
|
-
import type { PermissionMode } from "@sema-agent/core";
|
|
11
|
-
import { type Autonomy } from "../runtime-governance.js";
|
|
12
1
|
import { type InertToolListEntry } from "../rule-entry-list.js";
|
|
13
2
|
import { type ExecutionConfigRootDeployment } from "../execution-config-root.js";
|
|
14
3
|
import { type UnreadMembersDeployment } from "../unread-request-members.js";
|
|
15
4
|
import { type ModelApiKeyEnvTable } from "../server-secret-env.js";
|
|
16
5
|
import { type StoredBodyReplayRefusal } from "./checkpoint-ctx.js";
|
|
17
6
|
import type { CheckpointCtx } from "./route-ctx.js";
|
|
18
|
-
/**
|
|
19
|
-
* 模式词问:本行体里的模式词能否按当前读法重放。不能 ⇔ 本部署此刻有入口地板 ∧ 行上没有当前的模式词读法记号 ∧ 体的生效词进这块地板会变
|
|
20
|
-
* (`runtime-governance.ts` `entryPermissionMode`,与提交入口的盖章同一只函数;判的是「词变不变」而不是 `clamped` —— 体无词的旧行进地板取地板本身,
|
|
21
|
-
* 那也是变)⇒ 返回拒因的两个事实(体的词、地板);能 ⇒ `undefined`。
|
|
22
|
-
*/
|
|
23
|
-
export declare function permissionModeReadingUnstated(ctx: CheckpointCtx, floor: PermissionMode | undefined): {
|
|
24
|
-
stored: PermissionMode | undefined;
|
|
25
|
-
floor: PermissionMode;
|
|
26
|
-
} | undefined;
|
|
27
7
|
/**
|
|
28
8
|
* 存体里 `settings.permissions.deny` / `ask`(规则编译器读的收紧表)有永远不生效的条目(名字层:退役名 / 短名 / 铸不出的段 / 近似名;core 的规则文法:括号 / 内容文法 / 主字段……;
|
|
29
9
|
* `~/` 形而这个部署解不出 home),或三桶里 user 层的 `/` 形规则而这个部署读不出执行环境的配置根 —— 拒点是 `applyTaskSettings`(422,在 `resolveSpec` 里),那一拍 plan_review 的一次性 nonce 已烧、终态 steer 的唤醒卡已铸、SLA 拒扫跳不过;所以预判也问一遍。
|
|
@@ -36,17 +16,16 @@ export declare function permissionModeReadingUnstated(ctx: CheckpointCtx, floor:
|
|
|
36
16
|
*/
|
|
37
17
|
export declare function ruleTablesRefusalWithoutTaskRoot(body: unknown, deployment: ExecutionConfigRootDeployment): InertToolListEntry | undefined;
|
|
38
18
|
/**
|
|
39
|
-
*
|
|
19
|
+
* 预判读的部署配置:执行车道的 home 两位(`~/` 形规则那一问)、配置根的几位(user 设置层 `/` 规则那一问)与「请求成员读不出」那一问的
|
|
40
20
|
* 租户轴 / 两只注入闸的否决位。`ServiceConfig` 结构上满足,四个问点传 `deps.config` 整份。
|
|
41
21
|
*/
|
|
42
22
|
export type StoredReplayDeployment = ExecutionConfigRootDeployment & UnreadMembersDeployment & {
|
|
43
|
-
readonly autonomy?: Autonomy | undefined;
|
|
44
23
|
/** 生效配置模型条目 name → `apiKeyEnv`(`settings.env` 凭据判据的名单一臂;缺席 = 没有模型条目,与 `serverCredentialValueSources` 的缺省同读)。 */
|
|
45
24
|
readonly modelApiKeyEnv?: ModelApiKeyEnvTable | undefined;
|
|
46
25
|
};
|
|
47
26
|
/**
|
|
48
|
-
*
|
|
49
|
-
* 任一问中都不重放,句子只需一句)。`deployment` = 本部署**此刻**的 `config`(活 config:热改即生效)
|
|
27
|
+
* 三问一只判据:不能重放 ⇒ 返回拒的那条规则;能 ⇒ `undefined`。顺序:allow 读法(体里带非空 `allow` 而写者版本证不出 ≥ 7.117.0;常设,按写者版本)→ 请求设置里的条目表(**与拒点同序**:桶门〔形 / 空串 / 超帽〕→ 工具名清单读成空〔**只问限制方向**:放行方向的存量条目读成空,续跑照旧、只留一行运维 warn〕→ 请求成员读不出〔hooks / env / MCP transport / A2A headers …,判据 `unread-request-members.ts`〕→ deny / ask 的名字层 + 规则文法)→ 体里的退役请求键(几问同中时答先中的那一问 ——
|
|
28
|
+
* 任一问中都不重放,句子只需一句)。`deployment` = 本部署**此刻**的 `config`(活 config:热改即生效):`~/` 形规则的 home 由 `executionLaneHomeDir` 算,问点都不自己算。
|
|
50
29
|
*/
|
|
51
30
|
export declare function storedBodyReplayRefusal(ctx: CheckpointCtx, deployment: StoredReplayDeployment): StoredBodyReplayRefusal | undefined;
|
|
52
31
|
//# sourceMappingURL=stored-body-replay.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { REQUEST_SETTINGS_REFUSAL_PREFIX, SETTINGS_PERMISSION_BUCKETS, SETTINGS_RULE_REFUSAL_CODE, neverAutoNamesRefusal, readSettingsEnv, rulePolicyBucketsRefusal, settingsEnvCredentialIssue, settingsPermissionBucketIssue
|
|
1
|
+
import { REQUEST_SETTINGS_REFUSAL_PREFIX, SETTINGS_PERMISSION_BUCKETS, SETTINGS_RULE_REFUSAL_CODE, neverAutoNamesRefusal, readSettingsEnv, rulePolicyBucketsRefusal, settingsEnvCredentialIssue, settingsPermissionBucketIssue } from "../task-settings.js";
|
|
2
2
|
import { readTightenOnlySeats, tightenOnlySeatField, tightenOnlySeatIssue } from "../tighten-only-seats.js";
|
|
3
3
|
import { entryProblemsFacts } from "../entry-problems.js";
|
|
4
|
-
import { autonomyModeFloor, entryPermissionMode } from "../runtime-governance.js";
|
|
5
4
|
import { inertToolListEntryOf, replayInertEntry } from "../rule-entry-list.js";
|
|
6
5
|
import { executionLaneHomeDir } from "../execution-lane-caps.js";
|
|
7
6
|
import { executionConfigRootOf } from "../execution-config-root.js";
|
|
@@ -10,13 +9,7 @@ import { storedEnvCredentialsDropM38 } from "../stored-request-env-credentials-m
|
|
|
10
9
|
import { storedToolAxesRereadM19 } from "../stored-request-tool-axes-m19.js";
|
|
11
10
|
import { MAX_NAMED_MEMBERS, unreadRequestMembers, unreadRequestMembersRefusal } from "../unread-request-members.js";
|
|
12
11
|
import { serverCredentialValueSources } from "../server-secret-env.js";
|
|
13
|
-
import { allowListWriterUnproven,
|
|
14
|
-
export function permissionModeReadingUnstated(ctx, floor) {
|
|
15
|
-
if (floor === undefined || permissionModeReadingStated(ctx))
|
|
16
|
-
return undefined;
|
|
17
|
-
const stored = storedBodyPermissionMode(ctx.body);
|
|
18
|
-
return entryPermissionMode(stored, floor).effective === stored ? undefined : { stored, floor };
|
|
19
|
-
}
|
|
12
|
+
import { allowListWriterUnproven, retiredRequestKeyOf } from "./checkpoint-ctx.js";
|
|
20
13
|
const RETIRED_KEY_REWRITE_MIGRATION = { promptProfile: "M30" };
|
|
21
14
|
const BUCKET_GATE_CODE = "request.field_invalid";
|
|
22
15
|
const BUCKET_SIDE = {
|
|
@@ -87,9 +80,6 @@ export function storedBodyReplayRefusal(ctx, deployment) {
|
|
|
87
80
|
const entry = ruleTablesRefusalWithoutTaskRoot(ctx.body, deployment);
|
|
88
81
|
if (entry !== undefined)
|
|
89
82
|
return { kind: "inert_tool_list", entry };
|
|
90
|
-
const mode = permissionModeReadingUnstated(ctx, autonomyModeFloor(deployment.autonomy));
|
|
91
|
-
if (mode !== undefined)
|
|
92
|
-
return { kind: "permission_mode_reading", ...mode, ...writer };
|
|
93
83
|
const retiredKey = retiredRequestKeyOf(ctx.body);
|
|
94
84
|
if (retiredKey !== undefined)
|
|
95
85
|
return { kind: "retired_request_key", key: retiredKey, rewriteWindowEnd: migrationWindowEnd(RETIRED_KEY_REWRITE_MIGRATION[retiredKey]), ...writer };
|
|
@@ -31,16 +31,16 @@ export declare function persistSubmitCtx(store: SubmitCtxStore, deps: {
|
|
|
31
31
|
readonly logger?: Logger | undefined;
|
|
32
32
|
readonly metrics?: Metrics | undefined;
|
|
33
33
|
readonly checkpointCtxSealing?: CheckpointCtxSealer | undefined;
|
|
34
|
-
readonly instanceId?: string | undefined;
|
|
35
34
|
}, claim: {
|
|
36
35
|
readonly runStore: RunStore;
|
|
37
36
|
readonly taskId: string;
|
|
37
|
+
readonly legId: string;
|
|
38
38
|
} | undefined, sessionId: string, fields: Parameters<typeof buildCheckpointCtx>[0]): Promise<SubmitCtxRefusal | typeof SUBMIT_CTX_CLAIM_LOST | undefined>;
|
|
39
39
|
/**
|
|
40
40
|
* 提交腿写续跑输入的入口(三个调用点同调这一只):体与标记按受理座提交时交出的那一份定(见文件头「体里的目标按哪一份写」),只写这一笔。
|
|
41
41
|
* 写不进的处置与答复 = {@link persistSubmitCtx}(本函数只定体、不另判)。
|
|
42
42
|
*/
|
|
43
|
-
export declare function persistSubmissionCtx(store: SubmitCtxStore, deps: Parameters<typeof persistSubmitCtx>[1], claim: Parameters<typeof persistSubmitCtx>[2], prepared: Pick<PreparedTaskSubmission, "body" | "auth" | "verify" | "acceptance" | "bodyFromScreenedCtx"> & {
|
|
43
|
+
export declare function persistSubmissionCtx(store: SubmitCtxStore, deps: Parameters<typeof persistSubmitCtx>[1], claim: Parameters<typeof persistSubmitCtx>[2], prepared: Pick<PreparedTaskSubmission, "body" | "auth" | "verify" | "acceptance" | "bodyFromScreenedCtx"> & Partial<Pick<PreparedTaskSubmission, "legFacts">> & {
|
|
44
44
|
readonly spec: Pick<PreparedTaskSubmission["spec"], "sessionId" | "model">;
|
|
45
45
|
}): Promise<SubmitCtxRefusal | typeof SUBMIT_CTX_CLAIM_LOST | undefined>;
|
|
46
46
|
//# sourceMappingURL=submit-ctx.d.ts.map
|
package/dist/http/submit-ctx.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StoreRowTooLargeError } from "../plugins/sql-errors.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { withdrawClaimedRun } from "./claimed-run.js";
|
|
3
|
+
import { createLegCtxClaim } from "../plugins/store-contracts.js";
|
|
4
4
|
import { buildCheckpointCtx, CheckpointCtxUnsealableError } from "./checkpoint-ctx.js";
|
|
5
5
|
import { refusalBody } from "./refusal-body.js";
|
|
6
6
|
import { limitFactsUnmeasured } from "../limit-refusal.js";
|
|
@@ -44,15 +44,14 @@ export async function persistSubmitCtx(store, deps, claim, sessionId, fields) {
|
|
|
44
44
|
let landed;
|
|
45
45
|
try {
|
|
46
46
|
const ctx = buildCheckpointCtx(fields, deps.checkpointCtxSealing, sessionId);
|
|
47
|
-
landed = await store.putCtx(sessionId, ctx, claim === undefined ? undefined :
|
|
47
|
+
landed = await store.putCtx(sessionId, ctx, claim === undefined ? undefined : createLegCtxClaim(claim.runStore, claim.taskId, claim.legId));
|
|
48
48
|
}
|
|
49
49
|
catch (err) {
|
|
50
50
|
const tooLarge = err instanceof StoreRowTooLargeError ? err : undefined;
|
|
51
51
|
const unsealable = err instanceof CheckpointCtxUnsealableError ? err : undefined;
|
|
52
52
|
const known = tooLarge ?? unsealable;
|
|
53
53
|
if (claim !== undefined) {
|
|
54
|
-
|
|
55
|
-
await releaseClaimedRun(claim.runStore, claim.taskId, why, (releaseErr, step) => {
|
|
54
|
+
await withdrawClaimedRun(claim.runStore, claim.taskId, claim.legId, (releaseErr, step) => {
|
|
56
55
|
deps.logger?.warn("submit_ctx_run_release_failed", { taskId: claim.taskId, sessionId, step, err: releaseErr instanceof Error ? releaseErr.message : String(releaseErr) });
|
|
57
56
|
deps.metrics?.inc("submit_ctx_run_release_failed_total", { step });
|
|
58
57
|
});
|
|
@@ -77,6 +76,7 @@ export async function persistSubmissionCtx(store, deps, claim, prepared) {
|
|
|
77
76
|
body: screened && prepared.verify === undefined ? withheldBody(prepared.body, prepared.spec.model) : prepared.body,
|
|
78
77
|
memoryScope: prepared.auth?.memoryScope,
|
|
79
78
|
...(screened || prepared.bodyFromScreenedCtx === true ? { promptScreened: true } : {}),
|
|
79
|
+
...(prepared.legFacts?.projectContext !== undefined ? { projectContext: prepared.legFacts.projectContext } : {}),
|
|
80
80
|
writerVersion: serviceVersion(),
|
|
81
81
|
});
|
|
82
82
|
}
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
*
|
|
10
10
|
* ## 判定(三条,按序;别的一律不放)
|
|
11
11
|
* · 这次提交自带 taskId 而命中的行**不是**那一条(`Idempotency-Key` 指向别的行)⇒ 冲突;
|
|
12
|
-
* · 调用方读不到这一行(属主门 = `qualsOf`,「这个调用方读得到这一行 run 吗」的唯一谓词,经属主存取器 `owner-access.ts`
|
|
12
|
+
* · 调用方读不到这一行(属主门 = `qualsOf`,「这个调用方读得到这一行 run 吗」的唯一谓词,经属主存取器 `owner-access.ts` 读与判 —— 按钥匙读行也只在那里:
|
|
13
|
+
* `readReplayHit`;建行撞唯一键时观察到的行经同一只判 `replayHitOf`)⇒ 冲突;
|
|
13
14
|
* 冲突 ⇒ `409 conflict.run_exists`,体里**不回显**那条行的任何标识(不给跨租户预言机)。先于下一条判:读不到的行不比体。
|
|
14
15
|
* · 这次提交带 `Idempotency-Key`(`caller.idem` 在场)、那一行绑的**就是这把键**,而它记着的请求体指纹与这次不同 ⇒
|
|
15
16
|
* `409 conflict.idempotency_payload_mismatch`(同形 `{ error, errorCode }`,不回显键与那一行);**不**回放首发、不新建、那一行不动。
|
|
@@ -33,6 +34,7 @@ import type { RunIdemBinding, RunRecord } from "../plugins/store-contracts.js";
|
|
|
33
34
|
import type { RunStore } from "../plugins/store-backend.js";
|
|
34
35
|
import type { ServiceConfig } from "../config-types.js";
|
|
35
36
|
import type { SubmitOutcome } from "./idempotency.js";
|
|
37
|
+
import { type ReplayHit } from "./owner-access.js";
|
|
36
38
|
import type { Subject } from "../owner-brands.js";
|
|
37
39
|
/** 提交腿的回执形(闭集;穷举 `switch`,加一形不写这里 = 编译红)。 */
|
|
38
40
|
export type SubmitReplayFace = "durable" | "sync";
|
|
@@ -56,7 +58,18 @@ export declare function isReplayedOutcome(outcome: SubmitOutcome): boolean;
|
|
|
56
58
|
/** 一份提交回执是不是 {@link replayOfExistingRun} 铸的**冲突**体(判别位 = 机器码;铸点就在下面,码与它同文件)—— 把回执渲成别的协议形的
|
|
57
59
|
* 调用方(A2A)按它分句,不另抄码。 */
|
|
58
60
|
export declare function isRunExistsConflictBody(body: unknown): boolean;
|
|
61
|
+
/** 进门按一把提交钥匙(`Idempotency-Key` 铸的键 / 调用方自铸的 `body.taskId`)读行作答:没命中 ⇒ `undefined`(这是一次新提交);命中 ⇒ 本文件的唯一回执。 */
|
|
62
|
+
export declare function replayOfKey(key: {
|
|
63
|
+
readonly idemKey: string;
|
|
64
|
+
} | {
|
|
65
|
+
readonly taskId: string;
|
|
66
|
+
}, caller: ReplayCaller, face: SubmitReplayFace, deps: {
|
|
67
|
+
config: ServiceConfig;
|
|
68
|
+
}, runStore: Pick<RunStore, "getRun" | "getRunByIdem" | "bindIdemBodyFingerprint" | "observeRun">): Promise<SubmitOutcome | undefined>;
|
|
69
|
+
/** 建行撞唯一键时观察到的那一行(店的观察臂交回的既有行)作答:与按钥匙读到的同一只判、同一张回执。 */
|
|
59
70
|
export declare function replayOfExistingRun(seen: RunRecord, caller: ReplayCaller, face: SubmitReplayFace, deps: {
|
|
60
71
|
config: ServiceConfig;
|
|
61
|
-
}, runStore: RunStore): Promise<SubmitOutcome>;
|
|
72
|
+
}, runStore: Pick<RunStore, "bindIdemBodyFingerprint" | "observeRun">): Promise<SubmitOutcome>;
|
|
73
|
+
/** 一次命中的回执(判已在属主存取器里落成 {@link ReplayHit}):占用 ⇒ 冲突;读得到 ⇒ 体指纹 → 观察口 → 按提交腿的形答。 */
|
|
74
|
+
export declare function answerReplay(hit: ReplayHit, caller: ReplayCaller, face: SubmitReplayFace, runStore: Pick<RunStore, "bindIdemBodyFingerprint" | "observeRun">): Promise<SubmitOutcome>;
|
|
62
75
|
//# sourceMappingURL=submit-replay.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { claimCallerOf } from "../security.js";
|
|
1
|
+
import { readReplayHit, replayHitOf, runRowAt } from "./owner-access.js";
|
|
3
2
|
import { syncSubmitBodyOfRow } from "./sync-submit-body.js";
|
|
4
3
|
import { refusalBody } from "./refusal-body.js";
|
|
5
4
|
export function replayedOutcome(outcome) {
|
|
@@ -15,11 +14,18 @@ export function isReplayedOutcome(outcome) {
|
|
|
15
14
|
export function isRunExistsConflictBody(body) {
|
|
16
15
|
return typeof body === "object" && body !== null && body.errorCode === "conflict.run_exists";
|
|
17
16
|
}
|
|
17
|
+
export async function replayOfKey(key, caller, face, deps, runStore) {
|
|
18
|
+
const hit = await readReplayHit(caller.subject, deps.config, runStore, key, caller.clientTaskId);
|
|
19
|
+
return hit === undefined ? undefined : answerReplay(hit, caller, face, runStore);
|
|
20
|
+
}
|
|
18
21
|
export async function replayOfExistingRun(seen, caller, face, deps, runStore) {
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
return answerReplay(replayHitOf(caller.subject, deps.config, seen, caller.clientTaskId), caller, face, runStore);
|
|
23
|
+
}
|
|
24
|
+
export async function answerReplay(hit, caller, face, runStore) {
|
|
25
|
+
if (hit.kind === "occupied") {
|
|
21
26
|
return { status: 409, body: refusalBody({ errorCode: "conflict.run_exists", message: "a run already exists for this submission's taskId or Idempotency-Key" }) };
|
|
22
27
|
}
|
|
28
|
+
const seen = hit.row;
|
|
23
29
|
if (caller.idem !== undefined) {
|
|
24
30
|
const held = await runStore.bindIdemBodyFingerprint(seen.taskId, caller.idem);
|
|
25
31
|
if (held !== null && held !== caller.idem.bodyFingerprint) {
|
|
@@ -109,7 +109,8 @@ export interface TaskRequestBody {
|
|
|
109
109
|
* `RunnerDeps.loadProjectMemory` —— 项目层、声明的指令文件、它们喂的那几处一并缺席(引擎自己的 git 状态车道、记忆引擎、技能 / hooks / MCP 不受影响)。
|
|
110
110
|
* 原样投给引擎;拼写门与 `fileHistory` 同一张单成员关断词表(`request-value-closure.ts`:别的值 fresh 400 `request.field_invalid`、续跑重放同判),
|
|
111
111
|
* 引擎读到的恒是这一个词;子代随父继承(引擎的夹紧表)。
|
|
112
|
-
* 本服务自铸的 `wiring_manifest.instructions` 段在这样的腿上缺席(loader 没被调就没有陈述)。能力位 `projectMemory`。
|
|
112
|
+
* 本服务自铸的 `wiring_manifest.instructions` 段在这样的腿上缺席(loader 没被调就没有陈述)。能力位 `projectMemory`。
|
|
113
|
+
* 7.150.0 起同一个词也关掉这条 run 从项目登记簿继承的项目简报(`project-context.ts`;继承来的 `cwd` 不受它管 —— 位置不是上下文内容)。 */
|
|
113
114
|
projectMemory?: TaskSpec["projectMemory"];
|
|
114
115
|
/** Explicit model selection (CLI `/model` picker + `run --model <ref>`). An INTENT by catalog
|
|
115
116
|
* name (e.g. "deepseek-pro") — resolveSpec gates it against the SAME allow-list as an inline `@name` mention
|
|
@@ -450,7 +451,9 @@ export interface TaskRequestBody {
|
|
|
450
451
|
* 同一个 id 的两种大小写写法落同一只记忆盘)。多租户 DB 记忆面下它把派生
|
|
451
452
|
* scope 从 user 盘切到项目盘(`proj:<tenant>/<projectId>`)并以 config.projects[projectId].defaultScopes
|
|
452
453
|
* 作 memory.scopes 种子;单用户部署忽略派生(memoryScopeFor 不变),仅 defaultScopes 种子生效。
|
|
453
|
-
* Rides the persisted body onto resume legs(与 memoryWrite 同姿势)。
|
|
454
|
+
* Rides the persisted body onto resume legs(与 memoryWrite 同姿势)。
|
|
455
|
+
* 7.150.0 起它(或会话行上声明过的项目)也选这条 run **继承的项目上下文**(`project-context.ts`;能力位 `projectInheritance`):登记对提交者可见且带内容证明 ⇒
|
|
456
|
+
* 项目简报进系统提示追加折叠的中段、射程内第一条 folder 填缺席的 `cwd`;判一次、随 run 冻结。项目继承来的成员参与的拒,`fields` 以本键为坐标。 */
|
|
454
457
|
projectId?: string;
|
|
455
458
|
/** [#40 / TOC cwd seam, SDK 0.0.36] The TOC client's launch directory — the agent's HOST execution-env workspace
|
|
456
459
|
* runs HERE (CC-parity: `sema` in a project dir operates on THAT project). An ABSOLUTE host path. 🔒 honored ONLY
|
|
@@ -572,7 +575,7 @@ export interface TaskRequestBody {
|
|
|
572
575
|
* `transport.env`(stdio)/ `transport.headers`(http)是这台 server 的**件**:server 交给引擎的声明里不带它们,件由部署的对端座在起子进程 / 发请求时按原字节作答
|
|
573
576
|
* (只对胜出部署同名判的条目登记;件的名与值由引擎在每次发送时判,不合 ⇒ 那一台不连、兄弟照挂)。 */
|
|
574
577
|
mcpServers?: RequestMcpServerSpec[];
|
|
575
|
-
/** [
|
|
578
|
+
/** [[ref] 车1] Caller-supplied per-request A2A peers (remote agents this task may call), aligned to
|
|
576
579
|
* core `A2aServerSpec`. 🔒 honored on a SINGLE-USER deployment (task-a2a.ts `a2aInjectionHonored`, the same
|
|
577
580
|
* predicate `capabilities.a2aInjection` advertises) — the requester is the super-admin of their OWN worker,
|
|
578
581
|
* on ANY execution lane (an A2A call is a plain outbound HTTPS request from the worker, so the lane where
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { createBrain } from "./brain.js";
|
|
|
5
5
|
export { createSessionStore } from "./plugins/session-store.js";
|
|
6
6
|
export { createStoreBackend, type StoreBackend, type SessionCaptureRecordSource } from "./plugins/store-backend.js";
|
|
7
7
|
export { RetiredSchemaPresentError } from "./plugins/schema-consistency.js";
|
|
8
|
+
export { LegacySkillExemptionsPresentError } from "./plugins/approval-exemption-skill-cutoff.js";
|
|
8
9
|
export { LocalDataRootSchemaMismatchError, type LocalDataRootMismatch } from "./plugins/local-session-store.js";
|
|
9
10
|
export { CachingSessionStore, type CachingOptions } from "./plugins/caching-session-store.js";
|
|
10
11
|
export type { RunRecord, RunEvent } from "./plugins/store-contracts.js";
|
|
@@ -38,6 +39,7 @@ export { CATALOG_ENTRY_HEADER_LANES, CATALOG_ENTRY_HEADER_NAMES, type CatalogEnt
|
|
|
38
39
|
export type { ModelRouteGap } from "./model-route-endpoint.js";
|
|
39
40
|
export { judgeServedModelRoute, type ServedModelRouteView, type ServedModelRouteOptions, type ModelRouteEndpointVerdict } from "./model-route-endpoint.js";
|
|
40
41
|
export type { UserInputLedgerStore, UserInputAcceptance, NewUserInputAcceptance, OpenScanCursor, OpenScanPage, SettleHow, WriterGoneEvidence } from "./user-input-ledger.js";
|
|
41
|
-
export type { OrgDeliveryQuotaStore, OrgDeliveryQuotaPolicy } from "./plugins/org-delivery-quota-store.js";
|
|
42
|
+
export type { OrgDeliveryQuotaStore, OrgDeliveryQuotaPolicy, OrgDeliveryQuotaVerdict } from "./plugins/org-delivery-quota-store.js";
|
|
43
|
+
export type { ServerOrgDeliveryGate, ServerOrgDeliveryOutcome } from "./org-delivery-gate.js";
|
|
42
44
|
export { APPROVAL_GATE_KINDS, type ApprovalGateKind } from "./approval-content-kind.js";
|
|
43
45
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export { createBrain } from "./brain.js";
|
|
|
5
5
|
export { createSessionStore } from "./plugins/session-store.js";
|
|
6
6
|
export { createStoreBackend } from "./plugins/store-backend.js";
|
|
7
7
|
export { RetiredSchemaPresentError } from "./plugins/schema-consistency.js";
|
|
8
|
+
export { LegacySkillExemptionsPresentError } from "./plugins/approval-exemption-skill-cutoff.js";
|
|
8
9
|
export { LocalDataRootSchemaMismatchError } from "./plugins/local-session-store.js";
|
|
9
10
|
export { CachingSessionStore } from "./plugins/caching-session-store.js";
|
|
10
11
|
export { runInBackground } from "./runs.js";
|