@lucern/sdk 0.2.0-alpha.3 → 0.2.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +615 -112
- package/dist/.generated +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -8894
- package/dist/lib/platform/auth/credentials.d.ts +5 -0
- package/dist/lib/platform/auth/credentials.js +40 -0
- package/dist/lib/platform/sdk/adminClient.d.ts +404 -0
- package/dist/lib/platform/sdk/adminClient.js +384 -0
- package/dist/lib/platform/sdk/answersClient.d.ts +16 -0
- package/dist/lib/platform/sdk/answersClient.js +21 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/audiencesClient.d.ts +6 -0
- package/dist/lib/platform/sdk/audiencesClient.js +111 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/auditClient.d.ts +3 -0
- package/dist/lib/platform/sdk/auditClient.js +21 -0
- package/dist/lib/platform/sdk/beliefsClient.d.ts +157 -0
- package/dist/lib/platform/sdk/beliefsClient.js +124 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/client.d.ts +957 -146
- package/dist/lib/platform/sdk/client.js +1831 -0
- package/dist/lib/platform/sdk/contextClient.d.ts +21 -0
- package/dist/lib/platform/sdk/contextClient.js +86 -0
- package/dist/{lucern/packages/domain-context/src/context-pack-compiler.d.ts → lib/platform/sdk/contextPackCompiler.d.ts} +2 -3
- package/dist/lib/platform/sdk/contextPackCompiler.js +534 -0
- package/dist/lib/platform/sdk/contextTypes.d.ts +133 -0
- package/dist/lib/platform/sdk/contextTypes.js +1 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/controlObjectOwnership.d.ts +15 -0
- package/dist/lib/platform/sdk/controlObjectOwnership.js +220 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/coreClient.d.ts +19 -0
- package/dist/lib/platform/sdk/coreClient.js +366 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/customTools.d.ts +21 -3
- package/dist/lib/platform/sdk/customTools.js +247 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/decisionsClient.d.ts +9 -0
- package/dist/lib/platform/sdk/decisionsClient.js +129 -0
- package/dist/lib/platform/sdk/domainContext.d.ts +1 -0
- package/dist/lib/platform/sdk/domainContext.js +1 -0
- package/dist/{lucern/packages/events/src/types.d.ts → lib/platform/sdk/events.d.ts} +25 -0
- package/dist/lib/platform/sdk/events.js +261 -0
- package/dist/lib/platform/sdk/gatewayFacades.d.ts +586 -0
- package/dist/lib/platform/sdk/gatewayFacades.js +845 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/graphClient.d.ts +75 -0
- package/dist/lib/platform/sdk/graphClient.js +235 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/harnessClient.d.ts +90 -1
- package/dist/lib/platform/sdk/harnessClient.js +219 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/identityClient.d.ts +45 -15
- package/dist/lib/platform/sdk/identityClient.js +131 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/index.d.ts +21 -3
- package/dist/lib/platform/sdk/index.js +46 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/learningClient.d.ts +3 -0
- package/dist/lib/platform/sdk/learningClient.js +53 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/mcpParityClient.d.ts +1 -0
- package/dist/lib/platform/sdk/mcpParityClient.js +196 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/mcpParitySurface.d.ts +2 -0
- package/dist/lib/platform/sdk/mcpParitySurface.js +57 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/ontologyClient.d.ts +16 -0
- package/dist/lib/platform/sdk/ontologyClient.js +161 -0
- package/dist/lib/platform/sdk/packRuntime.d.ts +1 -0
- package/dist/lib/platform/sdk/packRuntime.js +1 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/packsClient.d.ts +25 -0
- package/dist/lib/platform/sdk/packsClient.js +157 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/policyClient.d.ts +90 -1
- package/dist/lib/platform/sdk/policyClient.js +277 -0
- package/dist/lib/platform/sdk/promptCatalog.d.ts +1 -0
- package/dist/lib/platform/sdk/promptCatalog.js +1 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/reportsClient.d.ts +3 -0
- package/dist/lib/platform/sdk/reportsClient.js +64 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/schemaClient.d.ts +5 -0
- package/dist/lib/platform/sdk/schemaClient.js +71 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/sdkSurface.d.ts +1 -0
- package/dist/lib/platform/sdk/sdkSurface.js +140 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/topicsClient.d.ts +33 -0
- package/dist/lib/platform/sdk/topicsClient.js +118 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/types.d.ts +224 -2
- package/dist/lib/platform/sdk/types.js +1 -0
- package/dist/lib/platform/sdk/version.js +2 -0
- package/dist/{packages/sdk/src → lib/platform/sdk}/workflowClient.d.ts +63 -2
- package/dist/lib/platform/sdk/workflowClient.js +366 -0
- package/dist/lucern/contracts/src/api-enums.contract.d.ts +58 -0
- package/dist/lucern/contracts/src/api-enums.contract.js +147 -0
- package/dist/lucern/contracts/src/lens-filter.contract.js +95 -0
- package/dist/lucern/contracts/src/lens-workflow.contract.js +54 -0
- package/dist/lucern/contracts/src/mcp-tools.contract.js +3281 -0
- package/package.json +17 -3
- package/dist/index.js.map +0 -1
- package/dist/lucern/contracts/src/auth-session.contract.d.ts +0 -53
- package/dist/lucern/contracts/src/context-pack.contract.d.ts +0 -494
- package/dist/lucern/contracts/src/workflow-runtime.contract.d.ts +0 -161
- package/dist/lucern/mcp-server/src/context-pack-policy.d.ts +0 -119
- package/dist/lucern/mcp-server/src/context-pack-schema.d.ts +0 -18
- package/dist/lucern/modules/graph-primitives/src/ontology-matching.d.ts +0 -78
- package/dist/lucern/modules/graph-primitives/src/text-matching.d.ts +0 -53
- package/dist/lucern/packages/client-core/src/beliefs.d.ts +0 -30
- package/dist/lucern/packages/client-core/src/context.d.ts +0 -29
- package/dist/lucern/packages/client-core/src/contradictions.d.ts +0 -11
- package/dist/lucern/packages/client-core/src/edges.d.ts +0 -11
- package/dist/lucern/packages/client-core/src/events.d.ts +0 -9
- package/dist/lucern/packages/client-core/src/evidence.d.ts +0 -21
- package/dist/lucern/packages/client-core/src/graph.d.ts +0 -17
- package/dist/lucern/packages/client-core/src/identity.d.ts +0 -7
- package/dist/lucern/packages/client-core/src/ids.d.ts +0 -7
- package/dist/lucern/packages/client-core/src/ontologies.d.ts +0 -13
- package/dist/lucern/packages/client-core/src/questions.d.ts +0 -39
- package/dist/lucern/packages/client-core/src/search.d.ts +0 -7
- package/dist/lucern/packages/client-core/src/tasks.d.ts +0 -13
- package/dist/lucern/packages/client-core/src/topics.d.ts +0 -17
- package/dist/lucern/packages/client-core/src/webhooks.d.ts +0 -35
- package/dist/lucern/packages/client-core/src/worktrees.d.ts +0 -17
- package/dist/lucern/packages/domain-beliefs/src/beliefs.d.ts +0 -283
- package/dist/lucern/packages/domain-beliefs/src/index.d.ts +0 -1
- package/dist/lucern/packages/domain-context/src/compile.d.ts +0 -11
- package/dist/lucern/packages/domain-context/src/index.d.ts +0 -4
- package/dist/lucern/packages/domain-context/src/ports.d.ts +0 -58
- package/dist/lucern/packages/domain-context/src/public-types.d.ts +0 -1
- package/dist/lucern/packages/domain-edges/src/contradictions.d.ts +0 -59
- package/dist/lucern/packages/domain-edges/src/edges.d.ts +0 -91
- package/dist/lucern/packages/domain-edges/src/index.d.ts +0 -2
- package/dist/lucern/packages/domain-evidence/src/evidence.d.ts +0 -115
- package/dist/lucern/packages/domain-evidence/src/index.d.ts +0 -1
- package/dist/lucern/packages/domain-graph/src/graph.d.ts +0 -150
- package/dist/lucern/packages/domain-identity/src/index.d.ts +0 -1
- package/dist/lucern/packages/domain-identity/src/whoami.d.ts +0 -13
- package/dist/lucern/packages/domain-ontologies/src/ontologies.d.ts +0 -123
- package/dist/lucern/packages/domain-questions/src/index.d.ts +0 -1
- package/dist/lucern/packages/domain-questions/src/questions.d.ts +0 -147
- package/dist/lucern/packages/domain-search/src/search.d.ts +0 -97
- package/dist/lucern/packages/domain-tasks/src/index.d.ts +0 -1
- package/dist/lucern/packages/domain-tasks/src/tasks.d.ts +0 -102
- package/dist/lucern/packages/domain-topics/src/index.d.ts +0 -1
- package/dist/lucern/packages/domain-topics/src/topics.d.ts +0 -147
- package/dist/lucern/packages/domain-worktrees/src/index.d.ts +0 -1
- package/dist/lucern/packages/domain-worktrees/src/worktrees.d.ts +0 -185
- package/dist/lucern/packages/events/src/index.d.ts +0 -4
- package/dist/lucern/packages/events/src/matching.d.ts +0 -3
- package/dist/lucern/packages/events/src/outbox.d.ts +0 -15
- package/dist/lucern/packages/events/src/webhooks.d.ts +0 -9
- package/dist/lucern/packages/sdk-typescript/src/facade/beliefs.d.ts +0 -15
- package/dist/lucern/packages/sdk-typescript/src/facade/context.d.ts +0 -12
- package/dist/lucern/packages/sdk-typescript/src/facade/contradictions.d.ts +0 -7
- package/dist/lucern/packages/sdk-typescript/src/facade/edges.d.ts +0 -7
- package/dist/lucern/packages/sdk-typescript/src/facade/events.d.ts +0 -6
- package/dist/lucern/packages/sdk-typescript/src/facade/evidence.d.ts +0 -21
- package/dist/lucern/packages/sdk-typescript/src/facade/graph.d.ts +0 -10
- package/dist/lucern/packages/sdk-typescript/src/facade/identity.d.ts +0 -5
- package/dist/lucern/packages/sdk-typescript/src/facade/ontologies.d.ts +0 -8
- package/dist/lucern/packages/sdk-typescript/src/facade/questions.d.ts +0 -39
- package/dist/lucern/packages/sdk-typescript/src/facade/search.d.ts +0 -5
- package/dist/lucern/packages/sdk-typescript/src/facade/tasks.d.ts +0 -8
- package/dist/lucern/packages/sdk-typescript/src/facade/topics.d.ts +0 -10
- package/dist/lucern/packages/sdk-typescript/src/facade/webhooks.d.ts +0 -16
- package/dist/lucern/packages/sdk-typescript/src/facade/worktrees.d.ts +0 -10
- package/dist/lucern/packages/sdk-typescript/src/index.d.ts +0 -28
- package/dist/packages/sdk/src/adminClient.d.ts +0 -89
- package/dist/packages/sdk/src/answersClient.d.ts +0 -5
- package/dist/packages/sdk/src/beliefsClient.d.ts +0 -52
- package/dist/packages/sdk/src/contextClient.d.ts +0 -9
- package/dist/packages/sdk/src/contracts/api-enums.contract.d.ts +0 -79
- /package/dist/{packages/sdk/src → lib/platform/sdk}/version.d.ts +0 -0
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import type { WorkflowAutoFixPolicy, WorkflowProofArtifact, WorkflowStaffingHint } from "
|
|
2
|
-
import type { DeprecatedBranchMetadata, LensPerspectiveType, LensPromptTemplateReference, LensStatus, LensTaskTemplate, LensWorkflowTemplate } from "
|
|
1
|
+
import type { WorkflowAutoFixPolicy, WorkflowProofArtifact, WorkflowStaffingHint } from "./contracts/workflowRuntime";
|
|
2
|
+
import type { DeprecatedBranchMetadata, LensPerspectiveType, LensPromptTemplateReference, LensStatus, LensTaskTemplate, LensWorkflowTemplate } from "./contracts/lensWorkflow";
|
|
3
|
+
/** JSON-safe object whose values are recursively JSON-serializable. */
|
|
3
4
|
export type JsonObject = {
|
|
4
5
|
[key: string]: JsonValue | undefined;
|
|
5
6
|
};
|
|
7
|
+
/** JSON-safe array whose elements are recursively JSON-serializable. */
|
|
6
8
|
export type JsonArray = JsonValue[];
|
|
9
|
+
/**
|
|
10
|
+
* Union of all JSON-safe primitive and composite types.
|
|
11
|
+
*
|
|
12
|
+
* Used throughout the SDK for metadata, details, and other
|
|
13
|
+
* schemaless payloads that must survive JSON round-tripping.
|
|
14
|
+
*/
|
|
7
15
|
export type JsonValue = null | boolean | number | string | JsonArray | JsonObject;
|
|
8
16
|
/**
|
|
9
17
|
* Canonical scope identifiers for SDK inputs and records.
|
|
@@ -28,6 +36,13 @@ export type ListResult<T, LegacyKey extends string = never> = {
|
|
|
28
36
|
} & {
|
|
29
37
|
[Key in LegacyKey]: T[];
|
|
30
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* Atomic knowledge unit in the reasoning graph.
|
|
41
|
+
*
|
|
42
|
+
* A belief carries a confidence score, belongs to a topic scope, and follows
|
|
43
|
+
* the knowledge-as-code lifecycle: unscored (draft) -> scored (immutable) -> forked (evolved).
|
|
44
|
+
* Confidence is always modulated via the append-only credence log, never overwritten.
|
|
45
|
+
*/
|
|
31
46
|
export type PlatformBeliefRecord = {
|
|
32
47
|
nodeId: string;
|
|
33
48
|
globalId?: string;
|
|
@@ -51,7 +66,9 @@ export type PlatformBeliefRecord = {
|
|
|
51
66
|
updatedAt?: number;
|
|
52
67
|
createdBy?: string;
|
|
53
68
|
};
|
|
69
|
+
/** Response returned after creating a new belief node. */
|
|
54
70
|
export type CreateBeliefResponse = PlatformBeliefRecord;
|
|
71
|
+
/** Response returned after an append-only confidence modulation on a belief. */
|
|
55
72
|
export type ModulateConfidenceResponse = {
|
|
56
73
|
nodeId: string;
|
|
57
74
|
newConfidence?: number;
|
|
@@ -62,10 +79,18 @@ export type ModulateConfidenceResponse = {
|
|
|
62
79
|
certainty?: number;
|
|
63
80
|
recordedAt?: number;
|
|
64
81
|
};
|
|
82
|
+
/** Response returned after forking a scored belief into a new formulation. The new node carries a `supersedes` edge to the parent. */
|
|
65
83
|
export interface ForkBeliefResponse extends PlatformBeliefRecord {
|
|
66
84
|
parentNodeId?: string;
|
|
67
85
|
forkReason?: string;
|
|
68
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Generic graph node spanning L1-L4 epistemic layers.
|
|
89
|
+
*
|
|
90
|
+
* Nodes include beliefs (L3), evidence (L2), sources (L1), and judgments (L4).
|
|
91
|
+
* The `nodeType` field discriminates the layer; `confidence` is meaningful only
|
|
92
|
+
* for belief-typed nodes.
|
|
93
|
+
*/
|
|
69
94
|
export type PlatformGraphNode = {
|
|
70
95
|
nodeId?: string;
|
|
71
96
|
globalId?: string;
|
|
@@ -86,6 +111,13 @@ export type PlatformGraphNode = {
|
|
|
86
111
|
createdAt?: number;
|
|
87
112
|
updatedAt?: number;
|
|
88
113
|
};
|
|
114
|
+
/**
|
|
115
|
+
* Directed edge between two graph nodes.
|
|
116
|
+
*
|
|
117
|
+
* Weight indicates support strength: -1.0 (contradicts) to +1.0 (strongly supports).
|
|
118
|
+
* The `edgeType` field classifies the relationship (informs, tests, depends_on, supersedes, etc.).
|
|
119
|
+
* Layer transition rules are enforced: L1 -> L3 direct edges are forbidden.
|
|
120
|
+
*/
|
|
89
121
|
export type PlatformGraphEdge = {
|
|
90
122
|
edgeId?: string;
|
|
91
123
|
globalId?: string;
|
|
@@ -104,22 +136,146 @@ export type PlatformGraphEdge = {
|
|
|
104
136
|
createdAt?: number;
|
|
105
137
|
updatedAt?: number;
|
|
106
138
|
};
|
|
139
|
+
/** The resolved principal context returned by the public SDK identity surface. */
|
|
140
|
+
export type SdkPrincipalContext = {
|
|
141
|
+
principalId: string;
|
|
142
|
+
principalType: "user" | "human" | "service" | "group" | "external_viewer" | "agent";
|
|
143
|
+
tenantId: string | null;
|
|
144
|
+
workspaceId: string | null;
|
|
145
|
+
scopes: string[];
|
|
146
|
+
roles: string[];
|
|
147
|
+
isPlatformAdmin: boolean;
|
|
148
|
+
isTenantAdmin: boolean;
|
|
149
|
+
isWorkspaceAdmin: boolean;
|
|
150
|
+
authMode?: string;
|
|
151
|
+
sessionId?: string;
|
|
152
|
+
delegatedBy?: string;
|
|
153
|
+
expiresAt?: number;
|
|
154
|
+
};
|
|
155
|
+
/** Evidence node record returned by evidence lifecycle APIs. */
|
|
156
|
+
export type PlatformEvidenceRecord = {
|
|
157
|
+
nodeId?: string;
|
|
158
|
+
evidenceId?: string;
|
|
159
|
+
globalId?: string;
|
|
160
|
+
topicId?: string;
|
|
161
|
+
text?: string;
|
|
162
|
+
canonicalText?: string;
|
|
163
|
+
title?: string;
|
|
164
|
+
kind?: string;
|
|
165
|
+
status?: string;
|
|
166
|
+
source?: string;
|
|
167
|
+
sourceUrl?: string;
|
|
168
|
+
externalSourceUrl?: string;
|
|
169
|
+
linkedBeliefId?: string;
|
|
170
|
+
linkedQuestionId?: string;
|
|
171
|
+
verificationStatus?: string;
|
|
172
|
+
metadata?: JsonObject | null;
|
|
173
|
+
tags?: string[];
|
|
174
|
+
createdAt?: number;
|
|
175
|
+
updatedAt?: number;
|
|
176
|
+
createdBy?: string;
|
|
177
|
+
};
|
|
178
|
+
/** Question node record returned by question lifecycle APIs. */
|
|
179
|
+
export type PlatformQuestionRecord = {
|
|
180
|
+
nodeId?: string;
|
|
181
|
+
questionId?: string;
|
|
182
|
+
globalId?: string;
|
|
183
|
+
topicId?: string;
|
|
184
|
+
text?: string;
|
|
185
|
+
canonicalText?: string;
|
|
186
|
+
question?: string;
|
|
187
|
+
status?: string;
|
|
188
|
+
priority?: string;
|
|
189
|
+
category?: string;
|
|
190
|
+
questionType?: string;
|
|
191
|
+
linkedBeliefId?: string;
|
|
192
|
+
linkedWorktreeId?: string;
|
|
193
|
+
conviction?: number;
|
|
194
|
+
answerCompleteness?: string;
|
|
195
|
+
convictionRationale?: string;
|
|
196
|
+
metadata?: JsonObject | null;
|
|
197
|
+
createdAt?: number;
|
|
198
|
+
updatedAt?: number;
|
|
199
|
+
createdBy?: string;
|
|
200
|
+
};
|
|
201
|
+
/** Answer record returned by answer/question APIs. */
|
|
202
|
+
export type PlatformAnswerRecord = {
|
|
203
|
+
nodeId?: string | null;
|
|
204
|
+
answerId?: string | null;
|
|
205
|
+
globalId?: string | null;
|
|
206
|
+
questionNodeId?: string | null;
|
|
207
|
+
answerText?: string | null;
|
|
208
|
+
confidence?: string | null;
|
|
209
|
+
versionNumber?: number;
|
|
210
|
+
isLatest?: boolean;
|
|
211
|
+
evidenceCount?: number;
|
|
212
|
+
answeredBy?: string;
|
|
213
|
+
answerSource?: string;
|
|
214
|
+
status?: string;
|
|
215
|
+
metadata?: JsonObject | null;
|
|
216
|
+
createdAt?: number;
|
|
217
|
+
updatedAt?: number;
|
|
218
|
+
};
|
|
219
|
+
/** Contract record returned by contract APIs. */
|
|
220
|
+
export type PlatformContract = {
|
|
221
|
+
contractId?: string;
|
|
222
|
+
beliefId?: string;
|
|
223
|
+
beliefNodeId?: string;
|
|
224
|
+
title?: string;
|
|
225
|
+
description?: string;
|
|
226
|
+
status?: string;
|
|
227
|
+
conditionType?: string;
|
|
228
|
+
direction?: string;
|
|
229
|
+
condition?: JsonValue;
|
|
230
|
+
deadline?: number;
|
|
231
|
+
compositeOf?: string[];
|
|
232
|
+
compositeOperator?: string;
|
|
233
|
+
modulation?: JsonValue;
|
|
234
|
+
evaluationSchedule?: string;
|
|
235
|
+
periodicIntervalMs?: number;
|
|
236
|
+
createdAt?: number;
|
|
237
|
+
updatedAt?: number;
|
|
238
|
+
metadata?: JsonObject | null;
|
|
239
|
+
};
|
|
240
|
+
/** Evaluation result for an epistemic contract. */
|
|
241
|
+
export type PlatformContractEvaluation = {
|
|
242
|
+
contractId?: string;
|
|
243
|
+
beliefId?: string;
|
|
244
|
+
beliefNodeId?: string;
|
|
245
|
+
status?: string;
|
|
246
|
+
evaluationStatus?: string;
|
|
247
|
+
satisfied?: boolean;
|
|
248
|
+
trigger?: JsonValue;
|
|
249
|
+
evaluatedAt?: number;
|
|
250
|
+
nextEvaluationAt?: number;
|
|
251
|
+
modulationApplied?: JsonValue;
|
|
252
|
+
details?: JsonValue;
|
|
253
|
+
};
|
|
254
|
+
/** Response from a graph node query. May be a single node, an array, or null if not found. */
|
|
107
255
|
export type QueryNodesResponse = PlatformGraphNode | PlatformGraphNode[] | null;
|
|
256
|
+
/** Response returned after creating a new graph node. */
|
|
108
257
|
export type CreateNodeResponse = PlatformGraphNode;
|
|
258
|
+
/** Response returned after updating an existing graph node. */
|
|
109
259
|
export type UpdateNodeResponse = PlatformGraphNode;
|
|
260
|
+
/** Response from a graph edge query. May be a single edge, an array, or null if not found. */
|
|
110
261
|
export type QueryEdgesResponse = PlatformGraphEdge | PlatformGraphEdge[] | null;
|
|
262
|
+
/** Response returned after creating a new graph edge. */
|
|
111
263
|
export type CreateEdgeResponse = PlatformGraphEdge;
|
|
264
|
+
/** Count of edges removed in a bulk delete operation. */
|
|
112
265
|
export type DeleteEdgeCountResponse = {
|
|
113
266
|
removed?: number;
|
|
114
267
|
deleted?: number;
|
|
115
268
|
};
|
|
269
|
+
/** Response from an edge delete operation. May include removed edge details or a count summary. */
|
|
116
270
|
export type DeleteEdgeResponse = PlatformGraphEdge | PlatformGraphEdge[] | DeleteEdgeCountResponse | null;
|
|
271
|
+
/** Local neighborhood around one or more graph nodes, including connected nodes and edges up to `maxDepth`. */
|
|
117
272
|
export type GraphNeighborhoodResponse = {
|
|
118
273
|
nodes?: PlatformGraphNode[];
|
|
119
274
|
edges?: PlatformGraphEdge[];
|
|
120
275
|
rootGlobalIds?: string[];
|
|
121
276
|
maxDepth?: number;
|
|
122
277
|
};
|
|
278
|
+
/** Path traversal result between two graph nodes, including direct edges and the connected subgraph. */
|
|
123
279
|
export type GraphPathResponse = {
|
|
124
280
|
fromGlobalId: string;
|
|
125
281
|
toGlobalId: string;
|
|
@@ -127,11 +283,14 @@ export type GraphPathResponse = {
|
|
|
127
283
|
directEdges: PlatformGraphEdge[];
|
|
128
284
|
connectedGraph: GraphNeighborhoodResponse;
|
|
129
285
|
};
|
|
286
|
+
/** Available graph analytics metric types for structural analysis. */
|
|
130
287
|
export type GraphAnalyticsMetric = "graph_stats" | "contradiction_tension" | "confirmation_bias" | "reasoning_depth" | "knowledge_frontier";
|
|
288
|
+
/** Response envelope for a graph analytics computation, parameterized by metric type. */
|
|
131
289
|
export type GraphAnalyticsResponse<Metric extends GraphAnalyticsMetric = GraphAnalyticsMetric> = {
|
|
132
290
|
metric: Metric;
|
|
133
291
|
payload: JsonValue;
|
|
134
292
|
};
|
|
293
|
+
/** A thematic branch within a topic. Worktrees are checked out from branches. */
|
|
135
294
|
export type WorkflowBranchRecord = {
|
|
136
295
|
branchId?: string;
|
|
137
296
|
topicId?: string;
|
|
@@ -143,12 +302,20 @@ export type WorkflowBranchRecord = {
|
|
|
143
302
|
updatedAt?: number;
|
|
144
303
|
createdBy?: string;
|
|
145
304
|
} & Partial<DeprecatedBranchMetadata>;
|
|
305
|
+
/**
|
|
306
|
+
* Isolated investigation scope within a branch.
|
|
307
|
+
*
|
|
308
|
+
* Worktrees track hypotheses, dependencies, proof artifacts, and execution sequencing.
|
|
309
|
+
* Beliefs committed within a worktree can be freely amended (draft code on a feature branch).
|
|
310
|
+
* When investigation is complete, `merge` integrates findings into the stable knowledge base.
|
|
311
|
+
*/
|
|
146
312
|
export type WorkflowWorktreeRecord = {
|
|
147
313
|
worktreeId?: string;
|
|
148
314
|
topicId?: string;
|
|
149
315
|
branchId?: string;
|
|
150
316
|
title?: string;
|
|
151
317
|
status?: string;
|
|
318
|
+
phase?: string;
|
|
152
319
|
hypothesis?: string;
|
|
153
320
|
questionCount?: number;
|
|
154
321
|
taskCount?: number;
|
|
@@ -171,8 +338,16 @@ export type WorkflowWorktreeRecord = {
|
|
|
171
338
|
updatedAt?: number;
|
|
172
339
|
createdBy?: string;
|
|
173
340
|
};
|
|
341
|
+
/** Paginated list of workflow branches. */
|
|
174
342
|
export type ListBranchesResponse = ListResult<WorkflowBranchRecord, "branches">;
|
|
343
|
+
/** Response returned after creating a new workflow branch. */
|
|
175
344
|
export type CreateBranchResponse = WorkflowBranchRecord;
|
|
345
|
+
/**
|
|
346
|
+
* Reusable analytical perspective with prompt templates, workflow templates, and task templates.
|
|
347
|
+
*
|
|
348
|
+
* A lens overlays a topic with a specific investigation frame. Multiple lenses can coexist
|
|
349
|
+
* on the same topic. Lenses persist across worktrees and carry operational scaffolding.
|
|
350
|
+
*/
|
|
176
351
|
export type WorkflowLensRecord = {
|
|
177
352
|
lensId?: string;
|
|
178
353
|
workspaceId?: string;
|
|
@@ -191,6 +366,7 @@ export type WorkflowLensRecord = {
|
|
|
191
366
|
updatedAt?: number;
|
|
192
367
|
createdBy?: string;
|
|
193
368
|
};
|
|
369
|
+
/** Record of a lens being applied to (or removed from) a topic. */
|
|
194
370
|
export type WorkflowLensBindingRecord = {
|
|
195
371
|
bindingId?: string;
|
|
196
372
|
lensId?: string;
|
|
@@ -202,14 +378,20 @@ export type WorkflowLensBindingRecord = {
|
|
|
202
378
|
updatedAt?: number;
|
|
203
379
|
metadata?: JsonObject | null;
|
|
204
380
|
};
|
|
381
|
+
/** Paginated list of workflow lenses. */
|
|
205
382
|
export type ListLensesResponse = ListResult<WorkflowLensRecord, "lenses">;
|
|
383
|
+
/** Response returned after creating a new lens. */
|
|
206
384
|
export type CreateLensResponse = WorkflowLensRecord;
|
|
385
|
+
/** Response returned after binding or unbinding a lens to a topic. */
|
|
207
386
|
export type LensTopicBindingResponse = WorkflowLensBindingRecord;
|
|
387
|
+
/** Paginated list of worktrees with optional track and band summary counts. */
|
|
208
388
|
export type ListWorktreesResponse = ListResult<WorkflowWorktreeRecord, "worktrees"> & {
|
|
209
389
|
tracks?: Record<string, number>;
|
|
210
390
|
bands?: Record<string, number>;
|
|
211
391
|
};
|
|
392
|
+
/** Response returned after adding a new worktree to a topic. */
|
|
212
393
|
export type AddWorktreeResponse = WorkflowWorktreeRecord;
|
|
394
|
+
/** Response returned after merging a worktree's findings into the stable knowledge base. */
|
|
213
395
|
export type MergeWorktreeResponse = {
|
|
214
396
|
worktreeId?: string;
|
|
215
397
|
status?: string;
|
|
@@ -218,6 +400,7 @@ export type MergeWorktreeResponse = {
|
|
|
218
400
|
summary?: string;
|
|
219
401
|
mergedAt?: number;
|
|
220
402
|
};
|
|
403
|
+
/** Response returned after opening a pull request for peer review of a worktree. */
|
|
221
404
|
export type OpenPullRequestResponse = {
|
|
222
405
|
pullRequestId?: string;
|
|
223
406
|
worktreeId?: string;
|
|
@@ -226,6 +409,7 @@ export type OpenPullRequestResponse = {
|
|
|
226
409
|
reviewers?: string[];
|
|
227
410
|
createdAt?: number;
|
|
228
411
|
};
|
|
412
|
+
/** Response returned after pushing scored beliefs from a merged worktree to a target context. */
|
|
229
413
|
export type PushWorktreeResponse = {
|
|
230
414
|
pushId?: string;
|
|
231
415
|
pushedCount?: number;
|
|
@@ -233,6 +417,7 @@ export type PushWorktreeResponse = {
|
|
|
233
417
|
status?: string;
|
|
234
418
|
createdAt?: number;
|
|
235
419
|
};
|
|
420
|
+
/** Lightweight topic record used in workflow context (topic switching, listing). */
|
|
236
421
|
export type WorkflowTopicRecord = {
|
|
237
422
|
topicId: string;
|
|
238
423
|
name: string;
|
|
@@ -241,7 +426,9 @@ export type WorkflowTopicRecord = {
|
|
|
241
426
|
tenantId?: string;
|
|
242
427
|
workspaceId?: string;
|
|
243
428
|
};
|
|
429
|
+
/** Paginated list of workflow topic records. */
|
|
244
430
|
export type ListTopicsResponse = ListResult<WorkflowTopicRecord, "topics">;
|
|
431
|
+
/** Response returned after switching the active topic context. */
|
|
245
432
|
export type SwitchTopicContextResponse = {
|
|
246
433
|
topicId: string;
|
|
247
434
|
topicName: string;
|
|
@@ -260,6 +447,7 @@ export type ListProjectsResponse = ListTopicsResponse;
|
|
|
260
447
|
* @deprecated Use SwitchTopicContextResponse.
|
|
261
448
|
*/
|
|
262
449
|
export type SwitchProjectContextResponse = SwitchTopicContextResponse;
|
|
450
|
+
/** Full topic record with hierarchy, visibility, and tenant/workspace scoping. */
|
|
263
451
|
export type TopicRecord = {
|
|
264
452
|
topicId?: string;
|
|
265
453
|
id?: string;
|
|
@@ -276,13 +464,17 @@ export type TopicRecord = {
|
|
|
276
464
|
createdAt?: number;
|
|
277
465
|
updatedAt?: number;
|
|
278
466
|
};
|
|
467
|
+
/** Paginated list of full topic records. */
|
|
279
468
|
export type TopicListResponse = ListResult<TopicRecord, "topics">;
|
|
469
|
+
/** Topic record extended with ancestry path for tree traversals. */
|
|
280
470
|
export type TopicTreeNode = TopicRecord & {
|
|
281
471
|
path?: string[];
|
|
282
472
|
};
|
|
473
|
+
/** Response containing the full topic hierarchy from a given root. */
|
|
283
474
|
export type TopicTreeResponse = {
|
|
284
475
|
tree: TopicTreeNode[];
|
|
285
476
|
};
|
|
477
|
+
/** Per-topic belief, question, and evidence counts for coverage analysis. */
|
|
286
478
|
export type TopicCoverageRecord = {
|
|
287
479
|
topicId: string;
|
|
288
480
|
name: string;
|
|
@@ -293,6 +485,7 @@ export type TopicCoverageRecord = {
|
|
|
293
485
|
evidence: number;
|
|
294
486
|
coverage: "full" | "partial" | "empty";
|
|
295
487
|
};
|
|
488
|
+
/** Aggregate coverage statistics across the topic tree. */
|
|
296
489
|
export type TopicCoverageSummary = {
|
|
297
490
|
totalTopics: number;
|
|
298
491
|
coveredTopics: number;
|
|
@@ -302,11 +495,13 @@ export type TopicCoverageSummary = {
|
|
|
302
495
|
totalQuestions: number;
|
|
303
496
|
totalEvidence: number;
|
|
304
497
|
};
|
|
498
|
+
/** Full coverage report with per-topic records and an aggregate summary. */
|
|
305
499
|
export type TopicCoverageResponse = {
|
|
306
500
|
topics: TopicCoverageRecord[];
|
|
307
501
|
summary: TopicCoverageSummary;
|
|
308
502
|
scopeTopicId?: string | null;
|
|
309
503
|
};
|
|
504
|
+
/** Response returned after creating a new execution task. */
|
|
310
505
|
export type CreateTaskResponse = {
|
|
311
506
|
taskId: string;
|
|
312
507
|
status: string;
|
|
@@ -315,18 +510,27 @@ export type CreateTaskResponse = {
|
|
|
315
510
|
linkedQuestionId?: string;
|
|
316
511
|
linkedBeliefId?: string;
|
|
317
512
|
};
|
|
513
|
+
/** Response returned after marking a task as complete. */
|
|
318
514
|
export type CompleteTaskResponse = {
|
|
319
515
|
taskId: string;
|
|
320
516
|
completedAt: number;
|
|
321
517
|
outputSummary: string;
|
|
322
518
|
status?: string;
|
|
323
519
|
};
|
|
520
|
+
/** Response returned after updating a task's fields. */
|
|
324
521
|
export type UpdateTaskResponse = {
|
|
325
522
|
taskId: string;
|
|
326
523
|
updatedAt: number;
|
|
327
524
|
status?: string;
|
|
328
525
|
title?: string;
|
|
329
526
|
};
|
|
527
|
+
/**
|
|
528
|
+
* Irreversible commitment based on the current epistemic state.
|
|
529
|
+
*
|
|
530
|
+
* A judgment synthesizes beliefs, evidence, and uncertainties into a determination.
|
|
531
|
+
* Once issued, it is evaluated against the epistemic state that existed when it was made
|
|
532
|
+
* (knowledge horizon evaluation, Invariant #10). Judgments are L4 entities in the graph.
|
|
533
|
+
*/
|
|
330
534
|
export type JudgmentRecord = {
|
|
331
535
|
_id?: string;
|
|
332
536
|
judgmentId?: string;
|
|
@@ -352,8 +556,11 @@ export type JudgmentRecord = {
|
|
|
352
556
|
decisionMakers?: string[];
|
|
353
557
|
themeIds?: string[];
|
|
354
558
|
};
|
|
559
|
+
/** Paginated list of judgment records. */
|
|
355
560
|
export type ListJudgmentsResponse = ListResult<JudgmentRecord, "judgments">;
|
|
561
|
+
/** A single judgment record, or null if not found. */
|
|
356
562
|
export type GetJudgmentResponse = JudgmentRecord | null;
|
|
563
|
+
/** Response returned after recording a new judgment, including the knowledge horizon snapshot. */
|
|
357
564
|
export type RecordJudgmentResponse = {
|
|
358
565
|
nodeId?: string;
|
|
359
566
|
judgmentId?: string;
|
|
@@ -366,12 +573,14 @@ export type RecordJudgmentResponse = {
|
|
|
366
573
|
contradictionCount?: number;
|
|
367
574
|
};
|
|
368
575
|
};
|
|
576
|
+
/** Response returned after recording the real-world outcome of a judgment. */
|
|
369
577
|
export type RecordJudgmentOutcomeResponse = {
|
|
370
578
|
success?: boolean;
|
|
371
579
|
judgmentId?: string;
|
|
372
580
|
outcome?: string;
|
|
373
581
|
updatedAt?: number;
|
|
374
582
|
};
|
|
583
|
+
/** Assessment of whether the epistemic state is sufficient to issue a judgment. */
|
|
375
584
|
export type JudgmentReadinessResponse = {
|
|
376
585
|
ready?: boolean;
|
|
377
586
|
beliefCount?: number;
|
|
@@ -382,10 +591,12 @@ export type JudgmentReadinessResponse = {
|
|
|
382
591
|
blockers?: string[];
|
|
383
592
|
recommendation?: string;
|
|
384
593
|
};
|
|
594
|
+
/** Calibration statistics for a single judgment type bucket. */
|
|
385
595
|
export type JudgmentCalibrationBucket = {
|
|
386
596
|
total?: number;
|
|
387
597
|
successful?: number;
|
|
388
598
|
};
|
|
599
|
+
/** Calibration analysis comparing judgment confidence against real outcomes. */
|
|
389
600
|
export type JudgmentCalibrationResponse = {
|
|
390
601
|
totalDecisions?: number;
|
|
391
602
|
decisionsWithOutcomes?: number;
|
|
@@ -396,6 +607,7 @@ export type JudgmentCalibrationResponse = {
|
|
|
396
607
|
} | null;
|
|
397
608
|
byType?: Record<string, JudgmentCalibrationBucket>;
|
|
398
609
|
};
|
|
610
|
+
/** A judgment that has been made but whose real-world outcome has not yet been recorded. */
|
|
399
611
|
export type PendingJudgmentOutcomeRecord = {
|
|
400
612
|
_id?: string;
|
|
401
613
|
globalId?: string;
|
|
@@ -408,12 +620,15 @@ export type PendingJudgmentOutcomeRecord = {
|
|
|
408
620
|
outcome?: string;
|
|
409
621
|
status?: string;
|
|
410
622
|
};
|
|
623
|
+
/** Paginated list of judgments pending outcome review. */
|
|
411
624
|
export type PendingJudgmentOutcomeReviewResponse = ListResult<PendingJudgmentOutcomeRecord, "reviews">;
|
|
625
|
+
/** A single integrity issue found during judgment transition audit. */
|
|
412
626
|
export type JudgmentTransitionAuditIntegrityIssue = {
|
|
413
627
|
code?: string;
|
|
414
628
|
severity?: "error" | "warning" | string;
|
|
415
629
|
message?: string;
|
|
416
630
|
};
|
|
631
|
+
/** Integrity check result for a single judgment's transition audit trail. */
|
|
417
632
|
export type JudgmentTransitionAuditIntegrityCheck = {
|
|
418
633
|
decisionNodeId?: string;
|
|
419
634
|
globalId?: string;
|
|
@@ -422,6 +637,7 @@ export type JudgmentTransitionAuditIntegrityCheck = {
|
|
|
422
637
|
auditEventCount?: number;
|
|
423
638
|
issues?: JudgmentTransitionAuditIntegrityIssue[];
|
|
424
639
|
};
|
|
640
|
+
/** Full integrity report for all judgment transitions within a topic. */
|
|
425
641
|
export type JudgmentTransitionAuditIntegrityResponse = {
|
|
426
642
|
topicId?: string;
|
|
427
643
|
checkedDecisionCount?: number;
|
|
@@ -430,6 +646,7 @@ export type JudgmentTransitionAuditIntegrityResponse = {
|
|
|
430
646
|
issueTypeBreakdown?: Record<string, number>;
|
|
431
647
|
checks?: JudgmentTransitionAuditIntegrityCheck[];
|
|
432
648
|
};
|
|
649
|
+
/** A report template definition for generating structured reports. */
|
|
433
650
|
export type ReportTemplateRecord = {
|
|
434
651
|
templateId?: string;
|
|
435
652
|
slug?: string;
|
|
@@ -438,7 +655,9 @@ export type ReportTemplateRecord = {
|
|
|
438
655
|
description?: string;
|
|
439
656
|
status?: string;
|
|
440
657
|
};
|
|
658
|
+
/** Response for report template queries. May be a list, a single template, or null. */
|
|
441
659
|
export type ReportTemplatesResponse = ListResult<ReportTemplateRecord, "templates"> | ReportTemplateRecord | null;
|
|
660
|
+
/** A generated report instance for a topic. */
|
|
442
661
|
export type ProjectReportRecord = {
|
|
443
662
|
reportId?: string;
|
|
444
663
|
topicId?: string;
|
|
@@ -449,7 +668,9 @@ export type ProjectReportRecord = {
|
|
|
449
668
|
createdAt?: number;
|
|
450
669
|
updatedAt?: number;
|
|
451
670
|
};
|
|
671
|
+
/** Paginated list of generated reports. */
|
|
452
672
|
export type ProjectReportsResponse = ListResult<ProjectReportRecord, "reports">;
|
|
673
|
+
/** A single section within a generated report. */
|
|
453
674
|
export type ReportSectionRecord = {
|
|
454
675
|
sectionId?: string;
|
|
455
676
|
slug?: string;
|
|
@@ -460,6 +681,7 @@ export type ReportSectionRecord = {
|
|
|
460
681
|
order?: number;
|
|
461
682
|
metadata?: JsonObject | null;
|
|
462
683
|
};
|
|
684
|
+
/** A complete report including all its sections. */
|
|
463
685
|
export type ReportWithSectionsResponse = {
|
|
464
686
|
reportId?: string;
|
|
465
687
|
topicId?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import { type GatewayClientConfig, LucernApiError } from "./coreClient";
|
|
2
|
-
import type { LensPerspectiveType, LensPromptTemplateReference, LensStatus, LensTaskTemplate, LensWorkflowTemplate } from "
|
|
3
|
-
import type { WorkflowAutoFixPolicy, WorkflowProofArtifact, WorkflowStaffingHint } from "
|
|
2
|
+
import type { LensPerspectiveType, LensPromptTemplateReference, LensStatus, LensTaskTemplate, LensWorkflowTemplate } from "./contracts/lensWorkflow";
|
|
3
|
+
import type { WorkflowAutoFixPolicy, WorkflowProofArtifact, WorkflowStaffingHint } from "./contracts/workflowRuntime";
|
|
4
4
|
import type { CompleteTaskResponse, CreateTaskResponse, JsonObject, ListTopicsResponse, ListWorktreesResponse, MergeWorktreeResponse, OpenPullRequestResponse, PushWorktreeResponse, SwitchTopicContextResponse, TopicIdentifierInput, UpdateTaskResponse, WorkflowBranchRecord, WorkflowLensRecord, WorkflowWorktreeRecord } from "./types";
|
|
5
5
|
export { LucernApiError };
|
|
6
6
|
export type { PlatformGatewaySuccess } from "./coreClient";
|
|
7
7
|
export type { AddWorktreeResponse, CompleteTaskResponse, CreateBranchResponse, CreateLensResponse, CreateTaskResponse, LensTopicBindingResponse, ListBranchesResponse, ListLensesResponse, ListTopicsResponse, ListWorktreesResponse, MergeWorktreeResponse, OpenPullRequestResponse, PushWorktreeResponse, SwitchTopicContextResponse, UpdateTaskResponse, } from "./types";
|
|
8
|
+
/** Configuration for the workflow client. */
|
|
8
9
|
export type WorkflowClientConfig = GatewayClientConfig;
|
|
10
|
+
/** Lifecycle status of a workflow branch. */
|
|
9
11
|
export type WorkflowBranchStatus = "dormant" | "active" | "archived";
|
|
12
|
+
/** Lifecycle status of a workflow lens. */
|
|
10
13
|
export type WorkflowLensStatus = LensStatus;
|
|
14
|
+
/** Analytical perspective type for a lens overlay. */
|
|
11
15
|
export type WorkflowLensPerspectiveType = LensPerspectiveType;
|
|
16
|
+
/** Lifecycle status of a workflow worktree. */
|
|
12
17
|
export type WorkflowWorktreeStatus = "planning" | "active" | "paused" | "completed" | "merged" | "failed" | "archived";
|
|
18
|
+
/** Possible outcomes when merging worktree findings into the main belief line. */
|
|
13
19
|
export type WorkflowMergeOutcome = "validated" | "invalidated" | "forked" | "inconclusive";
|
|
20
|
+
/** Input for creating a new workflow worktree. */
|
|
14
21
|
export type AddWorktreeInput = {
|
|
15
22
|
title: string;
|
|
16
23
|
topicId?: string;
|
|
@@ -29,6 +36,7 @@ export type AddWorktreeInput = {
|
|
|
29
36
|
lastReconciledAt?: number;
|
|
30
37
|
autoFixPolicy?: WorkflowAutoFixPolicy;
|
|
31
38
|
} & TopicIdentifierInput;
|
|
39
|
+
/** Input for merging worktree findings with belief confidence outcomes. */
|
|
32
40
|
export type MergeInput = {
|
|
33
41
|
outcomes: Array<{
|
|
34
42
|
beliefId: string;
|
|
@@ -37,6 +45,7 @@ export type MergeInput = {
|
|
|
37
45
|
}>;
|
|
38
46
|
summary?: string;
|
|
39
47
|
};
|
|
48
|
+
/** Input for updating the beliefs and questions tracked by a worktree. */
|
|
40
49
|
export type UpdateWorktreeTargetsInput = {
|
|
41
50
|
worktreeId: string;
|
|
42
51
|
addBeliefIds?: string[];
|
|
@@ -44,13 +53,41 @@ export type UpdateWorktreeTargetsInput = {
|
|
|
44
53
|
removeBeliefIds?: string[];
|
|
45
54
|
removeQuestionIds?: string[];
|
|
46
55
|
};
|
|
56
|
+
/** Input for marking a worktree complete with recorded outcomes. */
|
|
57
|
+
export type CompleteWorktreeInput = {
|
|
58
|
+
worktreeId: string;
|
|
59
|
+
keyFindings?: string[];
|
|
60
|
+
decisionsReached?: string[];
|
|
61
|
+
nextSteps?: string[];
|
|
62
|
+
};
|
|
63
|
+
/** Input for moving a worktree forward to its next phase. */
|
|
64
|
+
export type AdvanceWorktreePhaseInput = {
|
|
65
|
+
worktreeId: string;
|
|
66
|
+
};
|
|
67
|
+
/** Input for forcing a worktree into a specific phase. */
|
|
68
|
+
export type SetWorktreePhaseInput = {
|
|
69
|
+
worktreeId: string;
|
|
70
|
+
phase: string;
|
|
71
|
+
};
|
|
72
|
+
/** Input for patching arbitrary structured worktree state. */
|
|
73
|
+
export type PatchWorktreeStateInput = {
|
|
74
|
+
worktreeId: string;
|
|
75
|
+
patch: JsonObject;
|
|
76
|
+
};
|
|
77
|
+
/** Input for batch-creating worktrees through the workflow surface. */
|
|
78
|
+
export type BulkCreateWorktreesInput = {
|
|
79
|
+
worktrees: unknown[];
|
|
80
|
+
};
|
|
81
|
+
/** Input for listing accessible topic contexts. */
|
|
47
82
|
export type ListTopicsInput = {
|
|
48
83
|
includeShared?: boolean;
|
|
49
84
|
limit?: number;
|
|
50
85
|
};
|
|
86
|
+
/** Input for switching the active topic context by name. */
|
|
51
87
|
export type SwitchTopicContextInput = {
|
|
52
88
|
targetTopicName: string;
|
|
53
89
|
};
|
|
90
|
+
/** Input for creating a workflow task linked to a question or worktree. */
|
|
54
91
|
export type CreateTaskInput = {
|
|
55
92
|
title: string;
|
|
56
93
|
topicId?: string;
|
|
@@ -61,10 +98,12 @@ export type CreateTaskInput = {
|
|
|
61
98
|
description?: string;
|
|
62
99
|
priority?: "low" | "medium" | "high" | "urgent";
|
|
63
100
|
} & TopicIdentifierInput;
|
|
101
|
+
/** Input for marking a workflow task as completed with an output summary. */
|
|
64
102
|
export type CompleteTaskInput = {
|
|
65
103
|
outputSummary: string;
|
|
66
104
|
evidenceCreated?: boolean;
|
|
67
105
|
};
|
|
106
|
+
/** Input for partially updating an existing workflow task. */
|
|
68
107
|
export type UpdateTaskInput = {
|
|
69
108
|
title?: string;
|
|
70
109
|
description?: string;
|
|
@@ -77,6 +116,8 @@ export type UpdateTaskInput = {
|
|
|
77
116
|
/**
|
|
78
117
|
* Create the workflow client for lenses, legacy branches, worktrees, context,
|
|
79
118
|
* and tasks.
|
|
119
|
+
* @param config - Gateway transport configuration.
|
|
120
|
+
* @returns An object with methods to manage branches, lenses, worktrees, topics, and tasks.
|
|
80
121
|
*/
|
|
81
122
|
export declare function createWorkflowClient(config?: WorkflowClientConfig): {
|
|
82
123
|
/**
|
|
@@ -174,6 +215,26 @@ export declare function createWorkflowClient(config?: WorkflowClientConfig): {
|
|
|
174
215
|
* Update targeted beliefs/questions for a worktree.
|
|
175
216
|
*/
|
|
176
217
|
updateWorktreeTargets(input: UpdateWorktreeTargetsInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<WorkflowWorktreeRecord>>;
|
|
218
|
+
/**
|
|
219
|
+
* Mark a worktree record complete.
|
|
220
|
+
*/
|
|
221
|
+
completeWorktree(input: CompleteWorktreeInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
222
|
+
/**
|
|
223
|
+
* Advance a worktree to its next lifecycle phase.
|
|
224
|
+
*/
|
|
225
|
+
advanceWorktreePhase(input: AdvanceWorktreePhaseInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
226
|
+
/**
|
|
227
|
+
* Force a worktree into a specific lifecycle phase.
|
|
228
|
+
*/
|
|
229
|
+
setWorktreePhase(input: SetWorktreePhaseInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
230
|
+
/**
|
|
231
|
+
* Patch opaque worktree state for orchestration flows.
|
|
232
|
+
*/
|
|
233
|
+
patchWorktreeState(input: PatchWorktreeStateInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
234
|
+
/**
|
|
235
|
+
* Batch create worktree records.
|
|
236
|
+
*/
|
|
237
|
+
bulkCreateWorktrees(input: BulkCreateWorktreesInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
177
238
|
/**
|
|
178
239
|
* Open a pull request for a worktree.
|
|
179
240
|
*/
|