@lucern/sdk 0.2.0-alpha.1 → 0.2.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +691 -61
- package/dist/adminClient.d.ts +409 -0
- package/dist/adminClient.js +755 -0
- package/dist/adminClient.js.map +1 -0
- package/dist/answersClient.d.ts +23 -0
- package/dist/answersClient.js +333 -0
- package/dist/answersClient.js.map +1 -0
- package/dist/audience/index.d.ts +38 -0
- package/dist/audience/index.js +110 -0
- package/dist/audience/index.js.map +1 -0
- package/dist/{packages/sdk/src/audiencesClient.d.ts → audiencesClient.d.ts} +30 -18
- package/dist/audiencesClient.js +472 -0
- package/dist/audiencesClient.js.map +1 -0
- package/dist/auditClient.d.ts +29 -0
- package/dist/auditClient.js +386 -0
- package/dist/auditClient.js.map +1 -0
- package/dist/beliefs/index.d.ts +465 -0
- package/dist/beliefs/index.js +6433 -0
- package/dist/beliefs/index.js.map +1 -0
- package/dist/beliefs/lifecycle.d.ts +24 -0
- package/dist/beliefs/lifecycle.js +98 -0
- package/dist/beliefs/lifecycle.js.map +1 -0
- package/dist/beliefsClient.d.ts +241 -0
- package/dist/beliefsClient.js +646 -0
- package/dist/beliefsClient.js.map +1 -0
- package/dist/client.d.ts +2398 -0
- package/dist/client.js +6411 -0
- package/dist/client.js.map +1 -0
- package/dist/contextClient.d.ts +27 -0
- package/dist/contextClient.js +396 -0
- package/dist/contextClient.js.map +1 -0
- package/dist/contextFacade.d.ts +2 -0
- package/dist/contextFacade.js +73 -0
- package/dist/contextFacade.js.map +1 -0
- package/dist/{lucern/packages/domain-context/src/context-pack-compiler.d.ts → contextPackCompiler.d.ts} +11 -10
- package/dist/contextPackCompiler.js +1091 -0
- package/dist/contextPackCompiler.js.map +1 -0
- package/dist/contextPackPolicy.d.ts +84 -0
- package/dist/contextPackPolicy.js +347 -0
- package/dist/contextPackPolicy.js.map +1 -0
- package/dist/contextPackSchema.d.ts +7 -0
- package/dist/contextPackSchema.js +203 -0
- package/dist/contextPackSchema.js.map +1 -0
- package/dist/contextTypes.d.ts +135 -0
- package/dist/contextTypes.js +3 -0
- package/dist/contextTypes.js.map +1 -0
- package/dist/contracts/api-enums.contract.d.ts +81 -0
- package/dist/contracts/api-enums.contract.js +98 -0
- package/dist/contracts/api-enums.contract.js.map +1 -0
- package/dist/{lucern/contracts/src → contracts}/auth-session.contract.d.ts +14 -12
- package/dist/contracts/auth-session.contract.js +48 -0
- package/dist/contracts/auth-session.contract.js.map +1 -0
- package/dist/{lucern/contracts/src → contracts}/context-pack.contract.d.ts +56 -58
- package/dist/contracts/context-pack.contract.js +98 -0
- package/dist/contracts/context-pack.contract.js.map +1 -0
- package/dist/contracts/contextPack.d.ts +1 -0
- package/dist/contracts/contextPack.js +98 -0
- package/dist/contracts/contextPack.js.map +1 -0
- package/dist/contracts/index.d.ts +9 -0
- package/dist/contracts/index.js +4928 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/{lucern/contracts/src → contracts}/lens-filter.contract.d.ts +10 -8
- package/dist/contracts/lens-filter.contract.js +71 -0
- package/dist/contracts/lens-filter.contract.js.map +1 -0
- package/dist/contracts/lens-workflow.contract.d.ts +87 -0
- package/dist/contracts/lens-workflow.contract.js +123 -0
- package/dist/contracts/lens-workflow.contract.js.map +1 -0
- package/dist/contracts/lensFilter.d.ts +1 -0
- package/dist/contracts/lensFilter.js +71 -0
- package/dist/contracts/lensFilter.js.map +1 -0
- package/dist/contracts/lensWorkflow.d.ts +2 -0
- package/dist/contracts/lensWorkflow.js +123 -0
- package/dist/contracts/lensWorkflow.js.map +1 -0
- package/dist/contracts/mcp-tools.contract.d.ts +1 -0
- package/dist/contracts/mcp-tools.contract.js +3016 -0
- package/dist/contracts/mcp-tools.contract.js.map +1 -0
- package/dist/contracts/mcpTools.d.ts +1 -0
- package/dist/contracts/mcpTools.js +3016 -0
- package/dist/contracts/mcpTools.js.map +1 -0
- package/dist/contracts/prompt.contract.d.ts +26 -0
- package/dist/contracts/prompt.contract.js +12 -0
- package/dist/contracts/prompt.contract.js.map +1 -0
- package/dist/contracts/prompt.d.ts +1 -0
- package/dist/contracts/prompt.js +12 -0
- package/dist/contracts/prompt.js.map +1 -0
- package/dist/contracts/sdk-tools.contract.d.ts +2 -0
- package/dist/contracts/sdk-tools.contract.js +4164 -0
- package/dist/contracts/sdk-tools.contract.js.map +1 -0
- package/dist/contracts/sdkTools.d.ts +2 -0
- package/dist/contracts/sdkTools.js +4164 -0
- package/dist/contracts/sdkTools.js.map +1 -0
- package/dist/contracts/workflow-runtime.contract.d.ts +163 -0
- package/dist/contracts/workflow-runtime.contract.js +245 -0
- package/dist/contracts/workflow-runtime.contract.js.map +1 -0
- package/dist/contracts/workflowRuntime.d.ts +1 -0
- package/dist/contracts/workflowRuntime.js +245 -0
- package/dist/contracts/workflowRuntime.js.map +1 -0
- package/dist/contradictions/index.d.ts +158 -0
- package/dist/contradictions/index.js +6427 -0
- package/dist/contradictions/index.js.map +1 -0
- package/dist/{packages/sdk/src/controlObjectOwnership.d.ts → controlObjectOwnership.d.ts} +35 -18
- package/dist/controlObjectOwnership.js +215 -0
- package/dist/controlObjectOwnership.js.map +1 -0
- package/dist/{packages/sdk/src/coreClient.d.ts → coreClient.d.ts} +38 -14
- package/dist/coreClient.js +339 -0
- package/dist/coreClient.js.map +1 -0
- package/dist/customTools.d.ts +88 -0
- package/dist/customTools.js +248 -0
- package/dist/customTools.js.map +1 -0
- package/dist/decisions/index.d.ts +68 -0
- package/dist/decisions/index.js +6429 -0
- package/dist/decisions/index.js.map +1 -0
- package/dist/decisionsClient.d.ts +111 -0
- package/dist/decisionsClient.js +522 -0
- package/dist/decisionsClient.js.map +1 -0
- package/dist/domainContext.d.ts +1 -0
- package/dist/domainContext.js +3 -0
- package/dist/domainContext.js.map +1 -0
- package/dist/edges/index.d.ts +204 -0
- package/dist/edges/index.js +6428 -0
- package/dist/edges/index.js.map +1 -0
- package/dist/events.d.ts +178 -0
- package/dist/events.js +251 -0
- package/dist/events.js.map +1 -0
- package/dist/eventsCore.d.ts +49 -0
- package/dist/eventsCore.js +429 -0
- package/dist/eventsCore.js.map +1 -0
- package/dist/evidence/index.d.ts +295 -0
- package/dist/evidence/index.js +6428 -0
- package/dist/evidence/index.js.map +1 -0
- package/dist/evidenceClient.d.ts +119 -0
- package/dist/evidenceClient.js +350 -0
- package/dist/evidenceClient.js.map +1 -0
- package/dist/facade/context.d.ts +18 -0
- package/dist/facade/context.js +73 -0
- package/dist/facade/context.js.map +1 -0
- package/dist/gatewayFacades.d.ts +589 -0
- package/dist/gatewayFacades.js +2006 -0
- package/dist/gatewayFacades.js.map +1 -0
- package/dist/graphClient.d.ts +271 -0
- package/dist/graphClient.js +698 -0
- package/dist/graphClient.js.map +1 -0
- package/dist/{packages/sdk/src/harnessClient.d.ts → harnessClient.d.ts} +127 -35
- package/dist/harnessClient.js +607 -0
- package/dist/harnessClient.js.map +1 -0
- package/dist/identityClient.d.ts +140 -0
- package/dist/identityClient.js +497 -0
- package/dist/identityClient.js.map +1 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +5284 -2568
- package/dist/index.js.map +1 -1
- package/dist/learningClient.d.ts +46 -0
- package/dist/learningClient.js +409 -0
- package/dist/learningClient.js.map +1 -0
- package/dist/lenses/index.d.ts +194 -0
- package/dist/lenses/index.js +6427 -0
- package/dist/lenses/index.js.map +1 -0
- package/dist/{packages/sdk/src/mcpParityClient.d.ts → mcpParityClient.d.ts} +11 -5
- package/dist/mcpParityClient.js +516 -0
- package/dist/mcpParityClient.js.map +1 -0
- package/dist/mcpParitySurface.d.ts +12 -0
- package/dist/mcpParitySurface.js +65 -0
- package/dist/mcpParitySurface.js.map +1 -0
- package/dist/mcpTools-DPZxowDX.d.ts +254 -0
- package/dist/nodes/index.d.ts +62 -0
- package/dist/nodes/index.js +6429 -0
- package/dist/nodes/index.js.map +1 -0
- package/dist/ontologies/index.d.ts +178 -0
- package/dist/ontologies/index.js +6430 -0
- package/dist/ontologies/index.js.map +1 -0
- package/dist/{packages/sdk/src/ontologyClient.d.ts → ontologyClient.d.ts} +44 -22
- package/dist/ontologyClient.js +513 -0
- package/dist/ontologyClient.js.map +1 -0
- package/dist/opinion.d.ts +11 -0
- package/dist/opinion.js +35 -0
- package/dist/opinion.js.map +1 -0
- package/dist/packRuntime.d.ts +2 -0
- package/dist/packRuntime.js +3 -0
- package/dist/packRuntime.js.map +1 -0
- package/dist/packsClient.d.ts +131 -0
- package/dist/packsClient.js +525 -0
- package/dist/packsClient.js.map +1 -0
- package/dist/{packages/sdk/src/policyClient.d.ts → policyClient.d.ts} +113 -18
- package/dist/policyClient.js +625 -0
- package/dist/policyClient.js.map +1 -0
- package/dist/questions/index.d.ts +297 -0
- package/dist/questions/index.js +6430 -0
- package/dist/questions/index.js.map +1 -0
- package/dist/realtime/index.d.ts +29 -0
- package/dist/realtime/index.js +23 -0
- package/dist/realtime/index.js.map +1 -0
- package/dist/realtime/refs.d.ts +17 -0
- package/dist/realtime/refs.js +9 -0
- package/dist/realtime/refs.js.map +1 -0
- package/dist/reportsClient.d.ts +41 -0
- package/dist/reportsClient.js +418 -0
- package/dist/reportsClient.js.map +1 -0
- package/dist/schemaClient.d.ts +64 -0
- package/dist/schemaClient.js +434 -0
- package/dist/schemaClient.js.map +1 -0
- package/dist/sdkSurface.d.ts +61 -0
- package/dist/sdkSurface.js +112 -0
- package/dist/sdkSurface.js.map +1 -0
- package/dist/sdkTools-CwXJDACb.d.ts +150 -0
- package/dist/sourcesClient.d.ts +24 -0
- package/dist/sourcesClient.js +339 -0
- package/dist/sourcesClient.js.map +1 -0
- package/dist/topics/index.d.ts +68 -0
- package/dist/topics/index.js +6428 -0
- package/dist/topics/index.js.map +1 -0
- package/dist/topicsClient.d.ts +84 -0
- package/dist/topicsClient.js +492 -0
- package/dist/topicsClient.js.map +1 -0
- package/dist/types.d.ts +715 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/version.d.ts +4 -0
- package/dist/version.js +6 -0
- package/dist/version.js.map +1 -0
- package/dist/workflowClient.d.ts +316 -0
- package/dist/workflowClient.js +830 -0
- package/dist/workflowClient.js.map +1 -0
- package/dist/worktrees/index.d.ts +210 -0
- package/dist/worktrees/index.js +6430 -0
- package/dist/worktrees/index.js.map +1 -0
- package/package.json +92 -37
- package/dist/lucern/contracts/src/lens-workflow.contract.d.ts +0 -84
- package/dist/lucern/contracts/src/mcp-tools.contract.d.ts +0 -151
- 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/types.d.ts +0 -151
- 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/auditClient.d.ts +0 -23
- package/dist/packages/sdk/src/beliefsClient.d.ts +0 -54
- package/dist/packages/sdk/src/client.d.ts +0 -1610
- package/dist/packages/sdk/src/contextClient.d.ts +0 -9
- package/dist/packages/sdk/src/contracts/api-enums.contract.d.ts +0 -58
- package/dist/packages/sdk/src/customTools.d.ts +0 -65
- package/dist/packages/sdk/src/decisionsClient.d.ts +0 -110
- package/dist/packages/sdk/src/graphClient.d.ts +0 -209
- package/dist/packages/sdk/src/identityClient.d.ts +0 -104
- package/dist/packages/sdk/src/index.d.ts +0 -28
- package/dist/packages/sdk/src/learningClient.d.ts +0 -43
- package/dist/packages/sdk/src/mcpParitySurface.d.ts +0 -8
- package/dist/packages/sdk/src/packsClient.d.ts +0 -101
- package/dist/packages/sdk/src/reportsClient.d.ts +0 -31
- package/dist/packages/sdk/src/schemaClient.d.ts +0 -54
- package/dist/packages/sdk/src/sdkSurface.d.ts +0 -56
- package/dist/packages/sdk/src/topicsClient.d.ts +0 -45
- package/dist/packages/sdk/src/types.d.ts +0 -489
- package/dist/packages/sdk/src/version.d.ts +0 -2
- package/dist/packages/sdk/src/workflowClient.d.ts +0 -274
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
type BeliefRecordStatus = "active" | "superseded" | "archived";
|
|
2
|
-
type BeliefScoringState = "unscored" | "scored";
|
|
3
|
-
type BeliefForkReason = "refinement" | "contradiction_response" | "scope_change" | "confidence_collapse" | "manual";
|
|
4
|
-
type BeliefConfidenceTrigger = "evidence_added" | "evidence_removed" | "contradiction_detected" | "contradiction_resolved" | "manual" | "decay" | "agent_assessment" | "worktree_outcome" | "worktree_completed";
|
|
5
|
-
type ContractConditionType = "assertion" | "temporal" | "evidential" | "threshold" | "composite";
|
|
6
|
-
type ContractDirection = "confirms" | "falsifies";
|
|
7
|
-
type ContractCompositeOperator = "all" | "any" | "majority";
|
|
8
|
-
type ContractEvaluationSchedule = "on_demand" | "on_evidence" | "periodic" | "event_driven";
|
|
9
|
-
type BisectExpectedDirection = "overconfident" | "underconfident";
|
|
10
|
-
export type BeliefRecord = {
|
|
11
|
-
id: string;
|
|
12
|
-
nodeId: string;
|
|
13
|
-
beliefId: string;
|
|
14
|
-
globalId?: string;
|
|
15
|
-
topicId?: string;
|
|
16
|
-
text: string;
|
|
17
|
-
canonicalText: string;
|
|
18
|
-
formulation: string;
|
|
19
|
-
status: BeliefRecordStatus;
|
|
20
|
-
scoringState: BeliefScoringState;
|
|
21
|
-
confidence?: number;
|
|
22
|
-
beliefStatus?: string;
|
|
23
|
-
title?: string;
|
|
24
|
-
sourceType?: string;
|
|
25
|
-
beliefType?: string;
|
|
26
|
-
createdAt?: number;
|
|
27
|
-
updatedAt?: number;
|
|
28
|
-
metadata?: Record<string, unknown>;
|
|
29
|
-
};
|
|
30
|
-
export type BeliefListResult = {
|
|
31
|
-
beliefs: BeliefRecord[];
|
|
32
|
-
nextCursor: null;
|
|
33
|
-
};
|
|
34
|
-
export type BeliefLineageEntry = {
|
|
35
|
-
beliefId: string;
|
|
36
|
-
nodeId: string;
|
|
37
|
-
formulation: string;
|
|
38
|
-
forkReason?: string;
|
|
39
|
-
createdAt?: number;
|
|
40
|
-
};
|
|
41
|
-
export type BeliefLineageResult = {
|
|
42
|
-
beliefId: string;
|
|
43
|
-
lineage: BeliefLineageEntry[];
|
|
44
|
-
};
|
|
45
|
-
export type BeliefConfidenceHistoryEntry = {
|
|
46
|
-
id?: string;
|
|
47
|
-
confidence: number;
|
|
48
|
-
trigger: BeliefConfidenceTrigger | string;
|
|
49
|
-
rationale?: string;
|
|
50
|
-
timestamp?: number;
|
|
51
|
-
userId?: string;
|
|
52
|
-
opinion?: {
|
|
53
|
-
b?: number;
|
|
54
|
-
d?: number;
|
|
55
|
-
u?: number;
|
|
56
|
-
a?: number;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
export type BeliefConfidenceHistoryResult = {
|
|
60
|
-
beliefId: string;
|
|
61
|
-
entries: BeliefConfidenceHistoryEntry[];
|
|
62
|
-
nextCursor: null;
|
|
63
|
-
};
|
|
64
|
-
export type BeliefPropagationTarget = {
|
|
65
|
-
beliefId: string;
|
|
66
|
-
edgeType: "supports" | "depends_on";
|
|
67
|
-
direction: "incoming" | "outgoing";
|
|
68
|
-
confidence?: number;
|
|
69
|
-
formulation?: string;
|
|
70
|
-
};
|
|
71
|
-
export type BeliefConfidenceUpdateResult = {
|
|
72
|
-
beliefId: string;
|
|
73
|
-
nodeId: string;
|
|
74
|
-
previousConfidence: number;
|
|
75
|
-
newConfidence: number;
|
|
76
|
-
trigger: BeliefConfidenceTrigger;
|
|
77
|
-
rationale?: string;
|
|
78
|
-
requestId: string;
|
|
79
|
-
propagationSummary: {
|
|
80
|
-
mode: "scheduled";
|
|
81
|
-
bounded: true;
|
|
82
|
-
totalCandidateTargets: number;
|
|
83
|
-
inlineTargets: BeliefPropagationTarget[];
|
|
84
|
-
remainingTargetCount: number;
|
|
85
|
-
};
|
|
86
|
-
opinion?: {
|
|
87
|
-
b?: number;
|
|
88
|
-
d?: number;
|
|
89
|
-
u?: number;
|
|
90
|
-
a?: number;
|
|
91
|
-
};
|
|
92
|
-
historyEntry?: BeliefConfidenceHistoryEntry;
|
|
93
|
-
};
|
|
94
|
-
export type BeliefArchiveResult = BeliefRecord & {
|
|
95
|
-
previousStatus?: string;
|
|
96
|
-
newStatus: "archived";
|
|
97
|
-
};
|
|
98
|
-
export type BeliefRefineInput = {
|
|
99
|
-
id: string;
|
|
100
|
-
text: string;
|
|
101
|
-
rationale?: string;
|
|
102
|
-
};
|
|
103
|
-
export type BeliefContractCreateInput = {
|
|
104
|
-
title: string;
|
|
105
|
-
description?: string;
|
|
106
|
-
conditionType: ContractConditionType;
|
|
107
|
-
direction: ContractDirection;
|
|
108
|
-
condition: {
|
|
109
|
-
expression: string;
|
|
110
|
-
evaluator: string;
|
|
111
|
-
evaluatorConfig?: Record<string, unknown>;
|
|
112
|
-
};
|
|
113
|
-
deadline?: number;
|
|
114
|
-
compositeOf?: string[];
|
|
115
|
-
compositeOperator?: ContractCompositeOperator;
|
|
116
|
-
modulation: {
|
|
117
|
-
onConfirmed: {
|
|
118
|
-
delta: number;
|
|
119
|
-
ceiling?: number;
|
|
120
|
-
};
|
|
121
|
-
onDisconfirmed: {
|
|
122
|
-
delta: number;
|
|
123
|
-
floor?: number;
|
|
124
|
-
};
|
|
125
|
-
onExpired?: {
|
|
126
|
-
delta: number;
|
|
127
|
-
};
|
|
128
|
-
onPartial?: {
|
|
129
|
-
threshold: number;
|
|
130
|
-
delta: number;
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
evaluationSchedule: ContractEvaluationSchedule;
|
|
134
|
-
periodicIntervalMs?: number;
|
|
135
|
-
};
|
|
136
|
-
export type BeliefContractCreateResult = {
|
|
137
|
-
id: string;
|
|
138
|
-
contractId: string;
|
|
139
|
-
beliefId: string;
|
|
140
|
-
status: string;
|
|
141
|
-
title: string;
|
|
142
|
-
storageId?: string;
|
|
143
|
-
};
|
|
144
|
-
export type BeliefBisectResult = {
|
|
145
|
-
beliefId: string;
|
|
146
|
-
expectedDirection: BisectExpectedDirection;
|
|
147
|
-
inflectionEntry: BeliefConfidenceHistoryEntry | null;
|
|
148
|
-
triggerEvent: string | null;
|
|
149
|
-
confidenceBefore: number | null;
|
|
150
|
-
confidenceAfter: number | null;
|
|
151
|
-
totalEntries: number;
|
|
152
|
-
inflectionIndex: number | null;
|
|
153
|
-
};
|
|
154
|
-
export type CreateBeliefInput = {
|
|
155
|
-
topicId: string;
|
|
156
|
-
text: string;
|
|
157
|
-
rationale?: string;
|
|
158
|
-
worktreeId?: string;
|
|
159
|
-
pillar?: string;
|
|
160
|
-
sourceBeliefIds?: string[];
|
|
161
|
-
sourceType?: string;
|
|
162
|
-
beliefType?: string;
|
|
163
|
-
reversibility?: string;
|
|
164
|
-
predictionMeta?: Record<string, unknown>;
|
|
165
|
-
metadata?: Record<string, unknown>;
|
|
166
|
-
};
|
|
167
|
-
export type ListBeliefsQuery = {
|
|
168
|
-
topicId?: string;
|
|
169
|
-
status?: string;
|
|
170
|
-
worktreeId?: string;
|
|
171
|
-
minConfidence?: number;
|
|
172
|
-
limit?: number;
|
|
173
|
-
cursor?: string;
|
|
174
|
-
includeEdgeAssociated?: boolean;
|
|
175
|
-
};
|
|
176
|
-
export type ForkBeliefInput = {
|
|
177
|
-
id: string;
|
|
178
|
-
text: string;
|
|
179
|
-
forkReason?: BeliefForkReason | string;
|
|
180
|
-
rationale?: string;
|
|
181
|
-
};
|
|
182
|
-
export type UpdateBeliefConfidenceInput = {
|
|
183
|
-
id: string;
|
|
184
|
-
confidence: number;
|
|
185
|
-
trigger?: string;
|
|
186
|
-
rationale: string;
|
|
187
|
-
certainty?: number;
|
|
188
|
-
maxInlinePropagationTargets?: number;
|
|
189
|
-
};
|
|
190
|
-
export type ArchiveBeliefInput = {
|
|
191
|
-
id: string;
|
|
192
|
-
reason?: string;
|
|
193
|
-
};
|
|
194
|
-
export type CreateBeliefContractRequest = {
|
|
195
|
-
id: string;
|
|
196
|
-
input: BeliefContractCreateInput;
|
|
197
|
-
};
|
|
198
|
-
export type BisectBeliefConfidenceInput = {
|
|
199
|
-
id: string;
|
|
200
|
-
expectedDirection: BisectExpectedDirection;
|
|
201
|
-
timeRange?: {
|
|
202
|
-
start: number;
|
|
203
|
-
end: number;
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
|
-
type BeliefCreatePortInput = {
|
|
207
|
-
topicId: string;
|
|
208
|
-
text: string;
|
|
209
|
-
rationale?: string;
|
|
210
|
-
worktreeId?: string;
|
|
211
|
-
pillar?: string;
|
|
212
|
-
sourceBeliefRawIds?: string[];
|
|
213
|
-
sourceType?: string;
|
|
214
|
-
beliefType?: string;
|
|
215
|
-
reversibility?: string;
|
|
216
|
-
predictionMeta?: Record<string, unknown>;
|
|
217
|
-
metadata?: Record<string, unknown>;
|
|
218
|
-
};
|
|
219
|
-
type BeliefForkPortInput = {
|
|
220
|
-
beliefRawId: string;
|
|
221
|
-
text: string;
|
|
222
|
-
forkReason: BeliefForkReason;
|
|
223
|
-
rationale?: string;
|
|
224
|
-
};
|
|
225
|
-
type BeliefRefinePortInput = {
|
|
226
|
-
beliefRawId: string;
|
|
227
|
-
text: string;
|
|
228
|
-
rationale?: string;
|
|
229
|
-
};
|
|
230
|
-
type BeliefConfidencePortInput = {
|
|
231
|
-
beliefRawId: string;
|
|
232
|
-
confidence: number;
|
|
233
|
-
trigger: BeliefConfidenceTrigger;
|
|
234
|
-
rationale?: string;
|
|
235
|
-
certainty?: number;
|
|
236
|
-
};
|
|
237
|
-
type BeliefArchivePortInput = {
|
|
238
|
-
beliefRawId: string;
|
|
239
|
-
reason?: string;
|
|
240
|
-
};
|
|
241
|
-
type BeliefContractPortInput = {
|
|
242
|
-
beliefRawId: string;
|
|
243
|
-
input: BeliefContractCreateInput;
|
|
244
|
-
};
|
|
245
|
-
export type BeliefPort = {
|
|
246
|
-
fetchBelief: (rawId: string) => Promise<unknown | null>;
|
|
247
|
-
listBeliefsByTopic: (args: {
|
|
248
|
-
topicId: string;
|
|
249
|
-
status?: BeliefRecordStatus;
|
|
250
|
-
limit?: number;
|
|
251
|
-
includeEdgeAssociated?: boolean;
|
|
252
|
-
}) => Promise<unknown[]>;
|
|
253
|
-
createBelief: (input: BeliefCreatePortInput) => Promise<unknown>;
|
|
254
|
-
refineBelief: (input: BeliefRefinePortInput) => Promise<unknown>;
|
|
255
|
-
forkBelief: (input: BeliefForkPortInput) => Promise<unknown>;
|
|
256
|
-
modulateConfidence: (input: BeliefConfidencePortInput) => Promise<unknown>;
|
|
257
|
-
archiveBelief: (input: BeliefArchivePortInput) => Promise<unknown>;
|
|
258
|
-
getLineage: (rawId: string) => Promise<unknown[]>;
|
|
259
|
-
getConfidenceHistory: (rawId: string) => Promise<unknown[]>;
|
|
260
|
-
createContract: (input: BeliefContractPortInput) => Promise<unknown>;
|
|
261
|
-
getRelationships: (rawId: string) => Promise<unknown>;
|
|
262
|
-
};
|
|
263
|
-
export declare function createBelief(port: BeliefPort, input: CreateBeliefInput): Promise<BeliefRecord>;
|
|
264
|
-
export declare function getBelief(port: BeliefPort, args: {
|
|
265
|
-
id: string;
|
|
266
|
-
}): Promise<BeliefRecord>;
|
|
267
|
-
export declare function listBeliefs(port: BeliefPort, query: ListBeliefsQuery): Promise<BeliefListResult>;
|
|
268
|
-
export declare function refineBelief(port: BeliefPort, input: BeliefRefineInput): Promise<BeliefRecord>;
|
|
269
|
-
export declare function forkBelief(port: BeliefPort, input: ForkBeliefInput): Promise<BeliefRecord & {
|
|
270
|
-
parentBeliefId: string;
|
|
271
|
-
forkReason: BeliefForkReason;
|
|
272
|
-
}>;
|
|
273
|
-
export declare function updateBeliefConfidence(port: BeliefPort, input: UpdateBeliefConfidenceInput): Promise<BeliefConfidenceUpdateResult>;
|
|
274
|
-
export declare function archiveBelief(port: BeliefPort, input: ArchiveBeliefInput): Promise<BeliefArchiveResult>;
|
|
275
|
-
export declare function getBeliefLineage(port: BeliefPort, args: {
|
|
276
|
-
id: string;
|
|
277
|
-
}): Promise<BeliefLineageResult>;
|
|
278
|
-
export declare function getBeliefConfidenceHistory(port: BeliefPort, args: {
|
|
279
|
-
id: string;
|
|
280
|
-
}): Promise<BeliefConfidenceHistoryResult>;
|
|
281
|
-
export declare function createBeliefContract(port: BeliefPort, request: CreateBeliefContractRequest): Promise<BeliefContractCreateResult>;
|
|
282
|
-
export declare function bisectBeliefConfidence(port: BeliefPort, input: BisectBeliefConfidenceInput): Promise<BeliefBisectResult>;
|
|
283
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./beliefs";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ContextPackV1 } from "../../../contracts/src/context-pack.contract";
|
|
2
|
-
import { type CompileContextCommand, type CompileContextPorts } from "./ports";
|
|
3
|
-
import type { PublicCompiledContext } from "./public-types";
|
|
4
|
-
export declare class ContextCompileError extends Error {
|
|
5
|
-
readonly code: string;
|
|
6
|
-
readonly status: number;
|
|
7
|
-
constructor(code: string, message: string, status: number);
|
|
8
|
-
}
|
|
9
|
-
export declare function isContextCompileError(error: unknown): error is ContextCompileError;
|
|
10
|
-
export declare function toPublicCompiledContext(pack: ContextPackV1): PublicCompiledContext;
|
|
11
|
-
export declare function compileContext(ports: CompileContextPorts, input: CompileContextCommand): Promise<PublicCompiledContext>;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { ContextCompilationMode, ContextPackV1, ContextRankingProfile, PackWeightOverride } from "../../../contracts/src/context-pack.contract";
|
|
2
|
-
export type CompileContextCommand = {
|
|
3
|
-
topicId?: string;
|
|
4
|
-
projectId?: string;
|
|
5
|
-
query?: string;
|
|
6
|
-
budget?: number;
|
|
7
|
-
ranking?: ContextRankingProfile;
|
|
8
|
-
limit?: number;
|
|
9
|
-
maxDepth?: number;
|
|
10
|
-
includeEntities?: boolean;
|
|
11
|
-
mode?: ContextCompilationMode;
|
|
12
|
-
includeFailures?: boolean;
|
|
13
|
-
worktreeId?: string;
|
|
14
|
-
sessionId?: string;
|
|
15
|
-
packWeightOverrides?: PackWeightOverride[];
|
|
16
|
-
/** @deprecated Use budget. */
|
|
17
|
-
tokenBudget?: number;
|
|
18
|
-
/** @deprecated Use ranking. */
|
|
19
|
-
rankingProfile?: ContextRankingProfile;
|
|
20
|
-
actorPrincipalId?: string;
|
|
21
|
-
policyTraceId?: string | null;
|
|
22
|
-
allowedTopicIds?: string[];
|
|
23
|
-
};
|
|
24
|
-
export type CompileContextPortInput = {
|
|
25
|
-
topicId: string;
|
|
26
|
-
projectId: string;
|
|
27
|
-
query?: string;
|
|
28
|
-
budget?: number;
|
|
29
|
-
ranking?: ContextRankingProfile;
|
|
30
|
-
limit?: number;
|
|
31
|
-
maxDepth?: number;
|
|
32
|
-
includeEntities?: boolean;
|
|
33
|
-
mode?: ContextCompilationMode;
|
|
34
|
-
includeFailures?: boolean;
|
|
35
|
-
worktreeId?: string;
|
|
36
|
-
sessionId?: string;
|
|
37
|
-
packWeightOverrides?: PackWeightOverride[];
|
|
38
|
-
allowedTopicIds: string[];
|
|
39
|
-
};
|
|
40
|
-
export type ContextCompilerPort = {
|
|
41
|
-
compile(input: CompileContextPortInput): Promise<ContextPackV1>;
|
|
42
|
-
};
|
|
43
|
-
export type ContextPolicyPort = {
|
|
44
|
-
filterReadableTopicIds(input: {
|
|
45
|
-
topicIds: string[];
|
|
46
|
-
actorPrincipalId: string;
|
|
47
|
-
traceId?: string | null;
|
|
48
|
-
}): Promise<string[]>;
|
|
49
|
-
listReadableTopicIds(input: {
|
|
50
|
-
actorPrincipalId: string;
|
|
51
|
-
traceId?: string | null;
|
|
52
|
-
}): Promise<string[]>;
|
|
53
|
-
};
|
|
54
|
-
export type CompileContextPorts = {
|
|
55
|
-
compiler: ContextCompilerPort;
|
|
56
|
-
policy?: ContextPolicyPort;
|
|
57
|
-
requireAuth?: boolean;
|
|
58
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { PublicCompiledContext, PublicContextBelief, PublicContextContradiction, PublicContextEntity, PublicContextEvidence, PublicContextInjectionPolicy, PublicContextQuestion, } from "../../../contracts/src/context-pack.contract";
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
type PublicSeverity = "low" | "medium" | "high" | "critical";
|
|
2
|
-
type DefeatType = "rebuts" | "undercuts" | "undermines";
|
|
3
|
-
export type ContradictionRecord = {
|
|
4
|
-
id: string;
|
|
5
|
-
contradictionId: string;
|
|
6
|
-
topicId?: string;
|
|
7
|
-
beliefA: string;
|
|
8
|
-
beliefB: string;
|
|
9
|
-
description: string;
|
|
10
|
-
severity: PublicSeverity;
|
|
11
|
-
status: string;
|
|
12
|
-
defeatType: DefeatType;
|
|
13
|
-
createdAt?: number;
|
|
14
|
-
updatedAt?: number;
|
|
15
|
-
metadata?: Record<string, unknown>;
|
|
16
|
-
};
|
|
17
|
-
export type ContradictionListResult = {
|
|
18
|
-
contradictions: ContradictionRecord[];
|
|
19
|
-
nextCursor: null;
|
|
20
|
-
};
|
|
21
|
-
export type FlagContradictionInput = {
|
|
22
|
-
beliefA: string;
|
|
23
|
-
beliefB: string;
|
|
24
|
-
description: string;
|
|
25
|
-
topicId: string;
|
|
26
|
-
severity?: string;
|
|
27
|
-
defeatType?: string;
|
|
28
|
-
};
|
|
29
|
-
export type ListContradictionsQuery = {
|
|
30
|
-
topicId: string;
|
|
31
|
-
status?: string;
|
|
32
|
-
limit?: number;
|
|
33
|
-
cursor?: string;
|
|
34
|
-
};
|
|
35
|
-
type PortSeverity = "critical" | "significant" | "minor";
|
|
36
|
-
type FlagContradictionPortInput = {
|
|
37
|
-
beliefARawId: string;
|
|
38
|
-
beliefBRawId: string;
|
|
39
|
-
description: string;
|
|
40
|
-
topicId: string;
|
|
41
|
-
severity: PortSeverity;
|
|
42
|
-
publicSeverity: PublicSeverity;
|
|
43
|
-
defeatType: DefeatType;
|
|
44
|
-
};
|
|
45
|
-
export type ContradictionsPort = {
|
|
46
|
-
fetchBelief: (rawId: string) => Promise<unknown | null>;
|
|
47
|
-
flagContradiction: (input: FlagContradictionPortInput) => Promise<unknown>;
|
|
48
|
-
listByTopic: (args: {
|
|
49
|
-
topicId: string;
|
|
50
|
-
limit?: number;
|
|
51
|
-
}) => Promise<unknown[]>;
|
|
52
|
-
getById: (id: string) => Promise<unknown | null>;
|
|
53
|
-
};
|
|
54
|
-
export declare function flagContradiction(deps: ContradictionsPort, input: FlagContradictionInput): Promise<ContradictionRecord>;
|
|
55
|
-
export declare function listContradictions(deps: ContradictionsPort, query: ListContradictionsQuery): Promise<ContradictionListResult>;
|
|
56
|
-
export declare function getContradiction(deps: ContradictionsPort, input: {
|
|
57
|
-
id: string;
|
|
58
|
-
}): Promise<ContradictionRecord>;
|
|
59
|
-
export {};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
type EdgeDirection = "up" | "down" | "both";
|
|
2
|
-
export type EdgeRecord = {
|
|
3
|
-
id: string;
|
|
4
|
-
edgeId: string;
|
|
5
|
-
globalId?: string;
|
|
6
|
-
sourceId: string;
|
|
7
|
-
targetId: string;
|
|
8
|
-
edgeType: string;
|
|
9
|
-
topicId?: string;
|
|
10
|
-
confidence?: number;
|
|
11
|
-
weight?: number;
|
|
12
|
-
context?: string;
|
|
13
|
-
fromLayer?: string;
|
|
14
|
-
toLayer?: string;
|
|
15
|
-
isDuplicate?: boolean;
|
|
16
|
-
createdAt?: number;
|
|
17
|
-
updatedAt?: number;
|
|
18
|
-
metadata?: Record<string, unknown>;
|
|
19
|
-
};
|
|
20
|
-
export type EdgeListResult = {
|
|
21
|
-
edges: EdgeRecord[];
|
|
22
|
-
nextCursor: null;
|
|
23
|
-
};
|
|
24
|
-
export type EdgeTraversalNode = {
|
|
25
|
-
id: string;
|
|
26
|
-
nodeId: string;
|
|
27
|
-
globalId?: string;
|
|
28
|
-
nodeType?: string;
|
|
29
|
-
text?: string;
|
|
30
|
-
confidence?: number;
|
|
31
|
-
depth?: number;
|
|
32
|
-
topicId?: string;
|
|
33
|
-
metadata?: Record<string, unknown>;
|
|
34
|
-
};
|
|
35
|
-
export type EdgeTraversalResult = {
|
|
36
|
-
startNode: string;
|
|
37
|
-
direction: EdgeDirection;
|
|
38
|
-
maxDepth: number;
|
|
39
|
-
nodes: EdgeTraversalNode[];
|
|
40
|
-
edges: EdgeRecord[];
|
|
41
|
-
depth: number;
|
|
42
|
-
};
|
|
43
|
-
export type CreateEdgeInput = {
|
|
44
|
-
sourceId: string;
|
|
45
|
-
targetId: string;
|
|
46
|
-
edgeType: string;
|
|
47
|
-
topicId?: string;
|
|
48
|
-
confidence?: number;
|
|
49
|
-
weight?: number;
|
|
50
|
-
context?: string;
|
|
51
|
-
};
|
|
52
|
-
export type ListEdgesQuery = {
|
|
53
|
-
sourceId: string;
|
|
54
|
-
edgeType?: string;
|
|
55
|
-
limit?: number;
|
|
56
|
-
cursor?: string;
|
|
57
|
-
};
|
|
58
|
-
export type TraverseEdgesInput = {
|
|
59
|
-
startNode: string;
|
|
60
|
-
direction?: string;
|
|
61
|
-
maxDepth?: number;
|
|
62
|
-
topicId?: string;
|
|
63
|
-
};
|
|
64
|
-
type EdgeCreatePortInput = {
|
|
65
|
-
sourceRawId: string;
|
|
66
|
-
targetRawId: string;
|
|
67
|
-
edgeType: string;
|
|
68
|
-
topicId?: string;
|
|
69
|
-
confidence?: number;
|
|
70
|
-
weight?: number;
|
|
71
|
-
context?: string;
|
|
72
|
-
};
|
|
73
|
-
type EdgeTraversePortInput = {
|
|
74
|
-
startNode: string;
|
|
75
|
-
direction: EdgeDirection;
|
|
76
|
-
maxDepth: number;
|
|
77
|
-
topicId?: string;
|
|
78
|
-
};
|
|
79
|
-
export type EdgePort = {
|
|
80
|
-
createEdge: (input: EdgeCreatePortInput) => Promise<unknown>;
|
|
81
|
-
listEdgesBySource: (args: {
|
|
82
|
-
sourceRawId: string;
|
|
83
|
-
edgeType?: string;
|
|
84
|
-
limit?: number;
|
|
85
|
-
}) => Promise<unknown[]>;
|
|
86
|
-
traverseEdges: (input: EdgeTraversePortInput) => Promise<unknown>;
|
|
87
|
-
};
|
|
88
|
-
export declare function createEdge(deps: EdgePort, input: CreateEdgeInput): Promise<EdgeRecord>;
|
|
89
|
-
export declare function listEdges(deps: EdgePort, query: ListEdgesQuery): Promise<EdgeListResult>;
|
|
90
|
-
export declare function traverseEdges(deps: EdgePort, input: TraverseEdgesInput): Promise<EdgeTraversalResult>;
|
|
91
|
-
export {};
|
|
@@ -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";
|