@lucern/sdk 0.3.0-alpha.4 → 0.3.0-alpha.5

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 (58) hide show
  1. package/README.md +47 -0
  2. package/dist/beliefs/index.d.ts +3 -1
  3. package/dist/beliefs/index.js +32 -0
  4. package/dist/beliefs/index.js.map +1 -1
  5. package/dist/client.d.ts +2981 -40
  6. package/dist/client.js +32 -0
  7. package/dist/client.js.map +1 -1
  8. package/dist/contradictions/index.d.ts +3 -1
  9. package/dist/contradictions/index.js +32 -0
  10. package/dist/contradictions/index.js.map +1 -1
  11. package/dist/decisions/index.d.ts +3 -1
  12. package/dist/decisions/index.js +32 -0
  13. package/dist/decisions/index.js.map +1 -1
  14. package/dist/edges/index.d.ts +3 -1
  15. package/dist/edges/index.js +32 -0
  16. package/dist/edges/index.js.map +1 -1
  17. package/dist/evidence/index.d.ts +3 -1
  18. package/dist/evidence/index.js +32 -0
  19. package/dist/evidence/index.js.map +1 -1
  20. package/dist/functionSurface.d.ts +129 -0
  21. package/dist/functionSurface.js +1118 -0
  22. package/dist/functionSurface.js.map +1 -0
  23. package/dist/functionSurfaceClient.d.ts +8 -0
  24. package/dist/functionSurfaceClient.js +1118 -0
  25. package/dist/functionSurfaceClient.js.map +1 -0
  26. package/dist/graphAnalysisClient.d.ts +46 -1
  27. package/dist/graphAnalysisClient.js +24 -0
  28. package/dist/graphAnalysisClient.js.map +1 -1
  29. package/dist/graphIntel.d.ts +3 -0
  30. package/dist/graphIntel.js +3 -0
  31. package/dist/graphIntel.js.map +1 -0
  32. package/dist/graphIntelligence.d.ts +2 -0
  33. package/dist/graphIntelligence.js +47 -0
  34. package/dist/graphIntelligence.js.map +1 -0
  35. package/dist/index.d.ts +5 -2
  36. package/dist/index.js +77 -0
  37. package/dist/index.js.map +1 -1
  38. package/dist/lenses/index.d.ts +4 -2
  39. package/dist/lenses/index.js +32 -0
  40. package/dist/lenses/index.js.map +1 -1
  41. package/dist/nodes/index.d.ts +3 -1
  42. package/dist/nodes/index.js +32 -0
  43. package/dist/nodes/index.js.map +1 -1
  44. package/dist/ontologies/index.d.ts +3 -1
  45. package/dist/ontologies/index.js +32 -0
  46. package/dist/ontologies/index.js.map +1 -1
  47. package/dist/packRuntime.d.ts +2 -1
  48. package/dist/questions/index.d.ts +3 -1
  49. package/dist/questions/index.js +32 -0
  50. package/dist/questions/index.js.map +1 -1
  51. package/dist/topics/index.d.ts +3 -1
  52. package/dist/topics/index.js +32 -0
  53. package/dist/topics/index.js.map +1 -1
  54. package/dist/worktrees/index.d.ts +5 -3
  55. package/dist/worktrees/index.js +32 -0
  56. package/dist/worktrees/index.js.map +1 -1
  57. package/package.json +12 -3
  58. package/dist/client-DOLqClbU.d.ts +0 -3091
package/dist/client.d.ts CHANGED
@@ -1,43 +1,43 @@
1
- import './audiencesClient.js';
2
- import './schemaClient.js';
3
- import './harnessClient.js';
4
- import './adminClient.js';
5
- import './controlObjectOwnership.js';
6
- import './beliefsClient.js';
7
- import './authDeviceClient.js';
8
- import './mcpClient.js';
9
- import './identityClient.js';
10
- import './packsClient.js';
11
- import './customTools.js';
12
- import './toolRegistryClient.js';
13
- import './telemetryClient.js';
14
- import './jobsClient.js';
15
- import './modelRuntimeClient.js';
16
- import './graphStateClassifierClient.js';
17
- import './ontologyLinksClient.js';
18
- import './orgGraphSearchClient.js';
19
- import './graphRecommendationsClient.js';
20
- import './graphAnalysisClient.js';
21
- import './embeddingsClient.js';
22
- import './policyClient.js';
23
- import './coreClient.js';
24
- import './ontologyClient.js';
25
- import './contextTypes.js';
26
- import './topicsClient.js';
27
- import './answersClient.js';
28
- import './auditClient.js';
29
- import './types.js';
30
- export { L as LucernClientConfig, c as createLucernClient } from './client-DOLqClbU.js';
31
- import './contextClient.js';
32
- import './contracts/lens-workflow.contract.js';
33
- import './decisionsClient.js';
34
- import './evidenceClient.js';
35
- import './eventingClient.js';
36
- import './graphClient.js';
37
- import './learningClient.js';
38
- import './reportsClient.js';
39
- import './sourcesClient.js';
40
- import './workflowClient.js';
1
+ import { AudiencesClientConfig, AudienceRegistryInput, AudienceGrantInput, AudienceGrantRevokeInput } from './audiencesClient.js';
2
+ import { SchemaClientConfig, SchemaPackInstallInput, SchemaEntitlementInput } from './schemaClient.js';
3
+ import { HarnessClientConfig, HarnessAgentWriteInput, HarnessInvokeManagedAgentInput, HarnessToolWriteInput, HarnessExecuteToolInput, HarnessExecuteToolResult, HarnessStartRunInput, HarnessRunReportInput, HarnessCompleteRunInput } from './harnessClient.js';
4
+ import { AdminClientConfig, TenantApiKeyRecord, TenantVaultSecretRecord, TenantConfigRecord, TenantModelRoutingSnapshot } from './adminClient.js';
5
+ import { ControlObjectOwnershipContract } from './controlObjectOwnership.js';
6
+ import { BeliefsClientConfig, ModulateConfidenceInput, OpinionHistoryEntry, CreateBeliefInput, RefineBeliefInput, ModulateConfidenceOpinionInput, ForkBeliefInput, UpdateBeliefStatusInput, UpdateBeliefRationaleInput, LinkBeliefsInput, UnlinkBeliefEvidenceInput, UpdateBeliefCriticalityInput, BatchUpdateBeliefCriticalityInput, ReassignBeliefsTopicInput } from './beliefsClient.js';
7
+ import { DeviceCodeInput, DeviceCodeResponse, DeviceTokenResponse } from './authDeviceClient.js';
8
+ import { McpBootstrapSessionInput, McpBootstrapSessionResponse, McpCheckWritePolicyInput, McpCheckWritePolicyResponse, McpBeginBuildSessionInput, McpBeginBuildSessionResponse, McpEvaluateEngineeringContractInput, McpContractEvaluationResponse, McpEvaluateResearchContractInput } from './mcpClient.js';
9
+ import { IdentityClientConfig, PolicyEvaluationInput, PolicyDecisionRecord, RecordPolicyDecisionInput, PutTenantSecretReferenceInput, TenantSecretReference, ClerkUserSearchResult, TenantIdentityScope, TenantIdentityConfigRecord, UpdateTenantConfigInput, TenantIntegrationRecord, UpsertTenantIntegrationInput } from './identityClient.js';
10
+ import { PacksClientConfig, PackInstallInput, PackEnableInput, PackDisableInput, PackEntitlementInput, PackUninstallInput, PackUpgradeInput } from './packsClient.js';
11
+ import { CustomToolRegistration, RegisteredCustomTool } from './customTools.js';
12
+ import { ToolRegistryClientConfig, ToolRegistryQuery, ToolCatalogEntry, UpsertCoreToolsInput, SetPackToolsStatusInput, CreateToolAclInput, ToolAclRecord, DeleteToolAclInput, RegisterCustomToolInput } from './toolRegistryClient.js';
13
+ import { TelemetryClientConfig, LogSystemEventInput, LogToolCallsBatchInput, RecordEpistemicAuditInput, RecordTelemetryPolicyDecisionInput, StartTelemetryRunInput, TelemetryRunRecord, FinishTelemetryRunInput, TelemetryScope } from './telemetryClient.js';
14
+ import { JobsClientConfig, EnqueueJobInput, JobRecord, JobsScope, ClaimJobInput, UpdateJobStatusInput, RetryJobInput, RecordJobRunStartInput, JobRunRecord, RecordJobRunFinishInput } from './jobsClient.js';
15
+ import { ModelRuntimeClientConfig, ModelRuntimeScope, ModelRegistryRecord, ModelFunctionSlot, ResolveModelSlotInput, UpdateModelSlotConfigInput } from './modelRuntimeClient.js';
16
+ import { GraphStateClassifierClientConfig, ClassifyNodeInput, GraphStateClassification, ClassifyTopicInput, ListGraphStateClassificationsInput, RecordGraphStateClassificationInput } from './graphStateClassifierClient.js';
17
+ import { OntologyLinksClientConfig, OntologyLinkWriteInput, OntologyLinkRecord, ListOntologyLinksForNodeInput, UpdateOntologyLinkStatusInput } from './ontologyLinksClient.js';
18
+ import { OrgGraphSearchClientConfig, OrgGraphSearchInput, OrgGraphSearchResponse, GetOrgGraphNodeInput, OrgGraphSearchResult, ListOrgGraphByProvenanceInput, ListPublishedFromWorkspaceInput } from './orgGraphSearchClient.js';
19
+ import { GraphRecommendationsClientConfig, GraphRecommendationListInput, GraphRecommendationRecord, MarkGraphRecommendationStatusInput } from './graphRecommendationsClient.js';
20
+ import { GraphAnalysisClientConfig, ListGraphIntelligenceQueriesInput, GraphIntelligenceQueryCatalogResponse, RunGraphIntelligenceQueryInput, GraphIntelligenceQueryRunResponse, SaveGraphAnalysisInput, GraphAnalysisRecord, ListGraphAnalysesInput, GetLatestGraphAnalysisInput, SaveGraphSuggestionsInput, GraphAnalysisSuggestionsResponse, UpdateGraphSuggestionStatusInput, GraphAnalysisSuggestion, ListGraphSuggestionsInput, ListGraphChangesInput, ComputeOrRequestGraphAnalysisInput } from './graphAnalysisClient.js';
21
+ import { EmbeddingsClientConfig, GetEmbeddingsByNodeIdsInput, EmbeddingRecord, ListMissingEmbeddingsInput, MissingEmbeddingCandidate, VectorSearchByTopicInput, VectorSearchMatch, MarkEmbeddingBackfillQueuedInput } from './embeddingsClient.js';
22
+ import { PolicyClientConfig, PermissionDecision, PermissionKind, WritePolicyRecord, WritePolicyCreateInput, WritePolicyUpdateInput, TenantPolicyRecord, TenantPolicyPermission } from './policyClient.js';
23
+ import { PlatformGatewaySuccess, GatewayScope } from './coreClient.js';
24
+ import { OntologyClientConfig, OntologyBindingInput, OntologyDefinitionInput, OntologyDefinitionUpdateInput, OntologyVersionInput } from './ontologyClient.js';
25
+ import { CompileContextInput, PublicCompiledContext } from './contextTypes.js';
26
+ import { TopicsClientConfig, TopicListInput, TopicCreateInput, TopicUpdateInput, TopicTreeQuery, TopicCoverageQuery, TopicBulkCreateInput } from './topicsClient.js';
27
+ import { FunctionSurfaceClientConfig, FunctionSurfaceInput, FunctionSurfaceResult } from './functionSurface.js';
28
+ import { AnswersClientConfig } from './answersClient.js';
29
+ import { AuditClientConfig } from './auditClient.js';
30
+ import { ListResult, JsonObject, PlatformSourceRecord, PlatformGraphNode, PlatformGraphEdge, GraphNeighborhoodResponse, JsonArray, RecordJudgmentResponse, ListJudgmentsResponse, GetJudgmentResponse, RecordJudgmentOutcomeResponse, JudgmentReadinessResponse, JudgmentCalibrationResponse, PendingJudgmentOutcomeRecord, JudgmentTransitionAuditIntegrityResponse, TopicIdentifierInput, WorkflowBranchRecord, WorkflowLensRecord, WorkflowLensBindingRecord, WorkflowWorktreeRecord, ListWorktreesResponse, PushWorktreeResponse, OpenPullRequestResponse, TopicListResponse, TopicRecord, TopicTreeResponse, TopicCoverageResponse, PlatformBeliefRecord, ModulateConfidenceResponse, ForkBeliefResponse, DeleteEdgeResponse, GraphPathResponse, GraphAnalyticsResponse, MergeWorktreeResponse, ListTopicsResponse, SwitchTopicContextResponse, CreateTaskResponse, CompleteTaskResponse, UpdateTaskResponse, ReportTemplatesResponse, ReportWithSectionsResponse } from './types.js';
31
+ import { ContextClientConfig } from './contextClient.js';
32
+ import { LensPromptTemplateReference, LensWorkflowTemplate, LensTaskTemplate } from './contracts/lens-workflow.contract.js';
33
+ import { DecisionsClientConfig, RecordJudgmentInput, ListJudgmentsInput, RecordJudgmentOutcomeInput, GetJudgmentCalibrationInput, ListPendingJudgmentOutcomeReviewInput, GetJudgmentTransitionAuditIntegrityInput } from './decisionsClient.js';
34
+ import { EvidenceClientConfig, EvidenceClassificationRequestConfig, ClassifyEvidenceResult, ClassifyEvidenceBatchItem, ClassifyEvidenceBatchResult } from './evidenceClient.js';
35
+ import { EventingClientConfig, RecordEventInput, EventingRecord, EventingScope, EventingWebhookRecord, EnqueueDeliveryInput, EventingDeliveryRecord, RecordDeliveryAttemptInput, UpdateDeliveryStatusInput } from './eventingClient.js';
36
+ import { GraphClientConfig, ListNodesInput, GetNodeInput, CreateNodeInput, UpdateNodeInput, BatchCreateNodesInput, SupersedeNodeInput, VerifyNodeInput, HardDeleteNodeInput, CreateEdgeInput, NeighborhoodInput, QueryNodesInput, ListEdgesInput, QueryEdgesInput, DeleteEdgeInput, TraverseInput, AnalyzeInput, BiasInput, GapsInput, SearchInput, PathInput, AnalyticsInput } from './graphClient.js';
37
+ import { LearningClientConfig } from './learningClient.js';
38
+ import { ReportsClientConfig } from './reportsClient.js';
39
+ import { SourcesClientConfig, UpsertSourceSpec } from './sourcesClient.js';
40
+ import { WorkflowClientConfig, WorkflowLensPerspectiveType, WorkflowLensStatus, AddWorktreeInput, WorkflowWorktreeStatus, UpdateWorktreeTargetsInput, MergeInput, CreateTaskInput, CompleteTaskInput, UpdateTaskInput, WorkflowBranchStatus, CompleteWorktreeInput, AdvanceWorktreePhaseInput, SetWorktreePhaseInput, PatchWorktreeStateInput, BulkCreateWorktreesInput, ListTopicsInput, SwitchTopicContextInput } from './workflowClient.js';
41
41
  import './authContext.js';
42
42
  import './contracts/auth-session.contract.js';
43
43
  import './contracts/workflow-runtime.contract.js';
@@ -47,3 +47,2944 @@ import '@lucern/contracts/mcp-gateway-boundary.contract';
47
47
  import 'zod';
48
48
  import '@lucern/contracts/tool-contracts';
49
49
  import './boundaryClientSurface.js';
