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