@lucern/events 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/dist/outbox.js CHANGED
@@ -790,15 +790,7 @@ var CREATE_BELIEF = {
790
790
  },
791
791
  topicGlobalId: {
792
792
  type: "string",
793
- description: "Required globalId (UUID) of the topic node in epistemicNodes that anchors the belief"
794
- },
795
- topicNodeId: {
796
- type: "string",
797
- description: "Optional internal epistemicNodes _id for the topic anchor. Prefer topicGlobalId for public callers."
798
- },
799
- topicId: {
800
- type: "string",
801
- description: "Deprecated compatibility alias for topicGlobalId. Must identify a topic epistemicNode, not a legacy topics-table row."
793
+ 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."
802
794
  },
803
795
  baseRate: {
804
796
  type: "number",
@@ -20108,6 +20100,7 @@ var LUCERN_OPERATION_MANIFEST = {
20108
20100
 
20109
20101
  // ../contracts/src/function-registry/helpers.ts
20110
20102
  var jsonObjectSchema = z.record(z.unknown());
20103
+ var uuidV7StringSchema = z.string().refine(isUuidV7, "must be UUIDv7");
20111
20104
  var sdkSessionIdSchema = z.string().optional();
20112
20105
  function publicPrefixedId(prefix, rawId) {
20113
20106
  return rawId.startsWith(`${prefix}_`) ? rawId : encodePrefixedId(prefix, rawId);
@@ -20646,14 +20639,8 @@ var predictionMetaSchema = z.object({
20646
20639
  });
20647
20640
  var createBeliefArgs = z.object({
20648
20641
  canonicalText: z.string().describe("The belief statement the agent holds to be true."),
20649
- topicGlobalId: z.string().describe(
20650
- "Required globalId of the topic epistemicNode that anchors this belief. Belief creation creates a belongs_to edge directly to that topic node."
20651
- ),
20652
- topicNodeId: z.string().optional().describe(
20653
- "Optional internal epistemicNodes _id for the topic anchor. Prefer topicGlobalId for public callers."
20654
- ),
20655
- topicId: z.string().optional().describe(
20656
- "Deprecated compatibility alias for topicGlobalId. Must identify a topic epistemicNode, not a legacy topics-table row."
20642
+ topicGlobalId: uuidV7StringSchema.describe(
20643
+ "Required UUIDv7 globalId of the topic epistemicNode that anchors this belief. Belief creation creates a belongs_to edge directly to that topic node."
20657
20644
  ),
20658
20645
  baseRate: z.number().optional().describe("Prior base rate used to seed the vacuous opinion."),
20659
20646
  beliefStatus: beliefLifecycleStatusSchema.optional().describe(
@@ -20700,9 +20687,8 @@ var createBeliefInput = (input, context) => {
20700
20687
  return withUserId(
20701
20688
  compactRecord4({
20702
20689
  projectId: input.projectId,
20703
- topicId: input.topicGlobalId ?? input.topicNodeId ?? input.topicId,
20690
+ topicId: input.topicGlobalId,
20704
20691
  topicGlobalId: input.topicGlobalId,
20705
- topicNodeId: input.topicNodeId,
20706
20692
  formulation: input.formulation ?? input.canonicalText,
20707
20693
  beliefType: input.beliefType,
20708
20694
  rationale: input.rationale,
@@ -20761,7 +20747,8 @@ var beliefsContracts = [
20761
20747
  kind: "mutation",
20762
20748
  inputProjection: createBeliefInput
20763
20749
  },
20764
- args: createBeliefArgs
20750
+ args: createBeliefArgs,
20751
+ input: createBeliefArgs
20765
20752
  }),
20766
20753
  surfaceContract({
20767
20754
  name: "get_belief",
@@ -21692,7 +21679,9 @@ var topicVisibilitySchema = z.enum([
21692
21679
  ]);
21693
21680
  var topicStatusSchema = z.enum(["active", "archived", "watching"]);
21694
21681
  var createTopicArgs = z.object({
21695
- globalId: z.string().optional().describe("Optional idempotent topic global ID."),
21682
+ globalId: uuidV7StringSchema.optional().describe(
21683
+ "Optional idempotent UUIDv7 topic global ID. When omitted, the kernel mints UUIDv7."
21684
+ ),
21696
21685
  name: z.string().describe("Topic name."),
21697
21686
  description: z.string().optional().describe("Topic description."),
21698
21687
  type: z.string().describe("Topic type."),
@@ -21758,7 +21747,8 @@ var topicsContracts = [
21758
21747
  kind: "mutation",
21759
21748
  inputProjection: withCreatedBy
21760
21749
  },
21761
- args: createTopicArgs
21750
+ args: createTopicArgs,
21751
+ input: createTopicArgs
21762
21752
  }),
21763
21753
  surfaceContract({
21764
21754
  name: "get_topic",