@sema-agent/server 7.137.0 → 7.139.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 +600 -142
- package/README.md +7 -3
- package/README.zh-CN.md +6 -3
- package/USAGE.md +132 -41
- package/deploy/sema-up/README.md +1 -1
- package/deploy/sema-up/lib/lanes.json +3 -2
- package/dist/adoption/wire.d.ts +3 -3
- package/dist/approval-card.d.ts +23 -16
- package/dist/approval-card.js +1 -0
- package/dist/audit.js +1 -0
- package/dist/background-agent-name.d.ts +5 -0
- package/dist/background-agent-name.js +5 -0
- package/dist/bench/s1/arms.d.ts +1 -1
- package/dist/bench/s1/arms.js +1 -3
- package/dist/bench/s1/run-firm.js +2 -2
- package/dist/boot/budget-tracing.d.ts +1 -12
- package/dist/boot/deployment-mods.d.ts +46 -16
- package/dist/boot/deployment-mods.js +82 -6
- package/dist/boot/device-lane.d.ts +8 -3
- package/dist/boot/device-lane.js +7 -2
- package/dist/boot/execution-env.d.ts +4 -2
- package/dist/boot/execution-env.js +16 -24
- package/dist/boot/execution-lane.d.ts +1 -1
- package/dist/boot/governance-seams.d.ts +12 -18
- package/dist/boot/governance-seams.js +10 -24
- package/dist/boot/leader.d.ts +3 -0
- package/dist/boot/leader.js +1 -0
- package/dist/boot/memory-consolidation.js +2 -2
- package/dist/boot/org-delivery.js +15 -2
- package/dist/boot/resolve-spec.d.ts +4 -1
- package/dist/boot/resolve-spec.js +29 -19
- package/dist/boot/retention-lane.d.ts +14 -8
- package/dist/boot/retention-lane.js +2 -8
- package/dist/boot/runner-deps.d.ts +10 -4
- package/dist/boot/runner-deps.js +2 -0
- package/dist/boot/session-faces.d.ts +0 -3
- package/dist/boot/session-faces.js +15 -8
- package/dist/boot/stage-02-web-admin-pull.js +2 -2
- package/dist/boot/stage-04-stores.d.ts +1 -12
- package/dist/boot/stage-05-execution-env.d.ts +3 -12
- package/dist/boot/stage-05-execution-env.js +8 -5
- package/dist/boot/stage-06-runners.d.ts +3 -12
- package/dist/boot/stage-06-runners.js +5 -3
- package/dist/boot/stage-07-capability-layer.d.ts +3 -12
- package/dist/boot/stage-07-capability-layer.js +2 -2
- package/dist/boot/stage-08-reapers.d.ts +3 -12
- package/dist/boot/stage-09-leader.d.ts +3 -12
- package/dist/boot/stage-09-leader.js +2 -3
- package/dist/boot/stage-10-http-server.d.ts +3 -12
- package/dist/boot/stage-10-http-server.js +5 -3
- package/dist/boot/stores.js +4 -4
- package/dist/boot/web-admin.d.ts +5 -2
- package/dist/boot/web-admin.js +5 -5
- package/dist/brain.js +5 -5
- package/dist/budget.d.ts +17 -15
- package/dist/budget.js +2 -2
- package/dist/capabilities/mcp-probe.d.ts +36 -11
- package/dist/capabilities/mcp-probe.js +44 -5
- package/dist/capabilities/scenarios.d.ts +1 -1
- package/dist/capability-facts.d.ts +21 -7
- package/dist/capability-facts.js +13 -3
- package/dist/checkpoint-identity.d.ts +13 -6
- package/dist/config-catalog.js +14 -8
- package/dist/config-invariants.d.ts +23 -3
- package/dist/config-invariants.js +42 -0
- package/dist/config-provider.d.ts +19 -24
- package/dist/config-provider.js +27 -12
- package/dist/config-types.d.ts +25 -12
- package/dist/config.d.ts +33 -0
- package/dist/config.js +52 -20
- package/dist/delegated-session-owner.d.ts +2 -2
- package/dist/deployment-shape.d.ts +7 -7
- package/dist/device-enrollment.d.ts +41 -2
- package/dist/device-enrollment.js +27 -12
- package/dist/device-store.d.ts +58 -85
- package/dist/device-store.js +19 -49
- package/dist/device-ws-hub.js +2 -1
- package/dist/env-name-allowlist-knobs.d.ts +5 -4
- package/dist/exec-cut.d.ts +60 -0
- package/dist/exec-cut.js +36 -0
- package/dist/execution-lane-caps.d.ts +19 -0
- package/dist/execution-lane-caps.js +10 -0
- package/dist/execution-placement.d.ts +259 -0
- package/dist/execution-placement.js +199 -0
- package/dist/field-conflict.d.ts +3 -2
- package/dist/field-conflict.js +1 -0
- package/dist/gate-settlement.d.ts +71 -0
- package/dist/gate-settlement.js +40 -0
- package/dist/hooks/classic-stations.d.ts +1 -0
- package/dist/hooks/classic-stations.js +1 -0
- package/dist/hooks/command-spawn.d.ts +2 -2
- package/dist/hooks/hook-runner.js +14 -14
- package/dist/hosted-posture.d.ts +2 -2
- package/dist/http/admission.js +10 -19
- package/dist/http/checkpoint-ctx.d.ts +21 -12
- package/dist/http/checkpoint-ctx.js +4 -2
- package/dist/http/claimed-run.d.ts +1 -1
- package/dist/http/dispatch.d.ts +4 -0
- package/dist/http/dispatch.js +3 -0
- package/dist/http/durable-run-leg.js +12 -6
- package/dist/http/execution-context.d.ts +218 -0
- package/dist/http/execution-context.js +330 -0
- package/dist/http/memory-compliance-failure-reply.js +3 -0
- package/dist/http/resume-legs.d.ts +5 -11
- package/dist/http/resume-legs.js +179 -104
- package/dist/http/route-ctx.d.ts +44 -59
- package/dist/http/route-ctx.js +2 -5
- package/dist/http/routes/a2a-serve.js +10 -4
- package/dist/http/routes/agents-roster.d.ts +1 -1
- package/dist/http/routes/agents-roster.js +5 -1
- package/dist/http/routes/approvals-assistant.js +6 -6
- package/dist/http/routes/background.d.ts +29 -1
- package/dist/http/routes/background.js +29 -2
- package/dist/http/routes/capabilities.js +12 -10
- package/dist/http/routes/devices.d.ts +13 -19
- package/dist/http/routes/devices.js +21 -26
- package/dist/http/routes/mcp-reconnect.d.ts +3 -2
- package/dist/http/routes/mcp-reconnect.js +7 -5
- package/dist/http/routes/memory-consolidation.d.ts +1 -1
- package/dist/http/routes/memory-origin.d.ts +1 -1
- package/dist/http/routes/rules.js +3 -3
- package/dist/http/routes/runs.js +11 -7
- package/dist/http/routes/session-sync.js +110 -15
- package/dist/http/routes/sessions.d.ts +6 -0
- package/dist/http/routes/sessions.js +119 -13
- package/dist/http/routes/side-query.d.ts +12 -4
- package/dist/http/routes/side-query.js +6 -8
- package/dist/http/routes/tasks.js +800 -782
- package/dist/http/server.d.ts +61 -39
- package/dist/http/server.js +11 -0
- package/dist/http/session-inherit-env.d.ts +3 -4
- package/dist/http/session-inherit-env.js +1 -1
- package/dist/http/wire-types.d.ts +22 -18
- package/dist/identity-source.d.ts +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -0
- package/dist/leader/wire.d.ts +7 -0
- package/dist/leader/wire.js +5 -4
- package/dist/mcp-assertion-header.d.ts +51 -40
- package/dist/mcp-assertion-header.js +10 -11
- package/dist/mcp-authorization-face.d.ts +27 -0
- package/dist/mcp-authorization-face.js +15 -0
- package/dist/memory-operator-faces.d.ts +13 -4
- package/dist/memory-operator-faces.js +1 -17
- package/dist/memory-sync-client.d.ts +53 -14
- package/dist/memory-sync-client.js +187 -92
- package/dist/memory-sync.d.ts +1 -1
- package/dist/memory-sync.js +3 -2
- package/dist/model-route-gap.d.ts +6 -22
- package/dist/model-route-gap.js +7 -5
- package/dist/mods-declaration.d.ts +110 -0
- package/dist/mods-declaration.js +109 -0
- package/dist/observability/cost-taxonomy.d.ts +2 -2
- package/dist/observability/err-text.d.ts +5 -0
- package/dist/observability/err-text.js +9 -0
- package/dist/observability/fail-open.d.ts +17 -1
- package/dist/observability/fail-open.js +17 -1
- package/dist/observability/run-terminal.js +0 -1
- package/dist/observability/secret-env-scrub.d.ts +1 -1
- package/dist/observability/secret-env-scrub.js +1 -1
- package/dist/orchestration/workflow-notify-journal.js +4 -4
- package/dist/org-memory-admission.d.ts +4 -3
- package/dist/org-memory-admission.js +6 -6
- package/dist/parked-decide.d.ts +49 -11
- package/dist/parked-decide.js +25 -26
- package/dist/parked-revive-surface.d.ts +12 -15
- package/dist/parked-revive-surface.js +3 -6
- package/dist/peer-seat.d.ts +156 -0
- package/dist/peer-seat.js +273 -0
- package/dist/permission-rule-vocab.d.ts +7 -7
- package/dist/permission-rule-vocab.js +3 -3
- package/dist/plain-string-record.d.ts +38 -0
- package/dist/plain-string-record.js +38 -0
- package/dist/plugins/approval-ask-store-file.d.ts +7 -0
- package/dist/plugins/approval-ask-store-file.js +11 -0
- package/dist/plugins/approval-ask-store-memory.d.ts +6 -0
- package/dist/plugins/approval-ask-store-memory.js +12 -0
- package/dist/plugins/approval-ask-store-sql.d.ts +22 -5
- package/dist/plugins/approval-ask-store-sql.js +30 -12
- package/dist/plugins/background-agent-store-sql.js +6 -3
- package/dist/plugins/caching-session-store.d.ts +11 -2
- package/dist/plugins/caching-session-store.js +15 -3
- package/dist/plugins/checkpoint-store-sql.d.ts +21 -25
- package/dist/plugins/checkpoint-store-sql.js +13 -15
- package/dist/plugins/device-store-sql.d.ts +25 -51
- package/dist/plugins/device-store-sql.js +49 -103
- package/dist/plugins/execution-placement-sql.d.ts +151 -0
- package/dist/plugins/execution-placement-sql.js +223 -0
- package/dist/plugins/file-history-store-sql.d.ts +7 -6
- package/dist/plugins/file-history-store-sql.js +8 -7
- package/dist/plugins/file-run-store.d.ts +6 -1
- package/dist/plugins/file-run-store.js +4 -0
- package/dist/plugins/fork-routing-session-store.d.ts +6 -0
- package/dist/plugins/fork-routing-session-store.js +16 -0
- package/dist/plugins/k8s-pod-reaper.d.ts +2 -8
- package/dist/plugins/k8s-pod-reaper.js +3 -3
- package/dist/plugins/local-checkpoint-store.d.ts +1 -11
- package/dist/plugins/local-checkpoint-store.js +0 -1
- package/dist/plugins/local-session-store.d.ts +183 -45
- package/dist/plugins/local-session-store.js +412 -105
- package/dist/plugins/mailbox-store-sql.d.ts +11 -3
- package/dist/plugins/mailbox-store-sql.js +103 -15
- package/dist/plugins/memory-key-guards.d.ts +4 -0
- package/dist/plugins/memory-key-guards.js +1 -0
- package/dist/plugins/memory-run-store.d.ts +1 -1
- package/dist/plugins/memory-sync-store-pg.d.ts +16 -5
- package/dist/plugins/memory-sync-store-tidb.d.ts +3 -3
- package/dist/plugins/one-time-migrations.d.ts +117 -6
- package/dist/plugins/one-time-migrations.js +383 -14
- package/dist/plugins/outcome-ledger-sql.d.ts +2 -2
- package/dist/plugins/permission-rule-store-sql.d.ts +13 -15
- package/dist/plugins/permission-rule-store-sql.js +34 -29
- package/dist/plugins/pg-pool.d.ts +7 -3
- package/dist/plugins/pg-session-storage.d.ts +41 -22
- package/dist/plugins/pg-session-storage.js +136 -55
- package/dist/plugins/remote-env-adb.d.ts +22 -4
- package/dist/plugins/remote-env-adb.js +70 -62
- package/dist/plugins/remote-env-device.d.ts +32 -12
- package/dist/plugins/remote-env-device.js +18 -17
- package/dist/plugins/remote-env-e2b.d.ts +19 -3
- package/dist/plugins/remote-env-e2b.js +41 -42
- package/dist/plugins/remote-env-file-error.d.ts +2 -0
- package/dist/plugins/remote-env-file-error.js +1 -1
- package/dist/plugins/remote-env-host.d.ts +23 -8
- package/dist/plugins/remote-env-host.js +66 -70
- package/dist/plugins/remote-env-k8s.d.ts +13 -16
- package/dist/plugins/remote-env-k8s.js +61 -54
- package/dist/plugins/remote-env-local-docker.d.ts +30 -5
- package/dist/plugins/remote-env-local-docker.js +46 -59
- package/dist/plugins/remote-env-ssh.d.ts +18 -4
- package/dist/plugins/remote-env-ssh.js +72 -56
- package/dist/plugins/remote-shell.d.ts +100 -3
- package/dist/plugins/remote-shell.js +166 -2
- package/dist/plugins/retention-store-sql.d.ts +23 -8
- package/dist/plugins/retention-store-sql.js +13 -1
- package/dist/plugins/run-store-sql.d.ts +13 -3
- package/dist/plugins/run-store-sql.js +5 -0
- package/dist/plugins/schema-consistency.d.ts +15 -5
- package/dist/plugins/schema-consistency.js +14 -8
- package/dist/plugins/schema-drift-sentence.d.ts +27 -0
- package/dist/plugins/schema-drift-sentence.js +38 -0
- package/dist/plugins/session-fork.d.ts +63 -12
- package/dist/plugins/session-fork.js +38 -21
- package/dist/plugins/session-ownership.d.ts +7 -0
- package/dist/plugins/session-ownership.js +5 -0
- package/dist/plugins/session-row-sql.d.ts +22 -0
- package/dist/plugins/session-row-sql.js +81 -0
- package/dist/plugins/session-store.d.ts +1 -1
- package/dist/plugins/session-workspace-cell.d.ts +17 -0
- package/dist/plugins/session-workspace-cell.js +38 -0
- package/dist/plugins/store-backend.d.ts +1 -1
- package/dist/plugins/store-backend.js +26 -14
- package/dist/plugins/store-contracts.d.ts +25 -5
- package/dist/plugins/tidb-pool.d.ts +12 -7
- package/dist/plugins/tidb-pool.js +15 -3
- package/dist/plugins/tidb-session-store.d.ts +74 -28
- package/dist/plugins/tidb-session-store.js +132 -53
- package/dist/plugins/tool-result-store-sql.d.ts +16 -8
- package/dist/plugins/tool-result-store-sql.js +26 -17
- package/dist/plugins/worktree-isolation.d.ts +3 -2
- package/dist/plugins/worktree-isolation.js +1 -7
- package/dist/project-identity.d.ts +1 -14
- package/dist/project-identity.js +0 -4
- package/dist/project-memory.d.ts +9 -15
- package/dist/project-memory.js +5 -4
- package/dist/request-key-closure.js +1 -1
- package/dist/request-value-closure.d.ts +6 -7
- package/dist/request-value-closure.js +1 -3
- package/dist/rules-consent.js +6 -4
- package/dist/run-local.d.ts +6 -0
- package/dist/run-local.js +36 -26
- package/dist/runs.d.ts +9 -2
- package/dist/runs.js +9 -2
- package/dist/sandbox-git-plane.d.ts +2 -2
- package/dist/security.d.ts +38 -12
- package/dist/security.js +8 -2
- package/dist/server-secret-env.d.ts +15 -8
- package/dist/server-secret-env.js +4 -2
- package/dist/session-children-retire.d.ts +27 -9
- package/dist/session-children-retire.js +9 -5
- package/dist/session-incarnation.d.ts +19 -10
- package/dist/session-incarnation.js +5 -3
- package/dist/session-row.d.ts +114 -5
- package/dist/session-row.js +55 -5
- package/dist/session-titler.d.ts +2 -2
- package/dist/session-workspace.d.ts +130 -0
- package/dist/session-workspace.js +83 -0
- package/dist/spec-fields.d.ts +1 -1
- package/dist/standing-answer-grant.d.ts +2 -13
- package/dist/standing-answer-grant.js +0 -7
- package/dist/task-a2a.d.ts +44 -14
- package/dist/task-a2a.js +46 -20
- package/dist/task-cwd.d.ts +6 -1
- package/dist/task-mcp.d.ts +33 -20
- package/dist/task-mcp.js +46 -22
- package/dist/tool-approval.d.ts +38 -8
- package/dist/tool-approval.js +57 -13
- package/dist/trace/core-keyset-guard.d.ts +33 -18
- package/dist/trace/engine-notice-wire.d.ts +1 -1
- package/dist/trace/engine-notice-wire.js +2 -0
- package/dist/trace/exit-seat.d.ts +20 -1
- package/dist/trace/exit-seat.js +3 -0
- package/dist/trace/extension-call-face.d.ts +33 -0
- package/dist/trace/extension-call-face.js +39 -0
- package/dist/trace/project.d.ts +26 -7
- package/dist/trace/project.js +30 -3
- package/dist/trace/redact.js +42 -13
- package/dist/trace/self-minted-wire.d.ts +240 -12
- package/dist/trace/self-minted-wire.js +100 -4
- package/dist/trace/wire-projection-faces.d.ts +6 -6
- package/dist/trace/wire-projection-faces.js +6 -5
- package/dist/url-refusal.d.ts +1 -1
- package/dist/user-authored-text.d.ts +2 -2
- package/dist/user-authored-text.js +16 -1
- package/dist/web-admin-client/apply-effective.d.ts +17 -3
- package/dist/web-admin-client/apply-effective.js +20 -10
- package/dist/web-admin-client/center-request.d.ts +3 -2
- package/dist/web-admin-client/center-request.js +2 -3
- package/dist/web-admin-client/skills-mcp.d.ts +8 -4
- package/dist/web-admin-client/skills-mcp.js +32 -18
- package/dist/web-admin-client/types.d.ts +11 -0
- package/package.json +3 -3
- package/wire-changes/server@7.138.0.json +446 -0
- package/wire-changes/server@7.139.0.json +348 -0
- package/dist/http/device-placement.d.ts +0 -175
- package/dist/http/device-placement.js +0 -145
- package/dist/http/mcp-remote-text.d.ts +0 -5
- package/dist/http/mcp-remote-text.js +0 -7
package/dist/trace/project.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ import type { ModelUsageDelta, ModelUsageTracker, PromptManifestRecord } from ".
|
|
|
29
29
|
import type { RunCompanionRecord } from "../observability/prompt-manifest.js";
|
|
30
30
|
import { type SafeText } from "./exit-seat.js";
|
|
31
31
|
import { type SemaProvenanceInput } from "./sema-provenance.js";
|
|
32
|
+
import { type ExtensionRequesterFace, type ToolInputRewriteFace } from "./extension-call-face.js";
|
|
32
33
|
import type { LedgerEventType } from "./ledger-events.js";
|
|
33
34
|
import type { InstructionsSegment } from "../instruction-selection.js";
|
|
34
35
|
import type { RunSkillEntry } from "../capabilities/skills.js";
|
|
@@ -101,6 +102,8 @@ export type TraceBlock = {
|
|
|
101
102
|
name: string;
|
|
102
103
|
label?: string;
|
|
103
104
|
input: unknown;
|
|
105
|
+
recovered?: true;
|
|
106
|
+
requestedBy?: ExtensionRequesterFace;
|
|
104
107
|
eventId?: string;
|
|
105
108
|
parentToolCallId?: string;
|
|
106
109
|
} | {
|
|
@@ -119,6 +122,11 @@ export type TraceBlock = {
|
|
|
119
122
|
delivered?: McpDelivered;
|
|
120
123
|
gate?: GateOutcome;
|
|
121
124
|
gatedCallId?: string;
|
|
125
|
+
wireName?: string;
|
|
126
|
+
notExecuted?: true;
|
|
127
|
+
answeredBy?: string;
|
|
128
|
+
requestedBy?: ExtensionRequesterFace;
|
|
129
|
+
rewrite?: ToolInputRewriteFace;
|
|
122
130
|
eventId?: string;
|
|
123
131
|
parentToolCallId?: string;
|
|
124
132
|
} | {
|
|
@@ -157,6 +165,7 @@ export declare function toolStartEventData(ev: {
|
|
|
157
165
|
label?: string;
|
|
158
166
|
args: unknown;
|
|
159
167
|
recovered?: true;
|
|
168
|
+
requestedBy?: unknown;
|
|
160
169
|
eventId?: string;
|
|
161
170
|
parentToolCallId?: string;
|
|
162
171
|
}): Record<string, unknown>;
|
|
@@ -295,6 +304,9 @@ export declare function toolEndEventData(ev: {
|
|
|
295
304
|
gatedCallId?: string;
|
|
296
305
|
wireName?: string;
|
|
297
306
|
notExecuted?: true;
|
|
307
|
+
answeredBy?: unknown;
|
|
308
|
+
requestedBy?: unknown;
|
|
309
|
+
rewrite?: unknown;
|
|
298
310
|
eventId?: string;
|
|
299
311
|
parentToolCallId?: string;
|
|
300
312
|
}): Record<string, unknown>;
|
|
@@ -628,11 +640,11 @@ export declare function compactionStartedEventData(ev: {
|
|
|
628
640
|
parentToolCallId?: unknown;
|
|
629
641
|
}): Record<string, unknown>;
|
|
630
642
|
/** The `workspace_changed` payload([ref]二 core 裁定:[ref] §E13 旧臂,L1 门本车首次撞见——非新增,
|
|
631
|
-
* 是本门扩 TaskEvent
|
|
632
|
-
*
|
|
633
|
-
* RAW 逻辑路径,symlink 不解析]→
|
|
634
|
-
* 惯例]
|
|
635
|
-
*
|
|
643
|
+
* 是本门扩 TaskEvent 臂集时第一次显式处置)。core 7.58.0 起这一帧是腿的**整份快照**:每条经 `prepareExecutionEnv` 装配的腿起点一帧(`cwd` 可与上一帧相同;verify / cascade 的组合入口不经该装配、按契约没有这一帧)、
|
|
644
|
+
* 其后每变一帧(bash `cd` / EnterWorktree / ExitWorktree)。wire 上只投 `cwd`(其余四成员的处置在 `wire-projection-faces.ts` 那一行);
|
|
645
|
+
* cwd 与已展示的工具 args 同信任级[UNTRUSTED,RAW 逻辑路径,symlink 不解析]→ 出口座的有界位[300,与 brainStatusEventData.detail 同
|
|
646
|
+
* 惯例]。消费端按快照读:与已持有的 `cwd` 相同的一帧不渲染成「目录变了」。服务端只如实转发单帧;会话行上的那份最后一帧另由
|
|
647
|
+
* `session-workspace.ts` 的记录座存(不是本投影)。 */
|
|
636
648
|
export declare function workspaceChangedEventData(ev: {
|
|
637
649
|
cwd: string;
|
|
638
650
|
eventId?: string;
|
|
@@ -1002,6 +1014,9 @@ export declare function brainStatusEventData(ev: {
|
|
|
1002
1014
|
timeoutMs?: number;
|
|
1003
1015
|
providerCondition?: string;
|
|
1004
1016
|
providerConditionSource?: string;
|
|
1017
|
+
waitSegment?: string;
|
|
1018
|
+
sleptMs?: number;
|
|
1019
|
+
seat?: string;
|
|
1005
1020
|
eventId?: string;
|
|
1006
1021
|
parentToolCallId?: string;
|
|
1007
1022
|
}): FrameData<{
|
|
@@ -1171,8 +1186,12 @@ export declare function toContractTokens(usage: unknown, usageMissing?: unknown)
|
|
|
1171
1186
|
* (trace SSE 面)对同一账本行的字段选择逐字同构,此前两处独立手写,structured/totalChars/label
|
|
1172
1187
|
* 三次扩字段各改两遍(见两处对偶注)。收一份:两面各自包装键名皮(id/name/input vs 同名),
|
|
1173
1188
|
* 字段集合从此单点演进。 */
|
|
1174
|
-
export declare function toolCallFieldsOf(d: Record<string, unknown>):
|
|
1175
|
-
|
|
1189
|
+
export declare function toolCallFieldsOf(d: Record<string, unknown>): Omit<Extract<TraceBlock, {
|
|
1190
|
+
type: "tool-call";
|
|
1191
|
+
}>, "type">;
|
|
1192
|
+
export declare function toolResultFieldsOf(d: Record<string, unknown>): Omit<Extract<TraceBlock, {
|
|
1193
|
+
type: "tool-result";
|
|
1194
|
+
}>, "type" | "output" | "isError">;
|
|
1176
1195
|
export interface ProjectOpts {
|
|
1177
1196
|
/** Prepend the user turn (the objective is not in the event log; the endpoint supplies it). */
|
|
1178
1197
|
objective?: string;
|
package/dist/trace/project.js
CHANGED
|
@@ -10,8 +10,10 @@ import { injectionTierOrAbsent } from "./injection-tier.js";
|
|
|
10
10
|
import { semaProvenanceOrAbsent } from "./sema-provenance.js";
|
|
11
11
|
import { resupplyFields, terminalFrameFacetFields } from "./task-notification-facets.js";
|
|
12
12
|
import { dropProjectedFace } from "./projection-drop.js";
|
|
13
|
+
import { extensionAnswererOf, extensionRequesterOf, toolInputRewriteOf } from "./extension-call-face.js";
|
|
13
14
|
import { projectByTable } from "./projection-table.js";
|
|
14
15
|
import { durableRowIdentity } from "../checkpoint-identity.js";
|
|
16
|
+
import { projectMcpAuthorization } from "../mcp-authorization-face.js";
|
|
15
17
|
export async function appendModelUsageDelta(append, modelUsage, taskId) {
|
|
16
18
|
const delta = modelUsage?.drain(taskId);
|
|
17
19
|
if (delta) {
|
|
@@ -95,13 +97,18 @@ function identityKey(v) {
|
|
|
95
97
|
export function modelTextEventData(ev) {
|
|
96
98
|
return { text: ev.text, ...(ev.eventId ? { eventId: ev.eventId } : {}) };
|
|
97
99
|
}
|
|
100
|
+
function toolArgsOnWire(args) {
|
|
101
|
+
return redactDeep(args);
|
|
102
|
+
}
|
|
98
103
|
export function toolStartEventData(ev) {
|
|
104
|
+
const requestedBy = extensionRequesterOf(ev.requestedBy, "tool_start");
|
|
99
105
|
return {
|
|
100
106
|
toolCallId: ev.toolCallId,
|
|
101
107
|
toolName: ev.toolName,
|
|
102
108
|
...(ev.label !== undefined ? { label: ev.label } : {}),
|
|
103
|
-
args:
|
|
109
|
+
args: toolArgsOnWire(ev.args),
|
|
104
110
|
...(ev.recovered === true ? { recovered: true } : {}),
|
|
111
|
+
...(requestedBy !== undefined ? { requestedBy } : {}),
|
|
105
112
|
...identityFields(ev),
|
|
106
113
|
};
|
|
107
114
|
}
|
|
@@ -166,6 +173,7 @@ function screenedGateOrThrow(v) {
|
|
|
166
173
|
...(d.mode === undefined ? {} : { mode: d.mode }),
|
|
167
174
|
...(d.askClass === undefined ? {} : { askClass: d.askClass }),
|
|
168
175
|
...(d.classes === undefined ? {} : { classes: [...d.classes] }),
|
|
176
|
+
...(d.extension === undefined ? {} : { extension: seatText("trace-frame-text", d.extension) }),
|
|
169
177
|
}
|
|
170
178
|
: { kind: "allowed", ...(classifier === undefined ? {} : { classifier }), ...(released === undefined ? {} : { released }), ...(clearedBy === undefined ? {} : { clearedBy }) },
|
|
171
179
|
...(settlement === undefined ? {} : { settlement }),
|
|
@@ -225,6 +233,9 @@ export function reasoningEndEventData(ev) {
|
|
|
225
233
|
}
|
|
226
234
|
export function toolEndEventData(ev) {
|
|
227
235
|
const gate = ev.gate === undefined ? undefined : screenedGate(ev.gate);
|
|
236
|
+
const answeredBy = extensionAnswererOf(ev.answeredBy, "tool_end");
|
|
237
|
+
const requestedBy = extensionRequesterOf(ev.requestedBy, "tool_end");
|
|
238
|
+
const rewrite = toolInputRewriteOf(ev.rewrite, "tool_end", toolArgsOnWire);
|
|
228
239
|
return {
|
|
229
240
|
toolCallId: ev.toolCallId,
|
|
230
241
|
toolName: ev.toolName,
|
|
@@ -240,6 +251,9 @@ export function toolEndEventData(ev) {
|
|
|
240
251
|
...(typeof ev.gatedCallId === "string" && ev.gatedCallId !== "" ? { gatedCallId: ev.gatedCallId } : {}),
|
|
241
252
|
...(typeof ev.wireName === "string" && ev.wireName !== "" ? { wireName: ev.wireName } : {}),
|
|
242
253
|
...(ev.notExecuted === true ? { notExecuted: true } : {}),
|
|
254
|
+
...(answeredBy !== undefined ? { answeredBy } : {}),
|
|
255
|
+
...(requestedBy !== undefined ? { requestedBy } : {}),
|
|
256
|
+
...(rewrite !== undefined ? { rewrite } : {}),
|
|
243
257
|
...identityFields(ev),
|
|
244
258
|
};
|
|
245
259
|
}
|
|
@@ -456,6 +470,7 @@ export function projectWiringManifestMcpRows(mcpIn) {
|
|
|
456
470
|
...(str(e.errorCode) !== undefined ? { errorCode: e.errorCode } : {}),
|
|
457
471
|
...(typeof e.delivered === "string" && MCP_DELIVERY_VERDICTS.includes(e.delivered) ? { delivered: e.delivered } : {}),
|
|
458
472
|
...(num(e.httpStatus) !== undefined ? { httpStatus: e.httpStatus } : {}),
|
|
473
|
+
...((a) => (a !== undefined ? { authorization: a } : {}))(projectMcpAuthorization(e.authorization)),
|
|
459
474
|
...(liveness !== undefined ? { liveness } : {}),
|
|
460
475
|
});
|
|
461
476
|
}
|
|
@@ -570,10 +585,11 @@ export function wiringManifestEventData(ev, minted) {
|
|
|
570
585
|
dropProjectedFace("wiring_manifest.mods[] row is missing name/seat/tier");
|
|
571
586
|
continue;
|
|
572
587
|
}
|
|
588
|
+
const provenance = e.provenance === undefined ? undefined : (registrantText(e.provenance) ?? dropProjectedFace("wiring_manifest.mods[].provenance is not a string"));
|
|
573
589
|
const refusedBy = registrantText(e.refusedBy);
|
|
574
590
|
const reason = registrantText(e.reason);
|
|
575
591
|
if (refusedBy !== undefined && reason !== undefined) {
|
|
576
|
-
rows.push({ name, seat, tier, refusedBy, reason });
|
|
592
|
+
rows.push({ name, seat, tier, ...(provenance !== undefined ? { provenance } : {}), refusedBy, reason });
|
|
577
593
|
continue;
|
|
578
594
|
}
|
|
579
595
|
const events = strList(e.events);
|
|
@@ -597,7 +613,7 @@ export function wiringManifestEventData(ev, minted) {
|
|
|
597
613
|
return [{ registration, cause, reason: why }];
|
|
598
614
|
})
|
|
599
615
|
: dropProjectedFace("wiring_manifest.mods[].skipped is not an array");
|
|
600
|
-
rows.push({ name, seat, tier, events, ...(observe !== undefined ? { observe } : {}), ...(skipped !== undefined && skipped.length > 0 ? { skipped } : {}) });
|
|
616
|
+
rows.push({ name, seat, tier, ...(provenance !== undefined ? { provenance } : {}), events, ...(observe !== undefined ? { observe } : {}), ...(skipped !== undefined && skipped.length > 0 ? { skipped } : {}) });
|
|
601
617
|
}
|
|
602
618
|
return rows.length > 0 ? rows : undefined;
|
|
603
619
|
})();
|
|
@@ -804,6 +820,9 @@ export function brainStatusEventData(ev) {
|
|
|
804
820
|
...(num(ev.retryAtMs) ? { retryAtMs: ev.retryAtMs } : {}),
|
|
805
821
|
...(num(ev.elapsedMs) ? { elapsedMs: ev.elapsedMs } : {}),
|
|
806
822
|
...(num(ev.timeoutMs) ? { timeoutMs: ev.timeoutMs } : {}),
|
|
823
|
+
...(typeof ev.waitSegment === "string" && ev.waitSegment.length > 0 ? { waitSegment: ev.waitSegment } : {}),
|
|
824
|
+
...(num(ev.sleptMs) ? { sleptMs: ev.sleptMs } : {}),
|
|
825
|
+
...(typeof ev.seat === "string" && ev.seat.length > 0 ? { seat: ev.seat } : {}),
|
|
807
826
|
...(num(ev.errorStatus) ? { errorStatus: ev.errorStatus } : {}),
|
|
808
827
|
...(typeof ev.errClass === "string" && ev.errClass.length > 0 ? { errClass: ev.errClass } : {}),
|
|
809
828
|
...(typeof ev.providerCondition === "string" && ev.providerCondition.length > 0 ? { providerCondition: ev.providerCondition } : {}),
|
|
@@ -929,17 +948,22 @@ export function toContractTokens(usage, usageMissing) {
|
|
|
929
948
|
};
|
|
930
949
|
}
|
|
931
950
|
export function toolCallFieldsOf(d) {
|
|
951
|
+
const requestedBy = extensionRequesterOf(d.requestedBy, "tool_start row");
|
|
932
952
|
return {
|
|
933
953
|
id: String(d.toolCallId ?? ""),
|
|
934
954
|
name: String(d.toolName ?? ""),
|
|
935
955
|
...(typeof d.label === "string" ? { label: d.label } : {}),
|
|
936
956
|
input: d.args,
|
|
937
957
|
...(d.recovered === true ? { recovered: true } : {}),
|
|
958
|
+
...(requestedBy !== undefined ? { requestedBy } : {}),
|
|
938
959
|
...identityFields(d),
|
|
939
960
|
};
|
|
940
961
|
}
|
|
941
962
|
export function toolResultFieldsOf(d) {
|
|
942
963
|
const gate = d.gate === undefined ? undefined : screenedGate(d.gate);
|
|
964
|
+
const answeredBy = extensionAnswererOf(d.answeredBy, "tool_end row");
|
|
965
|
+
const requestedBy = extensionRequesterOf(d.requestedBy, "tool_end row");
|
|
966
|
+
const rewrite = toolInputRewriteOf(d.rewrite, "tool_end row", toolArgsOnWire);
|
|
943
967
|
return {
|
|
944
968
|
callId: String(d.toolCallId ?? ""),
|
|
945
969
|
...(typeof d.label === "string" ? { label: d.label } : {}),
|
|
@@ -952,6 +976,9 @@ export function toolResultFieldsOf(d) {
|
|
|
952
976
|
...(typeof d.gatedCallId === "string" && d.gatedCallId !== "" ? { gatedCallId: d.gatedCallId } : {}),
|
|
953
977
|
...(typeof d.wireName === "string" && d.wireName !== "" ? { wireName: d.wireName } : {}),
|
|
954
978
|
...(d.notExecuted === true ? { notExecuted: true } : {}),
|
|
979
|
+
...(answeredBy !== undefined ? { answeredBy } : {}),
|
|
980
|
+
...(requestedBy !== undefined ? { requestedBy } : {}),
|
|
981
|
+
...(rewrite !== undefined ? { rewrite } : {}),
|
|
955
982
|
...identityFields(d),
|
|
956
983
|
};
|
|
957
984
|
}
|
package/dist/trace/redact.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { displayUrlOf, stripFormatCharacters } from "@sema-agent/core";
|
|
1
|
+
import { REDACTION_MARK, displayUrlOf, stripFormatCharacters } from "@sema-agent/core";
|
|
2
2
|
import { CONTROL_AND_BIDI_CHARS, CREDENTIAL_PARAM_NAMES, isHierarchicalUrl } from "@sema-agent/settings-schema";
|
|
3
3
|
import { recordFailOpen } from "../observability/fail-open.js";
|
|
4
4
|
const normalizeForRedaction = stripFormatCharacters;
|
|
@@ -903,8 +903,9 @@ const PPK_CONTAINER_TOKEN = "«redacted:private-key»";
|
|
|
903
903
|
const PEM_FRAGMENT_TOKEN = "«redacted:private-key:partial»";
|
|
904
904
|
const HEADLESS_PPK_TOKEN = "«redacted:private-key:partial»";
|
|
905
905
|
const ANCHORED_VALUE_TOKEN = "«redacted»";
|
|
906
|
+
const BEARER_VALUE_MIN = 20;
|
|
906
907
|
const KEYWORD_SECRET_PATTERNS = [
|
|
907
|
-
[keywordArm("[Bb]earer", "[A-Za-z0-9._~+/-]",
|
|
908
|
+
[keywordArm("[Bb]earer", "[A-Za-z0-9._~+/-]", BEARER_VALUE_MIN, "=*", SCHEME_SEPARATOR_CLASS), "Bearer «redacted»"],
|
|
908
909
|
[keywordArm("Basic", "[A-Za-z0-9+/]", 16, "={0,2}", SCHEME_SEPARATOR_CLASS), "Basic «redacted»"],
|
|
909
910
|
[keywordArm("[Tt]oken", "[A-Za-z0-9._~+/-]", 20), "token «redacted»"],
|
|
910
911
|
];
|
|
@@ -2031,6 +2032,15 @@ function collectJsonSecretFieldSpans(text, span, isHead) {
|
|
|
2031
2032
|
}
|
|
2032
2033
|
}
|
|
2033
2034
|
const STRONG_AUTH_SCHEMES = new Set(["basic", "bearer"]);
|
|
2035
|
+
function isEngineMarkedCandidate(text, start, end, repl) {
|
|
2036
|
+
const open = repl.indexOf("«");
|
|
2037
|
+
const close = repl.lastIndexOf("»");
|
|
2038
|
+
if (open <= 0 || close < open || close === repl.length - 1)
|
|
2039
|
+
return false;
|
|
2040
|
+
const lead = repl.slice(0, open);
|
|
2041
|
+
const trail = repl.slice(close + 1);
|
|
2042
|
+
return end - start === lead.length + REDACTION_MARK.length + trail.length && text.startsWith(lead, start) && text.startsWith(REDACTION_MARK, start + lead.length) && text.startsWith(trail, end - trail.length);
|
|
2043
|
+
}
|
|
2034
2044
|
const STRONG_AUTH_SCHEME_MAX = Math.max(...[...STRONG_AUTH_SCHEMES].map((w) => w.length));
|
|
2035
2045
|
const ABSENT_OR_BOOLEAN_WORDS = new Set(["null", "nil", "none", "undefined", "true", "false", "yes", "no"]);
|
|
2036
2046
|
const ABSENT_OR_BOOLEAN_MAX = Math.max(...[...ABSENT_OR_BOOLEAN_WORDS].map((w) => w.length));
|
|
@@ -2287,11 +2297,18 @@ function schemeValueAt(text, s, json) {
|
|
|
2287
2297
|
if (isQuoteUnit(unitChOf(opening)) || unitChOf(opening) === JSON_STRING_END)
|
|
2288
2298
|
i += unitLenOf(opening);
|
|
2289
2299
|
const w = i;
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2300
|
+
const engineMarked = text.startsWith(REDACTION_MARK, i);
|
|
2301
|
+
if (engineMarked) {
|
|
2302
|
+
i += REDACTION_MARK.length;
|
|
2303
|
+
anchoredScanUnits += REDACTION_MARK.length;
|
|
2304
|
+
}
|
|
2305
|
+
else {
|
|
2306
|
+
while (i < n && i - w <= STRONG_AUTH_SCHEME_MAX && (isIdentStartCode(text.charCodeAt(i))))
|
|
2307
|
+
i += 1;
|
|
2308
|
+
anchoredScanUnits += i - w;
|
|
2309
|
+
if (i - w > STRONG_AUTH_SCHEME_MAX || !STRONG_AUTH_SCHEMES.has(text.slice(w, i).toLowerCase()))
|
|
2310
|
+
return undefined;
|
|
2311
|
+
}
|
|
2295
2312
|
let separated = false;
|
|
2296
2313
|
while (i < n) {
|
|
2297
2314
|
const unit = readAnchorUnit(text, i, json);
|
|
@@ -2304,6 +2321,17 @@ function schemeValueAt(text, s, json) {
|
|
|
2304
2321
|
if (!separated)
|
|
2305
2322
|
return undefined;
|
|
2306
2323
|
const vs = i;
|
|
2324
|
+
if (engineMarked) {
|
|
2325
|
+
let k = i;
|
|
2326
|
+
while (k < n && isToken68Code(text.charCodeAt(k)))
|
|
2327
|
+
k += 1;
|
|
2328
|
+
while (k < n && text.charCodeAt(k) === CH_EQ)
|
|
2329
|
+
k += 1;
|
|
2330
|
+
if (k - vs >= BEARER_VALUE_MIN) {
|
|
2331
|
+
anchoredScanUnits += k - vs;
|
|
2332
|
+
return { start: vs, end: k, quoted: false };
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2307
2335
|
if (i >= n || !isAsciiAlnumCode(text.charCodeAt(i)))
|
|
2308
2336
|
return undefined;
|
|
2309
2337
|
while (i < n && isToken68Code(text.charCodeAt(i)))
|
|
@@ -2625,7 +2653,7 @@ const armPool = (() => {
|
|
|
2625
2653
|
const headFirstUnit = unionMembers(retryMembers.map((m) => m.headFirst)) ?? new Uint32Array(0x10000 >>> 5).fill(0xffffffff);
|
|
2626
2654
|
poolArmCount = members.length;
|
|
2627
2655
|
poolBoundaryArmCount = retryMembers.length;
|
|
2628
|
-
return (text, wantCount, json, eat, scope, reach) => {
|
|
2656
|
+
return (text, wantCount, json, eat, scope, reach, engineMarked) => {
|
|
2629
2657
|
readings += 1;
|
|
2630
2658
|
const isHead = reach !== undefined;
|
|
2631
2659
|
const lane = LANES[scope];
|
|
@@ -2695,8 +2723,8 @@ const armPool = (() => {
|
|
|
2695
2723
|
}
|
|
2696
2724
|
}
|
|
2697
2725
|
poolSpanCount += spans.length;
|
|
2698
|
-
const survives = (sp) => sp.undecided !== true || reach === undefined || reach(sp.start);
|
|
2699
|
-
const kept = resolveSpanOverlaps(
|
|
2726
|
+
const survives = (sp) => !engineMarked(sp.start, sp.end, sp.repl) && (sp.undecided !== true || reach === undefined || reach(sp.start));
|
|
2727
|
+
const kept = resolveSpanOverlaps(spans.filter(survives));
|
|
2700
2728
|
if (!wantCount || kept.length === 0)
|
|
2701
2729
|
return { hits: NO_HITS, kept };
|
|
2702
2730
|
const tokenOf = (sp) => members[sp.order].token;
|
|
@@ -2727,8 +2755,8 @@ let onRedaction;
|
|
|
2727
2755
|
export function setRedactionObserver(fn) {
|
|
2728
2756
|
onRedaction = fn;
|
|
2729
2757
|
}
|
|
2730
|
-
function applyRules(text, wantCount, json, eat, scope, reach) {
|
|
2731
|
-
return armPool(text, wantCount, json, eat, scope, reach);
|
|
2758
|
+
function applyRules(text, wantCount, json, eat, scope, reach, engineMarked) {
|
|
2759
|
+
return armPool(text, wantCount, json, eat, scope, reach, engineMarked);
|
|
2732
2760
|
}
|
|
2733
2761
|
function reportHits(hits) {
|
|
2734
2762
|
if (onRedaction === undefined)
|
|
@@ -2856,7 +2884,8 @@ function runRedaction(text, observe, json, wantHits, scope, layout, extent) {
|
|
|
2856
2884
|
const read = (layers, view) => {
|
|
2857
2885
|
const toOriginal = createViewToOriginal(layers);
|
|
2858
2886
|
const reach = extent.kind === "head" ? (viewStart) => toOriginal.start(viewStart) < extent.emitEnd : undefined;
|
|
2859
|
-
const
|
|
2887
|
+
const engineMarked = (viewStart, viewEnd, repl) => isEngineMarkedCandidate(text, toOriginal.start(viewStart), toOriginal.start(viewEnd - 1) + 1, repl);
|
|
2888
|
+
const r = applyRules(view, wantCount, json, eat, scope, reach, engineMarked);
|
|
2860
2889
|
forgetEscapedSeparatorTails();
|
|
2861
2890
|
readsSoFar += 1;
|
|
2862
2891
|
if (readsSoFar === 1) {
|
|
@@ -105,6 +105,10 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
105
105
|
readonly attr: 400;
|
|
106
106
|
readonly since: "7.52.0";
|
|
107
107
|
};
|
|
108
|
+
readonly "config.memory_erasure_scope": {
|
|
109
|
+
readonly attr: 400;
|
|
110
|
+
readonly since: "7.138.0";
|
|
111
|
+
};
|
|
108
112
|
readonly "memory.target_outside_store": {
|
|
109
113
|
readonly attr: 409;
|
|
110
114
|
readonly since: "7.101.0";
|
|
@@ -625,6 +629,126 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
625
629
|
};
|
|
626
630
|
};
|
|
627
631
|
};
|
|
632
|
+
/** `GET /health` 的 `mods` 段:运维声明的 mod 包起服装上了几只(present-iff 装上了;与能力位 `modsDeploymentPackages` 同读一只事实)。 */
|
|
633
|
+
readonly healthModsKey: {
|
|
634
|
+
readonly at: "GET /health mods";
|
|
635
|
+
readonly members: {
|
|
636
|
+
deploymentPackages: {
|
|
637
|
+
attr: string;
|
|
638
|
+
since: string;
|
|
639
|
+
};
|
|
640
|
+
};
|
|
641
|
+
};
|
|
642
|
+
/** `GET /v1/models` 的 `models[]` 行键(只登本版新出现的键;行的其余键不是本版新上 wire):`supportsThinkingOff` —— 「这只模型的推理能不能关」,恒在场的布尔,值 = 引擎唯一读法 `thinkingOffSpelled(条目)`。 */
|
|
643
|
+
readonly modelsRowKey: {
|
|
644
|
+
readonly at: "GET /v1/models models[] 行键(<键> → 在场律)";
|
|
645
|
+
readonly members: {
|
|
646
|
+
readonly supportsThinkingOff: {
|
|
647
|
+
readonly attr: "always";
|
|
648
|
+
readonly since: "7.138.0";
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
};
|
|
652
|
+
/** `GET /v1/sessions/:id/background` 的 `rows[]` 上本版新出现的键:`sessionId` —— 后台 agent 行的子会话 id(引擎绑定之后才在,别的行型恒缺席;只是 id,不授读权)。 */
|
|
653
|
+
readonly sessionBackgroundRowKey: {
|
|
654
|
+
readonly at: "GET /v1/sessions/:id/background rows[] 行键(<键> → 在场律)";
|
|
655
|
+
readonly members: {
|
|
656
|
+
sessionId: {
|
|
657
|
+
attr: string;
|
|
658
|
+
since: string;
|
|
659
|
+
};
|
|
660
|
+
};
|
|
661
|
+
};
|
|
662
|
+
/** 会话列表行(`GET /v1/sessions` 的 `sessions[]`;同一只投影 = `PATCH /v1/sessions/:id` 的 200 体与 409 `conflict.session_row_changed` 的 `currentRow`)上本版新出现的键:`rowTag` —— 行标签(条件写的前置条件值;读时派生、零存储)。 */
|
|
663
|
+
readonly sessionsListRowKey: {
|
|
664
|
+
readonly at: "GET /v1/sessions sessions[] 行键 = PATCH /v1/sessions/:id 200 体 = 409 conflict.session_row_changed currentRow(<键> → 在场律)";
|
|
665
|
+
readonly members: {
|
|
666
|
+
rowTag: {
|
|
667
|
+
attr: string;
|
|
668
|
+
since: string;
|
|
669
|
+
};
|
|
670
|
+
};
|
|
671
|
+
};
|
|
672
|
+
/** `tool_end` 帧 `gate.disposition`(denied 臂)上的键(<臂>#<键> → 在场律;回放面 `GET /v1/runs/:id/events` 同读):`extension` —— hook 层拒且拒者的扩展注册名已知时 = 那张注册的名字(过出口座)。 */
|
|
673
|
+
readonly toolEndGateDispositionKey: {
|
|
674
|
+
readonly at: "tool_end gate.disposition 键(<臂>#<键> → 在场律)";
|
|
675
|
+
readonly members: {
|
|
676
|
+
readonly "denied#extension": {
|
|
677
|
+
readonly attr: "present-iff hook-layer denial by a named extension";
|
|
678
|
+
readonly since: "7.138.0";
|
|
679
|
+
};
|
|
680
|
+
};
|
|
681
|
+
};
|
|
682
|
+
/** `POST /v1/side-query` 200 体的键(只登本版新出现的键):`account` —— 本次侧查询的一行账(引擎定价、逐字过境;`costMicroUsd` 任何一笔未定价即缺席)。 */
|
|
683
|
+
readonly sideQueryBodyKey: {
|
|
684
|
+
readonly at: "POST /v1/side-query 200 体键(<键> → 在场律)";
|
|
685
|
+
readonly members: {
|
|
686
|
+
readonly account: {
|
|
687
|
+
readonly attr: "always";
|
|
688
|
+
readonly since: "7.138.0";
|
|
689
|
+
};
|
|
690
|
+
};
|
|
691
|
+
};
|
|
692
|
+
/**
|
|
693
|
+
* `POST /v1/side-query` 200 体在失败时的 `errorKind` 值里本版新出现的词(机读失败种类;缺席 = 引擎没给)。词是引擎铸的闭集,本服务逐字过境(`projectSideQueryResult`),词表属主 = 引擎的 `AssistantMessage.errorKind`:
|
|
694
|
+
* `satisfies Partial<Record<…>>` 把「登的是引擎的词」绑在引擎的型上。`image_unprocessable` —— 服务商处理不了请求里的图 —— 是本版新词;此前的三词(`input_too_long` / `length_empty` / `degenerate`,自 7.135.0 起在 wire 上)
|
|
695
|
+
* 不在本集 —— 同上面四个集的口径,只登本版新出现的。
|
|
696
|
+
*/
|
|
697
|
+
readonly sideQueryErrorKind: {
|
|
698
|
+
readonly at: "POST /v1/side-query 200 体 errorKind 的值(失败时在场;引擎的词逐字过境)";
|
|
699
|
+
readonly members: {
|
|
700
|
+
image_unprocessable: {
|
|
701
|
+
attr: string;
|
|
702
|
+
since: string;
|
|
703
|
+
};
|
|
704
|
+
};
|
|
705
|
+
};
|
|
706
|
+
/** MCP 授权记录 `authorization`(只投闭集词 `reason`,与 `errorCode:"unauthorized"` 同行)出现的三张面;投影只有 `mcp-authorization-face.ts` 的 `projectMcpAuthorization` 一只,三面同读。 */
|
|
707
|
+
readonly mcpAuthorizationKey: {
|
|
708
|
+
readonly at: "MCP 授权记录 authorization 的出现面(<面>#<键> → 在场律)";
|
|
709
|
+
readonly members: {
|
|
710
|
+
readonly "wiring_manifest.mcp[]#authorization": {
|
|
711
|
+
readonly attr: "present-iff errorCode unauthorized";
|
|
712
|
+
readonly since: "7.138.0";
|
|
713
|
+
};
|
|
714
|
+
readonly "POST /v1/sessions/:id/mcp/reconnect#status.authorization": {
|
|
715
|
+
readonly attr: "present-iff errorCode unauthorized";
|
|
716
|
+
readonly since: "7.138.0";
|
|
717
|
+
};
|
|
718
|
+
readonly "GET /v1/sessions/:id/mcp#servers[].authorization": {
|
|
719
|
+
readonly attr: "present-iff server unauthorized (this face carries no errorCode)";
|
|
720
|
+
readonly since: "7.138.0";
|
|
721
|
+
};
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
/** `wiring_manifest.mods[].provenance`(每条腿的清单帧,每行 mod 注册一个出处标签):本服务自铸的注册带 `server`、运维声明的包带 `operator`;与同一行上 `seat` 的座词(`deployment` / `task`)互不相交。 */
|
|
725
|
+
readonly wiringModProvenance: {
|
|
726
|
+
readonly at: "wiring_manifest mods[].provenance";
|
|
727
|
+
readonly members: {
|
|
728
|
+
server: {
|
|
729
|
+
attr: string;
|
|
730
|
+
since: string;
|
|
731
|
+
};
|
|
732
|
+
operator: {
|
|
733
|
+
attr: string;
|
|
734
|
+
since: string;
|
|
735
|
+
};
|
|
736
|
+
};
|
|
737
|
+
};
|
|
738
|
+
/** 扩展经 `$.tool.call` 自己发起的调用是谁要的(core `AskRequest.requestedBy`)在审批开卡帧上的出现面:旧族 `tool_approval`、呈卡族 `approval_request` 顶层(卡外座)。 */
|
|
739
|
+
readonly extensionRequesterSeat: {
|
|
740
|
+
readonly at: "审批开卡帧上的 requestedBy(<帧>#requestedBy → 在场律)";
|
|
741
|
+
readonly members: {
|
|
742
|
+
"tool_approval#requestedBy": {
|
|
743
|
+
attr: string;
|
|
744
|
+
since: string;
|
|
745
|
+
};
|
|
746
|
+
"approval_request#requestedBy": {
|
|
747
|
+
attr: string;
|
|
748
|
+
since: string;
|
|
749
|
+
};
|
|
750
|
+
};
|
|
751
|
+
};
|
|
628
752
|
/**
|
|
629
753
|
* `request.field_conflict` 拒体的 `detail.kind`(字段之间互斥 / 互为前置的哪一类;`detail.fields` = 请求体坐标,不在本表 —— 它不是闭集)。
|
|
630
754
|
* 词表属主 = `field-conflict.ts` 的 `FIELD_CONFLICT_KINDS`:`satisfies Record<FieldConflictKind, …>`,加词而本行没跟 / 多一个词 ⇒ tsc 红。
|
|
@@ -661,6 +785,10 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
661
785
|
attr: string;
|
|
662
786
|
since: string;
|
|
663
787
|
};
|
|
788
|
+
fork_target: {
|
|
789
|
+
attr: string;
|
|
790
|
+
since: string;
|
|
791
|
+
};
|
|
664
792
|
scratchpad_root: {
|
|
665
793
|
attr: string;
|
|
666
794
|
since: string;
|
|
@@ -1138,6 +1266,30 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
1138
1266
|
readonly attr: 200;
|
|
1139
1267
|
readonly since: "7.137.0";
|
|
1140
1268
|
};
|
|
1269
|
+
readonly "POST /v1/tasks|/v1/tasks/stream|/v1/runs#rewindFiles(\u65B0\u63D0\u4EA4;\u4F53 request.body_shape + unknownKeys [rewindFiles])": {
|
|
1270
|
+
readonly attr: 400;
|
|
1271
|
+
readonly since: "7.139.0";
|
|
1272
|
+
};
|
|
1273
|
+
readonly "POST /v1/side-query#uncoded_error_with_preflight_prefix(\u6CA1\u6709\u5F15\u64CE\u7801\u3001\u82F1\u6587\u5F00\u5934\u4E0E\u524D\u7F00\u8868\u540C\u5F62\u7684\u9519\u8BEF;\u4F53 internal.error)": {
|
|
1274
|
+
readonly attr: 500;
|
|
1275
|
+
readonly since: "7.139.0";
|
|
1276
|
+
};
|
|
1277
|
+
readonly "PATCH /v1/sessions/:id#mirror_row(\u53EA\u8BFB\u955C\u50CF\u884C\u4E0A\u7684\u5199,\u5E26\u4E0D\u5E26 expectedRowTag;\u4F53 conflict.session_mirror + forkPath)": {
|
|
1278
|
+
readonly attr: 409;
|
|
1279
|
+
readonly since: "7.139.0";
|
|
1280
|
+
};
|
|
1281
|
+
readonly "PATCH /v1/sessions/:id#owner_changed_after_gate(\u95E8\u90A3\u4E00\u8BFB\u4E4B\u540E\u540C\u4E00\u4F1A\u8BDD\u7684\u5C5E\u4E3B\u88AB\u6539;\u4F53 not_found.session)": {
|
|
1282
|
+
readonly attr: 404;
|
|
1283
|
+
readonly since: "7.139.0";
|
|
1284
|
+
};
|
|
1285
|
+
readonly "PATCH /v1/sessions/:id#expectedRowTag_stale(\u884C\u5DF2\u4E0D\u5728\u90A3\u53EA\u6807\u7B7E\u4E0A;\u4F53 conflict.session_row_changed + currentRow)": {
|
|
1286
|
+
readonly attr: 409;
|
|
1287
|
+
readonly since: "7.139.0";
|
|
1288
|
+
};
|
|
1289
|
+
readonly "PATCH /v1/sessions/:id#expectedRowTag_current(\u884C\u4ECD\u5728\u90A3\u53EA\u6807\u7B7E\u4E0A;\u4F53 = \u5217\u8868\u884C)": {
|
|
1290
|
+
readonly attr: 200;
|
|
1291
|
+
readonly since: "7.139.0";
|
|
1292
|
+
};
|
|
1141
1293
|
};
|
|
1142
1294
|
};
|
|
1143
1295
|
/**
|
|
@@ -1147,10 +1299,6 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
1147
1299
|
readonly refusalSentenceForm: {
|
|
1148
1300
|
readonly at: "拒体 message 的句型(<码>#<座> → 句型骨架;码 / 状态 / 机读位不变)";
|
|
1149
1301
|
readonly members: {
|
|
1150
|
-
readonly "409 decide.row_unrevivable#no_agent_name": {
|
|
1151
|
-
readonly attr: "ends: deny it to close the card (the agent then ends as failed)";
|
|
1152
|
-
readonly since: "7.136.0";
|
|
1153
|
-
};
|
|
1154
1302
|
readonly "409 decide.row_unrevivable#no_root_anchor": {
|
|
1155
1303
|
readonly attr: "ends: deny it to close the card (the agent then ends as failed)";
|
|
1156
1304
|
readonly since: "7.136.0";
|
|
@@ -1251,6 +1399,22 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
1251
1399
|
readonly attr: "unsupported (a body field of POST /v1/assistant/tasks/:id/plan_review — send it there, this door never reads it): checkpointId";
|
|
1252
1400
|
readonly since: "7.137.0";
|
|
1253
1401
|
};
|
|
1402
|
+
readonly "400 request.body_shape#PATCH /v1/sessions/:id": {
|
|
1403
|
+
readonly attr: "the body must be a JSON object carrying at least one of `title` and `pinned` (and, optionally, `expectedRowTag`), and nothing else";
|
|
1404
|
+
readonly since: "7.139.0";
|
|
1405
|
+
};
|
|
1406
|
+
readonly "400 request.field_invalid#PATCH /v1/sessions/:id.expectedRowTag": {
|
|
1407
|
+
readonly attr: "expectedRowTag must be the `rowTag` string a session list row carries (43 characters: letters, digits, `-` and `_`)";
|
|
1408
|
+
readonly since: "7.139.0";
|
|
1409
|
+
};
|
|
1410
|
+
readonly "409 conflict.session_mirror#PATCH /v1/sessions/:id": {
|
|
1411
|
+
readonly attr: "this session is a read-only mirror of a session whose writer is elsewhere — it cannot be renamed or pinned here; fork it (forkPath) to continue here; nothing was written";
|
|
1412
|
+
readonly since: "7.139.0";
|
|
1413
|
+
};
|
|
1414
|
+
readonly "409 conflict.session_row_changed#PATCH /v1/sessions/:id": {
|
|
1415
|
+
readonly attr: "the session row changed since the rowTag you sent was read — nothing was written; currentRow is the row as it stands now: decide again, then send its rowTag";
|
|
1416
|
+
readonly since: "7.139.0";
|
|
1417
|
+
};
|
|
1254
1418
|
};
|
|
1255
1419
|
};
|
|
1256
1420
|
/**
|
|
@@ -1266,6 +1430,27 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
1266
1430
|
};
|
|
1267
1431
|
};
|
|
1268
1432
|
};
|
|
1433
|
+
/**
|
|
1434
|
+
* 会话行写口 `PATCH /v1/sessions/:id`:体受理键里本版新增的一键与它两只 409 拒体上的键(`<面>#<键>` → 读法 / 在场律)。受理闭集属主 = `session-row.ts` 的体读者 `readSessionRowPatch`;
|
|
1435
|
+
* `conflict.session_mirror#forkPath` 是执行面同码同键,本版新出现的面是 PATCH。
|
|
1436
|
+
*/
|
|
1437
|
+
readonly sessionRowWriteKey: {
|
|
1438
|
+
readonly at: "PATCH /v1/sessions/:id 体受理键与 409 拒体键(<面>#<键> → 读法 / 在场律;只登本版新增的)";
|
|
1439
|
+
readonly members: {
|
|
1440
|
+
readonly "body#expectedRowTag": {
|
|
1441
|
+
readonly attr: "optional;43×[A-Za-z0-9_-] else 400 request.field_invalid;alone 400 request.body_shape;stale⇒409 conflict.session_row_changed";
|
|
1442
|
+
readonly since: "7.139.0";
|
|
1443
|
+
};
|
|
1444
|
+
readonly "409 conflict.session_row_changed#currentRow": {
|
|
1445
|
+
readonly attr: "always";
|
|
1446
|
+
readonly since: "7.139.0";
|
|
1447
|
+
};
|
|
1448
|
+
readonly "409 conflict.session_mirror#forkPath": {
|
|
1449
|
+
readonly attr: "always";
|
|
1450
|
+
readonly since: "7.139.0";
|
|
1451
|
+
};
|
|
1452
|
+
};
|
|
1453
|
+
};
|
|
1269
1454
|
/**
|
|
1270
1455
|
* `409 approval_stale` 拒体上的键,按出现面登记(`<端点>#<键>` → 在场律)。`currentPending` 的值形是每道门一形(`wire-types.ts` 的 `ApprovalStaleCurrentPending`:
|
|
1271
1456
|
* 这道门的决断体回显的那几位);本表只登本版新出现的面(`/decide` 那一形早于本表,不在这里)。
|
|
@@ -1305,6 +1490,24 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
1305
1490
|
};
|
|
1306
1491
|
};
|
|
1307
1492
|
};
|
|
1493
|
+
/**
|
|
1494
|
+
* 回决门族 200 体上的**结清证据**(`<键>` → 在场律):`/decide` 的受理体 / 终局体 / 幂等回放 / 停驻子代复活成功 / 不可复活子代的 deny 作废,
|
|
1495
|
+
* `/resume` 与 `/plan_review` 的受理体 / 终局体(经停驻赎回席的迟到回决体原样转出)。键集属主 = `gate-settlement.ts` 的 `GateSettlementEvidence`
|
|
1496
|
+
* (唯一铸点 `buildSettlementEvidence`,五个边界;`checkpointId` 只随位出现)。
|
|
1497
|
+
*/
|
|
1498
|
+
readonly settlementEvidenceKey: {
|
|
1499
|
+
readonly at: "回决门族 200 体的结清证据(<键> → 在场律;五个执行 / 回放边界由一只铸函数铸)";
|
|
1500
|
+
readonly members: {
|
|
1501
|
+
checkpointId: {
|
|
1502
|
+
attr: string;
|
|
1503
|
+
since: string;
|
|
1504
|
+
};
|
|
1505
|
+
decisionCommitted: {
|
|
1506
|
+
attr: string;
|
|
1507
|
+
since: string;
|
|
1508
|
+
};
|
|
1509
|
+
};
|
|
1510
|
+
};
|
|
1308
1511
|
/**
|
|
1309
1512
|
* 直连门决断证明的 HMAC 信封**扩展键闭集**(第 6 位扩展对象的键;字典序 = JSON 键序;在场才追加,缺席 ⇒ 字节逐字不变)。`satisfies Record<ApprovalEnvelopeExtKey, …>`:
|
|
1310
1513
|
* 闭集属主 = `approval-hmac.ts` 的 `APPROVAL_ENVELOPE_EXT_KEYS`(加一个词而本表没跟 ⇒ tsc 红)。跨仓签名器照这张闭集实现,所以它是 wire。`attr` = 用它的那道门。
|
|
@@ -1507,20 +1710,45 @@ export declare const SELF_MINTED_WIRE: {
|
|
|
1507
1710
|
readonly since: "7.136.0";
|
|
1508
1711
|
};
|
|
1509
1712
|
readonly "GET /v1/config/catalog#rows[K8S_SANDBOX_ENV].semantics": {
|
|
1510
|
-
readonly attr: "values-only-in-the-pod-own-secret;role-needs-secrets-create;denied-refuses-boot";
|
|
1511
|
-
readonly since: "7.
|
|
1713
|
+
readonly attr: "values-only-in-the-pod-own-secret;role-needs-secrets-create;denied-refuses-boot;own-credential-name-refuses-boot";
|
|
1714
|
+
readonly since: "7.139.0";
|
|
1715
|
+
};
|
|
1716
|
+
readonly "GET /v1/config/catalog#rows[K8S_NAMESPACE].semantics": {
|
|
1717
|
+
readonly attr: "required-no-default;absent-or-blank-refuses-boot";
|
|
1718
|
+
readonly since: "7.139.0";
|
|
1719
|
+
};
|
|
1720
|
+
readonly "GET /v1/config/catalog#rows[E2B_SANDBOX_ENV].semantics": {
|
|
1721
|
+
readonly attr: "own-credential-name-refuses-boot";
|
|
1722
|
+
readonly since: "7.139.0";
|
|
1723
|
+
};
|
|
1724
|
+
readonly "GET /v1/config/catalog#rows[DOCKER_SANDBOX_ENV].semantics": {
|
|
1725
|
+
readonly attr: "own-credential-name-refuses-boot";
|
|
1726
|
+
readonly since: "7.139.0";
|
|
1727
|
+
};
|
|
1728
|
+
readonly "GET /v1/config/catalog#rows[CONFIG_PROVIDER].semantics": {
|
|
1729
|
+
readonly attr: "remote-without-center-url-refuses-boot";
|
|
1730
|
+
readonly since: "7.139.0";
|
|
1731
|
+
};
|
|
1732
|
+
readonly "GET /v1/config/catalog#rows[RETENTION_MODE].semantics": {
|
|
1733
|
+
readonly attr: "enforce-without-horizon-or-cadence-refuses-boot";
|
|
1734
|
+
readonly since: "7.139.0";
|
|
1735
|
+
};
|
|
1736
|
+
readonly "GET /v1/config/catalog#rows[RETENTION_SWEEP_INTERVAL_SEC].semantics": {
|
|
1737
|
+
readonly attr: "cadence-without-horizon-refuses-boot";
|
|
1738
|
+
readonly since: "7.139.0";
|
|
1512
1739
|
};
|
|
1513
1740
|
/**
|
|
1514
|
-
*
|
|
1515
|
-
*
|
|
1741
|
+
* MCP 远端失败句在面板与重拨回执上的出口读法:出口座的 `mcp-remote-text` 行(`trace/exit-seat.ts`)—— 与 trace / 通告同一个脱敏器(引擎记号 `[redacted]` = 已抹的值,原样;
|
|
1742
|
+
* 引擎记号占了方案词位时头值余下的部分照抹;引擎放过的形照抹),界 200(切点不落进记号)。7.137.0 是按记号切开、逐段过 `redactSecrets` 的另一只读法
|
|
1743
|
+
* (头名与值分在两段 ⇒ 方案词位上的值原样)。钉 test/mcp-remote-text-redaction.test.ts、test/mcp-reconnect-http.test.ts ⑥ 与「引擎记号占了方案词位」三形。
|
|
1516
1744
|
*/
|
|
1517
1745
|
readonly "GET /v1/sessions/:id/mcp#servers[].error": {
|
|
1518
|
-
readonly attr: "
|
|
1519
|
-
readonly since: "7.
|
|
1746
|
+
readonly attr: "exit-seat:mcp-remote-text(engine-mark=masked-value)+truncate:200";
|
|
1747
|
+
readonly since: "7.138.0";
|
|
1520
1748
|
};
|
|
1521
1749
|
readonly "POST /v1/sessions/:id/mcp/reconnect#reason|status.error|listingIncomplete.error": {
|
|
1522
|
-
readonly attr: "
|
|
1523
|
-
readonly since: "7.
|
|
1750
|
+
readonly attr: "exit-seat:mcp-remote-text(engine-mark=masked-value)+truncate:200";
|
|
1751
|
+
readonly since: "7.138.0";
|
|
1524
1752
|
};
|
|
1525
1753
|
/**
|
|
1526
1754
|
* 7.137.0:`GET /v1/config/catalog` 已有行的字面(`semantics` 说明句 / `derivedDefaultNote` 缺席说明;键与行集不变,写法同上一段 7.136.0 的行):提交面的带图预检退役后,
|