@sema-agent/server 1.314.0 → 1.316.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.
Files changed (146) hide show
  1. package/dist/approval-hmac.d.ts +17 -0
  2. package/dist/approval-hmac.js +27 -0
  3. package/dist/config-center/apply-effective.d.ts +22 -0
  4. package/dist/config-center/apply-effective.js +283 -0
  5. package/dist/config-center/http-client.d.ts +23 -0
  6. package/dist/config-center/http-client.js +109 -0
  7. package/dist/config-center/restart-signal.d.ts +12 -0
  8. package/dist/config-center/restart-signal.js +70 -0
  9. package/dist/config-center/skills-mcp.d.ts +13 -0
  10. package/dist/config-center/skills-mcp.js +113 -0
  11. package/dist/config-center/types.d.ts +143 -0
  12. package/dist/config-center/types.js +2 -0
  13. package/dist/fleet/fleet-bus.js +92 -83
  14. package/dist/hooks/hook-runner.js +18 -9
  15. package/dist/http/idempotency.d.ts +1 -0
  16. package/dist/http/idempotency.js +3 -0
  17. package/dist/http/principal-gate.d.ts +12 -0
  18. package/dist/http/principal-gate.js +52 -0
  19. package/dist/http/route-ctx.d.ts +67 -0
  20. package/dist/http/route-ctx.js +2 -0
  21. package/dist/http/routes/attachments.d.ts +4 -0
  22. package/dist/http/routes/attachments.js +106 -0
  23. package/dist/http/routes/capabilities.d.ts +4 -0
  24. package/dist/http/routes/capabilities.js +111 -0
  25. package/dist/http/routes/images.d.ts +20 -0
  26. package/dist/http/routes/images.js +572 -0
  27. package/dist/http/routes/memory-policy.d.ts +4 -0
  28. package/dist/http/routes/memory-policy.js +105 -0
  29. package/dist/http/routes/observability.d.ts +4 -0
  30. package/dist/http/routes/observability.js +63 -0
  31. package/dist/http/routes/session-sync.d.ts +36 -0
  32. package/dist/http/routes/session-sync.js +513 -0
  33. package/dist/http/routes/sessions-list.d.ts +4 -0
  34. package/dist/http/routes/sessions-list.js +117 -0
  35. package/dist/http/routes/sessions.d.ts +17 -0
  36. package/dist/http/routes/sessions.js +746 -0
  37. package/dist/http/send.d.ts +6 -0
  38. package/dist/http/send.js +19 -0
  39. package/dist/http/server.d.ts +101 -76
  40. package/dist/http/server.js +129 -2410
  41. package/dist/http/sse-log.d.ts +25 -0
  42. package/dist/http/sse-log.js +59 -0
  43. package/dist/http/workspace-content.d.ts +3 -0
  44. package/dist/http/workspace-content.js +20 -0
  45. package/dist/index.d.ts +1 -1
  46. package/dist/leader/leader.js +5 -2
  47. package/dist/leader/wire.js +169 -165
  48. package/dist/main.js +462 -451
  49. package/dist/plugins/approval-store-sql.d.ts +52 -0
  50. package/dist/plugins/approval-store-sql.js +119 -0
  51. package/dist/plugins/breaker-state-sql.d.ts +29 -0
  52. package/dist/plugins/breaker-state-sql.js +104 -0
  53. package/dist/plugins/checkpoint-store-sql.d.ts +67 -0
  54. package/dist/plugins/checkpoint-store-sql.js +224 -0
  55. package/dist/plugins/file-snapshot-store-sql.d.ts +38 -0
  56. package/dist/plugins/file-snapshot-store-sql.js +210 -0
  57. package/dist/plugins/image-bake-store-sql.d.ts +53 -0
  58. package/dist/plugins/image-bake-store-sql.js +463 -0
  59. package/dist/plugins/image-index-sql.d.ts +33 -0
  60. package/dist/plugins/image-index-sql.js +328 -0
  61. package/dist/plugins/k8s-bg-scripts.d.ts +19 -0
  62. package/dist/plugins/k8s-bg-scripts.js +129 -0
  63. package/dist/plugins/k8s-exec-protocol.d.ts +20 -0
  64. package/dist/plugins/k8s-exec-protocol.js +87 -0
  65. package/dist/plugins/outcome-ledger-sql.d.ts +70 -0
  66. package/dist/plugins/outcome-ledger-sql.js +158 -0
  67. package/dist/plugins/pg-approval-store.d.ts +1 -27
  68. package/dist/plugins/pg-approval-store.js +1 -83
  69. package/dist/plugins/pg-breaker-state.d.ts +1 -19
  70. package/dist/plugins/pg-breaker-state.js +1 -88
  71. package/dist/plugins/pg-checkpoint-store.d.ts +1 -33
  72. package/dist/plugins/pg-checkpoint-store.js +1 -189
  73. package/dist/plugins/pg-cost-quota.js +3 -143
  74. package/dist/plugins/pg-file-snapshot-store.d.ts +1 -27
  75. package/dist/plugins/pg-file-snapshot-store.js +1 -190
  76. package/dist/plugins/pg-image-bake.d.ts +1 -40
  77. package/dist/plugins/pg-image-bake.js +1 -420
  78. package/dist/plugins/pg-image-index.d.ts +1 -21
  79. package/dist/plugins/pg-image-index.js +1 -217
  80. package/dist/plugins/pg-outcome-ledger.d.ts +2 -22
  81. package/dist/plugins/pg-outcome-ledger.js +1 -104
  82. package/dist/plugins/pg-rate-limiter.d.ts +2 -32
  83. package/dist/plugins/pg-rate-limiter.js +4 -147
  84. package/dist/plugins/pg-resume-anchor-store.d.ts +1 -13
  85. package/dist/plugins/pg-resume-anchor-store.js +1 -22
  86. package/dist/plugins/pg-run-store.d.ts +1 -75
  87. package/dist/plugins/pg-run-store.js +1 -287
  88. package/dist/plugins/pg-session-policy-store.d.ts +1 -11
  89. package/dist/plugins/pg-session-policy-store.js +1 -90
  90. package/dist/plugins/pg-tool-result-store.d.ts +1 -15
  91. package/dist/plugins/pg-tool-result-store.js +1 -52
  92. package/dist/plugins/pg-workflow-journal-store.d.ts +1 -20
  93. package/dist/plugins/pg-workflow-journal-store.js +1 -34
  94. package/dist/plugins/pg-workflow-run-store.d.ts +1 -55
  95. package/dist/plugins/pg-workflow-run-store.js +1 -220
  96. package/dist/plugins/remote-env-k8s.d.ts +5 -38
  97. package/dist/plugins/remote-env-k8s.js +7 -213
  98. package/dist/plugins/resume-anchor-store-sql.d.ts +23 -0
  99. package/dist/plugins/resume-anchor-store-sql.js +38 -0
  100. package/dist/plugins/run-store-sql.d.ts +89 -0
  101. package/dist/plugins/run-store-sql.js +397 -0
  102. package/dist/plugins/session-policy-store-sql.d.ts +22 -0
  103. package/dist/plugins/session-policy-store-sql.js +109 -0
  104. package/dist/plugins/sql-driver.d.ts +25 -0
  105. package/dist/plugins/sql-driver.js +59 -0
  106. package/dist/plugins/tidb-approval-store.d.ts +1 -39
  107. package/dist/plugins/tidb-approval-store.js +1 -71
  108. package/dist/plugins/tidb-breaker-state.d.ts +1 -17
  109. package/dist/plugins/tidb-breaker-state.js +1 -74
  110. package/dist/plugins/tidb-checkpoint-store.d.ts +1 -49
  111. package/dist/plugins/tidb-checkpoint-store.js +1 -191
  112. package/dist/plugins/tidb-file-snapshot-store.d.ts +1 -27
  113. package/dist/plugins/tidb-file-snapshot-store.js +1 -192
  114. package/dist/plugins/tidb-image-bake.d.ts +1 -38
  115. package/dist/plugins/tidb-image-bake.js +1 -348
  116. package/dist/plugins/tidb-image-index.d.ts +1 -19
  117. package/dist/plugins/tidb-image-index.js +1 -149
  118. package/dist/plugins/tidb-outcome-ledger.d.ts +1 -57
  119. package/dist/plugins/tidb-outcome-ledger.js +1 -97
  120. package/dist/plugins/tidb-resume-anchor-store.d.ts +1 -13
  121. package/dist/plugins/tidb-resume-anchor-store.js +1 -22
  122. package/dist/plugins/tidb-run-store.d.ts +1 -75
  123. package/dist/plugins/tidb-run-store.js +1 -306
  124. package/dist/plugins/tidb-session-policy-store.d.ts +1 -11
  125. package/dist/plugins/tidb-session-policy-store.js +1 -86
  126. package/dist/plugins/tidb-tool-result-store.d.ts +1 -13
  127. package/dist/plugins/tidb-tool-result-store.js +1 -38
  128. package/dist/plugins/tidb-workflow-journal-store.d.ts +1 -20
  129. package/dist/plugins/tidb-workflow-journal-store.js +1 -34
  130. package/dist/plugins/tidb-workflow-run-store.d.ts +1 -61
  131. package/dist/plugins/tidb-workflow-run-store.js +1 -231
  132. package/dist/plugins/tool-result-store-sql.d.ts +25 -0
  133. package/dist/plugins/tool-result-store-sql.js +69 -0
  134. package/dist/plugins/workflow-journal-store-sql.d.ts +30 -0
  135. package/dist/plugins/workflow-journal-store-sql.js +53 -0
  136. package/dist/plugins/workflow-run-store-sql.d.ts +85 -0
  137. package/dist/plugins/workflow-run-store-sql.js +299 -0
  138. package/dist/plugins/write-behind-counter.d.ts +14 -3
  139. package/dist/plugins/write-behind-counter.js +39 -12
  140. package/dist/principal-jwt.d.ts +44 -0
  141. package/dist/principal-jwt.js +95 -0
  142. package/dist/security.d.ts +2 -58
  143. package/dist/security.js +3 -118
  144. package/dist/sema-registry.d.ts +5 -200
  145. package/dist/sema-registry.js +4 -567
  146. package/package.json +1 -1
