@lucern/sdk 0.3.0-alpha.17 → 0.3.0-alpha.3

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 (210) hide show
  1. package/CHANGELOG.md +0 -12
  2. package/README.md +4 -110
  3. package/dist/adminClient.d.ts +8 -8
  4. package/dist/adminClient.js +40 -70
  5. package/dist/adminClient.js.map +1 -1
  6. package/dist/answersClient.js +12 -49
  7. package/dist/answersClient.js.map +1 -1
  8. package/dist/audience/index.d.ts +1 -2
  9. package/dist/audience/index.js +3 -1
  10. package/dist/audience/index.js.map +1 -1
  11. package/dist/audiencesClient.d.ts +16 -16
  12. package/dist/audiencesClient.js +91 -125
  13. package/dist/audiencesClient.js.map +1 -1
  14. package/dist/auditClient.js +14 -53
  15. package/dist/auditClient.js.map +1 -1
  16. package/dist/authContext.d.ts +2 -2
  17. package/dist/authContext.js +3 -4
  18. package/dist/authContext.js.map +1 -1
  19. package/dist/authDeviceClient.js +3 -16
  20. package/dist/authDeviceClient.js.map +1 -1
  21. package/dist/beliefs/index.d.ts +4 -9
  22. package/dist/beliefs/index.js +1305 -1943
  23. package/dist/beliefs/index.js.map +1 -1
  24. package/dist/beliefsClient.d.ts +2 -2
  25. package/dist/beliefsClient.js +23 -54
  26. package/dist/beliefsClient.js.map +1 -1
  27. package/dist/boundaryClientSurface.js +3 -10
  28. package/dist/boundaryClientSurface.js.map +1 -1
  29. package/dist/client-EiG9nJOY.d.ts +2911 -0
  30. package/dist/client.d.ts +41 -3038
  31. package/dist/client.js +1305 -1943
  32. package/dist/client.js.map +1 -1
  33. package/dist/contextClient.d.ts +3 -4
  34. package/dist/contextClient.js +30 -79
  35. package/dist/contextClient.js.map +1 -1
  36. package/dist/contextFacade.js +16 -25
  37. package/dist/contextFacade.js.map +1 -1
  38. package/dist/contextPackCompiler.js +30 -19
  39. package/dist/contextPackCompiler.js.map +1 -1
  40. package/dist/contextPackPolicy.js +17 -7
  41. package/dist/contextPackPolicy.js.map +1 -1
  42. package/dist/contextTypes.d.ts +0 -2
  43. package/dist/contracts/api-enums.contract.d.ts +2 -2
  44. package/dist/contracts/api-enums.contract.js +1 -6
  45. package/dist/contracts/api-enums.contract.js.map +1 -1
  46. package/dist/contracts/auth-session.contract.d.ts +1 -1
  47. package/dist/contracts/auth-session.contract.js +2 -14
  48. package/dist/contracts/auth-session.contract.js.map +1 -1
  49. package/dist/contracts/index.js +6 -30
  50. package/dist/contracts/index.js.map +1 -1
  51. package/dist/contracts/lens-filter.contract.js +3 -4
  52. package/dist/contracts/lens-filter.contract.js.map +1 -1
  53. package/dist/contracts/lens-workflow.contract.js +3 -4
  54. package/dist/contracts/lens-workflow.contract.js.map +1 -1
  55. package/dist/contracts/lensFilter.js +3 -4
  56. package/dist/contracts/lensFilter.js.map +1 -1
  57. package/dist/contracts/lensWorkflow.js +3 -4
  58. package/dist/contracts/lensWorkflow.js.map +1 -1
  59. package/dist/contracts/mcpTools.js +0 -6
  60. package/dist/contracts/mcpTools.js.map +1 -1
  61. package/dist/contradictions/index.d.ts +3 -8
  62. package/dist/contradictions/index.js +1305 -1943
  63. package/dist/contradictions/index.js.map +1 -1
  64. package/dist/coreClient.d.ts +2 -19
  65. package/dist/coreClient.js +15 -50
  66. package/dist/coreClient.js.map +1 -1
  67. package/dist/decisions/index.d.ts +13 -18
  68. package/dist/decisions/index.js +1305 -1943
  69. package/dist/decisions/index.js.map +1 -1
  70. package/dist/decisionsClient.d.ts +12 -4
  71. package/dist/decisionsClient.js +35 -60
  72. package/dist/decisionsClient.js.map +1 -1
  73. package/dist/edges/index.d.ts +86 -31
  74. package/dist/edges/index.js +1305 -1943
  75. package/dist/edges/index.js.map +1 -1
  76. package/dist/embeddingsClient.js +18 -60
  77. package/dist/embeddingsClient.js.map +1 -1
  78. package/dist/eventingClient.js +18 -60
  79. package/dist/eventingClient.js.map +1 -1
  80. package/dist/events.js +3 -6
  81. package/dist/events.js.map +1 -1
  82. package/dist/eventsCore.d.ts +1 -1
  83. package/dist/eventsCore.js +15 -50
  84. package/dist/eventsCore.js.map +1 -1
  85. package/dist/evidence/index.d.ts +3 -8
  86. package/dist/evidence/index.js +1305 -1943
  87. package/dist/evidence/index.js.map +1 -1
  88. package/dist/evidenceClient.js +15 -50
  89. package/dist/evidenceClient.js.map +1 -1
  90. package/dist/facade/context.d.ts +1 -2
  91. package/dist/facade/context.js +16 -25
  92. package/dist/facade/context.js.map +1 -1
  93. package/dist/gatewayFacades.d.ts +48 -90
  94. package/dist/gatewayFacades.js +128 -251
  95. package/dist/gatewayFacades.js.map +1 -1
  96. package/dist/graphAnalysisClient.d.ts +1 -53
  97. package/dist/graphAnalysisClient.js +17 -81
  98. package/dist/graphAnalysisClient.js.map +1 -1
  99. package/dist/graphClient.d.ts +13 -6
  100. package/dist/graphClient.js +39 -65
  101. package/dist/graphClient.js.map +1 -1
  102. package/dist/graphRecommendationsClient.js +17 -54
  103. package/dist/graphRecommendationsClient.js.map +1 -1
  104. package/dist/graphStateClassifierClient.js +19 -60
  105. package/dist/graphStateClassifierClient.js.map +1 -1
  106. package/dist/harnessClient.d.ts +24 -13
  107. package/dist/harnessClient.js +41 -61
  108. package/dist/harnessClient.js.map +1 -1
  109. package/dist/identityClient.d.ts +9 -27
  110. package/dist/identityClient.js +39 -203
  111. package/dist/identityClient.js.map +1 -1
  112. package/dist/index.d.ts +6 -15
  113. package/dist/index.js +1171 -2256
  114. package/dist/index.js.map +1 -1
  115. package/dist/jobsClient.js +19 -60
  116. package/dist/jobsClient.js.map +1 -1
  117. package/dist/learningClient.d.ts +6 -6
  118. package/dist/learningClient.js +43 -78
  119. package/dist/learningClient.js.map +1 -1
  120. package/dist/lenses/index.d.ts +37 -60
  121. package/dist/lenses/index.js +1305 -1943
  122. package/dist/lenses/index.js.map +1 -1
  123. package/dist/mcpClient.js +13 -51
  124. package/dist/mcpClient.js.map +1 -1
  125. package/dist/modelRuntimeClient.js +18 -60
  126. package/dist/modelRuntimeClient.js.map +1 -1
  127. package/dist/nodes/index.d.ts +22 -49
  128. package/dist/nodes/index.js +1305 -1943
  129. package/dist/nodes/index.js.map +1 -1
  130. package/dist/ontologies/index.d.ts +31 -37
  131. package/dist/ontologies/index.js +1305 -1943
  132. package/dist/ontologies/index.js.map +1 -1
  133. package/dist/ontologyClient.d.ts +25 -17
  134. package/dist/ontologyClient.js +41 -86
  135. package/dist/ontologyClient.js.map +1 -1
  136. package/dist/ontologyLinksClient.js +19 -60
  137. package/dist/ontologyLinksClient.js.map +1 -1
  138. package/dist/orgGraphSearchClient.js +14 -53
  139. package/dist/orgGraphSearchClient.js.map +1 -1
  140. package/dist/packRuntime.d.ts +1 -2
  141. package/dist/packsClient.d.ts +23 -9
  142. package/dist/packsClient.js +47 -62
  143. package/dist/packsClient.js.map +1 -1
  144. package/dist/policyClient.d.ts +10 -11
  145. package/dist/policyClient.js +26 -71
  146. package/dist/policyClient.js.map +1 -1
  147. package/dist/questions/index.d.ts +3 -8
  148. package/dist/questions/index.js +1305 -1943
  149. package/dist/questions/index.js.map +1 -1
  150. package/dist/realtime/index.d.ts +1 -1
  151. package/dist/reportsClient.d.ts +7 -7
  152. package/dist/reportsClient.js +52 -107
  153. package/dist/reportsClient.js.map +1 -1
  154. package/dist/schemaClient.d.ts +3 -3
  155. package/dist/schemaClient.js +30 -63
  156. package/dist/schemaClient.js.map +1 -1
  157. package/dist/sdkSurface.d.ts +3 -6
  158. package/dist/sdkSurface.js +6 -10
  159. package/dist/sdkSurface.js.map +1 -1
  160. package/dist/sourcesClient.js +15 -50
  161. package/dist/sourcesClient.js.map +1 -1
  162. package/dist/telemetryClient.js +19 -60
  163. package/dist/telemetryClient.js.map +1 -1
  164. package/dist/toolRegistryClient.d.ts +2 -10
  165. package/dist/toolRegistryClient.js +20 -73
  166. package/dist/toolRegistryClient.js.map +1 -1
  167. package/dist/topics/index.d.ts +8 -19
  168. package/dist/topics/index.js +1305 -1945
  169. package/dist/topics/index.js.map +1 -1
  170. package/dist/topicsClient.d.ts +0 -2
  171. package/dist/topicsClient.js +20 -60
  172. package/dist/topicsClient.js.map +1 -1
  173. package/dist/types.d.ts +0 -17
  174. package/dist/version.d.ts +1 -1
  175. package/dist/version.js +1 -1
  176. package/dist/version.js.map +1 -1
  177. package/dist/workflowClient.d.ts +40 -58
  178. package/dist/workflowClient.js +54 -66
  179. package/dist/workflowClient.js.map +1 -1
  180. package/dist/worktrees/index.d.ts +33 -54
  181. package/dist/worktrees/index.js +1305 -1943
  182. package/dist/worktrees/index.js.map +1 -1
  183. package/package.json +3 -17
  184. package/dist/accessControl.d.ts +0 -79
  185. package/dist/accessControl.js +0 -1270
  186. package/dist/accessControl.js.map +0 -1
  187. package/dist/clientHelpers.d.ts +0 -48
  188. package/dist/clientHelpers.js +0 -137
  189. package/dist/clientHelpers.js.map +0 -1
  190. package/dist/control-plane.d.ts +0 -69
  191. package/dist/control-plane.js +0 -674
  192. package/dist/control-plane.js.map +0 -1
  193. package/dist/functionSurface.d.ts +0 -144
  194. package/dist/functionSurface.js +0 -1227
  195. package/dist/functionSurface.js.map +0 -1
  196. package/dist/functionSurfaceClient.d.ts +0 -8
  197. package/dist/functionSurfaceClient.js +0 -1227
  198. package/dist/functionSurfaceClient.js.map +0 -1
  199. package/dist/graphIntel.d.ts +0 -4
  200. package/dist/graphIntel.js +0 -3
  201. package/dist/graphIntel.js.map +0 -1
  202. package/dist/graphIntelligence.d.ts +0 -2
  203. package/dist/graphIntelligence.js +0 -47
  204. package/dist/graphIntelligence.js.map +0 -1
  205. package/dist/infisicalRuntime.d.ts +0 -43
  206. package/dist/infisicalRuntime.js +0 -346
  207. package/dist/infisicalRuntime.js.map +0 -1
  208. package/dist/secrets.d.ts +0 -1
  209. package/dist/secrets.js +0 -3
  210. package/dist/secrets.js.map +0 -1
