@happyvertical/smrt-content 0.36.2 → 0.36.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 (86) hide show
  1. package/dist/asset-associable.d.ts +2 -2
  2. package/dist/asset-associable.d.ts.map +1 -1
  3. package/dist/body-format.d.ts +18 -3
  4. package/dist/body-format.d.ts.map +1 -1
  5. package/dist/body-format.js.map +1 -1
  6. package/dist/content-contribution-attachment.d.ts +4 -4
  7. package/dist/content-contribution-attachment.d.ts.map +1 -1
  8. package/dist/content-contribution-config.d.ts +1 -1
  9. package/dist/content-contribution-config.d.ts.map +1 -1
  10. package/dist/content-contribution-revision.d.ts +4 -4
  11. package/dist/content-contribution-revision.d.ts.map +1 -1
  12. package/dist/content-contribution-type.d.ts +5 -5
  13. package/dist/content-contribution-type.d.ts.map +1 -1
  14. package/dist/content-contribution.d.ts +7 -7
  15. package/dist/content-contribution.d.ts.map +1 -1
  16. package/dist/content-contributions.d.ts +24 -2
  17. package/dist/content-contributions.d.ts.map +1 -1
  18. package/dist/content-contributor.d.ts +5 -5
  19. package/dist/content-contributor.d.ts.map +1 -1
  20. package/dist/content-correction.d.ts +2 -2
  21. package/dist/content-correction.d.ts.map +1 -1
  22. package/dist/content-feed-parser.d.ts.map +1 -1
  23. package/dist/content-feed-source.d.ts +5 -5
  24. package/dist/content-feed-source.d.ts.map +1 -1
  25. package/dist/content-governance-assignment.d.ts +2 -2
  26. package/dist/content-governance-assignment.d.ts.map +1 -1
  27. package/dist/content-governance-policy.d.ts +2 -2
  28. package/dist/content-governance-policy.d.ts.map +1 -1
  29. package/dist/content-governance-profile.d.ts +2 -2
  30. package/dist/content-governance-profile.d.ts.map +1 -1
  31. package/dist/content-governance.d.ts +7 -7
  32. package/dist/content-governance.d.ts.map +1 -1
  33. package/dist/content-review.d.ts +2 -2
  34. package/dist/content-review.d.ts.map +1 -1
  35. package/dist/content-reviews.d.ts +1 -1
  36. package/dist/content-reviews.d.ts.map +1 -1
  37. package/dist/content-transparency.d.ts +38 -7
  38. package/dist/content-transparency.d.ts.map +1 -1
  39. package/dist/content-types.d.ts +1 -1
  40. package/dist/content-types.d.ts.map +1 -1
  41. package/dist/content-version.d.ts +17 -4
  42. package/dist/content-version.d.ts.map +1 -1
  43. package/dist/content-versions.d.ts.map +1 -1
  44. package/dist/content.d.ts +40 -36
  45. package/dist/content.d.ts.map +1 -1
  46. package/dist/contents.d.ts +46 -31
  47. package/dist/contents.d.ts.map +1 -1
  48. package/dist/index.js +224 -118
  49. package/dist/index.js.map +1 -1
  50. package/dist/manifest.json +40 -40
  51. package/dist/serialization.d.ts +66 -49
  52. package/dist/serialization.d.ts.map +1 -1
  53. package/dist/smrt-knowledge.json +4 -4
  54. package/dist/svelte/components/ContentAgentChat.svelte +42 -24
  55. package/dist/svelte/components/ContentAgentChat.svelte.d.ts.map +1 -1
  56. package/dist/svelte/components/ContentBodyEditor.svelte +8 -3
  57. package/dist/svelte/components/ContentBodyEditor.svelte.d.ts +3 -3
  58. package/dist/svelte/components/ContentBodyEditor.svelte.d.ts.map +1 -1
  59. package/dist/svelte/components/ContentClaimAuditTool.svelte +6 -6
  60. package/dist/svelte/components/ContentCorrectionsTool.svelte +4 -4
  61. package/dist/svelte/components/ContentEditor.svelte +69 -30
  62. package/dist/svelte/components/ContentEditor.svelte.d.ts +6 -3
  63. package/dist/svelte/components/ContentEditor.svelte.d.ts.map +1 -1
  64. package/dist/svelte/components/ContentGovernanceManager.svelte +4 -2
  65. package/dist/svelte/components/ContentGovernanceManager.svelte.d.ts.map +1 -1
  66. package/dist/svelte/components/ContentGovernancePanel.svelte +21 -21
  67. package/dist/svelte/components/ContentList.svelte +20 -17
  68. package/dist/svelte/components/ContentList.svelte.d.ts +8 -7
  69. package/dist/svelte/components/ContentList.svelte.d.ts.map +1 -1
  70. package/dist/svelte/components/ContentMetadataFields.svelte +10 -1
  71. package/dist/svelte/components/ContentMetadataFields.svelte.d.ts +9 -1
  72. package/dist/svelte/components/ContentMetadataFields.svelte.d.ts.map +1 -1
  73. package/dist/svelte/components/ContentStatusFields.svelte +9 -1
  74. package/dist/svelte/components/ContentStatusFields.svelte.d.ts +8 -1
  75. package/dist/svelte/components/ContentStatusFields.svelte.d.ts.map +1 -1
  76. package/dist/svelte/components/ContentTransparencyTool.svelte +4 -2
  77. package/dist/svelte/components/ContentTransparencyTool.svelte.d.ts.map +1 -1
  78. package/dist/svelte/components/ContentVersionsTool.svelte +6 -6
  79. package/dist/svelte/components/GovernedContentEditor.svelte +8 -2
  80. package/dist/svelte/components/GovernedContentEditor.svelte.d.ts.map +1 -1
  81. package/dist/svelte/routes/ContentContributionsRoute.svelte +11 -10
  82. package/dist/svelte/routes/ContentContributionsRoute.svelte.d.ts.map +1 -1
  83. package/dist/svelte/routes/ContentFactsRoute.svelte +2 -2
  84. package/dist/svelte/routes/ContentWorkspaceRoute.svelte +6 -6
  85. package/dist/thumbnail-generator.d.ts.map +1 -1
  86. package/package.json +14 -14
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "timestamp": 1782450568699,
3
+ "timestamp": 1782455299676,
4
4
  "packageName": "@happyvertical/smrt-content",
