@lucern/sdk 0.2.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -0
- package/dist/index.js +8980 -0
- package/dist/index.js.map +1 -0
- package/dist/lucern/contracts/src/auth-session.contract.d.ts +53 -0
- package/dist/lucern/contracts/src/context-pack.contract.d.ts +494 -0
- package/dist/lucern/contracts/src/lens-filter.contract.d.ts +70 -0
- package/dist/lucern/contracts/src/lens-workflow.contract.d.ts +84 -0
- package/dist/lucern/contracts/src/mcp-tools.contract.d.ts +151 -0
- package/dist/lucern/contracts/src/workflow-runtime.contract.d.ts +161 -0
- package/dist/lucern/mcp-server/src/context-pack-policy.d.ts +119 -0
- package/dist/lucern/mcp-server/src/context-pack-schema.d.ts +18 -0
- package/dist/lucern/modules/graph-primitives/src/ontology-matching.d.ts +78 -0
- package/dist/lucern/modules/graph-primitives/src/text-matching.d.ts +53 -0
- package/dist/lucern/packages/client-core/src/beliefs.d.ts +30 -0
- package/dist/lucern/packages/client-core/src/context.d.ts +29 -0
- package/dist/lucern/packages/client-core/src/contradictions.d.ts +11 -0
- package/dist/lucern/packages/client-core/src/edges.d.ts +11 -0
- package/dist/lucern/packages/client-core/src/events.d.ts +9 -0
- package/dist/lucern/packages/client-core/src/evidence.d.ts +21 -0
- package/dist/lucern/packages/client-core/src/graph.d.ts +17 -0
- package/dist/lucern/packages/client-core/src/identity.d.ts +7 -0
- package/dist/lucern/packages/client-core/src/ids.d.ts +7 -0
- package/dist/lucern/packages/client-core/src/ontologies.d.ts +13 -0
- package/dist/lucern/packages/client-core/src/questions.d.ts +39 -0
- package/dist/lucern/packages/client-core/src/search.d.ts +7 -0
- package/dist/lucern/packages/client-core/src/tasks.d.ts +13 -0
- package/dist/lucern/packages/client-core/src/topics.d.ts +17 -0
- package/dist/lucern/packages/client-core/src/webhooks.d.ts +35 -0
- package/dist/lucern/packages/client-core/src/worktrees.d.ts +17 -0
- package/dist/lucern/packages/domain-beliefs/src/beliefs.d.ts +283 -0
- package/dist/lucern/packages/domain-beliefs/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-context/src/compile.d.ts +11 -0
- package/dist/lucern/packages/domain-context/src/context-pack-compiler.d.ts +101 -0
- package/dist/lucern/packages/domain-context/src/index.d.ts +4 -0
- package/dist/lucern/packages/domain-context/src/ports.d.ts +58 -0
- package/dist/lucern/packages/domain-context/src/public-types.d.ts +1 -0
- package/dist/lucern/packages/domain-edges/src/contradictions.d.ts +59 -0
- package/dist/lucern/packages/domain-edges/src/edges.d.ts +91 -0
- package/dist/lucern/packages/domain-edges/src/index.d.ts +2 -0
- package/dist/lucern/packages/domain-evidence/src/evidence.d.ts +115 -0
- package/dist/lucern/packages/domain-evidence/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-graph/src/graph.d.ts +150 -0
- package/dist/lucern/packages/domain-identity/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-identity/src/whoami.d.ts +13 -0
- package/dist/lucern/packages/domain-ontologies/src/ontologies.d.ts +123 -0
- package/dist/lucern/packages/domain-questions/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-questions/src/questions.d.ts +147 -0
- package/dist/lucern/packages/domain-search/src/search.d.ts +97 -0
- package/dist/lucern/packages/domain-tasks/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-tasks/src/tasks.d.ts +102 -0
- package/dist/lucern/packages/domain-topics/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-topics/src/topics.d.ts +147 -0
- package/dist/lucern/packages/domain-worktrees/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-worktrees/src/worktrees.d.ts +185 -0
- package/dist/lucern/packages/events/src/index.d.ts +4 -0
- package/dist/lucern/packages/events/src/matching.d.ts +3 -0
- package/dist/lucern/packages/events/src/outbox.d.ts +15 -0
- package/dist/lucern/packages/events/src/types.d.ts +151 -0
- package/dist/lucern/packages/events/src/webhooks.d.ts +9 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/beliefs.d.ts +15 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/context.d.ts +12 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/contradictions.d.ts +7 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/edges.d.ts +7 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/events.d.ts +6 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/evidence.d.ts +21 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/graph.d.ts +10 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/identity.d.ts +5 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/ontologies.d.ts +8 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/questions.d.ts +39 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/search.d.ts +5 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/tasks.d.ts +8 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/topics.d.ts +10 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/webhooks.d.ts +16 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/worktrees.d.ts +10 -0
- package/dist/lucern/packages/sdk-typescript/src/index.d.ts +28 -0
- package/dist/packages/sdk/src/adminClient.d.ts +89 -0
- package/dist/packages/sdk/src/answersClient.d.ts +5 -0
- package/dist/packages/sdk/src/audiencesClient.d.ts +87 -0
- package/dist/packages/sdk/src/auditClient.d.ts +23 -0
- package/dist/packages/sdk/src/beliefsClient.d.ts +54 -0
- package/dist/packages/sdk/src/client.d.ts +1610 -0
- package/dist/packages/sdk/src/contextClient.d.ts +9 -0
- package/dist/packages/sdk/src/contracts/api-enums.contract.d.ts +58 -0
- package/dist/packages/sdk/src/controlObjectOwnership.d.ts +293 -0
- package/dist/packages/sdk/src/coreClient.d.ts +120 -0
- package/dist/packages/sdk/src/customTools.d.ts +65 -0
- package/dist/packages/sdk/src/decisionsClient.d.ts +110 -0
- package/dist/packages/sdk/src/graphClient.d.ts +209 -0
- package/dist/packages/sdk/src/harnessClient.d.ts +222 -0
- package/dist/packages/sdk/src/identityClient.d.ts +104 -0
- package/dist/packages/sdk/src/index.d.ts +28 -0
- package/dist/packages/sdk/src/learningClient.d.ts +43 -0
- package/dist/packages/sdk/src/mcpParityClient.d.ts +68 -0
- package/dist/packages/sdk/src/mcpParitySurface.d.ts +8 -0
- package/dist/packages/sdk/src/ontologyClient.d.ts +115 -0
- package/dist/packages/sdk/src/packsClient.d.ts +101 -0
- package/dist/packages/sdk/src/policyClient.d.ts +204 -0
- package/dist/packages/sdk/src/reportsClient.d.ts +31 -0
- package/dist/packages/sdk/src/schemaClient.d.ts +54 -0
- package/dist/packages/sdk/src/sdkSurface.d.ts +56 -0
- package/dist/packages/sdk/src/topicsClient.d.ts +45 -0
- package/dist/packages/sdk/src/types.d.ts +489 -0
- package/dist/packages/sdk/src/version.d.ts +2 -0
- package/dist/packages/sdk/src/workflowClient.d.ts +274 -0
- package/package.json +56 -0
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
import type { WorkflowAutoFixPolicy, WorkflowProofArtifact, WorkflowStaffingHint } from "@lucern/contracts/workflow-runtime.contract";
|
|
2
|
+
import type { DeprecatedBranchMetadata, LensPerspectiveType, LensPromptTemplateReference, LensStatus, LensTaskTemplate, LensWorkflowTemplate } from "@lucern/contracts/lens-workflow.contract";
|
|
3
|
+
export type JsonObject = {
|
|
4
|
+
[key: string]: JsonValue | undefined;
|
|
5
|
+
};
|
|
6
|
+
export type JsonArray = JsonValue[];
|
|
7
|
+
export type JsonValue = null | boolean | number | string | JsonArray | JsonObject;
|
|
8
|
+
/**
|
|
9
|
+
* Canonical scope identifiers for SDK inputs and records.
|
|
10
|
+
*/
|
|
11
|
+
export type TopicIdentifierInput = {
|
|
12
|
+
topicId?: string;
|
|
13
|
+
/** @deprecated Use topicId. */
|
|
14
|
+
projectId?: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Canonical text aliases for belief, question, and evidence payloads.
|
|
18
|
+
*/
|
|
19
|
+
export type TextAliasInput = {
|
|
20
|
+
text?: string;
|
|
21
|
+
/** @deprecated Use text. */
|
|
22
|
+
canonicalText?: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Standard list envelope returned by canonical SDK list methods.
|
|
26
|
+
*/
|
|
27
|
+
export type ListResult<T, LegacyKey extends string = never> = {
|
|
28
|
+
items: T[];
|
|
29
|
+
total: number;
|
|
30
|
+
} & {
|
|
31
|
+
[Key in LegacyKey]: T[];
|
|
32
|
+
};
|
|
33
|
+
export type PlatformBeliefRecord = {
|
|
34
|
+
nodeId: string;
|
|
35
|
+
globalId?: string;
|
|
36
|
+
text?: string;
|
|
37
|
+
canonicalText?: string;
|
|
38
|
+
formulation?: string;
|
|
39
|
+
status?: string;
|
|
40
|
+
confidence?: number | null;
|
|
41
|
+
topicId?: string;
|
|
42
|
+
projectId?: string;
|
|
43
|
+
title?: string;
|
|
44
|
+
subtype?: string;
|
|
45
|
+
domain?: string;
|
|
46
|
+
layer?: string;
|
|
47
|
+
sourceType?: string;
|
|
48
|
+
content?: string;
|
|
49
|
+
contentHash?: string;
|
|
50
|
+
tags?: string[];
|
|
51
|
+
verificationStatus?: string;
|
|
52
|
+
metadata?: JsonObject | null;
|
|
53
|
+
createdAt?: number;
|
|
54
|
+
updatedAt?: number;
|
|
55
|
+
createdBy?: string;
|
|
56
|
+
};
|
|
57
|
+
export type CreateBeliefResponse = PlatformBeliefRecord;
|
|
58
|
+
export type ModulateConfidenceResponse = {
|
|
59
|
+
nodeId: string;
|
|
60
|
+
newConfidence?: number;
|
|
61
|
+
previousConfidence?: number | null;
|
|
62
|
+
confidence?: number;
|
|
63
|
+
trigger?: string;
|
|
64
|
+
rationale?: string;
|
|
65
|
+
certainty?: number;
|
|
66
|
+
recordedAt?: number;
|
|
67
|
+
};
|
|
68
|
+
export interface ForkBeliefResponse extends PlatformBeliefRecord {
|
|
69
|
+
parentNodeId?: string;
|
|
70
|
+
forkReason?: string;
|
|
71
|
+
}
|
|
72
|
+
export type PlatformGraphNode = {
|
|
73
|
+
nodeId?: string;
|
|
74
|
+
globalId?: string;
|
|
75
|
+
nodeType?: string;
|
|
76
|
+
text?: string;
|
|
77
|
+
canonicalText?: string;
|
|
78
|
+
content?: string;
|
|
79
|
+
contentHash?: string;
|
|
80
|
+
title?: string;
|
|
81
|
+
subtype?: string;
|
|
82
|
+
status?: string;
|
|
83
|
+
confidence?: number | null;
|
|
84
|
+
topicId?: string;
|
|
85
|
+
projectId?: string;
|
|
86
|
+
sourceType?: string;
|
|
87
|
+
tags?: string[];
|
|
88
|
+
verificationStatus?: string;
|
|
89
|
+
metadata?: JsonObject | null;
|
|
90
|
+
createdAt?: number;
|
|
91
|
+
updatedAt?: number;
|
|
92
|
+
};
|
|
93
|
+
export type PlatformGraphEdge = {
|
|
94
|
+
edgeId?: string;
|
|
95
|
+
globalId?: string;
|
|
96
|
+
fromNodeId?: string;
|
|
97
|
+
toNodeId?: string;
|
|
98
|
+
fromGlobalId?: string;
|
|
99
|
+
toGlobalId?: string;
|
|
100
|
+
sourceGlobalId?: string;
|
|
101
|
+
targetGlobalId?: string;
|
|
102
|
+
edgeType?: string;
|
|
103
|
+
topicId?: string;
|
|
104
|
+
projectId?: string;
|
|
105
|
+
confidence?: number;
|
|
106
|
+
weight?: number;
|
|
107
|
+
context?: string;
|
|
108
|
+
derivationType?: string;
|
|
109
|
+
createdAt?: number;
|
|
110
|
+
updatedAt?: number;
|
|
111
|
+
};
|
|
112
|
+
export type QueryNodesResponse = PlatformGraphNode | PlatformGraphNode[] | null;
|
|
113
|
+
export type CreateNodeResponse = PlatformGraphNode;
|
|
114
|
+
export type UpdateNodeResponse = PlatformGraphNode;
|
|
115
|
+
export type QueryEdgesResponse = PlatformGraphEdge | PlatformGraphEdge[] | null;
|
|
116
|
+
export type CreateEdgeResponse = PlatformGraphEdge;
|
|
117
|
+
export type DeleteEdgeCountResponse = {
|
|
118
|
+
removed?: number;
|
|
119
|
+
deleted?: number;
|
|
120
|
+
};
|
|
121
|
+
export type DeleteEdgeResponse = PlatformGraphEdge | PlatformGraphEdge[] | DeleteEdgeCountResponse | null;
|
|
122
|
+
export type GraphNeighborhoodResponse = {
|
|
123
|
+
nodes?: PlatformGraphNode[];
|
|
124
|
+
edges?: PlatformGraphEdge[];
|
|
125
|
+
rootGlobalIds?: string[];
|
|
126
|
+
maxDepth?: number;
|
|
127
|
+
};
|
|
128
|
+
export type GraphPathResponse = {
|
|
129
|
+
fromGlobalId: string;
|
|
130
|
+
toGlobalId: string;
|
|
131
|
+
maxDepth: number;
|
|
132
|
+
directEdges: PlatformGraphEdge[];
|
|
133
|
+
connectedGraph: GraphNeighborhoodResponse;
|
|
134
|
+
};
|
|
135
|
+
export type GraphAnalyticsMetric = "graph_stats" | "contradiction_tension" | "confirmation_bias" | "reasoning_depth" | "knowledge_frontier";
|
|
136
|
+
export type GraphAnalyticsResponse<Metric extends GraphAnalyticsMetric = GraphAnalyticsMetric> = {
|
|
137
|
+
metric: Metric;
|
|
138
|
+
payload: JsonValue;
|
|
139
|
+
};
|
|
140
|
+
export type WorkflowBranchRecord = {
|
|
141
|
+
branchId?: string;
|
|
142
|
+
topicId?: string;
|
|
143
|
+
projectId?: string;
|
|
144
|
+
name?: string;
|
|
145
|
+
description?: string;
|
|
146
|
+
status?: string;
|
|
147
|
+
metadata?: JsonObject | null;
|
|
148
|
+
createdAt?: number;
|
|
149
|
+
updatedAt?: number;
|
|
150
|
+
createdBy?: string;
|
|
151
|
+
} & Partial<DeprecatedBranchMetadata>;
|
|
152
|
+
export type WorkflowWorktreeRecord = {
|
|
153
|
+
worktreeId?: string;
|
|
154
|
+
topicId?: string;
|
|
155
|
+
projectId?: string;
|
|
156
|
+
branchId?: string;
|
|
157
|
+
title?: string;
|
|
158
|
+
status?: string;
|
|
159
|
+
hypothesis?: string;
|
|
160
|
+
questionCount?: number;
|
|
161
|
+
taskCount?: number;
|
|
162
|
+
autoShapeApplied?: boolean;
|
|
163
|
+
frameworkSuggestions?: JsonValue[];
|
|
164
|
+
dependencySuggestions?: JsonValue[];
|
|
165
|
+
gate?: string;
|
|
166
|
+
track?: string;
|
|
167
|
+
trackPosition?: number;
|
|
168
|
+
executionBand?: number;
|
|
169
|
+
executionOrder?: number;
|
|
170
|
+
dependsOn?: string[];
|
|
171
|
+
blocks?: string[];
|
|
172
|
+
proofArtifacts?: WorkflowProofArtifact[];
|
|
173
|
+
staffingHint?: WorkflowStaffingHint | string;
|
|
174
|
+
lastReconciledAt?: number;
|
|
175
|
+
autoFixPolicy?: WorkflowAutoFixPolicy;
|
|
176
|
+
metadata?: JsonObject | null;
|
|
177
|
+
createdAt?: number;
|
|
178
|
+
updatedAt?: number;
|
|
179
|
+
createdBy?: string;
|
|
180
|
+
};
|
|
181
|
+
export type ListBranchesResponse = ListResult<WorkflowBranchRecord, "branches">;
|
|
182
|
+
export type CreateBranchResponse = WorkflowBranchRecord;
|
|
183
|
+
export type WorkflowLensRecord = {
|
|
184
|
+
lensId?: string;
|
|
185
|
+
workspaceId?: string;
|
|
186
|
+
topicId?: string;
|
|
187
|
+
projectId?: string;
|
|
188
|
+
name?: string;
|
|
189
|
+
description?: string;
|
|
190
|
+
perspectiveType?: LensPerspectiveType;
|
|
191
|
+
status?: LensStatus;
|
|
192
|
+
isAppliedToTopic?: boolean;
|
|
193
|
+
promptTemplates?: LensPromptTemplateReference[];
|
|
194
|
+
workflowTemplates?: LensWorkflowTemplate[];
|
|
195
|
+
taskTemplates?: LensTaskTemplate[];
|
|
196
|
+
filterCriteria?: JsonValue;
|
|
197
|
+
metadata?: JsonObject | null;
|
|
198
|
+
createdAt?: number;
|
|
199
|
+
updatedAt?: number;
|
|
200
|
+
createdBy?: string;
|
|
201
|
+
};
|
|
202
|
+
export type WorkflowLensBindingRecord = {
|
|
203
|
+
bindingId?: string;
|
|
204
|
+
lensId?: string;
|
|
205
|
+
workspaceId?: string;
|
|
206
|
+
topicId?: string;
|
|
207
|
+
projectId?: string;
|
|
208
|
+
status?: string;
|
|
209
|
+
appliedAt?: number;
|
|
210
|
+
removedAt?: number;
|
|
211
|
+
updatedAt?: number;
|
|
212
|
+
metadata?: JsonObject | null;
|
|
213
|
+
};
|
|
214
|
+
export type ListLensesResponse = ListResult<WorkflowLensRecord, "lenses">;
|
|
215
|
+
export type CreateLensResponse = WorkflowLensRecord;
|
|
216
|
+
export type LensTopicBindingResponse = WorkflowLensBindingRecord;
|
|
217
|
+
export type ListWorktreesResponse = ListResult<WorkflowWorktreeRecord, "worktrees"> & {
|
|
218
|
+
tracks?: Record<string, number>;
|
|
219
|
+
bands?: Record<string, number>;
|
|
220
|
+
};
|
|
221
|
+
export type AddWorktreeResponse = WorkflowWorktreeRecord;
|
|
222
|
+
export type MergeWorktreeResponse = {
|
|
223
|
+
worktreeId?: string;
|
|
224
|
+
status?: string;
|
|
225
|
+
outcome?: string;
|
|
226
|
+
beliefsScored?: number;
|
|
227
|
+
summary?: string;
|
|
228
|
+
mergedAt?: number;
|
|
229
|
+
};
|
|
230
|
+
export type OpenPullRequestResponse = {
|
|
231
|
+
pullRequestId?: string;
|
|
232
|
+
worktreeId?: string;
|
|
233
|
+
status?: string;
|
|
234
|
+
summary?: string;
|
|
235
|
+
reviewers?: string[];
|
|
236
|
+
createdAt?: number;
|
|
237
|
+
};
|
|
238
|
+
export type PushWorktreeResponse = {
|
|
239
|
+
pushId?: string;
|
|
240
|
+
pushedCount?: number;
|
|
241
|
+
targetContext?: string;
|
|
242
|
+
status?: string;
|
|
243
|
+
createdAt?: number;
|
|
244
|
+
};
|
|
245
|
+
export type WorkflowTopicRecord = {
|
|
246
|
+
topicId: string;
|
|
247
|
+
projectId?: string;
|
|
248
|
+
name: string;
|
|
249
|
+
type?: string;
|
|
250
|
+
isOwner?: boolean;
|
|
251
|
+
tenantId?: string;
|
|
252
|
+
workspaceId?: string;
|
|
253
|
+
};
|
|
254
|
+
export type ListTopicsResponse = ListResult<WorkflowTopicRecord, "topics">;
|
|
255
|
+
export type SwitchTopicContextResponse = {
|
|
256
|
+
topicId: string;
|
|
257
|
+
topicName: string;
|
|
258
|
+
switched: boolean;
|
|
259
|
+
briefing: JsonValue | null;
|
|
260
|
+
projectId?: string;
|
|
261
|
+
projectName?: string;
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* @deprecated Use WorkflowTopicRecord.
|
|
265
|
+
*/
|
|
266
|
+
export type WorkflowProjectRecord = WorkflowTopicRecord;
|
|
267
|
+
/**
|
|
268
|
+
* @deprecated Use ListTopicsResponse.
|
|
269
|
+
*/
|
|
270
|
+
export type ListProjectsResponse = ListTopicsResponse;
|
|
271
|
+
/**
|
|
272
|
+
* @deprecated Use SwitchTopicContextResponse.
|
|
273
|
+
*/
|
|
274
|
+
export type SwitchProjectContextResponse = SwitchTopicContextResponse;
|
|
275
|
+
export type TopicRecord = {
|
|
276
|
+
topicId?: string;
|
|
277
|
+
projectId?: string;
|
|
278
|
+
id?: string;
|
|
279
|
+
globalId?: string;
|
|
280
|
+
name?: string;
|
|
281
|
+
description?: string;
|
|
282
|
+
type?: string;
|
|
283
|
+
depth?: number;
|
|
284
|
+
status?: string;
|
|
285
|
+
parentTopicId?: string | null;
|
|
286
|
+
tenantId?: string;
|
|
287
|
+
workspaceId?: string;
|
|
288
|
+
visibility?: string;
|
|
289
|
+
createdAt?: number;
|
|
290
|
+
updatedAt?: number;
|
|
291
|
+
};
|
|
292
|
+
export type TopicListResponse = ListResult<TopicRecord, "topics">;
|
|
293
|
+
export type TopicTreeNode = TopicRecord & {
|
|
294
|
+
path?: string[];
|
|
295
|
+
};
|
|
296
|
+
export type TopicTreeResponse = {
|
|
297
|
+
tree: TopicTreeNode[];
|
|
298
|
+
};
|
|
299
|
+
export type TopicCoverageRecord = {
|
|
300
|
+
topicId: string;
|
|
301
|
+
name: string;
|
|
302
|
+
type: string;
|
|
303
|
+
depth: number;
|
|
304
|
+
beliefs: number;
|
|
305
|
+
questions: number;
|
|
306
|
+
evidence: number;
|
|
307
|
+
coverage: "full" | "partial" | "empty";
|
|
308
|
+
};
|
|
309
|
+
export type TopicCoverageSummary = {
|
|
310
|
+
totalTopics: number;
|
|
311
|
+
coveredTopics: number;
|
|
312
|
+
emptyTopics: number;
|
|
313
|
+
coveragePercent: number;
|
|
314
|
+
totalBeliefs: number;
|
|
315
|
+
totalQuestions: number;
|
|
316
|
+
totalEvidence: number;
|
|
317
|
+
};
|
|
318
|
+
export type TopicCoverageResponse = {
|
|
319
|
+
topics: TopicCoverageRecord[];
|
|
320
|
+
summary: TopicCoverageSummary;
|
|
321
|
+
scopeTopicId?: string | null;
|
|
322
|
+
};
|
|
323
|
+
export type CreateTaskResponse = {
|
|
324
|
+
taskId: string;
|
|
325
|
+
status: string;
|
|
326
|
+
createdAt: number;
|
|
327
|
+
linkedWorktreeId?: string;
|
|
328
|
+
linkedQuestionId?: string;
|
|
329
|
+
linkedBeliefId?: string;
|
|
330
|
+
};
|
|
331
|
+
export type CompleteTaskResponse = {
|
|
332
|
+
taskId: string;
|
|
333
|
+
completedAt: number;
|
|
334
|
+
outputSummary: string;
|
|
335
|
+
status?: string;
|
|
336
|
+
};
|
|
337
|
+
export type UpdateTaskResponse = {
|
|
338
|
+
taskId: string;
|
|
339
|
+
updatedAt: number;
|
|
340
|
+
status?: string;
|
|
341
|
+
title?: string;
|
|
342
|
+
};
|
|
343
|
+
export type JudgmentRecord = {
|
|
344
|
+
_id?: string;
|
|
345
|
+
judgmentId?: string;
|
|
346
|
+
globalId?: string;
|
|
347
|
+
summary?: string;
|
|
348
|
+
title?: string;
|
|
349
|
+
rationale?: string;
|
|
350
|
+
decisionType?: string;
|
|
351
|
+
judgmentType?: string;
|
|
352
|
+
decisionConfidence?: number;
|
|
353
|
+
confidence?: number;
|
|
354
|
+
outcome?: string;
|
|
355
|
+
status?: string;
|
|
356
|
+
topicId?: string;
|
|
357
|
+
projectId?: string;
|
|
358
|
+
createdAt?: number;
|
|
359
|
+
updatedAt?: number;
|
|
360
|
+
dealId?: string;
|
|
361
|
+
companyId?: string;
|
|
362
|
+
amount?: number;
|
|
363
|
+
valuation?: number;
|
|
364
|
+
terms?: string;
|
|
365
|
+
keyUncertainties?: string[];
|
|
366
|
+
alternativesConsidered?: string[];
|
|
367
|
+
decisionMakers?: string[];
|
|
368
|
+
themeIds?: string[];
|
|
369
|
+
};
|
|
370
|
+
export type ListJudgmentsResponse = ListResult<JudgmentRecord, "judgments">;
|
|
371
|
+
export type GetJudgmentResponse = JudgmentRecord | null;
|
|
372
|
+
export type RecordJudgmentResponse = {
|
|
373
|
+
nodeId?: string;
|
|
374
|
+
judgmentId?: string;
|
|
375
|
+
globalId?: string;
|
|
376
|
+
status?: string;
|
|
377
|
+
createdAt?: number;
|
|
378
|
+
knowledgeHorizon?: {
|
|
379
|
+
beliefCount?: number;
|
|
380
|
+
openQuestionCount?: number;
|
|
381
|
+
contradictionCount?: number;
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
export type RecordJudgmentOutcomeResponse = {
|
|
385
|
+
success?: boolean;
|
|
386
|
+
judgmentId?: string;
|
|
387
|
+
outcome?: string;
|
|
388
|
+
updatedAt?: number;
|
|
389
|
+
};
|
|
390
|
+
export type JudgmentReadinessResponse = {
|
|
391
|
+
ready?: boolean;
|
|
392
|
+
beliefCount?: number;
|
|
393
|
+
questionCoverage?: number;
|
|
394
|
+
avgConfidence?: number;
|
|
395
|
+
evidencePerBelief?: number;
|
|
396
|
+
unresolvedContradictions?: number;
|
|
397
|
+
blockers?: string[];
|
|
398
|
+
recommendation?: string;
|
|
399
|
+
};
|
|
400
|
+
export type JudgmentCalibrationBucket = {
|
|
401
|
+
total?: number;
|
|
402
|
+
successful?: number;
|
|
403
|
+
};
|
|
404
|
+
export type JudgmentCalibrationResponse = {
|
|
405
|
+
totalDecisions?: number;
|
|
406
|
+
decisionsWithOutcomes?: number;
|
|
407
|
+
calibration?: {
|
|
408
|
+
calibrationScore?: number;
|
|
409
|
+
overconfident?: boolean;
|
|
410
|
+
underconfident?: boolean;
|
|
411
|
+
} | null;
|
|
412
|
+
byType?: Record<string, JudgmentCalibrationBucket>;
|
|
413
|
+
};
|
|
414
|
+
export type PendingJudgmentOutcomeRecord = {
|
|
415
|
+
_id?: string;
|
|
416
|
+
globalId?: string;
|
|
417
|
+
summary?: string;
|
|
418
|
+
title?: string;
|
|
419
|
+
decisionType?: string;
|
|
420
|
+
decisionConfidence?: number | null;
|
|
421
|
+
decisionDate?: number;
|
|
422
|
+
dealId?: string;
|
|
423
|
+
companyId?: string;
|
|
424
|
+
outcome?: string;
|
|
425
|
+
status?: string;
|
|
426
|
+
};
|
|
427
|
+
export type PendingJudgmentOutcomeReviewResponse = ListResult<PendingJudgmentOutcomeRecord, "reviews">;
|
|
428
|
+
export type JudgmentTransitionAuditIntegrityIssue = {
|
|
429
|
+
code?: string;
|
|
430
|
+
severity?: "error" | "warning" | string;
|
|
431
|
+
message?: string;
|
|
432
|
+
};
|
|
433
|
+
export type JudgmentTransitionAuditIntegrityCheck = {
|
|
434
|
+
decisionNodeId?: string;
|
|
435
|
+
globalId?: string;
|
|
436
|
+
status?: string;
|
|
437
|
+
outcome?: string;
|
|
438
|
+
auditEventCount?: number;
|
|
439
|
+
issues?: JudgmentTransitionAuditIntegrityIssue[];
|
|
440
|
+
};
|
|
441
|
+
export type JudgmentTransitionAuditIntegrityResponse = {
|
|
442
|
+
topicId?: string;
|
|
443
|
+
projectId?: string;
|
|
444
|
+
checkedDecisionCount?: number;
|
|
445
|
+
failingDecisionCount?: number;
|
|
446
|
+
passed?: boolean;
|
|
447
|
+
issueTypeBreakdown?: Record<string, number>;
|
|
448
|
+
checks?: JudgmentTransitionAuditIntegrityCheck[];
|
|
449
|
+
};
|
|
450
|
+
export type ReportTemplateRecord = {
|
|
451
|
+
templateId?: string;
|
|
452
|
+
slug?: string;
|
|
453
|
+
name?: string;
|
|
454
|
+
version?: string;
|
|
455
|
+
description?: string;
|
|
456
|
+
status?: string;
|
|
457
|
+
};
|
|
458
|
+
export type ReportTemplatesResponse = ListResult<ReportTemplateRecord, "templates"> | ReportTemplateRecord | null;
|
|
459
|
+
export type ProjectReportRecord = {
|
|
460
|
+
reportId?: string;
|
|
461
|
+
topicId?: string;
|
|
462
|
+
projectId?: string;
|
|
463
|
+
title?: string;
|
|
464
|
+
status?: string;
|
|
465
|
+
slug?: string;
|
|
466
|
+
summary?: string;
|
|
467
|
+
createdAt?: number;
|
|
468
|
+
updatedAt?: number;
|
|
469
|
+
};
|
|
470
|
+
export type ProjectReportsResponse = ListResult<ProjectReportRecord, "reports">;
|
|
471
|
+
export type ReportSectionRecord = {
|
|
472
|
+
sectionId?: string;
|
|
473
|
+
slug?: string;
|
|
474
|
+
title?: string;
|
|
475
|
+
heading?: string;
|
|
476
|
+
body?: string;
|
|
477
|
+
content?: string;
|
|
478
|
+
order?: number;
|
|
479
|
+
metadata?: JsonObject | null;
|
|
480
|
+
};
|
|
481
|
+
export type ReportWithSectionsResponse = {
|
|
482
|
+
reportId?: string;
|
|
483
|
+
topicId?: string;
|
|
484
|
+
projectId?: string;
|
|
485
|
+
title?: string;
|
|
486
|
+
status?: string;
|
|
487
|
+
summary?: string;
|
|
488
|
+
sections?: ReportSectionRecord[];
|
|
489
|
+
};
|