@lucern/sdk 1.0.29 → 1.0.31
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/CHANGELOG.md +12 -0
- package/dist/accessControl.d.ts +31 -31
- package/dist/accessControl.js +1 -0
- package/dist/adminClient.d.ts +74 -74
- package/dist/adminClient.js +38 -30
- package/dist/{answersClient.d.ts → answers-client.d.ts} +1 -1
- package/dist/{answersClient.js → answers-client.js} +2 -2
- package/dist/audience/index.d.ts +12 -12
- package/dist/{audiencesClient.d.ts → audiences-client.d.ts} +1 -1
- package/dist/audiences-client.js +107 -0
- package/dist/{auditClient.d.ts → audit-client.d.ts} +2 -3
- package/dist/{auditClient.js → audit-client.js} +8 -7
- package/dist/authContext.d.ts +26 -26
- package/dist/authDeviceClient.d.ts +11 -11
- package/dist/authDeviceClient.js +4 -6
- package/dist/beliefs/index.d.ts +56 -28
- package/dist/beliefs/index.js +2 -1
- package/dist/beliefsClient.d.ts +71 -63
- package/dist/beliefsClient.js +90 -67
- package/dist/{boundaryClientSurface.d.ts → boundary-client-surface.d.ts} +4 -4
- package/dist/{boundaryClientSurface.js → boundary-client-surface.js} +9 -7
- package/dist/client-assembly-types.d.ts +219 -0
- package/dist/client-assembly-types.js +2 -0
- package/dist/{clientConfig.d.ts → client-config.d.ts} +16 -32
- package/dist/client-config.js +2 -0
- package/dist/{clientEvidenceCompat.d.ts → client-evidence-compat.d.ts} +24 -24
- package/dist/{clientEvidenceCompat.js → client-evidence-compat.js} +2 -2
- package/dist/client.d.ts +1906 -352
- package/dist/client.js +34 -30
- package/dist/clientGraphNamespaces.d.ts +35 -25
- package/dist/clientGraphNamespaces.js +11 -5
- package/dist/clientHelpers.js +8 -5
- package/dist/clientKnowledgeNamespaces.d.ts +124 -84
- package/dist/clientKnowledgeNamespaces.js +35 -34
- package/dist/clientLocalHelpers.d.ts +81 -52
- package/dist/clientLocalHelpers.js +193 -43
- package/dist/clientPlatformNamespaces.d.ts +1541 -150
- package/dist/clientPlatformNamespaces.js +10 -5
- package/dist/clientRuntime.d.ts +1 -1
- package/dist/clientRuntime.js +1 -1
- package/dist/clientWorkflowNamespaces.d.ts +211 -97
- package/dist/clientWorkflowNamespaces.js +22 -19
- package/dist/contextClient.d.ts +2 -2
- package/dist/contextClient.js +79 -50
- package/dist/contextFacade.d.ts +1 -1
- package/dist/contextFacade.js +2 -0
- package/dist/contextPackCompiler.d.ts +52 -52
- package/dist/contextPackCompiler.js +192 -122
- package/dist/contextPackPolicy.d.ts +22 -22
- package/dist/contextPackPolicy.js +21 -9
- package/dist/contextPackSchema.d.ts +3 -3
- package/dist/contextPackSchema.js +1 -0
- package/dist/contextTypes.d.ts +155 -155
- package/dist/contracts/api-enums.contract.js +2 -11
- package/dist/contracts/auth-session.contract.d.ts +16 -16
- package/dist/contracts/auth-session.contract.js +3 -2
- package/dist/contracts/context-pack.contract.d.ts +216 -216
- package/dist/contracts/contextPack.js +2 -0
- package/dist/contracts/index.d.ts +1 -1
- package/dist/contracts/index.js +2 -1
- package/dist/contracts/lens-filter.contract.d.ts +8 -8
- package/dist/contracts/lens-filter.contract.js +10 -10
- package/dist/contracts/lens-workflow.contract.d.ts +32 -32
- package/dist/contracts/lens-workflow.contract.js +2 -1
- package/dist/contracts/lensFilter.js +2 -0
- package/dist/contracts/lensWorkflow.js +2 -0
- package/dist/contracts/mcpTools.d.ts +19 -19
- package/dist/contracts/mcpTools.js +3 -1
- package/dist/contracts/prompt.contract.d.ts +12 -12
- package/dist/contracts/prompt.js +1 -0
- package/dist/contracts/sdk-tools.contract.js +1 -0
- package/dist/contracts/sdkTools.js +2 -0
- package/dist/contracts/tool-contracts.js +1 -0
- package/dist/contracts/workflow-runtime.contract.d.ts +45 -45
- package/dist/contracts/workflow-runtime.contract.js +1 -5
- package/dist/contracts/workflowRuntime.js +2 -0
- package/dist/contradictions/index.d.ts +8 -8
- package/dist/contradictions/index.js +1 -0
- package/dist/control-plane.d.ts +10 -10
- package/dist/control-plane.js +2 -2
- package/dist/controlObjectOwnership.d.ts +11 -11
- package/dist/controlObjectOwnership.js +1 -0
- package/dist/coreClient.d.ts +51 -51
- package/dist/coreClient.js +269 -101
- package/dist/customTools.d.ts +19 -19
- package/dist/customTools.js +4 -2
- package/dist/decisions/index.d.ts +18 -18
- package/dist/decisions/index.js +1 -0
- package/dist/decisionsClient.d.ts +4 -4
- package/dist/decisionsClient.js +36 -27
- package/dist/edges/index.d.ts +20 -18
- package/dist/edges/index.js +1 -0
- package/dist/embeddingsClient.d.ts +29 -29
- package/dist/embeddingsClient.js +15 -8
- package/dist/eventingClient.d.ts +27 -27
- package/dist/eventingClient.js +10 -5
- package/dist/events.d.ts +83 -83
- package/dist/events.js +19 -15
- package/dist/eventsCore.d.ts +7 -7
- package/dist/eventsCore.js +11 -10
- package/dist/evidence/index.d.ts +23 -21
- package/dist/evidence/index.js +1 -0
- package/dist/evidenceClient.d.ts +23 -23
- package/dist/evidenceClient.js +10 -6
- package/dist/facade/context.d.ts +9 -9
- package/dist/facade/context.js +67 -41
- package/dist/functionSurface.js +2 -0
- package/dist/functionSurfaceClient.js +2 -0
- package/dist/gatewayFacades.d.ts +215 -215
- package/dist/gatewayFacades.factories.d.ts +23 -44
- package/dist/gatewayFacades.factories.js +63 -62
- package/dist/gatewayFacades.js +31 -32
- package/dist/graphAnalysisClient.d.ts +60 -60
- package/dist/graphAnalysisClient.js +19 -18
- package/dist/graphClient.d.ts +34 -34
- package/dist/graphClient.js +56 -35
- package/dist/graphIntel.js +2 -0
- package/dist/graphIntelligence.d.ts +2 -2
- package/dist/graphIntelligence.js +1 -1
- package/dist/graphRecommendationsClient.d.ts +24 -24
- package/dist/graphRecommendationsClient.js +12 -7
- package/dist/graphStateClassifierClient.d.ts +13 -13
- package/dist/graphStateClassifierClient.js +10 -5
- package/dist/harnessClient.d.ts +61 -61
- package/dist/harnessClient.js +44 -31
- package/dist/identityClient.d.ts +33 -59
- package/dist/identityClient.js +126 -98
- package/dist/index.d.ts +20 -20
- package/dist/index.js +20 -19
- package/dist/infisicalRuntime.d.ts +11 -11
- package/dist/infisicalRuntime.js +20 -14
- package/dist/jobsClient.d.ts +28 -28
- package/dist/jobsClient.js +6 -3
- package/dist/learningClient.js +13 -8
- package/dist/lenses/index.d.ts +124 -28
- package/dist/lenses/index.js +1 -0
- package/dist/mcpClient.d.ts +1 -1
- package/dist/mcpClient.js +3 -3
- package/dist/modelRuntimeClient.d.ts +27 -27
- package/dist/modelRuntimeClient.js +10 -5
- package/dist/nodes/index.d.ts +9 -9
- package/dist/nodes/index.js +1 -0
- package/dist/ontologies/index.d.ts +68 -22
- package/dist/ontologies/index.js +1 -0
- package/dist/ontologyClient.js +24 -17
- package/dist/ontologyLinksClient.d.ts +35 -35
- package/dist/ontologyLinksClient.js +9 -6
- package/dist/opinion.d.ts +3 -3
- package/dist/opinion.js +12 -5
- package/dist/orgGraphSearchClient.d.ts +39 -39
- package/dist/orgGraphSearchClient.js +22 -13
- package/dist/packsClient.d.ts +1 -1
- package/dist/packsClient.js +28 -19
- package/dist/policyClient.d.ts +79 -68
- package/dist/policyClient.js +18 -12
- package/dist/proof-attestation.json +1 -1
- package/dist/questions/index.d.ts +38 -27
- package/dist/questions/index.js +1 -0
- package/dist/realtime/index.d.ts +3 -3
- package/dist/realtime/index.js +1 -0
- package/dist/realtime/refs.d.ts +2 -2
- package/dist/{reportsClient.d.ts → reports-client.d.ts} +2 -2
- package/dist/{reportsClient.js → reports-client.js} +19 -13
- package/dist/{schemaClient.d.ts → schema-client.d.ts} +2 -3
- package/dist/{schemaClient.js → schema-client.js} +14 -11
- package/dist/sdkSurface.d.ts +12 -12
- package/dist/sdkSurface.js +14 -10
- package/dist/secrets.d.ts +1 -1
- package/dist/secrets.js +2 -1
- package/dist/{sourcesClient.d.ts → sources-client.d.ts} +8 -9
- package/dist/{sourcesClient.js → sources-client.js} +4 -5
- package/dist/{telemetryClient.d.ts → telemetry-client.d.ts} +14 -14
- package/dist/{telemetryClient.js → telemetry-client.js} +6 -4
- package/dist/toolRegistryClient.d.ts +46 -46
- package/dist/toolRegistryClient.js +22 -11
- package/dist/topics/index.d.ts +23 -23
- package/dist/topics/index.js +2 -1
- package/dist/topicsClient.d.ts +6 -6
- package/dist/topicsClient.js +29 -18
- package/dist/types.d.ts +356 -355
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/workflowClient.d.ts +36 -35
- package/dist/workflowClient.js +88 -60
- package/dist/worktrees/index.d.ts +118 -32
- package/dist/worktrees/index.js +2 -1
- package/package.json +45 -5
- package/dist/audiencesClient.js +0 -115
- package/dist/clientAssemblyTypes.d.ts +0 -33
- package/dist/clientAssemblyTypes.js +0 -2
- package/dist/clientConfig.js +0 -2
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import type { DeprecatedBranchMetadata, LensPerspectiveType, LensPromptTemplateReference, LensQuestionTemplate, LensStatus, LensTaskTemplate, LensWorkflowTemplate } from "./contracts/lensWorkflow";
|
|
1
2
|
import type { WorkflowAutoFixPolicy, WorkflowProofArtifact, WorkflowStaffingHint } from "./contracts/workflowRuntime";
|
|
2
|
-
import type { DeprecatedBranchMetadata, LensPerspectiveType, LensPromptTemplateReference, LensStatus, LensTaskTemplate, LensWorkflowTemplate } from "./contracts/lensWorkflow";
|
|
3
3
|
/** JSON-safe object whose values are recursively JSON-serializable. */
|
|
4
|
-
export
|
|
4
|
+
export interface JsonObject {
|
|
5
5
|
[key: string]: JsonValue | undefined;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
/** JSON-safe array whose elements are recursively JSON-serializable. */
|
|
8
8
|
export type JsonArray = JsonValue[];
|
|
9
9
|
/**
|
|
@@ -16,7 +16,7 @@ export type JsonValue = null | boolean | number | string | JsonArray | JsonObjec
|
|
|
16
16
|
/**
|
|
17
17
|
* Canonical scope identifiers for SDK inputs and records.
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export interface TopicIdentifierInput {
|
|
20
20
|
/**
|
|
21
21
|
* Preferred write anchor for belief creation: the UUIDv7 globalId of a topic
|
|
22
22
|
* epistemicNode. `topicId` remains a read/query scope for non-belief-write
|
|
@@ -24,15 +24,15 @@ export type TopicIdentifierInput = {
|
|
|
24
24
|
*/
|
|
25
25
|
topicGlobalId?: string;
|
|
26
26
|
topicId?: string;
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
28
|
/**
|
|
29
29
|
* Canonical text aliases for belief, question, and evidence payloads.
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
32
|
-
text?: string;
|
|
31
|
+
export interface TextAliasInput {
|
|
33
32
|
/** @deprecated Use text. */
|
|
34
33
|
canonicalText?: string;
|
|
35
|
-
|
|
34
|
+
text?: string;
|
|
35
|
+
}
|
|
36
36
|
/**
|
|
37
37
|
* Standard list envelope returned by canonical SDK list methods.
|
|
38
38
|
*/
|
|
@@ -49,39 +49,39 @@ export type ListResult<T, LegacyKey extends string = never> = {
|
|
|
49
49
|
* the knowledge-as-code lifecycle: assumption -> hypothesis -> active -> resolved/superseded.
|
|
50
50
|
* Confidence is derived from supporting or contradicting evidence through SL scoring, never set by callers.
|
|
51
51
|
*/
|
|
52
|
-
export
|
|
53
|
-
nodeId: string;
|
|
54
|
-
globalId?: string;
|
|
55
|
-
text?: string;
|
|
56
|
-
canonicalText?: string;
|
|
57
|
-
formulation?: string;
|
|
58
|
-
status?: string;
|
|
52
|
+
export interface PlatformBeliefRecord {
|
|
59
53
|
beliefStatus?: string;
|
|
60
|
-
|
|
54
|
+
canonicalText?: string;
|
|
61
55
|
confidence?: number | null;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
content?: string;
|
|
57
|
+
contentHash?: string;
|
|
58
|
+
createdAt?: number;
|
|
59
|
+
createdBy?: string;
|
|
66
60
|
domain?: string;
|
|
61
|
+
epistemicStatus?: string;
|
|
62
|
+
formulation?: string;
|
|
63
|
+
globalId?: string;
|
|
67
64
|
layer?: string;
|
|
65
|
+
metadata?: JsonObject | null;
|
|
66
|
+
nodeId: string;
|
|
68
67
|
sourceType?: string;
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
status?: string;
|
|
69
|
+
subtype?: string;
|
|
71
70
|
tags?: string[];
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
text?: string;
|
|
72
|
+
title?: string;
|
|
73
|
+
topicGlobalId?: string;
|
|
74
|
+
topicId?: string;
|
|
75
75
|
updatedAt?: number;
|
|
76
|
-
|
|
77
|
-
}
|
|
76
|
+
verificationStatus?: string;
|
|
77
|
+
}
|
|
78
78
|
/** Response returned after creating a new belief node. */
|
|
79
79
|
export type CreateBeliefResponse = PlatformBeliefRecord;
|
|
80
80
|
/** Response returned after forking an evidence-bearing belief into a new formulation. */
|
|
81
81
|
export interface ForkBeliefResponse extends PlatformBeliefRecord {
|
|
82
|
-
parentNodeId?: string;
|
|
83
|
-
forkReason?: string;
|
|
84
82
|
forkMode?: "supersede" | "branch";
|
|
83
|
+
forkReason?: string;
|
|
84
|
+
parentNodeId?: string;
|
|
85
85
|
triggeringEvidenceId?: string;
|
|
86
86
|
triggeringEvidenceRelation?: "supports" | "contradicts";
|
|
87
87
|
}
|
|
@@ -92,28 +92,28 @@ export interface ForkBeliefResponse extends PlatformBeliefRecord {
|
|
|
92
92
|
* The `nodeType` field discriminates the layer; `confidence` is meaningful only
|
|
93
93
|
* for belief-typed nodes.
|
|
94
94
|
*/
|
|
95
|
-
export
|
|
96
|
-
|
|
97
|
-
globalId?: string;
|
|
98
|
-
nodeType?: string;
|
|
99
|
-
text?: string;
|
|
95
|
+
export interface PlatformGraphNode {
|
|
96
|
+
beliefStatus?: string;
|
|
100
97
|
canonicalText?: string;
|
|
98
|
+
confidence?: number | null;
|
|
101
99
|
content?: string;
|
|
102
100
|
contentHash?: string;
|
|
103
|
-
|
|
104
|
-
subtype?: string;
|
|
105
|
-
status?: string;
|
|
106
|
-
beliefStatus?: string;
|
|
101
|
+
createdAt?: number;
|
|
107
102
|
epistemicStatus?: string;
|
|
108
|
-
|
|
109
|
-
|
|
103
|
+
globalId?: string;
|
|
104
|
+
metadata?: JsonObject | null;
|
|
105
|
+
nodeId?: string;
|
|
106
|
+
nodeType?: string;
|
|
110
107
|
sourceType?: string;
|
|
108
|
+
status?: string;
|
|
109
|
+
subtype?: string;
|
|
111
110
|
tags?: string[];
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
text?: string;
|
|
112
|
+
title?: string;
|
|
113
|
+
topicId?: string;
|
|
115
114
|
updatedAt?: number;
|
|
116
|
-
|
|
115
|
+
verificationStatus?: string;
|
|
116
|
+
}
|
|
117
117
|
/**
|
|
118
118
|
* Directed edge between two graph nodes.
|
|
119
119
|
*
|
|
@@ -121,39 +121,31 @@ export type PlatformGraphNode = {
|
|
|
121
121
|
* The `edgeType` field classifies the relationship (informs, tests, depends_on, supersedes, etc.).
|
|
122
122
|
* Layer transition rules are enforced: L1 -> L3 direct edges are forbidden.
|
|
123
123
|
*/
|
|
124
|
-
export
|
|
124
|
+
export interface PlatformGraphEdge {
|
|
125
|
+
confidence?: number;
|
|
126
|
+
context?: string;
|
|
127
|
+
createdAt?: number;
|
|
128
|
+
derivationType?: string;
|
|
125
129
|
edgeId?: string;
|
|
126
|
-
|
|
127
|
-
fromNodeId?: string;
|
|
128
|
-
toNodeId?: string;
|
|
130
|
+
edgeType?: string;
|
|
129
131
|
fromGlobalId?: string;
|
|
130
|
-
|
|
132
|
+
fromNodeId?: string;
|
|
133
|
+
globalId?: string;
|
|
131
134
|
sourceGlobalId?: string;
|
|
132
135
|
targetGlobalId?: string;
|
|
133
|
-
|
|
136
|
+
toGlobalId?: string;
|
|
137
|
+
toNodeId?: string;
|
|
134
138
|
topicId?: string;
|
|
135
|
-
confidence?: number;
|
|
136
|
-
weight?: number;
|
|
137
|
-
context?: string;
|
|
138
|
-
derivationType?: string;
|
|
139
|
-
createdAt?: number;
|
|
140
139
|
updatedAt?: number;
|
|
141
|
-
|
|
140
|
+
weight?: number;
|
|
141
|
+
}
|
|
142
142
|
/** The resolved principal context returned by the public SDK identity surface. */
|
|
143
|
-
export
|
|
144
|
-
|
|
145
|
-
principalType: "user" | "human" | "service" | "group" | "external_viewer" | "agent";
|
|
146
|
-
tenantId: string | null;
|
|
147
|
-
workspaceId: string | null;
|
|
148
|
-
scopes: string[];
|
|
149
|
-
roles: string[];
|
|
143
|
+
export interface SdkPrincipalContext {
|
|
144
|
+
authMode?: string;
|
|
150
145
|
clerkId?: string;
|
|
146
|
+
delegatedBy?: string;
|
|
147
|
+
expiresAt?: number;
|
|
151
148
|
groupIds?: string[];
|
|
152
|
-
permittedToolNames?: string[];
|
|
153
|
-
permittedPackKeys?: string[];
|
|
154
|
-
principalStatus?: string;
|
|
155
|
-
tenantStatus?: string;
|
|
156
|
-
workspaceStatus?: string;
|
|
157
149
|
isPlatformAdmin: boolean;
|
|
158
150
|
isTenantAdmin: boolean;
|
|
159
151
|
isWorkspaceAdmin: boolean;
|
|
@@ -162,129 +154,137 @@ export type SdkPrincipalContext = {
|
|
|
162
154
|
tenant: string;
|
|
163
155
|
workspace?: string;
|
|
164
156
|
};
|
|
165
|
-
|
|
157
|
+
permittedPackKeys?: string[];
|
|
158
|
+
permittedToolNames?: string[];
|
|
159
|
+
principalId: string;
|
|
160
|
+
principalStatus?: string;
|
|
161
|
+
principalType: "user" | "human" | "service" | "group" | "external_viewer" | "agent";
|
|
162
|
+
roles: string[];
|
|
163
|
+
scopes: string[];
|
|
166
164
|
sessionId?: string;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
165
|
+
tenantId: string | null;
|
|
166
|
+
tenantStatus?: string;
|
|
167
|
+
workspaceId: string | null;
|
|
168
|
+
workspaceStatus?: string;
|
|
169
|
+
}
|
|
170
170
|
/** Evidence node record returned by evidence lifecycle APIs. */
|
|
171
|
-
export
|
|
172
|
-
|
|
171
|
+
export interface PlatformEvidenceRecord {
|
|
172
|
+
canonicalText?: string;
|
|
173
|
+
createdAt?: number;
|
|
174
|
+
createdBy?: string;
|
|
173
175
|
evidenceId?: string;
|
|
176
|
+
externalSourceUrl?: string;
|
|
174
177
|
globalId?: string;
|
|
175
|
-
topicId?: string;
|
|
176
|
-
text?: string;
|
|
177
|
-
canonicalText?: string;
|
|
178
|
-
title?: string;
|
|
179
178
|
kind?: string;
|
|
180
|
-
status?: string;
|
|
181
|
-
source?: string;
|
|
182
|
-
sourceUrl?: string;
|
|
183
|
-
externalSourceUrl?: string;
|
|
184
179
|
linkedBeliefId?: string;
|
|
185
180
|
linkedQuestionId?: string;
|
|
186
|
-
verificationStatus?: string;
|
|
187
181
|
metadata?: JsonObject | null;
|
|
182
|
+
nodeId?: string;
|
|
183
|
+
source?: string;
|
|
184
|
+
sourceUrl?: string;
|
|
185
|
+
status?: string;
|
|
188
186
|
tags?: string[];
|
|
189
|
-
|
|
187
|
+
text?: string;
|
|
188
|
+
title?: string;
|
|
189
|
+
topicId?: string;
|
|
190
190
|
updatedAt?: number;
|
|
191
|
-
|
|
192
|
-
}
|
|
191
|
+
verificationStatus?: string;
|
|
192
|
+
}
|
|
193
193
|
/** Source node record returned by source lifecycle APIs. */
|
|
194
|
-
export
|
|
195
|
-
nodeId?: string;
|
|
196
|
-
sourceId?: string;
|
|
197
|
-
globalId?: string;
|
|
198
|
-
topicId?: string;
|
|
199
|
-
url?: string;
|
|
194
|
+
export interface PlatformSourceRecord {
|
|
200
195
|
contentSha?: string;
|
|
196
|
+
createdAt?: number;
|
|
197
|
+
createdBy?: string;
|
|
198
|
+
globalId?: string;
|
|
201
199
|
kind?: string;
|
|
202
|
-
title?: string;
|
|
203
200
|
metadata?: JsonObject | null;
|
|
204
|
-
|
|
201
|
+
nodeId?: string;
|
|
202
|
+
sourceId?: string;
|
|
203
|
+
title?: string;
|
|
204
|
+
topicId?: string;
|
|
205
205
|
updatedAt?: number;
|
|
206
|
-
|
|
207
|
-
}
|
|
206
|
+
url?: string;
|
|
207
|
+
}
|
|
208
208
|
/** Response returned after creating or updating a source node. */
|
|
209
209
|
export type UpsertSourceResponse = PlatformSourceRecord;
|
|
210
210
|
/** Response returned when fetching a single source node. */
|
|
211
211
|
export type GetSourceResponse = PlatformSourceRecord;
|
|
212
212
|
/** Question node record returned by question lifecycle APIs. */
|
|
213
|
-
export
|
|
214
|
-
|
|
215
|
-
questionId?: string;
|
|
216
|
-
globalId?: string;
|
|
217
|
-
topicId?: string;
|
|
218
|
-
text?: string;
|
|
213
|
+
export interface PlatformQuestionRecord {
|
|
214
|
+
answerCompleteness?: string;
|
|
219
215
|
canonicalText?: string;
|
|
220
|
-
question?: string;
|
|
221
|
-
status?: string;
|
|
222
|
-
priority?: string;
|
|
223
216
|
category?: string;
|
|
224
|
-
questionType?: string;
|
|
225
|
-
linkedBeliefId?: string;
|
|
226
|
-
linkedWorktreeId?: string;
|
|
227
217
|
conviction?: number;
|
|
228
|
-
answerCompleteness?: string;
|
|
229
218
|
convictionRationale?: string;
|
|
230
|
-
metadata?: JsonObject | null;
|
|
231
219
|
createdAt?: number;
|
|
232
|
-
updatedAt?: number;
|
|
233
220
|
createdBy?: string;
|
|
234
|
-
|
|
221
|
+
globalId?: string;
|
|
222
|
+
linkedBeliefId?: string;
|
|
223
|
+
linkedWorktreeId?: string;
|
|
224
|
+
metadata?: JsonObject | null;
|
|
225
|
+
nodeId?: string;
|
|
226
|
+
priority?: string;
|
|
227
|
+
question?: string;
|
|
228
|
+
questionId?: string;
|
|
229
|
+
questionType?: string;
|
|
230
|
+
status?: string;
|
|
231
|
+
text?: string;
|
|
232
|
+
topicId?: string;
|
|
233
|
+
updatedAt?: number;
|
|
234
|
+
}
|
|
235
235
|
/** Answer record returned by answer/question APIs. */
|
|
236
|
-
export
|
|
237
|
-
|
|
236
|
+
export interface PlatformAnswerRecord {
|
|
237
|
+
answeredBy?: string;
|
|
238
238
|
answerId?: string | null;
|
|
239
|
-
|
|
240
|
-
questionNodeId?: string | null;
|
|
239
|
+
answerSource?: string;
|
|
241
240
|
answerText?: string | null;
|
|
242
241
|
confidence?: string | null;
|
|
243
|
-
|
|
244
|
-
isLatest?: boolean;
|
|
242
|
+
createdAt?: number;
|
|
245
243
|
evidenceCount?: number;
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
status?: string;
|
|
244
|
+
globalId?: string | null;
|
|
245
|
+
isLatest?: boolean;
|
|
249
246
|
metadata?: JsonObject | null;
|
|
250
|
-
|
|
247
|
+
nodeId?: string | null;
|
|
248
|
+
questionNodeId?: string | null;
|
|
249
|
+
status?: string;
|
|
251
250
|
updatedAt?: number;
|
|
252
|
-
|
|
251
|
+
versionNumber?: number;
|
|
252
|
+
}
|
|
253
253
|
/** Contract record returned by contract APIs. */
|
|
254
|
-
export
|
|
255
|
-
contractId?: string;
|
|
254
|
+
export interface PlatformContract {
|
|
256
255
|
beliefId?: string;
|
|
257
256
|
beliefNodeId?: string;
|
|
258
|
-
title?: string;
|
|
259
|
-
description?: string;
|
|
260
|
-
status?: string;
|
|
261
|
-
conditionType?: string;
|
|
262
|
-
direction?: string;
|
|
263
|
-
condition?: JsonValue;
|
|
264
|
-
deadline?: number;
|
|
265
257
|
compositeOf?: string[];
|
|
266
258
|
compositeOperator?: string;
|
|
267
|
-
|
|
259
|
+
condition?: JsonValue;
|
|
260
|
+
conditionType?: string;
|
|
261
|
+
contractId?: string;
|
|
262
|
+
createdAt?: number;
|
|
263
|
+
deadline?: number;
|
|
264
|
+
description?: string;
|
|
265
|
+
direction?: string;
|
|
268
266
|
evaluationSchedule?: string;
|
|
267
|
+
metadata?: JsonObject | null;
|
|
268
|
+
modulation?: JsonValue;
|
|
269
269
|
periodicIntervalMs?: number;
|
|
270
|
-
|
|
270
|
+
status?: string;
|
|
271
|
+
title?: string;
|
|
271
272
|
updatedAt?: number;
|
|
272
|
-
|
|
273
|
-
};
|
|
273
|
+
}
|
|
274
274
|
/** Evaluation result for an epistemic contract. */
|
|
275
|
-
export
|
|
276
|
-
contractId?: string;
|
|
275
|
+
export interface PlatformContractEvaluation {
|
|
277
276
|
beliefId?: string;
|
|
278
277
|
beliefNodeId?: string;
|
|
279
|
-
|
|
278
|
+
contractId?: string;
|
|
279
|
+
details?: JsonValue;
|
|
280
|
+
evaluatedAt?: number;
|
|
280
281
|
evaluationStatus?: string;
|
|
282
|
+
modulationApplied?: JsonValue;
|
|
283
|
+
nextEvaluationAt?: number;
|
|
281
284
|
satisfied?: boolean;
|
|
285
|
+
status?: string;
|
|
282
286
|
trigger?: JsonValue;
|
|
283
|
-
|
|
284
|
-
nextEvaluationAt?: number;
|
|
285
|
-
modulationApplied?: JsonValue;
|
|
286
|
-
details?: JsonValue;
|
|
287
|
-
};
|
|
287
|
+
}
|
|
288
288
|
/** Response from a graph node query. May be a single node, an array, or null if not found. */
|
|
289
289
|
export type QueryNodesResponse = PlatformGraphNode | PlatformGraphNode[] | null;
|
|
290
290
|
/** Response returned after creating a new graph node. */
|
|
@@ -296,34 +296,34 @@ export type QueryEdgesResponse = PlatformGraphEdge | PlatformGraphEdge[] | null;
|
|
|
296
296
|
/** Response returned after creating a new graph edge. */
|
|
297
297
|
export type CreateEdgeResponse = PlatformGraphEdge;
|
|
298
298
|
/** Count of edges removed in a bulk delete operation. */
|
|
299
|
-
export
|
|
300
|
-
removed?: number;
|
|
299
|
+
export interface DeleteEdgeCountResponse {
|
|
301
300
|
deleted?: number;
|
|
302
|
-
|
|
301
|
+
removed?: number;
|
|
302
|
+
}
|
|
303
303
|
/** Response from an edge delete operation. May include removed edge details or a count summary. */
|
|
304
304
|
export type DeleteEdgeResponse = PlatformGraphEdge | PlatformGraphEdge[] | DeleteEdgeCountResponse | null;
|
|
305
305
|
/** Local neighborhood around one or more graph nodes, including connected nodes and edges up to `maxDepth`. */
|
|
306
|
-
export
|
|
307
|
-
nodes?: PlatformGraphNode[];
|
|
306
|
+
export interface GraphNeighborhoodResponse {
|
|
308
307
|
edges?: PlatformGraphEdge[];
|
|
309
|
-
rootGlobalIds?: string[];
|
|
310
308
|
maxDepth?: number;
|
|
311
|
-
|
|
309
|
+
nodes?: PlatformGraphNode[];
|
|
310
|
+
rootGlobalIds?: string[];
|
|
311
|
+
}
|
|
312
312
|
/** Path traversal result between two graph nodes, including direct edges and the connected subgraph. */
|
|
313
|
-
export
|
|
313
|
+
export interface GraphPathResponse {
|
|
314
|
+
connectedGraph: GraphNeighborhoodResponse;
|
|
315
|
+
directEdges: PlatformGraphEdge[];
|
|
314
316
|
fromGlobalId: string;
|
|
315
|
-
toGlobalId: string;
|
|
316
317
|
maxDepth: number;
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
};
|
|
318
|
+
toGlobalId: string;
|
|
319
|
+
}
|
|
320
320
|
/** Available graph analytics metric types for structural analysis. */
|
|
321
321
|
export type GraphAnalyticsMetric = "graph_stats" | "contradiction_tension" | "confirmation_bias" | "reasoning_depth" | "knowledge_frontier";
|
|
322
322
|
/** Response envelope for a graph analytics computation, parameterized by metric type. */
|
|
323
|
-
export
|
|
323
|
+
export interface GraphAnalyticsResponse<Metric extends GraphAnalyticsMetric = GraphAnalyticsMetric> {
|
|
324
324
|
metric: Metric;
|
|
325
325
|
payload: JsonValue;
|
|
326
|
-
}
|
|
326
|
+
}
|
|
327
327
|
/** A thematic branch within a topic. Worktrees are checked out from branches. */
|
|
328
328
|
export type WorkflowBranchRecord = {
|
|
329
329
|
branchId?: string;
|
|
@@ -343,36 +343,36 @@ export type WorkflowBranchRecord = {
|
|
|
343
343
|
* Beliefs committed within a worktree can be freely amended (draft code on a feature branch).
|
|
344
344
|
* When investigation is complete, `merge` integrates findings into the stable knowledge base.
|
|
345
345
|
*/
|
|
346
|
-
export
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
346
|
+
export interface WorkflowWorktreeRecord {
|
|
347
|
+
autoFixPolicy?: WorkflowAutoFixPolicy;
|
|
348
|
+
autoShapeApplied?: boolean;
|
|
349
|
+
blocks?: string[];
|
|
350
350
|
branchId?: string;
|
|
351
|
-
title?: string;
|
|
352
|
-
status?: string;
|
|
353
|
-
phase?: string;
|
|
354
351
|
campaign?: number;
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
taskCount?: number;
|
|
358
|
-
autoShapeApplied?: boolean;
|
|
359
|
-
frameworkSuggestions?: JsonValue[];
|
|
352
|
+
createdAt?: number;
|
|
353
|
+
createdBy?: string;
|
|
360
354
|
dependencySuggestions?: JsonValue[];
|
|
355
|
+
dependsOn?: string[];
|
|
356
|
+
frameworkSuggestions?: JsonValue[];
|
|
361
357
|
gate?: string;
|
|
358
|
+
hypothesis?: string;
|
|
362
359
|
lane?: string;
|
|
363
360
|
laneOrderInCampaign?: number;
|
|
361
|
+
lastReconciledAt?: number;
|
|
362
|
+
metadata?: JsonObject | null;
|
|
363
|
+
nodeId?: string;
|
|
364
364
|
orderInLane?: number;
|
|
365
|
-
|
|
366
|
-
blocks?: string[];
|
|
365
|
+
phase?: string;
|
|
367
366
|
proofArtifacts?: WorkflowProofArtifact[];
|
|
367
|
+
questionCount?: number;
|
|
368
368
|
staffingHint?: WorkflowStaffingHint | string;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
369
|
+
status?: string;
|
|
370
|
+
taskCount?: number;
|
|
371
|
+
title?: string;
|
|
372
|
+
topicId?: string;
|
|
373
373
|
updatedAt?: number;
|
|
374
|
-
|
|
375
|
-
}
|
|
374
|
+
worktreeId?: string;
|
|
375
|
+
}
|
|
376
376
|
/** Paginated list of workflow branches. */
|
|
377
377
|
export type ListBranchesResponse = ListResult<WorkflowBranchRecord, "branches">;
|
|
378
378
|
/** Response returned after creating a new workflow branch. */
|
|
@@ -383,36 +383,37 @@ export type CreateBranchResponse = WorkflowBranchRecord;
|
|
|
383
383
|
* A lens overlays a topic with a specific investigation frame. Multiple lenses can coexist
|
|
384
384
|
* on the same topic. Lenses persist across worktrees and carry operational scaffolding.
|
|
385
385
|
*/
|
|
386
|
-
export
|
|
386
|
+
export interface WorkflowLensRecord {
|
|
387
|
+
createdAt?: number;
|
|
388
|
+
createdBy?: string;
|
|
389
|
+
description?: string;
|
|
390
|
+
filterCriteria?: JsonValue;
|
|
391
|
+
isAppliedToTopic?: boolean;
|
|
387
392
|
lensId?: string;
|
|
388
|
-
|
|
389
|
-
topicId?: string;
|
|
393
|
+
metadata?: JsonObject | null;
|
|
390
394
|
name?: string;
|
|
391
|
-
description?: string;
|
|
392
395
|
perspectiveType?: LensPerspectiveType;
|
|
393
|
-
status?: LensStatus;
|
|
394
|
-
isAppliedToTopic?: boolean;
|
|
395
396
|
promptTemplates?: LensPromptTemplateReference[];
|
|
396
|
-
|
|
397
|
+
questionTemplates?: LensQuestionTemplate[];
|
|
398
|
+
status?: LensStatus;
|
|
397
399
|
taskTemplates?: LensTaskTemplate[];
|
|
398
|
-
|
|
399
|
-
metadata?: JsonObject | null;
|
|
400
|
-
createdAt?: number;
|
|
400
|
+
topicId?: string;
|
|
401
401
|
updatedAt?: number;
|
|
402
|
-
|
|
403
|
-
|
|
402
|
+
workflowTemplates?: LensWorkflowTemplate[];
|
|
403
|
+
workspaceId?: string;
|
|
404
|
+
}
|
|
404
405
|
/** Record of a lens being applied to (or removed from) a topic. */
|
|
405
|
-
export
|
|
406
|
+
export interface WorkflowLensBindingRecord {
|
|
407
|
+
appliedAt?: number;
|
|
406
408
|
bindingId?: string;
|
|
407
409
|
lensId?: string;
|
|
408
|
-
|
|
409
|
-
topicId?: string;
|
|
410
|
-
status?: string;
|
|
411
|
-
appliedAt?: number;
|
|
410
|
+
metadata?: JsonObject | null;
|
|
412
411
|
removedAt?: number;
|
|
412
|
+
status?: string;
|
|
413
|
+
topicId?: string;
|
|
413
414
|
updatedAt?: number;
|
|
414
|
-
|
|
415
|
-
}
|
|
415
|
+
workspaceId?: string;
|
|
416
|
+
}
|
|
416
417
|
/** Paginated list of workflow lenses. */
|
|
417
418
|
export type ListLensesResponse = ListResult<WorkflowLensRecord, "lenses">;
|
|
418
419
|
/** Response returned after creating a new lens. */
|
|
@@ -427,49 +428,49 @@ export type ListWorktreesResponse = ListResult<WorkflowWorktreeRecord, "worktree
|
|
|
427
428
|
/** Response returned after adding a new worktree to a topic. */
|
|
428
429
|
export type AddWorktreeResponse = WorkflowWorktreeRecord;
|
|
429
430
|
/** Response returned after merging a worktree's findings into the stable knowledge base. */
|
|
430
|
-
export
|
|
431
|
-
worktreeId?: string;
|
|
432
|
-
status?: string;
|
|
433
|
-
outcome?: string;
|
|
431
|
+
export interface MergeWorktreeResponse {
|
|
434
432
|
beliefsScored?: number;
|
|
433
|
+
mergedAt?: number;
|
|
434
|
+
outcome?: string;
|
|
435
|
+
status?: string;
|
|
435
436
|
summary?: string;
|
|
436
|
-
|
|
437
|
-
}
|
|
437
|
+
worktreeId?: string;
|
|
438
|
+
}
|
|
438
439
|
/** Response returned after opening a pull request for peer review of a worktree. */
|
|
439
|
-
export
|
|
440
|
+
export interface OpenPullRequestResponse {
|
|
441
|
+
createdAt?: number;
|
|
440
442
|
pullRequestId?: string;
|
|
441
|
-
|
|
443
|
+
reviewers?: string[];
|
|
442
444
|
status?: string;
|
|
443
445
|
summary?: string;
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
};
|
|
446
|
+
worktreeId?: string;
|
|
447
|
+
}
|
|
447
448
|
/** Response returned after pushing scored beliefs from a merged worktree to a target context. */
|
|
448
|
-
export
|
|
449
|
-
|
|
449
|
+
export interface PushWorktreeResponse {
|
|
450
|
+
createdAt?: number;
|
|
450
451
|
pushedCount?: number;
|
|
451
|
-
|
|
452
|
+
pushId?: string;
|
|
452
453
|
status?: string;
|
|
453
|
-
|
|
454
|
-
}
|
|
454
|
+
targetContext?: string;
|
|
455
|
+
}
|
|
455
456
|
/** Lightweight topic record used in workflow context (topic switching, listing). */
|
|
456
|
-
export
|
|
457
|
-
topicId: string;
|
|
458
|
-
name: string;
|
|
459
|
-
type?: string;
|
|
457
|
+
export interface WorkflowTopicRecord {
|
|
460
458
|
isOwner?: boolean;
|
|
459
|
+
name: string;
|
|
461
460
|
tenantId?: string;
|
|
461
|
+
topicId: string;
|
|
462
|
+
type?: string;
|
|
462
463
|
workspaceId?: string;
|
|
463
|
-
}
|
|
464
|
+
}
|
|
464
465
|
/** Paginated list of workflow topic records. */
|
|
465
466
|
export type ListTopicsResponse = ListResult<WorkflowTopicRecord, "topics">;
|
|
466
467
|
/** Response returned after switching the active topic context. */
|
|
467
|
-
export
|
|
468
|
+
export interface SwitchTopicContextResponse {
|
|
469
|
+
briefing: JsonValue | null;
|
|
470
|
+
switched: boolean;
|
|
468
471
|
topicId: string;
|
|
469
472
|
topicName: string;
|
|
470
|
-
|
|
471
|
-
briefing: JsonValue | null;
|
|
472
|
-
};
|
|
473
|
+
}
|
|
473
474
|
/**
|
|
474
475
|
* @deprecated Use WorkflowTopicRecord.
|
|
475
476
|
*/
|
|
@@ -483,27 +484,27 @@ export type ListProjectsResponse = ListTopicsResponse;
|
|
|
483
484
|
*/
|
|
484
485
|
export type SwitchProjectContextResponse = SwitchTopicContextResponse;
|
|
485
486
|
/** Full topic record with hierarchy, visibility, and tenant/workspace scoping. */
|
|
486
|
-
export
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
topicGlobalId?: string;
|
|
491
|
-
epistemicNodeId?: string;
|
|
487
|
+
export interface TopicRecord {
|
|
488
|
+
createdAt?: number;
|
|
489
|
+
depth?: number;
|
|
490
|
+
description?: string;
|
|
492
491
|
epistemicNodeGlobalId?: string;
|
|
493
|
-
|
|
494
|
-
|
|
492
|
+
epistemicNodeId?: string;
|
|
493
|
+
globalId?: string;
|
|
494
|
+
id?: string;
|
|
495
495
|
name?: string;
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
depth?: number;
|
|
499
|
-
status?: string;
|
|
496
|
+
parentEdgeGlobalId?: string;
|
|
497
|
+
parentEdgeId?: string;
|
|
500
498
|
parentTopicId?: string | null;
|
|
499
|
+
status?: string;
|
|
501
500
|
tenantId?: string;
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
501
|
+
topicGlobalId?: string;
|
|
502
|
+
topicId?: string;
|
|
503
|
+
type?: string;
|
|
505
504
|
updatedAt?: number;
|
|
506
|
-
|
|
505
|
+
visibility?: string;
|
|
506
|
+
workspaceId?: string;
|
|
507
|
+
}
|
|
507
508
|
/** Paginated list of full topic records. */
|
|
508
509
|
export type TopicListResponse = ListResult<TopicRecord, "topics">;
|
|
509
510
|
/** Topic record extended with ancestry path for tree traversals. */
|
|
@@ -511,59 +512,59 @@ export type TopicTreeNode = TopicRecord & {
|
|
|
511
512
|
path?: string[];
|
|
512
513
|
};
|
|
513
514
|
/** Response containing the full topic hierarchy from a given root. */
|
|
514
|
-
export
|
|
515
|
+
export interface TopicTreeResponse {
|
|
515
516
|
tree: TopicTreeNode[];
|
|
516
|
-
}
|
|
517
|
+
}
|
|
517
518
|
/** Per-topic belief, question, and evidence counts for coverage analysis. */
|
|
518
|
-
export
|
|
519
|
-
topicId: string;
|
|
520
|
-
name: string;
|
|
521
|
-
type: string;
|
|
522
|
-
depth: number;
|
|
519
|
+
export interface TopicCoverageRecord {
|
|
523
520
|
beliefs: number;
|
|
524
|
-
questions: number;
|
|
525
|
-
evidence: number;
|
|
526
521
|
coverage: "full" | "partial" | "empty";
|
|
527
|
-
|
|
522
|
+
depth: number;
|
|
523
|
+
evidence: number;
|
|
524
|
+
name: string;
|
|
525
|
+
questions: number;
|
|
526
|
+
topicId: string;
|
|
527
|
+
type: string;
|
|
528
|
+
}
|
|
528
529
|
/** Aggregate coverage statistics across the topic tree. */
|
|
529
|
-
export
|
|
530
|
-
|
|
530
|
+
export interface TopicCoverageSummary {
|
|
531
|
+
coveragePercent: number;
|
|
531
532
|
coveredTopics: number;
|
|
532
533
|
emptyTopics: number;
|
|
533
|
-
coveragePercent: number;
|
|
534
534
|
totalBeliefs: number;
|
|
535
|
-
totalQuestions: number;
|
|
536
535
|
totalEvidence: number;
|
|
537
|
-
|
|
536
|
+
totalQuestions: number;
|
|
537
|
+
totalTopics: number;
|
|
538
|
+
}
|
|
538
539
|
/** Full coverage report with per-topic records and an aggregate summary. */
|
|
539
|
-
export
|
|
540
|
-
topics: TopicCoverageRecord[];
|
|
541
|
-
summary: TopicCoverageSummary;
|
|
540
|
+
export interface TopicCoverageResponse {
|
|
542
541
|
scopeTopicId?: string | null;
|
|
543
|
-
|
|
542
|
+
summary: TopicCoverageSummary;
|
|
543
|
+
topics: TopicCoverageRecord[];
|
|
544
|
+
}
|
|
544
545
|
/** Response returned after creating a new execution task. */
|
|
545
|
-
export
|
|
546
|
-
taskId: string;
|
|
547
|
-
status: string;
|
|
546
|
+
export interface CreateTaskResponse {
|
|
548
547
|
createdAt: number;
|
|
549
|
-
linkedWorktreeId?: string;
|
|
550
|
-
linkedQuestionId?: string;
|
|
551
548
|
linkedBeliefId?: string;
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
549
|
+
linkedQuestionId?: string;
|
|
550
|
+
linkedWorktreeId?: string;
|
|
551
|
+
status: string;
|
|
555
552
|
taskId: string;
|
|
553
|
+
}
|
|
554
|
+
/** Response returned after marking a task as complete. */
|
|
555
|
+
export interface CompleteTaskResponse {
|
|
556
556
|
completedAt: number;
|
|
557
557
|
outputSummary: string;
|
|
558
558
|
status?: string;
|
|
559
|
-
};
|
|
560
|
-
/** Response returned after updating a task's fields. */
|
|
561
|
-
export type UpdateTaskResponse = {
|
|
562
559
|
taskId: string;
|
|
563
|
-
|
|
560
|
+
}
|
|
561
|
+
/** Response returned after updating a task's fields. */
|
|
562
|
+
export interface UpdateTaskResponse {
|
|
564
563
|
status?: string;
|
|
564
|
+
taskId: string;
|
|
565
565
|
title?: string;
|
|
566
|
-
|
|
566
|
+
updatedAt: number;
|
|
567
|
+
}
|
|
567
568
|
/**
|
|
568
569
|
* Irreversible commitment based on the current epistemic state.
|
|
569
570
|
*
|
|
@@ -571,163 +572,163 @@ export type UpdateTaskResponse = {
|
|
|
571
572
|
* Once issued, it is evaluated against the epistemic state that existed when it was made
|
|
572
573
|
* (knowledge horizon evaluation, Invariant #10). Judgments are L4 entities in the graph.
|
|
573
574
|
*/
|
|
574
|
-
export
|
|
575
|
+
export interface JudgmentRecord {
|
|
575
576
|
_id?: string;
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
577
|
+
alternativesConsidered?: string[];
|
|
578
|
+
amount?: number;
|
|
579
|
+
companyId?: string;
|
|
580
|
+
confidence?: number;
|
|
581
|
+
createdAt?: number;
|
|
582
|
+
decisionConfidence?: number;
|
|
583
|
+
decisionMakers?: string[];
|
|
581
584
|
decisionType?: string;
|
|
585
|
+
globalId?: string;
|
|
586
|
+
judgmentId?: string;
|
|
582
587
|
judgmentType?: string;
|
|
583
|
-
|
|
584
|
-
confidence?: number;
|
|
588
|
+
keyUncertainties?: string[];
|
|
585
589
|
outcome?: string;
|
|
590
|
+
rationale?: string;
|
|
586
591
|
status?: string;
|
|
592
|
+
summary?: string;
|
|
593
|
+
terms?: string;
|
|
594
|
+
themeIds?: string[];
|
|
595
|
+
title?: string;
|
|
587
596
|
topicId?: string;
|
|
588
|
-
createdAt?: number;
|
|
589
597
|
updatedAt?: number;
|
|
590
|
-
companyId?: string;
|
|
591
|
-
amount?: number;
|
|
592
598
|
valuation?: number;
|
|
593
|
-
|
|
594
|
-
keyUncertainties?: string[];
|
|
595
|
-
alternativesConsidered?: string[];
|
|
596
|
-
decisionMakers?: string[];
|
|
597
|
-
themeIds?: string[];
|
|
598
|
-
};
|
|
599
|
+
}
|
|
599
600
|
/** Paginated list of judgment records. */
|
|
600
601
|
export type ListJudgmentsResponse = ListResult<JudgmentRecord, "judgments">;
|
|
601
602
|
/** A single judgment record, or null if not found. */
|
|
602
603
|
export type GetJudgmentResponse = JudgmentRecord | null;
|
|
603
604
|
/** Response returned after recording a new judgment, including the knowledge horizon snapshot. */
|
|
604
|
-
export
|
|
605
|
-
nodeId?: string;
|
|
606
|
-
judgmentId?: string;
|
|
607
|
-
globalId?: string;
|
|
608
|
-
status?: string;
|
|
605
|
+
export interface RecordJudgmentResponse {
|
|
609
606
|
createdAt?: number;
|
|
607
|
+
globalId?: string;
|
|
608
|
+
judgmentId?: string;
|
|
610
609
|
knowledgeHorizon?: {
|
|
611
610
|
beliefCount?: number;
|
|
612
611
|
openQuestionCount?: number;
|
|
613
612
|
contradictionCount?: number;
|
|
614
613
|
};
|
|
615
|
-
|
|
614
|
+
nodeId?: string;
|
|
615
|
+
status?: string;
|
|
616
|
+
}
|
|
616
617
|
/** Response returned after recording the real-world outcome of a judgment. */
|
|
617
|
-
export
|
|
618
|
-
success?: boolean;
|
|
618
|
+
export interface RecordJudgmentOutcomeResponse {
|
|
619
619
|
judgmentId?: string;
|
|
620
620
|
outcome?: string;
|
|
621
|
+
success?: boolean;
|
|
621
622
|
updatedAt?: number;
|
|
622
|
-
}
|
|
623
|
+
}
|
|
623
624
|
/** Assessment of whether the epistemic state is sufficient to issue a judgment. */
|
|
624
|
-
export
|
|
625
|
-
ready?: boolean;
|
|
626
|
-
beliefCount?: number;
|
|
627
|
-
questionCoverage?: number;
|
|
625
|
+
export interface JudgmentReadinessResponse {
|
|
628
626
|
avgConfidence?: number;
|
|
629
|
-
|
|
630
|
-
unresolvedContradictions?: number;
|
|
627
|
+
beliefCount?: number;
|
|
631
628
|
blockers?: string[];
|
|
629
|
+
evidencePerBelief?: number;
|
|
630
|
+
questionCoverage?: number;
|
|
631
|
+
ready?: boolean;
|
|
632
632
|
recommendation?: string;
|
|
633
|
-
|
|
633
|
+
unresolvedContradictions?: number;
|
|
634
|
+
}
|
|
634
635
|
/** Calibration statistics for a single judgment type bucket. */
|
|
635
|
-
export
|
|
636
|
-
total?: number;
|
|
636
|
+
export interface JudgmentCalibrationBucket {
|
|
637
637
|
successful?: number;
|
|
638
|
-
|
|
638
|
+
total?: number;
|
|
639
|
+
}
|
|
639
640
|
/** Calibration analysis comparing judgment confidence against real outcomes. */
|
|
640
|
-
export
|
|
641
|
-
|
|
642
|
-
decisionsWithOutcomes?: number;
|
|
641
|
+
export interface JudgmentCalibrationResponse {
|
|
642
|
+
byType?: Record<string, JudgmentCalibrationBucket>;
|
|
643
643
|
calibration?: {
|
|
644
644
|
calibrationScore?: number;
|
|
645
645
|
overconfident?: boolean;
|
|
646
646
|
underconfident?: boolean;
|
|
647
647
|
} | null;
|
|
648
|
-
|
|
649
|
-
|
|
648
|
+
decisionsWithOutcomes?: number;
|
|
649
|
+
totalDecisions?: number;
|
|
650
|
+
}
|
|
650
651
|
/** A judgment that has been made but whose real-world outcome has not yet been recorded. */
|
|
651
|
-
export
|
|
652
|
+
export interface PendingJudgmentOutcomeRecord {
|
|
652
653
|
_id?: string;
|
|
653
|
-
|
|
654
|
-
summary?: string;
|
|
655
|
-
title?: string;
|
|
656
|
-
decisionType?: string;
|
|
654
|
+
companyId?: string;
|
|
657
655
|
decisionConfidence?: number | null;
|
|
658
656
|
decisionDate?: number;
|
|
659
|
-
|
|
657
|
+
decisionType?: string;
|
|
658
|
+
globalId?: string;
|
|
660
659
|
outcome?: string;
|
|
661
660
|
status?: string;
|
|
662
|
-
|
|
661
|
+
summary?: string;
|
|
662
|
+
title?: string;
|
|
663
|
+
}
|
|
663
664
|
/** Paginated list of judgments pending outcome review. */
|
|
664
665
|
export type PendingJudgmentOutcomeReviewResponse = ListResult<PendingJudgmentOutcomeRecord, "reviews">;
|
|
665
666
|
/** A single integrity issue found during judgment transition audit. */
|
|
666
|
-
export
|
|
667
|
+
export interface JudgmentTransitionAuditIntegrityIssue {
|
|
667
668
|
code?: string;
|
|
668
|
-
severity?: "error" | "warning" | string;
|
|
669
669
|
message?: string;
|
|
670
|
-
|
|
670
|
+
severity?: "error" | "warning" | string;
|
|
671
|
+
}
|
|
671
672
|
/** Integrity check result for a single judgment's transition audit trail. */
|
|
672
|
-
export
|
|
673
|
+
export interface JudgmentTransitionAuditIntegrityCheck {
|
|
674
|
+
auditEventCount?: number;
|
|
673
675
|
decisionNodeId?: string;
|
|
674
676
|
globalId?: string;
|
|
675
|
-
status?: string;
|
|
676
|
-
outcome?: string;
|
|
677
|
-
auditEventCount?: number;
|
|
678
677
|
issues?: JudgmentTransitionAuditIntegrityIssue[];
|
|
679
|
-
|
|
678
|
+
outcome?: string;
|
|
679
|
+
status?: string;
|
|
680
|
+
}
|
|
680
681
|
/** Full integrity report for all judgment transitions within a topic. */
|
|
681
|
-
export
|
|
682
|
-
topicId?: string;
|
|
682
|
+
export interface JudgmentTransitionAuditIntegrityResponse {
|
|
683
683
|
checkedDecisionCount?: number;
|
|
684
|
+
checks?: JudgmentTransitionAuditIntegrityCheck[];
|
|
684
685
|
failingDecisionCount?: number;
|
|
685
|
-
passed?: boolean;
|
|
686
686
|
issueTypeBreakdown?: Record<string, number>;
|
|
687
|
-
|
|
688
|
-
|
|
687
|
+
passed?: boolean;
|
|
688
|
+
topicId?: string;
|
|
689
|
+
}
|
|
689
690
|
/** A report template definition for generating structured reports. */
|
|
690
|
-
export
|
|
691
|
-
templateId?: string;
|
|
692
|
-
slug?: string;
|
|
693
|
-
name?: string;
|
|
694
|
-
version?: string;
|
|
691
|
+
export interface ReportTemplateRecord {
|
|
695
692
|
description?: string;
|
|
693
|
+
name?: string;
|
|
694
|
+
slug?: string;
|
|
696
695
|
status?: string;
|
|
697
|
-
|
|
696
|
+
templateId?: string;
|
|
697
|
+
version?: string;
|
|
698
|
+
}
|
|
698
699
|
/** Response for report template queries. May be a list, a single template, or null. */
|
|
699
700
|
export type ReportTemplatesResponse = ListResult<ReportTemplateRecord, "templates"> | ReportTemplateRecord | null;
|
|
700
701
|
/** A generated report instance for a topic. */
|
|
701
|
-
export
|
|
702
|
+
export interface ProjectReportRecord {
|
|
703
|
+
createdAt?: number;
|
|
702
704
|
reportId?: string;
|
|
703
|
-
topicId?: string;
|
|
704
|
-
title?: string;
|
|
705
|
-
status?: string;
|
|
706
705
|
slug?: string;
|
|
706
|
+
status?: string;
|
|
707
707
|
summary?: string;
|
|
708
|
-
|
|
708
|
+
title?: string;
|
|
709
|
+
topicId?: string;
|
|
709
710
|
updatedAt?: number;
|
|
710
|
-
}
|
|
711
|
+
}
|
|
711
712
|
/** Paginated list of generated reports. */
|
|
712
713
|
export type ProjectReportsResponse = ListResult<ProjectReportRecord, "reports">;
|
|
713
714
|
/** A single section within a generated report. */
|
|
714
|
-
export
|
|
715
|
-
sectionId?: string;
|
|
716
|
-
slug?: string;
|
|
717
|
-
title?: string;
|
|
718
|
-
heading?: string;
|
|
715
|
+
export interface ReportSectionRecord {
|
|
719
716
|
body?: string;
|
|
720
717
|
content?: string;
|
|
721
|
-
|
|
718
|
+
heading?: string;
|
|
722
719
|
metadata?: JsonObject | null;
|
|
723
|
-
|
|
720
|
+
order?: number;
|
|
721
|
+
sectionId?: string;
|
|
722
|
+
slug?: string;
|
|
723
|
+
title?: string;
|
|
724
|
+
}
|
|
724
725
|
/** A complete report including all its sections. */
|
|
725
|
-
export
|
|
726
|
+
export interface ReportWithSectionsResponse {
|
|
726
727
|
reportId?: string;
|
|
727
|
-
|
|
728
|
-
title?: string;
|
|
728
|
+
sections?: ReportSectionRecord[];
|
|
729
729
|
status?: string;
|
|
730
730
|
summary?: string;
|
|
731
|
-
|
|
732
|
-
|
|
731
|
+
title?: string;
|
|
732
|
+
topicId?: string;
|
|
733
|
+
}
|
|
733
734
|
//# sourceMappingURL=types.d.ts.map
|