@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,115 +0,0 @@
|
|
|
1
|
-
export type EvidenceTargetType = "belief" | "question";
|
|
2
|
-
type EvidenceRelation = "supports" | "contradicts" | "neutral";
|
|
3
|
-
export type EvidenceRecord = {
|
|
4
|
-
id: string;
|
|
5
|
-
nodeId: string;
|
|
6
|
-
evidenceId: string;
|
|
7
|
-
globalId?: string;
|
|
8
|
-
topicId?: string;
|
|
9
|
-
text: string;
|
|
10
|
-
title?: string;
|
|
11
|
-
kind?: string;
|
|
12
|
-
source?: string;
|
|
13
|
-
sourceType?: string;
|
|
14
|
-
externalSourceType?: string;
|
|
15
|
-
status?: string;
|
|
16
|
-
relation?: EvidenceRelation;
|
|
17
|
-
confidence?: number;
|
|
18
|
-
linkedBeliefId?: string;
|
|
19
|
-
linkedQuestionId?: string;
|
|
20
|
-
createdAt?: number;
|
|
21
|
-
updatedAt?: number;
|
|
22
|
-
metadata?: Record<string, unknown>;
|
|
23
|
-
};
|
|
24
|
-
export type EvidenceListResult = {
|
|
25
|
-
evidence: EvidenceRecord[];
|
|
26
|
-
nextCursor: null;
|
|
27
|
-
};
|
|
28
|
-
export type EvidenceSearchResult = {
|
|
29
|
-
evidenceId: string;
|
|
30
|
-
nodeId: string;
|
|
31
|
-
globalId?: string;
|
|
32
|
-
text: string;
|
|
33
|
-
source?: string;
|
|
34
|
-
kind?: string;
|
|
35
|
-
relevanceScore: number;
|
|
36
|
-
};
|
|
37
|
-
export type EvidenceSearchPage = {
|
|
38
|
-
results: EvidenceSearchResult[];
|
|
39
|
-
nextCursor: null;
|
|
40
|
-
};
|
|
41
|
-
export type LinkEvidenceResult = {
|
|
42
|
-
edgeId: string;
|
|
43
|
-
evidenceId: string;
|
|
44
|
-
targetId: string;
|
|
45
|
-
targetType: EvidenceTargetType;
|
|
46
|
-
weight: number;
|
|
47
|
-
beliefId?: string;
|
|
48
|
-
questionId?: string;
|
|
49
|
-
};
|
|
50
|
-
export type CreateEvidenceInput = {
|
|
51
|
-
topicId: string;
|
|
52
|
-
text: string;
|
|
53
|
-
source?: string;
|
|
54
|
-
targetId?: string;
|
|
55
|
-
targetType?: EvidenceTargetType;
|
|
56
|
-
weight?: number;
|
|
57
|
-
metadata?: Record<string, unknown>;
|
|
58
|
-
title?: string;
|
|
59
|
-
content?: string;
|
|
60
|
-
contentType?: string;
|
|
61
|
-
kind?: string;
|
|
62
|
-
};
|
|
63
|
-
export type ListEvidenceQuery = {
|
|
64
|
-
topicId?: string;
|
|
65
|
-
targetId?: string;
|
|
66
|
-
limit?: number;
|
|
67
|
-
cursor?: string;
|
|
68
|
-
};
|
|
69
|
-
export type SearchEvidenceQuery = {
|
|
70
|
-
q: string;
|
|
71
|
-
topicId?: string;
|
|
72
|
-
targetId?: string;
|
|
73
|
-
limit?: number;
|
|
74
|
-
cursor?: string;
|
|
75
|
-
};
|
|
76
|
-
type TargetRef = {
|
|
77
|
-
type: EvidenceTargetType;
|
|
78
|
-
rawId: string;
|
|
79
|
-
};
|
|
80
|
-
type EvidenceCreatePortInput = Omit<CreateEvidenceInput, "targetId"> & {
|
|
81
|
-
target?: TargetRef;
|
|
82
|
-
weight: number;
|
|
83
|
-
};
|
|
84
|
-
type EvidenceLinkPortInput = {
|
|
85
|
-
evidenceRawId: string;
|
|
86
|
-
targetRawId: string;
|
|
87
|
-
weight: number;
|
|
88
|
-
rationale?: string;
|
|
89
|
-
};
|
|
90
|
-
export type EvidencePort = {
|
|
91
|
-
fetchEvidence: (rawId: string) => Promise<unknown | null>;
|
|
92
|
-
listEvidenceByTopic: (args: {
|
|
93
|
-
topicId: string;
|
|
94
|
-
limit?: number;
|
|
95
|
-
}) => Promise<unknown[]>;
|
|
96
|
-
listEvidenceForBelief: (rawBeliefId: string) => Promise<unknown[]>;
|
|
97
|
-
listEvidenceForQuestion: (rawQuestionId: string) => Promise<unknown[]>;
|
|
98
|
-
createEvidence: (input: EvidenceCreatePortInput) => Promise<unknown>;
|
|
99
|
-
linkEvidenceToBelief: (input: EvidenceLinkPortInput) => Promise<unknown>;
|
|
100
|
-
linkEvidenceToQuestion: (input: EvidenceLinkPortInput) => Promise<unknown>;
|
|
101
|
-
};
|
|
102
|
-
export declare function getEvidence(deps: EvidencePort, input: {
|
|
103
|
-
id: string;
|
|
104
|
-
}): Promise<EvidenceRecord>;
|
|
105
|
-
export declare function listEvidence(deps: EvidencePort, query: ListEvidenceQuery): Promise<EvidenceListResult>;
|
|
106
|
-
export declare function searchEvidence(deps: EvidencePort, query: SearchEvidenceQuery): Promise<EvidenceSearchPage>;
|
|
107
|
-
export declare function createEvidence(deps: EvidencePort, input: CreateEvidenceInput): Promise<EvidenceRecord>;
|
|
108
|
-
export declare function linkEvidence(deps: EvidencePort, input: {
|
|
109
|
-
evidenceId: string;
|
|
110
|
-
targetId: string;
|
|
111
|
-
targetType?: string;
|
|
112
|
-
weight?: number;
|
|
113
|
-
rationale?: string;
|
|
114
|
-
}): Promise<LinkEvidenceResult>;
|
|
115
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./evidence";
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
type GraphDirection = "up" | "down" | "both";
|
|
2
|
-
type GraphNodeRecord = Record<string, unknown>;
|
|
3
|
-
type GraphEdgeRecord = Record<string, unknown>;
|
|
4
|
-
type GraphBeliefGapRecord = {
|
|
5
|
-
beliefId: string;
|
|
6
|
-
text: string;
|
|
7
|
-
confidence: number | null;
|
|
8
|
-
suggestedQuestions: string[];
|
|
9
|
-
};
|
|
10
|
-
export type GraphNeighborhoodInput = {
|
|
11
|
-
globalId?: string;
|
|
12
|
-
globalIds?: string[];
|
|
13
|
-
maxDepth?: number;
|
|
14
|
-
};
|
|
15
|
-
export type GraphNeighborhoodResult = {
|
|
16
|
-
nodes: GraphNodeRecord[];
|
|
17
|
-
edges: GraphEdgeRecord[];
|
|
18
|
-
depth: number;
|
|
19
|
-
};
|
|
20
|
-
export type GraphTraverseInput = {
|
|
21
|
-
startNode: string;
|
|
22
|
-
direction?: string;
|
|
23
|
-
maxDepth?: number;
|
|
24
|
-
topicId?: string;
|
|
25
|
-
};
|
|
26
|
-
export type GraphTraverseResult = {
|
|
27
|
-
startNode: string;
|
|
28
|
-
direction: GraphDirection;
|
|
29
|
-
maxDepth: number;
|
|
30
|
-
nodes: GraphNodeRecord[];
|
|
31
|
-
edges: GraphEdgeRecord[];
|
|
32
|
-
depth: number;
|
|
33
|
-
topicId?: string;
|
|
34
|
-
};
|
|
35
|
-
export type GraphAnalyzeInput = {
|
|
36
|
-
topicId: string;
|
|
37
|
-
metric?: string;
|
|
38
|
-
limit?: number;
|
|
39
|
-
};
|
|
40
|
-
export type GraphAnalyzeResult = {
|
|
41
|
-
topicId: string;
|
|
42
|
-
metric: string;
|
|
43
|
-
payload: Record<string, unknown>;
|
|
44
|
-
};
|
|
45
|
-
export type GraphBiasInput = {
|
|
46
|
-
topicId: string;
|
|
47
|
-
threshold?: number;
|
|
48
|
-
limit?: number;
|
|
49
|
-
};
|
|
50
|
-
export type GraphBiasBelief = {
|
|
51
|
-
nodeId: string;
|
|
52
|
-
biasScore: number;
|
|
53
|
-
riskLevel: string;
|
|
54
|
-
supportingCount: number;
|
|
55
|
-
challengingCount: number;
|
|
56
|
-
};
|
|
57
|
-
export type GraphBiasResult = {
|
|
58
|
-
topicId: string;
|
|
59
|
-
metric: "confirmation_bias";
|
|
60
|
-
threshold: number;
|
|
61
|
-
beliefs: GraphBiasBelief[];
|
|
62
|
-
payload: Record<string, unknown>;
|
|
63
|
-
};
|
|
64
|
-
export type GraphGapsInput = {
|
|
65
|
-
topicId: string;
|
|
66
|
-
minConfidence?: number;
|
|
67
|
-
};
|
|
68
|
-
export type GraphGapsResult = {
|
|
69
|
-
topicId: string;
|
|
70
|
-
gaps: GraphBeliefGapRecord[];
|
|
71
|
-
totalGaps: number;
|
|
72
|
-
};
|
|
73
|
-
type GraphBeliefRecord = {
|
|
74
|
-
beliefId?: string;
|
|
75
|
-
nodeId?: string;
|
|
76
|
-
topicId?: string;
|
|
77
|
-
text?: string;
|
|
78
|
-
canonicalText?: string;
|
|
79
|
-
confidence?: number | null;
|
|
80
|
-
};
|
|
81
|
-
type GraphQuestionRecord = {
|
|
82
|
-
questionId?: string;
|
|
83
|
-
nodeId?: string;
|
|
84
|
-
linkedBeliefId?: string;
|
|
85
|
-
};
|
|
86
|
-
type GraphTestingEdgeRecord = {
|
|
87
|
-
fromNodeId?: string;
|
|
88
|
-
toNodeId?: string;
|
|
89
|
-
edgeType?: string;
|
|
90
|
-
};
|
|
91
|
-
export type GraphFalsifyInput = {
|
|
92
|
-
topicId?: string;
|
|
93
|
-
beliefId?: string;
|
|
94
|
-
beliefIds?: string[];
|
|
95
|
-
minConfidence?: number;
|
|
96
|
-
};
|
|
97
|
-
export type GraphFalsificationQuestion = {
|
|
98
|
-
questionText: string;
|
|
99
|
-
falsificationPotential: number;
|
|
100
|
-
targetBeliefId: string;
|
|
101
|
-
targetBeliefText: string;
|
|
102
|
-
};
|
|
103
|
-
export type GraphFalsifyResult = {
|
|
104
|
-
topicId: string;
|
|
105
|
-
questions: GraphFalsificationQuestion[];
|
|
106
|
-
};
|
|
107
|
-
export type GraphPort = {
|
|
108
|
-
neighborhood: (input: {
|
|
109
|
-
globalIds: string[];
|
|
110
|
-
maxDepth: number;
|
|
111
|
-
}) => Promise<unknown>;
|
|
112
|
-
traverse: (input: {
|
|
113
|
-
startNode: string;
|
|
114
|
-
direction: GraphDirection;
|
|
115
|
-
maxDepth: number;
|
|
116
|
-
topicId?: string;
|
|
117
|
-
}) => Promise<unknown>;
|
|
118
|
-
analyze: (input: {
|
|
119
|
-
topicId: string;
|
|
120
|
-
metric: string;
|
|
121
|
-
limit?: number;
|
|
122
|
-
}) => Promise<unknown>;
|
|
123
|
-
bias: (input: {
|
|
124
|
-
topicId: string;
|
|
125
|
-
threshold: number;
|
|
126
|
-
limit?: number;
|
|
127
|
-
}) => Promise<unknown>;
|
|
128
|
-
listBeliefs: (input: {
|
|
129
|
-
topicId: string;
|
|
130
|
-
minConfidence?: number;
|
|
131
|
-
limit?: number;
|
|
132
|
-
}) => Promise<GraphBeliefRecord[]>;
|
|
133
|
-
fetchBelief: (input: {
|
|
134
|
-
beliefId: string;
|
|
135
|
-
}) => Promise<GraphBeliefRecord | null>;
|
|
136
|
-
listQuestions: (input: {
|
|
137
|
-
topicId: string;
|
|
138
|
-
limit?: number;
|
|
139
|
-
}) => Promise<GraphQuestionRecord[]>;
|
|
140
|
-
listTestingEdges: (input: {
|
|
141
|
-
topicId: string;
|
|
142
|
-
}) => Promise<GraphTestingEdgeRecord[]>;
|
|
143
|
-
};
|
|
144
|
-
export declare function graphNeighborhood(deps: GraphPort, input: GraphNeighborhoodInput): Promise<GraphNeighborhoodResult>;
|
|
145
|
-
export declare function graphTraverse(deps: GraphPort, input: GraphTraverseInput): Promise<GraphTraverseResult>;
|
|
146
|
-
export declare function graphAnalyze(deps: GraphPort, input: GraphAnalyzeInput): Promise<GraphAnalyzeResult>;
|
|
147
|
-
export declare function graphBias(deps: GraphPort, input: GraphBiasInput): Promise<GraphBiasResult>;
|
|
148
|
-
export declare function graphGaps(deps: GraphPort, input: GraphGapsInput): Promise<GraphGapsResult>;
|
|
149
|
-
export declare function graphFalsify(deps: GraphPort, input: GraphFalsifyInput): Promise<GraphFalsifyResult>;
|
|
150
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./whoami";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type IdentitySummary = {
|
|
2
|
-
principalId: string;
|
|
3
|
-
principalType: string;
|
|
4
|
-
tenantId?: string;
|
|
5
|
-
workspaceId?: string;
|
|
6
|
-
scopes?: string[];
|
|
7
|
-
roles?: string[];
|
|
8
|
-
};
|
|
9
|
-
export type WhoamiPort = {
|
|
10
|
-
resolveIdentitySummary: (() => IdentitySummary) | (() => Promise<IdentitySummary>);
|
|
11
|
-
};
|
|
12
|
-
export declare function normalizeIdentitySummary(value: IdentitySummary): IdentitySummary;
|
|
13
|
-
export declare function whoami(deps: WhoamiPort): Promise<IdentitySummary>;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
type OntologyTier = "platform" | "pack" | "tenant";
|
|
2
|
-
type OntologyStatus = "draft" | "active" | "deprecated" | "archived";
|
|
3
|
-
type OntologyVersionStatus = "draft" | "published" | "deprecated";
|
|
4
|
-
export type OntologyEntitySubtype = {
|
|
5
|
-
value: string;
|
|
6
|
-
label: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
};
|
|
9
|
-
export type OntologyEntityType = {
|
|
10
|
-
value: string;
|
|
11
|
-
label: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
schema?: unknown;
|
|
14
|
-
subtypes?: OntologyEntitySubtype[];
|
|
15
|
-
};
|
|
16
|
-
export type OntologyEdgeType = {
|
|
17
|
-
value: string;
|
|
18
|
-
label: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
sourceTypes?: string[];
|
|
21
|
-
targetTypes?: string[];
|
|
22
|
-
constraintSeverity?: "warn" | "info";
|
|
23
|
-
};
|
|
24
|
-
export type OntologyPublishedVersion = {
|
|
25
|
-
id: string;
|
|
26
|
-
version: string;
|
|
27
|
-
status: OntologyVersionStatus;
|
|
28
|
-
entityTypes: OntologyEntityType[];
|
|
29
|
-
edgeTypes: OntologyEdgeType[];
|
|
30
|
-
releaseNotes?: string;
|
|
31
|
-
publishedAt?: number;
|
|
32
|
-
publishedBy?: string;
|
|
33
|
-
};
|
|
34
|
-
export type OntologyRecord = {
|
|
35
|
-
id: string;
|
|
36
|
-
ontologyId: string;
|
|
37
|
-
ontologyKey: string;
|
|
38
|
-
name: string;
|
|
39
|
-
description?: string;
|
|
40
|
-
tier?: OntologyTier;
|
|
41
|
-
status?: OntologyStatus;
|
|
42
|
-
tenantId?: string;
|
|
43
|
-
parentOntologyId?: string;
|
|
44
|
-
createdBy?: string;
|
|
45
|
-
createdAt?: number;
|
|
46
|
-
updatedAt?: number;
|
|
47
|
-
publishedVersion: OntologyPublishedVersion | null;
|
|
48
|
-
};
|
|
49
|
-
export type OntologyListQuery = {
|
|
50
|
-
tenantId?: string;
|
|
51
|
-
tier?: OntologyTier | string;
|
|
52
|
-
status?: OntologyStatus | string;
|
|
53
|
-
};
|
|
54
|
-
export type OntologyListResult = {
|
|
55
|
-
ontologies: OntologyRecord[];
|
|
56
|
-
total: number;
|
|
57
|
-
};
|
|
58
|
-
export type GetOntologyInput = {
|
|
59
|
-
id?: string;
|
|
60
|
-
ontologyKey?: string;
|
|
61
|
-
tenantId?: string;
|
|
62
|
-
};
|
|
63
|
-
export type BindOntologyInput = {
|
|
64
|
-
ontologyId: string;
|
|
65
|
-
topicId: string;
|
|
66
|
-
};
|
|
67
|
-
export type OntologyBindingResult = {
|
|
68
|
-
applied: true;
|
|
69
|
-
source: "direct";
|
|
70
|
-
ontologyId: string;
|
|
71
|
-
ontologyKey: string;
|
|
72
|
-
ontologyName: string;
|
|
73
|
-
topicId: string;
|
|
74
|
-
topicName?: string;
|
|
75
|
-
updatedAt?: number;
|
|
76
|
-
};
|
|
77
|
-
export type OntologyTypeMatch = {
|
|
78
|
-
entityType: string;
|
|
79
|
-
label: string;
|
|
80
|
-
score: number;
|
|
81
|
-
reason: string;
|
|
82
|
-
};
|
|
83
|
-
export type OntologyMatchInput = {
|
|
84
|
-
text: string;
|
|
85
|
-
topicId?: string;
|
|
86
|
-
ontologyId?: string;
|
|
87
|
-
minScore?: number;
|
|
88
|
-
limit?: number;
|
|
89
|
-
};
|
|
90
|
-
export type OntologyMatchResult = {
|
|
91
|
-
text: string;
|
|
92
|
-
matchCount: number;
|
|
93
|
-
matches: OntologyTypeMatch[];
|
|
94
|
-
ontologyId?: string;
|
|
95
|
-
message?: string;
|
|
96
|
-
};
|
|
97
|
-
export type OntologiesPort = {
|
|
98
|
-
fetchOntology: (rawId: string) => Promise<unknown | null>;
|
|
99
|
-
fetchOntologyByKey?: (ontologyKey: string, tenantId?: string) => Promise<unknown | null>;
|
|
100
|
-
listOntologies: (query: {
|
|
101
|
-
tenantId?: string;
|
|
102
|
-
tier?: OntologyTier;
|
|
103
|
-
status?: OntologyStatus;
|
|
104
|
-
}) => Promise<unknown[]>;
|
|
105
|
-
fetchPublishedVersion: (ontologyRawId: string) => Promise<unknown | null>;
|
|
106
|
-
bindOntologyToTopic: (args: {
|
|
107
|
-
ontologyRawId: string;
|
|
108
|
-
topicRawId: string;
|
|
109
|
-
}) => Promise<unknown>;
|
|
110
|
-
fetchTopic: (topicRawId: string) => Promise<unknown | null>;
|
|
111
|
-
resolveMatchVocabulary: (input: {
|
|
112
|
-
ontologyRawId?: string;
|
|
113
|
-
topicRawId?: string;
|
|
114
|
-
}) => Promise<{
|
|
115
|
-
ontologyRawId?: string;
|
|
116
|
-
entityTypes: OntologyEntityType[];
|
|
117
|
-
} | null>;
|
|
118
|
-
};
|
|
119
|
-
export declare function listOntologies(deps: OntologiesPort, query?: OntologyListQuery): Promise<OntologyListResult>;
|
|
120
|
-
export declare function getOntology(deps: OntologiesPort, input: GetOntologyInput): Promise<OntologyRecord>;
|
|
121
|
-
export declare function bindOntology(deps: OntologiesPort, input: BindOntologyInput): Promise<OntologyBindingResult>;
|
|
122
|
-
export declare function matchOntology(deps: OntologiesPort, input: OntologyMatchInput): Promise<OntologyMatchResult>;
|
|
123
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./questions";
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
type QuestionStatus = "open" | "researching" | "answered" | "parked" | "closed";
|
|
2
|
-
type QuestionPriority = "low" | "medium" | "high" | "urgent";
|
|
3
|
-
type AnswerConfidence = "weak" | "medium" | "strong";
|
|
4
|
-
export type QuestionRecord = {
|
|
5
|
-
id: string;
|
|
6
|
-
nodeId: string;
|
|
7
|
-
questionId: string;
|
|
8
|
-
globalId?: string;
|
|
9
|
-
topicId?: string;
|
|
10
|
-
text: string;
|
|
11
|
-
status: QuestionStatus;
|
|
12
|
-
priority: QuestionPriority;
|
|
13
|
-
category?: string;
|
|
14
|
-
linkedBeliefId?: string;
|
|
15
|
-
linkedWorktreeId?: string;
|
|
16
|
-
answer?: string;
|
|
17
|
-
createdAt?: number;
|
|
18
|
-
updatedAt?: number;
|
|
19
|
-
metadata?: Record<string, unknown>;
|
|
20
|
-
};
|
|
21
|
-
export type QuestionListResult = {
|
|
22
|
-
questions: QuestionRecord[];
|
|
23
|
-
nextCursor: null;
|
|
24
|
-
};
|
|
25
|
-
export type QuestionAnswerResult = {
|
|
26
|
-
questionId: string;
|
|
27
|
-
answerId: string;
|
|
28
|
-
status: "answered";
|
|
29
|
-
};
|
|
30
|
-
export type QuestionArchiveResult = QuestionRecord & {
|
|
31
|
-
previousStatus: string;
|
|
32
|
-
newStatus: "archived";
|
|
33
|
-
};
|
|
34
|
-
export type CreateQuestionInput = {
|
|
35
|
-
topicId: string;
|
|
36
|
-
text: string;
|
|
37
|
-
priority?: string;
|
|
38
|
-
linkedBeliefId?: string;
|
|
39
|
-
metadata?: Record<string, unknown>;
|
|
40
|
-
};
|
|
41
|
-
export type ListQuestionsQuery = {
|
|
42
|
-
topicId?: string;
|
|
43
|
-
status?: string;
|
|
44
|
-
priority?: string;
|
|
45
|
-
worktreeId?: string;
|
|
46
|
-
limit?: number;
|
|
47
|
-
cursor?: string;
|
|
48
|
-
};
|
|
49
|
-
type QuestionCreatePortInput = {
|
|
50
|
-
topicId: string;
|
|
51
|
-
text: string;
|
|
52
|
-
priority?: QuestionPriority;
|
|
53
|
-
linkedBeliefRawId?: string;
|
|
54
|
-
metadata?: Record<string, unknown>;
|
|
55
|
-
};
|
|
56
|
-
type QuestionRefinePortInput = {
|
|
57
|
-
questionRawId: string;
|
|
58
|
-
text: string;
|
|
59
|
-
rationale?: string;
|
|
60
|
-
};
|
|
61
|
-
type QuestionStatusPortInput = {
|
|
62
|
-
questionRawId: string;
|
|
63
|
-
status: QuestionStatus;
|
|
64
|
-
rationale?: string;
|
|
65
|
-
};
|
|
66
|
-
type QuestionAnswerPortInput = {
|
|
67
|
-
questionRawId: string;
|
|
68
|
-
topicId: string;
|
|
69
|
-
text: string;
|
|
70
|
-
confidence?: AnswerConfidence;
|
|
71
|
-
evidenceRawIds?: string[];
|
|
72
|
-
rationale?: string;
|
|
73
|
-
};
|
|
74
|
-
export type QuestionsPort = {
|
|
75
|
-
fetchQuestion: (rawId: string) => Promise<unknown | null>;
|
|
76
|
-
listQuestionsByTopic: (args: {
|
|
77
|
-
topicId: string;
|
|
78
|
-
limit?: number;
|
|
79
|
-
}) => Promise<unknown[]>;
|
|
80
|
-
createQuestion: (input: QuestionCreatePortInput) => Promise<unknown>;
|
|
81
|
-
refineQuestion: (input: QuestionRefinePortInput) => Promise<unknown>;
|
|
82
|
-
updateQuestionStatus: (input: QuestionStatusPortInput) => Promise<unknown>;
|
|
83
|
-
createAnswer: (input: QuestionAnswerPortInput) => Promise<unknown>;
|
|
84
|
-
};
|
|
85
|
-
export declare function createQuestion(deps: QuestionsPort, input: CreateQuestionInput): Promise<QuestionRecord>;
|
|
86
|
-
export declare function getQuestion(deps: QuestionsPort, input: {
|
|
87
|
-
id: string;
|
|
88
|
-
}): Promise<QuestionRecord>;
|
|
89
|
-
export declare function listQuestions(deps: QuestionsPort, query: ListQuestionsQuery): Promise<QuestionListResult>;
|
|
90
|
-
export declare function refineQuestion(deps: QuestionsPort, input: {
|
|
91
|
-
id: string;
|
|
92
|
-
text: string;
|
|
93
|
-
rationale?: string;
|
|
94
|
-
}): Promise<{
|
|
95
|
-
previousText: string;
|
|
96
|
-
updatedText: string;
|
|
97
|
-
id: string;
|
|
98
|
-
nodeId: string;
|
|
99
|
-
questionId: string;
|
|
100
|
-
globalId?: string;
|
|
101
|
-
topicId?: string;
|
|
102
|
-
text: string;
|
|
103
|
-
status: QuestionStatus;
|
|
104
|
-
priority: QuestionPriority;
|
|
105
|
-
category?: string;
|
|
106
|
-
linkedBeliefId?: string;
|
|
107
|
-
linkedWorktreeId?: string;
|
|
108
|
-
answer?: string;
|
|
109
|
-
createdAt?: number;
|
|
110
|
-
updatedAt?: number;
|
|
111
|
-
metadata?: Record<string, unknown>;
|
|
112
|
-
}>;
|
|
113
|
-
export declare function updateQuestionStatus(deps: QuestionsPort, input: {
|
|
114
|
-
id: string;
|
|
115
|
-
status: string;
|
|
116
|
-
rationale?: string;
|
|
117
|
-
}): Promise<{
|
|
118
|
-
previousStatus: QuestionStatus;
|
|
119
|
-
newStatus: QuestionStatus;
|
|
120
|
-
id: string;
|
|
121
|
-
nodeId: string;
|
|
122
|
-
questionId: string;
|
|
123
|
-
globalId?: string;
|
|
124
|
-
topicId?: string;
|
|
125
|
-
text: string;
|
|
126
|
-
status: QuestionStatus;
|
|
127
|
-
priority: QuestionPriority;
|
|
128
|
-
category?: string;
|
|
129
|
-
linkedBeliefId?: string;
|
|
130
|
-
linkedWorktreeId?: string;
|
|
131
|
-
answer?: string;
|
|
132
|
-
createdAt?: number;
|
|
133
|
-
updatedAt?: number;
|
|
134
|
-
metadata?: Record<string, unknown>;
|
|
135
|
-
}>;
|
|
136
|
-
export declare function archiveQuestion(deps: QuestionsPort, input: {
|
|
137
|
-
id: string;
|
|
138
|
-
rationale?: string;
|
|
139
|
-
}): Promise<QuestionArchiveResult>;
|
|
140
|
-
export declare function answerQuestion(deps: QuestionsPort, input: {
|
|
141
|
-
id: string;
|
|
142
|
-
text: string;
|
|
143
|
-
confidence?: string;
|
|
144
|
-
evidenceIds?: string[];
|
|
145
|
-
rationale?: string;
|
|
146
|
-
}): Promise<QuestionAnswerResult>;
|
|
147
|
-
export {};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
type SearchResourceType = "belief" | "evidence" | "question";
|
|
2
|
-
type SearchBeliefRecord = {
|
|
3
|
-
beliefId?: string;
|
|
4
|
-
nodeId?: string;
|
|
5
|
-
globalId?: string;
|
|
6
|
-
text?: string;
|
|
7
|
-
canonicalText?: string;
|
|
8
|
-
confidence?: number | null;
|
|
9
|
-
status?: string;
|
|
10
|
-
};
|
|
11
|
-
type SearchEvidenceRecord = {
|
|
12
|
-
evidenceId?: string;
|
|
13
|
-
nodeId?: string;
|
|
14
|
-
globalId?: string;
|
|
15
|
-
text?: string;
|
|
16
|
-
source?: string;
|
|
17
|
-
kind?: string;
|
|
18
|
-
relevanceScore?: number;
|
|
19
|
-
};
|
|
20
|
-
type SearchQuestionRecord = {
|
|
21
|
-
questionId?: string;
|
|
22
|
-
nodeId?: string;
|
|
23
|
-
globalId?: string;
|
|
24
|
-
text?: string;
|
|
25
|
-
status?: string;
|
|
26
|
-
priority?: string;
|
|
27
|
-
linkedBeliefId?: string;
|
|
28
|
-
};
|
|
29
|
-
export type SearchInput = {
|
|
30
|
-
q: string;
|
|
31
|
-
topicId: string;
|
|
32
|
-
types?: SearchResourceType[];
|
|
33
|
-
status?: string;
|
|
34
|
-
minConfidence?: number;
|
|
35
|
-
limit?: number;
|
|
36
|
-
cursor?: string;
|
|
37
|
-
};
|
|
38
|
-
export type SearchBeliefHit = {
|
|
39
|
-
type: "belief";
|
|
40
|
-
beliefId: string;
|
|
41
|
-
nodeId: string;
|
|
42
|
-
globalId?: string;
|
|
43
|
-
text: string;
|
|
44
|
-
confidence: number | null;
|
|
45
|
-
status?: string;
|
|
46
|
-
relevanceScore: number;
|
|
47
|
-
};
|
|
48
|
-
export type SearchEvidenceHit = {
|
|
49
|
-
type: "evidence";
|
|
50
|
-
evidenceId: string;
|
|
51
|
-
nodeId: string;
|
|
52
|
-
globalId?: string;
|
|
53
|
-
text: string;
|
|
54
|
-
source?: string;
|
|
55
|
-
kind?: string;
|
|
56
|
-
relevanceScore: number;
|
|
57
|
-
};
|
|
58
|
-
export type SearchQuestionHit = {
|
|
59
|
-
type: "question";
|
|
60
|
-
questionId: string;
|
|
61
|
-
nodeId: string;
|
|
62
|
-
globalId?: string;
|
|
63
|
-
text: string;
|
|
64
|
-
status?: string;
|
|
65
|
-
priority?: string;
|
|
66
|
-
linkedBeliefId?: string;
|
|
67
|
-
relevanceScore: number;
|
|
68
|
-
};
|
|
69
|
-
export type SearchResult = SearchBeliefHit | SearchEvidenceHit | SearchQuestionHit;
|
|
70
|
-
export type SearchResponse = {
|
|
71
|
-
q: string;
|
|
72
|
-
topicId: string;
|
|
73
|
-
types: SearchResourceType[];
|
|
74
|
-
results: SearchResult[];
|
|
75
|
-
beliefs: SearchBeliefHit[];
|
|
76
|
-
evidence: SearchEvidenceHit[];
|
|
77
|
-
questions: SearchQuestionHit[];
|
|
78
|
-
};
|
|
79
|
-
export type SearchPort = {
|
|
80
|
-
listBeliefs: (input: {
|
|
81
|
-
topicId: string;
|
|
82
|
-
status?: string;
|
|
83
|
-
minConfidence?: number;
|
|
84
|
-
limit?: number;
|
|
85
|
-
}) => Promise<SearchBeliefRecord[]>;
|
|
86
|
-
searchEvidence: (input: {
|
|
87
|
-
q: string;
|
|
88
|
-
topicId: string;
|
|
89
|
-
limit?: number;
|
|
90
|
-
}) => Promise<SearchEvidenceRecord[]>;
|
|
91
|
-
listQuestions: (input: {
|
|
92
|
-
topicId: string;
|
|
93
|
-
limit?: number;
|
|
94
|
-
}) => Promise<SearchQuestionRecord[]>;
|
|
95
|
-
};
|
|
96
|
-
export declare function searchResources(deps: SearchPort, input: SearchInput): Promise<SearchResponse>;
|
|
97
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./tasks";
|