@lucern/sdk 0.2.0-alpha.12 → 0.2.0-alpha.2
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 +166 -609
- package/dist/index.js +3539 -6269
- package/dist/index.js.map +1 -1
- package/dist/{contracts → lucern/contracts/src}/auth-session.contract.d.ts +12 -14
- package/dist/{contracts → lucern/contracts/src}/context-pack.contract.d.ts +58 -56
- package/dist/{contracts → lucern/contracts/src}/lens-filter.contract.d.ts +8 -10
- package/dist/lucern/contracts/src/lens-workflow.contract.d.ts +84 -0
- package/dist/lucern/contracts/src/mcp-tools.contract.d.ts +151 -0
- package/dist/lucern/contracts/src/workflow-runtime.contract.d.ts +161 -0
- package/dist/lucern/mcp-server/src/context-pack-policy.d.ts +119 -0
- package/dist/lucern/mcp-server/src/context-pack-schema.d.ts +18 -0
- package/dist/lucern/modules/graph-primitives/src/ontology-matching.d.ts +78 -0
- package/dist/lucern/modules/graph-primitives/src/text-matching.d.ts +53 -0
- package/dist/lucern/packages/client-core/src/beliefs.d.ts +30 -0
- package/dist/lucern/packages/client-core/src/context.d.ts +29 -0
- package/dist/lucern/packages/client-core/src/contradictions.d.ts +11 -0
- package/dist/lucern/packages/client-core/src/edges.d.ts +11 -0
- package/dist/lucern/packages/client-core/src/events.d.ts +9 -0
- package/dist/lucern/packages/client-core/src/evidence.d.ts +21 -0
- package/dist/lucern/packages/client-core/src/graph.d.ts +17 -0
- package/dist/lucern/packages/client-core/src/identity.d.ts +7 -0
- package/dist/lucern/packages/client-core/src/ids.d.ts +7 -0
- package/dist/lucern/packages/client-core/src/ontologies.d.ts +13 -0
- package/dist/lucern/packages/client-core/src/questions.d.ts +39 -0
- package/dist/lucern/packages/client-core/src/search.d.ts +7 -0
- package/dist/lucern/packages/client-core/src/tasks.d.ts +13 -0
- package/dist/lucern/packages/client-core/src/topics.d.ts +17 -0
- package/dist/lucern/packages/client-core/src/webhooks.d.ts +35 -0
- package/dist/lucern/packages/client-core/src/worktrees.d.ts +17 -0
- package/dist/lucern/packages/domain-beliefs/src/beliefs.d.ts +283 -0
- package/dist/lucern/packages/domain-beliefs/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-context/src/compile.d.ts +11 -0
- package/dist/{contextPackCompiler.d.ts → lucern/packages/domain-context/src/context-pack-compiler.d.ts} +10 -11
- package/dist/lucern/packages/domain-context/src/index.d.ts +4 -0
- package/dist/lucern/packages/domain-context/src/ports.d.ts +58 -0
- package/dist/lucern/packages/domain-context/src/public-types.d.ts +1 -0
- package/dist/lucern/packages/domain-edges/src/contradictions.d.ts +59 -0
- package/dist/lucern/packages/domain-edges/src/edges.d.ts +91 -0
- package/dist/lucern/packages/domain-edges/src/index.d.ts +2 -0
- package/dist/lucern/packages/domain-evidence/src/evidence.d.ts +115 -0
- package/dist/lucern/packages/domain-evidence/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-graph/src/graph.d.ts +150 -0
- package/dist/lucern/packages/domain-identity/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-identity/src/whoami.d.ts +13 -0
- package/dist/lucern/packages/domain-ontologies/src/ontologies.d.ts +123 -0
- package/dist/lucern/packages/domain-questions/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-questions/src/questions.d.ts +147 -0
- package/dist/lucern/packages/domain-search/src/search.d.ts +97 -0
- package/dist/lucern/packages/domain-tasks/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-tasks/src/tasks.d.ts +102 -0
- package/dist/lucern/packages/domain-topics/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-topics/src/topics.d.ts +147 -0
- package/dist/lucern/packages/domain-worktrees/src/index.d.ts +1 -0
- package/dist/lucern/packages/domain-worktrees/src/worktrees.d.ts +185 -0
- package/dist/lucern/packages/events/src/index.d.ts +4 -0
- package/dist/lucern/packages/events/src/matching.d.ts +3 -0
- package/dist/lucern/packages/events/src/outbox.d.ts +15 -0
- package/dist/lucern/packages/events/src/types.d.ts +151 -0
- package/dist/lucern/packages/events/src/webhooks.d.ts +9 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/beliefs.d.ts +15 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/context.d.ts +12 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/contradictions.d.ts +7 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/edges.d.ts +7 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/events.d.ts +6 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/evidence.d.ts +21 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/graph.d.ts +10 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/identity.d.ts +5 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/ontologies.d.ts +8 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/questions.d.ts +39 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/search.d.ts +5 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/tasks.d.ts +8 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/topics.d.ts +10 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/webhooks.d.ts +16 -0
- package/dist/lucern/packages/sdk-typescript/src/facade/worktrees.d.ts +10 -0
- package/dist/lucern/packages/sdk-typescript/src/index.d.ts +28 -0
- package/dist/packages/sdk/src/adminClient.d.ts +89 -0
- package/dist/packages/sdk/src/answersClient.d.ts +5 -0
- package/dist/{audiencesClient.d.ts → packages/sdk/src/audiencesClient.d.ts} +18 -30
- package/dist/packages/sdk/src/auditClient.d.ts +21 -0
- package/dist/packages/sdk/src/beliefsClient.d.ts +52 -0
- package/dist/packages/sdk/src/client.d.ts +1558 -0
- package/dist/packages/sdk/src/contextClient.d.ts +9 -0
- package/dist/packages/sdk/src/contracts/api-enums.contract.d.ts +58 -0
- package/dist/{controlObjectOwnership.d.ts → packages/sdk/src/controlObjectOwnership.d.ts} +18 -35
- package/dist/{coreClient.d.ts → packages/sdk/src/coreClient.d.ts} +14 -38
- package/dist/packages/sdk/src/customTools.d.ts +65 -0
- package/dist/packages/sdk/src/decisionsClient.d.ts +97 -0
- package/dist/packages/sdk/src/graphClient.d.ts +191 -0
- package/dist/{harnessClient.d.ts → packages/sdk/src/harnessClient.d.ts} +33 -127
- package/dist/packages/sdk/src/identityClient.d.ts +104 -0
- package/dist/packages/sdk/src/index.d.ts +28 -0
- package/dist/packages/sdk/src/learningClient.d.ts +37 -0
- package/dist/{mcpParityClient.d.ts → packages/sdk/src/mcpParityClient.d.ts} +5 -11
- package/dist/packages/sdk/src/mcpParitySurface.d.ts +8 -0
- package/dist/{ontologyClient.d.ts → packages/sdk/src/ontologyClient.d.ts} +22 -44
- package/dist/packages/sdk/src/packsClient.d.ts +101 -0
- package/dist/{policyClient.d.ts → packages/sdk/src/policyClient.d.ts} +18 -113
- package/dist/packages/sdk/src/reportsClient.d.ts +31 -0
- package/dist/packages/sdk/src/schemaClient.d.ts +54 -0
- package/dist/packages/sdk/src/sdkSurface.d.ts +55 -0
- package/dist/packages/sdk/src/topicsClient.d.ts +45 -0
- package/dist/packages/sdk/src/types.d.ts +470 -0
- package/dist/packages/sdk/src/version.d.ts +2 -0
- package/dist/packages/sdk/src/workflowClient.d.ts +252 -0
- package/package.json +37 -92
- package/CHANGELOG.md +0 -13
- package/dist/adminClient.d.ts +0 -409
- package/dist/adminClient.js +0 -755
- package/dist/adminClient.js.map +0 -1
- package/dist/answersClient.d.ts +0 -23
- package/dist/answersClient.js +0 -333
- package/dist/answersClient.js.map +0 -1
- package/dist/audience/index.d.ts +0 -38
- package/dist/audience/index.js +0 -110
- package/dist/audience/index.js.map +0 -1
- package/dist/audiencesClient.js +0 -472
- package/dist/audiencesClient.js.map +0 -1
- package/dist/auditClient.d.ts +0 -29
- package/dist/auditClient.js +0 -386
- package/dist/auditClient.js.map +0 -1
- package/dist/beliefs/index.d.ts +0 -465
- package/dist/beliefs/index.js +0 -6433
- package/dist/beliefs/index.js.map +0 -1
- package/dist/beliefs/lifecycle.d.ts +0 -24
- package/dist/beliefs/lifecycle.js +0 -98
- package/dist/beliefs/lifecycle.js.map +0 -1
- package/dist/beliefsClient.d.ts +0 -241
- package/dist/beliefsClient.js +0 -646
- package/dist/beliefsClient.js.map +0 -1
- package/dist/client.d.ts +0 -2398
- package/dist/client.js +0 -6411
- package/dist/client.js.map +0 -1
- package/dist/contextClient.d.ts +0 -27
- package/dist/contextClient.js +0 -396
- package/dist/contextClient.js.map +0 -1
- package/dist/contextFacade.d.ts +0 -2
- package/dist/contextFacade.js +0 -73
- package/dist/contextFacade.js.map +0 -1
- package/dist/contextPackCompiler.js +0 -1091
- package/dist/contextPackCompiler.js.map +0 -1
- package/dist/contextPackPolicy.d.ts +0 -84
- package/dist/contextPackPolicy.js +0 -347
- package/dist/contextPackPolicy.js.map +0 -1
- package/dist/contextPackSchema.d.ts +0 -7
- package/dist/contextPackSchema.js +0 -203
- package/dist/contextPackSchema.js.map +0 -1
- package/dist/contextTypes.d.ts +0 -135
- package/dist/contextTypes.js +0 -3
- package/dist/contextTypes.js.map +0 -1
- package/dist/contracts/api-enums.contract.d.ts +0 -81
- package/dist/contracts/api-enums.contract.js +0 -98
- package/dist/contracts/api-enums.contract.js.map +0 -1
- package/dist/contracts/auth-session.contract.js +0 -48
- package/dist/contracts/auth-session.contract.js.map +0 -1
- package/dist/contracts/context-pack.contract.js +0 -98
- package/dist/contracts/context-pack.contract.js.map +0 -1
- package/dist/contracts/contextPack.d.ts +0 -1
- package/dist/contracts/contextPack.js +0 -98
- package/dist/contracts/contextPack.js.map +0 -1
- package/dist/contracts/index.d.ts +0 -9
- package/dist/contracts/index.js +0 -4928
- package/dist/contracts/index.js.map +0 -1
- package/dist/contracts/lens-filter.contract.js +0 -71
- package/dist/contracts/lens-filter.contract.js.map +0 -1
- package/dist/contracts/lens-workflow.contract.d.ts +0 -87
- package/dist/contracts/lens-workflow.contract.js +0 -123
- package/dist/contracts/lens-workflow.contract.js.map +0 -1
- package/dist/contracts/lensFilter.d.ts +0 -1
- package/dist/contracts/lensFilter.js +0 -71
- package/dist/contracts/lensFilter.js.map +0 -1
- package/dist/contracts/lensWorkflow.d.ts +0 -2
- package/dist/contracts/lensWorkflow.js +0 -123
- package/dist/contracts/lensWorkflow.js.map +0 -1
- package/dist/contracts/mcp-tools.contract.d.ts +0 -1
- package/dist/contracts/mcp-tools.contract.js +0 -3016
- package/dist/contracts/mcp-tools.contract.js.map +0 -1
- package/dist/contracts/mcpTools.d.ts +0 -1
- package/dist/contracts/mcpTools.js +0 -3016
- package/dist/contracts/mcpTools.js.map +0 -1
- package/dist/contracts/prompt.contract.d.ts +0 -26
- package/dist/contracts/prompt.contract.js +0 -12
- package/dist/contracts/prompt.contract.js.map +0 -1
- package/dist/contracts/prompt.d.ts +0 -1
- package/dist/contracts/prompt.js +0 -12
- package/dist/contracts/prompt.js.map +0 -1
- package/dist/contracts/sdk-tools.contract.d.ts +0 -2
- package/dist/contracts/sdk-tools.contract.js +0 -4164
- package/dist/contracts/sdk-tools.contract.js.map +0 -1
- package/dist/contracts/sdkTools.d.ts +0 -2
- package/dist/contracts/sdkTools.js +0 -4164
- package/dist/contracts/sdkTools.js.map +0 -1
- package/dist/contracts/workflow-runtime.contract.d.ts +0 -163
- package/dist/contracts/workflow-runtime.contract.js +0 -245
- package/dist/contracts/workflow-runtime.contract.js.map +0 -1
- package/dist/contracts/workflowRuntime.d.ts +0 -1
- package/dist/contracts/workflowRuntime.js +0 -245
- package/dist/contracts/workflowRuntime.js.map +0 -1
- package/dist/contradictions/index.d.ts +0 -158
- package/dist/contradictions/index.js +0 -6427
- package/dist/contradictions/index.js.map +0 -1
- package/dist/controlObjectOwnership.js +0 -215
- package/dist/controlObjectOwnership.js.map +0 -1
- package/dist/coreClient.js +0 -339
- package/dist/coreClient.js.map +0 -1
- package/dist/customTools.d.ts +0 -88
- package/dist/customTools.js +0 -248
- package/dist/customTools.js.map +0 -1
- package/dist/decisions/index.d.ts +0 -68
- package/dist/decisions/index.js +0 -6429
- package/dist/decisions/index.js.map +0 -1
- package/dist/decisionsClient.d.ts +0 -111
- package/dist/decisionsClient.js +0 -522
- package/dist/decisionsClient.js.map +0 -1
- package/dist/domainContext.d.ts +0 -1
- package/dist/domainContext.js +0 -3
- package/dist/domainContext.js.map +0 -1
- package/dist/edges/index.d.ts +0 -204
- package/dist/edges/index.js +0 -6428
- package/dist/edges/index.js.map +0 -1
- package/dist/events.d.ts +0 -178
- package/dist/events.js +0 -251
- package/dist/events.js.map +0 -1
- package/dist/eventsCore.d.ts +0 -49
- package/dist/eventsCore.js +0 -429
- package/dist/eventsCore.js.map +0 -1
- package/dist/evidence/index.d.ts +0 -295
- package/dist/evidence/index.js +0 -6428
- package/dist/evidence/index.js.map +0 -1
- package/dist/evidenceClient.d.ts +0 -119
- package/dist/evidenceClient.js +0 -350
- package/dist/evidenceClient.js.map +0 -1
- package/dist/facade/context.d.ts +0 -18
- package/dist/facade/context.js +0 -73
- package/dist/facade/context.js.map +0 -1
- package/dist/gatewayFacades.d.ts +0 -589
- package/dist/gatewayFacades.js +0 -2006
- package/dist/gatewayFacades.js.map +0 -1
- package/dist/graphClient.d.ts +0 -271
- package/dist/graphClient.js +0 -698
- package/dist/graphClient.js.map +0 -1
- package/dist/harnessClient.js +0 -607
- package/dist/harnessClient.js.map +0 -1
- package/dist/identityClient.d.ts +0 -140
- package/dist/identityClient.js +0 -497
- package/dist/identityClient.js.map +0 -1
- package/dist/index.d.ts +0 -45
- package/dist/learningClient.d.ts +0 -46
- package/dist/learningClient.js +0 -409
- package/dist/learningClient.js.map +0 -1
- package/dist/lenses/index.d.ts +0 -194
- package/dist/lenses/index.js +0 -6427
- package/dist/lenses/index.js.map +0 -1
- package/dist/mcpParityClient.js +0 -516
- package/dist/mcpParityClient.js.map +0 -1
- package/dist/mcpParitySurface.d.ts +0 -12
- package/dist/mcpParitySurface.js +0 -65
- package/dist/mcpParitySurface.js.map +0 -1
- package/dist/mcpTools-DPZxowDX.d.ts +0 -254
- package/dist/nodes/index.d.ts +0 -62
- package/dist/nodes/index.js +0 -6429
- package/dist/nodes/index.js.map +0 -1
- package/dist/ontologies/index.d.ts +0 -178
- package/dist/ontologies/index.js +0 -6430
- package/dist/ontologies/index.js.map +0 -1
- package/dist/ontologyClient.js +0 -513
- package/dist/ontologyClient.js.map +0 -1
- package/dist/opinion.d.ts +0 -11
- package/dist/opinion.js +0 -35
- package/dist/opinion.js.map +0 -1
- package/dist/packRuntime.d.ts +0 -2
- package/dist/packRuntime.js +0 -3
- package/dist/packRuntime.js.map +0 -1
- package/dist/packsClient.d.ts +0 -131
- package/dist/packsClient.js +0 -525
- package/dist/packsClient.js.map +0 -1
- package/dist/policyClient.js +0 -625
- package/dist/policyClient.js.map +0 -1
- package/dist/questions/index.d.ts +0 -297
- package/dist/questions/index.js +0 -6430
- package/dist/questions/index.js.map +0 -1
- package/dist/realtime/index.d.ts +0 -29
- package/dist/realtime/index.js +0 -23
- package/dist/realtime/index.js.map +0 -1
- package/dist/realtime/refs.d.ts +0 -17
- package/dist/realtime/refs.js +0 -9
- package/dist/realtime/refs.js.map +0 -1
- package/dist/reportsClient.d.ts +0 -41
- package/dist/reportsClient.js +0 -418
- package/dist/reportsClient.js.map +0 -1
- package/dist/schemaClient.d.ts +0 -64
- package/dist/schemaClient.js +0 -434
- package/dist/schemaClient.js.map +0 -1
- package/dist/sdkSurface.d.ts +0 -61
- package/dist/sdkSurface.js +0 -112
- package/dist/sdkSurface.js.map +0 -1
- package/dist/sdkTools-CwXJDACb.d.ts +0 -150
- package/dist/sourcesClient.d.ts +0 -24
- package/dist/sourcesClient.js +0 -339
- package/dist/sourcesClient.js.map +0 -1
- package/dist/topics/index.d.ts +0 -68
- package/dist/topics/index.js +0 -6428
- package/dist/topics/index.js.map +0 -1
- package/dist/topicsClient.d.ts +0 -84
- package/dist/topicsClient.js +0 -492
- package/dist/topicsClient.js.map +0 -1
- package/dist/types.d.ts +0 -715
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
- package/dist/version.d.ts +0 -4
- package/dist/version.js +0 -6
- package/dist/version.js.map +0 -1
- package/dist/workflowClient.d.ts +0 -316
- package/dist/workflowClient.js +0 -830
- package/dist/workflowClient.js.map +0 -1
- package/dist/worktrees/index.d.ts +0 -210
- package/dist/worktrees/index.js +0 -6430
- package/dist/worktrees/index.js.map +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type CompileContextInput } from "@/lucern/packages/client-core/src/context";
|
|
2
|
+
import type { PublicCompiledContext } from "@/lucern/packages/domain-context/src";
|
|
3
|
+
import { type GatewayClientConfig } from "./coreClient";
|
|
4
|
+
export type ContextClientConfig = GatewayClientConfig;
|
|
5
|
+
export type CompileContextResponse = PublicCompiledContext;
|
|
6
|
+
export declare function createContextClient(config?: ContextClientConfig): {
|
|
7
|
+
compile(topicId: string, input?: CompileContextInput): Promise<import("./coreClient").PlatformGatewaySuccess<PublicCompiledContext>>;
|
|
8
|
+
};
|
|
9
|
+
export type { CompileContextInput };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Enum Contract Definitions
|
|
3
|
+
*
|
|
4
|
+
* Canonical enum values for all API-facing enumerations.
|
|
5
|
+
* These are co-equal with MCP contracts as external contracts.
|
|
6
|
+
* SDK types are DERIVED from these — not independently authored.
|
|
7
|
+
*
|
|
8
|
+
* CONTRACT SURFACE: Adding a new enum value is additive (non-breaking).
|
|
9
|
+
* Removing or renaming an existing value is a BREAKING CHANGE.
|
|
10
|
+
*/
|
|
11
|
+
/** Fork reasons — why a scored belief was branched */
|
|
12
|
+
export declare const FORK_REASONS: readonly ["refinement", "contradiction_response", "scope_change", "confidence_collapse", "manual"];
|
|
13
|
+
export type ForkReason = (typeof FORK_REASONS)[number];
|
|
14
|
+
/** Confidence modulation triggers — what caused a confidence change */
|
|
15
|
+
export declare const CONFIDENCE_TRIGGERS: readonly ["evidence_added", "contradiction_detected", "merge_outcome", "manual", "decay"];
|
|
16
|
+
export type ConfidenceTrigger = (typeof CONFIDENCE_TRIGGERS)[number];
|
|
17
|
+
/** Belief status — lifecycle state */
|
|
18
|
+
export declare const BELIEF_STATUSES: readonly ["unscored", "scored", "archived"];
|
|
19
|
+
export type BeliefStatus = (typeof BELIEF_STATUSES)[number];
|
|
20
|
+
/** Reasoning methods — how an edge relationship was determined */
|
|
21
|
+
export declare const REASONING_METHODS: readonly ["deductive", "inductive", "abductive", "analogical", "empirical"];
|
|
22
|
+
export type ReasoningMethod = (typeof REASONING_METHODS)[number];
|
|
23
|
+
/** Defeat types (Pollock taxonomy) — how a contradiction operates */
|
|
24
|
+
export declare const DEFEAT_TYPES: readonly ["rebuts", "undercuts", "undermines"];
|
|
25
|
+
export type DefeatType = (typeof DEFEAT_TYPES)[number];
|
|
26
|
+
/** Contradiction severity levels */
|
|
27
|
+
export declare const CONTRADICTION_SEVERITIES: readonly ["low", "medium", "high", "critical"];
|
|
28
|
+
export type ContradictionSeverity = (typeof CONTRADICTION_SEVERITIES)[number];
|
|
29
|
+
/** Contradiction resolution status */
|
|
30
|
+
export declare const CONTRADICTION_STATUSES: readonly ["unresolved", "resolved", "accepted"];
|
|
31
|
+
export type ContradictionStatus = (typeof CONTRADICTION_STATUSES)[number];
|
|
32
|
+
/** Merge outcome types — how a worktree merge resolved */
|
|
33
|
+
export declare const MERGE_OUTCOMES: readonly ["validated", "invalidated", "forked", "inconclusive"];
|
|
34
|
+
export type MergeOutcome = (typeof MERGE_OUTCOMES)[number];
|
|
35
|
+
/** Worktree phases — investigation lifecycle within a checked-out worktree */
|
|
36
|
+
export declare const WORKTREE_PHASES: readonly ["hypothesis", "investigation", "evaluation", "resolution"];
|
|
37
|
+
export type WorktreePhase = (typeof WORKTREE_PHASES)[number];
|
|
38
|
+
/** Branch status — thematic branch lifecycle */
|
|
39
|
+
export declare const BRANCH_STATUSES: readonly ["dormant", "active", "archived"];
|
|
40
|
+
export type BranchStatus = (typeof BRANCH_STATUSES)[number];
|
|
41
|
+
/** Pull request status — review lifecycle before merge */
|
|
42
|
+
export declare const PULL_REQUEST_STATUSES: readonly ["pending_review", "changes_requested", "approved", "blocked"];
|
|
43
|
+
export type PullRequestStatus = (typeof PULL_REQUEST_STATUSES)[number];
|
|
44
|
+
/** Epistemic layers — the hierarchy of knowledge */
|
|
45
|
+
export declare const EPISTEMIC_LAYERS: readonly ["L1", "L2", "L3", "L4"];
|
|
46
|
+
export type EpistemicLayer = (typeof EPISTEMIC_LAYERS)[number];
|
|
47
|
+
/**
|
|
48
|
+
* Judgment type — classification of the determination.
|
|
49
|
+
*
|
|
50
|
+
* Phase 1: These are new enum values for the Judgment (L4) vocabulary.
|
|
51
|
+
* The existing code uses "Decision" — these are the forward-looking terms
|
|
52
|
+
* that will eventually replace the Decision vocabulary (Phase 2-3).
|
|
53
|
+
*/
|
|
54
|
+
export declare const JUDGMENT_TYPES: readonly ["investment_thesis", "thesis_maturity", "contradiction_ruling", "scope_determination", "confidence_ruling"];
|
|
55
|
+
export type JudgmentType = (typeof JUDGMENT_TYPES)[number];
|
|
56
|
+
/** Core edge types used in the Integration Surfaces */
|
|
57
|
+
export declare const INTEGRATION_EDGE_TYPES: readonly ["informs", "grounds", "answers", "contradicts", "weakened_by", "undermined_by", "depends_on", "cascades_to", "supersedes", "in_tension_with", "implies", "tests"];
|
|
58
|
+
export type IntegrationEdgeType = (typeof INTEGRATION_EDGE_TYPES)[number];
|
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
type
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
type ControlObjectEditSurface = (typeof CONTROL_OBJECT_EDIT_SURFACES)[number];
|
|
13
|
-
/** Rules governing how control object configuration flows through the scope hierarchy. */
|
|
14
|
-
declare const CONTROL_OBJECT_INHERITANCE_RULES: readonly ["none", "platform_seed_to_tenant", "tenant_default_to_workspace", "workspace_narrowing_only", "pack_overlay_to_tenant", "topic_lineage_to_resource"];
|
|
15
|
-
/** How a control object's configuration propagates through scope hierarchy. */
|
|
16
|
-
type ControlObjectInheritanceRule = (typeof CONTROL_OBJECT_INHERITANCE_RULES)[number];
|
|
17
|
-
/** Scope of impact when a control object is modified. */
|
|
18
|
-
declare const CONTROL_OBJECT_BLAST_RADII: readonly ["platform", "tenant", "workspace", "resource"];
|
|
19
|
-
/** The furthest scope impacted by a mutation to a control object. */
|
|
20
|
-
type ControlObjectBlastRadius = (typeof CONTROL_OBJECT_BLAST_RADII)[number];
|
|
21
|
-
/** A single row in the ownership matrix describing who owns, edits, and inherits a control object. */
|
|
22
|
-
type ControlObjectOwnershipCase = {
|
|
1
|
+
export declare const CONTROL_OBJECT_KINDS: readonly ["tenant", "workspace", "principal", "tool", "pack", "ontology", "belief", "policy_rule"];
|
|
2
|
+
export type ControlObjectKind = (typeof CONTROL_OBJECT_KINDS)[number];
|
|
3
|
+
export declare const CONTROL_OBJECT_OWNER_SCOPES: readonly ["platform", "tenant", "workspace", "resource"];
|
|
4
|
+
export type ControlObjectOwnerScope = (typeof CONTROL_OBJECT_OWNER_SCOPES)[number];
|
|
5
|
+
export declare const CONTROL_OBJECT_EDIT_SURFACES: readonly ["platform_admin", "tenant_admin", "workspace_admin", "graph_worktree"];
|
|
6
|
+
export type ControlObjectEditSurface = (typeof CONTROL_OBJECT_EDIT_SURFACES)[number];
|
|
7
|
+
export declare const CONTROL_OBJECT_INHERITANCE_RULES: readonly ["none", "platform_seed_to_tenant", "tenant_default_to_workspace", "workspace_narrowing_only", "pack_overlay_to_tenant", "topic_lineage_to_resource"];
|
|
8
|
+
export type ControlObjectInheritanceRule = (typeof CONTROL_OBJECT_INHERITANCE_RULES)[number];
|
|
9
|
+
export declare const CONTROL_OBJECT_BLAST_RADII: readonly ["platform", "tenant", "workspace", "resource"];
|
|
10
|
+
export type ControlObjectBlastRadius = (typeof CONTROL_OBJECT_BLAST_RADII)[number];
|
|
11
|
+
export type ControlObjectOwnershipCase = {
|
|
23
12
|
caseKey: string;
|
|
24
13
|
caseLabel: string;
|
|
25
14
|
kind: ControlObjectKind;
|
|
@@ -28,10 +17,8 @@ type ControlObjectOwnershipCase = {
|
|
|
28
17
|
inheritanceRule: ControlObjectInheritanceRule;
|
|
29
18
|
blastRadius: ControlObjectBlastRadius;
|
|
30
19
|
};
|
|
31
|
-
|
|
32
|
-
type
|
|
33
|
-
/** Versioned ownership contract bundling all enums, the matrix, and flattened rows. */
|
|
34
|
-
type ControlObjectOwnershipContract = {
|
|
20
|
+
export type ControlObjectOwnershipMatrix = Record<ControlObjectKind, readonly ControlObjectOwnershipCase[]>;
|
|
21
|
+
export type ControlObjectOwnershipContract = {
|
|
35
22
|
version: "1.0.0";
|
|
36
23
|
kinds: readonly ControlObjectKind[];
|
|
37
24
|
ownerScopes: readonly ControlObjectOwnerScope[];
|
|
@@ -41,8 +28,7 @@ type ControlObjectOwnershipContract = {
|
|
|
41
28
|
matrix: ControlObjectOwnershipMatrix;
|
|
42
29
|
rows: readonly ControlObjectOwnershipCase[];
|
|
43
30
|
};
|
|
44
|
-
|
|
45
|
-
declare const CONTROL_OBJECT_OWNERSHIP_MATRIX: {
|
|
31
|
+
export declare const CONTROL_OBJECT_OWNERSHIP_MATRIX: {
|
|
46
32
|
readonly tenant: readonly [{
|
|
47
33
|
readonly caseKey: "platform-record";
|
|
48
34
|
readonly caseLabel: "Platform Record";
|
|
@@ -164,10 +150,9 @@ declare const CONTROL_OBJECT_OWNERSHIP_MATRIX: {
|
|
|
164
150
|
readonly blastRadius: "workspace";
|
|
165
151
|
}];
|
|
166
152
|
};
|
|
167
|
-
|
|
168
|
-
declare const CONTROL_OBJECT_OWNERSHIP_ROWS: readonly ControlObjectOwnershipCase[];
|
|
153
|
+
export declare const CONTROL_OBJECT_OWNERSHIP_ROWS: readonly ControlObjectOwnershipCase[];
|
|
169
154
|
/** The canonical ownership contract exposed by the SDK. */
|
|
170
|
-
declare const CONTROL_OBJECT_OWNERSHIP_CONTRACT: {
|
|
155
|
+
export declare const CONTROL_OBJECT_OWNERSHIP_CONTRACT: {
|
|
171
156
|
readonly version: "1.0.0";
|
|
172
157
|
readonly kinds: readonly ["tenant", "workspace", "principal", "tool", "pack", "ontology", "belief", "policy_rule"];
|
|
173
158
|
readonly ownerScopes: readonly ["platform", "tenant", "workspace", "resource"];
|
|
@@ -301,10 +286,8 @@ declare const CONTROL_OBJECT_OWNERSHIP_CONTRACT: {
|
|
|
301
286
|
/**
|
|
302
287
|
* List ownership cases for one control-object kind or the full matrix.
|
|
303
288
|
*/
|
|
304
|
-
declare function listControlObjectOwnershipCases(kind?: ControlObjectKind): readonly ControlObjectOwnershipCase[];
|
|
289
|
+
export declare function listControlObjectOwnershipCases(kind?: ControlObjectKind): readonly ControlObjectOwnershipCase[];
|
|
305
290
|
/**
|
|
306
291
|
* Get a specific ownership case by kind and case key.
|
|
307
292
|
*/
|
|
308
|
-
declare function getControlObjectOwnershipCase(kind: ControlObjectKind, caseKey: string): ControlObjectOwnershipCase | undefined;
|
|
309
|
-
|
|
310
|
-
export { CONTROL_OBJECT_BLAST_RADII, CONTROL_OBJECT_EDIT_SURFACES, CONTROL_OBJECT_INHERITANCE_RULES, CONTROL_OBJECT_KINDS, CONTROL_OBJECT_OWNERSHIP_CONTRACT, CONTROL_OBJECT_OWNERSHIP_MATRIX, CONTROL_OBJECT_OWNERSHIP_ROWS, CONTROL_OBJECT_OWNER_SCOPES, type ControlObjectBlastRadius, type ControlObjectEditSurface, type ControlObjectInheritanceRule, type ControlObjectKind, type ControlObjectOwnerScope, type ControlObjectOwnershipCase, type ControlObjectOwnershipContract, type ControlObjectOwnershipMatrix, getControlObjectOwnershipCase, listControlObjectOwnershipCases };
|
|
293
|
+
export declare function getControlObjectOwnershipCase(kind: ControlObjectKind, caseKey: string): ControlObjectOwnershipCase | undefined;
|
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import './contracts/lens-workflow.contract.js';
|
|
4
|
-
import './contracts/lens-filter.contract.js';
|
|
5
|
-
|
|
6
|
-
/** Tenant and workspace identifiers used to scope gateway requests. */
|
|
7
|
-
type GatewayScope = {
|
|
1
|
+
import type { JsonObject, JsonValue } from "./types";
|
|
2
|
+
export type GatewayScope = {
|
|
8
3
|
tenantId?: string;
|
|
9
4
|
workspaceId?: string;
|
|
10
5
|
};
|
|
11
|
-
|
|
12
|
-
type PlatformGatewaySuccess<T> = {
|
|
6
|
+
export type PlatformGatewaySuccess<T> = {
|
|
13
7
|
success: true;
|
|
14
8
|
data: T;
|
|
15
9
|
correlationId: string;
|
|
16
10
|
policyTraceId: string | null;
|
|
17
11
|
idempotentReplay: boolean;
|
|
18
12
|
};
|
|
19
|
-
|
|
20
|
-
type PlatformGatewayFailure = {
|
|
13
|
+
export type PlatformGatewayFailure = {
|
|
21
14
|
success: false;
|
|
22
15
|
/**
|
|
23
16
|
* Error string is the canonical envelope field.
|
|
@@ -40,15 +33,8 @@ type PlatformGatewayFailure = {
|
|
|
40
33
|
correlationId: string;
|
|
41
34
|
policyTraceId: string | null;
|
|
42
35
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Structured error thrown when a platform API request fails.
|
|
47
|
-
*
|
|
48
|
-
* Includes HTTP status, machine-readable error code, optional invariant
|
|
49
|
-
* reference, and actionable suggestions for common failure modes.
|
|
50
|
-
*/
|
|
51
|
-
declare class LucernApiError extends Error {
|
|
36
|
+
export type PlatformGatewayEnvelope<T> = PlatformGatewaySuccess<T> | PlatformGatewayFailure;
|
|
37
|
+
export declare class LucernApiError extends Error {
|
|
52
38
|
readonly code: string;
|
|
53
39
|
readonly status: number;
|
|
54
40
|
readonly invariant?: string | null;
|
|
@@ -69,11 +55,9 @@ declare class LucernApiError extends Error {
|
|
|
69
55
|
policyTraceId?: string | null;
|
|
70
56
|
});
|
|
71
57
|
}
|
|
72
|
-
|
|
73
|
-
type GatewayHttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
58
|
+
export type GatewayHttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
74
59
|
type FetchLike = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
75
|
-
|
|
76
|
-
type GatewayRequestHookContext = {
|
|
60
|
+
export type GatewayRequestHookContext = {
|
|
77
61
|
requestId: string;
|
|
78
62
|
attempt: number;
|
|
79
63
|
maxRetries: number;
|
|
@@ -84,8 +68,7 @@ type GatewayRequestHookContext = {
|
|
|
84
68
|
body?: string;
|
|
85
69
|
timeoutMs: number;
|
|
86
70
|
};
|
|
87
|
-
|
|
88
|
-
type GatewayResponseHookContext = GatewayRequestHookContext & {
|
|
71
|
+
export type GatewayResponseHookContext = GatewayRequestHookContext & {
|
|
89
72
|
durationMs: number;
|
|
90
73
|
status?: number;
|
|
91
74
|
response?: Response;
|
|
@@ -96,13 +79,7 @@ type GatewayResponseHookContext = GatewayRequestHookContext & {
|
|
|
96
79
|
retryAfterMs?: number | null;
|
|
97
80
|
willRetry: boolean;
|
|
98
81
|
};
|
|
99
|
-
|
|
100
|
-
* Low-level transport configuration for the platform gateway client.
|
|
101
|
-
*
|
|
102
|
-
* Most developers should use {@link createLucernClient} instead, which wraps
|
|
103
|
-
* this config with higher-level conveniences like `apiKey` and `environment`.
|
|
104
|
-
*/
|
|
105
|
-
type GatewayClientConfig = {
|
|
82
|
+
export type GatewayClientConfig = {
|
|
106
83
|
baseUrl?: string;
|
|
107
84
|
fetchImpl?: FetchLike;
|
|
108
85
|
getAuthHeaders?: (() => Promise<Record<string, string>>) | (() => Record<string, string>);
|
|
@@ -122,15 +99,15 @@ type GatewayClientConfig = {
|
|
|
122
99
|
/**
|
|
123
100
|
* Serialize a gateway query object into a URL query string.
|
|
124
101
|
*/
|
|
125
|
-
declare function toQueryString(scope: GatewayScope & Record<string, string | number | boolean | undefined>): string;
|
|
102
|
+
export declare function toQueryString(scope: GatewayScope & Record<string, string | number | boolean | undefined>): string;
|
|
126
103
|
/**
|
|
127
104
|
* Generate a random idempotency key for retry-safe writes.
|
|
128
105
|
*/
|
|
129
|
-
declare function randomIdempotencyKey(): string;
|
|
106
|
+
export declare function randomIdempotencyKey(): string;
|
|
130
107
|
/**
|
|
131
108
|
* Create the transport client used by all SDK modules.
|
|
132
109
|
*/
|
|
133
|
-
declare function createGatewayRequestClient(config?: GatewayClientConfig): {
|
|
110
|
+
export declare function createGatewayRequestClient(config?: GatewayClientConfig): {
|
|
134
111
|
request: <T>(args: {
|
|
135
112
|
path: string;
|
|
136
113
|
method?: GatewayHttpMethod;
|
|
@@ -140,5 +117,4 @@ declare function createGatewayRequestClient(config?: GatewayClientConfig): {
|
|
|
140
117
|
timeoutMs?: number;
|
|
141
118
|
}) => Promise<PlatformGatewaySuccess<T>>;
|
|
142
119
|
};
|
|
143
|
-
|
|
144
|
-
export { type GatewayClientConfig, type GatewayHttpMethod, type GatewayRequestHookContext, type GatewayResponseHookContext, type GatewayScope, LucernApiError, type PlatformGatewayEnvelope, type PlatformGatewayFailure, type PlatformGatewaySuccess, createGatewayRequestClient, randomIdempotencyKey, toQueryString };
|
|
120
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { McpToolContract } from "@lucern/contracts/mcp-tools.contract";
|
|
3
|
+
import type { JsonObject } from "./types";
|
|
4
|
+
type AnyZodObject = z.ZodObject<z.ZodRawShape>;
|
|
5
|
+
export type CustomToolInvocationSource = "sdk" | "mcp";
|
|
6
|
+
export type CustomToolInvocationContext = {
|
|
7
|
+
source: CustomToolInvocationSource;
|
|
8
|
+
};
|
|
9
|
+
export type CustomToolMetadata = {
|
|
10
|
+
category?: string;
|
|
11
|
+
tags?: string[];
|
|
12
|
+
requiredScopes?: string[];
|
|
13
|
+
};
|
|
14
|
+
export type CustomToolRegistration<TInput extends AnyZodObject = AnyZodObject, TOutput extends z.ZodTypeAny = z.ZodTypeAny> = {
|
|
15
|
+
namespace?: string;
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
inputSchema: TInput;
|
|
19
|
+
outputSchema: TOutput;
|
|
20
|
+
handler: (input: z.infer<TInput>, context: CustomToolInvocationContext) => Promise<z.infer<TOutput>> | z.infer<TOutput>;
|
|
21
|
+
metadata?: CustomToolMetadata;
|
|
22
|
+
ownerModule?: string;
|
|
23
|
+
ontologyPrimitive?: McpToolContract["ontologyPrimitive"];
|
|
24
|
+
tier?: McpToolContract["tier"];
|
|
25
|
+
};
|
|
26
|
+
export type RegisteredCustomTool = {
|
|
27
|
+
fullName: string;
|
|
28
|
+
namespace: string;
|
|
29
|
+
shortName: string;
|
|
30
|
+
metadata: CustomToolMetadata;
|
|
31
|
+
contract: McpToolContract;
|
|
32
|
+
inputSchema: AnyZodObject;
|
|
33
|
+
outputSchema: z.ZodTypeAny;
|
|
34
|
+
invoke: (input: JsonObject, context: CustomToolInvocationContext) => Promise<unknown>;
|
|
35
|
+
};
|
|
36
|
+
export declare class CustomToolRegistryError extends Error {
|
|
37
|
+
constructor(message: string);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Register a custom SDK tool in the in-memory registry.
|
|
41
|
+
*/
|
|
42
|
+
export declare function registerCustomTool<TInput extends AnyZodObject, TOutput extends z.ZodTypeAny>(registration: CustomToolRegistration<TInput, TOutput>, options?: {
|
|
43
|
+
replace?: boolean;
|
|
44
|
+
}): RegisteredCustomTool;
|
|
45
|
+
/**
|
|
46
|
+
* Remove a custom SDK tool from the registry.
|
|
47
|
+
*/
|
|
48
|
+
export declare function unregisterCustomTool(fullName: string): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Get a custom SDK tool by fully qualified name.
|
|
51
|
+
*/
|
|
52
|
+
export declare function getRegisteredCustomTool(fullName: string): RegisteredCustomTool | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* List all registered custom SDK tools.
|
|
55
|
+
*/
|
|
56
|
+
export declare function listRegisteredCustomTools(): RegisteredCustomTool[];
|
|
57
|
+
/**
|
|
58
|
+
* Clear the registered custom tool registry.
|
|
59
|
+
*/
|
|
60
|
+
export declare function clearRegisteredCustomTools(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Invoke a registered custom SDK tool.
|
|
63
|
+
*/
|
|
64
|
+
export declare function invokeRegisteredCustomTool(fullName: string, params: JsonObject, context: CustomToolInvocationContext): Promise<unknown>;
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { type GatewayClientConfig, LucernApiError } from "./coreClient";
|
|
2
|
+
import type { GetJudgmentResponse, JudgmentCalibrationResponse, JudgmentReadinessResponse, JudgmentTransitionAuditIntegrityResponse, ListJudgmentsResponse, PendingJudgmentOutcomeRecord, RecordJudgmentOutcomeResponse, RecordJudgmentResponse, TopicIdentifierInput } from "./types";
|
|
3
|
+
export { LucernApiError };
|
|
4
|
+
export type { PlatformGatewaySuccess } from "./coreClient";
|
|
5
|
+
export type { GetJudgmentResponse, JudgmentCalibrationResponse, JudgmentReadinessResponse, JudgmentTransitionAuditIntegrityResponse, ListJudgmentsResponse, PendingJudgmentOutcomeReviewResponse, RecordJudgmentOutcomeResponse, RecordJudgmentResponse, } from "./types";
|
|
6
|
+
export type DecisionsClientConfig = GatewayClientConfig;
|
|
7
|
+
export type RecordJudgmentInput = {
|
|
8
|
+
title: string;
|
|
9
|
+
summary?: string;
|
|
10
|
+
rationale: string;
|
|
11
|
+
topicId?: string;
|
|
12
|
+
confidence?: number;
|
|
13
|
+
decisionConfidence?: number;
|
|
14
|
+
judgmentType?: string;
|
|
15
|
+
decisionType?: string;
|
|
16
|
+
beliefIds?: string[];
|
|
17
|
+
keyUncertainties?: string[];
|
|
18
|
+
alternativesConsidered?: string[];
|
|
19
|
+
decisionMakers?: string[];
|
|
20
|
+
companyId?: string;
|
|
21
|
+
amount?: number;
|
|
22
|
+
valuation?: number;
|
|
23
|
+
terms?: string;
|
|
24
|
+
themeIds?: string[];
|
|
25
|
+
} & TopicIdentifierInput;
|
|
26
|
+
export type ListJudgmentsInput = {
|
|
27
|
+
topicId?: string;
|
|
28
|
+
includeArchived?: boolean;
|
|
29
|
+
limit?: number;
|
|
30
|
+
} & TopicIdentifierInput;
|
|
31
|
+
export type RecordJudgmentOutcomeInput = {
|
|
32
|
+
outcome: "pending" | "successful" | "unsuccessful" | "mixed" | "unknown" | "too_early";
|
|
33
|
+
outcomeNotes?: string;
|
|
34
|
+
notes?: string;
|
|
35
|
+
};
|
|
36
|
+
export type GetJudgmentCalibrationInput = {
|
|
37
|
+
topicId?: string;
|
|
38
|
+
} & TopicIdentifierInput;
|
|
39
|
+
export type ListPendingJudgmentOutcomeReviewInput = {
|
|
40
|
+
topicId?: string;
|
|
41
|
+
} & TopicIdentifierInput;
|
|
42
|
+
export type GetJudgmentTransitionAuditIntegrityInput = {
|
|
43
|
+
topicId?: string;
|
|
44
|
+
judgmentId?: string;
|
|
45
|
+
includePassing?: boolean;
|
|
46
|
+
} & TopicIdentifierInput;
|
|
47
|
+
/**
|
|
48
|
+
* Create the judgments client for decision lifecycle operations.
|
|
49
|
+
*/
|
|
50
|
+
export declare function createDecisionsClient(config?: DecisionsClientConfig): {
|
|
51
|
+
/**
|
|
52
|
+
* List judgments for a topic scope.
|
|
53
|
+
*/
|
|
54
|
+
listJudgments(query: ListJudgmentsInput): Promise<import("./coreClient").PlatformGatewaySuccess<ListJudgmentsResponse>>;
|
|
55
|
+
/**
|
|
56
|
+
* Get a single judgment by identifier.
|
|
57
|
+
*/
|
|
58
|
+
getJudgment(judgmentId: string): Promise<import("./coreClient").PlatformGatewaySuccess<GetJudgmentResponse>>;
|
|
59
|
+
/**
|
|
60
|
+
* Get readiness signals for creating a judgment.
|
|
61
|
+
*/
|
|
62
|
+
getJudgmentReadiness(query: {
|
|
63
|
+
topicId?: string;
|
|
64
|
+
} & TopicIdentifierInput): Promise<import("./coreClient").PlatformGatewaySuccess<JudgmentReadinessResponse>>;
|
|
65
|
+
/**
|
|
66
|
+
* Get calibration analytics for judgment outcomes.
|
|
67
|
+
*/
|
|
68
|
+
getJudgmentCalibration(query: GetJudgmentCalibrationInput): Promise<import("./coreClient").PlatformGatewaySuccess<JudgmentCalibrationResponse>>;
|
|
69
|
+
/**
|
|
70
|
+
* List judgments still awaiting outcome review.
|
|
71
|
+
*/
|
|
72
|
+
listPendingOutcomeReviews(query: ListPendingJudgmentOutcomeReviewInput): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").ListResult<PendingJudgmentOutcomeRecord, "reviews">>>;
|
|
73
|
+
/**
|
|
74
|
+
* @deprecated Use listPendingOutcomeReviews.
|
|
75
|
+
*/
|
|
76
|
+
listPendingJudgmentOutcomeReview(query: ListPendingJudgmentOutcomeReviewInput): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").ListResult<PendingJudgmentOutcomeRecord, "reviews">>>;
|
|
77
|
+
/**
|
|
78
|
+
* Get audit integrity checks for judgment transitions.
|
|
79
|
+
*/
|
|
80
|
+
getJudgmentTransitionAuditIntegrity(query: GetJudgmentTransitionAuditIntegrityInput): Promise<import("./coreClient").PlatformGatewaySuccess<JudgmentTransitionAuditIntegrityResponse>>;
|
|
81
|
+
/**
|
|
82
|
+
* Create a judgment.
|
|
83
|
+
*/
|
|
84
|
+
createJudgment(input: RecordJudgmentInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<RecordJudgmentResponse>>;
|
|
85
|
+
/**
|
|
86
|
+
* @deprecated Use createJudgment.
|
|
87
|
+
*/
|
|
88
|
+
recordJudgment(input: RecordJudgmentInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<RecordJudgmentResponse>>;
|
|
89
|
+
/**
|
|
90
|
+
* Update the outcome for an existing judgment.
|
|
91
|
+
*/
|
|
92
|
+
updateJudgmentOutcome(judgmentId: string, input: RecordJudgmentOutcomeInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>;
|
|
93
|
+
/**
|
|
94
|
+
* @deprecated Use updateJudgmentOutcome.
|
|
95
|
+
*/
|
|
96
|
+
recordJudgmentOutcome(judgmentId: string, input: RecordJudgmentOutcomeInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<RecordJudgmentOutcomeResponse>>;
|
|
97
|
+
};
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { type GatewayClientConfig, LucernApiError } from "./coreClient";
|
|
2
|
+
import type { DeleteEdgeResponse, GraphAnalyticsMetric, GraphAnalyticsResponse, GraphNeighborhoodResponse, GraphPathResponse, JsonObject, ListResult, PlatformGraphEdge, PlatformGraphNode, TextAliasInput, TopicIdentifierInput } from "./types";
|
|
3
|
+
export { LucernApiError };
|
|
4
|
+
export type { GatewayScope, PlatformGatewaySuccess } from "./coreClient";
|
|
5
|
+
export type { CreateEdgeResponse, CreateNodeResponse, DeleteEdgeResponse, GraphAnalyticsMetric, GraphAnalyticsResponse, GraphNeighborhoodResponse, GraphPathResponse, ListResult, QueryEdgesResponse, QueryNodesResponse, UpdateNodeResponse, } from "./types";
|
|
6
|
+
export type GraphClientConfig = GatewayClientConfig;
|
|
7
|
+
export type ListNodesInput = {
|
|
8
|
+
nodeId?: string;
|
|
9
|
+
globalId?: string;
|
|
10
|
+
topicId?: string;
|
|
11
|
+
nodeType?: string;
|
|
12
|
+
limit?: number;
|
|
13
|
+
} & TopicIdentifierInput;
|
|
14
|
+
export type ListNodesResponse = ListResult<PlatformGraphNode, "nodes">;
|
|
15
|
+
export type QueryNodesInput = ListNodesInput;
|
|
16
|
+
export type CreateNodeInput = {
|
|
17
|
+
text?: string;
|
|
18
|
+
/** @deprecated Use text. */
|
|
19
|
+
canonicalText?: string;
|
|
20
|
+
nodeType: string;
|
|
21
|
+
topicId?: string;
|
|
22
|
+
content?: string;
|
|
23
|
+
contentHash?: string;
|
|
24
|
+
globalId?: string;
|
|
25
|
+
sourceType?: string;
|
|
26
|
+
subtype?: string;
|
|
27
|
+
title?: string;
|
|
28
|
+
confidence?: number;
|
|
29
|
+
status?: string;
|
|
30
|
+
tags?: string[];
|
|
31
|
+
metadata?: JsonObject;
|
|
32
|
+
verificationStatus?: string;
|
|
33
|
+
} & TextAliasInput & TopicIdentifierInput;
|
|
34
|
+
export type UpdateNodeInput = {
|
|
35
|
+
nodeId: string;
|
|
36
|
+
text?: string;
|
|
37
|
+
canonicalText?: string;
|
|
38
|
+
content?: string;
|
|
39
|
+
contentHash?: string;
|
|
40
|
+
title?: string;
|
|
41
|
+
subtype?: string;
|
|
42
|
+
confidence?: number;
|
|
43
|
+
status?: string;
|
|
44
|
+
tags?: string[];
|
|
45
|
+
metadata?: JsonObject;
|
|
46
|
+
verificationStatus?: string;
|
|
47
|
+
} & TextAliasInput;
|
|
48
|
+
export type ListEdgesInput = {
|
|
49
|
+
edgeId?: string;
|
|
50
|
+
topicId?: string;
|
|
51
|
+
fromNodeId?: string;
|
|
52
|
+
toNodeId?: string;
|
|
53
|
+
edgeType?: string;
|
|
54
|
+
limit?: number;
|
|
55
|
+
} & TopicIdentifierInput;
|
|
56
|
+
export type ListEdgesResponse = ListResult<PlatformGraphEdge, "edges">;
|
|
57
|
+
export type QueryEdgesInput = ListEdgesInput;
|
|
58
|
+
export type CreateEdgeInput = {
|
|
59
|
+
fromNodeId: string;
|
|
60
|
+
toNodeId: string;
|
|
61
|
+
edgeType: string;
|
|
62
|
+
globalId?: string;
|
|
63
|
+
topicId?: string;
|
|
64
|
+
confidence?: number;
|
|
65
|
+
weight?: number;
|
|
66
|
+
context?: string;
|
|
67
|
+
derivationType?: string;
|
|
68
|
+
} & TopicIdentifierInput;
|
|
69
|
+
export type DeleteEdgeInput = {
|
|
70
|
+
edgeId?: string;
|
|
71
|
+
fromNodeId?: string;
|
|
72
|
+
toNodeId?: string;
|
|
73
|
+
edgeType?: string;
|
|
74
|
+
};
|
|
75
|
+
export type NeighborhoodInput = {
|
|
76
|
+
globalId?: string;
|
|
77
|
+
globalIds?: string;
|
|
78
|
+
maxDepth?: number;
|
|
79
|
+
};
|
|
80
|
+
export type PathInput = {
|
|
81
|
+
fromGlobalId: string;
|
|
82
|
+
toGlobalId: string;
|
|
83
|
+
maxDepth?: number;
|
|
84
|
+
};
|
|
85
|
+
export type AnalyticsInput = {
|
|
86
|
+
metric?: GraphAnalyticsMetric;
|
|
87
|
+
limit?: number;
|
|
88
|
+
};
|
|
89
|
+
export type TraverseInput = {
|
|
90
|
+
startNode: string;
|
|
91
|
+
direction?: string;
|
|
92
|
+
maxDepth?: number;
|
|
93
|
+
topicId?: string;
|
|
94
|
+
} & TopicIdentifierInput;
|
|
95
|
+
export type AnalyzeInput = {
|
|
96
|
+
topicId?: string;
|
|
97
|
+
metric?: GraphAnalyticsMetric;
|
|
98
|
+
limit?: number;
|
|
99
|
+
} & TopicIdentifierInput;
|
|
100
|
+
export type BiasInput = {
|
|
101
|
+
topicId?: string;
|
|
102
|
+
threshold?: number;
|
|
103
|
+
limit?: number;
|
|
104
|
+
} & TopicIdentifierInput;
|
|
105
|
+
export type GapsInput = {
|
|
106
|
+
topicId?: string;
|
|
107
|
+
minConfidence?: number;
|
|
108
|
+
} & TopicIdentifierInput;
|
|
109
|
+
export type SearchInput = {
|
|
110
|
+
q?: string;
|
|
111
|
+
query?: string;
|
|
112
|
+
topicId?: string;
|
|
113
|
+
types?: string[];
|
|
114
|
+
status?: string;
|
|
115
|
+
minConfidence?: number;
|
|
116
|
+
limit?: number;
|
|
117
|
+
cursor?: string;
|
|
118
|
+
} & TopicIdentifierInput;
|
|
119
|
+
/**
|
|
120
|
+
* Create the low-level graph client for nodes, edges, and graph analytics.
|
|
121
|
+
*/
|
|
122
|
+
export declare function createGraphClient(config?: GraphClientConfig): {
|
|
123
|
+
/**
|
|
124
|
+
* List graph nodes matching the provided filters.
|
|
125
|
+
*/
|
|
126
|
+
listNodes(query: ListNodesInput): Promise<import("./coreClient").PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>;
|
|
127
|
+
/**
|
|
128
|
+
* @deprecated Use listNodes.
|
|
129
|
+
*/
|
|
130
|
+
queryNodes(query: QueryNodesInput): Promise<import("./coreClient").PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>;
|
|
131
|
+
/**
|
|
132
|
+
* Create a graph node.
|
|
133
|
+
*/
|
|
134
|
+
createNode(input: CreateNodeInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<PlatformGraphNode>>;
|
|
135
|
+
/**
|
|
136
|
+
* Update a graph node.
|
|
137
|
+
*/
|
|
138
|
+
updateNode(input: UpdateNodeInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<PlatformGraphNode>>;
|
|
139
|
+
/**
|
|
140
|
+
* List graph edges matching the provided filters.
|
|
141
|
+
*/
|
|
142
|
+
listEdges(query: ListEdgesInput): Promise<import("./coreClient").PlatformGatewaySuccess<ListResult<PlatformGraphEdge, "edges">>>;
|
|
143
|
+
/**
|
|
144
|
+
* @deprecated Use listEdges.
|
|
145
|
+
*/
|
|
146
|
+
queryEdges(query: QueryEdgesInput): Promise<import("./coreClient").PlatformGatewaySuccess<ListResult<PlatformGraphEdge, "edges">>>;
|
|
147
|
+
/**
|
|
148
|
+
* Create a graph edge.
|
|
149
|
+
*/
|
|
150
|
+
createEdge(input: CreateEdgeInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<PlatformGraphEdge>>;
|
|
151
|
+
/**
|
|
152
|
+
* Delete one or more edges matching the provided filter.
|
|
153
|
+
*/
|
|
154
|
+
deleteEdge(query: DeleteEdgeInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<DeleteEdgeResponse>>;
|
|
155
|
+
/**
|
|
156
|
+
* Retrieve a graph neighborhood around a root node.
|
|
157
|
+
*/
|
|
158
|
+
neighborhood(query: NeighborhoodInput): Promise<import("./coreClient").PlatformGatewaySuccess<GraphNeighborhoodResponse>>;
|
|
159
|
+
/**
|
|
160
|
+
* Traverse the graph from a starting node.
|
|
161
|
+
*/
|
|
162
|
+
traverse(query: TraverseInput): Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
163
|
+
/**
|
|
164
|
+
* Analyze graph structure for a topic.
|
|
165
|
+
*/
|
|
166
|
+
analyze(query?: AnalyzeInput): Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
167
|
+
/**
|
|
168
|
+
* Detect confirmation-bias patterns for a topic graph.
|
|
169
|
+
*/
|
|
170
|
+
bias(query?: BiasInput): Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
171
|
+
/**
|
|
172
|
+
* Find graph gaps for beliefs that still need testing.
|
|
173
|
+
*/
|
|
174
|
+
gaps(query: GapsInput): Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
175
|
+
/**
|
|
176
|
+
* Search across graph resources within a topic.
|
|
177
|
+
*/
|
|
178
|
+
search(query: SearchInput): Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
179
|
+
/**
|
|
180
|
+
* Retrieve a graph neighborhood around a root node.
|
|
181
|
+
*/
|
|
182
|
+
getNeighborhood(query: NeighborhoodInput): Promise<import("./coreClient").PlatformGatewaySuccess<GraphNeighborhoodResponse>>;
|
|
183
|
+
/**
|
|
184
|
+
* Retrieve the shortest known path between two graph nodes.
|
|
185
|
+
*/
|
|
186
|
+
getPath(query: PathInput): Promise<import("./coreClient").PlatformGatewaySuccess<GraphPathResponse>>;
|
|
187
|
+
/**
|
|
188
|
+
* Retrieve graph analytics for the requested metric.
|
|
189
|
+
*/
|
|
190
|
+
getAnalytics(query?: AnalyticsInput): Promise<import("./coreClient").PlatformGatewaySuccess<GraphAnalyticsResponse>>;
|
|
191
|
+
};
|