@ourofoundation/ouro-js 3.8.1 → 3.8.3

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.
Files changed (68) hide show
  1. package/dist/chunk-64ZUBBP7.js +2 -0
  2. package/dist/chunk-64ZUBBP7.js.map +1 -0
  3. package/dist/chunk-ADLJ3UUW.cjs +2 -0
  4. package/dist/chunk-ADLJ3UUW.cjs.map +1 -0
  5. package/dist/chunk-AJ2O7ER6.js +2 -0
  6. package/dist/chunk-AJ2O7ER6.js.map +1 -0
  7. package/dist/{chunk-T6UO42TO.cjs → chunk-CIEATF7M.cjs} +2 -2
  8. package/dist/{chunk-T6UO42TO.cjs.map → chunk-CIEATF7M.cjs.map} +1 -1
  9. package/dist/chunk-GUEHIQ6T.cjs +2 -0
  10. package/dist/chunk-GUEHIQ6T.cjs.map +1 -0
  11. package/dist/chunk-LMRFVO4I.cjs +2 -0
  12. package/dist/chunk-LMRFVO4I.cjs.map +1 -0
  13. package/dist/chunk-MRUJUIPN.js +2 -0
  14. package/dist/chunk-MRUJUIPN.js.map +1 -0
  15. package/dist/chunk-OCMBP3U7.cjs +2 -0
  16. package/dist/chunk-OCMBP3U7.cjs.map +1 -0
  17. package/dist/chunk-PJLIO4PA.cjs +7 -0
  18. package/dist/chunk-PJLIO4PA.cjs.map +1 -0
  19. package/dist/chunk-Q4IXX6KS.js +7 -0
  20. package/dist/chunk-Q4IXX6KS.js.map +1 -0
  21. package/dist/chunk-XXFKHRNE.js +2 -0
  22. package/dist/chunk-XXFKHRNE.js.map +1 -0
  23. package/dist/{chunk-5CPECQKN.js → chunk-ZFARY5F4.js} +2 -2
  24. package/dist/{chunk-5CPECQKN.js.map → chunk-ZFARY5F4.js.map} +1 -1
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.d.cts +2 -2
  27. package/dist/index.d.ts +2 -2
  28. package/dist/index.js +1 -1
  29. package/dist/schema/asset-filters.cjs +1 -1
  30. package/dist/schema/asset-filters.d.cts +2 -0
  31. package/dist/schema/asset-filters.d.ts +2 -0
  32. package/dist/schema/asset-filters.js +1 -1
  33. package/dist/schema/notifications.cjs +1 -1
  34. package/dist/schema/notifications.d.cts +128 -1
  35. package/dist/schema/notifications.d.ts +128 -1
  36. package/dist/schema/notifications.js +1 -1
  37. package/dist/schema/quests.cjs +1 -1
  38. package/dist/schema/quests.js +1 -1
  39. package/dist/utils/air/index.cjs +1 -1
  40. package/dist/utils/air/index.d.cts +23 -1
  41. package/dist/utils/air/index.d.ts +23 -1
  42. package/dist/utils/air/index.js +1 -1
  43. package/dist/utils/air/markdown-parser.cjs +1 -1
  44. package/dist/utils/air/markdown-parser.js +1 -1
  45. package/dist/utils/quest-submission.cjs +1 -1
  46. package/dist/utils/quest-submission.js +1 -1
  47. package/package.json +1 -1
  48. package/tests/markdown-parser.test.mjs +52 -0
  49. package/dist/chunk-5SC4M4E3.cjs +0 -2
  50. package/dist/chunk-5SC4M4E3.cjs.map +0 -1
  51. package/dist/chunk-CRUIBV5F.js +0 -2
  52. package/dist/chunk-CRUIBV5F.js.map +0 -1
  53. package/dist/chunk-EC376C5T.js +0 -2
  54. package/dist/chunk-EC376C5T.js.map +0 -1
  55. package/dist/chunk-EVQAA7RQ.cjs +0 -2
  56. package/dist/chunk-EVQAA7RQ.cjs.map +0 -1
  57. package/dist/chunk-KMENBGAB.js +0 -2
  58. package/dist/chunk-KMENBGAB.js.map +0 -1
  59. package/dist/chunk-KXYKN3TY.js +0 -7
  60. package/dist/chunk-KXYKN3TY.js.map +0 -1
  61. package/dist/chunk-LHCGBWFP.cjs +0 -2
  62. package/dist/chunk-LHCGBWFP.cjs.map +0 -1
  63. package/dist/chunk-NSKBXBRD.cjs +0 -7
  64. package/dist/chunk-NSKBXBRD.cjs.map +0 -1
  65. package/dist/chunk-O4LSX56P.js +0 -2
  66. package/dist/chunk-O4LSX56P.js.map +0 -1
  67. package/dist/chunk-U6XOT6XH.cjs +0 -2
  68. package/dist/chunk-U6XOT6XH.cjs.map +0 -1
@@ -18,6 +18,7 @@ declare const NotificationTypeSchema: z.ZodEnum<{
18
18
  "action-failed": "action-failed";
19
19
  "quest-entry": "quest-entry";
20
20
  "quest-entry-accepted": "quest-entry-accepted";
21
+ "quest-entry-eval-failed": "quest-entry-eval-failed";
21
22
  "onboarding-complete": "onboarding-complete";
22
23
  "onboarding-action-required": "onboarding-action-required";
23
24
  "route-earnings-milestone": "route-earnings-milestone";
@@ -663,12 +664,34 @@ declare const QuestEntryAcceptedContentSchema: z.ZodObject<{
663
664
  asset_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
664
665
  asset_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
665
666
  }, z.core.$strip>>;
667
+ source: z.ZodOptional<z.ZodEnum<{
668
+ review: "review";
669
+ eval: "eval";
670
+ }>>;
666
671
  reviewer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
667
672
  id: z.ZodString;
668
673
  username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
669
674
  }, z.core.$strip>>>;
670
675
  text: z.ZodOptional<z.ZodString>;
671
676
  }, z.core.$strip>;
677
+ declare const QuestEntryEvalFailedContentSchema: z.ZodObject<{
678
+ quest: z.ZodOptional<z.ZodObject<{
679
+ id: z.ZodString;
680
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
681
+ }, z.core.$strip>>;
682
+ entry: z.ZodOptional<z.ZodObject<{
683
+ id: z.ZodString;
684
+ asset_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
685
+ asset_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
686
+ asset_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
687
+ }, z.core.$strip>>;
688
+ eval_status: z.ZodOptional<z.ZodEnum<{
689
+ failed: "failed";
690
+ errored: "errored";
691
+ }>>;
692
+ eval_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
693
+ text: z.ZodOptional<z.ZodString>;
694
+ }, z.core.$strip>;
672
695
  declare const OnboardingCompleteContentSchema: z.ZodObject<{
673
696
  text: z.ZodOptional<z.ZodString>;
674
697
  }, z.core.$strip>;
@@ -2682,12 +2705,116 @@ declare const NotificationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2682
2705
  asset_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2683
2706
  asset_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2684
2707
  }, z.core.$strip>>;
2708
+ source: z.ZodOptional<z.ZodEnum<{
2709
+ review: "review";
2710
+ eval: "eval";
2711
+ }>>;
2685
2712
  reviewer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2686
2713
  id: z.ZodString;
2687
2714
  username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2688
2715
  }, z.core.$strip>>>;
2689
2716
  text: z.ZodOptional<z.ZodString>;
2690
2717
  }, z.core.$strip>;
