@lucern/sdk 0.3.0-alpha.8 → 0.3.0-alpha.9
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/dist/beliefs/index.d.ts +1 -0
- package/dist/beliefs/index.js +21 -9
- package/dist/beliefs/index.js.map +1 -1
- package/dist/client.d.ts +5 -2
- package/dist/client.js +21 -9
- package/dist/client.js.map +1 -1
- package/dist/clientHelpers.d.ts +21 -2
- package/dist/clientHelpers.js +16 -1
- package/dist/clientHelpers.js.map +1 -1
- package/dist/contradictions/index.d.ts +1 -0
- package/dist/contradictions/index.js +21 -9
- package/dist/contradictions/index.js.map +1 -1
- package/dist/decisions/index.d.ts +1 -0
- package/dist/decisions/index.js +21 -9
- package/dist/decisions/index.js.map +1 -1
- package/dist/edges/index.d.ts +1 -0
- package/dist/edges/index.js +21 -9
- package/dist/edges/index.js.map +1 -1
- package/dist/evidence/index.d.ts +1 -0
- package/dist/evidence/index.js +21 -9
- package/dist/evidence/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +21 -9
- package/dist/index.js.map +1 -1
- package/dist/lenses/index.d.ts +1 -0
- package/dist/lenses/index.js +21 -9
- package/dist/lenses/index.js.map +1 -1
- package/dist/nodes/index.d.ts +1 -0
- package/dist/nodes/index.js +21 -9
- package/dist/nodes/index.js.map +1 -1
- package/dist/ontologies/index.d.ts +1 -0
- package/dist/ontologies/index.js +21 -9
- package/dist/ontologies/index.js.map +1 -1
- package/dist/questions/index.d.ts +1 -0
- package/dist/questions/index.js +21 -9
- package/dist/questions/index.js.map +1 -1
- package/dist/topics/index.d.ts +1 -0
- package/dist/topics/index.js +21 -9
- package/dist/topics/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/worktrees/index.d.ts +1 -0
- package/dist/worktrees/index.js +21 -9
- package/dist/worktrees/index.js.map +1 -1
- package/package.json +4 -4
package/dist/lenses/index.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ import '../graphClient.js';
|
|
|
54
54
|
import '../learningClient.js';
|
|
55
55
|
import '../reportsClient.js';
|
|
56
56
|
import '../sourcesClient.js';
|
|
57
|
+
import '../clientHelpers.js';
|
|
57
58
|
|
|
58
59
|
type LensesClientConfig = LucernClientConfig;
|
|
59
60
|
type LensesClient = ReturnType<typeof createLensesClient>;
|
package/dist/lenses/index.js
CHANGED
|
@@ -6262,6 +6262,21 @@ function createSchemaClient(config = {}) {
|
|
|
6262
6262
|
}
|
|
6263
6263
|
|
|
6264
6264
|
// src/clientHelpers.ts
|
|
6265
|
+
function normalizeCustomNamespace(namespace) {
|
|
6266
|
+
return namespace.trim() || "custom";
|
|
6267
|
+
}
|
|
6268
|
+
function normalizeCustomToolPayload(input) {
|
|
6269
|
+
return input && typeof input === "object" && !Array.isArray(input) ? input : {};
|
|
6270
|
+
}
|
|
6271
|
+
function resolveCustomToolFullName(name) {
|
|
6272
|
+
return name.includes(".") ? name : `custom.${name}`;
|
|
6273
|
+
}
|
|
6274
|
+
function buildBeliefsRefinePayload(textOrInput, rationale) {
|
|
6275
|
+
return typeof textOrInput === "string" ? { text: textOrInput, rationale } : { text: textOrInput.text, rationale: textOrInput.rationale };
|
|
6276
|
+
}
|
|
6277
|
+
function buildBeliefsArchivePayload(input) {
|
|
6278
|
+
return typeof input === "string" ? { reason: input } : input ? { reason: input.reason ?? input.rationale } : void 0;
|
|
6279
|
+
}
|
|
6265
6280
|
function asNodeArray(data) {
|
|
6266
6281
|
const rows = asListItems(data, "nodes");
|
|
6267
6282
|
if (rows.length > 0) {
|
|
@@ -6639,7 +6654,7 @@ function createToolRegistryClient(config = {}) {
|
|
|
6639
6654
|
}
|
|
6640
6655
|
|
|
6641
6656
|
// src/version.ts
|
|
6642
|
-
var LUCERN_SDK_VERSION = "0.3.0-alpha.
|
|
6657
|
+
var LUCERN_SDK_VERSION = "0.3.0-alpha.9";
|
|
6643
6658
|
|
|
6644
6659
|
// src/workflowClient.ts
|
|
6645
6660
|
function normalizeLensQuery(value) {
|
|
@@ -7160,11 +7175,11 @@ function createLucernClient(config = {}) {
|
|
|
7160
7175
|
}
|
|
7161
7176
|
}
|
|
7162
7177
|
const invokeCustomTool = async (fullName, input = {}) => {
|
|
7163
|
-
const payload =
|
|
7178
|
+
const payload = normalizeCustomToolPayload(input);
|
|
7164
7179
|
return invokeRegisteredCustomTool(fullName, payload, { source: "sdk" });
|
|
7165
7180
|
};
|
|
7166
7181
|
const getCustomNamespace = (namespace) => {
|
|
7167
|
-
const normalized = namespace
|
|
7182
|
+
const normalized = normalizeCustomNamespace(namespace);
|
|
7168
7183
|
const cached = customNamespaceCache.get(normalized);
|
|
7169
7184
|
if (cached) {
|
|
7170
7185
|
return cached;
|
|
@@ -7624,10 +7639,7 @@ function createLucernClient(config = {}) {
|
|
|
7624
7639
|
return beliefsFacade.get(nodeId).then(exposeGatewayData);
|
|
7625
7640
|
},
|
|
7626
7641
|
refine(nodeId, textOrInput, rationale) {
|
|
7627
|
-
const payload =
|
|
7628
|
-
text: textOrInput.text,
|
|
7629
|
-
rationale: textOrInput.rationale
|
|
7630
|
-
};
|
|
7642
|
+
const payload = buildBeliefsRefinePayload(textOrInput, rationale);
|
|
7631
7643
|
return beliefsFacade.refine(nodeId, payload).then(exposeGatewayData);
|
|
7632
7644
|
},
|
|
7633
7645
|
updateConfidence(nodeId, input) {
|
|
@@ -7665,7 +7677,7 @@ function createLucernClient(config = {}) {
|
|
|
7665
7677
|
}).then(exposeGatewayData);
|
|
7666
7678
|
},
|
|
7667
7679
|
archive(nodeId, input) {
|
|
7668
|
-
const payload =
|
|
7680
|
+
const payload = buildBeliefsArchivePayload(input);
|
|
7669
7681
|
return beliefsFacade.archive(nodeId, payload).then(exposeGatewayData);
|
|
7670
7682
|
},
|
|
7671
7683
|
list(args) {
|
|
@@ -8705,7 +8717,7 @@ function createLucernClient(config = {}) {
|
|
|
8705
8717
|
list: listRegisteredCustomTools,
|
|
8706
8718
|
clear: clearRegisteredCustomTools,
|
|
8707
8719
|
invoke(name, input = {}) {
|
|
8708
|
-
const fullName = name
|
|
8720
|
+
const fullName = resolveCustomToolFullName(name);
|
|
8709
8721
|
return invokeCustomTool(fullName, input);
|
|
8710
8722
|
},
|
|
8711
8723
|
namespace: getCustomNamespace
|