@undefineds.co/models 0.1.0

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 (254) hide show
  1. package/README.md +578 -0
  2. package/dist/_drizzle-solid/columns.d.ts +37 -0
  3. package/dist/_drizzle-solid/columns.js +1 -0
  4. package/dist/_drizzle-solid/pod-table.d.ts +3 -0
  5. package/dist/_drizzle-solid/pod-table.js +1 -0
  6. package/dist/_drizzle-solid/types.d.ts +40 -0
  7. package/dist/_drizzle-solid/types.js +1 -0
  8. package/dist/agent.providers.d.ts +13 -0
  9. package/dist/agent.providers.js +69 -0
  10. package/dist/agent.repository.d.ts +85 -0
  11. package/dist/agent.repository.js +7 -0
  12. package/dist/agent.schema.d.ts +1 -0
  13. package/dist/agent.schema.js +1 -0
  14. package/dist/ai-config/index.d.ts +61 -0
  15. package/dist/ai-config/index.js +294 -0
  16. package/dist/ai-config.d.ts +1 -0
  17. package/dist/ai-config.js +1 -0
  18. package/dist/ai-model.schema.d.ts +1 -0
  19. package/dist/ai-model.schema.js +1 -0
  20. package/dist/ai-provider.schema.d.ts +1 -0
  21. package/dist/ai-provider.schema.js +1 -0
  22. package/dist/approval.schema.d.ts +1 -0
  23. package/dist/approval.schema.js +1 -0
  24. package/dist/audit.schema.d.ts +1 -0
  25. package/dist/audit.schema.js +1 -0
  26. package/dist/chat.repository.d.ts +61 -0
  27. package/dist/chat.repository.js +8 -0
  28. package/dist/chat.schema.d.ts +1 -0
  29. package/dist/chat.schema.js +1 -0
  30. package/dist/chat.utils.d.ts +3 -0
  31. package/dist/chat.utils.js +30 -0
  32. package/dist/contact.repository.d.ts +85 -0
  33. package/dist/contact.repository.js +8 -0
  34. package/dist/contact.schema.d.ts +1 -0
  35. package/dist/contact.schema.js +1 -0
  36. package/dist/core/agent-provider.schema.d.ts +1 -0
  37. package/dist/core/agent-provider.schema.js +1 -0
  38. package/dist/core/agent-status.schema.d.ts +12 -0
  39. package/dist/core/agent-status.schema.js +18 -0
  40. package/dist/core/agent.schema.d.ts +72 -0
  41. package/dist/core/agent.schema.js +38 -0
  42. package/dist/core/ai-config.schema.d.ts +11 -0
  43. package/dist/core/ai-config.schema.js +18 -0
  44. package/dist/core/ai-model.schema.d.ts +15 -0
  45. package/dist/core/ai-model.schema.js +21 -0
  46. package/dist/core/ai-provider.schema.d.ts +16 -0
  47. package/dist/core/ai-provider.schema.js +28 -0
  48. package/dist/core/approval.schema.d.ts +21 -0
  49. package/dist/core/approval.schema.js +33 -0
  50. package/dist/core/audit.schema.d.ts +17 -0
  51. package/dist/core/audit.schema.js +29 -0
  52. package/dist/core/chat.schema.d.ts +36 -0
  53. package/dist/core/chat.schema.js +45 -0
  54. package/dist/core/contact.schema.d.ts +47 -0
  55. package/dist/core/contact.schema.js +59 -0
  56. package/dist/core/credential.schema.d.ts +56 -0
  57. package/dist/core/credential.schema.js +40 -0
  58. package/dist/core/extension/extension.schema.d.ts +4 -0
  59. package/dist/core/extension/extension.schema.js +11 -0
  60. package/dist/core/extension/index.d.ts +1 -0
  61. package/dist/core/extension/index.js +1 -0
  62. package/dist/core/extension.d.ts +1 -0
  63. package/dist/core/extension.js +1 -0
  64. package/dist/core/favorite/favorite.schema.d.ts +24 -0
  65. package/dist/core/favorite/favorite.schema.js +34 -0
  66. package/dist/core/favorite/index.d.ts +1 -0
  67. package/dist/core/favorite/index.js +1 -0
  68. package/dist/core/file/file.schema.d.ts +39 -0
  69. package/dist/core/file/file.schema.js +51 -0
  70. package/dist/core/file/index.d.ts +1 -0
  71. package/dist/core/file/index.js +1 -0
  72. package/dist/core/file.d.ts +1 -0
  73. package/dist/core/file.js +1 -0
  74. package/dist/core/grant.schema.d.ts +16 -0
  75. package/dist/core/grant.schema.js +29 -0
  76. package/dist/core/import/import-job.schema.d.ts +5 -0
  77. package/dist/core/import/import-job.schema.js +5 -0
  78. package/dist/core/import/index.d.ts +1 -0
  79. package/dist/core/import/index.js +1 -0
  80. package/dist/core/import.d.ts +1 -0
  81. package/dist/core/import.js +1 -0
  82. package/dist/core/inbox-notification.schema.d.ts +9 -0
  83. package/dist/core/inbox-notification.schema.js +16 -0
  84. package/dist/core/index.d.ts +31 -0
  85. package/dist/core/index.js +32 -0
  86. package/dist/core/knowledge/index.d.ts +1 -0
  87. package/dist/core/knowledge/index.js +1 -0
  88. package/dist/core/knowledge/knowledge-folder.schema.d.ts +7 -0
  89. package/dist/core/knowledge/knowledge-folder.schema.js +6 -0
  90. package/dist/core/knowledge.d.ts +1 -0
  91. package/dist/core/knowledge.js +1 -0
  92. package/dist/core/message.schema.d.ts +33 -0
  93. package/dist/core/message.schema.js +49 -0
  94. package/dist/core/namespaces.d.ts +176 -0
  95. package/dist/core/namespaces.js +289 -0
  96. package/dist/core/profile.d.ts +16 -0
  97. package/dist/core/profile.js +19 -0
  98. package/dist/core/schema.d.ts +304 -0
  99. package/dist/core/schema.js +46 -0
  100. package/dist/core/session/index.d.ts +1 -0
  101. package/dist/core/session/index.js +1 -0
  102. package/dist/core/session/session.schema.d.ts +6 -0
  103. package/dist/core/session/session.schema.js +6 -0
  104. package/dist/core/session.d.ts +1 -0
  105. package/dist/core/session.js +1 -0
  106. package/dist/core/settings/index.d.ts +1 -0
  107. package/dist/core/settings/index.js +1 -0
  108. package/dist/core/settings/settings.schema.d.ts +49 -0
  109. package/dist/core/settings/settings.schema.js +63 -0
  110. package/dist/core/settings.d.ts +1 -0
  111. package/dist/core/settings.js +1 -0
  112. package/dist/core/thread.schema.d.ts +28 -0
  113. package/dist/core/thread.schema.js +36 -0
  114. package/dist/core/types/collaboration-blocks.d.ts +52 -0
  115. package/dist/core/types/collaboration-blocks.js +7 -0
  116. package/dist/core/types/message-block.d.ts +270 -0
  117. package/dist/core/types/message-block.js +125 -0
  118. package/dist/core/vector-store.schema.d.ts +25 -0
  119. package/dist/core/vector-store.schema.js +35 -0
  120. package/dist/core/vocab/_namespaces.d.ts +1 -0
  121. package/dist/core/vocab/_namespaces.js +3 -0
  122. package/dist/core/vocab/chat.vocab.d.ts +16 -0
  123. package/dist/core/vocab/chat.vocab.js +22 -0
  124. package/dist/core/vocab/contact.vocab.d.ts +21 -0
  125. package/dist/core/vocab/contact.vocab.js +22 -0
  126. package/dist/core/vocab/index.d.ts +6 -0
  127. package/dist/core/vocab/index.js +6 -0
  128. package/dist/core/vocab/message.vocab.d.ts +20 -0
  129. package/dist/core/vocab/message.vocab.js +24 -0
  130. package/dist/core/vocab/sidecar.vocab.d.ts +46 -0
  131. package/dist/core/vocab/sidecar.vocab.js +47 -0
  132. package/dist/core/vocab/thread.vocab.d.ts +11 -0
  133. package/dist/core/vocab/thread.vocab.js +14 -0
  134. package/dist/core/vocab/workspace.vocab.d.ts +12 -0
  135. package/dist/core/vocab/workspace.vocab.js +13 -0
  136. package/dist/core/vocab.d.ts +1 -0
  137. package/dist/core/vocab.js +1 -0
  138. package/dist/core/workspace.schema.d.ts +35 -0
  139. package/dist/core/workspace.schema.js +106 -0
  140. package/dist/core.d.ts +1 -0
  141. package/dist/core.js +1 -0
  142. package/dist/credential.schema.d.ts +1 -0
  143. package/dist/credential.schema.js +1 -0
  144. package/dist/discovery/index.d.ts +31 -0
  145. package/dist/discovery/index.js +147 -0
  146. package/dist/discovery/models.json +2623 -0
  147. package/dist/discovery/providers.json +156 -0
  148. package/dist/discovery/types.d.ts +103 -0
  149. package/dist/discovery/types.js +12 -0
  150. package/dist/discovery/vercel.d.ts +25 -0
  151. package/dist/discovery/vercel.js +95 -0
  152. package/dist/discovery.d.ts +1 -0
  153. package/dist/discovery.js +1 -0
  154. package/dist/extension/extension.schema.d.ts +1 -0
  155. package/dist/extension/extension.schema.js +1 -0
  156. package/dist/extension/index.d.ts +1 -0
  157. package/dist/extension/index.js +1 -0
  158. package/dist/extension.d.ts +1 -0
  159. package/dist/extension.js +1 -0
  160. package/dist/favorite/favorite.schema.d.ts +1 -0
  161. package/dist/favorite/favorite.schema.js +1 -0
  162. package/dist/favorite/index.d.ts +2 -0
  163. package/dist/favorite/index.js +7 -0
  164. package/dist/favorite/starred-sync.d.ts +66 -0
  165. package/dist/favorite/starred-sync.js +156 -0
  166. package/dist/favorite.d.ts +1 -0
  167. package/dist/favorite.js +1 -0
  168. package/dist/file/file.schema.d.ts +1 -0
  169. package/dist/file/file.schema.js +1 -0
  170. package/dist/file/index.d.ts +1 -0
  171. package/dist/file/index.js +1 -0
  172. package/dist/file.d.ts +1 -0
  173. package/dist/file.js +1 -0
  174. package/dist/fixtures/contracts-chat-contact.d.ts +13 -0
  175. package/dist/fixtures/contracts-chat-contact.js +76 -0
  176. package/dist/grant.schema.d.ts +1 -0
  177. package/dist/grant.schema.js +1 -0
  178. package/dist/import/import-job.schema.d.ts +5 -0
  179. package/dist/import/import-job.schema.js +5 -0
  180. package/dist/import/index.d.ts +1 -0
  181. package/dist/import/index.js +1 -0
  182. package/dist/import.d.ts +1 -0
  183. package/dist/import.js +1 -0
  184. package/dist/inbox-notification.schema.d.ts +1 -0
  185. package/dist/inbox-notification.schema.js +1 -0
  186. package/dist/index.d.ts +41 -0
  187. package/dist/index.js +83 -0
  188. package/dist/knowledge/index.d.ts +1 -0
  189. package/dist/knowledge/index.js +1 -0
  190. package/dist/knowledge/knowledge-folder.schema.d.ts +1 -0
  191. package/dist/knowledge/knowledge-folder.schema.js +1 -0
  192. package/dist/knowledge.d.ts +1 -0
  193. package/dist/knowledge.js +1 -0
  194. package/dist/message.repository.d.ts +81 -0
  195. package/dist/message.repository.js +8 -0
  196. package/dist/message.schema.d.ts +1 -0
  197. package/dist/message.schema.js +1 -0
  198. package/dist/namespaces.d.ts +1 -0
  199. package/dist/namespaces.js +1 -0
  200. package/dist/profile.d.ts +1 -0
  201. package/dist/profile.js +1 -0
  202. package/dist/repository.d.ts +59 -0
  203. package/dist/repository.js +186 -0
  204. package/dist/schema.d.ts +1 -0
  205. package/dist/schema.js +1 -0
  206. package/dist/session/index.d.ts +1 -0
  207. package/dist/session/index.js +1 -0
  208. package/dist/session/session.schema.d.ts +1 -0
  209. package/dist/session/session.schema.js +1 -0
  210. package/dist/session.d.ts +1 -0
  211. package/dist/session.js +1 -0
  212. package/dist/settings/index.d.ts +1 -0
  213. package/dist/settings/index.js +1 -0
  214. package/dist/settings/settings.schema.d.ts +1 -0
  215. package/dist/settings/settings.schema.js +1 -0
  216. package/dist/settings.d.ts +1 -0
  217. package/dist/settings.js +1 -0
  218. package/dist/sidecar/index.d.ts +2 -0
  219. package/dist/sidecar/index.js +2 -0
  220. package/dist/sidecar/persistence-mapping.d.ts +51 -0
  221. package/dist/sidecar/persistence-mapping.js +44 -0
  222. package/dist/sidecar/sidecar-events.d.ts +632 -0
  223. package/dist/sidecar/sidecar-events.js +133 -0
  224. package/dist/thread.repository.d.ts +41 -0
  225. package/dist/thread.repository.js +8 -0
  226. package/dist/thread.schema.d.ts +1 -0
  227. package/dist/thread.schema.js +1 -0
  228. package/dist/types/collaboration-blocks.d.ts +52 -0
  229. package/dist/types/collaboration-blocks.js +7 -0
  230. package/dist/types/message-block.d.ts +270 -0
  231. package/dist/types/message-block.js +125 -0
  232. package/dist/vocab/_namespaces.d.ts +1 -0
  233. package/dist/vocab/_namespaces.js +3 -0
  234. package/dist/vocab/chat.vocab.d.ts +16 -0
  235. package/dist/vocab/chat.vocab.js +22 -0
  236. package/dist/vocab/contact.vocab.d.ts +21 -0
  237. package/dist/vocab/contact.vocab.js +22 -0
  238. package/dist/vocab/index.d.ts +6 -0
  239. package/dist/vocab/index.js +6 -0
  240. package/dist/vocab/message.vocab.d.ts +20 -0
  241. package/dist/vocab/message.vocab.js +24 -0
  242. package/dist/vocab/sidecar.vocab.d.ts +46 -0
  243. package/dist/vocab/sidecar.vocab.js +47 -0
  244. package/dist/vocab/thread.vocab.d.ts +11 -0
  245. package/dist/vocab/thread.vocab.js +14 -0
  246. package/dist/vocab/workspace.vocab.d.ts +12 -0
  247. package/dist/vocab/workspace.vocab.js +13 -0
  248. package/dist/vocab.d.ts +1 -0
  249. package/dist/vocab.js +1 -0
  250. package/dist/workspace.repository.d.ts +45 -0
  251. package/dist/workspace.repository.js +8 -0
  252. package/dist/workspace.schema.d.ts +1 -0
  253. package/dist/workspace.schema.js +1 -0
  254. package/package.json +68 -0
