@sema-agent/server 7.70.0 → 7.71.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/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/USAGE.md +6 -3
- package/dist/approval-content-kind.d.ts +13 -7
- package/dist/approval-content-kind.js +3 -1
- package/dist/approval.js +3 -2
- package/dist/bench/s1/live-deps.js +2 -0
- package/dist/boot/execution-env.js +12 -2
- package/dist/boot/memory-consolidation.d.ts +2 -1
- package/dist/boot/parked-revive-gate.d.ts +2 -0
- package/dist/boot/parked-revive-gate.js +5 -1
- package/dist/boot/resolve-spec.js +8 -3
- package/dist/boot/runner-deps.d.ts +16 -43
- package/dist/boot/runner-deps.js +10 -4
- package/dist/brain.d.ts +3 -1
- package/dist/brain.js +2 -1
- package/dist/config-catalog.js +3 -1
- package/dist/config-types.d.ts +31 -1
- package/dist/config-types.js +1 -0
- package/dist/config.js +15 -3
- package/dist/deployment-governance.d.ts +6 -3
- package/dist/deployment-governance.js +2 -1
- package/dist/execution-lane-caps.d.ts +51 -37
- package/dist/execution-lane-caps.js +23 -0
- package/dist/fleet/fleet-bus.d.ts +22 -1
- package/dist/fleet/fleet-bus.js +2 -1
- package/dist/http/server.js +17 -5
- package/dist/index.d.ts +1 -1
- package/dist/leader/wire.js +4 -3
- package/dist/main.js +4 -2
- package/dist/memory-operator-faces.d.ts +1 -1
- package/dist/memory-scope.d.ts +24 -0
- package/dist/memory-scope.js +12 -3
- package/dist/observability/metrics.d.ts +4 -0
- package/dist/observability/metrics.js +2 -0
- package/dist/observability/run-terminal-log.d.ts +4 -3
- package/dist/observability/run-terminal-log.js +4 -15
- package/dist/orchestration/workflow-agent-session-index.d.ts +85 -2
- package/dist/orchestration/workflow-agent-session-index.js +38 -5
- package/dist/parked-decide.d.ts +40 -1
- package/dist/parked-decide.js +19 -2
- package/dist/plugins/checkpoint-store-sql.js +5 -5
- package/dist/plugins/local-checkpoint-store.js +3 -3
- package/dist/plugins/remote-env-adb.d.ts +11 -0
- package/dist/plugins/remote-env-adb.js +2 -0
- package/dist/plugins/remote-env-device.d.ts +9 -0
- package/dist/plugins/remote-env-device.js +3 -0
- package/dist/plugins/remote-env-e2b.d.ts +11 -0
- package/dist/plugins/remote-env-e2b.js +2 -0
- package/dist/plugins/remote-env-host.d.ts +11 -0
- package/dist/plugins/remote-env-host.js +2 -0
- package/dist/plugins/remote-env-k8s.d.ts +11 -0
- package/dist/plugins/remote-env-k8s.js +2 -0
- package/dist/plugins/remote-env-local-docker.d.ts +11 -0
- package/dist/plugins/remote-env-local-docker.js +2 -0
- package/dist/plugins/remote-env-ssh.d.ts +11 -0
- package/dist/plugins/remote-env-ssh.js +2 -0
- package/dist/plugins/store-backend.d.ts +34 -12
- package/dist/plugins/store-backend.js +12 -3
- package/dist/plugins/store-contracts.d.ts +54 -18
- package/dist/plugins/store-contracts.js +17 -30
- package/dist/plugins/workflow-run-store-sql.d.ts +31 -9
- package/dist/plugins/workflow-run-store-sql.js +28 -1
- package/dist/run-local.js +3 -0
- package/dist/task-a2a.js +2 -2
- package/dist/task-mcp.js +2 -2
- package/dist/task-settings.d.ts +21 -8
- package/dist/task-settings.js +2 -2
- package/dist/trace/core-keyset-guard.d.ts +128 -8
- package/dist/trace/engine-notice-wire.d.ts +1 -1
- package/dist/trace/engine-notice-wire.js +1 -0
- package/dist/trace/ledger-events.d.ts +5 -1
- package/dist/trace/ledger-sink.js +8 -1
- package/dist/trace/project.d.ts +21 -4
- package/dist/trace/project.js +5 -3
- package/dist/trace/redact.js +10 -5
- package/package.json +3 -3
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
* ⑨⑩([ref],2026-08-31)把两个最大的 wire 面也纳入:TaskSpec 按「server 有无写点」记 Wired/Unwired,
|
|
18
18
|
* TaskResult 按「转发/摘除」记 Forwarded/Stripped —— 谁改 resolve-spec.ts / runs.ts 的发射点谁同步本文件。
|
|
19
19
|
*/
|
|
20
|
-
import type { TaskNotificationPayload, BackgroundChildEvent, RosterEntry, AskRequest, CheckpointSummary, TaskEvent, TraceEvent, MailboxMessage, MailboxAppendMessage, TaskSpec, TaskResult, GateOutcome, Settlement, PausedCause } from "@sema-agent/core";
|
|
20
|
+
import type { TaskNotificationPayload, SemaProvenance, BackgroundChildEvent, RosterEntry, AskRequest, CheckpointSummary, TaskEvent, TraceEvent, MailboxMessage, MailboxAppendMessage, TaskSpec, TaskResult, WiringManifest, GateOutcome, Settlement, PausedCause } from "@sema-agent/core";
|
|
21
|
+
import type { ToolApprovalFrame } from "../tool-approval.js";
|
|
21
22
|
/** 编译期断言:T 必须收敛到 never(有残余键 = tsc 红)。
|
|
22
23
|
* 🔴 **导出**([ref] U1/U2):本仓「词表闭集,未处置成员=编译红」的钉法只许有**一个**形 ——
|
|
23
24
|
* `observability/run-terminal-log.ts` 的三张叶表 + 结果顶层键表用同一只断言,而不是各自再抄一份
|
|
@@ -27,20 +28,87 @@ export type AssertAllKeysHandled<T extends never> = T;
|
|
|
27
28
|
type NotificationProjected = "task_id" | "task_type" | "toolUseId" | "status" | "summary" | "result" | "output_file" | "usage" | "sessionId" | "seq" | "lines" | "stoppedBy" | "source" | "exitCode" | "partial" | "diagnostics" | "recentSteps" | "editedFiles" | "resumable" | "completionId" | "error" | "errorCode" | "apiFailure" | "agentMessage" | "_sema_provenance";
|
|
28
29
|
type NotificationExcluded = "peer" | "crossSessionMessage" | "crossSessionNotice";
|
|
29
30
|
type _GuardNotification = AssertAllKeysHandled<Exclude<keyof TaskNotificationPayload, NotificationProjected | NotificationExcluded>>;
|
|
31
|
+
type _GuardNotificationReverse = AssertAllKeysHandled<Exclude<NotificationProjected | NotificationExcluded, keyof TaskNotificationPayload>>;
|
|
32
|
+
type ProvenanceProjected = "kind" | "from" | "taskId" | "seq" | "agentType";
|
|
33
|
+
type ProvenanceExcluded = "peerMeta";
|
|
34
|
+
type _GuardProvenance = AssertAllKeysHandled<Exclude<keyof SemaProvenance, ProvenanceProjected | ProvenanceExcluded>>;
|
|
35
|
+
type _GuardProvenanceReverse = AssertAllKeysHandled<Exclude<ProvenanceProjected | ProvenanceExcluded, keyof SemaProvenance>>;
|
|
36
|
+
type AgentMessageProjected = "from" | "body";
|
|
37
|
+
type _GuardAgentMessage = AssertAllKeysHandled<Exclude<keyof NonNullable<TaskNotificationPayload["agentMessage"]>, AgentMessageProjected>>;
|
|
38
|
+
type _GuardAgentMessageReverse = AssertAllKeysHandled<Exclude<AgentMessageProjected, keyof NonNullable<TaskNotificationPayload["agentMessage"]>>>;
|
|
30
39
|
type BgNotifProjected = "taskId" | "sessionId" | "seq" | "status" | "summary" | "stoppedBy" | "resumable" | "recentSteps" | "editedFiles" | "usage" | "transcriptId" | "rootSessionId" | "parentTaskId" | "parentToolCallId" | "completionId";
|
|
31
40
|
type BgNotifExcluded = "kind" | "sessionScoped" | "owner" | "scope" | "description" | "agentType" | "name" | "currentAction" | "currentTool" | "parentSessionId" | "startedAt" | "workflowRunId" | "progressTaskId" | "progressParentTaskId" | "model";
|
|
32
41
|
type _GuardBgNotif = AssertAllKeysHandled<Exclude<keyof BackgroundChildEvent, BgNotifProjected | BgNotifExcluded>>;
|
|
42
|
+
type _GuardBgNotifReverse = AssertAllKeysHandled<Exclude<BgNotifProjected | BgNotifExcluded, keyof BackgroundChildEvent>>;
|
|
33
43
|
type RosterProjected = "name" | "agentId" | "sessionId" | "toolUseId" | "owner" | "scope" | "sessionScoped" | "rootSessionId" | "model" | "modelFallback" | "createdAt";
|
|
34
44
|
type _GuardRoster = AssertAllKeysHandled<Exclude<keyof RosterEntry, RosterProjected>>;
|
|
45
|
+
type _GuardRosterReverse = AssertAllKeysHandled<Exclude<RosterProjected, keyof RosterEntry>>;
|
|
35
46
|
type AskProjected = "toolName" | "toolCallId" | "args" | "message" | "sourceTaskId" | "fromSubagent" | "sourceAgentName" | "delegation" | "ruleOffers" | "ruleOffersAbsence" | "persistedRuleShadowed" | "probeCause" | "ruleEvidence" | "requiresRealApproval" | "denialLimitFallback" | "origin" | "classifierUnavailable";
|
|
36
47
|
type AskExcluded = "preview" | "principal" | "riskAxes" | "boundInputHash" | "isDelegatedChild" | "probeReason" | "hasBidiControls" | "previewWithheld" | "execCwd";
|
|
37
48
|
type _GuardAsk = AssertAllKeysHandled<Exclude<keyof AskRequest, AskProjected | AskExcluded>>;
|
|
49
|
+
type _GuardAskReverse = AssertAllKeysHandled<Exclude<AskProjected | AskExcluded, keyof AskRequest>>;
|
|
50
|
+
type AskFrameServerMinted = "type" | "approvalId" | "argsOmitted" | "outcome" | "governanceForced" | "expiresAtMs" | "expiresInMs" | "serverNowMs" | "parked" | "inputHasBidi";
|
|
51
|
+
type _GuardAskFrame = AssertAllKeysHandled<Exclude<keyof ToolApprovalFrame, AskProjected | AskFrameServerMinted>>;
|
|
52
|
+
type _GuardAskFrameReverse = AssertAllKeysHandled<Exclude<AskProjected | AskFrameServerMinted, keyof ToolApprovalFrame>>;
|
|
38
53
|
type TaskEventHandled = "text_delta" | "reasoning_delta" | "tool_start" | "tool_end" | "turn_end" | "compacted" | "diagnostics" | "message_committed" | "status" | "task_notification" | "task_progress" | "steering_injected" | "workspace_changed" | "done" | "context_usage" | "compaction_outcome" | "human_input" | "wiring_manifest" | "text_end" | "tool_roster_delta";
|
|
39
54
|
type _GuardTaskEvent = AssertAllKeysHandled<Exclude<TaskEvent["type"], TaskEventHandled>>;
|
|
55
|
+
type _GuardTaskEventReverse = AssertAllKeysHandled<Exclude<TaskEventHandled, TaskEvent["type"]>>;
|
|
40
56
|
type MailboxProjected = "seq" | "from" | "content" | "sentAt" | "hopChain" | "peerMeta";
|
|
41
57
|
type _GuardMailbox = AssertAllKeysHandled<Exclude<keyof MailboxMessage, MailboxProjected>>;
|
|
58
|
+
type _GuardMailboxReverse = AssertAllKeysHandled<Exclude<MailboxProjected, keyof MailboxMessage>>;
|
|
42
59
|
type MailboxAppendProjected = "from" | "content" | "sentAt" | "hopChain" | "peerMeta";
|
|
43
60
|
type _GuardMailboxAppend = AssertAllKeysHandled<Exclude<keyof MailboxAppendMessage, MailboxAppendProjected>>;
|
|
61
|
+
type _GuardMailboxAppendReverse = AssertAllKeysHandled<Exclude<MailboxAppendProjected, keyof MailboxAppendMessage>>;
|
|
62
|
+
type WiringSectionProjected = "schemaVersion" | "leg" | "ask" | "question" | "interaction" | "elicit" | "parkLane" | "session" | "fleet" | "permissionRules" | "modelGate" | "autoMode" | "mcp" | "tools";
|
|
63
|
+
type WiringSectionExcluded = "governance" | "configFingerprint";
|
|
64
|
+
type _GuardWiringSections = AssertAllKeysHandled<Exclude<keyof WiringManifest, WiringSectionProjected | WiringSectionExcluded>>;
|
|
65
|
+
type _GuardWiringSectionsReverse = AssertAllKeysHandled<Exclude<WiringSectionProjected | WiringSectionExcluded, keyof WiringManifest>>;
|
|
66
|
+
type WiringSection<K extends keyof WiringManifest> = NonNullable<WiringManifest[K]>;
|
|
67
|
+
type WiringLegHandled = "kind";
|
|
68
|
+
type _GuardWiringLeg = AssertAllKeysHandled<Exclude<keyof WiringSection<"leg">, WiringLegHandled>>;
|
|
69
|
+
type _GuardWiringLegReverse = AssertAllKeysHandled<Exclude<WiringLegHandled, keyof WiringSection<"leg">>>;
|
|
70
|
+
type WiringAskHandled = "form" | "provenance" | "effective";
|
|
71
|
+
type _GuardWiringAsk = AssertAllKeysHandled<Exclude<keyof WiringSection<"ask">, WiringAskHandled>>;
|
|
72
|
+
type _GuardWiringAskReverse = AssertAllKeysHandled<Exclude<WiringAskHandled, keyof WiringSection<"ask">>>;
|
|
73
|
+
type WiringQuestionHandled = "wired" | "provenance" | "interactiveToolsWithoutDeliveryFace";
|
|
74
|
+
type _GuardWiringQuestion = AssertAllKeysHandled<Exclude<keyof WiringSection<"question">, WiringQuestionHandled>>;
|
|
75
|
+
type _GuardWiringQuestionReverse = AssertAllKeysHandled<Exclude<WiringQuestionHandled, keyof WiringSection<"question">>>;
|
|
76
|
+
type WiringInteractionHandled = "posture";
|
|
77
|
+
type _GuardWiringInteraction = AssertAllKeysHandled<Exclude<keyof WiringSection<"interaction">, WiringInteractionHandled>>;
|
|
78
|
+
type _GuardWiringInteractionReverse = AssertAllKeysHandled<Exclude<WiringInteractionHandled, keyof WiringSection<"interaction">>>;
|
|
79
|
+
type WiringElicitHandled = "seamWired" | "serversOptedIn";
|
|
80
|
+
type _GuardWiringElicit = AssertAllKeysHandled<Exclude<keyof WiringSection<"elicit">, WiringElicitHandled>>;
|
|
81
|
+
type _GuardWiringElicitReverse = AssertAllKeysHandled<Exclude<WiringElicitHandled, keyof WiringSection<"elicit">>>;
|
|
82
|
+
type WiringParkLaneHandled = "capable" | "effective" | "reasons" | "checkpointDurability";
|
|
83
|
+
type _GuardWiringParkLane = AssertAllKeysHandled<Exclude<keyof WiringSection<"parkLane">, WiringParkLaneHandled>>;
|
|
84
|
+
type _GuardWiringParkLaneReverse = AssertAllKeysHandled<Exclude<WiringParkLaneHandled, keyof WiringSection<"parkLane">>>;
|
|
85
|
+
type WiringSessionHandled = "store";
|
|
86
|
+
type _GuardWiringSession = AssertAllKeysHandled<Exclude<keyof WiringSection<"session">, WiringSessionHandled>>;
|
|
87
|
+
type _GuardWiringSessionReverse = AssertAllKeysHandled<Exclude<WiringSessionHandled, keyof WiringSection<"session">>>;
|
|
88
|
+
type WiringToolsHandled = "schemaVersion" | "count" | "entries" | "digest";
|
|
89
|
+
type _GuardWiringTools = AssertAllKeysHandled<Exclude<keyof WiringSection<"tools">, WiringToolsHandled>>;
|
|
90
|
+
type _GuardWiringToolsReverse = AssertAllKeysHandled<Exclude<WiringToolsHandled, keyof WiringSection<"tools">>>;
|
|
91
|
+
type FleetExcluded = "subagentTranscripts";
|
|
92
|
+
type WiringFleetHandled = "backgroundAgentStore" | "hostChildEventSink" | FleetExcluded;
|
|
93
|
+
type _GuardWiringFleet = AssertAllKeysHandled<Exclude<keyof WiringSection<"fleet">, WiringFleetHandled>>;
|
|
94
|
+
type _GuardWiringFleetReverse = AssertAllKeysHandled<Exclude<WiringFleetHandled, keyof WiringSection<"fleet">>>;
|
|
95
|
+
type WiringMcpEntry = WiringSection<"mcp">[number];
|
|
96
|
+
type WiringMcpExcluded = "error";
|
|
97
|
+
type WiringMcpHandled = "name" | "source" | "status" | "errorCode" | "delivered" | "httpStatus" | "toolCount" | WiringMcpExcluded;
|
|
98
|
+
type _GuardWiringMcp = AssertAllKeysHandled<Exclude<keyof WiringMcpEntry, WiringMcpHandled>>;
|
|
99
|
+
type _GuardWiringMcpReverse = AssertAllKeysHandled<Exclude<WiringMcpHandled, keyof WiringMcpEntry>>;
|
|
100
|
+
type WiringRulesHandled = "storeWired" | "syncWired" | "orgGoverned";
|
|
101
|
+
type _GuardWiringRules = AssertAllKeysHandled<Exclude<keyof WiringSection<"permissionRules">, WiringRulesHandled>>;
|
|
102
|
+
type _GuardWiringRulesReverse = AssertAllKeysHandled<Exclude<WiringRulesHandled, keyof WiringSection<"permissionRules">>>;
|
|
103
|
+
type WiringModelGateHandled = "class" | "removed" | "restore";
|
|
104
|
+
type _GuardWiringModelGate = AssertAllKeysHandled<Exclude<keyof WiringSection<"modelGate">, WiringModelGateHandled>>;
|
|
105
|
+
type _GuardWiringModelGateReverse = AssertAllKeysHandled<Exclude<WiringModelGateHandled, keyof WiringSection<"modelGate">>>;
|
|
106
|
+
type WiringAutoModeHandled = "armed" | "reason";
|
|
107
|
+
type _GuardWiringAutoMode = AssertAllKeysHandled<Exclude<keyof WiringSection<"autoMode">, WiringAutoModeHandled>>;
|
|
108
|
+
type _GuardWiringAutoModeReverse = AssertAllKeysHandled<Exclude<WiringAutoModeHandled, keyof WiringSection<"autoMode">>>;
|
|
109
|
+
type WiringGovernanceHandled = "audience" | "lockedConfig" | "compliance" | "memoryAdmission" | "retention";
|
|
110
|
+
type _GuardWiringGovernance = AssertAllKeysHandled<Exclude<keyof WiringSection<"governance">, WiringGovernanceHandled>>;
|
|
111
|
+
type _GuardWiringGovernanceReverse = AssertAllKeysHandled<Exclude<WiringGovernanceHandled, keyof WiringSection<"governance">>>;
|
|
44
112
|
type PermissionTraceKind = Extract<TraceEvent["kind"], `permission.${string}`>;
|
|
45
113
|
export type PermissionTraceProjected = "permission.persisted_rule_allowed" | "permission.rule_store_unreadable" | "permission.read_only_allowed";
|
|
46
114
|
type PermissionTraceDropped = "permission.sandbox_admitted" | "permission.rule_sync_resurrected" | "permission.rule_sync_dropped" | "permission.org_snapshot_unavailable";
|
|
@@ -52,6 +120,7 @@ type _GuardPermissionTraceNonEmpty = AssertAllKeysHandled<AssertNonEmpty<Permiss
|
|
|
52
120
|
type SummaryProjected = "sessionId" | "scope" | "createdAt" | "gateKind" | "severity" | "spentMicroUsd" | "deadline" | "hasBidiControls" | "requiresRealApproval" | "denialLimitFallback" | "origin" | "classifierUnavailable";
|
|
53
121
|
type SummaryExcluded = "token" | "toolInput" | "toolName" | "toolCallId" | "preview" | "principal" | "sourceTaskId" | "contentKind" | "restoreMode" | "checkpointId" | "previewWithheld";
|
|
54
122
|
type _GuardInboxSummary = AssertAllKeysHandled<Exclude<keyof CheckpointSummary, SummaryProjected | SummaryExcluded>>;
|
|
123
|
+
type _GuardInboxSummaryReverse = AssertAllKeysHandled<Exclude<SummaryProjected | SummaryExcluded, keyof CheckpointSummary>>;
|
|
55
124
|
type TaskSpecWired = "objective" | "principal" | "images" | "sessionId" | "requireExistingSession" | "oneShot" | "clientContext" | "resumeAt" | "resumeAtMode" | "model" | "compactionModel" | "thinking" | "systemPrompt" | "appendSystemPrompt" | "promptProvider" | "memory" | "suggestNextPrompts" | "restoreFiles" | "acceptPartialRestore" | "rewindFilesTo" | "tools" | "excludeTools" | "deferTools" | "toolMaterializeStrategy" | "promptProfile" | "toolPolicy" | "onAsk" | "onQuestion" | "hooks" | "durableApproval" | "resourceSuspend" | "resilience" | "finalVerification" | "checkpointStore" | "handsReadOnly" | "memoryPersistenceCapable" | "additionalDirectories" | "additionalReadDirectories" | "enablePlanMode" | "interactiveTools" | "enableFork" | "shellGate" | "mcp" | "a2a" | "skills" | "backgroundScope" | "envFacts" | "limits" | "configOverrides" | "forwardSubagentEvents" | "retainSubagentSessions" | "retainBackgroundProcesses" | "outputSchema" | "outputRetries" | "compaction" | "attachments" | "selfOrchestration" | "getApiKeyAndHeaders" | "interactionPosture" | "agents" | "taskId" | "signal" | "preemptSignal" | "modelRole" | "enableBlockedReport" | "maxSuspends" | "autoModeRequested";
|
|
56
125
|
type TaskSpecUnwired = "excludeAllTools" | "actor" | "roles" | "lspManager" | "tracer" | "readFace" | "readDenyPatterns" | "interactiveQuestionFallback" | "alwaysLoadTools" | "restoreGatedTools" | "deferSelfResolve" | "basePolicyForResumeEdit" | "lspDiagnostics" | "streamingToolExecution" | "toolResultThresholdChars";
|
|
57
126
|
type _GuardTaskSpec = AssertAllKeysHandled<Exclude<keyof TaskSpec, TaskSpecWired | TaskSpecUnwired>>;
|
|
@@ -63,35 +132,86 @@ type _GuardTaskResultReverse = AssertAllKeysHandled<Exclude<TaskResultForwarded
|
|
|
63
132
|
type PausedCauseForwarded = "kind" | "gate" | "checkpointId" | "restoreMode";
|
|
64
133
|
type PausedCauseStripped = "token";
|
|
65
134
|
type _GuardPausedCause = AssertAllKeysHandled<Exclude<keyof PausedCause, PausedCauseForwarded | PausedCauseStripped>>;
|
|
66
|
-
type _NoDoubleBookPausedCause = AssertAllKeysHandled<Extract<PausedCauseForwarded, PausedCauseStripped>>;
|
|
67
135
|
type _GuardPausedCauseReverse = AssertAllKeysHandled<Exclude<PausedCauseForwarded | PausedCauseStripped, keyof PausedCause>>;
|
|
68
136
|
type SettlementKeys = Settlement extends infer S ? (S extends object ? keyof S : never) : never;
|
|
69
137
|
type SettlementWhoKeys = Settlement["who"] extends infer W ? (W extends object ? keyof W : never) : never;
|
|
70
|
-
type
|
|
71
|
-
type
|
|
72
|
-
type
|
|
138
|
+
type GateOutcomeProjected = "disposition" | "settlement" | "origin";
|
|
139
|
+
type _GuardGateOutcome = AssertAllKeysHandled<Exclude<keyof GateOutcome, GateOutcomeProjected>>;
|
|
140
|
+
type _GuardGateOutcomeReverse = AssertAllKeysHandled<Exclude<GateOutcomeProjected, keyof GateOutcome>>;
|
|
141
|
+
type SettlementProjected = "kind" | "who" | "when" | "note";
|
|
142
|
+
type _GuardSettlement = AssertAllKeysHandled<Exclude<SettlementKeys, SettlementProjected>>;
|
|
143
|
+
type _GuardSettlementReverse = AssertAllKeysHandled<Exclude<SettlementProjected, SettlementKeys>>;
|
|
144
|
+
type SettlementWhoProjected = "party" | "approver" | "window";
|
|
145
|
+
type _GuardSettlementWho = AssertAllKeysHandled<Exclude<SettlementWhoKeys, SettlementWhoProjected>>;
|
|
146
|
+
type _GuardSettlementWhoReverse = AssertAllKeysHandled<Exclude<SettlementWhoProjected, SettlementWhoKeys>>;
|
|
73
147
|
export type CoreKeysetGuards = [
|
|
74
148
|
_GuardNotification,
|
|
149
|
+
_GuardNotificationReverse,
|
|
150
|
+
_GuardProvenance,
|
|
151
|
+
_GuardProvenanceReverse,
|
|
152
|
+
_GuardAgentMessage,
|
|
153
|
+
_GuardAgentMessageReverse,
|
|
75
154
|
_GuardBgNotif,
|
|
155
|
+
_GuardBgNotifReverse,
|
|
76
156
|
_GuardRoster,
|
|
157
|
+
_GuardRosterReverse,
|
|
77
158
|
_GuardAsk,
|
|
159
|
+
_GuardAskReverse,
|
|
160
|
+
_GuardAskFrame,
|
|
161
|
+
_GuardAskFrameReverse,
|
|
78
162
|
_GuardTaskEvent,
|
|
163
|
+
_GuardTaskEventReverse,
|
|
79
164
|
_GuardMailbox,
|
|
165
|
+
_GuardMailboxReverse,
|
|
80
166
|
_GuardMailboxAppend,
|
|
167
|
+
_GuardMailboxAppendReverse,
|
|
168
|
+
_GuardWiringSections,
|
|
169
|
+
_GuardWiringSectionsReverse,
|
|
170
|
+
_GuardWiringLeg,
|
|
171
|
+
_GuardWiringLegReverse,
|
|
172
|
+
_GuardWiringAsk,
|
|
173
|
+
_GuardWiringAskReverse,
|
|
174
|
+
_GuardWiringQuestion,
|
|
175
|
+
_GuardWiringQuestionReverse,
|
|
176
|
+
_GuardWiringInteraction,
|
|
177
|
+
_GuardWiringInteractionReverse,
|
|
178
|
+
_GuardWiringElicit,
|
|
179
|
+
_GuardWiringElicitReverse,
|
|
180
|
+
_GuardWiringParkLane,
|
|
181
|
+
_GuardWiringParkLaneReverse,
|
|
182
|
+
_GuardWiringSession,
|
|
183
|
+
_GuardWiringSessionReverse,
|
|
184
|
+
_GuardWiringTools,
|
|
185
|
+
_GuardWiringToolsReverse,
|
|
186
|
+
_GuardWiringFleet,
|
|
187
|
+
_GuardWiringFleetReverse,
|
|
188
|
+
_GuardWiringMcp,
|
|
189
|
+
_GuardWiringMcpReverse,
|
|
190
|
+
_GuardWiringRules,
|
|
191
|
+
_GuardWiringRulesReverse,
|
|
192
|
+
_GuardWiringModelGate,
|
|
193
|
+
_GuardWiringModelGateReverse,
|
|
194
|
+
_GuardWiringAutoMode,
|
|
195
|
+
_GuardWiringAutoModeReverse,
|
|
196
|
+
_GuardWiringGovernance,
|
|
197
|
+
_GuardWiringGovernanceReverse,
|
|
81
198
|
_GuardPermissionTrace,
|
|
82
199
|
_GuardPermissionTraceReverse,
|
|
83
200
|
_GuardPermissionTraceNonEmpty,
|
|
84
201
|
_GuardInboxSummary,
|
|
202
|
+
_GuardInboxSummaryReverse,
|
|
85
203
|
_GuardTaskSpec,
|
|
86
204
|
_GuardTaskSpecReverse,
|
|
87
205
|
_GuardTaskResult,
|
|
88
206
|
_GuardTaskResultReverse,
|
|
207
|
+
_GuardPausedCause,
|
|
208
|
+
_GuardPausedCauseReverse,
|
|
89
209
|
_GuardGateOutcome,
|
|
210
|
+
_GuardGateOutcomeReverse,
|
|
90
211
|
_GuardSettlement,
|
|
212
|
+
_GuardSettlementReverse,
|
|
91
213
|
_GuardSettlementWho,
|
|
92
|
-
|
|
93
|
-
_NoDoubleBookPausedCause,
|
|
94
|
-
_GuardPausedCauseReverse
|
|
214
|
+
_GuardSettlementWhoReverse
|
|
95
215
|
];
|
|
96
216
|
export {};
|
|
97
217
|
//# sourceMappingURL=core-keyset-guard.d.ts.map
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* 同文件 G1 e2e 的全码扇出夹具、以及契约文档附录 D.3 那张表(含**小节标题里的码数** —— 那道门本批
|
|
17
17
|
* 刚立,立完就在下一次加码时自己咬住了)。
|
|
18
18
|
*/
|
|
19
|
-
export declare const ENGINE_NOTICE_WIRE_CODES: readonly ["memory.session_polluted", "memory.harvest_quarantined", "memory.delegation_static_mark_waived", "memory.hold_opened", "memory.hold_released", "memory.hold_disposed", "task.turn_interrupted", "steering.parked_input_blocked", "task.user_steer_undrained", "task.user_followup_undrained", "memory.capture_opted_out", "memory.capture_optout_unpersisted", "task.halt_unconsumed", "task.late_approval", "config.durable_gate_unavailable", "peer.inbound_disposition", "peer.held_settled", "peer.idle_subscription", "classifier.denial_limit", "mcp.injection_dropped", "delegation.ask_unresolvable"];
|
|
19
|
+
export declare const ENGINE_NOTICE_WIRE_CODES: readonly ["memory.session_polluted", "memory.harvest_quarantined", "memory.delegation_static_mark_waived", "memory.hold_opened", "memory.hold_released", "memory.hold_disposed", "task.turn_interrupted", "steering.parked_input_blocked", "task.user_steer_undrained", "task.user_followup_undrained", "memory.capture_opted_out", "memory.capture_optout_unpersisted", "task.halt_unconsumed", "task.late_approval", "config.durable_gate_unavailable", "peer.inbound_disposition", "peer.held_settled", "peer.idle_subscription", "classifier.denial_limit", "mcp.injection_dropped", "delegation.ask_unresolvable", "task.interrupt_unconsumed"];
|
|
20
20
|
export type EngineNoticeWireCode = (typeof ENGINE_NOTICE_WIRE_CODES)[number];
|
|
21
21
|
/** 白名单谓词(单点):路由与门都读这一个,不许第二处手抄码串。 */
|
|
22
22
|
export declare function isEngineNoticeWireCode(code: string): code is EngineNoticeWireCode;
|
|
@@ -22,6 +22,7 @@ export const ENGINE_NOTICE_WIRE_CODES = [
|
|
|
22
22
|
"classifier.denial_limit",
|
|
23
23
|
"mcp.injection_dropped",
|
|
24
24
|
"delegation.ask_unresolvable",
|
|
25
|
+
"task.interrupt_unconsumed",
|
|
25
26
|
];
|
|
26
27
|
const WIRE_CODES = new Set(ENGINE_NOTICE_WIRE_CODES);
|
|
27
28
|
export function isEngineNoticeWireCode(code) {
|
|
@@ -31,7 +31,11 @@
|
|
|
31
31
|
* 的 `switch (ev.type)` 白名单臂(差集门 `test/durable-append-arm-parity.test.ts` 看守两腿一致);
|
|
32
32
|
* · **腿自己的带外行**:park/终局/失败/建议/用量/装配自证(不来自流事件)。
|
|
33
33
|
*/
|
|
34
|
-
export type LedgerEventType = "reasoning" | "text" | "tool_start" | "tool_end" | "status" | "context_usage" | "compacted" | "diagnostics" | "steering_injected" | "compaction_outcome" | "workspace_changed" | "wiring_manifest"
|
|
34
|
+
export type LedgerEventType = "reasoning" | "text" | "tool_start" | "tool_end" | "status" | "context_usage" | "compacted" | "diagnostics" | "steering_injected" | "compaction_outcome" | "workspace_changed" | "wiring_manifest"
|
|
35
|
+
/** S-212(7.71.0):运行期名册变更(core 7.8.0 [ref] ⑪)。**快照语义**——`delta.roster` 是整只
|
|
36
|
+
* 变更后名册,消费端收到即整只替换,所以回放不需要任何合并;它的耐久面因此不是 `wiring_manifest.tools`
|
|
37
|
+
* 的重复,而是那份开腿快照**之后**的每一次改动(修前两条 durable 腿零 case ⇒ 回放只见开头一版)。 */
|
|
38
|
+
| "tool_roster_delta" | "human_input" | "task_progress" | "task_notification" | "turn_end"
|
|
35
39
|
/** park 行名**两个**(`appendParked(kind)` 逐字取自 `result.status`)—— 运行期闭集见
|
|
36
40
|
* {@link PARK_LEDGER_EVENT_TYPES}(本联合是它的类型面,两者由下方的双向断言锁步)。 */
|
|
37
41
|
| "suspended" | "needs_review" | "done" | "failed" | "suggestions" | "model_usage" | "prompt_assembled" | "config_assembled" | "file_link"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { terminalProjection } from "@sema-agent/core";
|
|
2
2
|
import { redactSecrets } from "./redact.js";
|
|
3
|
-
import { toolStartEventData, toolEndEventData, taskProgressEventData, taskNotificationEventData, compactedEventData, diagnosticsEventData, brainStatusEventData, steeringInjectedEventData, compactionOutcomeEventData, workspaceChangedEventData, wiringManifestEventData, humanInputEventData, turnEndEventData, contextUsageEventData } from "./project.js";
|
|
3
|
+
import { toolStartEventData, toolEndEventData, taskProgressEventData, taskNotificationEventData, compactedEventData, diagnosticsEventData, brainStatusEventData, steeringInjectedEventData, compactionOutcomeEventData, workspaceChangedEventData, wiringManifestEventData, toolRosterDeltaEventData, humanInputEventData, turnEndEventData, contextUsageEventData } from "./project.js";
|
|
4
4
|
import { NotifiedKeys, taskNotificationStreamKey } from "../orchestration/workflow-completion-inbox.js";
|
|
5
5
|
import { isParkLedgerEventType } from "./ledger-events.js";
|
|
6
6
|
export function createSerialLedgerAppend(appendEvent, startSeq) {
|
|
@@ -99,6 +99,13 @@ export function createLedgerSink(opts) {
|
|
|
99
99
|
await flush();
|
|
100
100
|
await append("wiring_manifest", wiringManifestEventData(ev));
|
|
101
101
|
break;
|
|
102
|
+
case "tool_roster_delta": {
|
|
103
|
+
await flush();
|
|
104
|
+
const rosterDelta = toolRosterDeltaEventData(ev);
|
|
105
|
+
if (rosterDelta !== undefined)
|
|
106
|
+
await append("tool_roster_delta", rosterDelta);
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
102
109
|
case "human_input":
|
|
103
110
|
await flush();
|
|
104
111
|
await append("human_input", humanInputEventData(ev));
|
package/dist/trace/project.d.ts
CHANGED
|
@@ -424,6 +424,11 @@ export declare function workspaceChangedEventData(ev: {
|
|
|
424
424
|
* 的那一点订阅腿的名册增量座,一次改变名册的 refresh ⇒ **恰一帧**(序在 manifest 之后、那次 refresh 自己的
|
|
425
425
|
* `tool_end` 之前),`delta.fromDigest` = 消费端手上那份名册的 digest。7.66.0 写下的「前瞻接线」披露随本版
|
|
426
426
|
* 退役:本臂现在会真的触发,消费端可以依赖它了。
|
|
427
|
+
*
|
|
428
|
+
* 🔴 **三腿共用本构造器(S-212,7.71.0)**:live 腿(`routes/tasks.ts`)+ 两条 durable 腿
|
|
429
|
+
* (`trace/ledger-sink.ts` 的 `onEvent` / `http/server.ts` 的 resume switch)。返回 `undefined` 的那一格在
|
|
430
|
+
* 三腿上是同一件事 ——**整帧不发 / 整帧不落账**,绝不半张名册上 wire 或落库。落账的正当性(旧裁定
|
|
431
|
+
* 「不落账」为何在 7.71.0 撤销)逐字记在 `core-keyset-guard.ts` ⑪ 段。
|
|
427
432
|
*/
|
|
428
433
|
export declare function toolRosterDeltaEventData(ev: {
|
|
429
434
|
delta?: unknown;
|
|
@@ -549,10 +554,17 @@ export interface TraceTurn {
|
|
|
549
554
|
* verbatim 转发——`in` 刻意保持它历史上的「总量」语义不变(旧帧/新帧读端零伤),不随 core 的
|
|
550
555
|
* `promptTokens`/`turn_end.usage.inputTokens` 翻转为 cache-MISS。新增 `uncachedIn` 承接 core 3.0.0 才有的
|
|
551
556
|
* cache-MISS 分量(命名取自 core `uncachedInputTokensOf`),只在能确认自己踩在新契约帧上时才发
|
|
552
|
-
* (见 {@link toContractTokens})。
|
|
557
|
+
* (见 {@link toContractTokens})。
|
|
558
|
+
*
|
|
559
|
+
* 🔴 **S-213⑥:五个子键**全部按同族 OMIT 契约走 —— 引擎那一侧报了才铸,没报就**缺席**,恒不折 `0`。
|
|
560
|
+
* `in`/`out` 此前是必填座、缺一键时写 `?? 0`:读端拿到的 `in:0` 与「这一轮真的零输入」逐字节同形,
|
|
561
|
+
* 于是一次 usage 半缺(某些 provider 只回 output 侧)在面板上显示成一个可核对的真数字。
|
|
562
|
+
* 0 是一个数,未知不是 —— 两者同形正是本仓 `boundCallId`/`gateKind`/`contentKind` 一族一直在防的事。
|
|
563
|
+
* ⚠️ wire 面(`GET /v1/tasks/:id/turns` 与 trace SSE 的 `turn` 事件)因此可能给出**只有一侧**的
|
|
564
|
+
* `tokens`;做算术的消费端要按「键可能缺席」读(`tokens` 整只可缺席早就是契约的一部分)。 */
|
|
553
565
|
tokens?: {
|
|
554
|
-
in
|
|
555
|
-
out
|
|
566
|
+
in?: number;
|
|
567
|
+
out?: number;
|
|
556
568
|
uncachedIn?: number;
|
|
557
569
|
cacheRead?: number;
|
|
558
570
|
cacheWrite?: number;
|
|
@@ -601,7 +613,12 @@ export declare function turnEndEventData(ev: {
|
|
|
601
613
|
* 的投影契约,不是 wire verbatim——`in` 保持它一直以来的**总量**语义,3.0.0 起改取 `totalInputTokens`
|
|
602
614
|
* (归一化总输入含 cache)优先,`inputTokens` 回落(旧帧/尚未升级的 core 下 `totalInputTokens` 缺席时,
|
|
603
615
|
* `in` 落回旧值,读端零伤)。`uncachedIn` 只在**能确认自己踩在新契约帧上**(`totalInputTokens` 在场)时
|
|
604
|
-
* 才发——旧帧的 `inputTokens` 是族依赖的旧语义,标成「uncachedIn(cache-MISS)」会是谎言。
|
|
616
|
+
* 才发——旧帧的 `inputTokens` 是族依赖的旧语义,标成「uncachedIn(cache-MISS)」会是谎言。
|
|
617
|
+
*
|
|
618
|
+
* 🔴 S-213⑥:**一条规则管五个子键** —— 源侧在场就铸、缺席就不铸,没有 `?? 0`。此前 `in`/`out` 两座
|
|
619
|
+
* 各带一个默认 0,于是 usage 半缺(provider 只回 output 侧)被投影成 `in:0` = 一个看起来可核对的真
|
|
620
|
+
* 数字;`uncachedIn`/`cacheRead`/`cacheWrite` 三键从第一天起就是缺席制,`in`/`out` 只是漏进了默认值。
|
|
621
|
+
* 早退分支语义不变:输入两键(择一)与 `outputTokens` 全缺 ⇒ 整只 `tokens` 缺席(不铸空对象)。 */
|
|
605
622
|
export declare function toContractTokens(usage: unknown): TraceTurn["tokens"] | undefined;
|
|
606
623
|
/** [ref]C-13:tool_start/tool_end 的**共享挑键**——`projectEvents`(turns 面)与 `mapTraceEvent`
|
|
607
624
|
* (trace SSE 面)对同一账本行的字段选择逐字同构,此前两处独立手写,structured/totalChars/label
|
package/dist/trace/project.js
CHANGED
|
@@ -493,11 +493,12 @@ export function toContractTokens(usage) {
|
|
|
493
493
|
if (!usage || typeof usage !== "object")
|
|
494
494
|
return undefined;
|
|
495
495
|
const u = usage;
|
|
496
|
-
|
|
496
|
+
const inTokens = u.totalInputTokens ?? u.inputTokens;
|
|
497
|
+
if (inTokens == null && u.outputTokens == null)
|
|
497
498
|
return undefined;
|
|
498
499
|
return {
|
|
499
|
-
in:
|
|
500
|
-
out: u.outputTokens
|
|
500
|
+
...(inTokens != null ? { in: inTokens } : {}),
|
|
501
|
+
...(u.outputTokens != null ? { out: u.outputTokens } : {}),
|
|
501
502
|
...(u.totalInputTokens != null && u.inputTokens != null ? { uncachedIn: u.inputTokens } : {}),
|
|
502
503
|
...(u.cacheReadTokens != null ? { cacheRead: u.cacheReadTokens } : {}),
|
|
503
504
|
...(u.cacheWriteTokens != null ? { cacheWrite: u.cacheWriteTokens } : {}),
|
|
@@ -650,6 +651,7 @@ function mapTraceEventInner(type, seq, data) {
|
|
|
650
651
|
case "compaction_outcome":
|
|
651
652
|
case "wiring_manifest":
|
|
652
653
|
case "human_input":
|
|
654
|
+
case "tool_roster_delta":
|
|
653
655
|
return null;
|
|
654
656
|
default:
|
|
655
657
|
return null;
|
package/dist/trace/redact.js
CHANGED
|
@@ -4,15 +4,21 @@ export const normalizeForRedaction = stripFormatCharacters;
|
|
|
4
4
|
const REDACTION_TOKEN_RE_SRC = String.raw `«redacted(?::[a-z-]{1,16}){0,2}»`;
|
|
5
5
|
const ENTROPY_SCAN_MAX = 96;
|
|
6
6
|
const twoStrongAhead = (valueClass) => String.raw `(?=${valueClass}{0,${ENTROPY_SCAN_MAX}}[0-9A-Z]${valueClass}{0,${ENTROPY_SCAN_MAX}}[0-9A-Z])`;
|
|
7
|
+
const IDENT_CONNECTORS = "[_./-]";
|
|
8
|
+
const noConnectorAhead = (valueClass) => String.raw `(?!${valueClass}{0,${ENTROPY_SCAN_MAX}}${IDENT_CONNECTORS}${valueClass})`;
|
|
7
9
|
const valueArm = (prefixSrc, valueClass, min) => new RegExp(`${prefixSrc}${twoStrongAhead(valueClass)}${valueClass}{${min},}`, "g");
|
|
10
|
+
const WORD_SEGMENT_CLASS = "[A-Za-z0-9._~+/-]";
|
|
8
11
|
const keywordArm = (keywordSrc, valueClass, min, tailSrc = "") => new RegExp(`(?:${keywordSrc}\\s+${valueClass}{${min},}${tailSrc}` +
|
|
9
|
-
`|(?<!${
|
|
12
|
+
`|(?<!${WORD_SEGMENT_CLASS})${keywordSrc}(?:${twoStrongAhead(valueClass)}|${noConnectorAhead(valueClass)})${valueClass}{${min},}${tailSrc})`, "g");
|
|
10
13
|
const STRUCTURAL_SECRET_PATTERNS = [
|
|
11
14
|
[/-----BEGIN(?:[^-](?:[^-](?:[^-]|-(?!-))*)?)?PRIVATE KEY(?: BLOCK)?-----[\s\S]{0,8192}?-----END(?:[^-](?:[^-](?:[^-]|-(?!-))*)?)?PRIVATE KEY(?: BLOCK)?-----/g, "«redacted:private-key»"],
|
|
12
15
|
[/---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----[\s\S]{0,8192}?---- END SSH2 ENCRYPTED PRIVATE KEY ----/g, "«redacted:private-key»"],
|
|
13
16
|
[/:(?<=[A-Za-z][A-Za-z0-9+.-]*:)\/\//g, "$1:«redacted»@"],
|
|
14
17
|
[/("(?:private_key|client_secret|password|api[_-]?key|secret|token)"\s*:\s*)"[^"\\]*(?:\\.[^"\\]*)*"/gi, '$1"«redacted»"'],
|
|
15
18
|
];
|
|
19
|
+
const PPK_CONTAINER_TOKEN = "«redacted:private-key»";
|
|
20
|
+
const PEM_FRAGMENT_TOKEN = "«redacted:private-key:partial»";
|
|
21
|
+
const HEADLESS_PPK_TOKEN = "«redacted:private-key:partial»";
|
|
16
22
|
const KEYWORD_SECRET_PATTERNS = [
|
|
17
23
|
[keywordArm("[Bb]earer", "[A-Za-z0-9._~+/-]", 20, "=*"), "Bearer «redacted»"],
|
|
18
24
|
[keywordArm("Basic", "[A-Za-z0-9+/]", 16, "={0,2}"), "Basic «redacted»"],
|
|
@@ -29,7 +35,6 @@ const SHAPE_SECRET_PATTERNS = [
|
|
|
29
35
|
[/xapp-\d-[A-Za-z0-9-]{20,}/g, "«redacted:slack-token»"],
|
|
30
36
|
];
|
|
31
37
|
const FULL_SECRET_PATTERNS = [...STRUCTURAL_SECRET_PATTERNS, ...KEYWORD_SECRET_PATTERNS, ...SHAPE_SECRET_PATTERNS];
|
|
32
|
-
const PEM_FRAGMENT_TOKEN = "«redacted:private-key:partial»";
|
|
33
38
|
const PEM_HEADER_IDENT_MAX = 31;
|
|
34
39
|
const PEM_BODY_RUN_MIN = 8;
|
|
35
40
|
const CH_TAB = 9, CH_LF = 10, CH_CR = 13, CH_SPACE = 32, CH_PLUS = 43, CH_MINUS = 45, CH_SLASH = 47;
|
|
@@ -301,7 +306,6 @@ function redactPemFragments(text, json) {
|
|
|
301
306
|
out.push(text.slice(copied));
|
|
302
307
|
return { out: out.join(""), count };
|
|
303
308
|
}
|
|
304
|
-
const HEADLESS_PPK_TOKEN = "«redacted:private-key:partial»";
|
|
305
309
|
function redactHeadlessPpkBodies(text) {
|
|
306
310
|
const KEY = "Private-Lines: ";
|
|
307
311
|
const n = text.length;
|
|
@@ -558,7 +562,6 @@ function redactUrlUserinfo(text, json) {
|
|
|
558
562
|
}
|
|
559
563
|
return count === 0 ? { out: text, count: 0 } : { out: out + text.slice(last), count };
|
|
560
564
|
}
|
|
561
|
-
const PPK_CONTAINER_TOKEN = "«redacted:private-key»";
|
|
562
565
|
let ppkScanBytes = 0;
|
|
563
566
|
export function ppkScanBytesForTest() { return ppkScanBytes; }
|
|
564
567
|
export function resetPpkScanBytesForTest() { ppkScanBytes = 0; }
|
|
@@ -658,10 +661,12 @@ function redactPpkContainers(text, record) {
|
|
|
658
661
|
}
|
|
659
662
|
const urlUserinfoRule = { label: labelOfToken(URL_USERINFO_PATTERN[1]), arm: "full", run: (text, _wantCount, json) => redactUrlUserinfo(text, json) };
|
|
660
663
|
const SECRET_RULES = [
|
|
661
|
-
...
|
|
664
|
+
...STRUCTURAL_SECRET_PATTERNS.map((p) => (p === URL_USERINFO_PATTERN ? urlUserinfoRule : regexRule(p, "full"))),
|
|
662
665
|
{ label: labelOfToken(PPK_CONTAINER_TOKEN), arm: "full", run: (text, _wantCount, _json, observe) => redactPpkContainers(text, observe) },
|
|
663
666
|
{ label: labelOfToken(PEM_FRAGMENT_TOKEN), arm: "fragment", run: (text, _wantCount, json) => redactPemFragments(text, json) },
|
|
664
667
|
{ label: labelOfToken(HEADLESS_PPK_TOKEN), arm: "fragment", run: (text) => redactHeadlessPpkBodies(text) },
|
|
668
|
+
...KEYWORD_SECRET_PATTERNS.map((p) => regexRule(p, "full")),
|
|
669
|
+
...SHAPE_SECRET_PATTERNS.map((p) => regexRule(p, "full")),
|
|
665
670
|
...FRAGMENT_SECRET_PATTERNS.map((p) => regexRule(p, "fragment")),
|
|
666
671
|
{ ...urlUserinfoRule, run: (text, _wantCount, json) => ({ out: redactUrlUserinfo(text, json).out, count: 0 }) },
|
|
667
672
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/server",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.71.0",
|
|
4
4
|
"description": "Sema Server — the server/API implementation layer for Sema, wiring core, registry, model providers, and cloud agent execution. Built on @sema-agent/core.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "BUSL-1.1",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"build:binary:run-local:darwin-arm64": "bun build --compile --target=bun-darwin-arm64 src/run-local.ts --outfile dist/run-local-darwin-arm64"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@sema-agent/core": "7.
|
|
57
|
+
"@sema-agent/core": "7.13.0",
|
|
58
58
|
"@sema-agent/settings-schema": "1.10.0",
|
|
59
59
|
"e2b": "^2.28.0",
|
|
60
60
|
"libsodium-wrappers": "^0.8.4",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"sharp": "^0.35.3"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@sema-agent/sdk": "9.
|
|
72
|
+
"@sema-agent/sdk": "9.1.0",
|
|
73
73
|
"@types/libsodium-wrappers": "^0.7.14",
|
|
74
74
|
"@types/node": "22.10.2",
|
|
75
75
|
"@types/pg": "^8.20.0",
|