@@ -1,1227 +0,0 @@
1
- // src/authContext.ts
2
- var LucernSdkAuthContextError = class extends Error {
3
- reason;
4
- constructor(reason, message) {
5
- super(message);
6
- this.name = "LucernSdkAuthContextError";
7
- this.reason = reason;
8
- }
9
- };
10
- function cleanString(value) {
11
- const normalized = value?.trim();
12
- return normalized ? normalized : void 0;
13
- }
14
- function cleanStringList(values) {
15
- if (!values) {
16
- return [];
17
- }
18
- return values.map((value) => value.trim()).filter(
19
- (value, index, list) => value.length > 0 && list.indexOf(value) === index
20
- );
21
- }
22
- function requireString(value, reason, label) {
23
- const normalized = cleanString(value);
24
- if (!normalized) {
25
- throw new LucernSdkAuthContextError(
26
- reason,
27
- `Canonical Lucern SDK auth context is missing ${label}.`
28
- );
29
- }
30
- return normalized;
31
- }
32
- function requirePrincipalType(principalType) {
33
- if (!principalType) {
34
- throw new LucernSdkAuthContextError(
35
- "principal_missing",
36
- "Canonical Lucern SDK auth context is missing principalType."
37
- );
38
- }
39
- return principalType;
40
- }
41
- function requireAuthMode(authMode) {
42
- if (!authMode) {
43
- throw new LucernSdkAuthContextError(
44
- "principal_missing",
45
- "Canonical Lucern SDK auth context is missing authMode."
46
- );
47
- }
48
- return authMode;
49
- }
50
- function ensurePermitMatch(args) {
51
- const actual = cleanString(args.actual);
52
- if (actual && actual !== args.expected) {
53
- throw new LucernSdkAuthContextError(
54
- "policy_denied",
55
- `Canonical Lucern SDK auth context has conflicting Permit ${args.field}.`
56
- );
57
- }
58
- }
59
- function normalizeCanonicalLucernAuthContext(input) {
60
- if (!input) {
61
- throw new LucernSdkAuthContextError(
62
- "principal_missing",
63
- "Canonical Lucern SDK auth context is required."
64
- );
65
- }
66
- if (input.policyDecision === "deny") {
67
- throw new LucernSdkAuthContextError(
68
- "policy_denied",
69
- "Canonical Lucern SDK auth context carries a denied policy decision."
70
- );
71
- }
72
- const principalId = requireString(
73
- input.principalId,
74
- "principal_missing",
75
- "principalId"
76
- );
77
- const tenantId = requireString(input.tenantId, "tenant_missing", "tenantId");
78
- const workspaceId = requireString(
79
- input.workspaceId,
80
- "workspace_missing",
81
- "workspaceId"
82
- );
83
- const roles = cleanStringList(input.roles);
84
- const scopes = cleanStringList(input.scopes);
85
- const principalType = requirePrincipalType(input.principalType);
86
- const authMode = requireAuthMode(input.authMode);
87
- const roleBasedInteractiveAuth = authMode === "interactive_user" && roles.length > 0;
88
- if (roles.length === 0 || scopes.length === 0 && !roleBasedInteractiveAuth) {
89
- throw new LucernSdkAuthContextError(
90
- "membership_missing",
91
- "Canonical Lucern SDK auth context requires non-empty roles and scopes."
92
- );
93
- }
94
- const subject = cleanString(input.permit?.subject) ?? principalId;
95
- const tenant = cleanString(input.permit?.tenant) ?? tenantId;
96
- const workspace = cleanString(input.permit?.workspace) ?? workspaceId;
97
- ensurePermitMatch({
98
- field: "subject",
99
- expected: principalId,
100
- actual: subject
101
- });
102
- ensurePermitMatch({ field: "tenant", expected: tenantId, actual: tenant });
103
- ensurePermitMatch({
104
- field: "workspace",
105
- expected: workspaceId,
106
- actual: workspace
107
- });
108
- const context = input.permit?.context ? { ...input.permit.context } : void 0;
109
- return {
110
- clerkId: cleanString(input.clerkId),
111
- principalId,
112
- tenantId,
113
- workspaceId,
114
- principalType,
115
- authMode,
116
- roles,
117
- scopes,
118
- delegationChain: input.delegationChain ? [...input.delegationChain] : [],
119
- policyTraceId: cleanString(input.policyTraceId),
120
- correlationId: cleanString(input.correlationId),
121
- membershipId: cleanString(input.membershipId),
122
- permit: {
123
- subject,
124
- tenant,
125
- workspace,
126
- resource: cleanString(input.permit?.resource),
127
- action: cleanString(input.permit?.action),
128
- relation: cleanString(input.permit?.relation),
129
- context
130
- }
131
- };
132
- }
133
- function createCanonicalAuthHeaders(authContext) {
134
- const headers = {
135
- "x-lucern-principal-id": authContext.principalId,
136
- "x-lucern-principal-type": authContext.principalType,
137
- "x-lucern-tenant": authContext.tenantId,
138
- "x-lucern-tenant-id": authContext.tenantId,
139
- "x-lucern-workspace": authContext.workspaceId,
140
- "x-lucern-workspace-id": authContext.workspaceId,
141
- "x-lucern-auth-mode": authContext.authMode,
142
- "x-lucern-roles": authContext.roles.join(","),
143
- "x-lucern-scopes": authContext.scopes.join(","),
144
- "x-lucern-permit-context": JSON.stringify(authContext.permit)
145
- };
146
- if (authContext.clerkId) {
147
- headers["x-lucern-clerk-id"] = authContext.clerkId;
148
- headers["x-lucern-user-id"] = authContext.clerkId;
149
- }
150
- if (authContext.delegationChain.length > 0) {
151
- headers["x-lucern-delegation-chain"] = JSON.stringify(
152
- authContext.delegationChain
153
- );
154
- }
155
- if (authContext.policyTraceId) {
156
- headers["x-lucern-policy-trace-id"] = authContext.policyTraceId;
157
- }
158
- if (authContext.correlationId) {
159
- headers["x-correlation-id"] = authContext.correlationId;
160
- headers["x-lucern-correlation-id"] = authContext.correlationId;
161
- }
162
- if (authContext.membershipId) {
163
- headers["x-lucern-membership-id"] = authContext.membershipId;
164
- }
165
- return headers;
166
- }
167
-
168
- // src/coreClient.ts
169
- var LucernApiError = class extends Error {
170
- code;
171
- status;
172
- invariant;
173
- suggestion;
174
- details;
175
- requestId;
176
- correlationId;
177
- policyTraceId;
178
- constructor(args) {
179
- super(args.message);
180
- this.name = "LucernApiError";
181
- this.code = args.code;
182
- this.status = args.status;
183
- this.invariant = args.invariant;
184
- this.suggestion = args.suggestion;
185
- this.details = args.details;
186
- this.requestId = args.requestId;
187
- this.correlationId = args.correlationId;
188
- this.policyTraceId = args.policyTraceId;
189
- }
190
- };
191
- function fillRandomBytes(length) {
192
- const bytes = new Uint8Array(length);
193
- if (typeof globalThis.crypto?.getRandomValues === "function") {
194
- globalThis.crypto.getRandomValues(bytes);
195
- return bytes;
196
- }
197
- for (let index = 0; index < length; index += 1) {
198
- bytes[index] = Math.floor(Math.random() * 256);
199
- }
200
- return bytes;
201
- }
202
- function generatePortableRequestId() {
203
- if (typeof globalThis.crypto?.randomUUID === "function") {
204
- return globalThis.crypto.randomUUID();
205
- }
206
- const bytes = fillRandomBytes(16);
207
- bytes[6] = bytes[6] & 15 | 64;
208
- bytes[8] = bytes[8] & 63 | 128;
209
- const hex = Array.from(bytes, (value) => value.toString(16).padStart(2, "0"));
210
- return `${hex.slice(0, 4).join("")}-${hex.slice(4, 6).join("")}-${hex.slice(
211
- 6,
212
- 8
213
- ).join("")}-${hex.slice(8, 10).join("")}-${hex.slice(10).join("")}`;
214
- }
215
- var randomIdempotencyKey = generatePortableRequestId;
216
- function isRetryableStatus(status) {
217
- return status >= 500 || status === 408 || status === 429;
218
- }
219
- function fallbackErrorCode(status) {
220
- if (status === 401) {
221
- return "AUTHENTICATION_REQUIRED";
222
- }
223
- if (status === 403) {
224
- return "FORBIDDEN";
225
- }
226
- if (status === 404) {
227
- return "NOT_FOUND";
228
- }
229
- if (status === 408) {
230
- return "UPSTREAM_ERROR";
231
- }
232
- if (status === 409) {
233
- return "CONFLICT";
234
- }
235
- if (status === 429) {
236
- return "RATE_LIMIT_EXCEEDED";
237
- }
238
- if (status >= 500) {
239
- return "UPSTREAM_ERROR";
240
- }
241
- return "INTERNAL_ERROR";
242
- }
243
- function delay(ms) {
244
- return new Promise((resolve) => setTimeout(resolve, ms));
245
- }
246
- function parseRetryAfterMs(value) {
247
- if (!value) {
248
- return null;
249
- }
250
- const trimmed = value.trim();
251
- if (!trimmed) {
252
- return null;
253
- }
254
- const numeric = Number(trimmed);
255
- if (Number.isFinite(numeric)) {
256
- return Math.max(0, Math.round(numeric * 1e3));
257
- }
258
- const parsedDate = Date.parse(trimmed);
259
- if (Number.isFinite(parsedDate)) {
260
- return Math.max(0, parsedDate - Date.now());
261
- }
262
- return null;
263
- }
264
- function computeRetryDelayMs(args) {
265
- const baseDelay = args.status === 429 ? Math.max(
266
- args.retryAfterMs ?? 0,
267
- Math.min(1e3 * 2 ** args.attempt, 1e4)
268
- ) : Math.min(1e3 * 2 ** args.attempt, 4e3);
269
- if (args.status !== 429) {
270
- return baseDelay;
271
- }
272
- const jitterWindow = Math.max(250, Math.round(baseDelay * 0.25));
273
- return baseDelay + Math.round(Math.random() * jitterWindow);
274
- }
275
- function timeoutError(timeoutMs) {
276
- const error = new Error(`Request timed out after ${timeoutMs}ms`);
277
- error.name = "AbortError";
278
- return error;
279
- }
280
- function isRecord(value) {
281
- return value !== null && typeof value === "object" && !Array.isArray(value);
282
- }
283
- function readPolicySummaryFromDetails(details) {
284
- if (!isRecord(details)) {
285
- return null;
286
- }
287
- const directSummary = details.summary;
288
- if (typeof directSummary === "string" && directSummary.trim().length > 0) {
289
- return directSummary.trim();
290
- }
291
- const policy = details.policy;
292
- if (!isRecord(policy)) {
293
- return null;
294
- }
295
- const explanation = policy.explanation;
296
- if (!isRecord(explanation)) {
297
- return null;
298
- }
299
- const nestedSummary = explanation.summary;
300
- if (typeof nestedSummary === "string" && nestedSummary.trim().length > 0) {
301
- return nestedSummary.trim();
302
- }
303
- return null;
304
- }
305
- async function resolveConfiguredAuthContext(authContext) {
306
- if (typeof authContext === "function") {
307
- return await authContext();
308
- }
309
- return authContext;
310
- }
311
- function mergeHeaderRecord(base, addition) {
312
- const headers = new Headers(base);
313
- for (const [key, value] of Object.entries(addition)) {
314
- const existing = headers.get(key);
315
- if (existing !== null && existing !== value) {
316
- throw new LucernSdkAuthContextError(
317
- "policy_denied",
318
- `Canonical Lucern SDK auth context conflicts with existing ${key} header.`
319
- );
320
- }
321
- headers.set(key, value);
322
- }
323
- return Object.fromEntries(headers.entries());
324
- }
325
- function cleanHeaderValue(value) {
326
- const normalized = value?.trim();
327
- return normalized ? normalized : void 0;
328
- }
329
- function createGatewayRequestClient(config = {}) {
330
- const fetchImpl = config.fetchImpl ?? fetch;
331
- const baseUrl = config.baseUrl?.replace(/\/+$/, "") ?? "";
332
- const maxRetries = config.maxRetries ?? 2;
333
- const requestIdFactory = config.requestIdFactory ?? (() => generatePortableRequestId());
334
- async function resolveAuthHeaders() {
335
- const provided = config.getAuthHeaders ? await config.getAuthHeaders() : {};
336
- const headers = new Headers(provided);
337
- const setIfAbsent = (name, value) => {
338
- const normalized = cleanHeaderValue(value);
339
- if (normalized && !headers.has(name)) {
340
- headers.set(name, normalized);
341
- }
342
- };
343
- setIfAbsent("x-lucern-key", config.apiKey);
344
- setIfAbsent("x-lucern-session-token", config.userToken);
345
- setIfAbsent("x-lucern-environment", config.environment);
346
- setIfAbsent("x-lucern-clerk-id", config.clerkId);
347
- setIfAbsent("x-lucern-user-id", config.userId ?? config.clerkId);
348
- setIfAbsent("x-lucern-deployment-host", config.deploymentHost);
349
- const base = Object.fromEntries(headers.entries());
350
- const authContextInput = await resolveConfiguredAuthContext(
351
- config.authContext
352
- );
353
- if (!authContextInput && !config.requireCanonicalAuthContext) {
354
- return base;
355
- }
356
- const authContext = normalizeCanonicalLucernAuthContext(authContextInput);
357
- return mergeHeaderRecord(base, createCanonicalAuthHeaders(authContext));
358
- }
359
- async function fetchWithTimeout(url, init, timeoutMs) {
360
- const controller = new AbortController();
361
- const timer = setTimeout(() => controller.abort(), timeoutMs);
362
- try {
363
- return await fetchImpl(url, { ...init, signal: controller.signal });
364
- } catch (error) {
365
- if (controller.signal.aborted) {
366
- throw timeoutError(timeoutMs);
367
- }
368
- throw error;
369
- } finally {
370
- clearTimeout(timer);
371
- }
372
- }
373
- async function parsePayload(response) {
374
- const text = await response.text();
375
- if (!text) {
376
- return null;
377
- }
378
- const parsed = tryParseGatewayEnvelopeJson(text);
379
- if (!parsed.ok) {
380
- return null;
381
- }
382
- return isRecord(parsed.value) ? parsed.value : null;
383
- }
384
- function resolveTimeoutMs(method, requestTimeoutMs) {
385
- if (typeof requestTimeoutMs === "number") {
386
- return requestTimeoutMs;
387
- }
388
- const methodTimeoutMs = config.timeoutMsByMethod?.[method];
389
- if (typeof methodTimeoutMs === "number") {
390
- return methodTimeoutMs;
391
- }
392
- return config.timeoutMs ?? 15e3;
393
- }
394
- function tryParseGatewayEnvelopeJson(text) {
395
- const trimmed = text.trim();
396
- if (!trimmed.startsWith("{") && !trimmed.startsWith("[")) {
397
- return { ok: false, reason: "non-json" };
398
- }
399
- try {
400
- return { ok: true, value: JSON.parse(trimmed) };
401
- } catch (error) {
402
- if (error instanceof SyntaxError) {
403
- return { ok: false, reason: "invalid-json", error };
404
- }
405
- throw error;
406
- }
407
- }
408
- function buildApiError(args) {
409
- const failure = args.failure;
410
- const legacyError = failure && isRecord(failure.error) ? failure.error : failure?.legacyError;
411
- const correlationId = failure?.correlationId ?? args.response.headers.get("x-lucern-correlation-id")?.trim() ?? args.requestId;
412
- const policyTraceId = failure?.policyTraceId ?? args.response.headers.get("x-lucern-policy-trace-id")?.trim() ?? null;
413
- const details = failure?.details ?? legacyError?.details;
414
- const policySummary = readPolicySummaryFromDetails(details);
415
- const failureMessage = typeof failure?.error === "string" ? failure.error : legacyError?.message;
416
- return new LucernApiError({
417
- code: failure?.code ?? legacyError?.code ?? fallbackErrorCode(args.response.status),
418
- message: policySummary ?? failureMessage ?? (args.response.ok ? "Platform API returned an invalid success payload." : "Platform API request failed."),
419
- status: args.response.status,
420
- invariant: failure?.invariant,
421
- suggestion: failure?.suggestion,
422
- details,
423
- requestId: args.requestId,
424
- correlationId,
425
- policyTraceId
426
- });
427
- }
428
- async function request(args) {
429
- const authHeaders = await resolveAuthHeaders();
430
- const method = args.method ?? "GET";
431
- const timeoutMs = resolveTimeoutMs(method, args.timeoutMs);
432
- const headers = new Headers({
433
- "content-type": "application/json",
434
- ...authHeaders
435
- });
436
- if (args.idempotencyKey) {
437
- headers.set("idempotency-key", args.idempotencyKey);
438
- }
439
- const requestId = headers.get("x-correlation-id")?.trim() || headers.get("x-request-id")?.trim() || args.requestId || requestIdFactory();
440
- if (!headers.has("x-correlation-id") && !headers.has("x-request-id")) {
441
- headers.set("x-correlation-id", requestId);
442
- }
443
- const url = `${baseUrl}${args.path}`;
444
- const serializedBody = args.body ? JSON.stringify(args.body) : void 0;
445
- const init = {
446
- method,
447
- headers,
448
- body: serializedBody
449
- };
450
- let lastError;
451
- for (let attempt = 0; attempt <= maxRetries; attempt++) {
452
- const hookRequestContext = {
453
- requestId,
454
- attempt,
455
- maxRetries,
456
- method,
457
- path: args.path,
458
- url,
459
- headers: new Headers(headers),
460
- body: serializedBody,
461
- timeoutMs
462
- };
463
- await config.onRequest?.(hookRequestContext);
464
- const startedAt = Date.now();
465
- try {
466
- const response = await fetchWithTimeout(url, init, timeoutMs);
467
- const responseClone = response.clone();
468
- const payload = await parsePayload(response);
469
- const retryAfterMs = parseRetryAfterMs(
470
- response.headers.get("Retry-After")
471
- );
472
- if (!response.ok || !payload?.success) {
473
- const failure = payload && !payload.success ? payload : null;
474
- const apiError = buildApiError({
475
- requestId,
476
- response,
477
- failure
478
- });
479
- const willRetry = attempt < maxRetries && isRetryableStatus(response.status);
480
- await config.onResponse?.({
481
- ...hookRequestContext,
482
- durationMs: Date.now() - startedAt,
483
- status: response.status,
484
- response: responseClone,
485
- error: apiError,
486
- correlationId: apiError.correlationId ?? requestId,
487
- policyTraceId: apiError.policyTraceId ?? null,
488
- retryAfterMs,
489
- willRetry
490
- });
491
- if (willRetry) {
492
- lastError = apiError;
493
- await delay(
494
- computeRetryDelayMs({
495
- attempt,
496
- status: response.status,
497
- retryAfterMs
498
- })
499
- );
500
- continue;
501
- }
502
- throw apiError;
503
- }
504
- const successPayload = payload;
505
- await config.onResponse?.({
506
- ...hookRequestContext,
507
- durationMs: Date.now() - startedAt,
508
- status: response.status,
509
- response: responseClone,
510
- correlationId: successPayload.correlationId ?? response.headers.get("x-lucern-correlation-id")?.trim() ?? requestId,
511
- policyTraceId: successPayload.policyTraceId ?? response.headers.get("x-lucern-policy-trace-id")?.trim() ?? null,
512
- idempotentReplay: successPayload.idempotentReplay,
513
- retryAfterMs,
514
- willRetry: false
515
- });
516
- return successPayload;
517
- } catch (fetchError) {
518
- if (fetchError instanceof LucernApiError) {
519
- throw fetchError;
520
- }
521
- const willRetry = attempt < maxRetries;
522
- await config.onResponse?.({
523
- ...hookRequestContext,
524
- durationMs: Date.now() - startedAt,
525
- error: fetchError,
526
- correlationId: requestId,
527
- policyTraceId: null,
528
- willRetry
529
- });
530
- lastError = fetchError;
531
- if (willRetry) {
532
- await delay(computeRetryDelayMs({ attempt }));
533
- }
534
- }
535
- }
536
- throw lastError instanceof Error ? lastError : new Error("Platform API request failed after retries.");
537
- }
538
- return {
539
- request
540
- };
541
- }
542
-
543
- // src/generated/functionSurface.ts
544
- var FUNCTION_SURFACE_METHOD_PATHS = [
545
- "answers.answerQuestion",
546
- "answers.createAnswer",
547
- "answers.getAnswer",
548
- "beliefs.archiveBelief",
549
- "beliefs.bisectConfidence",
550
- "beliefs.createBelief",
551
- "beliefs.forkBelief",
552
- "beliefs.getBelief",
553
- "beliefs.getConfidenceHistory",
554
- "beliefs.listBeliefs",
555
- "beliefs.modulateConfidence",
556
- "beliefs.refineBelief",
557
- "beliefs.searchBeliefs",
558
- "bootstrap.generateSessionHandoff",
559
- "coding.getChangeHistory",
560
- "coding.getCodeContext",
561
- "coding.getFailureLog",
562
- "coding.recordAttempt",
563
- "context.analyzeTopicDensity",
564
- "context.applyAutoBranching",
565
- "context.compileContext",
566
- "context.discover",
567
- "context.discoverEntityConnections",
568
- "context.getLatticeCoverage",
569
- "context.recordScopeLearning",
570
- "context.seedBeliefLattice",
571
- "context.triggerBeliefReview",
572
- "contracts.createEpistemicContract",
573
- "contracts.evaluateContract",
574
- "contracts.getContractStatus",
575
- "contradictions.flagContradiction",
576
- "controlPlane.identity.resolveInteractivePrincipal",
577
- "coordination.broadcastMessage",
578
- "coordination.claimFiles",
579
- "coordination.endSession",
580
- "coordination.getAgentInbox",
581
- "coordination.heartbeatSession",
582
- "coordination.listActiveSessions",
583
- "coordination.registerSession",
584
- "coordination.sendAgentMessage",
585
- "edges.batchCreateEdges",
586
- "edges.createEdge",
587
- "edges.queryLineage",
588
- "edges.removeEdge",
589
- "edges.removeEdgesBetween",
590
- "edges.updateEdge",
591
- "evidence.addEvidence",
592
- "evidence.createEvidence",
593
- "evidence.getEvidence",
594
- "evidence.linkEvidence",
595
- "evidence.linkEvidenceToBelief",
596
- "evidence.linkEvidenceToQuestion",
597
- "evidence.listEvidence",
598
- "evidence.searchEvidence",
599
- "graph.detectConfirmationBias",
600
- "graph.findContradictions",
601
- "graph.getGraphGaps",
602
- "graph.getGraphNeighborhood",
603
- "graph.getGraphStructureAnalysis",
604
- "graph.getTopicCoverage",
605
- "graph.traceEntityImpact",
606
- "graph.traverseGraph",
607
- "graphAnalysis.listGraphIntelligenceQueries",
608
- "graphAnalysis.runGraphIntelligenceQuery",
609
- "identity.checkPermission",
610
- "identity.filterByPermission",
611
- "identity.whoami",
612
- "judgments.getAuditTrail",
613
- "judgments.recordJudgment",
614
- "lenses.applyLensToTopic",
615
- "lenses.createLens",
616
- "lenses.listLenses",
617
- "lenses.removeLensFromTopic",
618
- "nodes.archiveEpistemicNode",
619
- "nodes.batchCreateEpistemicNodes",
620
- "nodes.createEpistemicNode",
621
- "nodes.getEpistemicNode",
622
- "nodes.listEpistemicNodes",
623
- "nodes.supersedeEpistemicNode",
624
- "nodes.updateEpistemicNode",
625
- "nodes.verifyEpistemicNode",
626
- "observations.getObservationContext",
627
- "observations.ingestObservation",
628
- "ontologies.applyOntology",
629
- "ontologies.archiveOntology",
630
- "ontologies.createOntology",
631
- "ontologies.createOntologyVersion",
632
- "ontologies.deprecateOntologyVersion",
633
- "ontologies.getOntology",
634
- "ontologies.listOntologies",
635
- "ontologies.matchEntityType",
636
- "ontologies.publishOntologyVersion",
637
- "ontologies.resolveEffectiveOntology",
638
- "ontologies.updateOntology",
639
- "policy.manageWritePolicy",
640
- "questions.archiveQuestion",
641
- "questions.createQuestion",
642
- "questions.findMissingQuestions",
643
- "questions.getFalsificationQuestions",
644
- "questions.getHighPriorityQuestions",
645
- "questions.getQuestion",
646
- "questions.listQuestions",
647
- "questions.refineQuestion",
648
- "questions.updateQuestionStatus",
649
- "tasks.completeTask",
650
- "tasks.createTask",
651
- "tasks.listTasks",
652
- "tasks.updateTask",
653
- "topics.createTopic",
654
- "topics.getTopic",
655
- "topics.getTopicGraphSpine",
656
- "topics.getTopicTree",
657
- "topics.listTopics",
658
- "topics.materializeTopicGraph",
659
- "topics.updateTopic",
660
- "worktrees.activateWorktree",
661
- "worktrees.addWorktree",
662
- "worktrees.beginBuildSession",
663
- "worktrees.listAllWorktrees",
664
- "worktrees.listCampaigns",
665
- "worktrees.listWorktrees",
666
- "worktrees.merge",
667
- "worktrees.openPullRequest",
668
- "worktrees.pipelineSnapshot",
669
- "worktrees.push",
670
- "worktrees.updateWorktreeMetadata",
671
- "worktrees.updateWorktreeTargets"
672
- ];
673
- var CONTRACTS = {
674
- "activate_worktree": { method: "POST", path: "/worktrees/activate", kind: "mutation", idempotent: true, surfaceIntent: "mcp_workflow" },
675
- "add_evidence": { method: "POST", path: "/evidence/add", kind: "mutation", idempotent: true, surfaceIntent: "compatibility" },
676
- "add_worktree": { method: "POST", path: "/worktrees", kind: "mutation", idempotent: true, surfaceIntent: "mcp_workflow" },
677
- "analyze_topic_density": { method: "POST", path: "/scope/topic-density", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
678
- "answer_question": { method: "POST", path: "/questions/answer", kind: "mutation", idempotent: true, surfaceIntent: "compatibility" },
679
- "apply_auto_branching": { method: "POST", path: "/scope/auto-branching", kind: "mutation", idempotent: true, surfaceIntent: "mcp_analysis" },
680
- "apply_lens_to_topic": { method: "POST", path: "/lenses/apply", kind: "mutation", idempotent: true, surfaceIntent: "mcp_workflow" },
681
- "apply_ontology": { method: "POST", path: "/ontologies/apply", kind: "mutation", idempotent: true, surfaceIntent: "mcp_workflow" },
682
- "archive_belief": { method: "DELETE", path: "/beliefs", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
683
- "archive_epistemic_node": { method: "POST", path: "/nodes/archive", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
684
- "archive_ontology": { method: "DELETE", path: "/ontologies", kind: "mutation", idempotent: true, surfaceIntent: "mcp_governance" },
685
- "archive_question": { method: "DELETE", path: "/questions", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
686
- "batch_create_edges": { method: "POST", path: "/edges/batch", kind: "mutation", idempotent: true, surfaceIntent: "mcp_analysis" },
687
- "batch_create_epistemic_nodes": { method: "POST", path: "/nodes/batch", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
688
- "begin_build_session": { method: "POST", path: "/mcp/build-session/begin", kind: "mutation", idempotent: true, surfaceIntent: "system" },
689
- "bisect_confidence": { method: "POST", path: "/beliefs/confidence/bisect", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
690
- "broadcast_message": { method: "POST", path: "/coordination/messages/broadcast", kind: "mutation", idempotent: true, surfaceIntent: "system" },
691
- "check_permission": { method: "POST", path: "/identity/check-permission", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
692
- "claim_files": { method: "POST", path: "/coordination/file-claims", kind: "mutation", idempotent: true, surfaceIntent: "system" },
693
- "compile_context": { method: "POST", path: "/context/compile", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
694
- "complete_task": { method: "POST", path: "/tasks/complete", kind: "mutation", idempotent: true, surfaceIntent: "mcp_workflow" },
695
- "create_answer": { method: "POST", path: "/answers", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
696
- "create_belief": { method: "POST", path: "/beliefs", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
697
- "create_edge": { method: "POST", path: "/edges", kind: "mutation", idempotent: true, surfaceIntent: "mcp_analysis" },
698
- "create_epistemic_contract": { method: "POST", path: "/contracts", kind: "mutation", idempotent: true, surfaceIntent: "mcp_governance" },
699
- "create_epistemic_node": { method: "POST", path: "/nodes", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
700
- "create_evidence": { method: "POST", path: "/evidence", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
701
- "create_lens": { method: "POST", path: "/lenses", kind: "mutation", idempotent: true, surfaceIntent: "mcp_governance" },
702
- "create_ontology": { method: "POST", path: "/ontologies", kind: "mutation", idempotent: true, surfaceIntent: "mcp_governance" },
703
- "create_ontology_version": { method: "POST", path: "/ontologies/versions", kind: "mutation", idempotent: true, surfaceIntent: "mcp_governance" },
704
- "create_question": { method: "POST", path: "/questions", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
705
- "create_task": { method: "POST", path: "/tasks", kind: "mutation", idempotent: true, surfaceIntent: "mcp_workflow" },
706
- "create_topic": { method: "POST", path: "/topics", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
707
- "deprecate_ontology_version": { method: "POST", path: "/ontologies/versions/deprecate", kind: "mutation", idempotent: true, surfaceIntent: "mcp_governance" },
708
- "detect_confirmation_bias": { method: "POST", path: "/graph/confirmation-bias", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
709
- "discover": { method: "POST", path: "/context/discover", kind: "query", idempotent: false, surfaceIntent: "compatibility" },
710
- "discover_entity_connections": { method: "POST", path: "/context/entity-connections", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
711
- "end_session": { method: "POST", path: "/coordination/end-session", kind: "mutation", idempotent: true, surfaceIntent: "system" },
712
- "evaluate_contract": { method: "POST", path: "/contracts/evaluate", kind: "mutation", idempotent: true, surfaceIntent: "mcp_governance" },
713
- "filter_by_permission": { method: "POST", path: "/identity/filter-by-permission", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
714
- "find_contradictions": { method: "POST", path: "/graph/contradictions", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
715
- "find_missing_questions": { method: "POST", path: "/questions/missing", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
716
- "flag_contradiction": { method: "POST", path: "/contradictions", kind: "mutation", idempotent: true, surfaceIntent: "mcp_analysis" },
717
- "fork_belief": { method: "POST", path: "/beliefs/fork", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
718
- "generate_session_handoff": { method: "POST", path: "/bootstrap/session-handoff", kind: "query", idempotent: false, surfaceIntent: "system" },
719
- "get_agent_inbox": { method: "POST", path: "/coordination/messages/inbox", kind: "query", idempotent: false, surfaceIntent: "system" },
720
- "get_answer": { method: "GET", path: "/answers/get", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
721
- "get_audit_trail": { method: "POST", path: "/judgments/audit-trail", kind: "query", idempotent: false, surfaceIntent: "system" },
722
- "get_belief": { method: "GET", path: "/beliefs/get", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
723
- "get_change_history": { method: "POST", path: "/coding/change-history", kind: "query", idempotent: false, surfaceIntent: "system" },
724
- "get_code_context": { method: "POST", path: "/coding/context", kind: "query", idempotent: false, surfaceIntent: "system" },
725
- "get_confidence_history": { method: "POST", path: "/beliefs/confidence-history", kind: "query", idempotent: false, surfaceIntent: "compatibility" },
726
- "get_contract_status": { method: "POST", path: "/contracts/status", kind: "query", idempotent: false, surfaceIntent: "mcp_governance" },
727
- "get_epistemic_node": { method: "GET", path: "/nodes/get", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
728
- "get_evidence": { method: "GET", path: "/evidence/get", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
729
- "get_failure_log": { method: "POST", path: "/coding/failure-log", kind: "query", idempotent: false, surfaceIntent: "system" },
730
- "get_falsification_questions": { method: "POST", path: "/questions/falsification", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
731
- "get_graph_gaps": { method: "POST", path: "/graph/gaps", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
732
- "get_graph_neighborhood": { method: "POST", path: "/graph/neighborhood", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
733
- "get_graph_structure_analysis": { method: "POST", path: "/graph/structure-analysis", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
734
- "get_high_priority_questions": { method: "POST", path: "/questions/high-priority", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
735
- "get_lattice_coverage": { method: "POST", path: "/scope/belief-lattice/coverage", kind: "query", idempotent: false, surfaceIntent: "system" },
736
- "get_observation_context": { method: "POST", path: "/observations/context", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
737
- "get_ontology": { method: "GET", path: "/ontologies/get", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
738
- "get_question": { method: "GET", path: "/questions/get", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
739
- "get_topic": { method: "GET", path: "/topics/get", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
740
- "get_topic_coverage": { method: "POST", path: "/graph/topic-coverage", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
741
- "get_topic_graph_spine": { method: "GET", path: "/topics/graph-spine", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
742
- "get_topic_tree": { method: "GET", path: "/topics/tree", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
743
- "heartbeat_session": { method: "POST", path: "/coordination/heartbeat-session", kind: "mutation", idempotent: true, surfaceIntent: "system" },
744
- "identity_whoami": { method: "GET", path: "/identity/whoami", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
745
- "ingest_observation": { method: "POST", path: "/observations/ingest", kind: "mutation", idempotent: true, surfaceIntent: "mcp_workflow" },
746
- "link_evidence": { method: "POST", path: "/evidence/link", kind: "mutation", idempotent: true, surfaceIntent: "compatibility" },
747
- "link_evidence_to_belief": { method: "POST", path: "/evidence/link-belief", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
748
- "link_evidence_to_question": { method: "POST", path: "/evidence/link-question", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
749
- "list_active_sessions": { method: "POST", path: "/coordination/active-sessions", kind: "query", idempotent: false, surfaceIntent: "system" },
750
- "list_all_worktrees": { method: "GET", path: "/worktrees/all", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
751
- "list_beliefs": { method: "GET", path: "/beliefs", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
752
- "list_campaigns": { method: "GET", path: "/worktrees/campaigns", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
753
- "list_epistemic_nodes": { method: "GET", path: "/nodes", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
754
- "list_evidence": { method: "GET", path: "/evidence", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
755
- "list_graph_intelligence_queries": { method: "POST", path: "/graph-intelligence/queries", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
756
- "list_lenses": { method: "GET", path: "/lenses", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
757
- "list_ontologies": { method: "GET", path: "/ontologies", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
758
- "list_questions": { method: "GET", path: "/questions", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
759
- "list_tasks": { method: "GET", path: "/tasks", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
760
- "list_topics": { method: "GET", path: "/topics", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
761
- "list_worktrees": { method: "GET", path: "/worktrees", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
762
- "manage_write_policy": { method: "POST", path: "/policy/write-policy/manage", kind: "mutation", idempotent: true, surfaceIntent: "mcp_governance" },
763
- "match_entity_type": { method: "POST", path: "/ontologies/match-entity-type", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
764
- "materialize_topic_graph": { method: "POST", path: "/topics/materialize-graph", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
765
- "merge": { method: "POST", path: "/worktrees/merge", kind: "mutation", idempotent: true, surfaceIntent: "mcp_workflow" },
766
- "modulate_confidence": { method: "POST", path: "/beliefs/confidence", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
767
- "open_pull_request": { method: "POST", path: "/worktrees/open-pull-request", kind: "mutation", idempotent: true, surfaceIntent: "system" },
768
- "pipeline_snapshot": { method: "POST", path: "/worktrees/pipeline-snapshot", kind: "query", idempotent: false, surfaceIntent: "system" },
769
- "publish_ontology_version": { method: "POST", path: "/ontologies/versions/publish", kind: "mutation", idempotent: true, surfaceIntent: "mcp_governance" },
770
- "push": { method: "POST", path: "/worktrees/push", kind: "mutation", idempotent: true, surfaceIntent: "system" },
771
- "query_lineage": { method: "POST", path: "/edges/lineage", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
772
- "record_attempt": { method: "POST", path: "/coding/attempts", kind: "mutation", idempotent: true, surfaceIntent: "system" },
773
- "record_judgment": { method: "POST", path: "/judgments", kind: "mutation", idempotent: true, surfaceIntent: "system" },
774
- "record_scope_learning": { method: "POST", path: "/scope/learnings", kind: "mutation", idempotent: true, surfaceIntent: "system" },
775
- "refine_belief": { method: "PATCH", path: "/beliefs/refine", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
776
- "refine_question": { method: "PATCH", path: "/questions/refine", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
777
- "register_session": { method: "POST", path: "/coordination/register-session", kind: "mutation", idempotent: true, surfaceIntent: "system" },
778
- "remove_edge": { method: "DELETE", path: "/edges", kind: "mutation", idempotent: true, surfaceIntent: "mcp_analysis" },
779
- "remove_edges_between": { method: "DELETE", path: "/edges/between", kind: "mutation", idempotent: true, surfaceIntent: "mcp_analysis" },
780
- "remove_lens_from_topic": { method: "DELETE", path: "/lenses/apply", kind: "mutation", idempotent: true, surfaceIntent: "mcp_workflow" },
781
- "resolve_effective_ontology": { method: "POST", path: "/ontologies/effective", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
782
- "resolve_interactive_principal": { method: "POST", path: "/control-plane/identity/resolve-interactive-principal", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
783
- "run_graph_intelligence_query": { method: "POST", path: "/graph-intelligence/run", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
784
- "search_beliefs": { method: "POST", path: "/beliefs/search", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
785
- "search_evidence": { method: "POST", path: "/evidence/search", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
786
- "seed_belief_lattice": { method: "POST", path: "/scope/belief-lattice/seed", kind: "mutation", idempotent: true, surfaceIntent: "system" },
787
- "send_agent_message": { method: "POST", path: "/coordination/messages/send", kind: "mutation", idempotent: true, surfaceIntent: "system" },
788
- "supersede_epistemic_node": { method: "POST", path: "/nodes/supersede", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
789
- "trace_entity_impact": { method: "POST", path: "/graph/trace-entity-impact", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
790
- "traverse_graph": { method: "POST", path: "/graph/traverse", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
791
- "trigger_belief_review": { method: "POST", path: "/context/belief-review", kind: "mutation", idempotent: true, surfaceIntent: "mcp_analysis" },
792
- "update_edge": { method: "PATCH", path: "/edges", kind: "mutation", idempotent: true, surfaceIntent: "mcp_analysis" },
793
- "update_epistemic_node": { method: "PATCH", path: "/nodes", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
794
- "update_ontology": { method: "PATCH", path: "/ontologies", kind: "mutation", idempotent: true, surfaceIntent: "mcp_governance" },
795
- "update_question_status": { method: "PATCH", path: "/questions/status", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
796
- "update_task": { method: "PATCH", path: "/tasks", kind: "mutation", idempotent: true, surfaceIntent: "mcp_workflow" },
797
- "update_topic": { method: "PATCH", path: "/topics", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
798
- "update_worktree_metadata": { method: "PATCH", path: "/worktrees/metadata", kind: "mutation", idempotent: true, surfaceIntent: "mcp_workflow" },
799
- "update_worktree_targets": { method: "PATCH", path: "/worktrees/targets", kind: "mutation", idempotent: true, surfaceIntent: "mcp_workflow" },
800
- "verify_epistemic_node": { method: "POST", path: "/nodes/verify", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" }
801
- };
802
- function createSessionId() {
803
- return typeof crypto !== "undefined" && typeof crypto.randomUUID === "function" ? crypto.randomUUID() : randomIdempotencyKey();
804
- }
805
- function withSdkSessionId(input, sessionId) {
806
- return {
807
- ...input,
808
- __sdkSessionId: typeof input.__sdkSessionId === "string" ? input.__sdkSessionId : sessionId
809
- };
810
- }
811
- function toFunctionSurfaceQuery(input) {
812
- const params = new URLSearchParams();
813
- for (const [key, value] of Object.entries(input)) {
814
- if (value === void 0) {
815
- continue;
816
- }
817
- const serialized2 = typeof value === "string" ? value : JSON.stringify(value);
818
- if (serialized2 !== void 0) {
819
- params.set(key, serialized2);
820
- }
821
- }
822
- const serialized = params.toString();
823
- return serialized ? `?${serialized}` : "";
824
- }
825
- function createFunctionSurfaceClient(config = {}) {
826
- const gateway = createGatewayRequestClient(config);
827
- const sessionId = createSessionId();
828
- function execute(name, input, idempotencyKey) {
829
- const contract = CONTRACTS[name];
830
- const payload = withSdkSessionId(input, sessionId);
831
- const path = contract.method === "GET" ? `${contract.path}${toFunctionSurfaceQuery(payload)}` : contract.path;
832
- return gateway.request({
833
- path: `/api/platform/v1${path}`,
834
- method: contract.method,
835
- body: contract.method === "GET" ? void 0 : payload,
836
- idempotencyKey: contract.kind !== "query" && Boolean(contract.idempotent) ? idempotencyKey ?? randomIdempotencyKey() : void 0
837
- });
838
- }
839
- return {
840
- sessionId,
841
- activateWorktree(input = {}, idempotencyKey) {
842
- return execute("activate_worktree", input, idempotencyKey);
843
- },
844
- addEvidence(input = {}, idempotencyKey) {
845
- return execute("add_evidence", input, idempotencyKey);
846
- },
847
- addWorktree(input = {}, idempotencyKey) {
848
- return execute("add_worktree", input, idempotencyKey);
849
- },
850
- analyzeTopicDensity(input = {}, idempotencyKey) {
851
- return execute("analyze_topic_density", input, idempotencyKey);
852
- },
853
- answerQuestion(input = {}, idempotencyKey) {
854
- return execute("answer_question", input, idempotencyKey);
855
- },
856
- applyAutoBranching(input = {}, idempotencyKey) {
857
- return execute("apply_auto_branching", input, idempotencyKey);
858
- },
859
- applyLensToTopic(input = {}, idempotencyKey) {
860
- return execute("apply_lens_to_topic", input, idempotencyKey);
861
- },
862
- applyOntology(input = {}, idempotencyKey) {
863
- return execute("apply_ontology", input, idempotencyKey);
864
- },
865
- archiveBelief(input = {}, idempotencyKey) {
866
- return execute("archive_belief", input, idempotencyKey);
867
- },
868
- archiveEpistemicNode(input = {}, idempotencyKey) {
869
- return execute("archive_epistemic_node", input, idempotencyKey);
870
- },
871
- archiveOntology(input = {}, idempotencyKey) {
872
- return execute("archive_ontology", input, idempotencyKey);
873
- },
874
- archiveQuestion(input = {}, idempotencyKey) {
875
- return execute("archive_question", input, idempotencyKey);
876
- },
877
- batchCreateEdges(input = {}, idempotencyKey) {
878
- return execute("batch_create_edges", input, idempotencyKey);
879
- },
880
- batchCreateEpistemicNodes(input = {}, idempotencyKey) {
881
- return execute("batch_create_epistemic_nodes", input, idempotencyKey);
882
- },
883
- beginBuildSession(input = {}, idempotencyKey) {
884
- return execute("begin_build_session", input, idempotencyKey);
885
- },
886
- bisectConfidence(input = {}, idempotencyKey) {
887
- return execute("bisect_confidence", input, idempotencyKey);
888
- },
889
- broadcastMessage(input = {}, idempotencyKey) {
890
- return execute("broadcast_message", input, idempotencyKey);
891
- },
892
- checkPermission(input = {}, idempotencyKey) {
893
- return execute("check_permission", input, idempotencyKey);
894
- },
895
- claimFiles(input = {}, idempotencyKey) {
896
- return execute("claim_files", input, idempotencyKey);
897
- },
898
- compileContext(input = {}, idempotencyKey) {
899
- return execute("compile_context", input, idempotencyKey);
900
- },
901
- completeTask(input = {}, idempotencyKey) {
902
- return execute("complete_task", input, idempotencyKey);
903
- },
904
- createAnswer(input = {}, idempotencyKey) {
905
- return execute("create_answer", input, idempotencyKey);
906
- },
907
- createBelief(input = {}, idempotencyKey) {
908
- return execute("create_belief", input, idempotencyKey);
909
- },
910
- createEdge(input = {}, idempotencyKey) {
911
- return execute("create_edge", input, idempotencyKey);
912
- },
913
- createEpistemicContract(input = {}, idempotencyKey) {
914
- return execute("create_epistemic_contract", input, idempotencyKey);
915
- },
916
- createEpistemicNode(input = {}, idempotencyKey) {
917
- return execute("create_epistemic_node", input, idempotencyKey);
918
- },
919
- createEvidence(input = {}, idempotencyKey) {
920
- return execute("create_evidence", input, idempotencyKey);
921
- },
922
- createLens(input = {}, idempotencyKey) {
923
- return execute("create_lens", input, idempotencyKey);
924
- },
925
- createOntology(input = {}, idempotencyKey) {
926
- return execute("create_ontology", input, idempotencyKey);
927
- },
928
- createOntologyVersion(input = {}, idempotencyKey) {
929
- return execute("create_ontology_version", input, idempotencyKey);
930
- },
931
- createQuestion(input = {}, idempotencyKey) {
932
- return execute("create_question", input, idempotencyKey);
933
- },
934
- createTask(input = {}, idempotencyKey) {
935
- return execute("create_task", input, idempotencyKey);
936
- },
937
- createTopic(input = {}, idempotencyKey) {
938
- return execute("create_topic", input, idempotencyKey);
939
- },
940
- deprecateOntologyVersion(input = {}, idempotencyKey) {
941
- return execute("deprecate_ontology_version", input, idempotencyKey);
942
- },
943
- detectConfirmationBias(input = {}, idempotencyKey) {
944
- return execute("detect_confirmation_bias", input, idempotencyKey);
945
- },
946
- discover(input = {}, idempotencyKey) {
947
- return execute("discover", input, idempotencyKey);
948
- },
949
- discoverEntityConnections(input = {}, idempotencyKey) {
950
- return execute("discover_entity_connections", input, idempotencyKey);
951
- },
952
- endSession(input = {}, idempotencyKey) {
953
- return execute("end_session", input, idempotencyKey);
954
- },
955
- evaluateContract(input = {}, idempotencyKey) {
956
- return execute("evaluate_contract", input, idempotencyKey);
957
- },
958
- filterByPermission(input = {}, idempotencyKey) {
959
- return execute("filter_by_permission", input, idempotencyKey);
960
- },
961
- findContradictions(input = {}, idempotencyKey) {
962
- return execute("find_contradictions", input, idempotencyKey);
963
- },
964
- findMissingQuestions(input = {}, idempotencyKey) {
965
- return execute("find_missing_questions", input, idempotencyKey);
966
- },
967
- flagContradiction(input = {}, idempotencyKey) {
968
- return execute("flag_contradiction", input, idempotencyKey);
969
- },
970
- forkBelief(input = {}, idempotencyKey) {
971
- return execute("fork_belief", input, idempotencyKey);
972
- },
973
- generateSessionHandoff(input = {}, idempotencyKey) {
974
- return execute("generate_session_handoff", input, idempotencyKey);
975
- },
976
- getAgentInbox(input = {}, idempotencyKey) {
977
- return execute("get_agent_inbox", input, idempotencyKey);
978
- },
979
- getAnswer(input = {}, idempotencyKey) {
980
- return execute("get_answer", input, idempotencyKey);
981
- },
982
- getAuditTrail(input = {}, idempotencyKey) {
983
- return execute("get_audit_trail", input, idempotencyKey);
984
- },
985
- getBelief(input = {}, idempotencyKey) {
986
- return execute("get_belief", input, idempotencyKey);
987
- },
988
- getChangeHistory(input = {}, idempotencyKey) {
989
- return execute("get_change_history", input, idempotencyKey);
990
- },
991
- getCodeContext(input = {}, idempotencyKey) {
992
- return execute("get_code_context", input, idempotencyKey);
993
- },
994
- getConfidenceHistory(input = {}, idempotencyKey) {
995
- return execute("get_confidence_history", input, idempotencyKey);
996
- },
997
- getContractStatus(input = {}, idempotencyKey) {
998
- return execute("get_contract_status", input, idempotencyKey);
999
- },
1000
- getEpistemicNode(input = {}, idempotencyKey) {
1001
- return execute("get_epistemic_node", input, idempotencyKey);
1002
- },
1003
- getEvidence(input = {}, idempotencyKey) {
1004
- return execute("get_evidence", input, idempotencyKey);
1005
- },
1006
- getFailureLog(input = {}, idempotencyKey) {
1007
- return execute("get_failure_log", input, idempotencyKey);
1008
- },
1009
- getFalsificationQuestions(input = {}, idempotencyKey) {
1010
- return execute("get_falsification_questions", input, idempotencyKey);
1011
- },
1012
- getGraphGaps(input = {}, idempotencyKey) {
1013
- return execute("get_graph_gaps", input, idempotencyKey);
1014
- },
1015
- getGraphNeighborhood(input = {}, idempotencyKey) {
1016
- return execute("get_graph_neighborhood", input, idempotencyKey);
1017
- },
1018
- getGraphStructureAnalysis(input = {}, idempotencyKey) {
1019
- return execute("get_graph_structure_analysis", input, idempotencyKey);
1020
- },
1021
- getHighPriorityQuestions(input = {}, idempotencyKey) {
1022
- return execute("get_high_priority_questions", input, idempotencyKey);
1023
- },
1024
- getLatticeCoverage(input = {}, idempotencyKey) {
1025
- return execute("get_lattice_coverage", input, idempotencyKey);
1026
- },
1027
- getObservationContext(input = {}, idempotencyKey) {
1028
- return execute("get_observation_context", input, idempotencyKey);
1029
- },
1030
- getOntology(input = {}, idempotencyKey) {
1031
- return execute("get_ontology", input, idempotencyKey);
1032
- },
1033
- getQuestion(input = {}, idempotencyKey) {
1034
- return execute("get_question", input, idempotencyKey);
1035
- },
1036
- getTopic(input = {}, idempotencyKey) {
1037
- return execute("get_topic", input, idempotencyKey);
1038
- },
1039
- getTopicCoverage(input = {}, idempotencyKey) {
1040
- return execute("get_topic_coverage", input, idempotencyKey);
1041
- },
1042
- getTopicGraphSpine(input = {}, idempotencyKey) {
1043
- return execute("get_topic_graph_spine", input, idempotencyKey);
1044
- },
1045
- getTopicTree(input = {}, idempotencyKey) {
1046
- return execute("get_topic_tree", input, idempotencyKey);
1047
- },
1048
- heartbeatSession(input = {}, idempotencyKey) {
1049
- return execute("heartbeat_session", input, idempotencyKey);
1050
- },
1051
- whoami(input = {}, idempotencyKey) {
1052
- return execute("identity_whoami", input, idempotencyKey);
1053
- },
1054
- ingestObservation(input = {}, idempotencyKey) {
1055
- return execute("ingest_observation", input, idempotencyKey);
1056
- },
1057
- linkEvidence(input = {}, idempotencyKey) {
1058
- return execute("link_evidence", input, idempotencyKey);
1059
- },
1060
- linkEvidenceToBelief(input = {}, idempotencyKey) {
1061
- return execute("link_evidence_to_belief", input, idempotencyKey);
1062
- },
1063
- linkEvidenceToQuestion(input = {}, idempotencyKey) {
1064
- return execute("link_evidence_to_question", input, idempotencyKey);
1065
- },
1066
- listActiveSessions(input = {}, idempotencyKey) {
1067
- return execute("list_active_sessions", input, idempotencyKey);
1068
- },
1069
- listAllWorktrees(input = {}, idempotencyKey) {
1070
- return execute("list_all_worktrees", input, idempotencyKey);
1071
- },
1072
- listBeliefs(input = {}, idempotencyKey) {
1073
- return execute("list_beliefs", input, idempotencyKey);
1074
- },
1075
- listCampaigns(input = {}, idempotencyKey) {
1076
- return execute("list_campaigns", input, idempotencyKey);
1077
- },
1078
- listEpistemicNodes(input = {}, idempotencyKey) {
1079
- return execute("list_epistemic_nodes", input, idempotencyKey);
1080
- },
1081
- listEvidence(input = {}, idempotencyKey) {
1082
- return execute("list_evidence", input, idempotencyKey);
1083
- },
1084
- listGraphIntelligenceQueries(input = {}, idempotencyKey) {
1085
- return execute("list_graph_intelligence_queries", input, idempotencyKey);
1086
- },
1087
- listLenses(input = {}, idempotencyKey) {
1088
- return execute("list_lenses", input, idempotencyKey);
1089
- },
1090
- listOntologies(input = {}, idempotencyKey) {
1091
- return execute("list_ontologies", input, idempotencyKey);
1092
- },
1093
- listQuestions(input = {}, idempotencyKey) {
1094
- return execute("list_questions", input, idempotencyKey);
1095
- },
1096
- listTasks(input = {}, idempotencyKey) {
1097
- return execute("list_tasks", input, idempotencyKey);
1098
- },
1099
- listTopics(input = {}, idempotencyKey) {
1100
- return execute("list_topics", input, idempotencyKey);
1101
- },
1102
- listWorktrees(input = {}, idempotencyKey) {
1103
- return execute("list_worktrees", input, idempotencyKey);
1104
- },
1105
- manageWritePolicy(input = {}, idempotencyKey) {
1106
- return execute("manage_write_policy", input, idempotencyKey);
1107
- },
1108
- matchEntityType(input = {}, idempotencyKey) {
1109
- return execute("match_entity_type", input, idempotencyKey);
1110
- },
1111
- materializeTopicGraph(input = {}, idempotencyKey) {
1112
- return execute("materialize_topic_graph", input, idempotencyKey);
1113
- },
1114
- merge(input = {}, idempotencyKey) {
1115
- return execute("merge", input, idempotencyKey);
1116
- },
1117
- modulateConfidence(input = {}, idempotencyKey) {
1118
- return execute("modulate_confidence", input, idempotencyKey);
1119
- },
1120
- openPullRequest(input = {}, idempotencyKey) {
1121
- return execute("open_pull_request", input, idempotencyKey);
1122
- },
1123
- pipelineSnapshot(input = {}, idempotencyKey) {
1124
- return execute("pipeline_snapshot", input, idempotencyKey);
1125
- },
1126
- publishOntologyVersion(input = {}, idempotencyKey) {
1127
- return execute("publish_ontology_version", input, idempotencyKey);
1128
- },
1129
- push(input = {}, idempotencyKey) {
1130
- return execute("push", input, idempotencyKey);
1131
- },
1132
- queryLineage(input = {}, idempotencyKey) {
1133
- return execute("query_lineage", input, idempotencyKey);
1134
- },
1135
- recordAttempt(input = {}, idempotencyKey) {
1136
- return execute("record_attempt", input, idempotencyKey);
1137
- },
1138
- recordJudgment(input = {}, idempotencyKey) {
1139
- return execute("record_judgment", input, idempotencyKey);
1140
- },
1141
- recordScopeLearning(input = {}, idempotencyKey) {
1142
- return execute("record_scope_learning", input, idempotencyKey);
1143
- },
1144
- refineBelief(input = {}, idempotencyKey) {
1145
- return execute("refine_belief", input, idempotencyKey);
1146
- },
1147
- refineQuestion(input = {}, idempotencyKey) {
1148
- return execute("refine_question", input, idempotencyKey);
1149
- },
1150
- registerSession(input = {}, idempotencyKey) {
1151
- return execute("register_session", input, idempotencyKey);
1152
- },
1153
- removeEdge(input = {}, idempotencyKey) {
1154
- return execute("remove_edge", input, idempotencyKey);
1155
- },
1156
- removeEdgesBetween(input = {}, idempotencyKey) {
1157
- return execute("remove_edges_between", input, idempotencyKey);
1158
- },
1159
- removeLensFromTopic(input = {}, idempotencyKey) {
1160
- return execute("remove_lens_from_topic", input, idempotencyKey);
1161
- },
1162
- resolveEffectiveOntology(input = {}, idempotencyKey) {
1163
- return execute("resolve_effective_ontology", input, idempotencyKey);
1164
- },
1165
- resolveInteractivePrincipal(input = {}, idempotencyKey) {
1166
- return execute("resolve_interactive_principal", input, idempotencyKey);
1167
- },
1168
- runGraphIntelligenceQuery(input = {}, idempotencyKey) {
1169
- return execute("run_graph_intelligence_query", input, idempotencyKey);
1170
- },
1171
- searchBeliefs(input = {}, idempotencyKey) {
1172
- return execute("search_beliefs", input, idempotencyKey);
1173
- },
1174
- searchEvidence(input = {}, idempotencyKey) {
1175
- return execute("search_evidence", input, idempotencyKey);
1176
- },
1177
- seedBeliefLattice(input = {}, idempotencyKey) {
1178
- return execute("seed_belief_lattice", input, idempotencyKey);
1179
- },
1180
- sendAgentMessage(input = {}, idempotencyKey) {
1181
- return execute("send_agent_message", input, idempotencyKey);
1182
- },
1183
- supersedeEpistemicNode(input = {}, idempotencyKey) {
1184
- return execute("supersede_epistemic_node", input, idempotencyKey);
1185
- },
1186
- traceEntityImpact(input = {}, idempotencyKey) {
1187
- return execute("trace_entity_impact", input, idempotencyKey);
1188
- },
1189
- traverseGraph(input = {}, idempotencyKey) {
1190
- return execute("traverse_graph", input, idempotencyKey);
1191
- },
1192
- triggerBeliefReview(input = {}, idempotencyKey) {
1193
- return execute("trigger_belief_review", input, idempotencyKey);
1194
- },
1195
- updateEdge(input = {}, idempotencyKey) {
1196
- return execute("update_edge", input, idempotencyKey);
1197
- },
1198
- updateEpistemicNode(input = {}, idempotencyKey) {
1199
- return execute("update_epistemic_node", input, idempotencyKey);
1200
- },
1201
- updateOntology(input = {}, idempotencyKey) {
1202
- return execute("update_ontology", input, idempotencyKey);
1203
- },
1204
- updateQuestionStatus(input = {}, idempotencyKey) {
1205
- return execute("update_question_status", input, idempotencyKey);
1206
- },
1207
- updateTask(input = {}, idempotencyKey) {
1208
- return execute("update_task", input, idempotencyKey);
1209
- },
1210
- updateTopic(input = {}, idempotencyKey) {
1211
- return execute("update_topic", input, idempotencyKey);
1212
- },
1213
- updateWorktreeMetadata(input = {}, idempotencyKey) {
1214
- return execute("update_worktree_metadata", input, idempotencyKey);
1215
- },
1216
- updateWorktreeTargets(input = {}, idempotencyKey) {
1217
- return execute("update_worktree_targets", input, idempotencyKey);
1218
- },
1219
- verifyEpistemicNode(input = {}, idempotencyKey) {
1220
- return execute("verify_epistemic_node", input, idempotencyKey);
1221
- }
1222
- };
1223
- }
1224
-
1225
- export { FUNCTION_SURFACE_METHOD_PATHS, createFunctionSurfaceClient };
1226
- //# sourceMappingURL=functionSurfaceClient.js.map
1227
- //# sourceMappingURL=functionSurfaceClient.js.map