@undefineds.co/models 0.2.0 → 0.2.2

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 (241) hide show
  1. package/README.md +515 -125
  2. package/dist/agent.repository.d.ts +20 -40
  3. package/dist/agent.schema.d.ts +20 -1
  4. package/dist/agent.schema.js +25 -1
  5. package/dist/ai-config/index.d.ts +8 -6
  6. package/dist/ai-config/index.js +41 -23
  7. package/dist/ai-model.schema.d.ts +13 -1
  8. package/dist/ai-model.schema.js +17 -1
  9. package/dist/ai-provider.schema.d.ts +9 -1
  10. package/dist/ai-provider.schema.js +13 -1
  11. package/dist/approval.schema.d.ts +21 -1
  12. package/dist/approval.schema.js +33 -1
  13. package/dist/audit.schema.d.ts +17 -1
  14. package/dist/audit.schema.js +29 -1
  15. package/dist/chat.repository.d.ts +19 -15
  16. package/dist/chat.schema.d.ts +37 -1
  17. package/dist/chat.schema.js +47 -1
  18. package/dist/client/index.d.ts +121 -0
  19. package/dist/client/index.js +299 -0
  20. package/dist/contact.repository.d.ts +21 -21
  21. package/dist/contact.schema.d.ts +48 -1
  22. package/dist/contact.schema.js +60 -1
  23. package/dist/credential.schema.d.ts +15 -1
  24. package/dist/credential.schema.js +19 -1
  25. package/dist/discovery/index.d.ts +2 -2
  26. package/dist/discovery/index.js +2 -2
  27. package/dist/extension/extension.schema.d.ts +4 -1
  28. package/dist/extension/extension.schema.js +11 -1
  29. package/dist/extension/index.d.ts +1 -1
  30. package/dist/favorite/favorite.schema.d.ts +24 -1
  31. package/dist/favorite/favorite.schema.js +34 -1
  32. package/dist/favorite/index.d.ts +2 -2
  33. package/dist/file/file.schema.d.ts +39 -1
  34. package/dist/file/file.schema.js +51 -1
  35. package/dist/file/index.d.ts +1 -1
  36. package/dist/fixtures/contracts-chat-contact.d.ts +8 -8
  37. package/dist/fixtures/contracts-chat-contact.js +5 -9
  38. package/dist/grant.schema.d.ts +16 -1
  39. package/dist/grant.schema.js +29 -1
  40. package/dist/import/index.d.ts +1 -1
  41. package/dist/inbox-notification.schema.d.ts +9 -1
  42. package/dist/inbox-notification.schema.js +16 -1
  43. package/dist/index.d.ts +42 -43
  44. package/dist/index.js +27 -26
  45. package/dist/knowledge/index.d.ts +1 -1
  46. package/dist/knowledge/knowledge-folder.schema.d.ts +7 -1
  47. package/dist/knowledge/knowledge-folder.schema.js +6 -1
  48. package/dist/message.repository.d.ts +20 -20
  49. package/dist/message.schema.d.ts +32 -1
  50. package/dist/message.schema.js +47 -1
  51. package/dist/namespaces.d.ts +178 -1
  52. package/dist/namespaces.js +253 -1
  53. package/dist/profile.d.ts +22 -1
  54. package/dist/profile.js +88 -1
  55. package/dist/profile.repository.d.ts +105 -0
  56. package/dist/profile.repository.js +47 -0
  57. package/dist/profile.schema.d.ts +16 -0
  58. package/dist/{core/profile.js → profile.schema.js} +4 -4
  59. package/dist/repository.d.ts +49 -9
  60. package/dist/repository.js +49 -46
  61. package/dist/schema.d.ts +244 -1
  62. package/dist/schema.js +37 -1
  63. package/dist/session/index.d.ts +1 -1
  64. package/dist/session/index.js +1 -1
  65. package/dist/session/session.schema.d.ts +43 -1
  66. package/dist/session/session.schema.js +46 -1
  67. package/dist/session.repository.d.ts +61 -0
  68. package/dist/session.repository.js +8 -0
  69. package/dist/settings/index.d.ts +1 -1
  70. package/dist/settings/settings.schema.d.ts +49 -1
  71. package/dist/settings/settings.schema.js +63 -1
  72. package/dist/{governance/runtime-projections.d.ts → sidecar/persistence-mapping.d.ts} +7 -7
  73. package/dist/{governance/runtime-projections.js → sidecar/persistence-mapping.js} +7 -1
  74. package/dist/{protocols/runtime-events.d.ts → sidecar/sidecar-events.d.ts} +35 -35
  75. package/dist/{protocols/runtime-events.js → sidecar/sidecar-events.js} +21 -4
  76. package/dist/thread.repository.d.ts +15 -19
  77. package/dist/thread.schema.d.ts +30 -1
  78. package/dist/thread.schema.js +39 -1
  79. package/dist/{core/types/collaboration-rich-content.d.ts → types/collaboration-blocks.d.ts} +7 -7
  80. package/dist/types/collaboration-blocks.js +7 -0
  81. package/dist/types/message-block.d.ts +270 -0
  82. package/dist/types/message-block.js +125 -0
  83. package/dist/vocab/_namespaces.d.ts +1 -1
  84. package/dist/vocab/index.d.ts +5 -6
  85. package/dist/vocab/index.js +0 -1
  86. package/dist/vocab/message.vocab.js +1 -1
  87. package/dist/vocab/thread.vocab.d.ts +1 -2
  88. package/dist/vocab/thread.vocab.js +2 -3
  89. package/dist/watch/index.d.ts +226 -0
  90. package/dist/watch/index.js +1156 -0
  91. package/package.json +41 -39
  92. package/dist/_drizzle-solid/columns.d.ts +0 -37
  93. package/dist/_drizzle-solid/columns.js +0 -1
  94. package/dist/_drizzle-solid/pod-table.d.ts +0 -3
  95. package/dist/_drizzle-solid/pod-table.js +0 -1
  96. package/dist/_drizzle-solid/types.d.ts +0 -40
  97. package/dist/_drizzle-solid/types.js +0 -1
  98. package/dist/ai-config.d.ts +0 -1
  99. package/dist/ai-config.js +0 -1
  100. package/dist/chat.utils.d.ts +0 -3
  101. package/dist/chat.utils.js +0 -30
  102. package/dist/core/agent-provider.schema.d.ts +0 -1
  103. package/dist/core/agent-provider.schema.js +0 -1
  104. package/dist/core/agent-status.schema.d.ts +0 -12
  105. package/dist/core/agent-status.schema.js +0 -18
  106. package/dist/core/agent.schema.d.ts +0 -72
  107. package/dist/core/agent.schema.js +0 -38
  108. package/dist/core/ai-config.schema.d.ts +0 -11
  109. package/dist/core/ai-config.schema.js +0 -18
  110. package/dist/core/ai-model.schema.d.ts +0 -15
  111. package/dist/core/ai-model.schema.js +0 -21
  112. package/dist/core/ai-provider.schema.d.ts +0 -16
  113. package/dist/core/ai-provider.schema.js +0 -28
  114. package/dist/core/approval.schema.d.ts +0 -21
  115. package/dist/core/approval.schema.js +0 -33
  116. package/dist/core/audit.schema.d.ts +0 -17
  117. package/dist/core/audit.schema.js +0 -29
  118. package/dist/core/chat.schema.d.ts +0 -36
  119. package/dist/core/chat.schema.js +0 -45
  120. package/dist/core/contact.schema.d.ts +0 -47
  121. package/dist/core/contact.schema.js +0 -59
  122. package/dist/core/credential.schema.d.ts +0 -56
  123. package/dist/core/credential.schema.js +0 -40
  124. package/dist/core/extension/extension.schema.d.ts +0 -4
  125. package/dist/core/extension/extension.schema.js +0 -11
  126. package/dist/core/extension/index.d.ts +0 -1
  127. package/dist/core/extension/index.js +0 -1
  128. package/dist/core/extension.d.ts +0 -1
  129. package/dist/core/extension.js +0 -1
  130. package/dist/core/favorite/favorite.schema.d.ts +0 -24
  131. package/dist/core/favorite/favorite.schema.js +0 -34
  132. package/dist/core/favorite/index.d.ts +0 -1
  133. package/dist/core/favorite/index.js +0 -1
  134. package/dist/core/file/file.schema.d.ts +0 -39
  135. package/dist/core/file/file.schema.js +0 -51
  136. package/dist/core/file/index.d.ts +0 -1
  137. package/dist/core/file/index.js +0 -1
  138. package/dist/core/file.d.ts +0 -1
  139. package/dist/core/file.js +0 -1
  140. package/dist/core/grant.schema.d.ts +0 -16
  141. package/dist/core/grant.schema.js +0 -29
  142. package/dist/core/import/import-job.schema.d.ts +0 -5
  143. package/dist/core/import/import-job.schema.js +0 -5
  144. package/dist/core/import/index.d.ts +0 -1
  145. package/dist/core/import/index.js +0 -1
  146. package/dist/core/import.d.ts +0 -1
  147. package/dist/core/import.js +0 -1
  148. package/dist/core/inbox-notification.schema.d.ts +0 -9
  149. package/dist/core/inbox-notification.schema.js +0 -16
  150. package/dist/core/index.d.ts +0 -31
  151. package/dist/core/index.js +0 -32
  152. package/dist/core/knowledge/index.d.ts +0 -1
  153. package/dist/core/knowledge/index.js +0 -1
  154. package/dist/core/knowledge/knowledge-folder.schema.d.ts +0 -7
  155. package/dist/core/knowledge/knowledge-folder.schema.js +0 -6
  156. package/dist/core/knowledge.d.ts +0 -1
  157. package/dist/core/knowledge.js +0 -1
  158. package/dist/core/message.schema.d.ts +0 -33
  159. package/dist/core/message.schema.js +0 -49
  160. package/dist/core/namespaces.d.ts +0 -176
  161. package/dist/core/namespaces.js +0 -289
  162. package/dist/core/profile.d.ts +0 -16
  163. package/dist/core/schema.d.ts +0 -304
  164. package/dist/core/schema.js +0 -46
  165. package/dist/core/session/index.d.ts +0 -1
  166. package/dist/core/session/index.js +0 -1
  167. package/dist/core/session/session.schema.d.ts +0 -6
  168. package/dist/core/session/session.schema.js +0 -6
  169. package/dist/core/session.d.ts +0 -1
  170. package/dist/core/session.js +0 -1
  171. package/dist/core/settings/index.d.ts +0 -1
  172. package/dist/core/settings/index.js +0 -1
  173. package/dist/core/settings/settings.schema.d.ts +0 -49
  174. package/dist/core/settings/settings.schema.js +0 -63
  175. package/dist/core/settings.d.ts +0 -1
  176. package/dist/core/settings.js +0 -1
  177. package/dist/core/thread.schema.d.ts +0 -28
  178. package/dist/core/thread.schema.js +0 -36
  179. package/dist/core/types/collaboration-rich-content.js +0 -7
  180. package/dist/core/types/message-rich-content.d.ts +0 -121
  181. package/dist/core/types/message-rich-content.js +0 -85
  182. package/dist/core/vector-store.schema.d.ts +0 -25
  183. package/dist/core/vector-store.schema.js +0 -35
  184. package/dist/core/vocab/_namespaces.d.ts +0 -1
  185. package/dist/core/vocab/_namespaces.js +0 -3
  186. package/dist/core/vocab/chat.vocab.d.ts +0 -16
  187. package/dist/core/vocab/chat.vocab.js +0 -22
  188. package/dist/core/vocab/contact.vocab.d.ts +0 -21
  189. package/dist/core/vocab/contact.vocab.js +0 -22
  190. package/dist/core/vocab/index.d.ts +0 -6
  191. package/dist/core/vocab/index.js +0 -6
  192. package/dist/core/vocab/message.vocab.d.ts +0 -20
  193. package/dist/core/vocab/message.vocab.js +0 -24
  194. package/dist/core/vocab/thread.vocab.d.ts +0 -11
  195. package/dist/core/vocab/thread.vocab.js +0 -14
  196. package/dist/core/vocab/workspace.vocab.d.ts +0 -12
  197. package/dist/core/vocab/workspace.vocab.js +0 -13
  198. package/dist/core/vocab.d.ts +0 -1
  199. package/dist/core/vocab.js +0 -1
  200. package/dist/core/workspace.schema.d.ts +0 -35
  201. package/dist/core/workspace.schema.js +0 -106
  202. package/dist/core.d.ts +0 -1
  203. package/dist/core.js +0 -1
  204. package/dist/discovery/vercel.d.ts +0 -25
  205. package/dist/discovery/vercel.js +0 -95
  206. package/dist/discovery.d.ts +0 -1
  207. package/dist/discovery.js +0 -1
  208. package/dist/extension.d.ts +0 -1
  209. package/dist/extension.js +0 -1
  210. package/dist/favorite.d.ts +0 -1
  211. package/dist/favorite.js +0 -1
  212. package/dist/file.d.ts +0 -1
  213. package/dist/file.js +0 -1
  214. package/dist/governance/index.d.ts +0 -1
  215. package/dist/governance/index.js +0 -1
  216. package/dist/import.d.ts +0 -1
  217. package/dist/import.js +0 -1
  218. package/dist/knowledge.d.ts +0 -1
  219. package/dist/knowledge.js +0 -1
  220. package/dist/protocols/index.d.ts +0 -1
  221. package/dist/protocols/index.js +0 -1
  222. package/dist/session.d.ts +0 -1
  223. package/dist/session.js +0 -1
  224. package/dist/settings.d.ts +0 -1
  225. package/dist/settings.js +0 -1
  226. package/dist/types/collaboration-rich-content.d.ts +0 -52
  227. package/dist/types/collaboration-rich-content.js +0 -7
  228. package/dist/types/message-rich-content.d.ts +0 -121
  229. package/dist/types/message-rich-content.js +0 -85
  230. package/dist/vocab/governance.vocab.d.ts +0 -46
  231. package/dist/vocab/governance.vocab.js +0 -47
  232. package/dist/vocab/workspace.vocab.d.ts +0 -12
  233. package/dist/vocab/workspace.vocab.js +0 -13
  234. package/dist/vocab.d.ts +0 -1
  235. package/dist/vocab.js +0 -1
  236. package/dist/workspace.repository.d.ts +0 -45
  237. package/dist/workspace.repository.js +0 -8
  238. package/dist/workspace.schema.d.ts +0 -1
  239. package/dist/workspace.schema.js +0 -1
  240. /package/dist/{core/vocab/governance.vocab.d.ts → vocab/sidecar.vocab.d.ts} +0 -0
  241. /package/dist/{core/vocab/governance.vocab.js → vocab/sidecar.vocab.js} +0 -0
