@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/webhooks.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",
@@ -20017,6 +20009,7 @@ var LUCERN_OPERATION_MANIFEST = {
20017
20009
 
20018
20010
  // ../contracts/src/function-registry/helpers.ts
20019
20011
  var jsonObjectSchema = z.record(z.unknown());
20012
+ var uuidV7StringSchema = z.string().refine(isUuidV7, "must be UUIDv7");
20020
20013
  var sdkSessionIdSchema = z.string().optional();
20021
20014
  function publicPrefixedId(prefix, rawId) {
20022
20015
  return rawId.startsWith(`${prefix}_`) ? rawId : encodePrefixedId(prefix, rawId);
@@ -20555,14 +20548,8 @@ var predictionMetaSchema = z.object({
20555
20548
  });
20556
20549
  var createBeliefArgs = z.object({
20557
20550
  canonicalText: z.string().describe("The belief statement the agent holds to be true."),
20558
- topicGlobalId: z.string().describe(
20559
- "Required globalId of the topic epistemicNode that anchors this belief. Belief creation creates a belongs_to edge directly to that topic node."
20560
- ),
20561
- topicNodeId: z.string().optional().describe(
20562
- "Optional internal epistemicNodes _id for the topic anchor. Prefer topicGlobalId for public callers."
20563
- ),
20564
- topicId: z.string().optional().describe(
20565
- "Deprecated compatibility alias for topicGlobalId. Must identify a topic epistemicNode, not a legacy topics-table row."
20551
+ topicGlobalId: uuidV7StringSchema.describe(
20552
+ "Required UUIDv7 globalId of the topic epistemicNode that anchors this belief. Belief creation creates a belongs_to edge directly to that topic node."
20566
20553
  ),
20567
20554
  baseRate: z.number().optional().describe("Prior base rate used to seed the vacuous opinion."),
20568
20555
  beliefStatus: beliefLifecycleStatusSchema.optional().describe(
@@ -20609,9 +20596,8 @@ var createBeliefInput = (input, context) => {
20609
20596
  return withUserId(
20610
20597
  compactRecord4({
20611
20598
  projectId: input.projectId,
20612
- topicId: input.topicGlobalId ?? input.topicNodeId ?? input.topicId,
20599
+ topicId: input.topicGlobalId,
20613
20600
  topicGlobalId: input.topicGlobalId,
20614
- topicNodeId: input.topicNodeId,
20615
20601
  formulation: input.formulation ?? input.canonicalText,
20616
20602
  beliefType: input.beliefType,
20617
20603
  rationale: input.rationale,
@@ -20670,7 +20656,8 @@ var beliefsContracts = [
20670
20656
  kind: "mutation",
20671
20657
  inputProjection: createBeliefInput
20672
20658
  },
20673
- args: createBeliefArgs
20659
+ args: createBeliefArgs,
20660
+ input: createBeliefArgs
20674
20661
  }),
20675
20662
  surfaceContract({
20676
20663
  name: "get_belief",
@@ -21601,7 +21588,9 @@ var topicVisibilitySchema = z.enum([
21601
21588
  ]);
21602
21589
  var topicStatusSchema = z.enum(["active", "archived", "watching"]);
21603
21590
  var createTopicArgs = z.object({
21604
- globalId: z.string().optional().describe("Optional idempotent topic global ID."),
21591
+ globalId: uuidV7StringSchema.optional().describe(
21592
+ "Optional idempotent UUIDv7 topic global ID. When omitted, the kernel mints UUIDv7."
21593
+ ),
21605
21594
  name: z.string().describe("Topic name."),
21606
21595
  description: z.string().optional().describe("Topic description."),
21607
21596
  type: z.string().describe("Topic type."),
@@ -21667,7 +21656,8 @@ var topicsContracts = [
21667
21656
  kind: "mutation",
21668
21657
  inputProjection: withCreatedBy
21669
21658
  },
21670
- args: createTopicArgs
21659
+ args: createTopicArgs,
21660
+ input: createTopicArgs
21671
21661
  }),
21672
21662
  surfaceContract({
21673
21663
  name: "get_topic",