@lucern/contracts 1.0.19 → 1.0.20
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 +3 -0
- package/dist/function-registry/beliefs.js +13 -20
- package/dist/function-registry/beliefs.js.map +1 -1
- package/dist/function-registry/coding.js +8 -9
- package/dist/function-registry/coding.js.map +1 -1
- package/dist/function-registry/context.js +8 -9
- package/dist/function-registry/context.js.map +1 -1
- package/dist/function-registry/contracts.js +8 -9
- package/dist/function-registry/contracts.js.map +1 -1
- package/dist/function-registry/coordination.js +8 -9
- package/dist/function-registry/coordination.js.map +1 -1
- package/dist/function-registry/edges.js +8 -9
- package/dist/function-registry/edges.js.map +1 -1
- package/dist/function-registry/evidence.js +8 -15
- package/dist/function-registry/evidence.js.map +1 -1
- package/dist/function-registry/graph.js +8 -9
- package/dist/function-registry/graph.js.map +1 -1
- package/dist/function-registry/helpers.d.ts +2 -1
- package/dist/function-registry/helpers.js +9 -10
- package/dist/function-registry/helpers.js.map +1 -1
- package/dist/function-registry/identity.js +8 -9
- package/dist/function-registry/identity.js.map +1 -1
- package/dist/function-registry/index.d.ts +1 -1
- package/dist/function-registry/index.js +9 -10
- package/dist/function-registry/index.js.map +1 -1
- package/dist/function-registry/judgments.js +8 -9
- package/dist/function-registry/judgments.js.map +1 -1
- package/dist/function-registry/legacy.js +8 -9
- package/dist/function-registry/legacy.js.map +1 -1
- package/dist/function-registry/lenses.js +8 -9
- package/dist/function-registry/lenses.js.map +1 -1
- package/dist/function-registry/nodes.js +8 -9
- package/dist/function-registry/nodes.js.map +1 -1
- package/dist/function-registry/ontologies.js +8 -9
- package/dist/function-registry/ontologies.js.map +1 -1
- package/dist/function-registry/pipeline.js +8 -9
- package/dist/function-registry/pipeline.js.map +1 -1
- package/dist/function-registry/questions.js +8 -9
- package/dist/function-registry/questions.js.map +1 -1
- package/dist/function-registry/tasks.js +8 -9
- package/dist/function-registry/tasks.js.map +1 -1
- package/dist/function-registry/topics.js +13 -11
- package/dist/function-registry/topics.js.map +1 -1
- package/dist/function-registry/worktrees.js +8 -9
- package/dist/function-registry/worktrees.js.map +1 -1
- package/dist/index.js +1 -9
- package/dist/index.js.map +1 -1
- package/dist/proof-attestation.json +1 -1
- package/dist/sdk-methods.contract.d.ts +1 -3
- package/dist/sdk-tools.contract.js +1 -9
- package/dist/sdk-tools.contract.js.map +1 -1
- package/dist/sdk-tools.contract.registry.js +1 -9
- package/dist/sdk-tools.contract.registry.js.map +1 -1
- package/dist/sdk-tools.contract.values.js +1 -9
- package/dist/sdk-tools.contract.values.js.map +1 -1
- package/dist/tool-contracts.js +1 -9
- package/dist/tool-contracts.js.map +1 -1
- package/dist/tool-contracts.lifecycle.js +1 -9
- package/dist/tool-contracts.lifecycle.js.map +1 -1
- package/dist/tool-contracts.values.js +1 -9
- package/dist/tool-contracts.values.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@ import { v } from 'convex/values';
|
|
|
3
3
|
|
|
4
4
|
// src/function-registry/beliefs.ts
|
|
5
5
|
|
|
6
|
+
// src/ids/index.ts
|
|
7
|
+
var UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
8
|
+
function isUuidV7(value) {
|
|
9
|
+
return UUID_PATTERN.test(value) && value[14]?.toLowerCase() === "7";
|
|
10
|
+
}
|
|
11
|
+
|
|
6
12
|
// src/tool-contracts.lifecycle.ts
|
|
7
13
|
var CREATE_BELIEF = {
|
|
8
14
|
name: "create_belief",
|
|
@@ -14,15 +20,7 @@ var CREATE_BELIEF = {
|
|
|
14
20
|
},
|
|
15
21
|
topicGlobalId: {
|
|
16
22
|
type: "string",
|
|
17
|
-
description: "Required globalId
|
|
18
|
-
},
|
|
19
|
-
topicNodeId: {
|
|
20
|
-
type: "string",
|
|
21
|
-
description: "Optional internal epistemicNodes _id for the topic anchor. Prefer topicGlobalId for public callers."
|
|
22
|
-
},
|
|
23
|
-
topicId: {
|
|
24
|
-
type: "string",
|
|
25
|
-
description: "Deprecated compatibility alias for topicGlobalId. Must identify a topic epistemicNode, not a legacy topics-table row."
|
|
23
|
+
description: "Required UUIDv7 globalId of the topic node in epistemicNodes that anchors the belief. Legacy topics-table ids, Convex storage locators, and UUIDv4 values are refused."
|
|
26
24
|
},
|
|
27
25
|
baseRate: {
|
|
28
26
|
type: "number",
|
|
@@ -5313,6 +5311,7 @@ z.enum(["private", "team", "firm", "external", "public"]);
|
|
|
5313
5311
|
|
|
5314
5312
|
// src/function-registry/helpers.ts
|
|
5315
5313
|
var jsonObjectSchema = z.record(z.unknown());
|
|
5314
|
+
var uuidV7StringSchema = z.string().refine(isUuidV7, "must be UUIDv7");
|
|
5316
5315
|
var sdkSessionIdSchema = z.string().optional();
|
|
5317
5316
|
function mcpContractShape(contract) {
|
|
5318
5317
|
const required = new Set(contract.required);
|
|
@@ -5793,14 +5792,8 @@ var predictionMetaSchema = z.object({
|
|
|
5793
5792
|
});
|
|
5794
5793
|
var createBeliefArgs = z.object({
|
|
5795
5794
|
canonicalText: z.string().describe("The belief statement the agent holds to be true."),
|
|
5796
|
-
topicGlobalId:
|
|
5797
|
-
"Required globalId of the topic epistemicNode that anchors this belief. Belief creation creates a belongs_to edge directly to that topic node."
|
|
5798
|
-
),
|
|
5799
|
-
topicNodeId: z.string().optional().describe(
|
|
5800
|
-
"Optional internal epistemicNodes _id for the topic anchor. Prefer topicGlobalId for public callers."
|
|
5801
|
-
),
|
|
5802
|
-
topicId: z.string().optional().describe(
|
|
5803
|
-
"Deprecated compatibility alias for topicGlobalId. Must identify a topic epistemicNode, not a legacy topics-table row."
|
|
5795
|
+
topicGlobalId: uuidV7StringSchema.describe(
|
|
5796
|
+
"Required UUIDv7 globalId of the topic epistemicNode that anchors this belief. Belief creation creates a belongs_to edge directly to that topic node."
|
|
5804
5797
|
),
|
|
5805
5798
|
baseRate: z.number().optional().describe("Prior base rate used to seed the vacuous opinion."),
|
|
5806
5799
|
beliefStatus: beliefLifecycleStatusSchema.optional().describe(
|
|
@@ -5847,9 +5840,8 @@ var createBeliefInput = (input, context) => {
|
|
|
5847
5840
|
return withUserId(
|
|
5848
5841
|
compactRecord({
|
|
5849
5842
|
projectId: input.projectId,
|
|
5850
|
-
topicId: input.topicGlobalId
|
|
5843
|
+
topicId: input.topicGlobalId,
|
|
5851
5844
|
topicGlobalId: input.topicGlobalId,
|
|
5852
|
-
topicNodeId: input.topicNodeId,
|
|
5853
5845
|
formulation: input.formulation ?? input.canonicalText,
|
|
5854
5846
|
beliefType: input.beliefType,
|
|
5855
5847
|
rationale: input.rationale,
|
|
@@ -5908,7 +5900,8 @@ var beliefsContracts = [
|
|
|
5908
5900
|
kind: "mutation",
|
|
5909
5901
|
inputProjection: createBeliefInput
|
|
5910
5902
|
},
|
|
5911
|
-
args: createBeliefArgs
|
|
5903
|
+
args: createBeliefArgs,
|
|
5904
|
+
input: createBeliefArgs
|
|
5912
5905
|
}),
|
|
5913
5906
|
surfaceContract({
|
|
5914
5907
|
name: "get_belief",
|