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

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