@@ -0,0 +1,6 @@
1
+ import type { ServerResponse } from "node:http";
2
+ export declare function sseHeaders(res: ServerResponse, extra?: Record<string, string>): void;
3
+ export declare function sendJson(res: ServerResponse, status: number, body: unknown): void;
4
+ export declare function sendError(res: ServerResponse, status: number, errorCode: string, message: string, extra?: Record<string, unknown>): void;
5
+ export declare function msg(e: unknown): string;
6
+ //# sourceMappingURL=send.d.ts.map
@@ -0,0 +1,19 @@
1
+ export function sseHeaders(res, extra) {
2
+ res.writeHead(200, {
3
+ "content-type": "text/event-stream",
4
+ "cache-control": "no-cache",
5
+ connection: "keep-alive",
6
+ ...extra,
7
+ });
8
+ }
9
+ export function sendJson(res, status, body) {
10
+ res.writeHead(status, { "content-type": "application/json" });
11
+ res.end(JSON.stringify(body));
12
+ }
13
+ export function sendError(res, status, errorCode, message, extra) {
14
+ sendJson(res, status, { error: message, errorCode, ...extra });
15
+ }
16
+ export function msg(e) {
17
+ return e instanceof Error ? e.message : String(e);
18
+ }
19
+ //# sourceMappingURL=send.js.map
@@ -5,7 +5,6 @@ import type { TaskRequestBody } from "./wire-types.js";
5
5
  import type { ServiceConfig } from "../config-types.js";