2718
+ }, z.core.$strip>, z.ZodObject<{
2719
+ id: z.ZodUUID;
2720
+ source_user_id: z.ZodUUID;
2721
+ destination_user_id: z.ZodUUID;
2722
+ org_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
2723
+ asset_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
2724
+ reaction_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
2725
+ action_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
2726
+ parent_asset_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
2727
+ root_asset_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
2728
+ viewed: z.ZodBoolean;
2729
+ created_at: z.ZodString;
2730
+ last_updated: z.ZodString;
2731
+ source_user: z.ZodOptional<z.ZodObject<{
2732
+ id: z.ZodOptional<z.ZodUUID>;
2733
+ user_id: z.ZodOptional<z.ZodUUID>;
2734
+ username: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2735
+ name: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2736
+ first_name: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2737
+ last_name: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2738
+ avatar_path: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2739
+ bio: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2740
+ is_provisioned: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
2741
+ claimed_at: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2742
+ urls: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
2743
+ value: z.ZodString;
2744
+ }, z.core.$strip>>>>;
2745
+ post_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUUID>>>;
2746
+ actor_type: z.ZodOptional<z.ZodEnum<{
2747
+ base: "base";
2748
+ agent: "agent";
2749
+ verified: "verified";
2750
+ }>>;
2751
+ plan_type: z.ZodOptional<z.ZodEnum<{
2752
+ free: "free";
2753
+ gold: "gold";
2754
+ }>>;
2755
+ last_active: z.ZodOptional<z.ZodString>;
2756
+ }, z.core.$strip>>;
2757
+ asset: z.ZodOptional<z.ZodObject<{
2758
+ assetId: z.ZodOptional<z.ZodString>;
2759
+ assetType: z.ZodOptional<z.ZodEnum<{
2760
+ user: "user";
2761
+ organization: "organization";
2762
+ team: "team";
2763
+ dataset: "dataset";
2764
+ file: "file";
2765
+ service: "service";
2766
+ route: "route";
2767
+ post: "post";
2768
+ quest: "quest";
2769
+ comment: "comment";
2770
+ conversation: "conversation";
2771
+ }>>;
2772
+ id: z.ZodOptional<z.ZodString>;
2773
+ asset_type: z.ZodOptional<z.ZodEnum<{
2774
+ user: "user";
2775
+ organization: "organization";
2776
+ team: "team";
2777
+ dataset: "dataset";
2778
+ file: "file";
2779
+ service: "service";
2780
+ route: "route";
2781
+ post: "post";
2782
+ quest: "quest";
2783
+ comment: "comment";
2784
+ conversation: "conversation";
2785
+ }>>;
2786
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2787
+ user_id: z.ZodOptional<z.ZodString>;
2788
+ preview: z.ZodOptional<z.ZodAny>;
2789
+ description: z.ZodOptional<z.ZodAny>;
2790
+ slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2791
+ name_url_slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2792
+ org_id: z.ZodOptional<z.ZodString>;
2793
+ parent_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2794
+ parent: z.ZodOptional<z.ZodAny>;
2795
+ user: z.ZodOptional<z.ZodAny>;
2796
+ organization: z.ZodOptional<z.ZodAny>;
2797
+ team: z.ZodOptional<z.ZodAny>;
2798
+ }, z.core.$strip>>;
2799
+ type: z.ZodLiteral<"quest-entry-eval-failed">;
2800
+ content: z.ZodObject<{
2801
+ quest: z.ZodOptional<z.ZodObject<{
2802
+ id: z.ZodString;
2803
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2804
+ }, z.core.$strip>>;
2805
+ entry: z.ZodOptional<z.ZodObject<{
2806
+ id: z.ZodString;
2807
+ asset_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2808
+ asset_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2809
+ asset_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2810
+ }, z.core.$strip>>;
2811
+ eval_status: z.ZodOptional<z.ZodEnum<{
2812
+ failed: "failed";
2813
+ errored: "errored";
2814
+ }>>;
2815
+ eval_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2816
+ text: z.ZodOptional<z.ZodString>;
2817
+ }, z.core.$strip>;
2691
2818
  }, z.core.$strip>, z.ZodObject<{
2692
2819
  id: z.ZodUUID;
2693
2820
  source_user_id: z.ZodUUID;
@@ -3448,4 +3575,4 @@ type NotificationOfType<T extends NotificationType> = Extract<Notification, {
3448
3575
  type NotificationContentAsset = z.infer<typeof NotificationContentAssetSchema>;
3449
3576
  type NotificationAssetRef = z.infer<typeof NotificationAssetRefSchema>;
3450
3577
 
3451
- export { ActionCompleteContentSchema, BadgeContentSchema, CommentContentSchema, ContentDeletedContentSchema, ContentMovedContentSchema, DepositContentSchema, EventContentSchema, FollowContentSchema, InviteContentSchema, MentionContentSchema, type Notification, type NotificationAssetRef, NotificationAssetRefSchema, type NotificationContentAsset, NotificationContentAssetSchema, type NotificationOfType, NotificationParentRefSchema, NotificationRootInfoSchema, NotificationSchema, type NotificationType, NotificationTypeSchema, OnboardingActionRequiredContentSchema, OnboardingCompleteContentSchema, OwnershipTransferContentSchema, PaymentContentSchema, QuestEntryAcceptedContentSchema, QuestEntryContentSchema, ReactionContentSchema, ReferenceContentSchema, ReplyContentSchema, RouteEarningsMilestoneContentSchema, RoutePayoutContentSchema, ShareContentSchema };
3578
+ export { ActionCompleteContentSchema, BadgeContentSchema, CommentContentSchema, ContentDeletedContentSchema, ContentMovedContentSchema, DepositContentSchema, EventContentSchema, FollowContentSchema, InviteContentSchema, MentionContentSchema, type Notification, type NotificationAssetRef, NotificationAssetRefSchema, type NotificationContentAsset, NotificationContentAssetSchema, type NotificationOfType, NotificationParentRefSchema, NotificationRootInfoSchema, NotificationSchema, type NotificationType, NotificationTypeSchema, OnboardingActionRequiredContentSchema, OnboardingCompleteContentSchema, OwnershipTransferContentSchema, PaymentContentSchema, QuestEntryAcceptedContentSchema, QuestEntryContentSchema, QuestEntryEvalFailedContentSchema, ReactionContentSchema, ReferenceContentSchema, ReplyContentSchema, RouteEarningsMilestoneContentSchema, RoutePayoutContentSchema, ShareContentSchema };
@@ -18,6 +18,7 @@ declare const NotificationTypeSchema: z.ZodEnum<{
18
18
  "action-failed": "action-failed";
19
19
  "quest-entry": "quest-entry";
20
20
  "quest-entry-accepted": "quest-entry-accepted";
21
+ "quest-entry-eval-failed": "quest-entry-eval-failed";
21
22
  "onboarding-complete": "onboarding-complete";
22
23
  "onboarding-action-required": "onboarding-action-required";
23
24
  "route-earnings-milestone": "route-earnings-milestone";
@@ -663,12 +664,34 @@ declare const QuestEntryAcceptedContentSchema: z.ZodObject<{
663
664
  asset_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
664
665
  asset_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
665
666
  }, z.core.$strip>>;
667
+ source: z.ZodOptional<z.ZodEnum<{
668
+ review: "review";
669
+ eval: "eval";
670
+ }>>;
666
671
  reviewer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
667
672
  id: z.ZodString;
668
673
  username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
669
674
  }, z.core.$strip>>>;
670
675
  text: z.ZodOptional<z.ZodString>;
671
676
  }, z.core.$strip>;
677
+ declare const QuestEntryEvalFailedContentSchema: z.ZodObject<{
678
+ quest: z.ZodOptional<z.ZodObject<{
679
+ id: z.ZodString;
680
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
681
+ }, z.core.$strip>>;
682
+ entry: z.ZodOptional<z.ZodObject<{
683
+ id: z.ZodString;
684
+ asset_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
685
+ asset_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
686
+ asset_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
687
+ }, z.core.$strip>>;
688
+ eval_status: z.ZodOptional<z.ZodEnum<{
689
+ failed: "failed";
690
+ errored: "errored";
691
+ }>>;
692
+ eval_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
693
+ text: z.ZodOptional<z.ZodString>;
694
+ }, z.core.$strip>;
672
695
  declare const OnboardingCompleteContentSchema: z.ZodObject<{
673
696
  text: z.ZodOptional<z.ZodString>;
674
697
  }, z.core.$strip>;
@@ -2682,12 +2705,116 @@ declare const NotificationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2682
2705
  asset_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2683
2706
  asset_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2684
2707
  }, z.core.$strip>>;
2708
+ source: z.ZodOptional<z.ZodEnum<{
2709
+ review: "review";
2710
+ eval: "eval";
2711
+ }>>;
2685
2712
  reviewer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2686
2713
  id: z.ZodString;
2687
2714
  username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2688
2715
  }, z.core.$strip>>>;
2689
2716
  text: z.ZodOptional<z.ZodString>;
2690
2717
  }, z.core.$strip>;