@@ -1,16 +0,0 @@
1
- import { podTable, uri, timestamp, id } from '@undefineds.co/drizzle-solid';
2
- import { AS, DCTerms } from './namespaces.js';
3
- // Solid inbox notifications (protocol channel)
4
- export const inboxNotificationTable = podTable('inbox_notification', {
5
- id: id('id'),
6
- // Standard ActivityStreams envelope
7
- actor: uri('actor').predicate(AS.actor),
8
- object: uri('object').predicate(AS.object).notNull(),
9
- createdAt: timestamp('createdAt').predicate(DCTerms.created).notNull().defaultNow(),
10
- }, {
11
- base: '/inbox/',
12
- sparqlEndpoint: '/inbox/-/sparql',
13
- type: AS.Announce,
14
- namespace: AS,
15
- subjectTemplate: '{id}.ttl',
16
- });
@@ -1,31 +0,0 @@
1
- export { LINQ, UDFS, UDFS_NAMESPACE, LINX_CHAT, LINX_MSG, SIOC, DCTerms, SCHEMA, RDF, RDFS, ACL, ODRL, OWL, FOAF, MEETING, AS, VCARD, WF, LDP, } from './namespaces.js';
2
- export * from './vocab.js';
3
- export * from './profile.js';
4
- export { contactTable, ContactClass, ContactType, isAgentContact, isGroupContact, type ContactRow, type ContactInsert, type ContactUpdate, type ContactClassValue, type ContactTypeValue, } from './contact.schema.js';
5
- export { chatTable, type ChatMetadata, type ChatMemberRole, type ChatRow, type ChatInsert, type ChatUpdate, } from './chat.schema.js';
6
- export { threadTable, type ThreadRow, type ThreadInsert, type ThreadUpdate, } from './thread.schema.js';
7
- export { workspaceTable, WORKSPACE_TYPES, WORKSPACE_KINDS, getWorkspaceContainerPath, resolveWorkspaceContainerUri, parseWorkspaceIdFromContainerUri, normalizeLocalWorkspacePath, buildLocalWorkspaceUri, parseLocalWorkspaceUri, isLocalWorkspaceUri, type WorkspaceType, type WorkspaceKind, type WorkspaceRow, type WorkspaceInsert, type WorkspaceUpdate, } from './workspace.schema.js';
8
- export { messageTable, type MessageRow, type MessageInsert, type MessageUpdate, } from './message.schema.js';
9
- export { RichContentItemType, type RichContentModelRef, type BaseRichContentItem, type MainTextRichContentItem, type ThinkingRichContentItem, type ImageRichContentItem, type CodeRichContentItem, type FileRichContentItem, type ErrorRichContentItem, type CitationRichContentItem, type MessageRichContentItem, type MessageRichContent, type LegacyToolInvocation, createRichContentItem, isRichContentItemType, parseMessageRichContent, parseMessageRichContentItems, serializeMessageRichContent, serializeMessageRichContentItems, } from './types/message-rich-content.js';
10
- export { type ToolApprovalRichContentItem, type ToolCallRichContentItem, type TaskProgressRichContentItem, type CollaborationRichContentItem, type ToolRisk, type ToolApprovalStatus, type ToolCallStatus, type TaskProgressStepStatus, } from './types/collaboration-rich-content.js';
11
- export { fileTable, type FileRow, type FileInsert, type FileUpdate } from './file.js';
12
- export { favoriteTable, type FavoriteRow, type FavoriteInsert, type FavoriteUpdate, } from './favorite/favorite.schema.js';
13
- export { settingsTable, SETTING_KEYS, type SettingKey, type SettingsRow, type SettingsInsert, type SettingsUpdate, } from './settings.js';
14
- export { createAgentSchema, agentSchema, agentTable, type AgentRow, type AgentInsert, type AgentUpdate, type CreateAgentSchemaOptions, } from './agent.schema.js';
15
- export { approvalTable, type ApprovalRow, type ApprovalInsert, type ApprovalUpdate, } from './approval.schema.js';
16
- export { auditTable, type AuditRow, type AuditInsert, type AuditUpdate, } from './audit.schema.js';
17
- export { grantTable, type GrantRow, type GrantInsert, type GrantUpdate, } from './grant.schema.js';
18
- export { inboxNotificationTable, type InboxNotificationRow, type InboxNotificationInsert, type InboxNotificationUpdate, } from './inbox-notification.schema.js';
19
- export { ApprovalVocab, AuditVocab, GrantVocab, InboxNotificationVocab } from './vocab/governance.vocab.js';
20
- export { knowledgeFolderSchema, type KnowledgeFolderScope, } from './knowledge.js';
21
- export { extensionSchema } from './extension.js';
22
- export { sessionSchema } from './session.js';
23
- export { importJobSchema } from './import.js';
24
- export { credentialTable, apiKeyCredentialTable, oauthCredentialTable, type CredentialRow, type CredentialInsert, type CredentialUpdate, type ApiKeyCredentialRow, type ApiKeyCredentialInsert, type ApiKeyCredentialUpdate, type OAuthCredentialRow, type OAuthCredentialInsert, type OAuthCredentialUpdate, } from './credential.schema.js';
25
- export { aiProviderTable, aiProviderRelations, type AIProviderRow, type AIProviderInsert, type AIProviderUpdate, } from './ai-provider.schema.js';
26
- export { aiModelTable, type AIModelRow, type AIModelInsert, type AIModelUpdate, } from './ai-model.schema.js';
27
- export { aiConfigTable, type AIConfigRow, type AIConfigInsert, type AIConfigUpdate, } from './ai-config.schema.js';
28
- export { vectorStoreTable, indexedFileTable, type VectorStoreRow, type VectorStoreInsert, type VectorStoreUpdate, type IndexedFileRow, type IndexedFileInsert, type IndexedFileUpdate, } from './vector-store.schema.js';
29
- export { agentProviderTable, agentProviderRelations, type AgentProviderRow, type AgentProviderInsert, type AgentProviderUpdate, } from './agent-provider.schema.js';
30
- export { agentStatusTable, type AgentStatusRow, type AgentStatusInsert, type AgentStatusUpdate, } from './agent-status.schema.js';
31
- export { schema } from './schema.js';
@@ -1,32 +0,0 @@
1
- // Pure Pod contracts only.
2
- // This is the shared Pod-contract package for LinX / xpod consumers.
3
- export { LINQ, UDFS, UDFS_NAMESPACE, LINX_CHAT, LINX_MSG, SIOC, DCTerms, SCHEMA, RDF, RDFS, ACL, ODRL, OWL, FOAF, MEETING, AS, VCARD, WF, LDP, } from './namespaces.js';
4
- export * from './vocab.js';
5
- export * from './profile.js';
6
- export { contactTable, ContactClass, ContactType, isAgentContact, isGroupContact, } from './contact.schema.js';
7
- export { chatTable, } from './chat.schema.js';
8
- export { threadTable, } from './thread.schema.js';
9
- export { workspaceTable, WORKSPACE_TYPES, WORKSPACE_KINDS, getWorkspaceContainerPath, resolveWorkspaceContainerUri, parseWorkspaceIdFromContainerUri, normalizeLocalWorkspacePath, buildLocalWorkspaceUri, parseLocalWorkspaceUri, isLocalWorkspaceUri, } from './workspace.schema.js';
10
- export { messageTable, } from './message.schema.js';
11
- export { RichContentItemType, createRichContentItem, isRichContentItemType, parseMessageRichContent, parseMessageRichContentItems, serializeMessageRichContent, serializeMessageRichContentItems, } from './types/message-rich-content.js';
12
- export { fileTable } from './file.js';
13
- export { favoriteTable, } from './favorite/favorite.schema.js';
14
- export { settingsTable, SETTING_KEYS, } from './settings.js';
15
- export { createAgentSchema, agentSchema, agentTable, } from './agent.schema.js';
16
- export { approvalTable, } from './approval.schema.js';
17
- export { auditTable, } from './audit.schema.js';
18
- export { grantTable, } from './grant.schema.js';
19
- export { inboxNotificationTable, } from './inbox-notification.schema.js';
20
- export { ApprovalVocab, AuditVocab, GrantVocab, InboxNotificationVocab } from './vocab/governance.vocab.js';
21
- export { knowledgeFolderSchema, } from './knowledge.js';
22
- export { extensionSchema } from './extension.js';
23
- export { sessionSchema } from './session.js';
24
- export { importJobSchema } from './import.js';
25
- export { credentialTable, apiKeyCredentialTable, oauthCredentialTable, } from './credential.schema.js';
26
- export { aiProviderTable, aiProviderRelations, } from './ai-provider.schema.js';
27
- export { aiModelTable, } from './ai-model.schema.js';
28
- export { aiConfigTable, } from './ai-config.schema.js';
29
- export { vectorStoreTable, indexedFileTable, } from './vector-store.schema.js';
30
- export { agentProviderTable, agentProviderRelations, } from './agent-provider.schema.js';
31
- export { agentStatusTable, } from './agent-status.schema.js';
32
- export { schema } from './schema.js';
@@ -1 +0,0 @@
1
- export { knowledgeFolderSchema, type KnowledgeFolderScope } from "./knowledge-folder.schema.js";
@@ -1 +0,0 @@
1
- export { knowledgeFolderSchema } from "./knowledge-folder.schema.js";
@@ -1,7 +0,0 @@
1
- export type KnowledgeFolderScope = "read" | "contribute";
2
- export declare const knowledgeFolderSchema: {
3
- folderId: string;
4
- ownerWebId: string;
5
- storageType: string[];
6
- defaultKnowledgeScope: BooleanConstructor;
7
- };
@@ -1,6 +0,0 @@
1
- export const knowledgeFolderSchema = {
2
- folderId: "uuid",
3
- ownerWebId: "uri",
4
- storageType: ["solid-pod", "client-local"],
5
- defaultKnowledgeScope: Boolean
6
- };
@@ -1 +0,0 @@
1
- export * from './knowledge/index.js';
@@ -1 +0,0 @@
1
- export * from './knowledge/index.js';
@@ -1,33 +0,0 @@
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;
@@ -1,49 +0,0 @@
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
- });
@@ -1,176 +0,0 @@
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;
@@ -1,289 +0,0 @@
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;