5
- "packageVersion": "0.36.2",
5
+ "packageVersion": "0.36.3",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-content:ContentAsset": {
8
8
  "name": "contentasset",
@@ -442,7 +442,7 @@
442
442
  "name": "getMetadata",
443
443
  "async": false,
444
444
  "parameters": [],
445
- "returnType": "Record<string, any>",
445
+ "returnType": "Record<string>",
446
446
  "isStatic": false,
447
447
  "isPublic": true
448
448
  }
@@ -776,7 +776,7 @@
776
776
  "name": "getMetadata",
777
777
  "async": false,
778
778
  "parameters": [],
779
- "returnType": "Record<string, any>",
779
+ "returnType": "Record<string>",
780
780
  "isStatic": false,
781
781
  "isPublic": true
782
782
  }
@@ -1176,7 +1176,7 @@
1176
1176
  "name": "getMetadata",
1177
1177
  "async": false,
1178
1178
  "parameters": [],
1179
- "returnType": "Record<string, any>",
1179
+ "returnType": "Record<string>",
1180
1180
  "isStatic": false,
1181
1181
  "isPublic": true
1182
1182
  },
@@ -1186,7 +1186,7 @@
1186
1186
  "parameters": [
1187
1187
  {
1188
1188
  "name": "metadata",
1189
- "type": "Record<string, any>",
1189
+ "type": "Record<string>",
1190
1190
  "optional": false
1191
1191
  }
1192
1192
  ],
@@ -1594,7 +1594,7 @@
1594
1594
  "name": "getMetadata",
1595
1595
  "async": false,
1596
1596
  "parameters": [],
1597
- "returnType": "Record<string, any>",
1597
+ "returnType": "Record<string>",
1598
1598
  "isStatic": false,
1599
1599
  "isPublic": true
1600
1600
  },
@@ -1604,7 +1604,7 @@
1604
1604
  "parameters": [
1605
1605
  {
1606
1606
  "name": "metadata",
1607
- "type": "Record<string, any>",
1607
+ "type": "Record<string>",
1608
1608
  "optional": false
1609
1609
  }
1610
1610
  ],
@@ -2215,7 +2215,7 @@
2215
2215
  "name": "getMetadata",
2216
2216
  "async": false,
2217
2217
  "parameters": [],