2718
+ }, z.core.$strip>, z.ZodObject<{
2719
+ id: z.ZodUUID;
2720
+ source_user_id: z.ZodUUID;
2721
+ destination_user_id: z.ZodUUID;
2722
+ org_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
2723
+ asset_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
2724
+ reaction_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
2725
+ action_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
2726
+ parent_asset_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
2727
+ root_asset_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
2728
+ viewed: z.ZodBoolean;
2729
+ created_at: z.ZodString;
2730
+ last_updated: z.ZodString;
2731
+ source_user: z.ZodOptional<z.ZodObject<{
2732
+ id: z.ZodOptional<z.ZodUUID>;
2733
+ user_id: z.ZodOptional<z.ZodUUID>;
2734
+ username: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2735
+ name: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2736
+ first_name: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2737
+ last_name: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2738
+ avatar_path: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2739
+ bio: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2740
+ is_provisioned: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
2741
+ claimed_at: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2742
+ urls: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
2743
+ value: z.ZodString;
2744
+ }, z.core.$strip>>>>;
2745
+ post_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUUID>>>;
2746
+ actor_type: z.ZodOptional<z.ZodEnum<{
2747
+ base: "base";
2748
+ agent: "agent";
2749
+ verified: "verified";
2750
+ }>>;
2751
+ plan_type: z.ZodOptional<z.ZodEnum<{
2752
+ free: "free";
2753
+ gold: "gold";
2754
+ }>>;
2755
+ last_active: z.ZodOptional<z.ZodString>;
2756
+ }, z.core.$strip>>;
2757
+ asset: z.ZodOptional<z.ZodObject<{
2758
+ assetId: z.ZodOptional<z.ZodString>;
2759
+ assetType: z.ZodOptional<z.ZodEnum<{
2760
+ user: "user";
2761
+ organization: "organization";
2762
+ team: "team";
2763
+ dataset: "dataset";
2764
+ file: "file";
2765
+ service: "service";
2766
+ route: "route";
2767
+ post: "post";
2768
+ quest: "quest";
2769
+ comment: "comment";
2770
+ conversation: "conversation";
2771
+ }>>;
2772
+ id: z.ZodOptional<z.ZodString>;
2773
+ asset_type: z.ZodOptional<z.ZodEnum<{
2774
+ user: "user";
2775
+ organization: "organization";
2776
+ team: "team";
2777
+ dataset: "dataset";
2778
+ file: "file";
2779
+ service: "service";
2780
+ route: "route";
2781
+ post: "post";
2782
+ quest: "quest";
2783
+ comment: "comment";
2784
+ conversation: "conversation";
2785
+ }>>;
2786
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2787
+ user_id: z.ZodOptional<z.ZodString>;
2788
+ preview: z.ZodOptional<z.ZodAny>;
2789
+ description: z.ZodOptional<z.ZodAny>;
2790
+ slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2791
+ name_url_slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2792
+ org_id: z.ZodOptional<z.ZodString>;
2793
+ parent_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2794
+ parent: z.ZodOptional<z.ZodAny>;
2795
+ user: z.ZodOptional<z.ZodAny>;
2796
+ organization: z.ZodOptional<z.ZodAny>;
2797
+ team: z.ZodOptional<z.ZodAny>;
2798
+ }, z.core.$strip>>;
2799
+ type: z.ZodLiteral<"quest-entry-eval-failed">;
2800
+ content: z.ZodObject<{
2801
+ quest: z.ZodOptional<z.ZodObject<{
2802
+ id: z.ZodString;
2803
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2804
+ }, z.core.$strip>>;
2805
+ entry: z.ZodOptional<z.ZodObject<{
2806
+ id: z.ZodString;
2807
+ asset_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2808
+ asset_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2809
+ asset_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2810
+ }, z.core.$strip>>;
2811
+ eval_status: z.ZodOptional<z.ZodEnum<{
2812
+ failed: "failed";
2813
+ errored: "errored";
2814
+ }>>;
2815
+ eval_score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2816
+ text: z.ZodOptional<z.ZodString>;
2817
+ }, z.core.$strip>;
2691
2818
  }, z.core.$strip>, z.ZodObject<{
2692
2819
  id: z.ZodUUID;
2693
2820
  source_user_id: z.ZodUUID;
@@ -3448,4 +3575,4 @@ type NotificationOfType<T extends NotificationType> = Extract<Notification, {
3448
3575
  type NotificationContentAsset = z.infer<typeof NotificationContentAssetSchema>;
3449
3576
  type NotificationAssetRef = z.infer<typeof NotificationAssetRefSchema>;
3450
3577
 
3451
- export { ActionCompleteContentSchema, BadgeContentSchema, CommentContentSchema, ContentDeletedContentSchema, ContentMovedContentSchema, DepositContentSchema, EventContentSchema, FollowContentSchema, InviteContentSchema, MentionContentSchema, type Notification, type NotificationAssetRef, NotificationAssetRefSchema, type NotificationContentAsset, NotificationContentAssetSchema, type NotificationOfType, NotificationParentRefSchema, NotificationRootInfoSchema, NotificationSchema, type NotificationType, NotificationTypeSchema, OnboardingActionRequiredContentSchema, OnboardingCompleteContentSchema, OwnershipTransferContentSchema, PaymentContentSchema, QuestEntryAcceptedContentSchema, QuestEntryContentSchema, ReactionContentSchema, ReferenceContentSchema, ReplyContentSchema, RouteEarningsMilestoneContentSchema, RoutePayoutContentSchema, ShareContentSchema };
3578
+ export { ActionCompleteContentSchema, BadgeContentSchema, CommentContentSchema, ContentDeletedContentSchema, ContentMovedContentSchema, DepositContentSchema, EventContentSchema, FollowContentSchema, InviteContentSchema, MentionContentSchema, type Notification, type NotificationAssetRef, NotificationAssetRefSchema, type NotificationContentAsset, NotificationContentAssetSchema, type NotificationOfType, NotificationParentRefSchema, NotificationRootInfoSchema, NotificationSchema, type NotificationType, NotificationTypeSchema, OnboardingActionRequiredContentSchema, OnboardingCompleteContentSchema, OwnershipTransferContentSchema, PaymentContentSchema, QuestEntryAcceptedContentSchema, QuestEntryContentSchema, QuestEntryEvalFailedContentSchema, ReactionContentSchema, ReferenceContentSchema, ReplyContentSchema, RouteEarningsMilestoneContentSchema, RoutePayoutContentSchema, ShareContentSchema };
@@ -1,2 +1,2 @@
1
- export{r as ActionCompleteContentSchema,q as BadgeContentSchema,g as CommentContentSchema,z as ContentDeletedContentSchema,y as ContentMovedContentSchema,p as DepositContentSchema,A as EventContentSchema,m as FollowContentSchema,n as InviteContentSchema,f as MentionContentSchema,b as NotificationAssetRefSchema,c as NotificationContentAssetSchema,d as NotificationParentRefSchema,e as NotificationRootInfoSchema,B as NotificationSchema,a as NotificationTypeSchema,v as OnboardingActionRequiredContentSchema,u as OnboardingCompleteContentSchema,l as OwnershipTransferContentSchema,o as PaymentContentSchema,t as QuestEntryAcceptedContentSchema,s as QuestEntryContentSchema,j as ReactionContentSchema,i as ReferenceContentSchema,h as ReplyContentSchema,w as RouteEarningsMilestoneContentSchema,x as RoutePayoutContentSchema,k as ShareContentSchema}from'../chunk-EC376C5T.js';import'../chunk-CDJH4OT5.js';import'../chunk-33C7IDRP.js';//# sourceMappingURL=notifications.js.map
1
+ export{r as ActionCompleteContentSchema,q as BadgeContentSchema,g as CommentContentSchema,A as ContentDeletedContentSchema,z as ContentMovedContentSchema,p as DepositContentSchema,B as EventContentSchema,m as FollowContentSchema,n as InviteContentSchema,f as MentionContentSchema,b as NotificationAssetRefSchema,c as NotificationContentAssetSchema,d as NotificationParentRefSchema,e as NotificationRootInfoSchema,C as NotificationSchema,a as NotificationTypeSchema,w as OnboardingActionRequiredContentSchema,v as OnboardingCompleteContentSchema,l as OwnershipTransferContentSchema,o as PaymentContentSchema,t as QuestEntryAcceptedContentSchema,s as QuestEntryContentSchema,u as QuestEntryEvalFailedContentSchema,j as ReactionContentSchema,i as ReferenceContentSchema,h as ReplyContentSchema,x as RouteEarningsMilestoneContentSchema,y as RoutePayoutContentSchema,k as ShareContentSchema}from'../chunk-XXFKHRNE.js';import'../chunk-CDJH4OT5.js';import'../chunk-33C7IDRP.js';//# sourceMappingURL=notifications.js.map
2
2
  //# sourceMappingURL=notifications.js.map
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkT6UO42TO_cjs=require('../chunk-T6UO42TO.cjs'),chunkU6XOT6XH_cjs=require('../chunk-U6XOT6XH.cjs');require('../chunk-XEA4DDOE.cjs'),require('../chunk-KHERHT26.cjs'),require('../chunk-RMMMRN4X.cjs'),require('../chunk-3JPOAQ2M.cjs'),require('../chunk-KU5AWMS5.cjs'),require('../chunk-YTCAK2AH.cjs'),require('../chunk-YFEGRZXL.cjs'),require('../chunk-7HF5VHUN.cjs'),require('../chunk-JRBBNFFI.cjs');Object.defineProperty(exports,"CreateEntrySchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.q}});Object.defineProperty(exports,"CreateQuestItemObjectSchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.j}});Object.defineProperty(exports,"CreateQuestItemSchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.k}});Object.defineProperty(exports,"CreateQuestSchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.m}});Object.defineProperty(exports,"EntryEvalStatusSchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.e}});Object.defineProperty(exports,"EntrySchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.p}});Object.defineProperty(exports,"EntryStatusSchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.f}});Object.defineProperty(exports,"LeaderboardOrderSchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.g}});Object.defineProperty(exports,"QuestItemBaseSchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.h}});Object.defineProperty(exports,"QuestItemSchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.i}});Object.defineProperty(exports,"QuestItemStatusSchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.c}});Object.defineProperty(exports,"QuestSchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.l}});Object.defineProperty(exports,"QuestStatusSchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.b}});Object.defineProperty(exports,"QuestTypeSchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.a}});Object.defineProperty(exports,"ReviewEntrySchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.r}});Object.defineProperty(exports,"RewardCurrencySchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.d}});Object.defineProperty(exports,"UpdateQuestItemSchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.o}});Object.defineProperty(exports,"UpdateQuestSchema",{enumerable:true,get:function(){return chunkT6UO42TO_cjs.n}});Object.defineProperty(exports,"KeyedAssetInputSchema",{enumerable:true,get:function(){return chunkU6XOT6XH_cjs.c}});Object.defineProperty(exports,"KeyedAssetRefsSchema",{enumerable:true,get:function(){return chunkU6XOT6XH_cjs.a}});Object.defineProperty(exports,"QuestSubmissionAssetDeclarationSchema",{enumerable:true,get:function(){return chunkU6XOT6XH_cjs.d}});//# sourceMappingURL=quests.cjs.map
1
+ 'use strict';var chunkCIEATF7M_cjs=require('../chunk-CIEATF7M.cjs'),chunkADLJ3UUW_cjs=require('../chunk-ADLJ3UUW.cjs');require('../chunk-XEA4DDOE.cjs'),require('../chunk-KHERHT26.cjs'),require('../chunk-RMMMRN4X.cjs'),require('../chunk-3JPOAQ2M.cjs'),require('../chunk-KU5AWMS5.cjs'),require('../chunk-YTCAK2AH.cjs'),require('../chunk-YFEGRZXL.cjs'),require('../chunk-7HF5VHUN.cjs'),require('../chunk-JRBBNFFI.cjs');Object.defineProperty(exports,"CreateEntrySchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.q}});Object.defineProperty(exports,"CreateQuestItemObjectSchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.j}});Object.defineProperty(exports,"CreateQuestItemSchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.k}});Object.defineProperty(exports,"CreateQuestSchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.m}});Object.defineProperty(exports,"EntryEvalStatusSchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.e}});Object.defineProperty(exports,"EntrySchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.p}});Object.defineProperty(exports,"EntryStatusSchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.f}});Object.defineProperty(exports,"LeaderboardOrderSchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.g}});Object.defineProperty(exports,"QuestItemBaseSchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.h}});Object.defineProperty(exports,"QuestItemSchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.i}});Object.defineProperty(exports,"QuestItemStatusSchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.c}});Object.defineProperty(exports,"QuestSchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.l}});Object.defineProperty(exports,"QuestStatusSchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.b}});Object.defineProperty(exports,"QuestTypeSchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.a}});Object.defineProperty(exports,"ReviewEntrySchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.r}});Object.defineProperty(exports,"RewardCurrencySchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.d}});Object.defineProperty(exports,"UpdateQuestItemSchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.o}});Object.defineProperty(exports,"UpdateQuestSchema",{enumerable:true,get:function(){return chunkCIEATF7M_cjs.n}});Object.defineProperty(exports,"KeyedAssetInputSchema",{enumerable:true,get:function(){return chunkADLJ3UUW_cjs.c}});Object.defineProperty(exports,"KeyedAssetRefsSchema",{enumerable:true,get:function(){return chunkADLJ3UUW_cjs.a}});Object.defineProperty(exports,"QuestSubmissionAssetDeclarationSchema",{enumerable:true,get:function(){return chunkADLJ3UUW_cjs.d}});//# sourceMappingURL=quests.cjs.map
2
2
  //# sourceMappingURL=quests.cjs.map
@@ -1,2 +1,2 @@
1
- export{q as CreateEntrySchema,j as CreateQuestItemObjectSchema,k as CreateQuestItemSchema,m as CreateQuestSchema,e as EntryEvalStatusSchema,p as EntrySchema,f as EntryStatusSchema,g as LeaderboardOrderSchema,h as QuestItemBaseSchema,i as QuestItemSchema,c as QuestItemStatusSchema,l as QuestSchema,b as QuestStatusSchema,a as QuestTypeSchema,r as ReviewEntrySchema,d as RewardCurrencySchema,o as UpdateQuestItemSchema,n as UpdateQuestSchema}from'../chunk-5CPECQKN.js';export{c as KeyedAssetInputSchema,a as KeyedAssetRefsSchema,d as QuestSubmissionAssetDeclarationSchema}from'../chunk-O4LSX56P.js';import'../chunk-RS5H4XDK.js';import'../chunk-OU4JKY4M.js';import'../chunk-PGCNGDPK.js';import'../chunk-Y6BK75KP.js';import'../chunk-OCG3P3PJ.js';import'../chunk-CDJH4OT5.js';import'../chunk-33C7IDRP.js';import'../chunk-DUBPWSCA.js';import'../chunk-42ADEGDM.js';//# sourceMappingURL=quests.js.map
1
+ export{q as CreateEntrySchema,j as CreateQuestItemObjectSchema,k as CreateQuestItemSchema,m as CreateQuestSchema,e as EntryEvalStatusSchema,p as EntrySchema,f as EntryStatusSchema,g as LeaderboardOrderSchema,h as QuestItemBaseSchema,i as QuestItemSchema,c as QuestItemStatusSchema,l as QuestSchema,b as QuestStatusSchema,a as QuestTypeSchema,r as ReviewEntrySchema,d as RewardCurrencySchema,o as UpdateQuestItemSchema,n as UpdateQuestSchema}from'../chunk-ZFARY5F4.js';export{c as KeyedAssetInputSchema,a as KeyedAssetRefsSchema,d as QuestSubmissionAssetDeclarationSchema}from'../chunk-64ZUBBP7.js';import'../chunk-RS5H4XDK.js';import'../chunk-OU4JKY4M.js';import'../chunk-PGCNGDPK.js';import'../chunk-Y6BK75KP.js';import'../chunk-OCG3P3PJ.js';import'../chunk-CDJH4OT5.js';import'../chunk-33C7IDRP.js';import'../chunk-DUBPWSCA.js';import'../chunk-42ADEGDM.js';//# sourceMappingURL=quests.js.map
2
2
  //# sourceMappingURL=quests.js.map
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkEVQAA7RQ_cjs=require('../../chunk-EVQAA7RQ.cjs');Object.defineProperty(exports,"getReferencesInContent",{enumerable:true,get:function(){return chunkEVQAA7RQ_cjs.f}});Object.defineProperty(exports,"normalizeViewMode",{enumerable:true,get:function(){return chunkEVQAA7RQ_cjs.a}});Object.defineProperty(exports,"parseActionLinkShorthand",{enumerable:true,get:function(){return chunkEVQAA7RQ_cjs.d}});Object.defineProperty(exports,"parseAssetLinkShorthand",{enumerable:true,get:function(){return chunkEVQAA7RQ_cjs.c}});Object.defineProperty(exports,"parseOuroAssetUrl",{enumerable:true,get:function(){return chunkEVQAA7RQ_cjs.e}});Object.defineProperty(exports,"resolveDisplayConfig",{enumerable:true,get:function(){return chunkEVQAA7RQ_cjs.b}});//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var chunkOCMBP3U7_cjs=require('../../chunk-OCMBP3U7.cjs');Object.defineProperty(exports,"extractAssetWikiLinks",{enumerable:true,get:function(){return chunkOCMBP3U7_cjs.e}});Object.defineProperty(exports,"getReferencesInContent",{enumerable:true,get:function(){return chunkOCMBP3U7_cjs.g}});Object.defineProperty(exports,"normalizeViewMode",{enumerable:true,get:function(){return chunkOCMBP3U7_cjs.a}});Object.defineProperty(exports,"parseActionLinkShorthand",{enumerable:true,get:function(){return chunkOCMBP3U7_cjs.d}});Object.defineProperty(exports,"parseAssetLinkShorthand",{enumerable:true,get:function(){return chunkOCMBP3U7_cjs.c}});Object.defineProperty(exports,"parseOuroAssetUrl",{enumerable:true,get:function(){return chunkOCMBP3U7_cjs.f}});Object.defineProperty(exports,"resolveDisplayConfig",{enumerable:true,get:function(){return chunkOCMBP3U7_cjs.b}});//# sourceMappingURL=index.cjs.map
2
2
  //# sourceMappingURL=index.cjs.map
@@ -87,6 +87,28 @@ declare function parseAssetLinkShorthand(href: string): {
87
87
  declare function parseActionLinkShorthand(href: string): {
88
88
  id: string;
89
89
  } | null;
90
+ type AssetWikiLinkMatch = {
91
+ raw: string;
92
+ href: string;
93
+ id: string;
94
+ assetType: string;
95
+ legacy: false;
96
+ } | {
97
+ raw: string;
98
+ href: string;
99
+ id: string;
100
+ legacy: true;
101
+ } | {
102
+ raw: string;
103
+ href: string;
104
+ id: string;
105
+ action: true;
106
+ };
107
+ /**
108
+ * Find collapsed `[dataset:<uuid>]` / `[action:<uuid>]` spans in a text node.
109
+ * Skips `[shorthand](href)` markdown links via the regex lookahead.
110
+ */
111
+ declare function extractAssetWikiLinks(text: string): AssetWikiLinkMatch[];
90
112
  /**
91
113
  * Parse an Ouro site URL into its asset components.
92
114
  * Accepts both absolute URLs (https://ouro.foundation/posts/entity/slug)
@@ -120,4 +142,4 @@ declare function getReferencesInContent(json: Content["json"], options?: {
120
142
  linkedAssets: LinkedAssetRef[];
121
143
  };
122
144
 
123
- export { type DataFilter, type DisplayConfig, type ExtractedContentAction, type ExtractedContentAsset, type InlineAssetAttrs, getReferencesInContent, normalizeViewMode, parseActionLinkShorthand, parseAssetLinkShorthand, parseOuroAssetUrl, resolveDisplayConfig };
145
+ export { type AssetWikiLinkMatch, type DataFilter, type DisplayConfig, type ExtractedContentAction, type ExtractedContentAsset, type InlineAssetAttrs, extractAssetWikiLinks, getReferencesInContent, normalizeViewMode, parseActionLinkShorthand, parseAssetLinkShorthand, parseOuroAssetUrl, resolveDisplayConfig };
@@ -87,6 +87,28 @@ declare function parseAssetLinkShorthand(href: string): {
87
87
  declare function parseActionLinkShorthand(href: string): {
88
88
  id: string;
89
89
  } | null;
90
+ type AssetWikiLinkMatch = {
91
+ raw: string;
92
+ href: string;
93
+ id: string;
94
+ assetType: string;
95
+ legacy: false;
96
+ } | {
97
+ raw: string;
98
+ href: string;
99
+ id: string;
100
+ legacy: true;
101
+ } | {
102
+ raw: string;
103
+ href: string;
104
+ id: string;
105
+ action: true;
106
+ };
107
+ /**
108
+ * Find collapsed `[dataset:<uuid>]` / `[action:<uuid>]` spans in a text node.
109
+ * Skips `[shorthand](href)` markdown links via the regex lookahead.
110
+ */
111
+ declare function extractAssetWikiLinks(text: string): AssetWikiLinkMatch[];
90
112
  /**
91
113
  * Parse an Ouro site URL into its asset components.
92
114
  * Accepts both absolute URLs (https://ouro.foundation/posts/entity/slug)
@@ -120,4 +142,4 @@ declare function getReferencesInContent(json: Content["json"], options?: {
120
142
  linkedAssets: LinkedAssetRef[];
121
143
  };
122
144
 
123
- export { type DataFilter, type DisplayConfig, type ExtractedContentAction, type ExtractedContentAsset, type InlineAssetAttrs, getReferencesInContent, normalizeViewMode, parseActionLinkShorthand, parseAssetLinkShorthand, parseOuroAssetUrl, resolveDisplayConfig };
145
+ export { type AssetWikiLinkMatch, type DataFilter, type DisplayConfig, type ExtractedContentAction, type ExtractedContentAsset, type InlineAssetAttrs, extractAssetWikiLinks, getReferencesInContent, normalizeViewMode, parseActionLinkShorthand, parseAssetLinkShorthand, parseOuroAssetUrl, resolveDisplayConfig };
@@ -1,2 +1,2 @@
1
- export{f as getReferencesInContent,a as normalizeViewMode,d as parseActionLinkShorthand,c as parseAssetLinkShorthand,e as parseOuroAssetUrl,b as resolveDisplayConfig}from'../../chunk-CRUIBV5F.js';//# sourceMappingURL=index.js.map
1
+ export{e as extractAssetWikiLinks,g as getReferencesInContent,a as normalizeViewMode,d as parseActionLinkShorthand,c as parseAssetLinkShorthand,f as parseOuroAssetUrl,b as resolveDisplayConfig}from'../../chunk-AJ2O7ER6.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkNSKBXBRD_cjs=require('../../chunk-NSKBXBRD.cjs');Object.defineProperty(exports,"parseMarkdown",{enumerable:true,get:function(){return chunkNSKBXBRD_cjs.a}});//# sourceMappingURL=markdown-parser.cjs.map
1
+ 'use strict';var chunkPJLIO4PA_cjs=require('../../chunk-PJLIO4PA.cjs');Object.defineProperty(exports,"parseMarkdown",{enumerable:true,get:function(){return chunkPJLIO4PA_cjs.a}});//# sourceMappingURL=markdown-parser.cjs.map
2
2
  //# sourceMappingURL=markdown-parser.cjs.map
@@ -1,2 +1,2 @@
1
- export{a as parseMarkdown}from'../../chunk-KXYKN3TY.js';//# sourceMappingURL=markdown-parser.js.map
1
+ export{a as parseMarkdown}from'../../chunk-Q4IXX6KS.js';//# sourceMappingURL=markdown-parser.js.map
2
2
  //# sourceMappingURL=markdown-parser.js.map
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkU6XOT6XH_cjs=require('../chunk-U6XOT6XH.cjs');require('../chunk-XEA4DDOE.cjs'),require('../chunk-KHERHT26.cjs'),require('../chunk-RMMMRN4X.cjs'),require('../chunk-3JPOAQ2M.cjs'),require('../chunk-KU5AWMS5.cjs'),require('../chunk-YTCAK2AH.cjs'),require('../chunk-YFEGRZXL.cjs'),require('../chunk-7HF5VHUN.cjs'),require('../chunk-JRBBNFFI.cjs');Object.defineProperty(exports,"KeyedAssetInputSchema",{enumerable:true,get:function(){return chunkU6XOT6XH_cjs.c}});Object.defineProperty(exports,"KeyedAssetInputValueSchema",{enumerable:true,get:function(){return chunkU6XOT6XH_cjs.b}});Object.defineProperty(exports,"KeyedAssetRefsSchema",{enumerable:true,get:function(){return chunkU6XOT6XH_cjs.a}});Object.defineProperty(exports,"QuestSubmissionAssetDeclarationSchema",{enumerable:true,get:function(){return chunkU6XOT6XH_cjs.d}});Object.defineProperty(exports,"assetMatchesDeclaration",{enumerable:true,get:function(){return chunkU6XOT6XH_cjs.k}});Object.defineProperty(exports,"declarationToPickerFilters",{enumerable:true,get:function(){return chunkU6XOT6XH_cjs.j}});Object.defineProperty(exports,"declarationToSubmissionDeclaration",{enumerable:true,get:function(){return chunkU6XOT6XH_cjs.f}});Object.defineProperty(exports,"getPrimaryAssetRef",{enumerable:true,get:function(){return chunkU6XOT6XH_cjs.l}});Object.defineProperty(exports,"getPrimaryDeclarationKey",{enumerable:true,get:function(){return chunkU6XOT6XH_cjs.h}});Object.defineProperty(exports,"getRouteInputDeclarationsFromRoute",{enumerable:true,get:function(){return chunkU6XOT6XH_cjs.e}});Object.defineProperty(exports,"getSubmissionAssetShape",{enumerable:true,get:function(){return chunkU6XOT6XH_cjs.i}});Object.defineProperty(exports,"materializeContributorSubmissionAssets",{enumerable:true,get:function(){return chunkU6XOT6XH_cjs.g}});Object.defineProperty(exports,"toRouteInputAssets",{enumerable:true,get:function(){return chunkU6XOT6XH_cjs.m}});//# sourceMappingURL=quest-submission.cjs.map
1
+ 'use strict';var chunkADLJ3UUW_cjs=require('../chunk-ADLJ3UUW.cjs');require('../chunk-XEA4DDOE.cjs'),require('../chunk-KHERHT26.cjs'),require('../chunk-RMMMRN4X.cjs'),require('../chunk-3JPOAQ2M.cjs'),require('../chunk-KU5AWMS5.cjs'),require('../chunk-YTCAK2AH.cjs'),require('../chunk-YFEGRZXL.cjs'),require('../chunk-7HF5VHUN.cjs'),require('../chunk-JRBBNFFI.cjs');Object.defineProperty(exports,"KeyedAssetInputSchema",{enumerable:true,get:function(){return chunkADLJ3UUW_cjs.c}});Object.defineProperty(exports,"KeyedAssetInputValueSchema",{enumerable:true,get:function(){return chunkADLJ3UUW_cjs.b}});Object.defineProperty(exports,"KeyedAssetRefsSchema",{enumerable:true,get:function(){return chunkADLJ3UUW_cjs.a}});Object.defineProperty(exports,"QuestSubmissionAssetDeclarationSchema",{enumerable:true,get:function(){return chunkADLJ3UUW_cjs.d}});Object.defineProperty(exports,"assetMatchesDeclaration",{enumerable:true,get:function(){return chunkADLJ3UUW_cjs.k}});Object.defineProperty(exports,"declarationToPickerFilters",{enumerable:true,get:function(){return chunkADLJ3UUW_cjs.j}});Object.defineProperty(exports,"declarationToSubmissionDeclaration",{enumerable:true,get:function(){return chunkADLJ3UUW_cjs.f}});Object.defineProperty(exports,"getPrimaryAssetRef",{enumerable:true,get:function(){return chunkADLJ3UUW_cjs.l}});Object.defineProperty(exports,"getPrimaryDeclarationKey",{enumerable:true,get:function(){return chunkADLJ3UUW_cjs.h}});Object.defineProperty(exports,"getRouteInputDeclarationsFromRoute",{enumerable:true,get:function(){return chunkADLJ3UUW_cjs.e}});Object.defineProperty(exports,"getSubmissionAssetShape",{enumerable:true,get:function(){return chunkADLJ3UUW_cjs.i}});Object.defineProperty(exports,"materializeContributorSubmissionAssets",{enumerable:true,get:function(){return chunkADLJ3UUW_cjs.g}});Object.defineProperty(exports,"toRouteInputAssets",{enumerable:true,get:function(){return chunkADLJ3UUW_cjs.m}});//# sourceMappingURL=quest-submission.cjs.map
2
2
  //# sourceMappingURL=quest-submission.cjs.map
@@ -1,2 +1,2 @@
1
- export{c as KeyedAssetInputSchema,b as KeyedAssetInputValueSchema,a as KeyedAssetRefsSchema,d as QuestSubmissionAssetDeclarationSchema,k as assetMatchesDeclaration,j as declarationToPickerFilters,f as declarationToSubmissionDeclaration,l as getPrimaryAssetRef,h as getPrimaryDeclarationKey,e as getRouteInputDeclarationsFromRoute,i as getSubmissionAssetShape,g as materializeContributorSubmissionAssets,m as toRouteInputAssets}from'../chunk-O4LSX56P.js';import'../chunk-RS5H4XDK.js';import'../chunk-OU4JKY4M.js';import'../chunk-PGCNGDPK.js';import'../chunk-Y6BK75KP.js';import'../chunk-OCG3P3PJ.js';import'../chunk-CDJH4OT5.js';import'../chunk-33C7IDRP.js';import'../chunk-DUBPWSCA.js';import'../chunk-42ADEGDM.js';//# sourceMappingURL=quest-submission.js.map
1
+ export{c as KeyedAssetInputSchema,b as KeyedAssetInputValueSchema,a as KeyedAssetRefsSchema,d as QuestSubmissionAssetDeclarationSchema,k as assetMatchesDeclaration,j as declarationToPickerFilters,f as declarationToSubmissionDeclaration,l as getPrimaryAssetRef,h as getPrimaryDeclarationKey,e as getRouteInputDeclarationsFromRoute,i as getSubmissionAssetShape,g as materializeContributorSubmissionAssets,m as toRouteInputAssets}from'../chunk-64ZUBBP7.js';import'../chunk-RS5H4XDK.js';import'../chunk-OU4JKY4M.js';import'../chunk-PGCNGDPK.js';import'../chunk-Y6BK75KP.js';import'../chunk-OCG3P3PJ.js';import'../chunk-CDJH4OT5.js';import'../chunk-33C7IDRP.js';import'../chunk-DUBPWSCA.js';import'../chunk-42ADEGDM.js';//# sourceMappingURL=quest-submission.js.map
2
2
  //# sourceMappingURL=quest-submission.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ourofoundation/ouro-js",
3
- "version": "3.8.1",
3
+ "version": "3.8.3",
4
4
  "description": "Interact with the Ouro platform in browser and node.js environments",
5
5
  "module": "./dist/index.js",
6
6
  "main": "./dist/index.cjs",
@@ -0,0 +1,52 @@
1
+ import assert from "node:assert/strict";
2
+ import test from "node:test";
3
+
4
+ import { parseMarkdown } from "../dist/utils/air/markdown-parser.js";
5
+ import {
6
+ extractAssetWikiLinks,
7
+ getReferencesInContent,
8
+ } from "../dist/index.js";
9
+
10
+ const DATASET_ID = "01a06cb9-cb9e-72d0-acaa-c36468a1b1ba";
11
+
12
+ test("extractAssetWikiLinks finds collapsed [dataset:uuid] spans", () => {
13
+ const matches = extractAssetWikiLinks(
14
+ `See [dataset:${DATASET_ID}] and [dataset:${DATASET_ID}](dataset:${DATASET_ID}).`
15
+ );
16
+ assert.equal(matches.length, 1);
17
+ assert.equal(matches[0].href, `dataset:${DATASET_ID}`);
18
+ });
19
+
20
+ test("parseMarkdown turns [dataset:uuid] into an anchor", () => {
21
+ const html = parseMarkdown(`See [dataset:${DATASET_ID}] for rows.`);
22
+ assert.match(
23
+ String(html),
24
+ new RegExp(`href="dataset:${DATASET_ID}"`)
25
+ );
26
+ });
27
+
28
+ test("parseMarkdown leaves [label](dataset:uuid) to the built-in link tokenizer", () => {
29
+ const html = parseMarkdown(`See [results](dataset:${DATASET_ID}).`);
30
+ assert.match(String(html), />results<\/a>/);
31
+ assert.match(String(html), new RegExp(`href="dataset:${DATASET_ID}"`));
32
+ });
33
+
34
+ test("getReferencesInContent extracts wiki-links from plain text nodes", () => {
35
+ const refs = getReferencesInContent({
36
+ type: "doc",
37
+ content: [
38
+ {
39
+ type: "paragraph",
40
+ content: [
41
+ {
42
+ type: "text",
43
+ text: `Re-probed [dataset:${DATASET_ID}] via MCP`,
44
+ },
45
+ ],
46
+ },
47
+ ],
48
+ });
49
+ assert.equal(refs.assets.length, 1);
50
+ assert.equal(refs.assets[0].id, DATASET_ID);
51
+ assert.equal(refs.assets[0].assetType, "dataset");
52
+ });
@@ -1,2 +0,0 @@
1
- 'use strict';var chunkYFEGRZXL_cjs=require('./chunk-YFEGRZXL.cjs'),zod=require('zod');var n=zod.enum(["public","private","organization","monetized"]),h=zod.enum(["image","video","audio"]),u=zod.object({user:zod.optional(zod.uuid()),team:zod.optional(zod.uuid()),visibility:zod.optional(n),top_level_only:zod.optional(zod.boolean()),asset_type:zod.optional(zod.enum(["file","dataset"])),file_type:zod.optional(h),extension:zod.optional(zod.string()),license:zod.optional(zod.string()),method:zod.optional(chunkYFEGRZXL_cjs.l),status:zod.optional(chunkYFEGRZXL_cjs.j),source:zod.optional(chunkYFEGRZXL_cjs.k),has_reactions:zod.optional(zod.boolean()),has_comments:zod.optional(zod.boolean())}),F=zod.object({asset_type:zod.optional(zod.union([chunkYFEGRZXL_cjs.a,zod.array(chunkYFEGRZXL_cjs.a)])),user_id:zod.optional(zod.uuid()),org_id:zod.optional(zod.uuid()),team_id:zod.optional(zod.uuid()),visibility:zod.optional(zod.union([n,zod.array(n)])),license_id:zod.optional(zod.string()),source:zod.optional(chunkYFEGRZXL_cjs.k),top_level_only:zod.optional(zod.boolean()),method:zod.optional(chunkYFEGRZXL_cjs.l),status:zod.optional(chunkYFEGRZXL_cjs.j),exclude_user_id:zod.optional(zod.uuid()),exclude_org_ids:zod.optional(zod.array(zod.uuid()))}),_=zod.object({file_type:zod.optional(zod.string()),extension:zod.optional(zod.union([zod.string(),zod.array(zod.string())]))}).catchall(zod.optional(zod.union([zod.string(),zod.array(zod.string()),zod.boolean()])));exports.a=n;exports.b=h;exports.c=u;exports.d=F;exports.e=_;//# sourceMappingURL=chunk-5SC4M4E3.cjs.map
2
- //# sourceMappingURL=chunk-5SC4M4E3.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/schema/asset-filters.ts"],"names":["AssetFilterVisibilitySchema","zodEnum","AssetFilterFileTypeSchema","AssetFiltersSchema","object","optional","uuid","boolean","string","HttpMethodSchema","StatusSchema","SourceSchema","AssetSearchFiltersSchema","union","AssetTypeSchema","array","AssetMetadataFiltersSchema"],"mappings":"sFAoBA,IAAMA,EAA8BC,QAAQ,CAAA,CAC1C,QACA,CAAA,SAAA,CACA,cACA,CAAA,WACF,CAAC,CAGKC,CAAAA,CAAAA,CAA4BD,QAAQ,CAAA,CAAC,OAAS,CAAA,OAAA,CAAS,OAAO,CAAC,CAAA,CAO/DE,CAAqBC,CAAAA,UAAAA,CAAO,CAChC,IAAA,CAAMC,aAASC,QAAK,EAAC,CACrB,CAAA,IAAA,CAAMD,YAASC,CAAAA,QAAAA,EAAM,CACrB,CAAA,UAAA,CAAYD,YAASL,CAAAA,CAA2B,CAChD,CAAA,cAAA,CAAgBK,aAASE,WAAQ,EAAC,EAElC,UAAYF,CAAAA,YAAAA,CAASJ,SAAQ,CAAC,MAAA,CAAQ,SAAS,CAAC,CAA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CAC5B,CAAA,SAAA,CAAWH,YAASQ,CAAAA,SAAAA,CAAM,CAACL,UAAO,EAAA,CAAGO,SAAMP,CAAAA,UAAAA,EAAQ,CAAC,CAAC,CAAC,CACxD,CAAC,CAAA,CAAE,QAASH,CAAAA,YAAAA,CAASQ,UAAM,CAACL,UAAAA,EAAUO,CAAAA,SAAAA,CAAMP,UAAO,EAAC,EAAGD,WAAQ,EAAC,CAAC,CAAC,CAAC","file":"chunk-5SC4M4E3.cjs","sourcesContent":["import {\n object,\n string,\n uuid,\n boolean,\n array,\n union,\n enum as zodEnum,\n optional,\n type z,\n} from \"zod\";\n\nimport {\n AssetTypeSchema,\n HttpMethodSchema,\n SourceSchema,\n StatusSchema,\n} from \"./common\";\n\n/** Filterable visibilities — excludes `inherit` (not a browse/search value). */\nconst AssetFilterVisibilitySchema = zodEnum([\n \"public\",\n \"private\",\n \"organization\",\n \"monetized\",\n]);\n\n/** UI file-category chips used in the assets filter bar. */\nconst AssetFilterFileTypeSchema = zodEnum([\"image\", \"video\", \"audio\"]);\n\n/**\n * Client/UI filter state for asset lists and the filter bar.\n * Short keys (`user`, `team`, `license`) map to API columns via\n * {@link toAssetSearchFilters}.\n */\nconst AssetFiltersSchema = object({\n user: optional(uuid()),\n team: optional(uuid()),\n visibility: optional(AssetFilterVisibilitySchema),\n top_level_only: optional(boolean()),\n /** Data-list subtype chip (file vs dataset). */\n asset_type: optional(zodEnum([\"file\", \"dataset\"])),\n file_type: optional(AssetFilterFileTypeSchema),\n extension: optional(string()),\n license: optional(string()),\n method: optional(HttpMethodSchema),\n status: optional(StatusSchema),\n source: optional(SourceSchema),\n has_reactions: optional(boolean()),\n has_comments: optional(boolean()),\n});\n\n/**\n * Wire-format `filters` object for `/search/assets` and related RPCs.\n * Uses DB/API column names (`user_id`, `team_id`, `license_id`).\n */\nconst AssetSearchFiltersSchema = object({\n asset_type: optional(union([AssetTypeSchema, array(AssetTypeSchema)])),\n user_id: optional(uuid()),\n org_id: optional(uuid()),\n team_id: optional(uuid()),\n visibility: optional(\n union([AssetFilterVisibilitySchema, array(AssetFilterVisibilitySchema)])\n ),\n license_id: optional(string()),\n source: optional(SourceSchema),\n top_level_only: optional(boolean()),\n method: optional(HttpMethodSchema),\n status: optional(StatusSchema),\n /** Server-side personal/global scoping helper. */\n exclude_user_id: optional(uuid()),\n exclude_org_ids: optional(array(uuid())),\n});\n\n/**\n * Wire-format `metadata_filters` for file-oriented search\n * (`file_type`, `extension`, and arbitrary metadata keys).\n */\nconst AssetMetadataFiltersSchema = object({\n file_type: optional(string()),\n extension: optional(union([string(), array(string())])),\n}).catchall(optional(union([string(), array(string()), boolean()])));\n\nexport {\n AssetFilterVisibilitySchema,\n AssetFilterFileTypeSchema,\n AssetFiltersSchema,\n AssetSearchFiltersSchema,\n AssetMetadataFiltersSchema,\n};\n\nexport type AssetFilterVisibility = z.infer<typeof AssetFilterVisibilitySchema>;\nexport type AssetFilterFileType = z.infer<typeof AssetFilterFileTypeSchema>;\nexport type AssetFilters = z.infer<typeof AssetFiltersSchema>;\nexport type AssetSearchFilters = z.infer<typeof AssetSearchFiltersSchema>;\nexport type AssetMetadataFilters = z.infer<typeof AssetMetadataFiltersSchema>;\n"]}
@@ -1,2 +0,0 @@
1
- function _(t){return t==="default"?"card":t==="chart"?"preview":t==="preview"||t==="interactive"||t==="card"||t==="list"?t:"card"}function L(t){let n={};if(t.displayConfig&&(n=typeof t.displayConfig=="string"?JSON.parse(t.displayConfig):{...t.displayConfig}),n.visualizationId===void 0&&t.visualizationId&&(n.visualizationId=t.visualizationId),n.filters===void 0&&t.filters){let r=t.filters;n.filters=typeof r=="string"?JSON.parse(r):r;}return n}var h="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",I=new RegExp(`^(post|dataset|file|service|route|quest):(${h})$`,"i"),E=new RegExp(`^asset:(${h})$`,"i"),T=new RegExp(`^action:(${h})$`,"i"),x=new Set(["post","dataset","file","service","route","quest"]);function k(t){let n=I.exec(t);if(n){let o=n[1].toLowerCase();return x.has(o)?{id:n[2],assetType:o,legacy:false}:null}let r=E.exec(t);return r?{id:r[1],legacy:true}:null}function R(t){let n=T.exec(t);return n?{id:n[1]}:null}function S(t,n){let r;try{if(t.startsWith("/"))r=t;else {let d=new URL(t);if(n){let g=new URL(n).host;if(d.host!==g)return null}r=d.pathname;}}catch{return null}let o=r.match(/^\/(\w+)s\/([^/]+)\/([^/?#]+)/);if(!o)return null;let[,l,u,p]=o;return x.has(l)?{assetType:l,entity:decodeURIComponent(u),slug:decodeURIComponent(p)}:null}var A=t=>Array.isArray(t)?t.map(A):t!=null&&t.content?Array.isArray(t.content)?t.content.map(A).flat():A(t.content):t;function w(t,n){var C;if(!t||!(t!=null&&t.content))return {users:[],assets:[],actions:[],linkedAssets:[]};let r=t.content.map(A).flat(),o=r.filter(e=>e.type==="mention").map(e=>{var s,i,c;return {user_id:(s=e.attrs)==null?void 0:s.id,username:((i=e.attrs)==null?void 0:i.label)||((c=e.attrs)==null?void 0:c.username)}}).reduce((e,s)=>(e.some(i=>i.user_id&&s.user_id&&i.user_id===s.user_id||i.username&&s.username&&i.username===s.username)||e.push(s),e),[]),l=r.filter(e=>{var s,i;return e.type==="assetComponent"&&((s=e.attrs)==null?void 0:s.id)&&!((i=e.attrs)!=null&&i.partial)}).map(({attrs:e})=>({id:e.id,assetType:e.assetType,via:"embed"})).reduce((e,s)=>(e.some(i=>i.id===s.id)||e.push(s),e),[]),u=[],p=[],d=new Set(l.map(e=>e.id)),g=new Set,v=new Set;for(let e of r){if((e==null?void 0:e.type)!=="text"||!(e!=null&&e.marks))continue;let s=e.marks.find(a=>a.type==="link");if(!((C=s==null?void 0:s.attrs)!=null&&C.href))continue;let i=s.attrs.href,c=R(i);if(c){g.has(c.id)||(g.add(c.id),p.push({id:c.id,via:"link"}));continue}let y=k(i);if(y){let a=y.id;d.has(a)||(d.add(a),y.legacy?l.push({id:a,via:"link",legacy:true}):l.push({id:a,assetType:y.assetType,via:"link",legacy:false}));continue}let f=S(i,n==null?void 0:n.siteUrl);if(f){let a=`${f.assetType}:${f.entity}:${f.slug}`;v.has(a)||(v.add(a),u.push(f));}}return {users:o,assets:l,actions:p,linkedAssets:u}}export{_ as a,L as b,k as c,R as d,S as e,w as f};//# sourceMappingURL=chunk-CRUIBV5F.js.map
2
- //# sourceMappingURL=chunk-CRUIBV5F.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/utils/air/index.ts"],"names":["normalizeViewMode","raw","resolveDisplayConfig","attrs","base","UUID_RE","TYPED_ASSET_LINK_RE","LEGACY_ASSET_LINK_RE","ACTION_LINK_RE","VALID_ASSET_TYPES","parseAssetLinkShorthand","href","typed","assetType","legacy","parseActionLinkShorthand","match","parseOuroAssetUrl","siteUrl","pathname","url","siteHost","entity","slug","extractContent","item","getReferencesInContent","json","options","_a","content","users","_b","_c","unique","u","assets","linkedAssets","actions","seenAssetIds","a","seenActionIds","seenLinkedKeys","linkMark","m","actionShorthand","shorthand","id","parsed","key"],"mappings":"AAyBO,SAASA,EACdC,CAC6C,CAAA,CAC7C,OAAIA,CAAAA,GAAQ,UAAkB,MAC1BA,CAAAA,CAAAA,GAAQ,OAAgB,CAAA,SAAA,CAE1BA,IAAQ,SACRA,EAAAA,CAAAA,GAAQ,eACRA,CAAQ,GAAA,MAAA,EACRA,IAAQ,MAEDA,CAAAA,CAAAA,CACF,MACT,CAOO,SAASC,CAAqBC,CAAAA,CAAAA,CAInB,CAChB,IAAIC,EAAsB,EAAC,CAa3B,GAXID,CAAAA,CAAM,gBACRC,CACE,CAAA,OAAOD,EAAM,aAAkB,EAAA,QAAA,CAC3B,KAAK,KAAMA,CAAAA,CAAAA,CAAM,aAAa,CAAA,CAC9B,CAAE,GAAGA,CAAAA,CAAM,aAAc,CAAA,CAAA,CAI7BC,EAAK,eAAoB,GAAA,MAAA,EAAaD,CAAM,CAAA,eAAA,GAC9CC,EAAK,eAAkBD,CAAAA,CAAAA,CAA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,CAAAA,CAAAA,CAAa,KAAKW,CAAM,CAAA,EAE5B,CACF,CAEA,OAAO,CACL,KAAA,CAAAjB,EACA,MAAAK,CAAAA,CAAAA,CACA,QAAAE,CACA,CAAA,YAAA,CAAAD,CACF,CACF","file":"chunk-CRUIBV5F.js","sourcesContent":["import { Content } from \"../../schema/posts\";\nimport { Profile } from \"../../schema/users\";\n\nexport interface DataFilter {\n column: string;\n value: string;\n operator: string;\n active?: boolean;\n}\n\nexport interface DisplayConfig {\n /** Dataset: ID of a saved visualization to render instead of the default chart. */\n visualizationId?: string | null;\n /** Dataset: column filters applied to the data. */\n filters?: DataFilter[];\n /** Route: ID of a specific action to preview (status, logs, side-effect assets). */\n actionId?: string | null;\n /** Route: author-provided defaults for an interactive route form. */\n defaultValues?: Record<string, unknown>;\n}\n\n/**\n * Normalize legacy viewMode values to the current set.\n * \"chart\" → \"preview\", \"default\" → \"card\", anything else → \"card\".\n */\nexport function normalizeViewMode(\n raw: string | undefined | null\n): \"card\" | \"preview\" | \"interactive\" | \"list\" {\n if (raw === \"default\") return \"card\";\n if (raw === \"chart\") return \"preview\";\n if (\n raw === \"preview\" ||\n raw === \"interactive\" ||\n raw === \"card\" ||\n raw === \"list\"\n )\n return raw;\n return \"card\";\n}\n\n/**\n * Build a DisplayConfig from node/element attributes, handling the legacy\n * flat `visualizationId` / `filters` attrs and the new `displayConfig` object.\n * Prefers values inside `displayConfig` when present.\n */\nexport function resolveDisplayConfig(attrs: {\n displayConfig?: DisplayConfig | string | null;\n visualizationId?: string | null;\n filters?: DataFilter[] | string | null;\n}): DisplayConfig {\n let base: DisplayConfig = {};\n\n if (attrs.displayConfig) {\n base =\n typeof attrs.displayConfig === \"string\"\n ? JSON.parse(attrs.displayConfig)\n : { ...attrs.displayConfig };\n }\n\n // Fall back to legacy flat attrs when displayConfig doesn't carry them\n if (base.visualizationId === undefined && attrs.visualizationId) {\n base.visualizationId = attrs.visualizationId;\n }\n if (base.filters === undefined && attrs.filters) {\n const raw = attrs.filters;\n base.filters =\n typeof raw === \"string\" ? JSON.parse(raw) : raw;\n }\n\n return base;\n}\n\nexport interface InlineAssetAttrs {\n id: string;\n assetType: string;\n viewMode: \"card\" | \"preview\" | \"interactive\" | \"list\";\n displayConfig?: DisplayConfig | null;\n /** @deprecated Use displayConfig.filters */\n filters?: any;\n /** @deprecated Use displayConfig.visualizationId */\n visualizationId?: string | null;\n partial?: boolean;\n}\n\n/** Assets pulled from Air JSON: embedded blocks or link href shorthands. */\nexport type ExtractedContentAsset =\n | { id: string; assetType: string; via: \"embed\" }\n | { id: string; assetType: string; via: \"link\"; legacy: false }\n | { id: string; via: \"link\"; legacy: true };\n\ninterface LinkedAssetRef {\n assetType: string;\n entity: string;\n slug: string;\n}\n\n/** UUID v4 pattern for inline link hrefs */\nconst UUID_RE =\n \"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\";\n\n/** Shorthand link hrefs: `post:<uuid>`, `file:<uuid>`, … (preferred over legacy `asset:<uuid>`). */\nconst TYPED_ASSET_LINK_RE = new RegExp(\n `^(post|dataset|file|service|route|quest):(${UUID_RE})$`,\n \"i\"\n);\n\n/** @deprecated Prefer `post:<uuid>` etc.; still supported and resolved server-side. */\nconst LEGACY_ASSET_LINK_RE = new RegExp(`^asset:(${UUID_RE})$`, \"i\");\n\n/** Route action link hrefs: `action:<uuid>` → history page for that run. */\nconst ACTION_LINK_RE = new RegExp(`^action:(${UUID_RE})$`, \"i\");\n\nconst VALID_ASSET_TYPES = new Set([\n \"post\",\n \"dataset\",\n \"file\",\n \"service\",\n \"route\",\n \"quest\",\n]);\n\nexport type ExtractedContentAction = { id: string; via: \"link\" };\n\n/**\n * Parse an inline link `href` for Ouro asset shorthands.\n * - `post:<uuid>`, `file:<uuid>`, … → typed (asset type known from prefix)\n * - `asset:<uuid>` → legacy (type resolved via DB when creating connections)\n */\nfunction parseAssetLinkShorthand(\n href: string\n):\n | { id: string; assetType: string; legacy: false }\n | { id: string; legacy: true }\n | null {\n const typed = TYPED_ASSET_LINK_RE.exec(href);\n if (typed) {\n const assetType = typed[1].toLowerCase();\n if (!VALID_ASSET_TYPES.has(assetType)) return null;\n return { id: typed[2], assetType, legacy: false };\n }\n const legacy = LEGACY_ASSET_LINK_RE.exec(href);\n if (legacy) return { id: legacy[1], legacy: true };\n return null;\n}\n\n/**\n * Parse an inline link `href` for a route action shorthand: `action:<uuid>`.\n * Actions are not assets — callers must resolve them separately.\n */\nfunction parseActionLinkShorthand(href: string): { id: string } | null {\n const match = ACTION_LINK_RE.exec(href);\n if (!match) return null;\n return { id: match[1] };\n}\n\n/**\n * Parse an Ouro site URL into its asset components.\n * Accepts both absolute URLs (https://ouro.foundation/posts/entity/slug)\n * and relative paths (/posts/entity/slug).\n */\nfunction parseOuroAssetUrl(\n href: string,\n siteUrl?: string\n): LinkedAssetRef | null {\n let pathname: string;\n try {\n if (href.startsWith(\"/\")) {\n pathname = href;\n } else {\n const url = new URL(href);\n if (siteUrl) {\n const siteHost = new URL(siteUrl).host;\n if (url.host !== siteHost) return null;\n }\n pathname = url.pathname;\n }\n } catch {\n return null;\n }\n\n // Pattern: /{assetType}s/{entity}/{slug}\n const match = pathname.match(\n /^\\/(\\w+)s\\/([^/]+)\\/([^/?#]+)/\n );\n if (!match) return null;\n\n const [, assetType, entity, slug] = match;\n if (!VALID_ASSET_TYPES.has(assetType)) return null;\n\n return { assetType, entity: decodeURIComponent(entity), slug: decodeURIComponent(slug) };\n}\n\nconst extractContent = (item: any): any => {\n if (Array.isArray(item)) return item.map(extractContent);\n if (item?.content) {\n if (Array.isArray(item.content))\n return item.content.map(extractContent).flat();\n else return extractContent(item.content);\n } else return item; // leaf\n};\n\nfunction getReferencesInContent(\n json: Content[\"json\"],\n options?: { siteUrl?: string }\n) {\n if (!json || !json?.content)\n return { users: [], assets: [], actions: [], linkedAssets: [] };\n const content = json.content.map(extractContent).flat();\n\n const users = content\n .filter((item: any) => item.type === \"mention\")\n .map((item: any) => ({\n user_id: item.attrs?.id,\n username: item.attrs?.label || item.attrs?.username,\n }))\n .reduce((unique: any[], item: any) => {\n if (\n !unique.some(\n (u) =>\n (u.user_id && item.user_id && u.user_id === item.user_id) ||\n (u.username && item.username && u.username === item.username)\n )\n ) {\n unique.push(item);\n }\n return unique;\n }, []) as Partial<Profile>[];\n\n const assets: ExtractedContentAsset[] = content\n .filter(\n (item: any) =>\n item.type === \"assetComponent\" && item.attrs?.id && !item.attrs?.partial\n )\n .map(({ attrs }: { attrs: InlineAssetAttrs }) => ({\n id: attrs.id,\n assetType: attrs.assetType,\n via: \"embed\" as const,\n }))\n .reduce((unique: ExtractedContentAsset[], item: ExtractedContentAsset) => {\n if (!unique.some((u) => u.id === item.id)) {\n unique.push(item);\n }\n return unique;\n }, []);\n\n // Extract asset / action references from link marks\n const linkedAssets: LinkedAssetRef[] = [];\n const actions: ExtractedContentAction[] = [];\n const seenAssetIds = new Set(assets.map((a) => a.id));\n const seenActionIds = new Set<string>();\n const seenLinkedKeys = new Set<string>();\n\n for (const item of content) {\n if (item?.type !== \"text\" || !item?.marks) continue;\n const linkMark = item.marks.find((m: any) => m.type === \"link\");\n if (!linkMark?.attrs?.href) continue;\n\n const href: string = linkMark.attrs.href;\n\n const actionShorthand = parseActionLinkShorthand(href);\n if (actionShorthand) {\n if (!seenActionIds.has(actionShorthand.id)) {\n seenActionIds.add(actionShorthand.id);\n actions.push({ id: actionShorthand.id, via: \"link\" });\n }\n continue;\n }\n\n const shorthand = parseAssetLinkShorthand(href);\n if (shorthand) {\n const id = shorthand.id;\n if (!seenAssetIds.has(id)) {\n seenAssetIds.add(id);\n if (shorthand.legacy) {\n assets.push({ id, via: \"link\", legacy: true });\n } else {\n assets.push({\n id,\n assetType: shorthand.assetType,\n via: \"link\",\n legacy: false,\n });\n }\n }\n continue;\n }\n\n // Check for Ouro site URLs\n const parsed = parseOuroAssetUrl(href, options?.siteUrl);\n if (parsed) {\n const key = `${parsed.assetType}:${parsed.entity}:${parsed.slug}`;\n if (!seenLinkedKeys.has(key)) {\n seenLinkedKeys.add(key);\n linkedAssets.push(parsed);\n }\n }\n }\n\n return {\n users,\n assets,\n actions,\n linkedAssets,\n };\n}\n\nexport {\n getReferencesInContent,\n parseActionLinkShorthand,\n parseAssetLinkShorthand,\n parseOuroAssetUrl,\n};\n"]}