@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/index.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ export { AddWorktreeInput, AdvanceWorktreePhaseInput, BulkCreateWorktreesInput,
|
|
|
59
59
|
export * from '@lucern/contracts/tool-contracts';
|
|
60
60
|
import './mcpClient.js';
|
|
61
61
|
import '@lucern/contracts/mcp-gateway-boundary.contract';
|
|
62
|
+
import './clientHelpers.js';
|
|
62
63
|
import './contextPackPolicy.js';
|
|
63
64
|
import 'zod';
|
|
64
65
|
import './boundaryClientSurface.js';
|
package/dist/index.js
CHANGED
|
@@ -6628,6 +6628,21 @@ function createSchemaClient(config = {}) {
|
|
|
6628
6628
|
}
|
|
6629
6629
|
|
|
6630
6630
|
// src/clientHelpers.ts
|
|
6631
|
+
function normalizeCustomNamespace(namespace) {
|
|
6632
|
+
return namespace.trim() || "custom";
|
|
6633
|
+
}
|
|
6634
|
+
function normalizeCustomToolPayload(input) {
|
|
6635
|
+
return input && typeof input === "object" && !Array.isArray(input) ? input : {};
|
|
6636
|
+
}
|
|
6637
|
+
function resolveCustomToolFullName(name) {
|
|
6638
|
+
return name.includes(".") ? name : `custom.${name}`;
|
|
6639
|
+
}
|
|
6640
|
+
function buildBeliefsRefinePayload(textOrInput, rationale) {
|
|
6641
|
+
return typeof textOrInput === "string" ? { text: textOrInput, rationale } : { text: textOrInput.text, rationale: textOrInput.rationale };
|
|
6642
|
+
}
|
|
6643
|
+
function buildBeliefsArchivePayload(input) {
|
|
6644
|
+
return typeof input === "string" ? { reason: input } : input ? { reason: input.reason ?? input.rationale } : void 0;
|
|
6645
|
+
}
|
|
6631
6646
|
function asNodeArray(data) {
|
|
6632
6647
|
const rows = asListItems(data, "nodes");
|
|
6633
6648
|
if (rows.length > 0) {
|
|
@@ -7005,7 +7020,7 @@ function createToolRegistryClient(config = {}) {
|
|
|
7005
7020
|
}
|
|
7006
7021
|
|
|
7007
7022
|
// src/version.ts
|
|
7008
|
-
var LUCERN_SDK_VERSION = "0.3.0-alpha.
|
|
7023
|
+
var LUCERN_SDK_VERSION = "0.3.0-alpha.9";
|
|
7009
7024
|
|
|
7010
7025
|
// src/workflowClient.ts
|
|
7011
7026
|
function normalizeLensQuery(value) {
|
|
@@ -7526,11 +7541,11 @@ function createLucernClient(config = {}) {
|
|
|
7526
7541
|
}
|
|
7527
7542
|
}
|
|
7528
7543
|
const invokeCustomTool = async (fullName, input = {}) => {
|
|
7529
|
-
const payload =
|
|
7544
|
+
const payload = normalizeCustomToolPayload(input);
|
|
7530
7545
|
return invokeRegisteredCustomTool(fullName, payload, { source: "sdk" });
|
|
7531
7546
|
};
|
|
7532
7547
|
const getCustomNamespace = (namespace) => {
|
|
7533
|
-
const normalized = namespace
|
|
7548
|
+
const normalized = normalizeCustomNamespace(namespace);
|
|
7534
7549
|
const cached = customNamespaceCache.get(normalized);
|
|
7535
7550
|
if (cached) {
|
|
7536
7551
|
return cached;
|
|
@@ -7990,10 +8005,7 @@ function createLucernClient(config = {}) {
|
|
|
7990
8005
|
return beliefsFacade.get(nodeId).then(exposeGatewayData);
|
|
7991
8006
|
},
|
|
7992
8007
|
refine(nodeId, textOrInput, rationale) {
|
|
7993
|
-
const payload =
|
|
7994
|
-
text: textOrInput.text,
|
|
7995
|
-
rationale: textOrInput.rationale
|
|
7996
|
-
};
|
|
8008
|
+
const payload = buildBeliefsRefinePayload(textOrInput, rationale);
|
|
7997
8009
|
return beliefsFacade.refine(nodeId, payload).then(exposeGatewayData);
|
|
7998
8010
|
},
|
|
7999
8011
|
updateConfidence(nodeId, input) {
|
|
@@ -8031,7 +8043,7 @@ function createLucernClient(config = {}) {
|
|
|
8031
8043
|
}).then(exposeGatewayData);
|
|
8032
8044
|
},
|
|
8033
8045
|
archive(nodeId, input) {
|
|
8034
|
-
const payload =
|
|
8046
|
+
const payload = buildBeliefsArchivePayload(input);
|
|
8035
8047
|
return beliefsFacade.archive(nodeId, payload).then(exposeGatewayData);
|
|
8036
8048
|
},
|
|
8037
8049
|
list(args) {
|
|
@@ -9071,7 +9083,7 @@ function createLucernClient(config = {}) {
|
|
|
9071
9083
|
list: listRegisteredCustomTools,
|
|
9072
9084
|
clear: clearRegisteredCustomTools,
|
|
9073
9085
|
invoke(name, input = {}) {
|
|
9074
|
-
const fullName = name
|
|
9086
|
+
const fullName = resolveCustomToolFullName(name);
|
|
9075
9087
|
return invokeCustomTool(fullName, input);
|
|
9076
9088
|
},
|
|
9077
9089
|
namespace: getCustomNamespace
|