@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 { fileTable, } from '../core.js';
@@ -0,0 +1 @@
1
+ export { fileTable, type FileRow, type FileInsert, type FileUpdate } from "./file.schema.js";
@@ -0,0 +1 @@
1
+ export { fileTable } from "./file.schema.js";
package/dist/file.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './file/index.js';
package/dist/file.js ADDED
@@ -0,0 +1 @@
1
+ export * from './file/index.js';
@@ -0,0 +1,13 @@
1
+ import type { ChatInsert } from '../chat.schema.js';
2
+ import type { ContactInsert } from '../contact.schema.js';
3
+ import type { MessageInsert } from '../message.schema.js';
4
+ import type { ThreadInsert } from '../thread.schema.js';
5
+ import type { ToolApprovalBlock, ToolCallBlock, TaskProgressBlock } from '../types/collaboration-blocks.js';
6
+ export declare const fixtureContactSolid: ContactInsert;
7
+ export declare const fixtureContactAgentWorkspace: ContactInsert;
8
+ export declare const fixtureChatDirectAI: ChatInsert;
9
+ export declare const fixtureThreadDirectAI: ThreadInsert;
10
+ export declare const fixtureToolCallBlock: ToolCallBlock;
11
+ export declare const fixtureToolApprovalBlock: ToolApprovalBlock;
12
+ export declare const fixtureTaskProgressBlock: TaskProgressBlock;
13
+ export declare const fixtureMessageTooling: MessageInsert;
@@ -0,0 +1,76 @@
1
+ import { ContactClass } from '../contact.schema.js';
2
+ export const fixtureContactSolid = {
3
+ id: 'contact-solid-1',
4
+ name: 'Alice',
5
+ rdfType: ContactClass.PERSON,
6
+ contactType: 'solid',
7
+ entityUri: 'https://pod.example/profile/card#me',
8
+ isPublic: false,
9
+ };
10
+ export const fixtureContactAgentWorkspace = {
11
+ id: 'contact-agent-ws-1',
12
+ name: 'Secretary@linx',
13
+ rdfType: ContactClass.AGENT,
14
+ contactType: 'agent',
15
+ entityUri: 'https://pod.example/.data/agents/secretary.ttl#this',
16
+ isPublic: false,
17
+ };
18
+ export const fixtureChatDirectAI = {
19
+ id: 'chat-direct-ai-1',
20
+ title: 'Chat Channel',
21
+ participants: [
22
+ 'https://pod.example/profile/card#me',
23
+ 'https://pod.example/.data/contacts/contact-agent-ws-1.ttl#this',
24
+ ],
25
+ starred: false,
26
+ muted: false,
27
+ unreadCount: 0,
28
+ };
29
+ export const fixtureThreadDirectAI = {
30
+ id: 'thread-001',
31
+ chatId: 'https://pod.example/.data/chat/chat-direct-ai-1/index.ttl#this',
32
+ title: 'Main thread',
33
+ starred: false,
34
+ workspace: 'https://pod.example/.data/agent-workspaces/secretary/ws-main/',
35
+ };
36
+ export const fixtureToolCallBlock = {
37
+ type: 'tool',
38
+ toolCallId: 'toolcall-1',
39
+ toolName: 'write_file',
40
+ arguments: { path: 'README.md', content: 'hello' },
41
+ status: 'waiting_approval',
42
+ duration: 123,
43
+ };
44
+ export const fixtureToolApprovalBlock = {
45
+ type: 'tool_approval',
46
+ toolCallId: 'toolcall-1',
47
+ toolName: 'write_file',
48
+ toolDescription: 'Write a file in the workspace',
49
+ arguments: { path: 'README.md', content: 'hello' },
50
+ risk: 'medium',
51
+ status: 'pending',
52
+ decisionRole: 'human',
53
+ };
54
+ export const fixtureTaskProgressBlock = {
55
+ type: 'task_progress',
56
+ taskId: 'task-1',
57
+ title: 'CP0 contract baseline',
58
+ steps: [
59
+ { id: 's1', label: 'Freeze contracts', status: 'done', duration: 10 },
60
+ { id: 's2', label: 'Add namespaces', status: 'running' },
61
+ ],
62
+ currentStep: 2,
63
+ totalSteps: 2,
64
+ };
65
+ export const fixtureMessageTooling = {
66
+ id: 'message-1',
67
+ thread: 'https://pod.example/.data/chat/chat-direct-ai-1/index.ttl#thread-001',
68
+ chat: 'https://pod.example/.data/chat/chat-direct-ai-1/index.ttl#this',
69
+ maker: 'https://pod.example/profile/card#me',
70
+ role: 'assistant',
71
+ content: 'I will write a file after approval.',
72
+ richContent: JSON.stringify({
73
+ blocks: [fixtureToolCallBlock, fixtureToolApprovalBlock, fixtureTaskProgressBlock],
74
+ }),
75
+ status: 'sent',
76
+ };
@@ -0,0 +1 @@
1
+ export { grantTable, type GrantRow, type GrantInsert, type GrantUpdate, } from './core.js';
@@ -0,0 +1 @@
1
+ export { grantTable, } from './core.js';
@@ -0,0 +1,5 @@
1
+ export declare const importJobSchema: {
2
+ jobId: string;
3
+ sourceType: string[];
4
+ status: string[];
5
+ };
@@ -0,0 +1,5 @@
1
+ export const importJobSchema = {
2
+ jobId: "uuid",
3
+ sourceType: ["chat", "audio", "file"],
4
+ status: ["pending", "processing", "completed", "failed"]
5
+ };
@@ -0,0 +1 @@
1
+ export { importJobSchema } from "./import-job.schema.js";
@@ -0,0 +1 @@
1
+ export { importJobSchema } from "./import-job.schema.js";
@@ -0,0 +1 @@
1
+ export * from './import/index.js';
package/dist/import.js ADDED
@@ -0,0 +1 @@
1
+ export * from './import/index.js';
@@ -0,0 +1 @@
1
+ export { inboxNotificationTable, type InboxNotificationRow, type InboxNotificationInsert, type InboxNotificationUpdate, } from './core.js';
@@ -0,0 +1 @@
1
+ export { inboxNotificationTable, } from './core.js';
@@ -0,0 +1,41 @@
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 { contactRepository } from './contact.repository.js';
6
+ export { chatTable, type ChatMetadata, type ChatMemberRole, type ChatRow, type ChatInsert, type ChatUpdate, } from './chat.schema.js';
7
+ export { chatRepository } from './chat.repository.js';
8
+ export { threadTable, type ThreadRow, type ThreadInsert, type ThreadUpdate, } from './thread.schema.js';
9
+ export { threadRepository } from './thread.repository.js';
10
+ 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';
11
+ export { workspaceRepository } from './workspace.repository.js';
12
+ export { messageTable, type MessageRow, type MessageInsert, type MessageUpdate, } from './message.schema.js';
13
+ export { messageRepository } from './message.repository.js';
14
+ export { MessageBlockType, MessageBlockStatus, type BaseMessageBlock, type PlaceholderMessageBlock, type MainTextMessageBlock, type ThinkingMessageBlock, type ImageMessageBlock, type CodeMessageBlock, type ToolMessageBlock, type FileMessageBlock, type ErrorMessageBlock, type CitationMessageBlock, type MessageBlock, type MessageRichContent, createMessageBlock, isBlockType, parseMessageBlocks, serializeMessageBlocks, } from './types/message-block.js';
15
+ export { type ToolApprovalBlock, type ToolCallBlock, type TaskProgressBlock, type CollaborationRichBlock, type ToolRisk, type ToolApprovalStatus, type ToolCallStatus, type TaskProgressStepStatus, } from "./types/collaboration-blocks.js";
16
+ export * from "./fixtures/contracts-chat-contact.js";
17
+ export { fileTable, type FileRow, type FileInsert, type FileUpdate, } from './file.js';
18
+ export { favoriteTable, type FavoriteRow, type FavoriteInsert, type FavoriteUpdate, createStarredSyncHook, registerDbForStarredSync, chatStarredSyncHook, threadStarredSyncHook, contactStarredSyncHook, chatSnapshotExtractor, threadSnapshotExtractor, contactSnapshotExtractor, type SnapshotExtractor, type StarredSyncConfig, type SourceModule, } from './favorite.js';
19
+ export { settingsTable, SETTING_KEYS, type SettingKey, type SettingsRow, type SettingsInsert, type SettingsUpdate, } from './settings.js';
20
+ export { agentTable, type AgentRow, type AgentInsert, type AgentUpdate, } from './agent.schema.js';
21
+ export { agentRepository } from './agent.repository.js';
22
+ export { DEFAULT_AGENT_PROVIDERS, type AgentProviderMetadata, type AgentModelOption, } from './agent.providers.js';
23
+ export { sessionSchema } from './session.js';
24
+ export { approvalTable, type ApprovalRow, type ApprovalInsert, type ApprovalUpdate, } from './approval.schema.js';
25
+ export { auditTable, type AuditRow, type AuditInsert, type AuditUpdate, } from './audit.schema.js';
26
+ export { grantTable, type GrantRow, type GrantInsert, type GrantUpdate, } from './grant.schema.js';
27
+ export { inboxNotificationTable, type InboxNotificationRow, type InboxNotificationInsert, type InboxNotificationUpdate, } from './inbox-notification.schema.js';
28
+ export { ApprovalVocab, AuditVocab, GrantVocab, InboxNotificationVocab } from './vocab/sidecar.vocab.js';
29
+ export * from './sidecar/sidecar-events.js';
30
+ export * from './sidecar/persistence-mapping.js';
31
+ export { knowledgeFolderSchema, type KnowledgeFolderScope } from './knowledge.js';
32
+ export { extensionSchema } from './extension.js';
33
+ 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";
34
+ export { aiProviderTable, type AIProviderRow, type AIProviderInsert, type AIProviderUpdate, } from "./ai-provider.schema.js";
35
+ export { aiModelTable, type AIModelRow, type AIModelInsert, type AIModelUpdate, } from "./ai-model.schema.js";
36
+ export { aiConfigModelUri, aiConfigProviderUri, buildAIConfigMutationPlan, buildAIConfigProviderStateMap, extractAIConfigProviderId, extractAIConfigResourceId, getAIConfigDefaultBaseUrl, getAIConfigProviderCatalog, getAIConfigProviderMetadata, getDefaultAIConfigCredentialId, sameAIConfigProviderId, type AIConfigModel, type AIConfigMutationPlan, type AIConfigProviderCatalogEntry, type AIConfigProviderState, type AIConfigUpdate, type BuildAIConfigProviderStateMapOptions, } from './ai-config.js';
37
+ export { createRepositoryDescriptor, deleteExactRecord, definePodRepository, findExactRecord, isIriLikeIdentifier, resolveRowId, stripEntityIdentifiers, updateExactRecord, type PodRepositoryDescriptor, type RepositoryCacheOptions, type RepositoryInvalidations, type RepositoryScope, type SolidDatabase, } from './repository.js';
38
+ export { importJobSchema } from './import.js';
39
+ export { eq, ne, and, or, drizzle } from '@undefineds.co/drizzle-solid';
40
+ export { linxSchema } from './schema.js';
41
+ export * from './discovery.js';
package/dist/index.js ADDED
@@ -0,0 +1,83 @@
1
+ // ============================================
2
+ // 命名空间和词汇表
3
+ // ============================================
4
+ export {
5
+ // Legacy + Wave A aliases
6
+ LINQ, UDFS, UDFS_NAMESPACE,
7
+ // Wave A contracts
8
+ LINX_CHAT, LINX_MSG,
9
+ // Standard vocabs
10
+ SIOC, DCTerms, SCHEMA, RDF, RDFS, ACL, ODRL, OWL, FOAF, MEETING, AS, VCARD, WF, LDP, } from "./namespaces.js";
11
+ // Wave A: centralized vocab objects (downstream should prefer these over ad-hoc namespaces)
12
+ export * from "./vocab.js";
13
+ // ============================================
14
+ // 核心业务模型
15
+ // ============================================
16
+ // Profile - 用户资料
17
+ export * from './profile.js';
18
+ // Contact - 联系人 (unified index for Solid users, external users, and AI agents)
19
+ export { contactTable, ContactClass, ContactType, isAgentContact, isGroupContact, } from './contact.schema.js';
20
+ export { contactRepository } from './contact.repository.js';
21
+ // Chat & Message - 聊天和消息
22
+ export { chatTable, } from './chat.schema.js';
23
+ export { chatRepository } from './chat.repository.js';
24
+ export { threadTable, } from './thread.schema.js';
25
+ export { threadRepository } from './thread.repository.js';
26
+ export { workspaceTable, WORKSPACE_TYPES, WORKSPACE_KINDS, getWorkspaceContainerPath, resolveWorkspaceContainerUri, parseWorkspaceIdFromContainerUri, normalizeLocalWorkspacePath, buildLocalWorkspaceUri, parseLocalWorkspaceUri, isLocalWorkspaceUri, } from './workspace.schema.js';
27
+ export { workspaceRepository } from './workspace.repository.js';
28
+ export { messageTable, } from './message.schema.js';
29
+ export { messageRepository } from './message.repository.js';
30
+ // Message Block - 消息块类型系统 (Block-based Message System)
31
+ export { MessageBlockType, MessageBlockStatus, createMessageBlock, isBlockType, parseMessageBlocks, serializeMessageBlocks, } from './types/message-block.js';
32
+ // Wave A CP0: fixtures for downstream parallel development
33
+ export * from "./fixtures/contracts-chat-contact.js";
34
+ // File - 文件管理
35
+ export { fileTable, } from './file.js';
36
+ // Favorite - 收藏
37
+ export { favoriteTable,
38
+ // Starred Sync Hook
39
+ createStarredSyncHook, registerDbForStarredSync, chatStarredSyncHook, threadStarredSyncHook, contactStarredSyncHook, chatSnapshotExtractor, threadSnapshotExtractor, contactSnapshotExtractor, } from './favorite.js';
40
+ // Settings - 用户设置
41
+ export { settingsTable, SETTING_KEYS, } from './settings.js';
42
+ // Agent - AI 助手配置
43
+ export { agentTable, } from './agent.schema.js';
44
+ export { agentRepository } from './agent.repository.js';
45
+ export { DEFAULT_AGENT_PROVIDERS, } from './agent.providers.js';
46
+ // ============================================
47
+ // 其他模型
48
+ // ============================================
49
+ // Session - 会话管理
50
+ export { sessionSchema } from './session.js';
51
+ // Approval / Audit / Grant / Inbox Notification
52
+ export { approvalTable, } from './approval.schema.js';
53
+ export { auditTable, } from './audit.schema.js';
54
+ export { grantTable, } from './grant.schema.js';
55
+ export { inboxNotificationTable, } from './inbox-notification.schema.js';
56
+ // Sidecar vocab + runtime contracts
57
+ export { ApprovalVocab, AuditVocab, GrantVocab, InboxNotificationVocab } from './vocab/sidecar.vocab.js';
58
+ export * from './sidecar/sidecar-events.js';
59
+ export * from './sidecar/persistence-mapping.js';
60
+ // Knowledge Folder - 知识库文件夹
61
+ export { knowledgeFolderSchema } from './knowledge.js';
62
+ // Extension - 扩展
63
+ export { extensionSchema } from './extension.js';
64
+ // xpod AI schema
65
+ export { credentialTable, apiKeyCredentialTable, oauthCredentialTable, } from "./credential.schema.js";
66
+ export { aiProviderTable, } from "./ai-provider.schema.js";
67
+ export { aiModelTable, } from "./ai-model.schema.js";
68
+ export { aiConfigModelUri, aiConfigProviderUri, buildAIConfigMutationPlan, buildAIConfigProviderStateMap, extractAIConfigProviderId, extractAIConfigResourceId, getAIConfigDefaultBaseUrl, getAIConfigProviderCatalog, getAIConfigProviderMetadata, getDefaultAIConfigCredentialId, sameAIConfigProviderId, } from './ai-config.js';
69
+ export { createRepositoryDescriptor, deleteExactRecord, definePodRepository, findExactRecord, isIriLikeIdentifier, resolveRowId, stripEntityIdentifiers, updateExactRecord, } from './repository.js';
70
+ // Import Job - 导入任务
71
+ export { importJobSchema } from './import.js';
72
+ // ============================================
73
+ // 数据库操作符 (统一出口)
74
+ // ============================================
75
+ export { eq, ne, and, or, drizzle } from '@undefineds.co/drizzle-solid';
76
+ // ============================================
77
+ // Schema registry
78
+ // ============================================
79
+ export { linxSchema } from './schema.js';
80
+ // ============================================
81
+ // Discovery Service (发现服务)
82
+ // ============================================
83
+ export * from './discovery.js';
@@ -0,0 +1 @@
1
+ export { knowledgeFolderSchema, type KnowledgeFolderScope } from "./knowledge-folder.schema.js";
@@ -0,0 +1 @@
1
+ export { knowledgeFolderSchema } from "./knowledge-folder.schema.js";
@@ -0,0 +1 @@
1
+ export { knowledgeFolderSchema, type KnowledgeFolderScope, } from '../core.js';
@@ -0,0 +1 @@
1
+ export { knowledgeFolderSchema, } from '../core.js';
@@ -0,0 +1 @@
1
+ export * from './knowledge/index.js';
@@ -0,0 +1 @@
1
+ export * from './knowledge/index.js';
@@ -0,0 +1,81 @@
1
+ export declare const messageRepository: import("./repository.js").PodRepositoryDescriptor<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
+ chat: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, true, false>;
4
+ thread: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, true, false>;
5
+ maker: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, true, false>;
6
+ role: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, true, true>;
7
+ content: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, true, false>;
8
+ richContent: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
9
+ status: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, true, true>;
10
+ replacedBy: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
11
+ deletedAt: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"datetime", null, false, false>;
12
+ senderName: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
13
+ senderAvatarUrl: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
14
+ mentions: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"array", "uri", false, false>;
15
+ replyTo: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
16
+ routedBy: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
17
+ routeTargetAgentId: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
18
+ coordinationId: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
19
+ createdAt: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"datetime", null, true, true>;
20
+ updatedAt: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"datetime", null, false, false>;
21
+ }>>, {
22
+ id: string;
23
+ chat: string;
24
+ thread: string;
25
+ maker: string;
26
+ role: string;
27
+ content: string;
28
+ richContent: string;
29
+ status: string;
30
+ replacedBy: string;
31
+ deletedAt: Date;
32
+ senderName: string;
33
+ senderAvatarUrl: string;
34
+ mentions: string[];
35
+ replyTo: string;
36
+ routedBy: string;
37
+ routeTargetAgentId: string;
38
+ coordinationId: string;
39
+ createdAt: Date;
40
+ updatedAt: Date;
41
+ }, {
42
+ chat: string;
43
+ thread: string;
44
+ maker: string;
45
+ content: string;
46
+ id?: string | undefined;
47
+ role?: string | undefined;
48
+ richContent?: string | undefined;
49
+ status?: string | undefined;
50
+ replacedBy?: string | undefined;
51
+ deletedAt?: Date | undefined;
52
+ senderName?: string | undefined;
53
+ senderAvatarUrl?: string | undefined;
54
+ mentions?: string[] | undefined;
55
+ replyTo?: string | undefined;
56
+ routedBy?: string | undefined;
57
+ routeTargetAgentId?: string | undefined;
58
+ coordinationId?: string | undefined;
59
+ createdAt?: Date | undefined;
60
+ updatedAt?: Date | undefined;
61
+ }, {
62
+ id?: string | null | undefined;
63
+ chat?: string | undefined;
64
+ thread?: string | undefined;
65
+ maker?: string | undefined;
66
+ role?: string | undefined;
67
+ content?: string | undefined;
68
+ richContent?: string | null | undefined;
69
+ status?: string | undefined;
70
+ replacedBy?: string | null | undefined;
71
+ deletedAt?: Date | null | undefined;
72
+ senderName?: string | null | undefined;
73
+ senderAvatarUrl?: string | null | undefined;
74
+ mentions?: string[] | null | undefined;
75
+ replyTo?: string | null | undefined;
76
+ routedBy?: string | null | undefined;
77
+ routeTargetAgentId?: string | null | undefined;
78
+ coordinationId?: string | null | undefined;
79
+ createdAt?: Date | undefined;
80
+ updatedAt?: Date | null | undefined;
81
+ }, Record<string, unknown>>;
@@ -0,0 +1,8 @@
1
+ import { definePodRepository } from './repository.js';
2
+ import { messageTable } from './message.schema.js';
3
+ export const messageRepository = definePodRepository({
4
+ namespace: 'message',
5
+ table: messageTable,
6
+ searchableFields: ['content'],
7
+ defaultSort: { field: 'createdAt', direction: 'asc' },
8
+ });
@@ -0,0 +1 @@
1
+ export { messageTable, type MessageRow, type MessageInsert, type MessageUpdate, } from './core.js';
@@ -0,0 +1 @@
1
+ export { messageTable, } from './core.js';
@@ -0,0 +1 @@
1
+ export { ACL, AS, DCTerms, FOAF, LINQ, LINX_CHAT, LINX_MSG, LDP, MEETING, ODRL, OWL, RDF, RDFS, SCHEMA, SIOC, UDFS, UDFS_NAMESPACE, VCARD, WF, } from './core.js';
@@ -0,0 +1 @@
1
+ export { ACL, AS, DCTerms, FOAF, LINQ, LINX_CHAT, LINX_MSG, LDP, MEETING, ODRL, OWL, RDF, RDFS, SCHEMA, SIOC, UDFS, UDFS_NAMESPACE, VCARD, WF, } from './core.js';
@@ -0,0 +1 @@
1
+ export { solidProfileTable, type SolidProfileRow, type SolidProfileInsert, type SolidProfileUpdate, } from './core.js';
@@ -0,0 +1 @@
1
+ export { solidProfileTable, } from './core.js';
@@ -0,0 +1,59 @@
1
+ import type { PodTable, InferTableData, InferInsertData, InferUpdateData, SolidDatabase as DrizzleSolidDatabase, QueryCondition } from '@undefineds.co/drizzle-solid';
2
+ export type SolidDatabase<TSchema extends Record<string, unknown> = Record<string, never>> = DrizzleSolidDatabase<TSchema>;
3
+ export interface RepositoryCacheOptions {
4
+ staleTime?: number;
5
+ gcTime?: number;
6
+ }
7
+ export type RepositoryScope = 'list' | 'detail' | string;
8
+ export interface RepositoryInvalidations {
9
+ create?: RepositoryScope[];
10
+ update?: RepositoryScope[];
11
+ remove?: RepositoryScope[];
12
+ }
13
+ export interface RepositoryFilterContext<TTable extends PodTable<any>, Filters> {
14
+ table: TTable;
15
+ filters?: Filters;
16
+ }
17
+ export interface PodRepositoryDescriptor<TTable extends PodTable<any>, Row extends Record<string, unknown> = InferTableData<TTable>, Insert = InferInsertData<TTable>, Update = InferUpdateData<TTable>, Filters extends Record<string, unknown> = Record<string, unknown>> {
18
+ namespace: string;
19
+ resourcePath: string;
20
+ searchableFields?: (keyof Row & string)[];
21
+ defaultSort?: {
22
+ field: keyof Row & string;
23
+ direction: 'asc' | 'desc';
24
+ };
25
+ cache?: RepositoryCacheOptions;
26
+ invalidations: RepositoryInvalidations;
27
+ list: (db: SolidDatabase, filters?: Filters) => Promise<Row[]>;
28
+ detail: (db: SolidDatabase, id: string) => Promise<Row | null>;
29
+ create?: (db: SolidDatabase, input: Insert) => Promise<Row>;
30
+ update?: (db: SolidDatabase, id: string, input: Update) => Promise<Row>;
31
+ remove?: (db: SolidDatabase, id: string) => Promise<{
32
+ id: string;
33
+ }>;
34
+ }
35
+ export interface PodRepositoryOptions<TTable extends PodTable<any>, Row extends Record<string, unknown> = InferTableData<TTable>, Filters extends Record<string, unknown> = Record<string, unknown>> {
36
+ namespace: string;
37
+ table: TTable;
38
+ searchableFields?: (keyof Row & string)[];
39
+ searchAccessor?: (filters?: Filters) => string | undefined;
40
+ defaultSort?: {
41
+ field: keyof Row & string;
42
+ direction: 'asc' | 'desc';
43
+ };
44
+ cache?: RepositoryCacheOptions;
45
+ invalidations?: Partial<RepositoryInvalidations>;
46
+ transform?: (row: Row) => Row;
47
+ filter?: (context: RepositoryFilterContext<TTable, Filters>) => QueryCondition | undefined;
48
+ disableMutations?: Partial<Record<'create' | 'update' | 'remove', boolean>>;
49
+ }
50
+ export declare function resolveRowId(row: Partial<Record<string, unknown>> | null): string | null;
51
+ export declare function isIriLikeIdentifier(value: string): boolean;
52
+ export declare function stripEntityIdentifiers<T extends Record<string, unknown>>(data: T | null | undefined): Partial<T>;
53
+ type ExactTargetInput = string | Partial<Record<string, unknown>>;
54
+ export declare function findExactRecord<TTable extends PodTable<any>>(db: SolidDatabase<any>, table: TTable, target: ExactTargetInput): Promise<InferTableData<TTable> | null>;
55
+ export declare function updateExactRecord<TTable extends PodTable<any>>(db: SolidDatabase<any>, table: TTable, target: ExactTargetInput, data: Partial<Record<string, unknown>>): Promise<InferTableData<TTable> | null>;
56
+ export declare function deleteExactRecord<TTable extends PodTable<any>>(db: SolidDatabase<any>, table: TTable, target: ExactTargetInput): Promise<boolean>;
57
+ export declare function createRepositoryDescriptor<TTable extends PodTable<any>, Row extends Record<string, unknown> = InferTableData<TTable>, Insert = InferInsertData<TTable>, Update = InferUpdateData<TTable>, Filters extends Record<string, unknown> = Record<string, unknown>>(options: PodRepositoryOptions<TTable, Row, Filters>): PodRepositoryDescriptor<TTable, Row, Insert, Update, Filters>;
58
+ export declare const definePodRepository: typeof createRepositoryDescriptor;
59
+ export {};