2218
- "returnType": "Record<string, any>",
2218
+ "returnType": "Record<string>",
2219
2219
  "isStatic": false,
2220
2220
  "isPublic": true
2221
2221
  },
@@ -2225,7 +2225,7 @@
2225
2225
  "parameters": [
2226
2226
  {
2227
2227
  "name": "metadata",
2228
- "type": "Record<string, any>",
2228
+ "type": "Record<string>",
2229
2229
  "optional": false
2230
2230
  }
2231
2231
  ],
@@ -2558,7 +2558,7 @@
2558
2558
  "name": "getMetadata",
2559
2559
  "async": false,
2560
2560
  "parameters": [],
2561
- "returnType": "Record<string, any>",
2561
+ "returnType": "Record<string>",
2562
2562
  "isStatic": false,
2563
2563
  "isPublic": true
2564
2564
  }
@@ -2934,7 +2934,7 @@
2934
2934
  "name": "getMetadata",
2935
2935
  "async": false,
2936
2936
  "parameters": [],
2937
- "returnType": "Record<string, any>",
2937
+ "returnType": "Record<string>",
2938
2938
  "isStatic": false,
2939
2939
  "isPublic": true
2940
2940
  },
@@ -2944,7 +2944,7 @@
2944
2944
  "parameters": [
2945
2945
  {
2946
2946
  "name": "metadata",
2947
- "type": "Record<string, any>",
2947
+ "type": "Record<string>",
2948
2948
  "optional": false
2949
2949
  }
2950
2950
  ],
@@ -3404,7 +3404,7 @@
3404
3404
  "name": "getMetadata",
3405
3405
  "async": false,
3406
3406
  "parameters": [],
3407
- "returnType": "Record<string, any>",
3407
+ "returnType": "Record<string>",
3408
3408
  "isStatic": false,
3409
3409
  "isPublic": true
3410
3410
  },
@@ -3842,7 +3842,7 @@
3842
3842
  "name": "getMetadata",
3843
3843
  "async": false,
3844
3844
  "parameters": [],
3845
- "returnType": "Record<string, any>",
3845
+ "returnType": "Record<string>",
3846
3846
  "isStatic": false,
3847
3847
  "isPublic": true
3848
3848
  },
@@ -4068,7 +4068,7 @@
4068
4068
  "name": "getMetadata",
4069
4069
  "async": false,
4070
4070
  "parameters": [],
4071
- "returnType": "Record<string, any>",
4071
+ "returnType": "Record<string>",
4072
4072
  "isStatic": false,
4073
4073
  "isPublic": true
4074
4074
  },
@@ -4763,7 +4763,7 @@
4763
4763
  "name": "getMetadata",
4764
4764
  "async": false,
4765
4765
  "parameters": [],
4766
- "returnType": "Record<string, any>",
4766
+ "returnType": "Record<string>",
4767
4767
  "isStatic": false,
4768
4768
  "isPublic": true
4769
4769
  }
@@ -5764,7 +5764,7 @@
5764
5764
  },
5765
5765
  {
5766
5766
  "name": "metadata",
5767
- "type": "Record<string, any>",
5767
+ "type": "Record<string>",
5768
5768
  "optional": true
5769
5769
  }
5770
5770
  ],
@@ -6402,7 +6402,7 @@
6402
6402
  "name": "getMetadata",
6403
6403
  "async": false,
6404
6404
  "parameters": [],
6405
- "returnType": "Record<string, any>",
6405
+ "returnType": "Record<string>",
6406
6406
  "isStatic": false,
6407
6407
  "isPublic": true
6408
6408
  },
@@ -6412,7 +6412,7 @@
6412
6412
  "parameters": [
6413
6413
  {
6414
6414
  "name": "metadata",
6415
- "type": "Record<string, any> | null | undefined",
6415
+ "type": "Record<string> | null | undefined",
6416
6416
  "optional": false
6417
6417
  }
6418
6418
  ],
@@ -6426,11 +6426,11 @@
6426
6426
  "parameters": [
6427
6427
  {
6428
6428
  "name": "patch",
6429
- "type": "Partial<Record<string, any>>",
6429
+ "type": "Partial<Record<string>>",
6430
6430
  "optional": false
6431
6431
  }
6432
6432
  ],
6433
- "returnType": "Record<string, any>",
6433
+ "returnType": "Record<string>",
6434
6434
  "isStatic": false,