6
6
  import { type RestartSignal, type SessionMirrorRuling } from "../sema-registry.js";
7
7
  import { type OwnerAwareSessionStore } from "../security.js";
8
- import type { BakeState, BakeErrorCode } from "../plugins/store-contracts.js";
9
8
  import type { RunStore, ApprovalStore, ImageIndex, ImageBake, CheckpointStoreFull, ResumeAnchorStore, ApprovalExemptionStore, ServiceSessionPolicyStore, ServiceFileSnapshotStore, StoreBackend } from "../plugins/store-backend.js";
10
9
  import { type MemorySyncRequest, type MemorySyncResponse } from "../memory-sync.js";
11
10
  import type { TaskAttachmentStore } from "../plugins/task-attachment-store.js";
@@ -24,64 +23,71 @@ import type { Metrics } from "../observability/metrics.js";
24
23
  import { type RateGate } from "../observability/rate-limit.js";
25
24
  import type { QuotaTracker } from "../observability/cost-quota.js";
26
25
  import type { ModelUsageTracker, PromptManifestTracker } from "../budget.js";
26
+ import { scopedIdempotencyKey } from "./idempotency.js";
27
+ export { scopedIdempotencyKey };
28
+ import { coarseStatusForState, errorCodeForExit } from "./routes/images.js";
29
+ export { coarseStatusForState, errorCodeForExit };
30
+ import { explicitOperatorOk, isOperator, explicitOperator } from "./principal-gate.js";
31
+ export { explicitOperatorOk, isOperator, explicitOperator };
27
32
  export interface RequestAuth {
28
33
  principal?: string;
29
34
  sessionId: string;
30
35
  memoryScope?: string;
31
36
  resolvedProjectId?: string;
32
37
  }
