@lucern/sdk 0.2.0-alpha.9 → 0.3.0-alpha.1

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