6435
6435
  "isPublic": true
6436
6436
  },
@@ -7346,7 +7346,7 @@
7346
7346
  },
7347
7347
  {
7348
7348
  "name": "metadata",
7349
- "type": "Record<string, any>",
7349
+ "type": "Record<string>",
7350
7350
  "optional": true
7351
7351
  }
7352
7352
  ],
@@ -7984,7 +7984,7 @@
7984
7984
  "name": "getMetadata",
7985
7985
  "async": false,
7986
7986
  "parameters": [],
7987
- "returnType": "Record<string, any>",
7987
+ "returnType": "Record<string>",
7988
7988
  "isStatic": false,
7989
7989
  "isPublic": true
7990
7990
  },
@@ -7994,7 +7994,7 @@
7994
7994
  "parameters": [
7995
7995
  {
7996
7996
  "name": "metadata",
7997
- "type": "Record<string, any> | null | undefined",
7997
+ "type": "Record<string> | null | undefined",
7998
7998
  "optional": false
7999
7999
  }
8000
8000
  ],
@@ -8008,11 +8008,11 @@
8008
8008
  "parameters": [
8009
8009
  {
8010
8010
  "name": "patch",
8011
- "type": "Partial<Record<string, any>>",
8011
+ "type": "Partial<Record<string>>",
8012
8012
  "optional": false
8013
8013
  }
8014
8014
  ],
8015
- "returnType": "Record<string, any>",
8015
+ "returnType": "Record<string>",
8016
8016
  "isStatic": false,
8017
8017
  "isPublic": true
8018
8018
  },
@@ -8957,7 +8957,7 @@
8957
8957
  },
8958
8958
  {
8959
8959
  "name": "metadata",
8960
- "type": "Record<string, any>",
8960
+ "type": "Record<string>",
8961
8961
  "optional": true
8962
8962
  }
8963
8963
  ],
@@ -9595,7 +9595,7 @@
9595
9595
  "name": "getMetadata",
9596
9596
  "async": false,
9597
9597
  "parameters": [],
9598
- "returnType": "Record<string, any>",
9598
+ "returnType": "Record<string>",
9599
9599
  "isStatic": false,
9600
9600
  "isPublic": true
9601
9601
  },
@@ -9605,7 +9605,7 @@
9605
9605
  "parameters": [
9606
9606
  {
9607
9607
  "name": "metadata",
9608
- "type": "Record<string, any> | null | undefined",
9608
+ "type": "Record<string> | null | undefined",
9609
9609
  "optional": false
9610
9610
  }
9611
9611
  ],
@@ -9619,11 +9619,11 @@
9619
9619
  "parameters": [
9620
9620
  {
9621
9621
  "name": "patch",
9622
- "type": "Partial<Record<string, any>>",
9622
+ "type": "Partial<Record<string>>",
9623
9623
  "optional": false
9624
9624
  }
9625
9625
  ],
9626
- "returnType": "Record<string, any>",
9626
+ "returnType": "Record<string>",
9627
9627
  "isStatic": false,
9628
9628
  "isPublic": true
9629
9629
  },
@@ -9951,7 +9951,7 @@
9951
9951
  "name": "getSnapshot",
9952
9952
  "async": false,
9953
9953
  "parameters": [],
9954
- "returnType": "Record<string, any>",
9954
+ "returnType": "Record<string>",
9955
9955
  "isStatic": false,
9956
9956
  "isPublic": true
9957
9957
  },
@@ -9959,7 +9959,7 @@
9959
9959
  "name": "getMetadata",
9960
9960
  "async": false,
9961
9961
  "parameters": [],
9962
- "returnType": "Record<string, any>",
9962
+ "returnType": "ContentVersionMetadata",
9963
9963
  "isStatic": false,
9964
9964
  "isPublic": true
9965
9965
  },
@@ -11020,7 +11020,7 @@
11020
11020
  },
11021
11021
  {
11022
11022
  "name": "metadata",
11023
- "type": "Record<string, any>",
11023
+ "type": "Record<string>",
11024
11024
  "optional": true
11025
11025
  }
11026
11026
  ],
@@ -11658,7 +11658,7 @@
11658
11658
  "name": "getMetadata",
11659
11659
  "async": false,
11660
11660
  "parameters": [],
