@lucern/sdk 0.2.0-alpha.2 → 0.2.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,57 +2,78 @@
2
2
  * API Enum Contract Definitions
3
3
  *
4
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.
5
+ * These MUST match the kernel schema validators exactly.
7
6
  *
8
- * CONTRACT SURFACE: Adding a new enum value is additive (non-breaking).
9
- * Removing or renaming an existing value is a BREAKING CHANGE.
7
+ * Source of truth: packages/convex-kernel/src/component/schema/spine/
10
8
  */
11
- /** Fork reasons — why a scored belief was branched */
9
+ /**
10
+ * Belief epistemic lifecycle — tracks maturity from raw claim to verified fact.
11
+ *
12
+ * - assumption: Untested raw claim, lowest epistemic standing
13
+ * - hypothesis: Under active investigation, being tested against evidence
14
+ * - belief: Validated through investigation, carries confidence score
15
+ * - fact: Resolved outcome anchored by strong evidence
16
+ */
17
+ export declare const BELIEF_STATUSES: readonly ["assumption", "hypothesis", "belief", "fact"];
18
+ export type BeliefStatus = (typeof BELIEF_STATUSES)[number];
19
+ /** Why a scored belief was branched into a new version */
12
20
  export declare const FORK_REASONS: readonly ["refinement", "contradiction_response", "scope_change", "confidence_collapse", "manual"];
13
21
  export type ForkReason = (typeof FORK_REASONS)[number];
14
- /** Confidence modulation triggerswhat caused a confidence change */
15
- export declare const CONFIDENCE_TRIGGERS: readonly ["evidence_added", "contradiction_detected", "merge_outcome", "manual", "decay"];
22
+ /** What caused a confidence change every modulation must declare its trigger */
23
+ export declare const CONFIDENCE_TRIGGERS: readonly ["evidence_added", "contradiction_detected", "merge_outcome", "worktree_outcome", "manual", "decay"];
16
24
  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 */
25
+ /**
26
+ * Core epistemic edge types the grammar of reasoning relationships.
27
+ *
28
+ * - supports: Evidence or belief reinforces another belief (weight = strength)
29
+ * - informs: Evidence bears on a belief (directional, weighted)
30
+ * - depends_on: Belief B requires belief A to hold
31
+ * - derived_from: Belief was derived from another (lineage)
32
+ * - contains: Structural containment (topic contains beliefs)
33
+ * - tests: Question tests a belief (falsification link)
34
+ */
35
+ export declare const EPISTEMIC_EDGE_TYPES: readonly ["supports", "informs", "depends_on", "derived_from", "contains", "tests"];
36
+ export type EpistemicEdgeType = (typeof EPISTEMIC_EDGE_TYPES)[number];
37
+ /** Structural and lifecycle edges — required for graph integrity */
38
+ export declare const STRUCTURAL_EDGE_TYPES: readonly ["supersedes", "responds_to", "belongs_to", "relates_to_thesis"];
39
+ export type StructuralEdgeType = (typeof STRUCTURAL_EDGE_TYPES)[number];
40
+ /** All valid edge types (epistemic + structural) */
41
+ export declare const EDGE_TYPES: readonly ["supports", "informs", "depends_on", "derived_from", "contains", "tests", "supersedes", "responds_to", "belongs_to", "relates_to_thesis"];
42
+ export type EdgeType = EpistemicEdgeType | StructuralEdgeType;
43
+ /** How an edge relationship was determined */
21
44
  export declare const REASONING_METHODS: readonly ["deductive", "inductive", "abductive", "analogical", "empirical"];
22
45
  export type ReasoningMethod = (typeof REASONING_METHODS)[number];
23
46
  /** Defeat types (Pollock taxonomy) — how a contradiction operates */
24
47
  export declare const DEFEAT_TYPES: readonly ["rebuts", "undercuts", "undermines"];
25
48
  export type DefeatType = (typeof DEFEAT_TYPES)[number];
26
- /** Contradiction severity levels */
49
+ /** Contradiction severity */
27
50
  export declare const CONTRADICTION_SEVERITIES: readonly ["low", "medium", "high", "critical"];
28
51
  export type ContradictionSeverity = (typeof CONTRADICTION_SEVERITIES)[number];
29
52
  /** Contradiction resolution status */
30
53
  export declare const CONTRADICTION_STATUSES: readonly ["unresolved", "resolved", "accepted"];
31
54
  export type ContradictionStatus = (typeof CONTRADICTION_STATUSES)[number];
32
- /** Merge outcome types — how a worktree merge resolved */
55
+ /** How a worktree investigation concluded */
33
56
  export declare const MERGE_OUTCOMES: readonly ["validated", "invalidated", "forked", "inconclusive"];
34
57
  export type MergeOutcome = (typeof MERGE_OUTCOMES)[number];
35
- /** Worktree phases — investigation lifecycle within a checked-out worktree */
58
+ /** Investigation phases within a worktree */
36
59
  export declare const WORKTREE_PHASES: readonly ["hypothesis", "investigation", "evaluation", "resolution"];
37
60
  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 statusreview 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 layersthe hierarchy of knowledge */
61
+ /**
62
+ * The knowledge hierarchy each layer builds on the one below it.
63
+ *
64
+ * - L1: Sources raw inputs (documents, APIs, observations)
65
+ * - L2: Evidence interpreted facts with context and weight
66
+ * - L3: Beliefs — structural claims that carry confidence
67
+ * - L4: Judgments irreversible commitments based on the epistemic state
68
+ */
45
69
  export declare const EPISTEMIC_LAYERS: readonly ["L1", "L2", "L3", "L4"];
46
70
  export type EpistemicLayer = (typeof EPISTEMIC_LAYERS)[number];
47
71
  /**
48
- * Judgment type classification of the determination.
72
+ * Classification of L4 judgments irreversible determinations.
49
73
  *
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).
74
+ * Judgments are evaluated against the knowledge horizon that existed
75
+ * when they were made. They cannot be retroactively invalidated
76
+ * only new judgments can supersede old ones.
53
77
  */
54
- export declare const JUDGMENT_TYPES: readonly ["investment_thesis", "thesis_maturity", "contradiction_ruling", "scope_determination", "confidence_ruling"];
78
+ export declare const JUDGMENT_TYPES: readonly ["thesis", "thesis_maturity", "contradiction_ruling", "scope_determination", "confidence_ruling"];
55
79
  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];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucern/sdk",
3
- "version": "0.2.0-alpha.2",
3
+ "version": "0.2.0-alpha.3",
4
4
  "description": "Lucern reasoning platform SDK. Install this one package, provide your API key, and start building in 10 minutes.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",