@lucern/sdk 1.0.18 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,9 @@ All notable changes to `@lucern/sdk` will be documented in this file.
5
5
  ## [Unreleased]
6
6
  - No unreleased changes yet.
7
7
 
8
+ ## [1.0.19] - 2026-06-04
9
+ - Release notes pending.
10
+
8
11
  ## [1.0.18] - 2026-06-02
9
12
  - Release notes pending.
10
13
 
package/dist/client.d.ts CHANGED
@@ -511,38 +511,7 @@ export declare function createLucernClient(config?: LucernClientConfig): {
511
511
  }): any;
512
512
  };
513
513
  evidence: {
514
- create(args: {
515
- text?: string;
516
- canonicalText?: string;
517
- topicId?: string;
518
- source?: string;
519
- sourceUrl?: string;
520
- targetId?: string;
521
- weight?: number;
522
- evidenceRelation?: "supports" | "contradicts";
523
- confidence?: number;
524
- beliefRelations?: Array<{
525
- beliefId?: string;
526
- beliefNodeId?: string;
527
- targetId?: string;
528
- relation?: "supports" | "contradicts" | "supporting" | "contradicting";
529
- evidenceRelation?: "supports" | "contradicts";
530
- confidence?: number;
531
- weight?: number;
532
- rationale?: string;
533
- }>;
534
- metadata?: import("./types").JsonObject;
535
- title?: string;
536
- content?: string;
537
- contentType?: string;
538
- kind?: string;
539
- rationale?: string;
540
- supports?: {
541
- nodeId: string;
542
- weight: number;
543
- reasoning?: string;
544
- };
545
- }): any;
514
+ create(args: import("./clientEvidenceCompat").EvidenceCompatInput): any;
546
515
  add: any;
547
516
  get(evidenceId: string): any;
548
517
  list(args: {
@@ -600,7 +569,12 @@ export declare function createLucernClient(config?: LucernClientConfig): {
600
569
  metadata?: import("./types").JsonObject;
601
570
  }): any;
602
571
  get(questionId: string): any;
603
- refine(questionId: string, text: string, refinementReason?: string): any;
572
+ refine(questionId: string, input: string | {
573
+ text?: string;
574
+ question?: string;
575
+ rationale?: string;
576
+ linkedWorktreeId?: string;
577
+ }, refinementReason?: string): any;
604
578
  list(args: {
605
579
  topicId?: string;
606
580
  status?: string;
@@ -6,6 +6,7 @@ export type EvidenceCompatInput = {
6
6
  topicId?: string;
7
7
  source?: string;
8
8
  sourceUrl?: string;
9
+ externalSourceUrl?: string;
9
10
  targetId?: string;
10
11
  weight?: number;
11
12
  evidenceRelation?: "supports" | "contradicts";
@@ -25,6 +26,14 @@ export type EvidenceCompatInput = {
25
26
  content?: string;
26
27
  contentType?: string;
27
28
  kind?: string;
29
+ tags?: string[];
30
+ sourceType?: string;
31
+ externalSourceType?: string;
32
+ sourceQuestionId?: string;
33
+ methodology?: string;
34
+ informationAsymmetry?: string;
35
+ sourceQuality?: "primary" | "analyzed" | "secondary" | "tertiary" | "unknown";
36
+ sourceDescription?: string;
28
37
  rationale?: string;
29
38
  supports?: {
30
39
  nodeId: string;
@@ -48,6 +57,16 @@ type EvidenceFacadeLike = {
48
57
  content?: string;
49
58
  contentType?: string;
50
59
  kind?: string;
60
+ tags?: string[];
61
+ sourceUrl?: string;
62
+ externalSourceUrl?: string;
63
+ sourceType?: string;
64
+ externalSourceType?: string;
65
+ sourceQuestionId?: string;
66
+ methodology?: string;
67
+ informationAsymmetry?: string;
68
+ sourceQuality?: "primary" | "analyzed" | "secondary" | "tertiary" | "unknown";
69
+ sourceDescription?: string;
51
70
  }): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
52
71
  link(args: {
53
72
  evidenceId: string;
@@ -16,6 +16,8 @@ export async function createEvidenceCompat(evidenceFacade, args) {
16
16
  topicId: resolveTopicId(args),
17
17
  text,
18
18
  source: args.source ?? args.sourceUrl,
19
+ sourceUrl: args.sourceUrl,
20
+ externalSourceUrl: args.externalSourceUrl,
19
21
  targetId: args.targetId ?? args.supports?.nodeId,
20
22
  weight: args.weight ?? args.supports?.weight,
21
23
  evidenceRelation: args.evidenceRelation,
@@ -27,33 +29,31 @@ export async function createEvidenceCompat(evidenceFacade, args) {
27
29
  content: args.content,
28
30
  contentType: args.contentType,
29
31
  kind: args.kind,
32
+ tags: args.tags,
33
+ sourceType: args.sourceType,
34
+ externalSourceType: args.externalSourceType,
35
+ sourceQuestionId: args.sourceQuestionId,
36
+ methodology: args.methodology,
37
+ informationAsymmetry: args.informationAsymmetry,
38
+ sourceQuality: args.sourceQuality,
39
+ sourceDescription: args.sourceDescription,
30
40
  });
31
41
  }
32
42
  export async function addEvidenceCompat(evidenceFacade, args) {
33
- const created = await createEvidenceCompat(evidenceFacade, {
34
- ...args,
35
- targetId: args.supports ? undefined : args.targetId,
36
- weight: args.supports ? undefined : args.weight,
37
- });
38
43
  if (!args.supports) {
44
+ const created = await createEvidenceCompat(evidenceFacade, args);
39
45
  return created.data;
40
46
  }
41
- const evidenceId = created.data.id;
42
- if (typeof evidenceId !== "string" || evidenceId.length === 0) {
43
- throw new Error("evidence create did not return an id");
44
- }
45
- const linked = await evidenceFacade.link({
46
- evidenceId,
47
- targetId: args.supports.nodeId,
48
- weight: args.supports.weight,
47
+ const { supports, ...createArgs } = args;
48
+ const created = await createEvidenceCompat(evidenceFacade, {
49
+ ...createArgs,
50
+ targetId: args.targetId ?? supports.nodeId,
51
+ weight: args.weight ?? supports.weight,
49
52
  evidenceRelation: args.evidenceRelation ??
50
- (args.supports.weight < 0 ? "contradicts" : "supports"),
51
- confidence: args.confidence ?? Math.min(1, Math.abs(args.supports.weight)),
52
- rationale: args.supports.reasoning,
53
+ (supports.weight < 0 ? "contradicts" : "supports"),
54
+ confidence: args.confidence ?? Math.min(1, Math.abs(supports.weight)),
55
+ rationale: args.rationale ?? supports.reasoning,
53
56
  });
54
- return {
55
- ...created.data,
56
- edgeId: linked.data.edgeId,
57
- };
57
+ return created.data;
58
58
  }
59
59
  //# sourceMappingURL=clientEvidenceCompat.js.map
@@ -1,5 +1,6 @@
1
1
  import type { ClientNamespaceContext } from "./clientAssemblyTypes";
2
2
  import type { BeliefsCompatCreateInput, BeliefsCompatForkInput } from "./clientConfig";
3
+ import type { EvidenceCompatInput } from "./clientEvidenceCompat";
3
4
  import type { FunctionSurfaceInput } from "./generated/functionSurface";
4
5
  import type { JsonObject } from "./types";
5
6
  export declare function createClientKnowledgeNamespaces(ctx: ClientNamespaceContext): {
@@ -93,38 +94,7 @@ export declare function createClientKnowledgeNamespaces(ctx: ClientNamespaceCont
93
94
  }): any;
94
95
  };
95
96
  evidence: {
96
- create(args: {
97
- text?: string;
98
- canonicalText?: string;
99
- topicId?: string;
100
- source?: string;
101
- sourceUrl?: string;
102
- targetId?: string;
103
- weight?: number;
104
- evidenceRelation?: "supports" | "contradicts";
105
- confidence?: number;
106
- beliefRelations?: Array<{
107
- beliefId?: string;
108
- beliefNodeId?: string;
109
- targetId?: string;
110
- relation?: "supports" | "contradicts" | "supporting" | "contradicting";
111
- evidenceRelation?: "supports" | "contradicts";
112
- confidence?: number;
113
- weight?: number;
114
- rationale?: string;
115
- }>;
116
- metadata?: JsonObject;
117
- title?: string;
118
- content?: string;
119
- contentType?: string;
120
- kind?: string;
121
- rationale?: string;
122
- supports?: {
123
- nodeId: string;
124
- weight: number;
125
- reasoning?: string;
126
- };
127
- }): any;
97
+ create(args: EvidenceCompatInput): any;
128
98
  add: any;
129
99
  get(evidenceId: string): any;
130
100
  list(args: {
@@ -182,7 +152,12 @@ export declare function createClientKnowledgeNamespaces(ctx: ClientNamespaceCont
182
152
  metadata?: JsonObject;
183
153
  }): any;
184
154
  get(questionId: string): any;
185
- refine(questionId: string, text: string, refinementReason?: string): any;
155
+ refine(questionId: string, input: string | {
156
+ text?: string;
157
+ question?: string;
158
+ rationale?: string;
159
+ linkedWorktreeId?: string;
160
+ }, refinementReason?: string): any;
186
161
  list(args: {
187
162
  topicId?: string;
188
163
  status?: string;
@@ -359,12 +359,15 @@ export function createClientKnowledgeNamespaces(ctx) {
359
359
  get(questionId) {
360
360
  return questionsFacade.get(questionId).then(exposeGatewayData);
361
361
  },
362
- refine(questionId, text, refinementReason) {
362
+ refine(questionId, input, refinementReason) {
363
+ const payload = typeof input === "string"
364
+ ? {
365
+ text: input,
366
+ rationale: refinementReason,
367
+ }
368
+ : input;
363
369
  return questionsFacade
364
- .refine(questionId, {
365
- text,
366
- rationale: refinementReason,
367
- })
370
+ .refine(questionId, payload)
368
371
  .then(exposeGatewayData);
369
372
  },
370
373
  list(args) {
@@ -4,38 +4,7 @@ export * as toolSchemas from "@lucern/contracts/tool-contracts";
4
4
  export type EvidenceClientConfig = LucernClientConfig;
5
5
  export type EvidenceClient = ReturnType<typeof createEvidenceClient>;
6
6
  export declare function createEvidenceClient(config?: EvidenceClientConfig): {
7
- createEvidence: (args: {
8
- text?: string;
9
- canonicalText?: string;
10
- topicId?: string;
11
- source?: string;
12
- sourceUrl?: string;
13
- targetId?: string;
14
- weight?: number;
15
- evidenceRelation?: "supports" | "contradicts";
16
- confidence?: number;
17
- beliefRelations?: Array<{
18
- beliefId?: string;
19
- beliefNodeId?: string;
20
- targetId?: string;
21
- relation?: "supports" | "contradicts" | "supporting" | "contradicting";
22
- evidenceRelation?: "supports" | "contradicts";
23
- confidence?: number;
24
- weight?: number;
25
- rationale?: string;
26
- }>;
27
- metadata?: import("..").JsonObject;
28
- title?: string;
29
- content?: string;
30
- contentType?: string;
31
- kind?: string;
32
- rationale?: string;
33
- supports?: {
34
- nodeId: string;
35
- weight: number;
36
- reasoning?: string;
37
- };
38
- }) => any;
7
+ createEvidence: (args: import("../clientEvidenceCompat").EvidenceCompatInput) => any;
39
8
  getEvidence: (evidenceId: string) => any;
40
9
  listEvidence: (args: {
41
10
  topicId?: string;
@@ -66,38 +35,7 @@ export declare function createEvidenceClient(config?: EvidenceClientConfig): {
66
35
  classifyEvidence: (beliefId: string, evidenceId: string, config?: Parameters<any>[2], idempotencyKey?: string) => any;
67
36
  classifyEvidenceBatch: (beliefId: string, evidence: Parameters<any>[1], config?: Parameters<any>[2], idempotencyKey?: string) => any;
68
37
  raw: {
69
- create(args: {
70
- text?: string;
71
- canonicalText?: string;
72
- topicId?: string;
73
- source?: string;
74
- sourceUrl?: string;
75
- targetId?: string;
76
- weight?: number;
77
- evidenceRelation?: "supports" | "contradicts";
78
- confidence?: number;
79
- beliefRelations?: Array<{
80
- beliefId?: string;
81
- beliefNodeId?: string;
82
- targetId?: string;
83
- relation?: "supports" | "contradicts" | "supporting" | "contradicting";
84
- evidenceRelation?: "supports" | "contradicts";
85
- confidence?: number;
86
- weight?: number;
87
- rationale?: string;
88
- }>;
89
- metadata?: import("..").JsonObject;
90
- title?: string;
91
- content?: string;
92
- contentType?: string;
93
- kind?: string;
94
- rationale?: string;
95
- supports?: {
96
- nodeId: string;
97
- weight: number;
98
- reasoning?: string;
99
- };
100
- }): any;
38
+ create(args: import("../clientEvidenceCompat").EvidenceCompatInput): any;
101
39
  add: any;
102
40
  get(evidenceId: string): any;
103
41
  list(args: {
@@ -171,6 +171,16 @@ export type EvidenceCreateInput = {
171
171
  content?: string;
172
172
  contentType?: string;
173
173
  kind?: string;
174
+ tags?: string[];
175
+ sourceUrl?: string;
176
+ externalSourceUrl?: string;
177
+ sourceType?: string;
178
+ externalSourceType?: string;
179
+ sourceQuestionId?: string;
180
+ methodology?: string;
181
+ informationAsymmetry?: string;
182
+ sourceQuality?: "primary" | "analyzed" | "secondary" | "tertiary" | "unknown";
183
+ sourceDescription?: string;
174
184
  };
175
185
  export type EvidenceListQuery = {
176
186
  topicId?: string;
@@ -217,8 +227,10 @@ export type QuestionAnswerInput = {
217
227
  rationale?: string;
218
228
  };
219
229
  export type QuestionRefineInput = {
220
- text: string;
230
+ text?: string;
231
+ question?: string;
221
232
  rationale?: string;
233
+ linkedWorktreeId?: string;
222
234
  };
223
235
  export type QuestionArchiveInput = {
224
236
  reason?: string;
@@ -41,5 +41,5 @@
41
41
  "convex-validators",
42
42
  "proof-attestation"
43
43
  ],
44
- "signedAt": 1780432640939
44
+ "signedAt": 1780614051827
45
45
  }
@@ -26,7 +26,12 @@ export declare function createQuestionsClient(config?: QuestionsClientConfig): {
26
26
  evidenceIds?: string[];
27
27
  rationale?: string;
28
28
  }) => any;
29
- refineQuestion: (questionId: string, text: string, refinementReason?: string) => any;
29
+ refineQuestion: (questionId: string, input: string | {
30
+ text?: string;
31
+ question?: string;
32
+ rationale?: string;
33
+ linkedWorktreeId?: string;
34
+ }, refinementReason?: string) => any;
30
35
  updateQuestionStatus: (questionId: string, status: string, rationale?: string) => any;
31
36
  archiveQuestion: (questionId: string, reason?: string) => any;
32
37
  getHighPriorityQuestions: (args: {
@@ -47,7 +52,12 @@ export declare function createQuestionsClient(config?: QuestionsClientConfig): {
47
52
  metadata?: import("..").JsonObject;
48
53
  }): any;
49
54
  get(questionId: string): any;
50
- refine(questionId: string, text: string, refinementReason?: string): any;
55
+ refine(questionId: string, input: string | {
56
+ text?: string;
57
+ question?: string;
58
+ rationale?: string;
59
+ linkedWorktreeId?: string;
60
+ }, refinementReason?: string): any;
51
61
  list(args: {
52
62
  topicId?: string;
53
63
  status?: string;
package/dist/version.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  /** Current SDK package version. */
2
- export declare const LUCERN_SDK_VERSION = "1.0.18";
2
+ export declare const LUCERN_SDK_VERSION = "1.0.19";
3
3
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /** Current SDK package version. */
2
- export const LUCERN_SDK_VERSION = "1.0.18";
2
+ export const LUCERN_SDK_VERSION = "1.0.19";
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucern/sdk",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -113,10 +113,10 @@
113
113
  "typecheck": "tsc --project tsconfig.typecheck.json --noEmit"
114
114
  },
115
115
  "dependencies": {
116
- "@lucern/contracts": "1.0.18",
117
- "@lucern/reasoning-kernel": "1.0.18",
118
- "@lucern/secrets": "1.0.18",
119
- "@lucern/transport-core": "1.0.18",
116
+ "@lucern/contracts": "1.0.19",
117
+ "@lucern/reasoning-kernel": "1.0.19",
118
+ "@lucern/secrets": "1.0.19",
119
+ "@lucern/transport-core": "1.0.19",
120
120
  "effect": "^3.21.2",
121
121
  "zod": "^3.25.76"
122
122
  },