11661
- "returnType": "Record<string, any>",
11661
+ "returnType": "Record<string>",
11662
11662
  "isStatic": false,
11663
11663
  "isPublic": true
11664
11664
  },
@@ -11668,7 +11668,7 @@
11668
11668
  "parameters": [
11669
11669
  {
11670
11670
  "name": "metadata",
11671
- "type": "Record<string, any> | null | undefined",
11671
+ "type": "Record<string> | null | undefined",
11672
11672
  "optional": false
11673
11673
  }
11674
11674
  ],
@@ -11682,11 +11682,11 @@
11682
11682
  "parameters": [
11683
11683
  {
11684
11684
  "name": "patch",
11685
- "type": "Partial<Record<string, any>>",
11685
+ "type": "Partial<Record<string>>",
11686
11686
  "optional": false
11687
11687
  }
11688
11688
  ],
11689
- "returnType": "Record<string, any>",
11689
+ "returnType": "Record<string>",
11690
11690
  "isStatic": false,
11691
11691
  "isPublic": true
11692
11692
  },
@@ -12175,7 +12175,7 @@
12175
12175
  "parameters": [
12176
12176
  {
12177
12177
  "name": "options",
12178
- "type": "object",
12178
+ "type": "GenerateMissingThumbnailsOptions",
12179
12179
  "optional": false
12180
12180
  }
12181
12181
  ],