@@ -0,0 +1 @@
1
+ export * from './knowledge/index.js';
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Message schema (aligned with xpod).
3
+ *
4
+ * Storage structure:
5
+ * - Location: /.data/chat/{chat|id}/{yyyy}/{MM}/{dd}/messages.ttl#{id}
6
+ * - Date-based path for efficient time-range queries
7
+ * - chat and thread are canonical RDF links under drizzle-solid
8
+ * - storage partitioning derives the chat path segment from the linked chat URI
9
+ */
10
+ export declare const messageTable: import("@undefineds.co/models/_drizzle-solid/pod-table").PodTableWithColumns<import("@undefineds.co/models/_drizzle-solid/types").ResolvedColumns<{
11
+ id: import("@undefineds.co/models/_drizzle-solid/columns").PodStringColumn<false, false>;
12
+ chat: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, true, false>;
13
+ thread: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, true, false>;
14
+ maker: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, true, false>;
15
+ role: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, true, true>;
16
+ content: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, true, false>;
17
+ richContent: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
18
+ status: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, true, true>;
19
+ replacedBy: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
20
+ deletedAt: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"datetime", null, false, false>;
21
+ senderName: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
22
+ senderAvatarUrl: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
23
+ mentions: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"array", "uri", false, false>;
24
+ replyTo: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
25
+ routedBy: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
26
+ routeTargetAgentId: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
27
+ coordinationId: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
28
+ createdAt: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"datetime", null, true, true>;
29
+ updatedAt: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"datetime", null, false, false>;
30
+ }>>;
31
+ export type MessageRow = typeof messageTable.$inferSelect;
32
+ export type MessageInsert = typeof messageTable.$inferInsert;
33
+ export type MessageUpdate = typeof messageTable.$inferUpdate;
@@ -0,0 +1,49 @@
1
+ import { podTable, uri, string, text, timestamp, id } from '@undefineds.co/drizzle-solid';
2
+ import { UDFS, DCTerms, FOAF, LINX_MSG, MEETING, SCHEMA, SIOC, WF } from './namespaces.js';
3
+ import { chatTable } from './chat.schema.js';
4
+ import { threadTable } from './thread.schema.js';
5
+ /**
6
+ * Message schema (aligned with xpod).
7
+ *
8
+ * Storage structure:
9
+ * - Location: /.data/chat/{chat|id}/{yyyy}/{MM}/{dd}/messages.ttl#{id}
10
+ * - Date-based path for efficient time-range queries
11
+ * - chat and thread are canonical RDF links under drizzle-solid
12
+ * - storage partitioning derives the chat path segment from the linked chat URI
13
+ */
14
+ export const messageTable = podTable('chat_message', {
15
+ id: id('id'),
16
+ // chat is a real Chat link; subjectTemplate derives `{chat|id}` for storage.
17
+ chat: uri('chat').predicate(WF.message).notNull().link(chatTable),
18
+ // thread is a real Thread link.
19
+ thread: uri('thread').predicate(SIOC.term('has_container')).notNull().link(threadTable),
20
+ // maker is the entity URI of the message author:
21
+ // - User: their WebID (https://user.pod/profile/card#me)
22
+ // - AI: Agent URI (/.data/agents/{id}.ttl#this)
23
+ // - External: Contact URI (/.data/contacts/{id}.ttl#this)
24
+ // No reference() constraint - accepts any valid URI.
25
+ maker: uri('maker').predicate(FOAF.maker).notNull(),
26
+ role: string('role').predicate(UDFS.messageType).notNull().default('user'),
27
+ content: text('content').predicate(SIOC.content).notNull(),
28
+ richContent: text('richContent').predicate(SIOC.richContent),
29
+ status: string('status').predicate(UDFS.messageStatus).notNull().default('sent'),
30
+ replacedBy: string('replacedBy').predicate(DCTerms.isReplacedBy),
31
+ deletedAt: timestamp('deletedAt').predicate(SCHEMA.dateDeleted),
32
+ // Group message extensions
33
+ senderName: string('senderName').predicate(LINX_MSG.senderName),
34
+ senderAvatarUrl: uri('senderAvatarUrl').predicate(LINX_MSG.senderAvatarUrl),
35
+ mentions: uri('mentions').array().predicate(LINX_MSG.mentions),
36
+ replyTo: uri('replyTo').predicate(LINX_MSG.replyTo),
37
+ // Multi-AI routing
38
+ routedBy: uri('routedBy').predicate(LINX_MSG.routedBy),
39
+ routeTargetAgentId: string('routeTargetAgentId').predicate(LINX_MSG.routeTargetAgentId),
40
+ coordinationId: string('coordinationId').predicate(LINX_MSG.coordinationId),
41
+ createdAt: timestamp('createdAt').predicate(DCTerms.created).notNull().defaultNow(),
42
+ updatedAt: timestamp('updatedAt').predicate(DCTerms.modified),
43
+ }, {
44
+ base: '/.data/chat/',
45
+ sparqlEndpoint: '/.data/chat/-/sparql',
46
+ type: MEETING.Message,
47
+ namespace: UDFS,
48
+ subjectTemplate: '{chat|id}/{yyyy}/{MM}/{dd}/messages.ttl#{id}',
49
+ });
@@ -0,0 +1,176 @@
1
+ import { FOAF, VCARD, LDP } from '@inrupt/vocab-common-rdf';
2
+ type NamespaceObject = ((term: string) => string) & {
3
+ prefix: string;
4
+ uri: string;
5
+ NAMESPACE: string;
6
+ term: (name: string) => string;
7
+ } & Record<string, string>;
8
+ export { FOAF, VCARD, LDP };
9
+ export declare const DCTerms: {
10
+ PREFIX: string;
11
+ NAMESPACE: string;
12
+ PREFIX_AND_NAMESPACE: {
13
+ dcterms: string;
14
+ };
15
+ NS: (localName: string) => string;
16
+ Agent: string;
17
+ AgentClass: string;
18
+ BibliographicResource: string;
19
+ FileFormat: string;
20
+ MediaType: string;
21
+ MediaTypeOrExtent: string;
22
+ Frequency: string;
23
+ Jurisdiction: string;
24
+ LocationPeriodOrJurisdiction: string;
25
+ LicenseDocument: string;
26
+ RightsStatement: string;
27
+ LinguisticSystem: string;
28
+ Location: string;
29
+ MethodOfAccrual: string;
30
+ MethodOfInstruction: string;
31
+ PeriodOfTime: string;
32
+ PhysicalMedium: string;
33
+ PhysicalResource: string;
34
+ Policy: string;
35
+ ProvenanceStatement: string;
36
+ SizeOrDuration: string;
37
+ Standard: string;
38
+ modified: string;
39
+ publisher: string;
40
+ title: string;
41
+ hasVersion: string;
42
+ issued: string;
43
+ date: string;
44
+ description: string;
45
+ relation: string;
46
+ Box: string;
47
+ ISO3166: string;
48
+ ISO639_2: string;
49
+ ISO639_3: string;
50
+ Period: string;
51
+ Point: string;
52
+ RFC1766: string;
53
+ RFC3066: string;
54
+ RFC4646: string;
55
+ RFC5646: string;
56
+ URI: string;
57
+ W3CDTF: string;
58
+ abstract: string;
59
+ accessRights: string;
60
+ rights: string;
61
+ accrualMethod: string;
62
+ accrualPeriodicity: string;
63
+ accrualPolicy: string;
64
+ alternative: string;
65
+ audience: string;
66
+ available: string;
67
+ bibliographicCitation: string;
68
+ identifier: string;
69
+ conformsTo: string;
70
+ contributor: string;
71
+ coverage: string;
72
+ created: string;
73
+ creator: string;
74
+ dateAccepted: string;
75
+ dateCopyrighted: string;
76
+ dateSubmitted: string;
77
+ educationLevel: string;
78
+ extent: string;
79
+ format: string;
80
+ hasFormat: string;
81
+ hasPart: string;
82
+ instructionalMethod: string;
83
+ isFormatOf: string;
84
+ isPartOf: string;
85
+ isReferencedBy: string;
86
+ isReplacedBy: string;
87
+ isRequiredBy: string;
88
+ isVersionOf: string;
89
+ language: string;
90
+ license: string;
91
+ mediator: string;
92
+ medium: string;
93
+ provenance: string;
94
+ references: string;
95
+ replaces: string;
96
+ requires: string;
97
+ rightsHolder: string;
98
+ source: string;
99
+ spatial: string;
100
+ subject: string;
101
+ tableOfContents: string;
102
+ temporal: string;
103
+ type: string;
104
+ valid: string;
105
+ };
106
+ export declare const RDF: {
107
+ PREFIX: string;
108
+ NAMESPACE: string;
109
+ PREFIX_AND_NAMESPACE: {
110
+ rdf: string;
111
+ };
112
+ NS: (localName: string) => string;
113
+ Property: string;
114
+ HTML: string;
115
+ langString: string;
116
+ PlainLiteral: string;
117
+ Statement: string;
118
+ Bag: string;
119
+ Seq: string;
120
+ Alt: string;
121
+ List: string;
122
+ XMLLiteral: string;
123
+ JSON: string;
124
+ CompoundLiteral: string;
125
+ type: string;
126
+ subject: string;
127
+ predicate: string;
128
+ object: string;
129
+ value: string;
130
+ nil: string;
131
+ first: string;
132
+ rest: string;
133
+ language: string;
134
+ direction: string;
135
+ };
136
+ export declare const ACL: {
137
+ PREFIX: string;
138
+ NAMESPACE: string;
139
+ PREFIX_AND_NAMESPACE: {
140
+ acl: string;
141
+ };
142
+ NS: (localName: string) => string;
143
+ Access: string;
144
+ Append: string;
145
+ Write: string;
146
+ AuthenticatedAgent: string;
147
+ Authorization: string;
148
+ Control: string;
149
+ Origin: string;
150
+ Read: string;
151
+ accessControl: string;
152
+ accessTo: string;
153
+ accessToClass: string;
154
+ agent: string;
155
+ agentClass: string;
156
+ agentGroup: string;
157
+ default: string;
158
+ defaultForNew: string;
159
+ delegates: string;
160
+ mode: string;
161
+ origin: string;
162
+ owner: string;
163
+ };
164
+ export declare const ODRL: NamespaceObject;
165
+ export declare const RDFS: NamespaceObject;
166
+ export declare const OWL: NamespaceObject;
167
+ export declare const SCHEMA: NamespaceObject;
168
+ export declare const SIOC: NamespaceObject;
169
+ export declare const MEETING: NamespaceObject;
170
+ export declare const WF: NamespaceObject;
171
+ export declare const AS: NamespaceObject;
172
+ export declare const UDFS: NamespaceObject;
173
+ export declare const UDFS_NAMESPACE: string;
174
+ export declare const LINQ: NamespaceObject;
175
+ export declare const LINX_CHAT: NamespaceObject;
176
+ export declare const LINX_MSG: NamespaceObject;
@@ -0,0 +1,289 @@
1
+ import { FOAF, VCARD, LDP, DCTERMS, RDF as RDF_VOCAB, ACL as ACL_VOCAB } from '@inrupt/vocab-common-rdf';
2
+ const ABSOLUTE_IRI = /^[a-zA-Z][a-zA-Z\d+.-]*:/;
3
+ const createNamespace = (prefix, baseUri, terms) => {
4
+ const builder = ((term) => ABSOLUTE_IRI.test(term) ? term : `${baseUri}${term}`);
5
+ builder.prefix = prefix;
6
+ builder.uri = baseUri;
7
+ builder.NAMESPACE = baseUri;
8
+ builder.term = (name) => builder(name);
9
+ Object.entries(terms).forEach(([key, local]) => {
10
+ Object.defineProperty(builder, key, {
11
+ value: builder(local),
12
+ enumerable: true,
13
+ });
14
+ });
15
+ return builder;
16
+ };
17
+ export { FOAF, VCARD, LDP };
18
+ export const DCTerms = DCTERMS;
19
+ export const RDF = RDF_VOCAB;
20
+ export const ACL = ACL_VOCAB;
21
+ // ODRL isn't provided as a NamespaceConfig-compatible builder in vocab-common-rdf.
22
+ // We define a small namespace builder to keep drizzle-solid happy.
23
+ export const ODRL = createNamespace('odrl', 'http://www.w3.org/ns/odrl/2/', {
24
+ Policy: 'Policy',
25
+ target: 'target',
26
+ action: 'action',
27
+ });
28
+ export const RDFS = createNamespace('rdfs', 'http://www.w3.org/2000/01/rdf-schema#', {
29
+ Class: 'Class',
30
+ label: 'label',
31
+ comment: 'comment',
32
+ subClassOf: 'subClassOf',
33
+ domain: 'domain',
34
+ range: 'range',
35
+ });
36
+ export const OWL = createNamespace('owl', 'http://www.w3.org/2002/07/owl#', {
37
+ Ontology: 'Ontology',
38
+ Class: 'Class',
39
+ ObjectProperty: 'ObjectProperty',
40
+ DatatypeProperty: 'DatatypeProperty',
41
+ });
42
+ export const SCHEMA = createNamespace('schema', 'http://schema.org/', {
43
+ CreativeWork: 'CreativeWork',
44
+ MediaObject: 'MediaObject',
45
+ PropertyValue: 'PropertyValue',
46
+ author: 'author',
47
+ dateCreated: 'dateCreated',
48
+ dateDeleted: 'dateDeleted',
49
+ description: 'description',
50
+ encodingFormat: 'encodingFormat',
51
+ fileSize: 'fileSize',
52
+ image: 'image',
53
+ name: 'name',
54
+ participant: 'participant',
55
+ text: 'text',
56
+ url: 'url',
57
+ });
58
+ export const SIOC = createNamespace('sioc', 'http://rdfs.org/sioc/ns#', {
59
+ Post: 'Post',
60
+ Thread: 'Thread',
61
+ Forum: 'Forum',
62
+ content: 'content',
63
+ richContent: 'richContent',
64
+ hasReply: 'has_reply',
65
+ replyOf: 'reply_of',
66
+ hasCreator: 'has_creator',
67
+ createdAt: 'created_at',
68
+ hasContainer: 'has_container',
69
+ has_parent: 'has_parent',
70
+ numReplies: 'num_replies',
71
+ has_member: 'has_member',
72
+ });
73
+ export const MEETING = createNamespace('mee', 'http://www.w3.org/ns/pim/meeting#', {
74
+ LongChat: 'LongChat',
75
+ Message: 'Message',
76
+ });
77
+ export const WF = createNamespace('wf', 'http://www.w3.org/2005/01/wf/flow-1.0#', {
78
+ message: 'message',
79
+ participation: 'participation',
80
+ participant: 'participant',
81
+ });
82
+ // Activity Streams 2.0 - W3C standard for social web
83
+ export const AS = createNamespace('as', 'https://www.w3.org/ns/activitystreams#', {
84
+ Announce: 'Announce',
85
+ Public: 'Public',
86
+ audience: 'audience',
87
+ actor: 'actor',
88
+ object: 'object',
89
+ });
90
+ // Company-level namespace (community-first guidance): all custom terms live under udfs:.
91
+ // NOTE: This base URI is part of the contract.
92
+ export const UDFS = createNamespace('udfs', 'https://undefineds.co/ns#', {
93
+ // Types
94
+ ApprovalRequest: 'ApprovalRequest',
95
+ AuditEntry: 'AuditEntry',
96
+ AutonomyGrant: 'AutonomyGrant',
97
+ Credential: 'Credential',
98
+ ApiKeyCredential: 'ApiKeyCredential',
99
+ OAuthCredential: 'OAuthCredential',
100
+ Provider: 'Provider',
101
+ Model: 'Model',
102
+ AgentProvider: 'AgentProvider',
103
+ AgentConfig: 'AgentConfig',
104
+ AgentStatus: 'AgentStatus',
105
+ AIConfig: 'AIConfig',
106
+ VectorStore: 'VectorStore',
107
+ IndexedFile: 'IndexedFile',
108
+ Workspace: 'Workspace',
109
+ favorite: 'favorite',
110
+ favoriteType: 'favoriteType',
111
+ favoriteTarget: 'favoriteTarget',
112
+ favoredAt: 'favoredAt',
113
+ conversation: 'conversation',
114
+ conversationType: 'conversationType',
115
+ conversationTitle: 'conversationTitle',
116
+ lastMessage: 'lastMessage',
117
+ lastActiveAt: 'lastActiveAt',
118
+ lastSyncedAt: 'lastSyncedAt',
119
+ sortKey: 'sortKey',
120
+ hasThread: 'hasThread',
121
+ inThread: 'inThread',
122
+ participants: 'participants',
123
+ messageContent: 'messageContent',
124
+ messageType: 'messageType',
125
+ messageStatus: 'messageStatus',
126
+ readBy: 'readBy',
127
+ Contact: 'Contact',
128
+ PersonContact: 'PersonContact',
129
+ AgentContact: 'AgentContact',
130
+ GroupContact: 'GroupContact',
131
+ hasContact: 'hasContact',
132
+ contactType: 'contactType',
133
+ entityUri: 'entityUri',
134
+ externalPlatform: 'externalPlatform',
135
+ externalId: 'externalId',
136
+ alias: 'alias',
137
+ aiAssistant: 'aiAssistant',
138
+ aiModel: 'aiModel',
139
+ aiModels: 'aiModels',
140
+ aiProvider: 'aiProvider',
141
+ credential: 'credential',
142
+ systemPrompt: 'systemPrompt',
143
+ temperature: 'temperature',
144
+ maxTokens: 'maxTokens',
145
+ systemMessage: 'systemMessage',
146
+ provider: 'provider',
147
+ model: 'model',
148
+ metadata: 'metadata',
149
+ tools: 'tools',
150
+ contextWindow: 'contextWindow',
151
+ contextRound: 'contextRound',
152
+ Agent: 'Agent',
153
+ agentCapability: 'agentCapability',
154
+ agentTool: 'agentTool',
155
+ agentConfig: 'agentConfig',
156
+ fileHash: 'fileHash',
157
+ syncStatus: 'syncStatus',
158
+ localPath: 'localPath',
159
+ isDefault: 'isDefault',
160
+ settingKey: 'settingKey',
161
+ settingValue: 'settingValue',
162
+ settingType: 'settingType',
163
+ apiKey: 'apiKey',
164
+ oauthRefreshToken: 'oauthRefreshToken',
165
+ oauthAccessToken: 'oauthAccessToken',
166
+ oauthExpiresAt: 'oauthExpiresAt',
167
+ baseUrl: 'baseUrl',
168
+ proxyUrl: 'proxyUrl',
169
+ projectId: 'projectId',
170
+ organizationId: 'organizationId',
171
+ service: 'service',
172
+ label: 'label',
173
+ name: 'name',
174
+ displayName: 'displayName',
175
+ description: 'description',
176
+ enabled: 'enabled',
177
+ createdAt: 'createdAt',
178
+ updatedAt: 'updatedAt',
179
+ lastUsedAt: 'lastUsedAt',
180
+ failCount: 'failCount',
181
+ rateLimitResetAt: 'rateLimitResetAt',
182
+ hasModel: 'hasModel',
183
+ hasCredential: 'hasCredential',
184
+ modelType: 'modelType',
185
+ isProvidedBy: 'isProvidedBy',
186
+ dimension: 'dimension',
187
+ contextLength: 'contextLength',
188
+ maxOutputTokens: 'maxOutputTokens',
189
+ embeddingModel: 'embeddingModel',
190
+ previousModel: 'previousModel',
191
+ migrationStatus: 'migrationStatus',
192
+ migrationProgress: 'migrationProgress',
193
+ defaultModel: 'defaultModel',
194
+ runtimeKind: 'runtimeKind',
195
+ executorType: 'executorType',
196
+ maxTurns: 'maxTurns',
197
+ timeout: 'timeout',
198
+ agentId: 'agentId',
199
+ startedAt: 'startedAt',
200
+ completedAt: 'completedAt',
201
+ lastActivityAt: 'lastActivityAt',
202
+ currentTaskId: 'currentTaskId',
203
+ errorMessage: 'errorMessage',
204
+ container: 'container',
205
+ chunkingStrategy: 'chunkingStrategy',
206
+ fileUrl: 'fileUrl',
207
+ vectorId: 'vectorId',
208
+ usageBytes: 'usageBytes',
209
+ lastError: 'lastError',
210
+ indexedAt: 'indexedAt',
211
+ inbox: 'inbox',
212
+ session: 'session',
213
+ status: 'status',
214
+ risk: 'risk',
215
+ assignedTo: 'assignedTo',
216
+ reason: 'reason',
217
+ resolvedAt: 'resolvedAt',
218
+ action: 'action',
219
+ actor: 'actor',
220
+ actorRole: 'actorRole',
221
+ context: 'context',
222
+ policy: 'policy',
223
+ approval: 'approval',
224
+ effect: 'effect',
225
+ riskCeiling: 'riskCeiling',
226
+ revokedAt: 'revokedAt',
227
+ archivedAt: 'archivedAt',
228
+ deletedAt: 'deletedAt',
229
+ pinnedAt: 'pinnedAt',
230
+ pinned: 'pinned',
231
+ muted: 'muted',
232
+ mutedAt: 'mutedAt',
233
+ unreadCount: 'unreadCount',
234
+ ttsModel: 'ttsModel',
235
+ videoModel: 'videoModel',
236
+ workspace: 'workspace',
237
+ workspaceType: 'workspaceType',
238
+ workspaceKind: 'workspaceKind',
239
+ rootUri: 'rootUri',
240
+ repoRootUri: 'repoRootUri',
241
+ baseRef: 'baseRef',
242
+ branch: 'branch',
243
+ policyRef: 'policyRef',
244
+ policyVersion: 'policyVersion',
245
+ parentThreadId: 'parentThreadId',
246
+ sessionStatus: 'sessionStatus',
247
+ sessionTool: 'sessionTool',
248
+ tokenUsage: 'tokenUsage',
249
+ groupOwner: 'groupOwner',
250
+ groupAdmin: 'groupAdmin',
251
+ senderName: 'senderName',
252
+ senderAvatarUrl: 'senderAvatarUrl',
253
+ mentions: 'mentions',
254
+ replyTo: 'replyTo',
255
+ routedBy: 'routedBy',
256
+ routeTargetAgentId: 'routeTargetAgentId',
257
+ coordinationId: 'coordinationId',
258
+ toolCallId: 'toolCallId',
259
+ toolName: 'toolName',
260
+ toolArguments: 'toolArguments',
261
+ toolStatus: 'toolStatus',
262
+ toolResult: 'toolResult',
263
+ toolError: 'toolError',
264
+ toolDuration: 'toolDuration',
265
+ toolRisk: 'toolRisk',
266
+ approvalStatus: 'approvalStatus',
267
+ decisionBy: 'decisionBy',
268
+ decisionRole: 'decisionRole',
269
+ onBehalfOf: 'onBehalfOf',
270
+ approvalReason: 'approvalReason',
271
+ inboxItemId: 'inboxItemId',
272
+ taskProgressId: 'taskProgressId',
273
+ taskSteps: 'taskSteps',
274
+ currentStep: 'currentStep',
275
+ totalSteps: 'totalSteps',
276
+ // Favorites V2
277
+ sourceModule: 'sourceModule',
278
+ sourceId: 'sourceId',
279
+ searchText: 'searchText',
280
+ snapshotMeta: 'snapshotMeta',
281
+ });
282
+ export const UDFS_NAMESPACE = UDFS.NAMESPACE;
283
+ // Legacy alias: existing code may still import LINQ.
284
+ // Keep as alias to avoid churn.
285
+ export const LINQ = UDFS;
286
+ // Wave A contracts: unified under company namespace (UDFS).
287
+ // Keep legacy names as aliases to avoid downstream churn.
288
+ export const LINX_CHAT = UDFS;
289
+ export const LINX_MSG = UDFS;
@@ -0,0 +1,16 @@
1
+ export declare const solidProfileTable: import("@undefineds.co/models/_drizzle-solid/pod-table").PodTableWithColumns<import("@undefineds.co/models/_drizzle-solid/types").ResolvedColumns<{
2
+ id: import("@undefineds.co/models/_drizzle-solid/columns").PodStringColumn<false, false>;
3
+ name: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
4
+ nick: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
5
+ avatar: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
6
+ note: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
7
+ email: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
8
+ phone: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
9
+ region: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
10
+ gender: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
11
+ favorite: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
12
+ inbox: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
13
+ }>>;
14
+ export type SolidProfileRow = typeof solidProfileTable.$inferSelect;
15
+ export type SolidProfileInsert = typeof solidProfileTable.$inferInsert;
16
+ export type SolidProfileUpdate = typeof solidProfileTable.$inferUpdate;
@@ -0,0 +1,19 @@
1
+ import { podTable, string, id } from "@undefineds.co/drizzle-solid";
2
+ import { UDFS, VCARD, FOAF, LDP } from "./namespaces.js";
3
+ export const solidProfileTable = podTable("profile", {
4
+ id: id('id'),
5
+ name: string("name").predicate(VCARD.fn),
6
+ nick: string("nick").predicate(FOAF.nick),
7
+ avatar: string("avatar").predicate(VCARD.hasPhoto),
8
+ note: string("note").predicate(VCARD.note),
9
+ email: string("email").predicate(VCARD.hasEmail),
10
+ phone: string("phone").predicate(VCARD.hasTelephone),
11
+ region: string("region").predicate(VCARD.region),
12
+ gender: string("gender").predicate(VCARD.hasGender),
13
+ favorite: string("favorite").predicate(UDFS.favorite),
14
+ inbox: string("inbox").predicate(LDP.inbox)
15
+ }, {
16
+ base: "idp:///profile/card",
17
+ type: FOAF.Person,
18
+ namespace: UDFS,
19
+ });