33
- export interface ServiceDeps {
38
+ export interface ServiceCoreDeps {
34
39
  runner: Runner;
35
40
  config: ServiceConfig;
36
- registryJwtVerifier?: {
37
- verify: (bearer: string) => Promise<import("../auth-bridge.js").VerifyOutcome>;
38
- };
39
- hookWakeBus?: {
40
- deliver?: (sessionId: string, text: string) => Promise<boolean>;
41
- };
42
- drainState?: {
43
- draining: boolean;
44
- since?: number;
45
- inflight?: () => number;
46
- lastActivityAt?: () => number;
47
- };
48
- storeDegraded?: boolean;
49
- sessionStoreLabel?: string;
50
- modelReady?: () => boolean;
51
- scenarioDetails?: Record<string, import("../capabilities/scenarios.js").ScenarioDetail>;
52
- authorize?: (ctx: {
53
- req: IncomingMessage;
54
- body: TaskRequestBody;
55
- }) => Promise<RequestAuth>;
56
41
  resolveSpec: (body: TaskRequestBody, req: IncomingMessage | undefined, auth?: RequestAuth, opts?: {
57
42
  leg?: "fresh" | "resume";
58
43
  }) => TaskSpec | Promise<TaskSpec>;
44
+ }
45
+ export interface ServiceStoreDeps {
59
46
  runStore?: RunStore;
60
47
  resumeAnchorStore?: ResumeAnchorStore;
61
- sessionTitler?: {
62
- maybeTitle(sessionId: string, objective: string): void;
63
- };
48
+ approvalStore?: ApprovalStore;
64
49
  approvalExemptionStore?: ApprovalExemptionStore;
50
+ checkpointStore?: CheckpointStoreFull;
65
51
  sessionPolicyStore?: ServiceSessionPolicyStore;
66
52
  fileSnapshotStore?: ServiceFileSnapshotStore;
67
- snapshotBlobSqlCapBytes?: number;
68
- backend?: StoreBackend;
69
- sessionMirrorRuling?: (principal: string | undefined) => Promise<SessionMirrorRuling | undefined>;
70
- approvalStore?: ApprovalStore;
71
- checkpointStore?: CheckpointStoreFull;
72
- backgroundAgentStore?: import("@sema-agent/core").BackgroundAgentStore;
73
- parkedReviveTool?: import("@sema-agent/core").ToolSpec;
74
- parkedKnownAgentTypes?: ReadonlySet<string>;
75
- parkedReviveInheritedGate?: (row: import("@sema-agent/core").BackgroundAgentRecord) => unknown;
76
53
  taskAttachmentStore?: TaskAttachmentStore;
77
- imageIndex?: ImageIndex;
78
- imageBakes?: ImageBake;
79
- leaderEndpoint?: LeaderEndpoint;
54
+ backgroundAgentStore?: import("@sema-agent/core").BackgroundAgentStore;
55
+ sessionStorage?: OwnerAwareSessionStore;
80
56
  workflowRunStore?: WorkflowRunStore;
81
57
  workflowJournalStore?: import("@sema-agent/core").WorkflowJournalStore;
82
- workflowsCapable?: boolean;
58
+ imageIndex?: ImageIndex;
59
+ imageBakes?: ImageBake;
60
+ outcomeSink?: import("../plugins/file-outcome-sink.js").OutcomeSink;
61
+ sendFileLedger?: import("../plugins/send-file-ledger.js").SendFileLedger;
62
+ backend?: StoreBackend;
63
+ }
64
+ export interface ServiceCoordinatorDeps {
65
+ elicitation?: ElicitationCoordinator;
66
+ question?: QuestionCoordinator;
67
+ toolApproval?: ToolApprovalCoordinator;
83
68
  workflowAgentRegistry?: WorkflowAgentRegistry;
84
69
  subagentSteerRegistry?: SubagentSteerRegistry;
70
+ workflowCompletionInbox?: WorkflowCompletionInbox;
71
+ fleetBus?: FleetEventBus;
72
+ sessionWatch?: import("../session-watch.js").SessionWatchRegistry;
73
+ hookWakeBus?: {
74
+ deliver?: (sessionId: string, text: string) => Promise<boolean>;
75
+ };
76
+ sendUserFile?: import("../capabilities/send-user-file-tool.js").SendUserFileEmitter;
77
+ leaderEndpoint?: LeaderEndpoint;
78
+ sessionTitler?: {
79
+ maybeTitle(sessionId: string, objective: string): void;
80
+ };
81
+ }
82
+ export interface ServiceSeamDeps {
83
+ sessionAudit?: (sessionId: string) => Promise<({
84
+ owner: string | null;
85
+ } & Record<string, unknown>) | undefined>;
86
+ purgeSession?: (sessionId: string, owner: string | null) => Promise<{
87
+ deleted: boolean;
88
+ } | {
89
+ active: string;
90
+ }>;
85
91
  subagentTaskOutput?: (handle: string, access: {
86
92
  owner: string;
87
93
  scope: string;
@@ -106,23 +112,10 @@ export interface ServiceDeps {
106
112
  content: string;
107
113
  details: unknown;
108
114
  }>;
109
- workflowCompletionInbox?: WorkflowCompletionInbox;
110
- fleetBus?: FleetEventBus;
111
- sessionAudit?: (sessionId: string) => Promise<({
112
- owner: string | null;
113
- } & Record<string, unknown>) | undefined>;
114
- sessionStorage?: OwnerAwareSessionStore;
115
- purgeSession?: (sessionId: string, owner: string | null) => Promise<{
116
- deleted: boolean;
117
- } | {
118
- active: string;
119
- }>;
120
- instanceId?: string;
121
- logger?: Logger;
122
- metrics?: Metrics;
123
- rateLimiter?: RateGate;
124
- costQuota?: QuotaTracker;
125
- fleetLease?: FleetLeaseManager;
115
+ memoryExport?: (scope: string) => Promise<MemoryEntry[]>;
116
+ memorySync?: (scope: string, syncReq: MemorySyncRequest) => Promise<MemorySyncResponse>;
117
+ sessionMirrorRuling?: (principal: string | undefined) => Promise<SessionMirrorRuling | undefined>;
118
+ instrumentDegenerate?: (result: TaskResult) => void;
126
119
  sideQueryAccounting?: (principal: string | undefined, r: {
127
120
  model: string;
128
121
  family?: "input-includes-cached" | "input-excludes-cached";
@@ -136,46 +129,78 @@ export interface ServiceDeps {
136
129
  };
137
130
  };
138
131
  }) => void;
139
- outcomeSink?: import("../plugins/file-outcome-sink.js").OutcomeSink;
140
- memoryExport?: (scope: string) => Promise<MemoryEntry[]>;
141
- memorySync?: (scope: string, syncReq: MemorySyncRequest) => Promise<MemorySyncResponse>;
142
- instrumentDegenerate?: (result: TaskResult) => void;
143
- planCacheProbe?: PlanCacheProbe;
132
+ parkedReviveTool?: import("@sema-agent/core").ToolSpec;
133
+ parkedKnownAgentTypes?: ReadonlySet<string>;
134
+ parkedReviveInheritedGate?: (row: import("@sema-agent/core").BackgroundAgentRecord) => unknown;
135
+ }
136
+ export interface ServiceObservabilityDeps {
137
+ logger?: Logger;
138
+ metrics?: Metrics;
144
139
  modelUsage?: ModelUsageTracker;
145
140
  promptManifests?: PromptManifestTracker;
146
- elicitation?: ElicitationCoordinator;
147
- question?: QuestionCoordinator;
148
- toolApproval?: ToolApprovalCoordinator;
149
- sendUserFile?: import("../capabilities/send-user-file-tool.js").SendUserFileEmitter;
150
- sendFileLedger?: import("../plugins/send-file-ledger.js").SendFileLedger;
151
- sessionWatch?: import("../session-watch.js").SessionWatchRegistry;
152
- sessionEventsMaxConnections?: number;
153
- sessionEventsHeartbeatMs?: number;
154
- sessionEventsStallMs?: number;
141
+ planCacheProbe?: PlanCacheProbe;
142
+ }
143
+ export interface ServiceGovernanceDeps {
144
+ authorize?: (ctx: {
145
+ req: IncomingMessage;
146
+ body: TaskRequestBody;
147
+ }) => Promise<RequestAuth>;
148
+ registryJwtVerifier?: {
149
+ verify: (bearer: string) => Promise<import("../auth-bridge.js").VerifyOutcome>;
150
+ };
151
+ rateLimiter?: RateGate;
152
+ costQuota?: QuotaTracker;
153
+ fleetLease?: FleetLeaseManager;
154
+ }
155
+ export interface ServiceDeploymentDeps {
156
+ instanceId?: string;
155
157
  capabilities?: Record<string, unknown>;
158
+ scenarioDetails?: Record<string, import("../capabilities/scenarios.js").ScenarioDetail>;
159
+ sessionStoreLabel?: string;
160
+ storeDegraded?: boolean;
161
+ drainState?: {
162
+ draining: boolean;
163
+ since?: number;
164
+ inflight?: () => number;
165
+ lastActivityAt?: () => number;
166
+ };
167
+ modelReady?: () => boolean;
156
168
  restartState?: () => RestartSignal | undefined;
157
169
  planeDeferredState?: () => {
158
170
  version: number;
159
171
  since: number;
160
172
  blocked?: string[];
161
173
  } | undefined;
174
+ workflowsCapable?: boolean;
175
+ }
176
+ export interface ServiceKnobDeps {
177
+ snapshotBlobSqlCapBytes?: number;
178
+ sessionEventsMaxConnections?: number;
179
+ sessionEventsHeartbeatMs?: number;
180
+ sessionEventsStallMs?: number;
181
+ }
182
+ export interface ServiceDepGroups {
183
+ stores?: ServiceStoreDeps;
184
+ coordinators?: ServiceCoordinatorDeps;
185
+ seams?: ServiceSeamDeps;
186
+ observability?: ServiceObservabilityDeps;
187
+ governance?: ServiceGovernanceDeps;
188
+ deployment?: ServiceDeploymentDeps;
189
+ knobs?: ServiceKnobDeps;
162
190
  }
191
+ export type FlatServiceDeps = ServiceCoreDeps & Partial<ServiceStoreDeps & ServiceCoordinatorDeps & ServiceSeamDeps & ServiceObservabilityDeps & ServiceGovernanceDeps & ServiceDeploymentDeps & ServiceKnobDeps>;
192
+ export type ServiceDeps = FlatServiceDeps & ServiceDepGroups;
193
+ export declare function flattenServiceDeps(deps: ServiceDeps): FlatServiceDeps;
163
194
  export type { TaskRequestBody } from "./wire-types.js";
164
195
  export declare const MAX_USER_SKILLS = 10;
165
196
  export declare const MAX_SKILL_CONTENT_CHARS = 1048576;
166
197
  export declare const MAX_SYSTEM_PROMPT_CHARS = 16384;
167
198
  export declare const MAX_OUTPUT_SCHEMA_CHARS = 32768;
168
199
  export declare function validateUserSkills(skills: unknown): string | null;
169
- export declare function explicitOperatorOk(principal: string | undefined, operatorPrincipals: readonly string[]): boolean;
170
- export declare function coarseStatusForState(state: BakeState): "running" | "done" | "failed";
171
- export declare function errorCodeForExit(exitCode: number | null | undefined, cancelled: boolean): BakeErrorCode;
172
- export declare function isOperator(principal: string | undefined, operatorPrincipals: readonly string[]): boolean;
173
- export declare function explicitOperator(principal: string | undefined, operatorPrincipals: readonly string[]): boolean;
174
200
  export declare function cascadeConfig(ladder: readonly string[], maxCostUsd?: number): CascadeConfig;
175
201
  export declare function clampVerifyRounds(v: unknown): number;
176
- export declare function scopedIdempotencyKey(raw: string | undefined, source: string | null, principal: string | undefined): string | undefined;
177
202
  export declare function isQuestionAnswer(v: unknown): v is QuestionAnswer;
178
- export declare function createHttpServer(deps: ServiceDeps): http.Server & {
203
+ export declare function createHttpServer(rawDeps: ServiceDeps): http.Server & {
179
204
  denyExpiredApprovals: (now: number) => Promise<void>;
180
205
  };
181
206
  export declare function streamApprovals(req: IncomingMessage, res: ServerResponse, cs: Pick<CheckpointStoreFull, "listPending">, scope: string | undefined, pollMs?: number): Promise<void>;