@lucern/sdk 0.2.0-alpha.1
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 +97 -0
- package/dist/index.js +8980 -0
- package/dist/index.js.map +1 -0
- package/dist/lucern/contracts/src/auth-session.contract.d.ts +53 -0
- package/dist/lucern/contracts/src/context-pack.contract.d.ts +494 -0
- package/dist/lucern/contracts/src/lens-filter.contract.d.ts +70 -0
- 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/lucern/packages/domain-context/src/context-pack-compiler.d.ts +101 -0
- 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/packages/sdk/src/audiencesClient.d.ts +87 -0
- package/dist/packages/sdk/src/auditClient.d.ts +23 -0
- package/dist/packages/sdk/src/beliefsClient.d.ts +54 -0
- package/dist/packages/sdk/src/client.d.ts +1610 -0
- package/dist/packages/sdk/src/contextClient.d.ts +9 -0
- package/dist/packages/sdk/src/contracts/api-enums.contract.d.ts +58 -0
- package/dist/packages/sdk/src/controlObjectOwnership.d.ts +293 -0
- package/dist/packages/sdk/src/coreClient.d.ts +120 -0
- package/dist/packages/sdk/src/customTools.d.ts +65 -0
- package/dist/packages/sdk/src/decisionsClient.d.ts +110 -0
- package/dist/packages/sdk/src/graphClient.d.ts +209 -0
- package/dist/packages/sdk/src/harnessClient.d.ts +222 -0
- 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 +43 -0
- package/dist/packages/sdk/src/mcpParityClient.d.ts +68 -0
- package/dist/packages/sdk/src/mcpParitySurface.d.ts +8 -0
- package/dist/packages/sdk/src/ontologyClient.d.ts +115 -0
- package/dist/packages/sdk/src/packsClient.d.ts +101 -0
- package/dist/packages/sdk/src/policyClient.d.ts +204 -0
- 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 +56 -0
- package/dist/packages/sdk/src/topicsClient.d.ts +45 -0
- package/dist/packages/sdk/src/types.d.ts +489 -0
- package/dist/packages/sdk/src/version.d.ts +2 -0
- package/dist/packages/sdk/src/workflowClient.d.ts +274 -0
- package/package.json +56 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { ArchiveBeliefInput, BeliefArchiveResult, BeliefBisectResult, BeliefConfidenceHistoryResult, BeliefConfidenceUpdateResult, BeliefContractCreateInput, BeliefContractCreateResult, BeliefLineageResult, BeliefListResult, BeliefRefineInput, BeliefRecord, BisectBeliefConfidenceInput, CreateBeliefInput, ForkBeliefInput, ListBeliefsQuery, UpdateBeliefConfidenceInput } from "@/lucern/packages/domain-beliefs/src/beliefs";
|
|
3
|
+
export type BeliefsClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type BeliefsGetResponse = PlatformGatewaySuccess<BeliefRecord>;
|
|
5
|
+
export type BeliefsCreateResponse = PlatformGatewaySuccess<BeliefRecord>;
|
|
6
|
+
export type BeliefsListResponse = PlatformGatewaySuccess<BeliefListResult>;
|
|
7
|
+
export type BeliefsRefineResponse = PlatformGatewaySuccess<BeliefRecord>;
|
|
8
|
+
export type BeliefsForkResponse = PlatformGatewaySuccess<BeliefRecord & {
|
|
9
|
+
parentBeliefId: string;
|
|
10
|
+
forkReason: string;
|
|
11
|
+
}>;
|
|
12
|
+
export type BeliefsUpdateConfidenceResponse = PlatformGatewaySuccess<BeliefConfidenceUpdateResult>;
|
|
13
|
+
export type BeliefsArchiveResponse = PlatformGatewaySuccess<BeliefArchiveResult>;
|
|
14
|
+
export type BeliefsLineageResponse = PlatformGatewaySuccess<BeliefLineageResult>;
|
|
15
|
+
export type BeliefsConfidenceHistoryResponse = PlatformGatewaySuccess<BeliefConfidenceHistoryResult>;
|
|
16
|
+
export type BeliefsCreateContractResponse = PlatformGatewaySuccess<BeliefContractCreateResult>;
|
|
17
|
+
export type BeliefsBisectResponse = PlatformGatewaySuccess<BeliefBisectResult>;
|
|
18
|
+
export declare function createBeliefsClientCore(config?: BeliefsClientCoreConfig): {
|
|
19
|
+
create(input: CreateBeliefInput, idempotencyKey?: string): Promise<BeliefsCreateResponse>;
|
|
20
|
+
get(id: string): Promise<BeliefsGetResponse>;
|
|
21
|
+
list(query: ListBeliefsQuery): Promise<BeliefsListResponse>;
|
|
22
|
+
refine(id: string, input: Omit<BeliefRefineInput, "id">, idempotencyKey?: string): Promise<BeliefsRefineResponse>;
|
|
23
|
+
fork(id: string, input: Omit<ForkBeliefInput, "id">, idempotencyKey?: string): Promise<BeliefsForkResponse>;
|
|
24
|
+
updateConfidence(id: string, input: Omit<UpdateBeliefConfidenceInput, "id">, idempotencyKey?: string): Promise<BeliefsUpdateConfidenceResponse>;
|
|
25
|
+
archive(id: string, input?: Omit<ArchiveBeliefInput, "id">, idempotencyKey?: string): Promise<BeliefsArchiveResponse>;
|
|
26
|
+
lineage(id: string): Promise<BeliefsLineageResponse>;
|
|
27
|
+
confidenceHistory(id: string): Promise<BeliefsConfidenceHistoryResponse>;
|
|
28
|
+
createContract(id: string, input: BeliefContractCreateInput, idempotencyKey?: string): Promise<BeliefsCreateContractResponse>;
|
|
29
|
+
bisect(id: string, input: Omit<BisectBeliefConfidenceInput, "id">, idempotencyKey?: string): Promise<BeliefsBisectResponse>;
|
|
30
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ContextCompilationMode, ContextRankingProfile, PackWeightOverride } from "../../../contracts/src/context-pack.contract";
|
|
2
|
+
export type CompileContextInput = {
|
|
3
|
+
query?: string;
|
|
4
|
+
budget?: number;
|
|
5
|
+
ranking?: ContextRankingProfile;
|
|
6
|
+
limit?: number;
|
|
7
|
+
maxDepth?: number;
|
|
8
|
+
includeEntities?: boolean;
|
|
9
|
+
mode?: ContextCompilationMode;
|
|
10
|
+
includeFailures?: boolean;
|
|
11
|
+
worktreeId?: string;
|
|
12
|
+
sessionId?: string;
|
|
13
|
+
packWeightOverrides?: PackWeightOverride[];
|
|
14
|
+
/** @deprecated Use budget. */
|
|
15
|
+
tokenBudget?: number;
|
|
16
|
+
/** @deprecated Use ranking. */
|
|
17
|
+
rankingProfile?: ContextRankingProfile;
|
|
18
|
+
};
|
|
19
|
+
export type ContextClientRequest = {
|
|
20
|
+
path: "/api/platform/v1/context/compile";
|
|
21
|
+
method: "POST";
|
|
22
|
+
body: Record<string, unknown>;
|
|
23
|
+
};
|
|
24
|
+
export declare function buildCompileContextRequest(topicId: string, input?: CompileContextInput): ContextClientRequest;
|
|
25
|
+
export declare function createContextClientCore<TResult>(deps: {
|
|
26
|
+
execute(request: ContextClientRequest): Promise<TResult>;
|
|
27
|
+
}): {
|
|
28
|
+
compile(topicId: string, input?: CompileContextInput): Promise<TResult>;
|
|
29
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { ContradictionListResult, ContradictionRecord, FlagContradictionInput, ListContradictionsQuery } from "@/lucern/packages/domain-edges/src/contradictions";
|
|
3
|
+
export type ContradictionsClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type ContradictionsFlagResponse = PlatformGatewaySuccess<ContradictionRecord>;
|
|
5
|
+
export type ContradictionsListResponse = PlatformGatewaySuccess<ContradictionListResult>;
|
|
6
|
+
export type ContradictionsGetResponse = PlatformGatewaySuccess<ContradictionRecord>;
|
|
7
|
+
export declare function createContradictionsClient(config?: ContradictionsClientCoreConfig): {
|
|
8
|
+
flag(input: FlagContradictionInput, idempotencyKey?: string): Promise<ContradictionsFlagResponse>;
|
|
9
|
+
list(query: ListContradictionsQuery): Promise<ContradictionsListResponse>;
|
|
10
|
+
get(id: string): Promise<ContradictionsGetResponse>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { CreateEdgeInput, EdgeListResult, EdgeRecord, EdgeTraversalResult, ListEdgesQuery, TraverseEdgesInput } from "@/lucern/packages/domain-edges/src/edges";
|
|
3
|
+
export type EdgesClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type EdgesCreateResponse = PlatformGatewaySuccess<EdgeRecord>;
|
|
5
|
+
export type EdgesListResponse = PlatformGatewaySuccess<EdgeListResult>;
|
|
6
|
+
export type EdgesTraverseResponse = PlatformGatewaySuccess<EdgeTraversalResult>;
|
|
7
|
+
export declare function createEdgesClient(config?: EdgesClientCoreConfig): {
|
|
8
|
+
create(input: CreateEdgeInput, idempotencyKey?: string): Promise<EdgesCreateResponse>;
|
|
9
|
+
list(query: ListEdgesQuery): Promise<EdgesListResponse>;
|
|
10
|
+
traverse(input: TraverseEdgesInput, idempotencyKey?: string): Promise<EdgesTraverseResponse>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { EventListQuery, EventListResult, ReplayEventsInput, ReplayEventsResult } from "@/lucern/packages/events/src/types";
|
|
3
|
+
export type EventsClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type EventsListResponse = PlatformGatewaySuccess<EventListResult>;
|
|
5
|
+
export type EventsReplayResponse = PlatformGatewaySuccess<ReplayEventsResult>;
|
|
6
|
+
export declare function createEventsClientCore(config?: EventsClientCoreConfig): {
|
|
7
|
+
list(query?: EventListQuery): Promise<EventsListResponse>;
|
|
8
|
+
replay(input: ReplayEventsInput, idempotencyKey?: string): Promise<EventsReplayResponse>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { CreateEvidenceInput, EvidenceListResult, EvidenceRecord, EvidenceSearchPage, LinkEvidenceResult, ListEvidenceQuery, SearchEvidenceQuery } from "@/lucern/packages/domain-evidence/src/evidence";
|
|
3
|
+
export type EvidenceClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type EvidenceGetResponse = PlatformGatewaySuccess<EvidenceRecord>;
|
|
5
|
+
export type EvidenceCreateResponse = PlatformGatewaySuccess<EvidenceRecord>;
|
|
6
|
+
export type EvidenceListResponse = PlatformGatewaySuccess<EvidenceListResult>;
|
|
7
|
+
export type EvidenceSearchResponse = PlatformGatewaySuccess<EvidenceSearchPage>;
|
|
8
|
+
export type EvidenceLinkResponse = PlatformGatewaySuccess<LinkEvidenceResult>;
|
|
9
|
+
export declare function createEvidenceClient(config?: EvidenceClientCoreConfig): {
|
|
10
|
+
create(input: CreateEvidenceInput, idempotencyKey?: string): Promise<EvidenceCreateResponse>;
|
|
11
|
+
get(id: string): Promise<EvidenceGetResponse>;
|
|
12
|
+
list(query: ListEvidenceQuery): Promise<EvidenceListResponse>;
|
|
13
|
+
link(input: {
|
|
14
|
+
evidenceId: string;
|
|
15
|
+
targetId: string;
|
|
16
|
+
targetType?: "belief" | "question";
|
|
17
|
+
weight?: number;
|
|
18
|
+
rationale?: string;
|
|
19
|
+
}, idempotencyKey?: string): Promise<EvidenceLinkResponse>;
|
|
20
|
+
search(query: SearchEvidenceQuery, idempotencyKey?: string): Promise<EvidenceSearchResponse>;
|
|
21
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { GraphAnalyzeInput, GraphAnalyzeResult, GraphBiasInput, GraphBiasResult, GraphFalsifyInput, GraphFalsifyResult, GraphGapsInput, GraphGapsResult, GraphNeighborhoodInput, GraphNeighborhoodResult, GraphTraverseInput, GraphTraverseResult } from "@/lucern/packages/domain-graph/src/graph";
|
|
3
|
+
export type GraphClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type GraphNeighborhoodResponse = PlatformGatewaySuccess<GraphNeighborhoodResult>;
|
|
5
|
+
export type GraphTraverseResponse = PlatformGatewaySuccess<GraphTraverseResult>;
|
|
6
|
+
export type GraphAnalyzeResponse = PlatformGatewaySuccess<GraphAnalyzeResult>;
|
|
7
|
+
export type GraphBiasResponse = PlatformGatewaySuccess<GraphBiasResult>;
|
|
8
|
+
export type GraphGapsResponse = PlatformGatewaySuccess<GraphGapsResult>;
|
|
9
|
+
export type GraphFalsifyResponse = PlatformGatewaySuccess<GraphFalsifyResult>;
|
|
10
|
+
export declare function createGraphClient(config?: GraphClientCoreConfig): {
|
|
11
|
+
neighborhood(input: GraphNeighborhoodInput): Promise<GraphNeighborhoodResponse>;
|
|
12
|
+
traverse(input: GraphTraverseInput): Promise<GraphTraverseResponse>;
|
|
13
|
+
analyze(input: GraphAnalyzeInput): Promise<GraphAnalyzeResponse>;
|
|
14
|
+
bias(input: GraphBiasInput): Promise<GraphBiasResponse>;
|
|
15
|
+
gaps(input: GraphGapsInput): Promise<GraphGapsResponse>;
|
|
16
|
+
falsify(input: GraphFalsifyInput): Promise<GraphFalsifyResponse>;
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { IdentitySummary } from "@/lucern/packages/domain-identity/src/whoami";
|
|
3
|
+
export type IdentityClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type IdentityWhoamiResponse = PlatformGatewaySuccess<IdentitySummary>;
|
|
5
|
+
export declare function createIdentityWhoamiClient(config?: IdentityClientCoreConfig): {
|
|
6
|
+
whoami(): Promise<IdentityWhoamiResponse>;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type DecodedPrefixedId = {
|
|
2
|
+
prefix: string;
|
|
3
|
+
value: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function encodePrefixedId(prefix: string, value: string): string;
|
|
6
|
+
export declare function decodePrefixedId(id: string): DecodedPrefixedId;
|
|
7
|
+
export declare function hasPrefixedIdPrefix(id: string, prefix: string): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { BindOntologyInput, OntologyBindingResult, OntologyListQuery, OntologyListResult, OntologyMatchInput, OntologyMatchResult, OntologyRecord } from "@/lucern/packages/domain-ontologies/src/ontologies";
|
|
3
|
+
export type OntologiesClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type OntologiesGetResponse = PlatformGatewaySuccess<OntologyRecord>;
|
|
5
|
+
export type OntologiesListResponse = PlatformGatewaySuccess<OntologyListResult>;
|
|
6
|
+
export type OntologiesBindResponse = PlatformGatewaySuccess<OntologyBindingResult>;
|
|
7
|
+
export type OntologiesMatchResponse = PlatformGatewaySuccess<OntologyMatchResult>;
|
|
8
|
+
export declare function createOntologiesClientCore(config?: OntologiesClientCoreConfig): {
|
|
9
|
+
get(id: string): Promise<OntologiesGetResponse>;
|
|
10
|
+
list(query?: OntologyListQuery): Promise<OntologiesListResponse>;
|
|
11
|
+
bind(input: BindOntologyInput, idempotencyKey?: string): Promise<OntologiesBindResponse>;
|
|
12
|
+
match(input: OntologyMatchInput, idempotencyKey?: string): Promise<OntologiesMatchResponse>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { CreateQuestionInput, ListQuestionsQuery, QuestionArchiveResult, QuestionAnswerResult, QuestionListResult, QuestionRecord } from "@/lucern/packages/domain-questions/src/questions";
|
|
3
|
+
export type QuestionsClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type QuestionsCreateResponse = PlatformGatewaySuccess<QuestionRecord>;
|
|
5
|
+
export type QuestionsGetResponse = PlatformGatewaySuccess<QuestionRecord>;
|
|
6
|
+
export type QuestionsListResponse = PlatformGatewaySuccess<QuestionListResult>;
|
|
7
|
+
export type QuestionsRefineResponse = PlatformGatewaySuccess<QuestionRecord & {
|
|
8
|
+
previousText: string;
|
|
9
|
+
updatedText: string;
|
|
10
|
+
}>;
|
|
11
|
+
export type QuestionsUpdateStatusResponse = PlatformGatewaySuccess<QuestionRecord & {
|
|
12
|
+
previousStatus: string;
|
|
13
|
+
newStatus: string;
|
|
14
|
+
}>;
|
|
15
|
+
export type QuestionsArchiveResponse = PlatformGatewaySuccess<QuestionArchiveResult>;
|
|
16
|
+
export type QuestionsAnswerResponse = PlatformGatewaySuccess<QuestionAnswerResult>;
|
|
17
|
+
export declare function createQuestionsClient(config?: QuestionsClientCoreConfig): {
|
|
18
|
+
create(input: CreateQuestionInput, idempotencyKey?: string): Promise<QuestionsCreateResponse>;
|
|
19
|
+
get(id: string): Promise<QuestionsGetResponse>;
|
|
20
|
+
list(query: ListQuestionsQuery): Promise<QuestionsListResponse>;
|
|
21
|
+
answer(id: string, input: {
|
|
22
|
+
text: string;
|
|
23
|
+
confidence?: string;
|
|
24
|
+
evidenceIds?: string[];
|
|
25
|
+
rationale?: string;
|
|
26
|
+
}, idempotencyKey?: string): Promise<QuestionsAnswerResponse>;
|
|
27
|
+
refine(id: string, input: {
|
|
28
|
+
text: string;
|
|
29
|
+
rationale?: string;
|
|
30
|
+
}, idempotencyKey?: string): Promise<QuestionsRefineResponse>;
|
|
31
|
+
archive(id: string, input?: {
|
|
32
|
+
reason?: string;
|
|
33
|
+
rationale?: string;
|
|
34
|
+
}, idempotencyKey?: string): Promise<QuestionsArchiveResponse>;
|
|
35
|
+
updateStatus(id: string, input: {
|
|
36
|
+
status: string;
|
|
37
|
+
rationale?: string;
|
|
38
|
+
}, idempotencyKey?: string): Promise<QuestionsUpdateStatusResponse>;
|
|
39
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { SearchInput, SearchResponse } from "@/lucern/packages/domain-search/src/search";
|
|
3
|
+
export type SearchClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type SearchResourcesResponse = PlatformGatewaySuccess<SearchResponse>;
|
|
5
|
+
export declare function createSearchClient(config?: SearchClientCoreConfig): {
|
|
6
|
+
query(input: SearchInput): Promise<SearchResourcesResponse>;
|
|
7
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { CompleteTaskInput, CreateTaskInput, ListTasksQuery, TaskListResult, TaskRecord, UpdateTaskInput } from "@/lucern/packages/domain-tasks/src/tasks";
|
|
3
|
+
export type TasksClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type TasksCreateResponse = PlatformGatewaySuccess<TaskRecord>;
|
|
5
|
+
export type TasksUpdateResponse = PlatformGatewaySuccess<TaskRecord>;
|
|
6
|
+
export type TasksCompleteResponse = PlatformGatewaySuccess<TaskRecord>;
|
|
7
|
+
export type TasksListResponse = PlatformGatewaySuccess<TaskListResult>;
|
|
8
|
+
export declare function createTasksClientCore(config?: TasksClientCoreConfig): {
|
|
9
|
+
create(input: CreateTaskInput, idempotencyKey?: string): Promise<TasksCreateResponse>;
|
|
10
|
+
update(input: UpdateTaskInput, idempotencyKey?: string): Promise<TasksUpdateResponse>;
|
|
11
|
+
complete(input: CompleteTaskInput, idempotencyKey?: string): Promise<TasksCompleteResponse>;
|
|
12
|
+
list(query: ListTasksQuery): Promise<TasksListResponse>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { CreateTopicInput, GetTopicCoverageInput, GetTopicTreeInput, ListTopicsQuery, TopicCoverageResult, TopicListResult, TopicRecord, TopicTreeResult, UpdateTopicInput } from "@/lucern/packages/domain-topics/src/topics";
|
|
3
|
+
export type TopicsClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type TopicsCreateResponse = PlatformGatewaySuccess<TopicRecord>;
|
|
5
|
+
export type TopicsGetResponse = PlatformGatewaySuccess<TopicRecord>;
|
|
6
|
+
export type TopicsListResponse = PlatformGatewaySuccess<TopicListResult>;
|
|
7
|
+
export type TopicsUpdateResponse = PlatformGatewaySuccess<TopicRecord>;
|
|
8
|
+
export type TopicsTreeResponse = PlatformGatewaySuccess<TopicTreeResult>;
|
|
9
|
+
export type TopicsCoverageResponse = PlatformGatewaySuccess<TopicCoverageResult>;
|
|
10
|
+
export declare function createTopicsClientCore(config?: TopicsClientCoreConfig): {
|
|
11
|
+
create(input: CreateTopicInput, idempotencyKey?: string): Promise<TopicsCreateResponse>;
|
|
12
|
+
get(id: string): Promise<TopicsGetResponse>;
|
|
13
|
+
list(query?: ListTopicsQuery): Promise<TopicsListResponse>;
|
|
14
|
+
update(input: UpdateTopicInput, idempotencyKey?: string): Promise<TopicsUpdateResponse>;
|
|
15
|
+
tree(input: GetTopicTreeInput): Promise<TopicsTreeResponse>;
|
|
16
|
+
coverage(input: GetTopicCoverageInput): Promise<TopicsCoverageResponse>;
|
|
17
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { WebhookCreateInput, WebhookDeliveriesResult, WebhookHealthResult, WebhookRecord, WebhookTestResult, WebhookUpdateInput } from "@/lucern/packages/events/src/types";
|
|
3
|
+
export type WebhooksClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type WebhookListQuery = {
|
|
5
|
+
topicId?: string;
|
|
6
|
+
};
|
|
7
|
+
export type WebhookDeliveriesQuery = {
|
|
8
|
+
limit?: number;
|
|
9
|
+
};
|
|
10
|
+
export type WebhookDeleteResult = {
|
|
11
|
+
webhookId: string;
|
|
12
|
+
deleted: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type WebhooksCreateResponse = PlatformGatewaySuccess<WebhookRecord>;
|
|
15
|
+
export type WebhooksListResponse = PlatformGatewaySuccess<{
|
|
16
|
+
webhooks: WebhookRecord[];
|
|
17
|
+
}>;
|
|
18
|
+
export type WebhooksGetResponse = PlatformGatewaySuccess<WebhookRecord>;
|
|
19
|
+
export type WebhooksUpdateResponse = PlatformGatewaySuccess<WebhookRecord>;
|
|
20
|
+
export type WebhooksDeleteResponse = PlatformGatewaySuccess<WebhookDeleteResult>;
|
|
21
|
+
export type WebhooksTestResponse = PlatformGatewaySuccess<WebhookTestResult>;
|
|
22
|
+
export type WebhooksDeliveriesResponse = PlatformGatewaySuccess<WebhookDeliveriesResult>;
|
|
23
|
+
export type WebhooksHealthResponse = PlatformGatewaySuccess<WebhookHealthResult>;
|
|
24
|
+
export declare function createWebhooksClientCore(config?: WebhooksClientCoreConfig): {
|
|
25
|
+
create(input: WebhookCreateInput, idempotencyKey?: string): Promise<WebhooksCreateResponse>;
|
|
26
|
+
list(query?: WebhookListQuery): Promise<WebhooksListResponse>;
|
|
27
|
+
get(id: string): Promise<WebhooksGetResponse>;
|
|
28
|
+
update(id: string, input: WebhookUpdateInput, idempotencyKey?: string): Promise<WebhooksUpdateResponse>;
|
|
29
|
+
delete(id: string, idempotencyKey?: string): Promise<WebhooksDeleteResponse>;
|
|
30
|
+
test(id: string, input?: {
|
|
31
|
+
topicId?: string;
|
|
32
|
+
}, idempotencyKey?: string): Promise<WebhooksTestResponse>;
|
|
33
|
+
deliveries(id: string, query?: WebhookDeliveriesQuery): Promise<WebhooksDeliveriesResponse>;
|
|
34
|
+
health(id: string): Promise<WebhooksHealthResponse>;
|
|
35
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type GatewayClientConfig, type PlatformGatewaySuccess } from "@/packages/sdk/src/coreClient";
|
|
2
|
+
import type { ActivateWorktreeInput, CreateWorktreeInput, ListWorktreesQuery, MergeWorktreeInput, MergeWorktreeResult, UpdateWorktreeInput, UpdateWorktreeTargetsInput, WorktreeListResult, WorktreeRecord } from "@/lucern/packages/domain-worktrees/src/worktrees";
|
|
3
|
+
export type WorktreesClientCoreConfig = GatewayClientConfig;
|
|
4
|
+
export type WorktreesCreateResponse = PlatformGatewaySuccess<WorktreeRecord>;
|
|
5
|
+
export type WorktreesListResponse = PlatformGatewaySuccess<WorktreeListResult>;
|
|
6
|
+
export type WorktreesActivateResponse = PlatformGatewaySuccess<WorktreeRecord>;
|
|
7
|
+
export type WorktreesUpdateResponse = PlatformGatewaySuccess<WorktreeRecord>;
|
|
8
|
+
export type WorktreesTargetsResponse = PlatformGatewaySuccess<WorktreeRecord>;
|
|
9
|
+
export type WorktreesMergeResponse = PlatformGatewaySuccess<MergeWorktreeResult>;
|
|
10
|
+
export declare function createWorktreesClientCore(config?: WorktreesClientCoreConfig): {
|
|
11
|
+
create(input: CreateWorktreeInput, idempotencyKey?: string): Promise<WorktreesCreateResponse>;
|
|
12
|
+
list(query: ListWorktreesQuery): Promise<WorktreesListResponse>;
|
|
13
|
+
activate(input: ActivateWorktreeInput, idempotencyKey?: string): Promise<WorktreesActivateResponse>;
|
|
14
|
+
update(input: UpdateWorktreeInput, idempotencyKey?: string): Promise<WorktreesUpdateResponse>;
|
|
15
|
+
merge(input: MergeWorktreeInput, idempotencyKey?: string): Promise<WorktreesMergeResponse>;
|
|
16
|
+
updateTargets(input: UpdateWorktreeTargetsInput, idempotencyKey?: string): Promise<WorktreesTargetsResponse>;
|
|
17
|
+
};
|
|
@@ -0,0 +1,283 @@
|
|
|
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 {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./beliefs";
|
|
@@ -0,0 +1,11 @@
|
|
|
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>;
|