@@ -1,78 +1,95 @@
1
- export declare function serializeFact(fact: any): {
2
- metadata: any;
1
+ /**
2
+ * Plain JSON shape produced by serializing a SMRT model instance. Values are
3
+ * intentionally `unknown` — callers spread these records into API responses and
4
+ * narrow individual fields where they need a concrete type.
5
+ */
6
+ type SerializedRecord = Record<string, unknown>;
7
+ export declare function serializeFact(fact: unknown): {
8
+ metadata: unknown;
3
9
  };
4
- export declare function serializeFactLink(link: any): {
5
- metadata: any;
10
+ export declare function serializeFactLink(link: unknown): {
11
+ metadata: unknown;
6
12
  };
7
- export declare function serializeContentVersion(version: any): {
8
- snapshot: any;
9
- metadata: any;
13
+ export declare function serializeContentVersion(version: unknown): {
14
+ snapshot: unknown;
15
+ metadata: unknown;
10
16
  };
11
- export declare function serializeContentReview(review: any): {
12
- findings: any;
13
- metadata: any;
17
+ export declare function serializeContentReview(review: unknown): {
18
+ findings: unknown;
19
+ metadata: unknown;
14
20
  };
15
- export declare function serializeContentCorrection(correction: any): {
16
- metadata: any;
21
+ export declare function serializeContentCorrection(correction: unknown): {
22
+ metadata: unknown;
17
23
  };
18
- export declare function serializeContentContributor(contributor: any): {
19
- metadata: any;
24
+ export declare function serializeContentContributor(contributor: unknown): {
25
+ metadata: unknown;
20
26
  };
21
- export declare function serializeContentContributionType(contributionType: any): {
22
- allowedChannels: any;
23
- intakeRules: any;
24
- promotion: any;
25
- metadata: any;
27
+ export declare function serializeContentContributionType(contributionType: unknown): {
28
+ allowedChannels: unknown;
29
+ intakeRules: unknown;
30
+ promotion: unknown;
31
+ metadata: unknown;
26
32
  };
27
- export declare function serializeContentContributionRevision(revision: any): {
28
- sourceMessageId: any;
29
- sourceThreadKey: any;
30
- metadata: any;
33
+ export declare function serializeContentContributionRevision(revision: unknown): {
34
+ sourceMessageId: {} | null;
35
+ sourceThreadKey: {} | null;
36
+ metadata: unknown;
31
37
  };
32
- export declare function serializeContentContributionAttachment(attachment: any): {
33
- revisionId: any;
34
- fileKey: any;
35
- sourceUri: any;
36
- promotedAssetId: any;
37
- metadata: any;
38
+ export declare function serializeContentContributionAttachment(attachment: unknown): {
39
+ revisionId: {} | null;
40
+ fileKey: {} | null;
41
+ sourceUri: {} | null;
42
+ promotedAssetId: {} | null;
43
+ metadata: unknown;
38
44
  };
39
- export declare function serializeContentContribution(contribution: any): Promise<{
45
+ export declare function serializeContentContribution(contribution: unknown): Promise<{
40
46
  contributor: {
41
- metadata: any;
47
+ metadata: unknown;
42
48
  } | null;
43
- revisions: any;
44
- attachments: any;
45
- metadata: any;
49
+ revisions: {
50
+ sourceMessageId: {} | null;
51
+ sourceThreadKey: {} | null;
52
+ metadata: unknown;
53
+ }[];
54
+ attachments: {
55
+ revisionId: {} | null;
56
+ fileKey: {} | null;
57
+ sourceUri: {} | null;
58
+ promotedAssetId: {} | null;
59
+ metadata: unknown;
60
+ }[];
61
+ metadata: unknown;
46
62
  }>;
47
- export declare function serializeContentReviewProfileEvaluation(profile: any): {
63
+ export declare function serializeContentReviewProfileEvaluation(profile: unknown): {
48
64
  requirements: any[];
49
65
  };
50
- export declare function serializeContentReviewPolicy(policy: any): {
51
- [x: string]: any;
66
+ export declare function serializeContentReviewPolicy(policy: unknown): {
67
+ [x: string]: unknown;
52
68
  };
53
- export declare function serializeContentGovernanceProfile(profile: any): {
69
+ export declare function serializeContentGovernanceProfile(profile: unknown): {
54
70
  requirements: any[];
55
- metadata: any;
71
+ metadata: unknown;
56
72
  };
57
- export declare function serializeContentGovernanceAssignment(assignment: any): {
58
- metadata: any;
73
+ export declare function serializeContentGovernanceAssignment(assignment: unknown): {
74
+ metadata: unknown;
59
75
  };
60
- export declare function serializeContentGovernanceState(state: any): {
76
+ export declare function serializeContentGovernanceState(state: unknown): {
61
77
  reviewPolicies: {
62
- [x: string]: any;
78
+ [x: string]: unknown;
63
79
  }[];
64
80
  availableProfiles: {
65
81
  requirements: any[];
66
- metadata: any;
82
+ metadata: unknown;
67
83
  }[];
68
84
  reviewProfiles: {
69
85
  requirements: any[];
70
86
  }[];
71
87
  };
72
- export declare function serializeContent(content: any): Promise<{
73
- referenceIds: any;
74
- references: any;
75
- assetIds: any;
76
- assets: any;
88
+ export declare function serializeContent(content: unknown): Promise<{
89
+ referenceIds: unknown[];
90
+ references: SerializedRecord[];
91
+ assetIds: unknown[];
92
+ assets: SerializedRecord[];
77
93
  }>;
94
+ export {};
78
95
  //# sourceMappingURL=serialization.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"serialization.d.ts","sourceRoot":"","sources":["../src/serialization.ts"],"names":[],"mappings":"AAWA,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG;;EAStC;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG;;EAS1C;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,GAAG;;;EAanD;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,GAAG;;;EAajD;AAED,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,GAAG;;EASzD;AAED,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,GAAG;;EAS3D;AAED,wBAAgB,gCAAgC,CAAC,gBAAgB,EAAE,GAAG;;;;;EAqBrE;AAED,wBAAgB,oCAAoC,CAAC,QAAQ,EAAE,GAAG;;;;EAWjE;AAED,wBAAgB,sCAAsC,CAAC,UAAU,EAAE,GAAG;;;;;;EAarE;AAED,wBAAsB,4BAA4B,CAAC,YAAY,EAAE,GAAG;;;;;;;GAuBnE;AAED,wBAAgB,uCAAuC,CAAC,OAAO,EAAE,GAAG;;EAMnE;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,GAAG;;EAIvD;AAED,wBAAgB,iCAAiC,CAAC,OAAO,EAAE,GAAG;;;EAU7D;AAED,wBAAgB,oCAAoC,CAAC,UAAU,EAAE,GAAG;;EASnE;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,GAAG;;;;;;;;;;;EAczD;AAED,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,GAAG;;;;;GAwDlD"}
1
+ {"version":3,"file":"serialization.d.ts","sourceRoot":"","sources":["../src/serialization.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,KAAK,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAyChD,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO;;EAU1C;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO;;EAU9C;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO;;;EAcvD;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO;;;EAcrD;AAED,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,OAAO;;EAU7D;AAED,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,OAAO;;EAU/D;AAED,wBAAgB,gCAAgC,CAAC,gBAAgB,EAAE,OAAO;;;;;EAsBzE;AAED,wBAAgB,oCAAoC,CAAC,QAAQ,EAAE,OAAO;;;;EAYrE;AAED,wBAAgB,sCAAsC,CAAC,UAAU,EAAE,OAAO;;;;;;EAczE;AAED,wBAAsB,4BAA4B,CAAC,YAAY,EAAE,OAAO;;;;;;;;;;;;;;;;;GAkBvE;AAED,wBAAgB,uCAAuC,CAAC,OAAO,EAAE,OAAO;;EAMvE;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,OAAO;;EAI3D;AAED,wBAAgB,iCAAiC,CAAC,OAAO,EAAE,OAAO;;;EAWjE;AAED,wBAAgB,oCAAoC,CAAC,UAAU,EAAE,OAAO;;EAUvE;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO;;;;;;;;;;;EAc7D;AAYD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,OAAO;;;;;GAkEtD"}
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-06-26T05:09:29.654Z",
3
+ "generatedAt": "2026-06-26T06:28:20.692Z",
4
4
  "packageName": "@happyvertical/smrt-content",
5
- "packageVersion": "0.36.2",
5
+ "packageVersion": "0.36.3",
6
6
  "sourceManifestPath": "dist/manifest.json",
7
7
  "agentDocPath": "AGENTS.md",
8
8
  "sourceHashes": {
9
- "manifest": "462e3ebdf1946b5981669538c0338fcfe68bc2db895b364cd47860a20e03b19c",
10
- "packageJson": "cbb5399d8ef467c22990a281cf7b184f136400d2af0aa0dc261b3a84de92e753",
9
+ "manifest": "a8ae90921d363f70649207ef7d208407c7d04899e4a441de82a8bdcd4d6ba200",
10
+ "packageJson": "2cda40bc6d32d63bdc167b1f1c052a2aab94bdd71ffa828c1ee5d4071d622865",
11
11
  "agents": "d3e1fdba8cf8c8f393e682616c56fefcc789c44018407bbdf7332d5f06cfbb5c"
12
12
  },
13
13
  "exports": [
@@ -6,6 +6,11 @@
6
6
  */
7
7
 
8
8
  import { AgentChat } from '@happyvertical/smrt-chat/svelte';
9
+ import type {
10
+ AgentSessionData,
11
+ ChatMessageData,
12
+ ChatThreadData,
13
+ } from '@happyvertical/smrt-chat/svelte';
9
14
  import { Input, Select } from '@happyvertical/smrt-ui/forms';
10
15
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
11
16
  import { Button } from '@happyvertical/smrt-ui/ui';
@@ -58,10 +63,10 @@ let {
58
63
  onclose = undefined,
59
64
  }: Props = $props();
60
65
 
61
- let session = $state<any>(null);
62
- let threads = $state<any[]>([]);
66
+ let session = $state<AgentSessionData | null>(null);
67
+ let threads = $state<ChatThreadData[]>([]);
63
68
  let activeThreadId = $state<string | null>(null);
64
- let messages = $state<any[]>([]);
69
+ let messages = $state<ChatMessageData[]>([]);
65
70
 
66
71
  let loadingSession = $state(true);
67
72
  let loadingMessages = $state(false);
@@ -147,8 +152,17 @@ $effect(() => {
147
152
  void loadSession();
148
153
  });
149
154
 
155
+ /**
156
+ * Raw message shape as returned from the chat API before UI normalization.
157
+ * Fields are loosely typed because the wire payload may omit UI-only fields.
158
+ */
159
+ interface RawAgentMessage extends Partial<ChatMessageData> {
160
+ created_at?: string | Date;
161
+ [key: string]: unknown;
162
+ }
163
+
150
164
  /** Ensure every message has the UI fields that AgentChat.svelte requires */
151
- function normalizeMessage(msg: any): any {
165
+ function normalizeMessage(msg: RawAgentMessage): ChatMessageData {
152
166
  return {
153
167
  ...msg,
154
168
  senderName:
@@ -161,10 +175,14 @@ function normalizeMessage(msg: any): any {
161
175
  : msg.attachments
162
176
  : [],
163
177
  createdAt: msg.createdAt || msg.created_at || new Date().toISOString(),
164
- };
178
+ } as ChatMessageData;
165
179
  }
166
180
 
167
- function parseSessionContext(sessionValue: any): Record<string, unknown> {
181
+ type SessionWithContext = AgentSessionData & { sessionContext?: unknown };
182
+
183
+ function parseSessionContext(
184
+ sessionValue: SessionWithContext | null | undefined,
185
+ ): Record<string, unknown> {
168
186
  const rawContext = sessionValue?.sessionContext;
169
187
  if (!rawContext) {
170
188
  return {};
@@ -209,7 +227,9 @@ function normalizeAllowedModels(value: unknown): string[] {
209
227
  return models;
210
228
  }
211
229
 
212
- function applySessionModelPreference(sessionValue: any): void {
230
+ function applySessionModelPreference(
231
+ sessionValue: SessionWithContext | null | undefined,
232
+ ): void {
213
233
  const ctx = parseSessionContext(sessionValue);
214
234
  const sessionAllowedModels = normalizeAllowedModels(ctx.allowedModels);
215
235
  allowedModelIds = sessionAllowedModels;
@@ -271,8 +291,8 @@ async function loadSession() {
271
291
  newTopicTitle = 'General';
272
292
  await createNewTopic();
273
293
  }
274
- } catch (err: any) {
275
- error = err.message;
294
+ } catch (err) {
295
+ error = err instanceof Error ? err.message : String(err);
276
296
  } finally {
277
297
  loadingSession = false;
278
298
  }
@@ -306,8 +326,8 @@ async function loadThread(threadId: string) {
306
326
 
307
327
  // Check if there is a saved model preference on the session context
308
328
  applySessionModelPreference(session);
309
- } catch (err: any) {
310
- error = err.message;
329
+ } catch (err) {
330
+ error = err instanceof Error ? err.message : String(err);
311
331
  } finally {
312
332
  loadingMessages = false;
313
333
  }
@@ -339,8 +359,8 @@ async function createNewTopic() {
339
359
  threads = [data.thread, ...threads];
340
360
  newTopicTitle = '';
341
361
  await loadThread(data.thread.id);
342
- } catch (err: any) {
343
- error = err.message;
362
+ } catch (err) {
363
+ error = err instanceof Error ? err.message : String(err);
344
364
  } finally {
345
365
  isCreatingTopic = false;
346
366
  }
@@ -350,16 +370,14 @@ async function handleSendMessage(content: string) {
350
370
  if (!session || !activeThreadId) return;
351
371
 
352
372
  const tempId = `temp-${Date.now()}`;
353
- messages = [
354
- ...messages,
355
- {
356
- id: tempId,
357
- content,
358
- role: 'user',
359
- messageType: 'text',
360
- createdAt: new Date(),
361
- },
362
- ];
373
+ const tempMessage = {
374
+ id: tempId,
375
+ content,
376
+ role: 'user',
377
+ messageType: 'text',
378
+ createdAt: new Date(),
379
+ } as ChatMessageData;
380
+ messages = [...messages, tempMessage];
363
381
 
364
382
  sendingMessage = true;
365
383
  try {
@@ -412,7 +430,7 @@ async function handleSendMessage(content: string) {
412
430
  match = jsonBlockRegex.exec(data.agentMessage.content);
413
431
  }
414
432
  }
415
- } catch (err: any) {
433
+ } catch (err) {
416
434
  messages = messages.filter((m) => m.id !== tempId);
417
435
  error = 'Failed to send message.';
418
436
  } finally {
@@ -1 +1 @@
1
- {"version":3,"file":"ContentAgentChat.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentAgentChat.svelte.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,6BAA6B,EAC7B,0CAA0C,EAC3C,MAAM,gCAAgC,CAAC;AASxC,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,6BAA6B,GAAG,IAAI,CAAC;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uBAAuB,CAAC,EAAE,0CAA0C,CAAC;IACrE,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACzD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAodD,QAAA,MAAM,gBAAgB,2CAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"ContentAgentChat.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentAgentChat.svelte.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,6BAA6B,EAC7B,0CAA0C,EAC3C,MAAM,gCAAgC,CAAC;AASxC,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,6BAA6B,GAAG,IAAI,CAAC;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uBAAuB,CAAC,EAAE,0CAA0C,CAAC;IACrE,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACzD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAoeD,QAAA,MAAM,gBAAgB,2CAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}