50
+ import '@lucern/contracts';
51
+
52
+ type ClientConfig = BeliefsClientConfig | SourcesClientConfig | GraphClientConfig | DecisionsClientConfig | AnswersClientConfig | ContextClientConfig | WorkflowClientConfig | AuditClientConfig | AdminClientConfig | EvidenceClientConfig | EmbeddingsClientConfig | EventingClientConfig | GraphAnalysisClientConfig | GraphRecommendationsClientConfig | GraphStateClassifierClientConfig | IdentityClientConfig | JobsClientConfig | ModelRuntimeClientConfig | OntologyLinksClientConfig | OrgGraphSearchClientConfig | PolicyClientConfig | PacksClientConfig | ReportsClientConfig | LearningClientConfig | TelemetryClientConfig | ToolRegistryClientConfig | FunctionSurfaceClientConfig | OntologyClientConfig | HarnessClientConfig | SchemaClientConfig | AudiencesClientConfig | TopicsClientConfig;
53
+ type CustomToolInput = JsonObject;
54
+ type CustomToolInvoker = (input?: CustomToolInput) => Promise<unknown>;
55
+ type CustomToolNamespace = Record<string, CustomToolInvoker>;
56
+ type GatewayDataEnvelope<T extends Record<string, unknown>> = PlatformGatewaySuccess<T> & T;
57
+ type BeliefsCompatCreateInput = {
58
+ topicId?: string;
59
+ text?: string;
60
+ canonicalText?: string;
61
+ formulation?: string;
62
+ rationale?: string;
63
+ worktreeId?: string;
64
+ pillar?: string;
65
+ baseRate?: number;
66
+ sourceBeliefIds?: string[];
67
+ sourceType?: string;
68
+ beliefType?: string;
69
+ reversibility?: string;
70
+ predictionMeta?: JsonObject;
71
+ metadata?: JsonObject;
72
+ };
73
+ type BeliefsCompatForkInput = {
74
+ text?: string;
75
+ newFormulation?: string;
76
+ formulation?: string;
77
+ forkReason?: "refinement" | "contradiction_response" | "scope_change" | "confidence_collapse" | "manual";
78
+ rationale?: string;
79
+ };
80
+ type BeliefsCompatUpdateConfidenceInput = ModulateConfidenceInput;
81
+ /**
82
+ * Configuration for the high-level Lucern SDK client.
83
+ *
84
+ * At minimum, provide `apiKey` and `baseUrl`. The SDK handles
85
+ * authentication, retries, and idempotency automatically.
86
+ */
87
+ type LucernClientConfig = ClientConfig & {
88
+ /** API key for authenticating with the Lucern platform. */
89
+ apiKey?: string;
90
+ /**
91
+ * Optional Clerk JWT for per-user identity and RBAC.
92
+ * When present, the SDK operates in user-scoped mode with
93
+ * pack-aware tool filtering. When absent, operates in agent mode.
94
+ */
95
+ /** Lucern platform session token for interactive/user-scoped requests. */
96
+ userToken?: string;
97
+ /**
98
+ * Optional pack key for auto-install convenience.
99
+ * When set, the SDK will call `packs.install()` on first use
100
+ * to ensure the pack is available in the workspace.
101
+ */
102
+ packKey?: string;
103
+ /** Target environment. Defaults to production if not specified. */
104
+ environment?: "sandbox" | "production";
105
+ };
106
+ /**
107
+ * Create the high-level Lucern SDK client with all domain namespaces.
108
+ *
109
+ * @param config - Client configuration with API key, base URL, and optional settings.
110
+ * @returns The Lucern client with namespaced methods for beliefs, topics, evidence, decisions, and more.
111
+ */
112
+ declare function createLucernClient(config?: LucernClientConfig): {
113
+ config: LucernClientConfig;
114
+ version: string;
115
+ search(query: string, options?: {
116
+ topicId?: string;
117
+ types?: string[];
118
+ status?: string;
119
+ minConfidence?: number;
120
+ limit?: number;
121
+ cursor?: string;
122
+ }): Promise<GatewayDataEnvelope<{
123
+ [x: string]: unknown;
124
+ } & {
125
+ cursor?: string;
126
+ total?: number;
127
+ } & {
128
+ beliefs?: {
129
+ [x: string]: unknown;
130
+ }[];
131
+ results?: {
132
+ [x: string]: unknown;
133
+ }[];
134
+ }>>;
135
+ events: {
136
+ list(query?: Parameters<(query?: {
137
+ topicId?: string;
138
+ after?: string;
139
+ types?: string[];
140
+ startTime?: number;
141
+ endTime?: number;
142
+ limit?: number;
143
+ }) => Promise<PlatformGatewaySuccess<{
144
+ [x: string]: unknown;
145
+ } & {
146
+ cursor?: string;
147
+ total?: number;
148
+ } & {
149
+ events?: {
150
+ [x: string]: unknown;
151
+ }[];
152
+ }>>>[0]): Promise<GatewayDataEnvelope<{
153
+ [x: string]: unknown;
154
+ } & {
155
+ cursor?: string;
156
+ total?: number;
157
+ } & {
158
+ events?: {
159
+ [x: string]: unknown;
160
+ }[];
161
+ }>>;
162
+ replay(input: Parameters<(input: {
163
+ [x: string]: unknown;
164
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
165
+ [x: string]: unknown;
166
+ }>>>[0]): Promise<GatewayDataEnvelope<{
167
+ [x: string]: unknown;
168
+ }>>;
169
+ recordEvent: (input: RecordEventInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<EventingRecord>>;
170
+ listEvents: (input: EventingScope) => Promise<PlatformGatewaySuccess<ListResult<EventingRecord, "events">>>;
171
+ listWebhooks: (input: EventingScope) => Promise<PlatformGatewaySuccess<ListResult<EventingWebhookRecord, "webhooks">>>;
172
+ enqueueDelivery: (input: EnqueueDeliveryInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<EventingDeliveryRecord>>;
173
+ recordDeliveryAttempt: (input: RecordDeliveryAttemptInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<EventingDeliveryRecord>>;
174
+ updateDeliveryStatus: (input: UpdateDeliveryStatusInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<EventingDeliveryRecord>>;
175
+ };
176
+ beliefs: {
177
+ create(input: BeliefsCompatCreateInput): Promise<GatewayDataEnvelope<{
178
+ [x: string]: unknown;
179
+ } & {
180
+ id?: string;
181
+ beliefId?: string;
182
+ nodeId?: string;
183
+ }>>;
184
+ get(nodeId: string): Promise<GatewayDataEnvelope<{
185
+ [x: string]: unknown;
186
+ } & {
187
+ id?: string;
188
+ beliefId?: string;
189
+ nodeId?: string;
190
+ }>>;
191
+ refine(nodeId: string, textOrInput: string | {
192
+ text: string;
193
+ rationale?: string;
194
+ }, rationale?: string): Promise<GatewayDataEnvelope<{
195
+ [x: string]: unknown;
196
+ } & {
197
+ id?: string;
198
+ beliefId?: string;
199
+ nodeId?: string;
200
+ }>>;
201
+ updateConfidence(nodeId: string, input: BeliefsCompatUpdateConfidenceInput): Promise<GatewayDataEnvelope<{
202
+ [x: string]: unknown;
203
+ }>>;
204
+ modulateConfidence(nodeId: string, input: BeliefsCompatUpdateConfidenceInput): Promise<GatewayDataEnvelope<{
205
+ [x: string]: unknown;
206
+ }>>;
207
+ updateStatus(input: Parameters<(input: {
208
+ id?: string;
209
+ nodeId?: string;
210
+ beliefId?: string;
211
+ status: "active" | "superseded" | "archived";
212
+ reason?: string;
213
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
214
+ [x: string]: unknown;
215
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
216
+ [x: string]: unknown;
217
+ }>>;
218
+ updateRationale(input: Parameters<(input: {
219
+ id?: string;
220
+ nodeId?: string;
221
+ beliefId?: string;
222
+ rationale?: string;
223
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
224
+ [x: string]: unknown;
225
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
226
+ [x: string]: unknown;
227
+ }>>;
228
+ linkBeliefs(input: Parameters<(input: {
229
+ fromNodeId: string;
230
+ toNodeId: string;
231
+ edgeType: string;
232
+ weight?: number;
233
+ context?: string;
234
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
235
+ [x: string]: unknown;
236
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
237
+ [x: string]: unknown;
238
+ }>>;
239
+ unlinkEvidence(input: Parameters<(input: {
240
+ beliefNodeId?: string;
241
+ beliefId?: string;
242
+ insightId?: string;
243
+ evidenceId?: string;
244
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
245
+ [x: string]: unknown;
246
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
247
+ [x: string]: unknown;
248
+ }>>;
249
+ updateCriticality(input: Parameters<(input: {
250
+ id?: string;
251
+ nodeId?: string;
252
+ beliefId?: string;
253
+ criticality: string;
254
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
255
+ [x: string]: unknown;
256
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
257
+ [x: string]: unknown;
258
+ }>>;
259
+ batchUpdateCriticality(input: Parameters<(input: {
260
+ updates: {
261
+ [x: string]: unknown;
262
+ }[];
263
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
264
+ [x: string]: unknown;
265
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
266
+ [x: string]: unknown;
267
+ }>>;
268
+ reassignTopic(input: Parameters<(input: {
269
+ beliefNodeIds?: string[];
270
+ beliefIds?: string[];
271
+ targetTopicId: string;
272
+ reason?: string;
273
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
274
+ [x: string]: unknown;
275
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
276
+ [x: string]: unknown;
277
+ }>>;
278
+ fork(nodeId: string, input: BeliefsCompatForkInput): Promise<GatewayDataEnvelope<{
279
+ [x: string]: unknown;
280
+ } & {
281
+ id?: string;
282
+ beliefId?: string;
283
+ nodeId?: string;
284
+ }>>;
285
+ archive(nodeId: string, input?: string | {
286
+ reason?: string;
287
+ rationale?: string;
288
+ }): Promise<GatewayDataEnvelope<{
289
+ [x: string]: unknown;
290
+ }>>;
291
+ list(args: {
292
+ topicId?: string;
293
+ worktreeId?: string;
294
+ status?: string;
295
+ minConfidence?: number;
296
+ limit?: number;
297
+ cursor?: string;
298
+ }): Promise<GatewayDataEnvelope<{
299
+ [x: string]: unknown;
300
+ } & {
301
+ cursor?: string;
302
+ total?: number;
303
+ } & {
304
+ beliefs?: ({
305
+ [x: string]: unknown;
306
+ } & {
307
+ id?: string;
308
+ beliefId?: string;
309
+ nodeId?: string;
310
+ })[];
311
+ }>>;
312
+ search: (args: {
313
+ query: string;
314
+ topicId?: string;
315
+ status?: string;
316
+ minConfidence?: number;
317
+ limit?: number;
318
+ }) => Promise<{
319
+ results: Record<string, unknown>[];
320
+ }>;
321
+ lineage(nodeId: string): Promise<GatewayDataEnvelope<{
322
+ [x: string]: unknown;
323
+ } & {
324
+ beliefId?: string;
325
+ lineage?: {
326
+ [x: string]: unknown;
327
+ }[];
328
+ }>>;
329
+ confidenceHistory(nodeId: string): Promise<GatewayDataEnvelope<{
330
+ [x: string]: unknown;
331
+ }>>;
332
+ opinionHistory(nodeId: string): Promise<OpinionHistoryEntry[]>;
333
+ createContract(nodeId: string, input: Parameters<(id: string, input: {
334
+ [x: string]: unknown;
335
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
336
+ [x: string]: unknown;
337
+ }>>>[1]): Promise<GatewayDataEnvelope<{
338
+ [x: string]: unknown;
339
+ }>>;
340
+ bisect(nodeId: string, input: Parameters<(id: string, input: {
341
+ expectedDirection: "overconfident" | "underconfident";
342
+ timeRange?: {
343
+ start: number;
344
+ end: number;
345
+ };
346
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
347
+ [x: string]: unknown;
348
+ }>>>[1]): Promise<GatewayDataEnvelope<{
349
+ [x: string]: unknown;
350
+ }>>;
351
+ };
352
+ webhooks: {
353
+ create(input: Parameters<(input: {
354
+ [x: string]: unknown;
355
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
356
+ [x: string]: unknown;
357
+ }>>>[0]): Promise<GatewayDataEnvelope<{
358
+ [x: string]: unknown;
359
+ }>>;
360
+ list(query?: Parameters<(query?: {
361
+ topicId?: string;
362
+ }) => Promise<PlatformGatewaySuccess<{
363
+ [x: string]: unknown;
364
+ } & {
365
+ cursor?: string;
366
+ total?: number;
367
+ } & {
368
+ webhooks?: {
369
+ [x: string]: unknown;
370
+ }[];
371
+ }>>>[0]): Promise<GatewayDataEnvelope<{
372
+ [x: string]: unknown;
373
+ } & {
374
+ cursor?: string;
375
+ total?: number;
376
+ } & {
377
+ webhooks?: {
378
+ [x: string]: unknown;
379
+ }[];
380
+ }>>;
381
+ get(id: string): Promise<GatewayDataEnvelope<{
382
+ [x: string]: unknown;
383
+ }>>;
384
+ update(id: string, input: Parameters<(id: string, input: {
385
+ [x: string]: unknown;
386
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
387
+ [x: string]: unknown;
388
+ }>>>[1]): Promise<GatewayDataEnvelope<{
389
+ [x: string]: unknown;
390
+ }>>;
391
+ delete(id: string): Promise<GatewayDataEnvelope<{
392
+ [x: string]: unknown;
393
+ }>>;
394
+ test(id: string, input?: Parameters<(id: string, input?: {
395
+ topicId?: string;
396
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
397
+ [x: string]: unknown;
398
+ }>>>[1]): Promise<GatewayDataEnvelope<{
399
+ [x: string]: unknown;
400
+ }>>;
401
+ deliveries(id: string, query?: Parameters<(id: string, query?: {
402
+ limit?: number;
403
+ }) => Promise<PlatformGatewaySuccess<{
404
+ [x: string]: unknown;
405
+ }>>>[1]): Promise<GatewayDataEnvelope<{
406
+ [x: string]: unknown;
407
+ }>>;
408
+ health(id: string): Promise<GatewayDataEnvelope<{
409
+ [x: string]: unknown;
410
+ }>>;
411
+ };
412
+ edges: {
413
+ create(args: {
414
+ sourceId: string;
415
+ targetId: string;
416
+ edgeType: string;
417
+ topicId?: string;
418
+ confidence?: number;
419
+ weight?: number;
420
+ context?: string;
421
+ reasoning?: string;
422
+ }): Promise<GatewayDataEnvelope<{
423
+ [x: string]: unknown;
424
+ }>>;
425
+ update(input: Parameters<(input: {
426
+ edgeId: string;
427
+ weight?: number;
428
+ confidence?: number;
429
+ context?: string;
430
+ derivationType?: string;
431
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
432
+ [x: string]: unknown;
433
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
434
+ [x: string]: unknown;
435
+ }>>;
436
+ remove(input: Parameters<(input: {
437
+ edgeId: string;
438
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
439
+ [x: string]: unknown;
440
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
441
+ [x: string]: unknown;
442
+ }>>;
443
+ removeBetween(input: Parameters<(input: {
444
+ fromNodeId: string;
445
+ toNodeId: string;
446
+ edgeType?: string;
447
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
448
+ [x: string]: unknown;
449
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
450
+ [x: string]: unknown;
451
+ }>>;
452
+ batchCreate(input: Parameters<(input: {
453
+ edges: {
454
+ [x: string]: unknown;
455
+ }[];
456
+ skipLayerValidation?: boolean;
457
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
458
+ [x: string]: unknown;
459
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
460
+ [x: string]: unknown;
461
+ }>>;
462
+ delete(input: Parameters<(input: {
463
+ edgeIds: string[];
464
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
465
+ [x: string]: unknown;
466
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
467
+ [x: string]: unknown;
468
+ }>>;
469
+ list(args: {
470
+ sourceId: string;
471
+ edgeType?: string;
472
+ limit?: number;
473
+ cursor?: string;
474
+ }): Promise<GatewayDataEnvelope<{
475
+ [x: string]: unknown;
476
+ } & {
477
+ cursor?: string;
478
+ total?: number;
479
+ }>>;
480
+ traverse(args: {
481
+ startNode: string;
482
+ direction?: string;
483
+ maxDepth?: number;
484
+ topicId?: string;
485
+ }): Promise<GatewayDataEnvelope<{
486
+ [x: string]: unknown;
487
+ }>>;
488
+ };
489
+ evidence: {
490
+ create(args: {
491
+ text?: string;
492
+ canonicalText?: string;
493
+ topicId?: string;
494
+ source?: string;
495
+ sourceUrl?: string;
496
+ targetId?: string;
497
+ weight?: number;
498
+ metadata?: JsonObject;
499
+ title?: string;
500
+ content?: string;
501
+ contentType?: string;
502
+ kind?: string;
503
+ supports?: {
504
+ nodeId: string;
505
+ weight: number;
506
+ reasoning?: string;
507
+ };
508
+ }): Promise<GatewayDataEnvelope<{
509
+ [x: string]: unknown;
510
+ } & {
511
+ id?: string;
512
+ }>>;
513
+ add: (args: {
514
+ text?: string;
515
+ canonicalText?: string;
516
+ topicId?: string;
517
+ source?: string;
518
+ sourceUrl?: string;
519
+ targetId?: string;
520
+ weight?: number;
521
+ metadata?: JsonObject;
522
+ title?: string;
523
+ content?: string;
524
+ contentType?: string;
525
+ kind?: string;
526
+ rationale?: string;
527
+ supports?: {
528
+ nodeId: string;
529
+ weight: number;
530
+ reasoning?: string;
531
+ };
532
+ }) => Promise<{
533
+ [x: string]: unknown;
534
+ } & {
535
+ id?: string;
536
+ }>;
537
+ get(evidenceId: string): Promise<GatewayDataEnvelope<{
538
+ [x: string]: unknown;
539
+ }>>;
540
+ list(args: {
541
+ topicId?: string;
542
+ targetId?: string;
543
+ limit?: number;
544
+ cursor?: string;
545
+ }): Promise<GatewayDataEnvelope<{
546
+ [x: string]: unknown;
547
+ } & {
548
+ cursor?: string;
549
+ total?: number;
550
+ }>>;
551
+ search(args: {
552
+ q?: string;
553
+ query?: string;
554
+ topicId?: string;
555
+ targetId?: string;
556
+ methodology?: string;
557
+ limit?: number;
558
+ cursor?: string;
559
+ }): Promise<GatewayDataEnvelope<{
560
+ [x: string]: unknown;
561
+ } & {
562
+ cursor?: string;
563
+ total?: number;
564
+ }>>;
565
+ link(args: {
566
+ evidenceId: string;
567
+ targetId?: string;
568
+ beliefId?: string;
569
+ questionId?: string;
570
+ targetType?: "belief" | "question" | string;
571
+ weight?: number;
572
+ rationale?: string;
573
+ }): Promise<GatewayDataEnvelope<{
574
+ [x: string]: unknown;
575
+ } & {
576
+ edgeId?: string;
577
+ }>>;
578
+ linkToBelief(args: {
579
+ evidenceId: string;
580
+ beliefId: string;
581
+ weight: number;
582
+ rationale?: string;
583
+ }): Promise<{
584
+ beliefId: string;
585
+ edgeId?: string;
586
+ }>;
587
+ classifyEvidence(beliefId: string, evidenceId: string, config?: Parameters<(beliefId: string, evidenceId: string, classificationConfig?: EvidenceClassificationRequestConfig, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<ClassifyEvidenceResult>>>[2], idempotencyKey?: string): Promise<GatewayDataEnvelope<ClassifyEvidenceResult>>;
588
+ classifyEvidenceBatch(beliefId: string, evidence: Parameters<(beliefId: string, evidence: ClassifyEvidenceBatchItem[], classificationConfig?: EvidenceClassificationRequestConfig, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<ClassifyEvidenceBatchResult>>>[1], config?: Parameters<(beliefId: string, evidence: ClassifyEvidenceBatchItem[], classificationConfig?: EvidenceClassificationRequestConfig, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<ClassifyEvidenceBatchResult>>>[2], idempotencyKey?: string): Promise<GatewayDataEnvelope<ClassifyEvidenceBatchResult>>;
589
+ updateStatus(input: Parameters<(input: {
590
+ [x: string]: unknown;
591
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
592
+ [x: string]: unknown;
593
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
594
+ [x: string]: unknown;
595
+ }>>;
596
+ update(input: Parameters<(input: {
597
+ [x: string]: unknown;
598
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
599
+ [x: string]: unknown;
600
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
601
+ [x: string]: unknown;
602
+ }>>;
603
+ flagIncorrect(input: Parameters<(input: {
604
+ [x: string]: unknown;
605
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
606
+ [x: string]: unknown;
607
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
608
+ [x: string]: unknown;
609
+ }>>;
610
+ remove(input: Parameters<(input: {
611
+ [x: string]: unknown;
612
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
613
+ [x: string]: unknown;
614
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
615
+ [x: string]: unknown;
616
+ }>>;
617
+ updateVerificationStatus(input: Parameters<(input: {
618
+ [x: string]: unknown;
619
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
620
+ [x: string]: unknown;
621
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
622
+ [x: string]: unknown;
623
+ }>>;
624
+ };
625
+ sources: {
626
+ upsert(input: Parameters<(spec: UpsertSourceSpec, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformSourceRecord>>>[0], idempotencyKey?: Parameters<(spec: UpsertSourceSpec, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformSourceRecord>>>[1]): Promise<GatewayDataEnvelope<PlatformSourceRecord>>;
627
+ get(sourceId: string): Promise<GatewayDataEnvelope<PlatformSourceRecord>>;
628
+ };
629
+ questions: {
630
+ create(args: {
631
+ text: string;
632
+ topicId?: string;
633
+ priority?: string;
634
+ linkedBeliefId?: string;
635
+ metadata?: JsonObject;
636
+ }): Promise<GatewayDataEnvelope<{
637
+ [x: string]: unknown;
638
+ }>>;
639
+ get(questionId: string): Promise<GatewayDataEnvelope<{
640
+ [x: string]: unknown;
641
+ }>>;
642
+ refine(questionId: string, text: string, refinementReason?: string): Promise<GatewayDataEnvelope<{
643
+ [x: string]: unknown;
644
+ }>>;
645
+ list(args: {
646
+ topicId?: string;
647
+ status?: string;
648
+ priority?: string;
649
+ worktreeId?: string;
650
+ limit?: number;
651
+ cursor?: string;
652
+ }): Promise<GatewayDataEnvelope<{
653
+ [x: string]: unknown;
654
+ } & {
655
+ cursor?: string;
656
+ total?: number;
657
+ } & {
658
+ questions?: Array<{
659
+ [x: string]: unknown;
660
+ } & {
661
+ priority?: string;
662
+ }>;
663
+ }>>;
664
+ updateStatus(questionId: string, status: string, rationale?: string): Promise<GatewayDataEnvelope<{
665
+ [x: string]: unknown;
666
+ }>>;
667
+ batchCreate(input: Parameters<(input: {
668
+ [x: string]: unknown;
669
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
670
+ [x: string]: unknown;
671
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
672
+ [x: string]: unknown;
673
+ }>>;
674
+ add(input: Parameters<(input: {
675
+ [x: string]: unknown;
676
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
677
+ [x: string]: unknown;
678
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
679
+ [x: string]: unknown;
680
+ }>>;
681
+ updatePriority(input: Parameters<(input: {
682
+ [x: string]: unknown;
683
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
684
+ [x: string]: unknown;
685
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
686
+ [x: string]: unknown;
687
+ }>>;
688
+ advanceToConviction(input: Parameters<(input: {
689
+ [x: string]: unknown;
690
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
691
+ [x: string]: unknown;
692
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
693
+ [x: string]: unknown;
694
+ }>>;
695
+ updateConviction(input: Parameters<(input: {
696
+ [x: string]: unknown;
697
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
698
+ [x: string]: unknown;
699
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
700
+ [x: string]: unknown;
701
+ }>>;
702
+ finalizeConviction(input: Parameters<(input: {
703
+ [x: string]: unknown;
704
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
705
+ [x: string]: unknown;
706
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
707
+ [x: string]: unknown;
708
+ }>>;
709
+ update(input: Parameters<(input: {
710
+ [x: string]: unknown;
711
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
712
+ [x: string]: unknown;
713
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
714
+ [x: string]: unknown;
715
+ }>>;
716
+ delete(input: Parameters<(input: {
717
+ [x: string]: unknown;
718
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
719
+ [x: string]: unknown;
720
+ }>>>[0], idempotencyKey?: string): Promise<GatewayDataEnvelope<{
721
+ [x: string]: unknown;
722
+ }>>;
723
+ answer(questionId: string, input: {
724
+ text: string;
725
+ confidence?: string;
726
+ evidenceIds?: string[];
727
+ rationale?: string;
728
+ }): Promise<GatewayDataEnvelope<{
729
+ [x: string]: unknown;
730
+ }>>;
731
+ archive(questionId: string, reason?: string): Promise<GatewayDataEnvelope<{
732
+ [x: string]: unknown;
733
+ }>>;
734
+ linkEvidence(args: {
735
+ evidenceId: string;
736
+ questionId: string;
737
+ relevance?: number;
738
+ weight?: number;
739
+ rationale?: string;
740
+ }): Promise<{
741
+ questionId: string;
742
+ relevance: number | undefined;
743
+ edgeId?: string;
744
+ }>;
745
+ getHighPriority(args: {
746
+ topicId?: string;
747
+ limit?: number;
748
+ includeAnswered?: boolean;
749
+ }): Promise<{
750
+ questions: ({
751
+ priority?: string;
752
+ } & Record<string, unknown>)[];
753
+ }>;
754
+ findMissing(args: {
755
+ topicId?: string;
756
+ minConfidence?: number;
757
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
758
+ };
759
+ graph: {
760
+ nodes: {
761
+ list(query: Parameters<(query: ListNodesInput) => Promise<PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>>[0]): Promise<PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>;
762
+ get(input: string | Parameters<(query: GetNodeInput) => Promise<PlatformGatewaySuccess<PlatformGraphNode>>>[0]): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
763
+ create(input: Parameters<(input: CreateNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformGraphNode>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
764
+ update(input: Parameters<(input: UpdateNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformGraphNode>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
765
+ batchCreate(input: Parameters<(input: BatchCreateNodesInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
766
+ listByTopicAndType(input: {
767
+ topicId?: string;
768
+ projectId?: string;
769
+ nodeType?: string;
770
+ nodeTypes?: string[];
771
+ query?: string;
772
+ sourceText?: string;
773
+ limit?: number;
774
+ cursor?: string;
775
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
776
+ countByTopicAndType(input: {
777
+ topicId?: string;
778
+ projectId?: string;
779
+ nodeType?: string;
780
+ nodeTypes?: string[];
781
+ query?: string;
782
+ limit?: number;
783
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
784
+ supersede(input: Parameters<(input: SupersedeNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
785
+ verify(input: Parameters<(input: VerifyNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
786
+ hardDelete(input: Parameters<(input: HardDeleteNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
787
+ };
788
+ createEdge(input: Parameters<(input: CreateEdgeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformGraphEdge>>>[0]): Promise<PlatformGatewaySuccess<PlatformGraphEdge>>;
789
+ neighborhood(args: Parameters<(query: NeighborhoodInput) => Promise<PlatformGatewaySuccess<GraphNeighborhoodResponse>>>[0]): Promise<GatewayDataEnvelope<GraphNeighborhoodResponse>>;
790
+ queryLineage: (nodeId: string, depth?: number) => Promise<{
791
+ chain: {
792
+ nodeId: {};
793
+ relation: string;
794
+ }[];
795
+ forkTree: {
796
+ nodeId: string;
797
+ parentCount: number;
798
+ childCount: number;
799
+ children: never[];
800
+ };
801
+ depth: number;
802
+ beliefId: string | undefined;
803
+ lineage: {
804
+ [x: string]: unknown;
805
+ }[];
806
+ }>;
807
+ getConfidenceHistory: (nodeId: string) => Promise<GatewayDataEnvelope<{
808
+ [x: string]: unknown;
809
+ }>>;
810
+ getOpinionHistory: (nodeId: string) => Promise<OpinionHistoryEntry[]>;
811
+ getAuditTrail: (nodeId: string, limit?: number) => Promise<{
812
+ entries: {
813
+ action: string;
814
+ actor: string;
815
+ timestamp: number;
816
+ rationale: string;
817
+ before: string | number | boolean | JsonObject | JsonArray | null;
818
+ after: string | number | boolean | JsonObject | JsonArray | null;
819
+ }[];
820
+ }>;
821
+ traverse(args: {
822
+ startNode: string;
823
+ direction?: string;
824
+ maxDepth?: number;
825
+ topicId?: string;
826
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
827
+ analyze(args: {
828
+ topicId?: string;
829
+ limit?: number;
830
+ metric?: string;
831
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
832
+ bias(args: {
833
+ topicId?: string;
834
+ threshold?: number;
835
+ limit?: number;
836
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
837
+ gaps(args: {
838
+ topicId?: string;
839
+ minConfidence?: number;
840
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
841
+ falsify(args: {
842
+ topicId?: string;
843
+ beliefId?: string;
844
+ beliefIds?: string[];
845
+ minConfidence?: number;
846
+ }): Promise<GatewayDataEnvelope<{
847
+ [x: string]: unknown;
848
+ }>>;
849
+ traceEntityImpact(args: {
850
+ nodeId: string;
851
+ topicId?: string;
852
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
853
+ searchBeliefs: (args: {
854
+ query: string;
855
+ topicId?: string;
856
+ status?: string;
857
+ minConfidence?: number;
858
+ limit?: number;
859
+ }) => Promise<{
860
+ results: Record<string, unknown>[];
861
+ }>;
862
+ findContradictions: (args: {
863
+ topicId?: string;
864
+ nodeId?: string;
865
+ status?: string;
866
+ }) => Promise<{
867
+ contradictions: {
868
+ beliefA: string;
869
+ beliefB: string;
870
+ description: string;
871
+ severity: string;
872
+ status: string;
873
+ defeatType: string;
874
+ }[];
875
+ }>;
876
+ bisectConfidence: (nodeId: string, args: {
877
+ expectedDirection: "overconfident" | "underconfident";
878
+ }) => Promise<GatewayDataEnvelope<{
879
+ [x: string]: unknown;
880
+ }>>;
881
+ listBeliefs: (args: {
882
+ topicId?: string;
883
+ worktreeId?: string;
884
+ status?: string;
885
+ minConfidence?: number;
886
+ limit?: number;
887
+ cursor?: string;
888
+ }) => Promise<({
889
+ [x: string]: unknown;
890
+ } & {
891
+ id?: string;
892
+ beliefId?: string;
893
+ nodeId?: string;
894
+ })[]>;
895
+ detectConfirmationBias(topicId: string, threshold?: number): Promise<{
896
+ topicId: string;
897
+ threshold: number;
898
+ success: true;
899
+ data: Record<string, unknown>;
900
+ correlationId: string;
901
+ policyTraceId: string | null;
902
+ idempotentReplay: boolean;
903
+ }>;
904
+ getStructureAnalysis(topicId: string): Promise<{
905
+ topicId: string;
906
+ success: true;
907
+ data: Record<string, unknown>;
908
+ correlationId: string;
909
+ policyTraceId: string | null;
910
+ idempotentReplay: boolean;
911
+ }>;
912
+ getFalsificationQuestions(topicId: string, beliefIds?: string[]): Promise<{
913
+ topicId: string;
914
+ questions: unknown;
915
+ }>;
916
+ };
917
+ themes: {
918
+ listByTopic(input: {
919
+ topicId?: string;
920
+ projectId?: string;
921
+ query?: string;
922
+ limit?: number;
923
+ cursor?: string;
924
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
925
+ };
926
+ graphSearch: {
927
+ keywordSearchNodes(input: {
928
+ topicId?: string;
929
+ projectId?: string;
930
+ query?: string;
931
+ sourceText?: string;
932
+ nodeType?: string;
933
+ nodeTypes?: string[];
934
+ limit?: number;
935
+ cursor?: string;
936
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
937
+ };
938
+ classifiers: {
939
+ listBeliefCandidates(input: {
940
+ topicId?: string;
941
+ projectId?: string;
942
+ classifierKey?: string;
943
+ query?: string;
944
+ limit?: number;
945
+ cursor?: string;
946
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
947
+ };
948
+ archetypes: {
949
+ getJudgmentSignature(input: {
950
+ topicId?: string;
951
+ projectId?: string;
952
+ principalId?: string;
953
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
954
+ };
955
+ judgments: {
956
+ create(input: RecordJudgmentInput): Promise<PlatformGatewaySuccess<RecordJudgmentResponse>>;
957
+ record(input: RecordJudgmentInput): Promise<PlatformGatewaySuccess<RecordJudgmentResponse>>;
958
+ list(query: Parameters<(query: ListJudgmentsInput) => Promise<PlatformGatewaySuccess<ListJudgmentsResponse>>>[0]): Promise<PlatformGatewaySuccess<ListJudgmentsResponse>>;
959
+ get(judgmentId: string): Promise<PlatformGatewaySuccess<GetJudgmentResponse>>;
960
+ recordOutcome(judgmentId: string, input: Parameters<(judgmentId: string, input: RecordJudgmentOutcomeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>>[1]): Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>;
961
+ updateOutcome(judgmentId: string, input: Parameters<(judgmentId: string, input: RecordJudgmentOutcomeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>>[1]): Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>;
962
+ readiness(topicId: string): Promise<PlatformGatewaySuccess<JudgmentReadinessResponse>>;
963
+ calibration(topicId: string): Promise<PlatformGatewaySuccess<JudgmentCalibrationResponse>>;
964
+ pendingOutcomeReview(topicId: string): Promise<PlatformGatewaySuccess<ListResult<PendingJudgmentOutcomeRecord, "reviews">>>;
965
+ transitionAuditIntegrity(args: {
966
+ topicId?: string;
967
+ judgmentId?: string;
968
+ includePassing?: boolean;
969
+ }): Promise<PlatformGatewaySuccess<JudgmentTransitionAuditIntegrityResponse>>;
970
+ };
971
+ decisions: {
972
+ create(input: RecordJudgmentInput): Promise<PlatformGatewaySuccess<RecordJudgmentResponse>>;
973
+ record(input: RecordJudgmentInput): Promise<PlatformGatewaySuccess<RecordJudgmentResponse>>;
974
+ list(query: Parameters<(query: ListJudgmentsInput) => Promise<PlatformGatewaySuccess<ListJudgmentsResponse>>>[0]): Promise<PlatformGatewaySuccess<ListJudgmentsResponse>>;
975
+ get(decisionId: string): Promise<PlatformGatewaySuccess<GetJudgmentResponse>>;
976
+ recordOutcome(decisionId: string, input: Parameters<(judgmentId: string, input: RecordJudgmentOutcomeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>>[1]): Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>;
977
+ lessons(decisionId: string, input: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
978
+ archive(decisionId: string, input?: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
979
+ readiness(topicId: string): Promise<PlatformGatewaySuccess<JudgmentReadinessResponse>>;
980
+ calibration(topicId: string): Promise<PlatformGatewaySuccess<JudgmentCalibrationResponse>>;
981
+ pendingOutcomeReview(topicId: string): Promise<PlatformGatewaySuccess<ListResult<PendingJudgmentOutcomeRecord, "reviews">>>;
982
+ };
983
+ worktrees: {
984
+ createBranch(input: Parameters<(input: {
985
+ name: string;
986
+ topicId?: string;
987
+ description?: string;
988
+ metadata?: JsonObject;
989
+ } & TopicIdentifierInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowBranchRecord>>>[0]): Promise<PlatformGatewaySuccess<WorkflowBranchRecord>>;
990
+ createLens(input: Parameters<(input: {
991
+ name: string;
992
+ workspaceId?: string;
993
+ topicId?: string;
994
+ description?: string;
995
+ perspectiveType: WorkflowLensPerspectiveType;
996
+ promptTemplates?: LensPromptTemplateReference[];
997
+ workflowTemplates?: LensWorkflowTemplate[];
998
+ taskTemplates?: LensTaskTemplate[];
999
+ filterCriteria?: JsonObject;
1000
+ } & TopicIdentifierInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowLensRecord>>>[0]): Promise<PlatformGatewaySuccess<WorkflowLensRecord>>;
1001
+ listLenses(query: Parameters<(query: {
1002
+ workspaceId?: string;
1003
+ topicId?: string;
1004
+ status?: WorkflowLensStatus;
1005
+ perspectiveType?: WorkflowLensPerspectiveType;
1006
+ } & TopicIdentifierInput) => Promise<PlatformGatewaySuccess<ListResult<WorkflowLensRecord, "lenses">>>>[0]): Promise<PlatformGatewaySuccess<ListResult<WorkflowLensRecord, "lenses">>>;
1007
+ applyLensToTopic(input: Parameters<(input: {
1008
+ lensId: string;
1009
+ topicId?: string;
1010
+ metadata?: JsonObject;
1011
+ } & TopicIdentifierInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowLensBindingRecord>>>[0]): Promise<PlatformGatewaySuccess<WorkflowLensBindingRecord>>;
1012
+ removeLensFromTopic(input: Parameters<(input: {
1013
+ lensId: string;
1014
+ topicId?: string;
1015
+ } & TopicIdentifierInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowLensBindingRecord>>>[0]): Promise<PlatformGatewaySuccess<WorkflowLensBindingRecord>>;
1016
+ create(input: AddWorktreeInput): Promise<PlatformGatewaySuccess<{
1017
+ [x: string]: unknown;
1018
+ }>>;
1019
+ add(input: AddWorktreeInput): Promise<PlatformGatewaySuccess<{
1020
+ [x: string]: unknown;
1021
+ }>>;
1022
+ list(query: Parameters<(query: {
1023
+ topicId?: string;
1024
+ branchId
1025
+ /** Lucern platform session token for interactive/user-scoped requests. */
1026
+ ? /**
1027
+ * Optional Clerk JWT for per-user identity and RBAC.
1028
+ * When present, the SDK operates in user-scoped mode with
1029
+ * pack-aware tool filtering. When absent, operates in agent mode.
1030
+ */: string;
1031
+ status?: WorkflowWorktreeStatus;
1032
+ groupBy?: "campaign" | "lane" | "flat";
1033
+ lane?: string;
1034
+ campaign?: number;
1035
+ limit?: number;
1036
+ } & TopicIdentifierInput) => Promise<PlatformGatewaySuccess<ListResult<WorkflowWorktreeRecord, "worktrees">>>>[0]): Promise<PlatformGatewaySuccess<{
1037
+ [x: string]: unknown;
1038
+ } & {
1039
+ cursor?: string;
1040
+ total?: number;
1041
+ } & {
1042
+ worktrees?: {
1043
+ [x: string]: unknown;
1044
+ }[];
1045
+ }>>;
1046
+ listByTopic(query: Parameters<(query: {
1047
+ topicId?: string;
1048
+ branchId
1049
+ /** Lucern platform session token for interactive/user-scoped requests. */
1050
+ ? /**
1051
+ * Optional Clerk JWT for per-user identity and RBAC.
1052
+ * When present, the SDK operates in user-scoped mode with
1053
+ * pack-aware tool filtering. When absent, operates in agent mode.
1054
+ */: string;
1055
+ status?: WorkflowWorktreeStatus;
1056
+ groupBy?: "campaign" | "lane" | "flat";
1057
+ lane?: string;
1058
+ campaign?: number;
1059
+ limit?: number;
1060
+ } & TopicIdentifierInput) => Promise<PlatformGatewaySuccess<ListResult<WorkflowWorktreeRecord, "worktrees">>>>[0]): Promise<PlatformGatewaySuccess<{
1061
+ [x: string]: unknown;
1062
+ } & {
1063
+ cursor?: string;
1064
+ total?: number;
1065
+ } & {
1066
+ worktrees?: {
1067
+ [x: string]: unknown;
1068
+ }[];
1069
+ }>>;
1070
+ findByPairedSprint(input: {
1071
+ sprintId: string;
1072
+ topicId?: string;
1073
+ projectId?: string;
1074
+ limit?: number;
1075
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1076
+ activate(worktreeId: string): Promise<PlatformGatewaySuccess<{
1077
+ [x: string]: unknown;
1078
+ }>>;
1079
+ updateMetadata(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<{
1080
+ [x: string]: unknown;
1081
+ }>>;
1082
+ update(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<{
1083
+ [x: string]: unknown;
1084
+ }>>;
1085
+ updateTargets(input: Parameters<(input: UpdateWorktreeTargetsInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>>[0]): Promise<PlatformGatewaySuccess<{
1086
+ [x: string]: unknown;
1087
+ }>>;
1088
+ listAll(query?: Parameters<(query?: {
1089
+ status?: WorkflowWorktreeStatus;
1090
+ groupBy?: "campaign" | "lane" | "flat";
1091
+ lane?: string;
1092
+ campaign?: number;
1093
+ limit?: number;
1094
+ }) => Promise<PlatformGatewaySuccess<ListWorktreesResponse>>>[0]): Promise<PlatformGatewaySuccess<ListWorktreesResponse>>;
1095
+ merge(worktreeId: string, input: MergeInput): Promise<PlatformGatewaySuccess<{
1096
+ [x: string]: unknown;
1097
+ }>>;
1098
+ push(worktreeId: string, input: Parameters<(worktreeId: string, input: {
1099
+ targetContext: string;
1100
+ beliefIds?: string[];
1101
+ metadata?: JsonObject;
1102
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PushWorktreeResponse>>>[1]): Promise<PlatformGatewaySuccess<PushWorktreeResponse>>;
1103
+ openPullRequest(worktreeId: string, input: Parameters<(worktreeId: string, input: {
1104
+ summary: string;
1105
+ reviewers?: string[];
1106
+ status?: "pending_review" | "changes_requested" | "approved" | "blocked";
1107
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<OpenPullRequestResponse>>>[1]): Promise<PlatformGatewaySuccess<OpenPullRequestResponse>>;
1108
+ pipelineSnapshot(topicId: string): FunctionSurfaceResult<unknown>;
1109
+ complete(input: Parameters<(input: {
1110
+ worktreeId: string;
1111
+ keyFindings?: string[];
1112
+ decisionsReached?: string[];
1113
+ nextSteps?: string[];
1114
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1115
+ [x: string]: unknown;
1116
+ }>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1117
+ [x: string]: unknown;
1118
+ }>>;
1119
+ advancePhase(worktreeId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1120
+ [x: string]: unknown;
1121
+ }>>;
1122
+ setPhase(worktreeId: string, phase: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1123
+ [x: string]: unknown;
1124
+ }>>;
1125
+ patchState(input: Parameters<(input: {
1126
+ worktreeId: string;
1127
+ patch: {
1128
+ [x: string]: unknown;
1129
+ };
1130
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1131
+ [x: string]: unknown;
1132
+ }>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1133
+ [x: string]: unknown;
1134
+ }>>;
1135
+ bulkCreate(input: Parameters<(input: {
1136
+ worktrees: unknown[];
1137
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1138
+ [x: string]: unknown;
1139
+ }>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1140
+ [x: string]: unknown;
1141
+ }>>;
1142
+ };
1143
+ context: {
1144
+ listTopics(query?: Parameters<(query?: TopicListInput) => Promise<PlatformGatewaySuccess<TopicListResponse>>>[0]): Promise<PlatformGatewaySuccess<TopicListResponse>>;
1145
+ compile(topicId: string, input?: Parameters<(topicId: string, input?: CompileContextInput) => Promise<PlatformGatewaySuccess<PublicCompiledContext>>>[1]): Promise<PlatformGatewaySuccess<PublicCompiledContext>>;
1146
+ recordScopeLearning(input: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
1147
+ discover(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1148
+ analyzeTopicDensity(input: FunctionSurfaceInput): FunctionSurfaceResult<unknown>;
1149
+ applyAutoBranching(input: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
1150
+ seedBeliefLattice(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
1151
+ getLatticeCoverage(input?: FunctionSurfaceInput): FunctionSurfaceResult<unknown>;
1152
+ matchEntityType(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<{
1153
+ [x: string]: unknown;
1154
+ }>>;
1155
+ discoverEntityConnections(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1156
+ triggerBeliefReview(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1157
+ };
1158
+ tasks: {
1159
+ create(input: CreateTaskInput): Promise<PlatformGatewaySuccess<{
1160
+ [x: string]: unknown;
1161
+ }>>;
1162
+ complete(taskId: string, input: CompleteTaskInput): Promise<PlatformGatewaySuccess<{
1163
+ [x: string]: unknown;
1164
+ }>>;
1165
+ update(taskId: string, input: UpdateTaskInput): Promise<PlatformGatewaySuccess<{
1166
+ [x: string]: unknown;
1167
+ }>>;
1168
+ list(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<{
1169
+ [x: string]: unknown;
1170
+ } & {
1171
+ cursor?: string;
1172
+ total?: number;
1173
+ } & {
1174
+ tasks?: {
1175
+ [x: string]: unknown;
1176
+ }[];
1177
+ }>>;
1178
+ listByTopic(input: FunctionSurfaceInput & {
1179
+ topicId?: string;
1180
+ }): Promise<PlatformGatewaySuccess<{
1181
+ [x: string]: unknown;
1182
+ } & {
1183
+ cursor?: string;
1184
+ total?: number;
1185
+ } & {
1186
+ tasks?: {
1187
+ [x: string]: unknown;
1188
+ }[];
1189
+ }>>;
1190
+ listByWorktree(input: FunctionSurfaceInput & {
1191
+ worktreeId: string;
1192
+ }): Promise<PlatformGatewaySuccess<{
1193
+ [x: string]: unknown;
1194
+ } & {
1195
+ cursor?: string;
1196
+ total?: number;
1197
+ } & {
1198
+ tasks?: {
1199
+ [x: string]: unknown;
1200
+ }[];
1201
+ }>>;
1202
+ linkChat(taskId: string, input: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1203
+ };
1204
+ topics: {
1205
+ list(input?: Parameters<(query?: TopicListInput) => Promise<PlatformGatewaySuccess<TopicListResponse>>>[0]): Promise<PlatformGatewaySuccess<TopicListResponse>>;
1206
+ get(topicId: string): Promise<PlatformGatewaySuccess<TopicRecord>>;
1207
+ create(input: Parameters<(input: TopicCreateInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<TopicRecord>>>[0]): Promise<PlatformGatewaySuccess<TopicRecord>>;
1208
+ update(topicId: string, input: Parameters<(topicId: string, input: TopicUpdateInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<TopicRecord>>>[1]): Promise<PlatformGatewaySuccess<TopicRecord>>;
1209
+ tree(topicId: string, query?: Parameters<(topicId: string, query?: TopicTreeQuery) => Promise<PlatformGatewaySuccess<TopicTreeResponse>>>[1]): Promise<PlatformGatewaySuccess<TopicTreeResponse>>;
1210
+ getTree(input: {
1211
+ rootId: string;
1212
+ maxDepth?: number;
1213
+ }): Promise<PlatformGatewaySuccess<TopicTreeResponse>>;
1214
+ coverage(topicId: string, query?: Parameters<(topicId: string, query?: TopicCoverageQuery) => Promise<PlatformGatewaySuccess<TopicCoverageResponse>>>[1]): Promise<PlatformGatewaySuccess<TopicCoverageResponse>>;
1215
+ remove(topicId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1216
+ bulkCreate(input: Parameters<(input: TopicBulkCreateInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1217
+ };
1218
+ answers: {
1219
+ create(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<{
1220
+ [x: string]: unknown;
1221
+ }>>;
1222
+ get(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1223
+ };
1224
+ contradictions: {
1225
+ flag(args: {
1226
+ beliefA: string;
1227
+ beliefB: string;
1228
+ description: string;
1229
+ topicId?: string;
1230
+ severity?: string;
1231
+ defeatType?: string;
1232
+ }): Promise<GatewayDataEnvelope<{
1233
+ [x: string]: unknown;
1234
+ }>>;
1235
+ list(args: {
1236
+ topicId?: string;
1237
+ status?: string;
1238
+ limit?: number;
1239
+ cursor?: string;
1240
+ }): Promise<GatewayDataEnvelope<{
1241
+ [x: string]: unknown;
1242
+ } & {
1243
+ cursor?: string;
1244
+ total?: number;
1245
+ } & {
1246
+ contradictions?: {
1247
+ [x: string]: unknown;
1248
+ }[];
1249
+ }>>;
1250
+ get(contradictionId: string): Promise<GatewayDataEnvelope<{
1251
+ [x: string]: unknown;
1252
+ }>>;
1253
+ find: (args: {
1254
+ topicId?: string;
1255
+ nodeId?: string;
1256
+ status?: string;
1257
+ }) => Promise<{
1258
+ contradictions: {
1259
+ beliefA: string;
1260
+ beliefB: string;
1261
+ description: string;
1262
+ severity: string;
1263
+ status: string;
1264
+ defeatType: string;
1265
+ }[];
1266
+ }>;
1267
+ };
1268
+ ontologies: {
1269
+ list(input?: {
1270
+ tenantId?: string;
1271
+ tier?: string;
1272
+ status?: string;
1273
+ }): Promise<GatewayDataEnvelope<{
1274
+ ontologies: any[];
1275
+ total: number;
1276
+ items: any[];
1277
+ definitions: any[];
1278
+ }>>;
1279
+ get(ontologyId: string): Promise<GatewayDataEnvelope<{
1280
+ [x: string]: unknown;
1281
+ }>>;
1282
+ bind(input: Parameters<(input: OntologyBindingInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1283
+ [x: string]: unknown;
1284
+ }>>>[0], idempotencyKey?: Parameters<(input: OntologyBindingInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1285
+ [x: string]: unknown;
1286
+ }>>>[1]): Promise<GatewayDataEnvelope<{
1287
+ [x: string]: unknown;
1288
+ }>>;
1289
+ match(input: Parameters<(input: {
1290
+ [x: string]: unknown;
1291
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1292
+ [x: string]: unknown;
1293
+ }>>>[0], idempotencyKey?: Parameters<(input: {
1294
+ [x: string]: unknown;
1295
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1296
+ [x: string]: unknown;
1297
+ }>>>[1]): Promise<GatewayDataEnvelope<{
1298
+ [x: string]: unknown;
1299
+ }>>;
1300
+ create(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
1301
+ update(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
1302
+ archive(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
1303
+ createVersion(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
1304
+ publishVersion(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1305
+ publishOntologyVersion(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1306
+ deprecateVersion(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1307
+ deprecateOntologyVersion(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1308
+ resolveEffective(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1309
+ resolveEffectiveOntology(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1310
+ raw: {
1311
+ list(filters?: GatewayScope & {
1312
+ tenantId?: string;
1313
+ tier?: string;
1314
+ status?: string;
1315
+ }): Promise<PlatformGatewaySuccess<{
1316
+ ontologies: any[];
1317
+ total: number;
1318
+ items: any[];
1319
+ definitions: any[];
1320
+ }>>;
1321
+ get(id: string): Promise<PlatformGatewaySuccess<unknown>>;
1322
+ bind(input: OntologyBindingInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1323
+ listDefinitions(filters?: GatewayScope & {
1324
+ tenantId?: string;
1325
+ tier?: string;
1326
+ status?: string;
1327
+ }): Promise<PlatformGatewaySuccess<{
1328
+ ontologies: any[];
1329
+ total: number;
1330
+ items: any[];
1331
+ definitions: any[];
1332
+ }>>;
1333
+ getDefinition(id: string): Promise<PlatformGatewaySuccess<unknown>>;
1334
+ createDefinition(input: OntologyDefinitionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1335
+ updateDefinition(id: string, input: OntologyDefinitionUpdateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1336
+ archiveDefinition(id: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1337
+ listVersions(ontologyId: string, filters?: GatewayScope & {
1338
+ status?: string;
1339
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "versions">>>;
1340
+ createVersion(ontologyId: string, input: OntologyVersionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1341
+ publishVersion(ontologyId: string, versionId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1342
+ deprecateVersion(ontologyId: string, versionId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1343
+ listTopics(ontologyId: string): Promise<PlatformGatewaySuccess<ListResult<any, "topics">>>;
1344
+ listTopicsByOntology(ontologyId: string): Promise<PlatformGatewaySuccess<ListResult<any, "topics">>>;
1345
+ };
1346
+ };
1347
+ coordination: {
1348
+ registerSession(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
1349
+ heartbeatSession(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
1350
+ endSession(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
1351
+ listActiveSessions(input?: FunctionSurfaceInput): FunctionSurfaceResult<unknown>;
1352
+ sendAgentMessage(input: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
1353
+ broadcastMessage(input: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
1354
+ getInbox(input?: FunctionSurfaceInput): FunctionSurfaceResult<unknown>;
1355
+ getAgentInbox(input?: FunctionSurfaceInput): FunctionSurfaceResult<unknown>;
1356
+ claimFiles(input: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
1357
+ };
1358
+ policy: {
1359
+ checkPermission(input: FunctionSurfaceInput): Promise<PlatformGatewaySuccess<PermissionDecision>>;
1360
+ listAccessibleTopics(input?: Parameters<(query?: GatewayScope & {
1361
+ permission?: PermissionKind;
1362
+ includeShared?: boolean;
1363
+ principal?: string;
1364
+ principalId?: string;
1365
+ limit?: number;
1366
+ }) => Promise<{
1367
+ data: {
1368
+ permission: PermissionKind;
1369
+ topics: {
1370
+ [key: string]: unknown;
1371
+ topicId?: string;
1372
+ name?: string;
1373
+ type?: string;
1374
+ isOwner?: boolean;
1375
+ }[];
1376
+ total: number;
1377
+ deniedTopics: {
1378
+ topicId: string;
1379
+ reasonCode: string;
1380
+ }[];
1381
+ };
1382
+ success: true;
1383
+ correlationId: string;
1384
+ policyTraceId: string | null;
1385
+ idempotentReplay: boolean;
1386
+ }>>[0]): Promise<{
1387
+ data: {
1388
+ permission: PermissionKind;
1389
+ topics: {
1390
+ [key: string]: unknown;
1391
+ topicId?: string;
1392
+ name?: string;
1393
+ type?: string;
1394
+ isOwner?: boolean;
1395
+ }[];
1396
+ total: number;
1397
+ deniedTopics: {
1398
+ topicId: string;
1399
+ reasonCode: string;
1400
+ }[];
1401
+ };
1402
+ success: true;
1403
+ correlationId: string;
1404
+ policyTraceId: string | null;
1405
+ idempotentReplay: boolean;
1406
+ }>;
1407
+ filterByPermission(input: FunctionSurfaceInput): Promise<{
1408
+ success: boolean;
1409
+ data: {
1410
+ permission: PermissionKind;
1411
+ allowedTopicIds: string[];
1412
+ deniedTopics: {
1413
+ topicId: string;
1414
+ reasonCode: string;
1415
+ }[];
1416
+ count: number;
1417
+ };
1418
+ }>;
1419
+ manageWritePolicy(input: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
1420
+ raw: {
1421
+ listDecisions(query?: GatewayScope & {
1422
+ action?: string;
1423
+ decision?: string;
1424
+ traceId?: string;
1425
+ principalId?: string;
1426
+ topicId?: string;
1427
+ limit?: number;
1428
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "decisions">>>;
1429
+ grant(input: GatewayScope & {
1430
+ topicId: string;
1431
+ permission: PermissionKind;
1432
+ principal?: string;
1433
+ principalId?: string;
1434
+ groupId?: string;
1435
+ beliefClusterId?: string;
1436
+ expiresAt?: number;
1437
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1438
+ revoke(input: GatewayScope & {
1439
+ topicId: string;
1440
+ principal?: string;
1441
+ principalId?: string;
1442
+ groupId?: string;
1443
+ beliefClusterId?: string;
1444
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1445
+ listWritePolicies(query?: GatewayScope & {
1446
+ topicId?: string;
1447
+ role?: string;
1448
+ toolCategory?: string;
1449
+ enabled?: boolean;
1450
+ }): Promise<{
1451
+ data: {
1452
+ policies: WritePolicyRecord[];
1453
+ };
1454
+ success: true;
1455
+ correlationId: string;
1456
+ policyTraceId: string | null;
1457
+ idempotentReplay: boolean;
1458
+ }>;
1459
+ createWritePolicy(input: WritePolicyCreateInput, idempotencyKey?: string): Promise<{
1460
+ data: {
1461
+ id: string | undefined;
1462
+ created: boolean;
1463
+ policy: WritePolicyRecord | null;
1464
+ };
1465
+ success: true;
1466
+ correlationId: string;
1467
+ policyTraceId: string | null;
1468
+ idempotentReplay: boolean;
1469
+ }>;
1470
+ updateWritePolicy(id: string, input: WritePolicyUpdateInput, idempotencyKey?: string): Promise<{
1471
+ data: {
1472
+ id: string | undefined;
1473
+ updated: boolean;
1474
+ policy: WritePolicyRecord | null;
1475
+ };
1476
+ success: true;
1477
+ correlationId: string;
1478
+ policyTraceId: string | null;
1479
+ idempotentReplay: boolean;
1480
+ }>;
1481
+ deleteWritePolicy(id: string, scope?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1482
+ id?: string;
1483
+ deleted?: boolean;
1484
+ }>>;
1485
+ listRolePolicies(query?: GatewayScope): Promise<{
1486
+ data: {
1487
+ policies: TenantPolicyRecord[];
1488
+ };
1489
+ success: true;
1490
+ correlationId: string;
1491
+ policyTraceId: string | null;
1492
+ idempotentReplay: boolean;
1493
+ }>;
1494
+ createRolePolicy(input: GatewayScope & {
1495
+ roleName: string;
1496
+ description?: string;
1497
+ permissions: TenantPolicyPermission[];
1498
+ groupBindings?: string[];
1499
+ }, idempotencyKey?: string): Promise<{
1500
+ data: {
1501
+ policy: TenantPolicyRecord | null;
1502
+ };
1503
+ success: true;
1504
+ correlationId: string;
1505
+ policyTraceId: string | null;
1506
+ idempotentReplay: boolean;
1507
+ }>;
1508
+ updateRolePolicy(id: string, input: GatewayScope & {
1509
+ roleName: string;
1510
+ description?: string;
1511
+ permissions: TenantPolicyPermission[];
1512
+ groupBindings?: string[];
1513
+ }, idempotencyKey?: string): Promise<{
1514
+ data: {
1515
+ policy: TenantPolicyRecord | null;
1516
+ };
1517
+ success: true;
1518
+ correlationId: string;
1519
+ policyTraceId: string | null;
1520
+ idempotentReplay: boolean;
1521
+ }>;
1522
+ deleteRolePolicy(id: string, scope?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1523
+ checkPermission(query: GatewayScope & {
1524
+ topicId?: string;
1525
+ permission?: PermissionKind;
1526
+ principal?: string;
1527
+ principalId?: string;
1528
+ beliefClusterId?: string;
1529
+ }): Promise<PlatformGatewaySuccess<PermissionDecision>>;
1530
+ listAccessibleTopics(query?: GatewayScope & {
1531
+ permission?: PermissionKind;
1532
+ includeShared?: boolean;
1533
+ principal?: string;
1534
+ principalId?: string;
1535
+ limit?: number;
1536
+ }): Promise<{
1537
+ data: {
1538
+ permission: PermissionKind;
1539
+ topics: {
1540
+ [key: string]: unknown;
1541
+ topicId?: string;
1542
+ name?: string;
1543
+ type?: string;
1544
+ isOwner?: boolean;
1545
+ }[];
1546
+ total: number;
1547
+ deniedTopics: {
1548
+ topicId: string;
1549
+ reasonCode: string;
1550
+ }[];
1551
+ };
1552
+ success: true;
1553
+ correlationId: string;
1554
+ policyTraceId: string | null;
1555
+ idempotentReplay: boolean;
1556
+ }>;
1557
+ filterByPermission(input: GatewayScope & {
1558
+ topicIds?: string[];
1559
+ permission?: PermissionKind;
1560
+ principal?: string;
1561
+ principalId?: string;
1562
+ }): Promise<{
1563
+ success: boolean;
1564
+ data: {
1565
+ permission: PermissionKind;
1566
+ allowedTopicIds: string[];
1567
+ deniedTopics: {
1568
+ topicId: string;
1569
+ reasonCode: string;
1570
+ }[];
1571
+ count: number;
1572
+ };
1573
+ }>;
1574
+ };
1575
+ };
1576
+ observations: {
1577
+ ingest(input: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
1578
+ ingestObservation(input: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
1579
+ getContext(input: FunctionSurfaceInput): FunctionSurfaceResult<unknown>;
1580
+ getObservationContext(input: FunctionSurfaceInput): FunctionSurfaceResult<unknown>;
1581
+ };
1582
+ coding: {
1583
+ getCodeContext(input: FunctionSurfaceInput): FunctionSurfaceResult<unknown>;
1584
+ getChangeHistory(input: FunctionSurfaceInput): FunctionSurfaceResult<unknown>;
1585
+ recordAttempt(input: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
1586
+ getFailureLog(input: FunctionSurfaceInput): FunctionSurfaceResult<unknown>;
1587
+ };
1588
+ contracts: {
1589
+ create(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1590
+ createEpistemicContract(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1591
+ list(input?: {
1592
+ beliefNodeId?: string;
1593
+ contractId?: string;
1594
+ status?: string;
1595
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1596
+ evaluate(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1597
+ evaluateContract(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1598
+ getStatus(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1599
+ getContractStatus(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1600
+ };
1601
+ bootstrap: {
1602
+ generateSessionHandoff(input: FunctionSurfaceInput): FunctionSurfaceResult<unknown>;
1603
+ };
1604
+ embeddings: {
1605
+ getByNodeIds(input: GetEmbeddingsByNodeIdsInput): Promise<PlatformGatewaySuccess<ListResult<EmbeddingRecord, "embeddings">>>;
1606
+ listMissingForTopic(input: ListMissingEmbeddingsInput): Promise<PlatformGatewaySuccess<ListResult<MissingEmbeddingCandidate, "nodes">>>;
1607
+ vectorSearchByTopic(input: VectorSearchByTopicInput): Promise<PlatformGatewaySuccess<ListResult<VectorSearchMatch, "results">>>;
1608
+ markEmbeddingBackfillQueued(input: MarkEmbeddingBackfillQueuedInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1609
+ queued: number;
1610
+ topicId: string;
1611
+ workspaceId: string;
1612
+ nodeIds: string[];
1613
+ }>>;
1614
+ };
1615
+ graphAnalysis: {
1616
+ listGraphIntelligenceQueries(input?: ListGraphIntelligenceQueriesInput): Promise<PlatformGatewaySuccess<GraphIntelligenceQueryCatalogResponse>>;
1617
+ runGraphIntelligenceQuery(input: RunGraphIntelligenceQueryInput): Promise<PlatformGatewaySuccess<GraphIntelligenceQueryRunResponse>>;
1618
+ saveAnalysis(input: SaveGraphAnalysisInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphAnalysisRecord>>;
1619
+ listAnalyses(input: ListGraphAnalysesInput): Promise<PlatformGatewaySuccess<ListResult<any, "analyses">>>;
1620
+ getLatestAnalysis(input: GetLatestGraphAnalysisInput): Promise<PlatformGatewaySuccess<GraphAnalysisRecord>>;
1621
+ saveSuggestions(input: SaveGraphSuggestionsInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphAnalysisSuggestionsResponse>>;
1622
+ updateSuggestionStatus(input: UpdateGraphSuggestionStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphAnalysisSuggestion>>;
1623
+ listSuggestions(input: ListGraphSuggestionsInput): Promise<PlatformGatewaySuccess<ListResult<any, "suggestions">>>;
1624
+ listGraphChanges(input: ListGraphChangesInput): Promise<PlatformGatewaySuccess<ListResult<any, "changes">>>;
1625
+ computeOrRequestAnalysis(input: ComputeOrRequestGraphAnalysisInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphAnalysisRecord>>;
1626
+ };
1627
+ graphRecommendations: {
1628
+ listForTopic(input: GraphRecommendationListInput): Promise<PlatformGatewaySuccess<ListResult<any, "recommendations">>>;
1629
+ getRecommendation(recommendationId: string): Promise<PlatformGatewaySuccess<GraphRecommendationRecord>>;
1630
+ markRecommendationStatus(input: MarkGraphRecommendationStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphRecommendationRecord>>;
1631
+ };
1632
+ orgGraphSearch: {
1633
+ search(input: OrgGraphSearchInput): Promise<PlatformGatewaySuccess<OrgGraphSearchResponse>>;
1634
+ getNode(input: GetOrgGraphNodeInput): Promise<PlatformGatewaySuccess<OrgGraphSearchResult>>;
1635
+ listByProvenance(input: ListOrgGraphByProvenanceInput): Promise<PlatformGatewaySuccess<OrgGraphSearchResponse>>;
1636
+ listPublishedFromWorkspace(input: ListPublishedFromWorkspaceInput): Promise<PlatformGatewaySuccess<OrgGraphSearchResponse>>;
1637
+ };
1638
+ ontologyLinks: {
1639
+ resolveThemeSource(input: JsonObject): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1640
+ createLink(input: OntologyLinkWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OntologyLinkRecord>>;
1641
+ upsertLink(input: OntologyLinkWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OntologyLinkRecord>>;
1642
+ listLinksForNode(input: ListOntologyLinksForNodeInput): Promise<PlatformGatewaySuccess<ListResult<OntologyLinkRecord, "links">>>;
1643
+ updateLinkStatus(input: UpdateOntologyLinkStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OntologyLinkRecord>>;
1644
+ };
1645
+ graphStateClassifier: {
1646
+ classifyNode(input: ClassifyNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphStateClassification>>;
1647
+ classifyTopic(input: ClassifyTopicInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ListResult<GraphStateClassification, "classifications">>>;
1648
+ listClassifications(input: ListGraphStateClassificationsInput): Promise<PlatformGatewaySuccess<ListResult<GraphStateClassification, "classifications">>>;
1649
+ recordClassification(input: RecordGraphStateClassificationInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphStateClassification>>;
1650
+ };
1651
+ modelRuntime: {
1652
+ listModels(input: ModelRuntimeScope): Promise<PlatformGatewaySuccess<ListResult<ModelRegistryRecord, "models">>>;
1653
+ getModel(input: ModelRuntimeScope & {
1654
+ modelId: string;
1655
+ }): Promise<PlatformGatewaySuccess<ModelRegistryRecord>>;
1656
+ listFunctionSlots(input: ModelRuntimeScope & {
1657
+ functionName?: string;
1658
+ }): Promise<PlatformGatewaySuccess<ListResult<ModelFunctionSlot, "slots">>>;
1659
+ resolveSlot(input: ResolveModelSlotInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ModelFunctionSlot>>;
1660
+ updateSlotConfig(input: UpdateModelSlotConfigInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ModelFunctionSlot>>;
1661
+ };
1662
+ jobs: {
1663
+ enqueue(input: EnqueueJobInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRecord>>;
1664
+ list(input: JobsScope): Promise<PlatformGatewaySuccess<ListResult<JobRecord, "jobs">>>;
1665
+ claim(input: ClaimJobInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRecord>>;
1666
+ updateStatus(input: UpdateJobStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRecord>>;
1667
+ retry(input: RetryJobInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRecord>>;
1668
+ recordRunStart(input: RecordJobRunStartInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRunRecord>>;
1669
+ recordRunFinish(input: RecordJobRunFinishInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRunRecord>>;
1670
+ };
1671
+ telemetry: {
1672
+ logSystemEvent(input: LogSystemEventInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1673
+ eventId?: string;
1674
+ recorded: boolean;
1675
+ }>>;
1676
+ logToolCallsBatch(input: LogToolCallsBatchInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1677
+ recorded: number;
1678
+ }>>;
1679
+ recordEpistemicAudit(input: RecordEpistemicAuditInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1680
+ auditId?: string;
1681
+ recorded: boolean;
1682
+ }>>;
1683
+ recordPolicyDecision(input: RecordTelemetryPolicyDecisionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1684
+ decisionId?: string;
1685
+ recorded: boolean;
1686
+ }>>;
1687
+ startRun(input: StartTelemetryRunInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TelemetryRunRecord>>;
1688
+ finishRun(input: FinishTelemetryRunInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TelemetryRunRecord>>;
1689
+ listRuns(input: TelemetryScope): Promise<PlatformGatewaySuccess<ListResult<TelemetryRunRecord, "runs">>>;
1690
+ };
1691
+ publication: {
1692
+ create(input: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1693
+ update(publicationId: string, input: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1694
+ list(input?: JsonObject): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1695
+ getByTopic(input: string | {
1696
+ topicId: string;
1697
+ workspaceId?: string;
1698
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1699
+ publish(publicationId: string, input?: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1700
+ unpublish(publicationId: string, input?: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1701
+ remove(publicationId: string, input?: JsonObject): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1702
+ };
1703
+ contentPublication: {
1704
+ create(input: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1705
+ update(publicationId: string, input: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1706
+ list(input?: JsonObject): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1707
+ getByTopic(input: string | {
1708
+ topicId: string;
1709
+ workspaceId?: string;
1710
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1711
+ publish(publicationId: string, input?: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1712
+ unpublish(publicationId: string, input?: JsonObject, idempotencyKey?: string): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1713
+ remove(publicationId: string, input?: JsonObject): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1714
+ };
1715
+ tools: {
1716
+ listCatalog: (input: ToolRegistryQuery) => Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
1717
+ listExecutable: (input: ToolRegistryQuery) => Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
1718
+ listEffectiveTools: (input: ToolRegistryQuery) => Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
1719
+ upsertCoreTools: (input: UpsertCoreToolsInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
1720
+ setPackToolsStatus: (input: SetPackToolsStatusInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
1721
+ createAcl: (input: CreateToolAclInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<ToolAclRecord>>;
1722
+ deleteAcl: (input: DeleteToolAclInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<{
1723
+ aclId: string;
1724
+ deleted: boolean;
1725
+ }>>;
1726
+ registerCustomTool: (input: RegisterCustomToolInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<ToolCatalogEntry>>;
1727
+ register(registration: CustomToolRegistration): RegisteredCustomTool;
1728
+ unregister(fullName: string): boolean;
1729
+ list(): RegisteredCustomTool[];
1730
+ clear(): void;
1731
+ invoke(name: string, input?: CustomToolInput): Promise<unknown>;
1732
+ namespace(namespace: string): CustomToolNamespace;
1733
+ };
1734
+ packs: {
1735
+ /**
1736
+ * Ensure the configured packKey is installed.
1737
+ * No-op if no packKey was provided or if the pack is already installed.
1738
+ * Called automatically on first API use when packKey is set.
1739
+ */
1740
+ ensurePack: () => Promise<void>;
1741
+ /**
1742
+ * Check if the configured pack has been installed in this session.
1743
+ */
1744
+ readonly isInstalled: boolean;
1745
+ listCatalog(): Promise<PlatformGatewaySuccess<ListResult<any, "catalog">>>;
1746
+ catalog(): Promise<PlatformGatewaySuccess<ListResult<any, "catalog">>>;
1747
+ listStates(scope?: Parameters<(query?: GatewayScope) => Promise<PlatformGatewaySuccess<ListResult<any, "states">>>>[0]): Promise<PlatformGatewaySuccess<ListResult<any, "states">>>;
1748
+ states(scope?: Parameters<(query?: GatewayScope) => Promise<PlatformGatewaySuccess<ListResult<any, "states">>>>[0]): Promise<PlatformGatewaySuccess<ListResult<any, "states">>>;
1749
+ install(input: Parameters<(input: PackInstallInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1750
+ enable(input: Parameters<(input: PackEnableInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1751
+ disable(input: Parameters<(input: PackDisableInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>>[0]): Promise<PlatformGatewaySuccess<unknown>>;
1752
+ };
1753
+ nodes: {
1754
+ list(query: Parameters<(query: ListNodesInput) => Promise<PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>>[0]): Promise<PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>;
1755
+ get(input: string | Parameters<(query: GetNodeInput) => Promise<PlatformGatewaySuccess<PlatformGraphNode>>>[0]): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
1756
+ create(input: Parameters<(input: CreateNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformGraphNode>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
1757
+ update(input: Parameters<(input: UpdateNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformGraphNode>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
1758
+ batchCreate(input: Parameters<(input: BatchCreateNodesInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1759
+ listByTopicAndType(input: {
1760
+ topicId?: string;
1761
+ projectId?: string;
1762
+ nodeType?: string;
1763
+ nodeTypes?: string[];
1764
+ query?: string;
1765
+ sourceText?: string;
1766
+ limit?: number;
1767
+ cursor?: string;
1768
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1769
+ countByTopicAndType(input: {
1770
+ topicId?: string;
1771
+ projectId?: string;
1772
+ nodeType?: string;
1773
+ nodeTypes?: string[];
1774
+ query?: string;
1775
+ limit?: number;
1776
+ }): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
1777
+ supersede(input: Parameters<(input: SupersedeNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1778
+ verify(input: Parameters<(input: VerifyNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1779
+ hardDelete(input: Parameters<(input: HardDeleteNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1780
+ };
1781
+ identity: {
1782
+ evaluatePolicy: (input: PolicyEvaluationInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PolicyDecisionRecord>>;
1783
+ recordPolicyDecision: (input: RecordPolicyDecisionInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PolicyDecisionRecord>>;
1784
+ putSecretReference: (input: PutTenantSecretReferenceInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<TenantSecretReference>>;
1785
+ createPrincipal: (input: GatewayScope & {
1786
+ principalId: string;
1787
+ principalType: "user" | "group" | "service" | "external_viewer";
1788
+ clerkId?: string;
1789
+ email?: string;
1790
+ displayName?: string;
1791
+ status?: "active" | "invited" | "suspended" | "disabled" | "revoked";
1792
+ metadata?: JsonObject;
1793
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
1794
+ updatePrincipal: (input: GatewayScope & {
1795
+ principalId: string;
1796
+ principalType: "user" | "group" | "service" | "external_viewer";
1797
+ clerkId?: string;
1798
+ email?: string;
1799
+ displayName?: string;
1800
+ status?: "active" | "invited" | "suspended" | "disabled" | "revoked";
1801
+ metadata?: JsonObject;
1802
+ }, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<unknown>>;
1803
+ raw: {
1804
+ whoami(): Promise<PlatformGatewaySuccess<{
1805
+ principalId: string;
1806
+ principalType: "human" | "service" | "agent" | "user" | "group" | "external_viewer";
1807
+ tenantId: string | null;
1808
+ workspaceId: string | null;
1809
+ scopes: string[];
1810
+ roles: string[];
1811
+ isPlatformAdmin: boolean;
1812
+ isTenantAdmin: boolean;
1813
+ isWorkspaceAdmin: boolean;
1814
+ authMode: string | undefined;
1815
+ sessionId: string | undefined;
1816
+ delegatedBy: string | undefined;
1817
+ expiresAt: number | undefined;
1818
+ }>>;
1819
+ listPrincipals(query?: GatewayScope & {
1820
+ status?: string;
1821
+ principalType?: string;
1822
+ query?: string;
1823
+ limit?: number;
1824
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "principals">>>;
1825
+ createPrincipal(input: GatewayScope & {
1826
+ principalId: string;
1827
+ principalType: "user" | "group" | "service" | "external_viewer";
1828
+ clerkId?: string;
1829
+ email?: string;
1830
+ displayName?: string;
1831
+ status?: "active" | "invited" | "suspended" | "disabled" | "revoked";
1832
+ metadata?: JsonObject;
1833
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1834
+ updatePrincipal(input: GatewayScope & {
1835
+ principalId: string;
1836
+ principalType: "user" | "group" | "service" | "external_viewer";
1837
+ clerkId?: string;
1838
+ email?: string;
1839
+ displayName?: string;
1840
+ status?: "active" | "invited" | "suspended" | "disabled" | "revoked";
1841
+ metadata?: JsonObject;
1842
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1843
+ upsertPrincipal(input: GatewayScope & {
1844
+ principalId: string;
1845
+ principalType: "user" | "group" | "service" | "external_viewer";
1846
+ clerkId?: string;
1847
+ email?: string;
1848
+ displayName?: string;
1849
+ status?: "active" | "invited" | "suspended" | "disabled" | "revoked";
1850
+ metadata?: JsonObject;
1851
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1852
+ listKeys(query?: GatewayScope & {
1853
+ principalId?: string;
1854
+ status?: string;
1855
+ limit?: number;
1856
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "keys">>>;
1857
+ createKey(input: GatewayScope & {
1858
+ principalId: string;
1859
+ keyId?: string;
1860
+ token?: string;
1861
+ scopes?: string[];
1862
+ environment?: "sandbox" | "production";
1863
+ expiresInDays?: number;
1864
+ rateLimitTier?: "free" | "developer" | "partner";
1865
+ metadata?: JsonObject;
1866
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1867
+ rotateKey(keyId: string, input?: {
1868
+ replacementKeyId?: string;
1869
+ replacementToken?: string;
1870
+ replacementExpiresInDays?: number;
1871
+ gracePeriodHours?: number;
1872
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1873
+ deleteKey(keyId: string, input?: {
1874
+ reason?: string;
1875
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1876
+ revokeKey(keyId: string, input?: {
1877
+ reason?: string;
1878
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
1879
+ searchClerkUsers(q: string): Promise<PlatformGatewaySuccess<ClerkUserSearchResult[]>>;
1880
+ getTenantConfig(input: TenantIdentityScope): Promise<PlatformGatewaySuccess<TenantIdentityConfigRecord>>;
1881
+ updateTenantConfig(input: UpdateTenantConfigInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TenantIdentityConfigRecord>>;
1882
+ listIntegrations(input: TenantIdentityScope): Promise<PlatformGatewaySuccess<ListResult<TenantIntegrationRecord, "integrations">>>;
1883
+ upsertIntegration(input: UpsertTenantIntegrationInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TenantIntegrationRecord>>;
1884
+ listSecrets(input: TenantIdentityScope): Promise<PlatformGatewaySuccess<ListResult<TenantSecretReference, "secrets">>>;
1885
+ putSecretReference(input: PutTenantSecretReferenceInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TenantSecretReference>>;
1886
+ evaluatePolicy(input: PolicyEvaluationInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PolicyDecisionRecord>>;
1887
+ recordPolicyDecision(input: RecordPolicyDecisionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PolicyDecisionRecord>>;
1888
+ };
1889
+ whoami(): Promise<PlatformGatewaySuccess<{
1890
+ principalId: string;
1891
+ principalType: "human" | "service" | "agent" | "user" | "group" | "external_viewer";
1892
+ tenantId: string | null;
1893
+ workspaceId: string | null;
1894
+ scopes: string[];
1895
+ roles: string[];
1896
+ isPlatformAdmin: boolean;
1897
+ isTenantAdmin: boolean;
1898
+ isWorkspaceAdmin: boolean;
1899
+ authMode: string | undefined;
1900
+ sessionId: string | undefined;
1901
+ delegatedBy: string | undefined;
1902
+ expiresAt: number | undefined;
1903
+ }> & {
1904
+ principalId: string;
1905
+ principalType: "human" | "service" | "agent" | "user" | "group" | "external_viewer";
1906
+ tenantId: string | null;
1907
+ workspaceId: string | null;
1908
+ scopes: string[];
1909
+ roles: string[];
1910
+ isPlatformAdmin: boolean;
1911
+ isTenantAdmin: boolean;
1912
+ isWorkspaceAdmin: boolean;
1913
+ authMode: string | undefined;
1914
+ sessionId: string | undefined;
1915
+ delegatedBy: string | undefined;
1916
+ expiresAt: number | undefined;
1917
+ }>;
1918
+ };
1919
+ mcp: {
1920
+ bootstrapSession(input?: Parameters<(input?: McpBootstrapSessionInput) => Promise<McpBootstrapSessionResponse>>[0]): Promise<McpBootstrapSessionResponse>;
1921
+ checkWritePolicy(input: Parameters<(input: McpCheckWritePolicyInput) => Promise<McpCheckWritePolicyResponse>>[0]): Promise<McpCheckWritePolicyResponse>;
1922
+ beginBuildSession(input: Parameters<(input: McpBeginBuildSessionInput) => Promise<McpBeginBuildSessionResponse>>[0]): Promise<McpBeginBuildSessionResponse>;
1923
+ evaluateEngineeringContract(input: Parameters<(input: McpEvaluateEngineeringContractInput) => Promise<McpContractEvaluationResponse>>[0]): Promise<McpContractEvaluationResponse>;
1924
+ evaluateResearchContract(input: Parameters<(input: McpEvaluateResearchContractInput) => Promise<McpContractEvaluationResponse>>[0]): Promise<McpContractEvaluationResponse>;
1925
+ };
1926
+ auth: {
1927
+ device: {
1928
+ createCode(input?: DeviceCodeInput): Promise<DeviceCodeResponse>;
1929
+ pollToken(deviceCode: string): Promise<DeviceTokenResponse>;
1930
+ };
1931
+ };
1932
+ custom: CustomToolNamespace;
1933
+ extensions: Record<string, CustomToolNamespace>;
1934
+ raw: {
1935
+ beliefs: {
1936
+ createBelief(input: CreateBeliefInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformBeliefRecord>>;
1937
+ refineBelief(beliefId: string, input: RefineBeliefInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformBeliefRecord>>;
1938
+ modulateConfidence: (beliefId: string, input: ModulateConfidenceOpinionInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<ModulateConfidenceResponse>>;
1939
+ getOpinionHistory(beliefId: string): Promise<OpinionHistoryEntry[]>;
1940
+ getConfidenceHistory(beliefId: string): Promise<OpinionHistoryEntry[]>;
1941
+ forkBelief(beliefId: string, input: ForkBeliefInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ForkBeliefResponse>>;
1942
+ updateBeliefStatus(input: UpdateBeliefStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1943
+ updateBeliefRationale(input: UpdateBeliefRationaleInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1944
+ linkBeliefs(input: LinkBeliefsInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1945
+ unlinkBeliefEvidence(input: UnlinkBeliefEvidenceInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1946
+ updateBeliefCriticality(input: UpdateBeliefCriticalityInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1947
+ batchUpdateBeliefCriticality(input: BatchUpdateBeliefCriticalityInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1948
+ reassignBeliefsTopic(input: ReassignBeliefsTopicInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1949
+ };
1950
+ sources: {
1951
+ upsert(spec: UpsertSourceSpec, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformSourceRecord>>;
1952
+ get(sourceId: string): Promise<PlatformGatewaySuccess<PlatformSourceRecord>>;
1953
+ };
1954
+ evidence: {
1955
+ classifyEvidence(beliefId: string, evidenceId: string, classificationConfig?: EvidenceClassificationRequestConfig, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ClassifyEvidenceResult>>;
1956
+ classifyEvidenceBatch(beliefId: string, evidence: ClassifyEvidenceBatchItem[], classificationConfig?: EvidenceClassificationRequestConfig, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ClassifyEvidenceBatchResult>>;
1957
+ };
1958
+ embeddings: {
1959
+ getByNodeIds(input: GetEmbeddingsByNodeIdsInput): Promise<PlatformGatewaySuccess<ListResult<EmbeddingRecord, "embeddings">>>;
1960
+ listMissingForTopic(input: ListMissingEmbeddingsInput): Promise<PlatformGatewaySuccess<ListResult<MissingEmbeddingCandidate, "nodes">>>;
1961
+ vectorSearchByTopic(input: VectorSearchByTopicInput): Promise<PlatformGatewaySuccess<ListResult<VectorSearchMatch, "results">>>;
1962
+ markEmbeddingBackfillQueued(input: MarkEmbeddingBackfillQueuedInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
1963
+ queued: number;
1964
+ topicId: string;
1965
+ workspaceId: string;
1966
+ nodeIds: string[];
1967
+ }>>;
1968
+ };
1969
+ eventing: {
1970
+ recordEvent(input: RecordEventInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<EventingRecord>>;
1971
+ listEvents(input: EventingScope): Promise<PlatformGatewaySuccess<ListResult<EventingRecord, "events">>>;
1972
+ listWebhooks(input: EventingScope): Promise<PlatformGatewaySuccess<ListResult<EventingWebhookRecord, "webhooks">>>;
1973
+ enqueueDelivery(input: EnqueueDeliveryInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<EventingDeliveryRecord>>;
1974
+ recordDeliveryAttempt(input: RecordDeliveryAttemptInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<EventingDeliveryRecord>>;
1975
+ updateDeliveryStatus(input: UpdateDeliveryStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<EventingDeliveryRecord>>;
1976
+ };
1977
+ graph: {
1978
+ listNodes(query: ListNodesInput): Promise<PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>;
1979
+ queryNodes(query: QueryNodesInput): Promise<PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>;
1980
+ getNode(query: GetNodeInput): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
1981
+ createNode(input: CreateNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
1982
+ updateNode(input: UpdateNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
1983
+ batchCreateNodes(input: BatchCreateNodesInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1984
+ supersedeNode(input: SupersedeNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1985
+ verifyNode(input: VerifyNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1986
+ hardDeleteNode(input: HardDeleteNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1987
+ listEdges(query: ListEdgesInput): Promise<PlatformGatewaySuccess<ListResult<PlatformGraphEdge, "edges">>>;
1988
+ queryEdges(query: QueryEdgesInput): Promise<PlatformGatewaySuccess<ListResult<PlatformGraphEdge, "edges">>>;
1989
+ createEdge(input: CreateEdgeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphEdge>>;
1990
+ deleteEdge(query: DeleteEdgeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<DeleteEdgeResponse>>;
1991
+ neighborhood(query: NeighborhoodInput): Promise<PlatformGatewaySuccess<GraphNeighborhoodResponse>>;
1992
+ traverse(query: TraverseInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1993
+ analyze(query?: AnalyzeInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1994
+ bias(query?: BiasInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1995
+ gaps(query: GapsInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1996
+ search(query: SearchInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
1997
+ getNeighborhood(query: NeighborhoodInput): Promise<PlatformGatewaySuccess<GraphNeighborhoodResponse>>;
1998
+ getPath(query: PathInput): Promise<PlatformGatewaySuccess<GraphPathResponse>>;
1999
+ getAnalytics(query?: AnalyticsInput): Promise<PlatformGatewaySuccess<GraphAnalyticsResponse>>;
2000
+ };
2001
+ graphAnalysis: {
2002
+ listGraphIntelligenceQueries(input?: ListGraphIntelligenceQueriesInput): Promise<PlatformGatewaySuccess<GraphIntelligenceQueryCatalogResponse>>;
2003
+ runGraphIntelligenceQuery(input: RunGraphIntelligenceQueryInput): Promise<PlatformGatewaySuccess<GraphIntelligenceQueryRunResponse>>;
2004
+ saveAnalysis(input: SaveGraphAnalysisInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphAnalysisRecord>>;
2005
+ listAnalyses(input: ListGraphAnalysesInput): Promise<PlatformGatewaySuccess<ListResult<any, "analyses">>>;
2006
+ getLatestAnalysis(input: GetLatestGraphAnalysisInput): Promise<PlatformGatewaySuccess<GraphAnalysisRecord>>;
2007
+ saveSuggestions(input: SaveGraphSuggestionsInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphAnalysisSuggestionsResponse>>;
2008
+ updateSuggestionStatus(input: UpdateGraphSuggestionStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphAnalysisSuggestion>>;
2009
+ listSuggestions(input: ListGraphSuggestionsInput): Promise<PlatformGatewaySuccess<ListResult<any, "suggestions">>>;
2010
+ listGraphChanges(input: ListGraphChangesInput): Promise<PlatformGatewaySuccess<ListResult<any, "changes">>>;
2011
+ computeOrRequestAnalysis(input: ComputeOrRequestGraphAnalysisInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphAnalysisRecord>>;
2012
+ };
2013
+ graphRecommendations: {
2014
+ listForTopic(input: GraphRecommendationListInput): Promise<PlatformGatewaySuccess<ListResult<any, "recommendations">>>;
2015
+ getRecommendation(recommendationId: string): Promise<PlatformGatewaySuccess<GraphRecommendationRecord>>;
2016
+ markRecommendationStatus(input: MarkGraphRecommendationStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphRecommendationRecord>>;
2017
+ };
2018
+ graphStateClassifier: {
2019
+ classifyNode(input: ClassifyNodeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphStateClassification>>;
2020
+ classifyTopic(input: ClassifyTopicInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ListResult<GraphStateClassification, "classifications">>>;
2021
+ listClassifications(input: ListGraphStateClassificationsInput): Promise<PlatformGatewaySuccess<ListResult<GraphStateClassification, "classifications">>>;
2022
+ recordClassification(input: RecordGraphStateClassificationInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GraphStateClassification>>;
2023
+ };
2024
+ decisions: {
2025
+ listJudgments(query: ListJudgmentsInput): Promise<PlatformGatewaySuccess<ListJudgmentsResponse>>;
2026
+ getJudgment(judgmentId: string): Promise<PlatformGatewaySuccess<GetJudgmentResponse>>;
2027
+ getJudgmentReadiness(query: {
2028
+ topicId?: string;
2029
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<JudgmentReadinessResponse>>;
2030
+ getJudgmentCalibration(query: GetJudgmentCalibrationInput): Promise<PlatformGatewaySuccess<JudgmentCalibrationResponse>>;
2031
+ listPendingOutcomeReviews(query: ListPendingJudgmentOutcomeReviewInput): Promise<PlatformGatewaySuccess<ListResult<PendingJudgmentOutcomeRecord, "reviews">>>;
2032
+ listPendingJudgmentOutcomeReview(query: ListPendingJudgmentOutcomeReviewInput): Promise<PlatformGatewaySuccess<ListResult<PendingJudgmentOutcomeRecord, "reviews">>>;
2033
+ getJudgmentTransitionAuditIntegrity(query: GetJudgmentTransitionAuditIntegrityInput): Promise<PlatformGatewaySuccess<JudgmentTransitionAuditIntegrityResponse>>;
2034
+ createJudgment(input: RecordJudgmentInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<RecordJudgmentResponse>>;
2035
+ recordJudgment(input: RecordJudgmentInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<RecordJudgmentResponse>>;
2036
+ updateJudgmentOutcome(judgmentId: string, input: RecordJudgmentOutcomeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>;
2037
+ recordJudgmentOutcome(judgmentId: string, input: RecordJudgmentOutcomeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>;
2038
+ };
2039
+ workflow: {
2040
+ listBranches(query: {
2041
+ topicId?: string;
2042
+ status?: WorkflowBranchStatus;
2043
+ limit?: number;
2044
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<ListResult<WorkflowBranchRecord, "branches">>>;
2045
+ createBranch(input: {
2046
+ name: string;
2047
+ topicId?: string;
2048
+ description?: string;
2049
+ metadata?: JsonObject;
2050
+ } & TopicIdentifierInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowBranchRecord>>;
2051
+ listLenses(query: {
2052
+ workspaceId?: string;
2053
+ topicId?: string;
2054
+ status?: WorkflowLensStatus;
2055
+ perspectiveType?: WorkflowLensPerspectiveType;
2056
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<ListResult<WorkflowLensRecord, "lenses">>>;
2057
+ createLens(input: {
2058
+ name: string;
2059
+ workspaceId?: string;
2060
+ topicId?: string;
2061
+ description?: string;
2062
+ perspectiveType: WorkflowLensPerspectiveType;
2063
+ promptTemplates?: LensPromptTemplateReference[];
2064
+ workflowTemplates?: LensWorkflowTemplate[];
2065
+ taskTemplates?: LensTaskTemplate[];
2066
+ filterCriteria?: JsonObject;
2067
+ } & TopicIdentifierInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowLensRecord>>;
2068
+ applyLensToTopic(input: {
2069
+ lensId: string;
2070
+ topicId?: string;
2071
+ metadata?: JsonObject;
2072
+ } & TopicIdentifierInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowLensBindingRecord>>;
2073
+ removeLensFromTopic(input: {
2074
+ lensId: string;
2075
+ topicId?: string;
2076
+ } & TopicIdentifierInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowLensBindingRecord>>;
2077
+ listWorktrees(query: {
2078
+ topicId?: string;
2079
+ branchId
2080
+ /** Lucern platform session token for interactive/user-scoped requests. */
2081
+ ? /**
2082
+ * Optional Clerk JWT for per-user identity and RBAC.
2083
+ * When present, the SDK operates in user-scoped mode with
2084
+ * pack-aware tool filtering. When absent, operates in agent mode.
2085
+ */: string;
2086
+ status?: WorkflowWorktreeStatus;
2087
+ groupBy?: "campaign" | "lane" | "flat";
2088
+ lane?: string;
2089
+ campaign?: number;
2090
+ limit?: number;
2091
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<ListResult<WorkflowWorktreeRecord, "worktrees">>>;
2092
+ listAllWorktrees(query?: {
2093
+ status?: WorkflowWorktreeStatus;
2094
+ groupBy?: "campaign" | "lane" | "flat";
2095
+ lane?: string;
2096
+ campaign?: number;
2097
+ limit?: number;
2098
+ }): Promise<PlatformGatewaySuccess<ListWorktreesResponse>>;
2099
+ listCampaigns(query?: {
2100
+ topicId?: string;
2101
+ status?: WorkflowWorktreeStatus;
2102
+ limit?: number;
2103
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2104
+ createWorktree(input: AddWorktreeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>;
2105
+ addWorktree(input: AddWorktreeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>;
2106
+ merge(worktreeId: string, input: MergeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<MergeWorktreeResponse>>;
2107
+ activateWorktree(worktreeId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>;
2108
+ updateWorktreeTargets(input: UpdateWorktreeTargetsInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>;
2109
+ completeWorktree(input: CompleteWorktreeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2110
+ advanceWorktreePhase(input: AdvanceWorktreePhaseInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2111
+ setWorktreePhase(input: SetWorktreePhaseInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2112
+ patchWorktreeState(input: PatchWorktreeStateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2113
+ bulkCreateWorktrees(input: BulkCreateWorktreesInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2114
+ openPullRequest(worktreeId: string, input: {
2115
+ summary: string;
2116
+ reviewers?: string[];
2117
+ status?: "pending_review" | "changes_requested" | "approved" | "blocked";
2118
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OpenPullRequestResponse>>;
2119
+ push(worktreeId: string, input: {
2120
+ targetContext: string;
2121
+ beliefIds?: string[];
2122
+ metadata?: JsonObject;
2123
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PushWorktreeResponse>>;
2124
+ listTopics(query?: ListTopicsInput): Promise<PlatformGatewaySuccess<ListTopicsResponse>>;
2125
+ switchTopicContext(input: SwitchTopicContextInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<SwitchTopicContextResponse>>;
2126
+ createTask(input: CreateTaskInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<CreateTaskResponse>>;
2127
+ completeTask(taskId: string, input: CompleteTaskInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<CompleteTaskResponse>>;
2128
+ updateTask(taskId: string, input: UpdateTaskInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<UpdateTaskResponse>>;
2129
+ createPillar(input: {
2130
+ name: string;
2131
+ topicId?: string;
2132
+ description?: string;
2133
+ metadata?: JsonObject;
2134
+ } & TopicIdentifierInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowBranchRecord>>;
2135
+ createSprint(input: {
2136
+ title: string;
2137
+ topicId?: string;
2138
+ branchId?: string;
2139
+ hypothesis?: string;
2140
+ beliefIds?: string[];
2141
+ } & TopicIdentifierInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<WorkflowWorktreeRecord>>;
2142
+ completeSprint(worktreeId: string, input: MergeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<MergeWorktreeResponse>>;
2143
+ requestReview(worktreeId: string, input: {
2144
+ summary: string;
2145
+ reviewers?: string[];
2146
+ status?: "pending_review" | "changes_requested" | "approved" | "blocked";
2147
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OpenPullRequestResponse>>;
2148
+ publishFindings(worktreeId: string, input: {
2149
+ targetContext: string;
2150
+ beliefIds?: string[];
2151
+ metadata?: JsonObject;
2152
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PushWorktreeResponse>>;
2153
+ };
2154
+ audit: {
2155
+ listEvents(query?: GatewayScope & {
2156
+ action?: string;
2157
+ decision?: string;
2158
+ traceId?: string;
2159
+ principalId?: string;
2160
+ topicId?: string;
2161
+ limit?: number;
2162
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<ListResult<any, "events">>>;
2163
+ };
2164
+ authDevice: {
2165
+ createDeviceCode(input?: DeviceCodeInput): Promise<DeviceCodeResponse>;
2166
+ pollDeviceToken(deviceCode: string): Promise<DeviceTokenResponse>;
2167
+ };
2168
+ admin: {
2169
+ listTenants(query?: {
2170
+ status?: "provisioning" | "active" | "disabled" | "suspended" | "archived";
2171
+ limit?: number;
2172
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "tenants">>>;
2173
+ createTenant(input: {
2174
+ key: string;
2175
+ slug?: string;
2176
+ name: string;
2177
+ tier?: "free" | "developer" | "team" | "enterprise";
2178
+ status?: "provisioning" | "active" | "disabled" | "suspended" | "archived";
2179
+ ownerClerkId?: string;
2180
+ ownerEmail?: string;
2181
+ lucernDeploymentUrl?: string;
2182
+ appDeploymentUrl?: string;
2183
+ metadata?: JsonObject;
2184
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2185
+ getControlObjectOwnership(): Promise<PlatformGatewaySuccess<ControlObjectOwnershipContract>>;
2186
+ getControlObjectOwnershipContract(): Promise<PlatformGatewaySuccess<ControlObjectOwnershipContract>>;
2187
+ listWorkspaces(query?: GatewayScope & {
2188
+ status?: "active" | "archived";
2189
+ limit?: number;
2190
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "workspaces">>>;
2191
+ createWorkspace(input: GatewayScope & {
2192
+ workspaceId?: string;
2193
+ key?: string;
2194
+ slug?: string;
2195
+ name?: string;
2196
+ status?: "active" | "archived";
2197
+ defaultProjectVisibility?: "private" | "team" | "firm" | "external" | "public";
2198
+ restore?: boolean;
2199
+ metadata?: JsonObject;
2200
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2201
+ listMemberships(query?: GatewayScope & {
2202
+ principalId?: string;
2203
+ status?: "active" | "invited" | "revoked" | "expired";
2204
+ role?: "platform_admin" | "tenant_admin" | "workspace_admin" | "editor" | "viewer" | "auditor" | "service_agent";
2205
+ limit?: number;
2206
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "memberships">>>;
2207
+ createMembership(input: GatewayScope & {
2208
+ membershipId?: string;
2209
+ principalId: string;
2210
+ role: "platform_admin" | "tenant_admin" | "workspace_admin" | "editor" | "viewer" | "auditor" | "service_agent";
2211
+ status?: "active" | "invited" | "revoked" | "expired";
2212
+ source?: "bootstrap" | "manual" | "sync" | "sso" | "api" | "scim" | "invitation";
2213
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2214
+ updateMembership(input: GatewayScope & {
2215
+ membershipId?: string;
2216
+ principalId: string;
2217
+ role: "platform_admin" | "tenant_admin" | "workspace_admin" | "editor" | "viewer" | "auditor" | "service_agent";
2218
+ status?: "active" | "invited" | "revoked" | "expired";
2219
+ source?: "bootstrap" | "manual" | "sync" | "sso" | "api" | "scim" | "invitation";
2220
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2221
+ upsertMembership(input: GatewayScope & {
2222
+ membershipId?: string;
2223
+ principalId: string;
2224
+ role: "platform_admin" | "tenant_admin" | "workspace_admin" | "editor" | "viewer" | "auditor" | "service_agent";
2225
+ status?: "active" | "invited" | "revoked" | "expired";
2226
+ source?: "bootstrap" | "manual" | "sync" | "sso" | "api" | "scim" | "invitation";
2227
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2228
+ listTenantApiKeys(scope: GatewayScope & {
2229
+ status?: "active" | "revoked" | "expired";
2230
+ }): Promise<{
2231
+ data: {
2232
+ keys: TenantApiKeyRecord[];
2233
+ };
2234
+ success: true;
2235
+ correlationId: string;
2236
+ policyTraceId: string | null;
2237
+ idempotentReplay: boolean;
2238
+ }>;
2239
+ createTenantApiKey(input: GatewayScope & {
2240
+ label?: string;
2241
+ scopes: string[];
2242
+ expiresAt?: number;
2243
+ }, idempotencyKey?: string): Promise<{
2244
+ data: {
2245
+ key: TenantApiKeyRecord | null;
2246
+ plaintextKey: string | undefined;
2247
+ };
2248
+ success: true;
2249
+ correlationId: string;
2250
+ policyTraceId: string | null;
2251
+ idempotentReplay: boolean;
2252
+ }>;
2253
+ revokeTenantApiKey(keyId: string, input?: GatewayScope & {
2254
+ reason?: string;
2255
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2256
+ listTenantVaultSecrets(scope: GatewayScope): Promise<{
2257
+ data: {
2258
+ secrets: TenantVaultSecretRecord[];
2259
+ };
2260
+ success: true;
2261
+ correlationId: string;
2262
+ policyTraceId: string | null;
2263
+ idempotentReplay: boolean;
2264
+ }>;
2265
+ createTenantVaultSecret(input: GatewayScope & {
2266
+ name: string;
2267
+ description?: string;
2268
+ value: string;
2269
+ }, idempotencyKey?: string): Promise<{
2270
+ data: {
2271
+ secret: TenantVaultSecretRecord | null;
2272
+ };
2273
+ success: true;
2274
+ correlationId: string;
2275
+ policyTraceId: string | null;
2276
+ idempotentReplay: boolean;
2277
+ }>;
2278
+ updateTenantVaultSecret(secretId: string, input: GatewayScope & {
2279
+ name: string;
2280
+ description?: string;
2281
+ value?: string;
2282
+ }, idempotencyKey?: string): Promise<{
2283
+ data: {
2284
+ secret: TenantVaultSecretRecord | null;
2285
+ };
2286
+ success: true;
2287
+ correlationId: string;
2288
+ policyTraceId: string | null;
2289
+ idempotentReplay: boolean;
2290
+ }>;
2291
+ deleteTenantVaultSecret(secretId: string, scope: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2292
+ listTenantSecrets(scope: GatewayScope & {
2293
+ providerId?: string;
2294
+ status?: "active" | "revoked";
2295
+ }): Promise<PlatformGatewaySuccess<unknown>>;
2296
+ upsertTenantSecret(input: GatewayScope & {
2297
+ providerId: string;
2298
+ apiKey: string;
2299
+ label?: string;
2300
+ modelSlotIds?: string[];
2301
+ passThroughOnly?: boolean;
2302
+ metadata?: JsonObject;
2303
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2304
+ revokeTenantSecret(secretRef: string, input: GatewayScope & {
2305
+ reason?: string;
2306
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2307
+ getTenantConfig(scope: GatewayScope & {
2308
+ tenantId: string;
2309
+ }): Promise<PlatformGatewaySuccess<TenantConfigRecord>>;
2310
+ getTenantModelRouting(scope: GatewayScope & {
2311
+ tenantId: string;
2312
+ }): Promise<PlatformGatewaySuccess<TenantModelRoutingSnapshot>>;
2313
+ upsertTenantConfig(input: GatewayScope & Omit<TenantConfigRecord, "updatedAt" | "updatedBy">, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TenantConfigRecord>>;
2314
+ listGroups(scope?: GatewayScope & {
2315
+ limit?: number;
2316
+ }): Promise<PlatformGatewaySuccess<unknown>>;
2317
+ createGroup(input: GatewayScope & {
2318
+ name: string;
2319
+ groupKey?: string;
2320
+ groupType?: string;
2321
+ description?: string;
2322
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2323
+ updateGroup(groupId: string, input: GatewayScope & {
2324
+ name?: string;
2325
+ description?: string;
2326
+ workspaceId?: string;
2327
+ clearWorkspaceId?: boolean;
2328
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2329
+ deleteGroup(groupId: string, input?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2330
+ listGroupMembers(query: GatewayScope & {
2331
+ groupId: string;
2332
+ }): Promise<PlatformGatewaySuccess<unknown>>;
2333
+ addGroupMember(input: GatewayScope & {
2334
+ groupId: string;
2335
+ principalId: string;
2336
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2337
+ removeGroupMember(input: GatewayScope & {
2338
+ groupId: string;
2339
+ principalId: string;
2340
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2341
+ listPackGroupAssignments(query?: GatewayScope & {
2342
+ groupId?: string;
2343
+ status?: string;
2344
+ }): Promise<PlatformGatewaySuccess<unknown>>;
2345
+ assignPackToGroup(input: GatewayScope & {
2346
+ groupId: string;
2347
+ packKey: string;
2348
+ packVersion?: string;
2349
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2350
+ removePackFromGroup(input: GatewayScope & {
2351
+ groupId: string;
2352
+ packKey: string;
2353
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2354
+ };
2355
+ identity: {
2356
+ whoami(): Promise<PlatformGatewaySuccess<{
2357
+ principalId: string;
2358
+ principalType: "human" | "service" | "agent" | "user" | "group" | "external_viewer";
2359
+ tenantId: string | null;
2360
+ workspaceId: string | null;
2361
+ scopes: string[];
2362
+ roles: string[];
2363
+ isPlatformAdmin: boolean;
2364
+ isTenantAdmin: boolean;
2365
+ isWorkspaceAdmin: boolean;
2366
+ authMode: string | undefined;
2367
+ sessionId: string | undefined;
2368
+ delegatedBy: string | undefined;
2369
+ expiresAt: number | undefined;
2370
+ }>>;
2371
+ listPrincipals(query?: GatewayScope & {
2372
+ status?: string;
2373
+ principalType?: string;
2374
+ query?: string;
2375
+ limit?: number;
2376
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "principals">>>;
2377
+ createPrincipal(input: GatewayScope & {
2378
+ principalId: string;
2379
+ principalType: "user" | "group" | "service" | "external_viewer";
2380
+ clerkId?: string;
2381
+ email?: string;
2382
+ displayName?: string;
2383
+ status?: "active" | "invited" | "suspended" | "disabled" | "revoked";
2384
+ metadata?: JsonObject;
2385
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2386
+ updatePrincipal(input: GatewayScope & {
2387
+ principalId: string;
2388
+ principalType: "user" | "group" | "service" | "external_viewer";
2389
+ clerkId?: string;
2390
+ email?: string;
2391
+ displayName?: string;
2392
+ status?: "active" | "invited" | "suspended" | "disabled" | "revoked";
2393
+ metadata?: JsonObject;
2394
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2395
+ upsertPrincipal(input: GatewayScope & {
2396
+ principalId: string;
2397
+ principalType: "user" | "group" | "service" | "external_viewer";
2398
+ clerkId?: string;
2399
+ email?: string;
2400
+ displayName?: string;
2401
+ status?: "active" | "invited" | "suspended" | "disabled" | "revoked";
2402
+ metadata?: JsonObject;
2403
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2404
+ listKeys(query?: GatewayScope & {
2405
+ principalId?: string;
2406
+ status?: string;
2407
+ limit?: number;
2408
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "keys">>>;
2409
+ createKey(input: GatewayScope & {
2410
+ principalId: string;
2411
+ keyId?: string;
2412
+ token?: string;
2413
+ scopes?: string[];
2414
+ environment?: "sandbox" | "production";
2415
+ expiresInDays?: number;
2416
+ rateLimitTier?: "free" | "developer" | "partner";
2417
+ metadata?: JsonObject;
2418
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2419
+ rotateKey(keyId: string, input?: {
2420
+ replacementKeyId?: string;
2421
+ replacementToken?: string;
2422
+ replacementExpiresInDays?: number;
2423
+ gracePeriodHours?: number;
2424
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2425
+ deleteKey(keyId: string, input?: {
2426
+ reason?: string;
2427
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2428
+ revokeKey(keyId: string, input?: {
2429
+ reason?: string;
2430
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2431
+ searchClerkUsers(q: string): Promise<PlatformGatewaySuccess<ClerkUserSearchResult[]>>;
2432
+ getTenantConfig(input: TenantIdentityScope): Promise<PlatformGatewaySuccess<TenantIdentityConfigRecord>>;
2433
+ updateTenantConfig(input: UpdateTenantConfigInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TenantIdentityConfigRecord>>;
2434
+ listIntegrations(input: TenantIdentityScope): Promise<PlatformGatewaySuccess<ListResult<TenantIntegrationRecord, "integrations">>>;
2435
+ upsertIntegration(input: UpsertTenantIntegrationInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TenantIntegrationRecord>>;
2436
+ listSecrets(input: TenantIdentityScope): Promise<PlatformGatewaySuccess<ListResult<TenantSecretReference, "secrets">>>;
2437
+ putSecretReference(input: PutTenantSecretReferenceInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TenantSecretReference>>;
2438
+ evaluatePolicy(input: PolicyEvaluationInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PolicyDecisionRecord>>;
2439
+ recordPolicyDecision(input: RecordPolicyDecisionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PolicyDecisionRecord>>;
2440
+ };
2441
+ policy: {
2442
+ listDecisions(query?: GatewayScope & {
2443
+ action?: string;
2444
+ decision?: string;
2445
+ traceId?: string;
2446
+ principalId?: string;
2447
+ topicId?: string;
2448
+ limit?: number;
2449
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "decisions">>>;
2450
+ grant(input: GatewayScope & {
2451
+ topicId: string;
2452
+ permission: PermissionKind;
2453
+ principal?: string;
2454
+ principalId?: string;
2455
+ groupId?: string;
2456
+ beliefClusterId?: string;
2457
+ expiresAt?: number;
2458
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2459
+ revoke(input: GatewayScope & {
2460
+ topicId: string;
2461
+ principal?: string;
2462
+ principalId?: string;
2463
+ groupId?: string;
2464
+ beliefClusterId?: string;
2465
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2466
+ listWritePolicies(query?: GatewayScope & {
2467
+ topicId?: string;
2468
+ role?: string;
2469
+ toolCategory?: string;
2470
+ enabled?: boolean;
2471
+ }): Promise<{
2472
+ data: {
2473
+ policies: WritePolicyRecord[];
2474
+ };
2475
+ success: true;
2476
+ correlationId: string;
2477
+ policyTraceId: string | null;
2478
+ idempotentReplay: boolean;
2479
+ }>;
2480
+ createWritePolicy(input: WritePolicyCreateInput, idempotencyKey?: string): Promise<{
2481
+ data: {
2482
+ id: string | undefined;
2483
+ created: boolean;
2484
+ policy: WritePolicyRecord | null;
2485
+ };
2486
+ success: true;
2487
+ correlationId: string;
2488
+ policyTraceId: string | null;
2489
+ idempotentReplay: boolean;
2490
+ }>;
2491
+ updateWritePolicy(id: string, input: WritePolicyUpdateInput, idempotencyKey?: string): Promise<{
2492
+ data: {
2493
+ id: string | undefined;
2494
+ updated: boolean;
2495
+ policy: WritePolicyRecord | null;
2496
+ };
2497
+ success: true;
2498
+ correlationId: string;
2499
+ policyTraceId: string | null;
2500
+ idempotentReplay: boolean;
2501
+ }>;
2502
+ deleteWritePolicy(id: string, scope?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
2503
+ id?: string;
2504
+ deleted?: boolean;
2505
+ }>>;
2506
+ listRolePolicies(query?: GatewayScope): Promise<{
2507
+ data: {
2508
+ policies: TenantPolicyRecord[];
2509
+ };
2510
+ success: true;
2511
+ correlationId: string;
2512
+ policyTraceId: string | null;
2513
+ idempotentReplay: boolean;
2514
+ }>;
2515
+ createRolePolicy(input: GatewayScope & {
2516
+ roleName: string;
2517
+ description?: string;
2518
+ permissions: TenantPolicyPermission[];
2519
+ groupBindings?: string[];
2520
+ }, idempotencyKey?: string): Promise<{
2521
+ data: {
2522
+ policy: TenantPolicyRecord | null;
2523
+ };
2524
+ success: true;
2525
+ correlationId: string;
2526
+ policyTraceId: string | null;
2527
+ idempotentReplay: boolean;
2528
+ }>;
2529
+ updateRolePolicy(id: string, input: GatewayScope & {
2530
+ roleName: string;
2531
+ description?: string;
2532
+ permissions: TenantPolicyPermission[];
2533
+ groupBindings?: string[];
2534
+ }, idempotencyKey?: string): Promise<{
2535
+ data: {
2536
+ policy: TenantPolicyRecord | null;
2537
+ };
2538
+ success: true;
2539
+ correlationId: string;
2540
+ policyTraceId: string | null;
2541
+ idempotentReplay: boolean;
2542
+ }>;
2543
+ deleteRolePolicy(id: string, scope?: GatewayScope, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2544
+ checkPermission(query: GatewayScope & {
2545
+ topicId?: string;
2546
+ permission?: PermissionKind;
2547
+ principal?: string;
2548
+ principalId?: string;
2549
+ beliefClusterId?: string;
2550
+ }): Promise<PlatformGatewaySuccess<PermissionDecision>>;
2551
+ listAccessibleTopics(query?: GatewayScope & {
2552
+ permission?: PermissionKind;
2553
+ includeShared?: boolean;
2554
+ principal?: string;
2555
+ principalId?: string;
2556
+ limit?: number;
2557
+ }): Promise<{
2558
+ data: {
2559
+ permission: PermissionKind;
2560
+ topics: {
2561
+ [key: string]: unknown;
2562
+ topicId?: string;
2563
+ name?: string;
2564
+ type?: string;
2565
+ isOwner?: boolean;
2566
+ }[];
2567
+ total: number;
2568
+ deniedTopics: {
2569
+ topicId: string;
2570
+ reasonCode: string;
2571
+ }[];
2572
+ };
2573
+ success: true;
2574
+ correlationId: string;
2575
+ policyTraceId: string | null;
2576
+ idempotentReplay: boolean;
2577
+ }>;
2578
+ filterByPermission(input: GatewayScope & {
2579
+ topicIds?: string[];
2580
+ permission?: PermissionKind;
2581
+ principal?: string;
2582
+ principalId?: string;
2583
+ }): Promise<{
2584
+ success: boolean;
2585
+ data: {
2586
+ permission: PermissionKind;
2587
+ allowedTopicIds: string[];
2588
+ deniedTopics: {
2589
+ topicId: string;
2590
+ reasonCode: string;
2591
+ }[];
2592
+ count: number;
2593
+ };
2594
+ }>;
2595
+ };
2596
+ answers: {
2597
+ get(questionId: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2598
+ };
2599
+ ontology: {
2600
+ list(filters?: GatewayScope & {
2601
+ tenantId?: string;
2602
+ tier?: string;
2603
+ status?: string;
2604
+ }): Promise<PlatformGatewaySuccess<{
2605
+ ontologies: any[];
2606
+ total: number;
2607
+ items: any[];
2608
+ definitions: any[];
2609
+ }>>;
2610
+ get(id: string): Promise<PlatformGatewaySuccess<unknown>>;
2611
+ bind(input: OntologyBindingInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2612
+ listDefinitions(filters?: GatewayScope & {
2613
+ tenantId?: string;
2614
+ tier?: string;
2615
+ status?: string;
2616
+ }): Promise<PlatformGatewaySuccess<{
2617
+ ontologies: any[];
2618
+ total: number;
2619
+ items: any[];
2620
+ definitions: any[];
2621
+ }>>;
2622
+ getDefinition(id: string): Promise<PlatformGatewaySuccess<unknown>>;
2623
+ createDefinition(input: OntologyDefinitionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2624
+ updateDefinition(id: string, input: OntologyDefinitionUpdateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2625
+ archiveDefinition(id: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2626
+ listVersions(ontologyId: string, filters?: GatewayScope & {
2627
+ status?: string;
2628
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "versions">>>;
2629
+ createVersion(ontologyId: string, input: OntologyVersionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2630
+ publishVersion(ontologyId: string, versionId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2631
+ deprecateVersion(ontologyId: string, versionId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2632
+ listTopics(ontologyId: string): Promise<PlatformGatewaySuccess<ListResult<any, "topics">>>;
2633
+ listTopicsByOntology(ontologyId: string): Promise<PlatformGatewaySuccess<ListResult<any, "topics">>>;
2634
+ };
2635
+ ontologyLinks: {
2636
+ createLink(input: OntologyLinkWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OntologyLinkRecord>>;
2637
+ upsertLink(input: OntologyLinkWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OntologyLinkRecord>>;
2638
+ listLinksForNode(input: ListOntologyLinksForNodeInput): Promise<PlatformGatewaySuccess<ListResult<OntologyLinkRecord, "links">>>;
2639
+ updateLinkStatus(input: UpdateOntologyLinkStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<OntologyLinkRecord>>;
2640
+ };
2641
+ orgGraphSearch: {
2642
+ search(input: OrgGraphSearchInput): Promise<PlatformGatewaySuccess<OrgGraphSearchResponse>>;
2643
+ getNode(input: GetOrgGraphNodeInput): Promise<PlatformGatewaySuccess<OrgGraphSearchResult>>;
2644
+ listByProvenance(input: ListOrgGraphByProvenanceInput): Promise<PlatformGatewaySuccess<OrgGraphSearchResponse>>;
2645
+ listPublishedFromWorkspace(input: ListPublishedFromWorkspaceInput): Promise<PlatformGatewaySuccess<OrgGraphSearchResponse>>;
2646
+ };
2647
+ functionSurface: {
2648
+ sessionId: string;
2649
+ activateWorktree(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2650
+ addEvidence(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2651
+ addWorktree(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2652
+ analyzeTopicDensity(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2653
+ answerQuestion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2654
+ applyAutoBranching(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2655
+ applyLensToTopic(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2656
+ applyOntology(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2657
+ archiveBelief(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2658
+ archiveOntology(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2659
+ archiveQuestion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2660
+ beginBuildSession(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2661
+ bisectConfidence(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2662
+ broadcastMessage(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2663
+ checkPermission(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2664
+ claimFiles(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2665
+ compileContext(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2666
+ completeTask(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2667
+ createAnswer(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2668
+ createBelief(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2669
+ createEdge(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2670
+ createEpistemicContract(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2671
+ createEvidence(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2672
+ createLens(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2673
+ createOntology(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2674
+ createOntologyVersion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2675
+ createQuestion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2676
+ createTask(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2677
+ createTopic(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2678
+ deprecateOntologyVersion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2679
+ detectConfirmationBias(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2680
+ discover(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2681
+ discoverEntityConnections(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2682
+ endSession(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2683
+ evaluateContract(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2684
+ filterByPermission(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2685
+ findContradictions(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2686
+ findMissingQuestions(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2687
+ flagContradiction(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2688
+ forkBelief(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2689
+ generateSessionHandoff(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2690
+ getAgentInbox(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2691
+ getAnswer(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2692
+ getAuditTrail(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2693
+ getBelief(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2694
+ getChangeHistory(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2695
+ getCodeContext(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2696
+ getConfidenceHistory(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2697
+ getContractStatus(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2698
+ getEvidence(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2699
+ getFailureLog(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2700
+ getFalsificationQuestions(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2701
+ getGraphGaps(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2702
+ getGraphNeighborhood(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2703
+ getGraphStructureAnalysis(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2704
+ getHighPriorityQuestions(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2705
+ getLatticeCoverage(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2706
+ getObservationContext(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2707
+ getOntology(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2708
+ getQuestion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2709
+ getTopic(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2710
+ getTopicCoverage(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2711
+ getTopicTree(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2712
+ heartbeatSession(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2713
+ whoami(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2714
+ ingestObservation(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2715
+ linkEvidence(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2716
+ linkEvidenceToBelief(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2717
+ linkEvidenceToQuestion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2718
+ listActiveSessions(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2719
+ listAllWorktrees(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2720
+ listBeliefs(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2721
+ listCampaigns(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2722
+ listEvidence(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2723
+ listGraphIntelligenceQueries(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2724
+ listLenses(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2725
+ listOntologies(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2726
+ listQuestions(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2727
+ listTasks(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2728
+ listTopics(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2729
+ listWorktrees(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2730
+ manageWritePolicy(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2731
+ matchEntityType(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2732
+ merge(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2733
+ modulateConfidence(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2734
+ openPullRequest(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2735
+ pipelineSnapshot(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2736
+ publishOntologyVersion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2737
+ push(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2738
+ queryLineage(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2739
+ recordAttempt(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2740
+ recordJudgment(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2741
+ recordScopeLearning(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2742
+ refineBelief(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2743
+ refineQuestion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2744
+ registerSession(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2745
+ removeLensFromTopic(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2746
+ resolveEffectiveOntology(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2747
+ runGraphIntelligenceQuery(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2748
+ searchBeliefs(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2749
+ searchEvidence(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2750
+ seedBeliefLattice(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2751
+ sendAgentMessage(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2752
+ traceEntityImpact(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2753
+ traverseGraph(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2754
+ triggerBeliefReview(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2755
+ updateOntology(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2756
+ updateQuestionStatus(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2757
+ updateTask(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2758
+ updateTopic(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2759
+ updateWorktreeMetadata(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2760
+ updateWorktreeTargets(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
2761
+ };
2762
+ toolRegistry: {
2763
+ listCatalog(input: ToolRegistryQuery): Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
2764
+ listExecutable(input: ToolRegistryQuery): Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
2765
+ listEffectiveTools(input: ToolRegistryQuery): Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
2766
+ upsertCoreTools(input: UpsertCoreToolsInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
2767
+ setPackToolsStatus(input: SetPackToolsStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ListResult<ToolCatalogEntry, "tools">>>;
2768
+ createAcl(input: CreateToolAclInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ToolAclRecord>>;
2769
+ deleteAcl(input: DeleteToolAclInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
2770
+ aclId: string;
2771
+ deleted: boolean;
2772
+ }>>;
2773
+ registerCustomTool(input: RegisterCustomToolInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ToolCatalogEntry>>;
2774
+ };
2775
+ modelRuntime: {
2776
+ listModels(input: ModelRuntimeScope): Promise<PlatformGatewaySuccess<ListResult<ModelRegistryRecord, "models">>>;
2777
+ getModel(input: ModelRuntimeScope & {
2778
+ modelId: string;
2779
+ }): Promise<PlatformGatewaySuccess<ModelRegistryRecord>>;
2780
+ listFunctionSlots(input: ModelRuntimeScope & {
2781
+ functionName?: string;
2782
+ }): Promise<PlatformGatewaySuccess<ListResult<ModelFunctionSlot, "slots">>>;
2783
+ resolveSlot(input: ResolveModelSlotInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ModelFunctionSlot>>;
2784
+ updateSlotConfig(input: UpdateModelSlotConfigInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<ModelFunctionSlot>>;
2785
+ };
2786
+ packs: {
2787
+ listCatalog(): Promise<PlatformGatewaySuccess<ListResult<any, "catalog">>>;
2788
+ getCatalog(): Promise<PlatformGatewaySuccess<ListResult<any, "catalog">>>;
2789
+ getDiscoveryCatalog(): Promise<PlatformGatewaySuccess<unknown>>;
2790
+ getDiscoveryDetail(packKey: string): Promise<PlatformGatewaySuccess<unknown>>;
2791
+ listStates(query?: GatewayScope): Promise<PlatformGatewaySuccess<ListResult<any, "states">>>;
2792
+ getStates(query?: GatewayScope): Promise<PlatformGatewaySuccess<ListResult<any, "states">>>;
2793
+ getHealth(packKey: string, query?: GatewayScope): Promise<PlatformGatewaySuccess<unknown>>;
2794
+ listTelemetry(query?: GatewayScope & {
2795
+ lookbackHours?: number;
2796
+ limit?: number;
2797
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "telemetry">>>;
2798
+ getTelemetry(query?: GatewayScope & {
2799
+ lookbackHours?: number;
2800
+ limit?: number;
2801
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "telemetry">>>;
2802
+ createEntitlement(input: PackEntitlementInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2803
+ updateEntitlement(input: PackEntitlementInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2804
+ upsertEntitlement(input: PackEntitlementInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2805
+ install(input: PackInstallInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2806
+ enable(input: PackEnableInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2807
+ disable(input: PackDisableInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2808
+ uninstall(input: PackUninstallInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2809
+ upgrade(input: PackUpgradeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2810
+ };
2811
+ reports: {
2812
+ listTemplates(args?: {
2813
+ slug?: string;
2814
+ }): Promise<PlatformGatewaySuccess<ReportTemplatesResponse>>;
2815
+ getTemplates(args?: {
2816
+ slug?: string;
2817
+ }): Promise<PlatformGatewaySuccess<ReportTemplatesResponse>>;
2818
+ listReports(input: TopicIdentifierInput, args?: {
2819
+ summary?: boolean;
2820
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "reports">>>;
2821
+ getReport(reportId: string): Promise<PlatformGatewaySuccess<ReportWithSectionsResponse>>;
2822
+ };
2823
+ learning: {
2824
+ listRecentExecutions(args?: {
2825
+ namespace?: string;
2826
+ topicId?: string;
2827
+ audienceMode?: string;
2828
+ success?: boolean;
2829
+ limit?: number;
2830
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<ListResult<any, "executions">>>;
2831
+ getRecentExecutions(args?: {
2832
+ namespace?: string;
2833
+ topicId?: string;
2834
+ audienceMode?: string;
2835
+ success?: boolean;
2836
+ limit?: number;
2837
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<ListResult<any, "executions">>>;
2838
+ getExecutionStats(args?: {
2839
+ namespace?: string;
2840
+ topicId?: string;
2841
+ audienceMode?: string;
2842
+ hours?: number;
2843
+ } & TopicIdentifierInput): Promise<PlatformGatewaySuccess<unknown>>;
2844
+ };
2845
+ mcp: {
2846
+ bootstrapSession(input?: McpBootstrapSessionInput): Promise<McpBootstrapSessionResponse>;
2847
+ checkWritePolicy(input: McpCheckWritePolicyInput): Promise<McpCheckWritePolicyResponse>;
2848
+ beginBuildSession(input: McpBeginBuildSessionInput): Promise<McpBeginBuildSessionResponse>;
2849
+ evaluateEngineeringContract(input: McpEvaluateEngineeringContractInput): Promise<McpContractEvaluationResponse>;
2850
+ evaluateResearchContract(input: McpEvaluateResearchContractInput): Promise<McpContractEvaluationResponse>;
2851
+ };
2852
+ jobs: {
2853
+ enqueue(input: EnqueueJobInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRecord>>;
2854
+ list(input: JobsScope): Promise<PlatformGatewaySuccess<ListResult<JobRecord, "jobs">>>;
2855
+ claim(input: ClaimJobInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRecord>>;
2856
+ updateStatus(input: UpdateJobStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRecord>>;
2857
+ retry(input: RetryJobInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRecord>>;
2858
+ recordRunStart(input: RecordJobRunStartInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRunRecord>>;
2859
+ recordRunFinish(input: RecordJobRunFinishInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<JobRunRecord>>;
2860
+ };
2861
+ telemetry: {
2862
+ logSystemEvent(input: LogSystemEventInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
2863
+ eventId?: string;
2864
+ recorded: boolean;
2865
+ }>>;
2866
+ logToolCallsBatch(input: LogToolCallsBatchInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
2867
+ recorded: number;
2868
+ }>>;
2869
+ recordEpistemicAudit(input: RecordEpistemicAuditInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
2870
+ auditId?: string;
2871
+ recorded: boolean;
2872
+ }>>;
2873
+ recordPolicyDecision(input: RecordTelemetryPolicyDecisionInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<{
2874
+ decisionId?: string;
2875
+ recorded: boolean;
2876
+ }>>;
2877
+ startRun(input: StartTelemetryRunInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TelemetryRunRecord>>;
2878
+ finishRun(input: FinishTelemetryRunInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TelemetryRunRecord>>;
2879
+ listRuns(input: TelemetryScope): Promise<PlatformGatewaySuccess<ListResult<TelemetryRunRecord, "runs">>>;
2880
+ };
2881
+ harness: {
2882
+ listAgentDefinitions(scope?: GatewayScope & {
2883
+ status?: string;
2884
+ limit?: number;
2885
+ cursor?: string;
2886
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "agents">>>;
2887
+ getAgentDefinition(agentId: string, scope?: GatewayScope): Promise<PlatformGatewaySuccess<unknown>>;
2888
+ createAgentDefinition(input: HarnessAgentWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2889
+ registerAgentDefinition(input: HarnessAgentWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2890
+ updateAgentDefinition(agentId: string, input: HarnessAgentWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2891
+ invokeManagedAgentDefinition(agentId: string, input: Omit<HarnessInvokeManagedAgentInput, "agentDefinitionId">, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2892
+ listAgentRuns(agentId: string, scope?: GatewayScope & {
2893
+ status?: string;
2894
+ limit?: number;
2895
+ cursor?: string;
2896
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "runs">>>;
2897
+ listRunsForAgent(agentId: string, scope?: GatewayScope & {
2898
+ status?: string;
2899
+ limit?: number;
2900
+ cursor?: string;
2901
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "runs">>>;
2902
+ listToolDefinitions(scope?: GatewayScope & {
2903
+ status?: string;
2904
+ limit?: number;
2905
+ cursor?: string;
2906
+ gateClassification?: string;
2907
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "tools">>>;
2908
+ getToolDefinition(toolId: string, scope?: GatewayScope): Promise<PlatformGatewaySuccess<unknown>>;
2909
+ createToolDefinition(input: HarnessToolWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2910
+ registerToolDefinition(input: HarnessToolWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2911
+ updateToolDefinition(toolId: string, input: HarnessToolWriteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2912
+ executeToolDefinition(toolId: string, input?: HarnessExecuteToolInput): Promise<PlatformGatewaySuccess<HarnessExecuteToolResult>>;
2913
+ listRunEntries(scope?: GatewayScope & {
2914
+ status?: string;
2915
+ limit?: number;
2916
+ cursor?: string;
2917
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "runs">>>;
2918
+ listRunLedgerEntries(scope?: GatewayScope & {
2919
+ status?: string;
2920
+ limit?: number;
2921
+ cursor?: string;
2922
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "runs">>>;
2923
+ startHarnessRun(input: HarnessStartRunInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2924
+ getRunLedgerEntry(runId: string): Promise<PlatformGatewaySuccess<unknown>>;
2925
+ reportHarnessRunEvent(runId: string, input: HarnessRunReportInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2926
+ heartbeatHarnessRun(runId: string, input: {
2927
+ reportingToken: string;
2928
+ }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2929
+ completeHarnessRun(runId: string, input: HarnessCompleteRunInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2930
+ listPromptResolutions(query?: {
2931
+ runId?: string;
2932
+ promptName?: string;
2933
+ limit?: number;
2934
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "prompts">>>;
2935
+ getScopeTaxonomy(): Promise<PlatformGatewaySuccess<unknown>>;
2936
+ };
2937
+ schema: {
2938
+ listPacks(scope?: GatewayScope): Promise<PlatformGatewaySuccess<ListResult<any, "packs">>>;
2939
+ installPack(input: SchemaPackInstallInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2940
+ getPack(packId: string, scope?: GatewayScope): Promise<PlatformGatewaySuccess<unknown>>;
2941
+ listEntitlements(scope?: GatewayScope & {
2942
+ packKey?: string;
2943
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "entitlements">>>;
2944
+ createEntitlement(input: SchemaEntitlementInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2945
+ updateEntitlement(input: SchemaEntitlementInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2946
+ upsertEntitlement(input: SchemaEntitlementInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2947
+ };
2948
+ audiences: {
2949
+ listRegistry(query?: GatewayScope & {
2950
+ effective?: boolean;
2951
+ status?: "active" | "disabled" | "archived";
2952
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "registryEntries">>>;
2953
+ getRegistry(query?: GatewayScope & {
2954
+ effective?: boolean;
2955
+ status?: "active" | "disabled" | "archived";
2956
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "registryEntries">>>;
2957
+ createRegistryEntry(input: AudienceRegistryInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2958
+ updateRegistryEntry(input: AudienceRegistryInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2959
+ upsertRegistry(input: AudienceRegistryInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2960
+ listGrants(query?: GatewayScope & {
2961
+ audienceKey?: string;
2962
+ principalId?: string;
2963
+ groupId?: string;
2964
+ status?: "active" | "revoked" | "expired";
2965
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "grants">>>;
2966
+ getGrants(query?: GatewayScope & {
2967
+ audienceKey?: string;
2968
+ principalId?: string;
2969
+ groupId?: string;
2970
+ status?: "active" | "revoked" | "expired";
2971
+ }): Promise<PlatformGatewaySuccess<ListResult<any, "grants">>>;
2972
+ createGrant(input: AudienceGrantInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2973
+ grant(input: AudienceGrantInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2974
+ deleteGrant(input: AudienceGrantRevokeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2975
+ revokeGrant(input: AudienceGrantRevokeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<unknown>>;
2976
+ };
2977
+ topics: {
2978
+ list(query?: TopicListInput): Promise<PlatformGatewaySuccess<TopicListResponse>>;
2979
+ get(topicId: string): Promise<PlatformGatewaySuccess<TopicRecord>>;
2980
+ create(input: TopicCreateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TopicRecord>>;
2981
+ update(topicId: string, input: TopicUpdateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<TopicRecord>>;
2982
+ getTree(topicId: string, query?: TopicTreeQuery): Promise<PlatformGatewaySuccess<TopicTreeResponse>>;
2983
+ getCoverage(topicId: string, query?: TopicCoverageQuery): Promise<PlatformGatewaySuccess<TopicCoverageResponse>>;
2984
+ remove(topicId: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2985
+ bulkCreate(input: TopicBulkCreateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
2986
+ };
2987
+ };
2988
+ };
2989
+
2990
+ export { type LucernClientConfig, createLucernClient };