@undefineds.co/models 0.2.0 → 0.2.1

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,36 +0,0 @@
1
- import { uri, boolean, object, podTable, string, timestamp, id } from '@undefineds.co/drizzle-solid';
2
- import { UDFS, DCTerms, SIOC, MEETING, LINX_CHAT } from './namespaces.js';
3
- /**
4
- * Thread schema.
5
- *
6
- * CP0 baseline:
7
- * - Chat is a pure channel/place.
8
- * - Thread carries execution context needed for collaboration/audit.
9
- *
10
- * Storage structure (aligned with xpod):
11
- * - Thread stored as fragment in Chat's index.ttl
12
- * - Location: /.data/chat/{chatId}/index.ttl#{id}
13
- *
14
- * NOTE: workspace is modeled as a workspace container URI (Pod resource),
15
- * and can link to Agent/policy documents via RDF references (not filesystem symlinks).
16
- */
17
- export const threadTable = podTable('thread', {
18
- id: id('id'),
19
- // Belongs to chat - used in subjectTemplate path
20
- chatId: uri('chatId').predicate(SIOC.has_parent).notNull().link(MEETING.LongChat),
21
- // Display / state
22
- title: string('title').predicate(DCTerms.title),
23
- starred: boolean('starred').predicate(UDFS.favorite).default(false),
24
- status: string('status').predicate(UDFS.status).default('active'),
25
- metadata: object('metadata').predicate(UDFS.metadata),
26
- // Execution context: workspace root URI (Pod container or local `linx://` workspace)
27
- workspace: uri('workspace').predicate(LINX_CHAT.workspace),
28
- createdAt: timestamp('createdAt').predicate(DCTerms.created).notNull().defaultNow(),
29
- updatedAt: timestamp('updatedAt').predicate(DCTerms.modified).notNull().defaultNow(),
30
- }, {
31
- base: '/.data/chat/',
32
- sparqlEndpoint: '/.data/chat/-/sparql',
33
- type: SIOC.Thread,
34
- namespace: UDFS,
35
- subjectTemplate: '{chatId}/index.ttl#{id}',
36
- });
@@ -1,7 +0,0 @@
1
- /**
2
- * Wave A CP0: collaboration-related rich content items.
3
- *
4
- * These are data contracts stored in `MessageRow.richContent.items`.
5
- * They intentionally omit presentation/runtime wrapper fields.
6
- */
7
- export {};
@@ -1,121 +0,0 @@
1
- import type { ToolApprovalRichContentItem, ToolCallRichContentItem, TaskProgressRichContentItem } from './collaboration-rich-content.js';
2
- /**
3
- * Message rich content item kinds stored in `MessageRow.richContent`.
4
- */
5
- export declare enum RichContentItemType {
6
- MAIN_TEXT = "main_text",
7
- THINKING = "thinking",
8
- IMAGE = "image",
9
- CODE = "code",
10
- TOOL = "tool",
11
- TOOL_APPROVAL = "tool_approval",
12
- TASK_PROGRESS = "task_progress",
13
- FILE = "file",
14
- ERROR = "error",
15
- CITATION = "citation"
16
- }
17
- export interface RichContentModelRef {
18
- id: string;
19
- name: string;
20
- provider: string;
21
- }
22
- export interface BaseRichContentItem {
23
- type: RichContentItemType;
24
- model?: RichContentModelRef;
25
- metadata?: Record<string, unknown>;
26
- }
27
- export interface MainTextRichContentItem extends BaseRichContentItem {
28
- type: RichContentItemType.MAIN_TEXT;
29
- content: string;
30
- knowledgeBaseIds?: string[];
31
- citationReferences?: Array<{
32
- citationItemId?: string;
33
- url?: string;
34
- title?: string;
35
- }>;
36
- }
37
- export interface ThinkingRichContentItem extends BaseRichContentItem {
38
- type: RichContentItemType.THINKING;
39
- content: string;
40
- thinkingDuration?: number;
41
- }
42
- export interface CodeRichContentItem extends BaseRichContentItem {
43
- type: RichContentItemType.CODE;
44
- content: string;
45
- language: string;
46
- executable?: boolean;
47
- executionResult?: {
48
- output?: string;
49
- error?: string;
50
- exitCode?: number;
51
- };
52
- }
53
- export interface ImageRichContentItem extends BaseRichContentItem {
54
- type: RichContentItemType.IMAGE;
55
- url?: string;
56
- filePath?: string;
57
- metadata?: BaseRichContentItem['metadata'] & {
58
- prompt?: string;
59
- negativePrompt?: string;
60
- fileName?: string;
61
- fileSize?: number;
62
- width?: number;
63
- height?: number;
64
- };
65
- }
66
- export interface CitationRichContentItem extends BaseRichContentItem {
67
- type: RichContentItemType.CITATION;
68
- webSearch?: {
69
- query: string;
70
- results: Array<{
71
- title: string;
72
- url: string;
73
- snippet?: string;
74
- favicon?: string;
75
- }>;
76
- };
77
- knowledge?: Array<{
78
- id: string;
79
- title: string;
80
- content: string;
81
- source?: string;
82
- }>;
83
- }
84
- export interface FileRichContentItem extends BaseRichContentItem {
85
- type: RichContentItemType.FILE;
86
- fileName: string;
87
- fileUrl: string;
88
- fileSize?: number;
89
- mimeType?: string;
90
- }
91
- export interface ErrorRichContentItem extends BaseRichContentItem {
92
- type: RichContentItemType.ERROR;
93
- message: string;
94
- retryable?: boolean;
95
- code?: string;
96
- details?: unknown;
97
- }
98
- export type MessageRichContentItem = MainTextRichContentItem | ThinkingRichContentItem | CodeRichContentItem | ImageRichContentItem | ToolCallRichContentItem | ToolApprovalRichContentItem | TaskProgressRichContentItem | FileRichContentItem | ErrorRichContentItem | CitationRichContentItem;
99
- export interface LegacyToolInvocation {
100
- id: string;
101
- toolName: string;
102
- input: unknown;
103
- output?: unknown;
104
- error?: string;
105
- }
106
- /**
107
- * Message.richContent payload.
108
- */
109
- export interface MessageRichContent {
110
- thought?: string;
111
- toolInvocations?: LegacyToolInvocation[];
112
- items?: MessageRichContentItem[];
113
- }
114
- export declare function createRichContentItem<T extends MessageRichContentItem>(type: T['type'], partial: Omit<T, 'type'>): T;
115
- export declare function isRichContentItemType<TType extends MessageRichContentItem['type']>(item: MessageRichContentItem, type: TType): item is Extract<MessageRichContentItem, {
116
- type: TType;
117
- }>;
118
- export declare function parseMessageRichContent(richContent: string | null | undefined): MessageRichContent;
119
- export declare function parseMessageRichContentItems(richContent: string | null | undefined): MessageRichContentItem[];
120
- export declare function serializeMessageRichContent(content: MessageRichContent): string;
121
- export declare function serializeMessageRichContentItems(items: MessageRichContentItem[]): string;
@@ -1,85 +0,0 @@
1
- /**
2
- * Message rich content item kinds stored in `MessageRow.richContent`.
3
- */
4
- export var RichContentItemType;
5
- (function (RichContentItemType) {
6
- RichContentItemType["MAIN_TEXT"] = "main_text";
7
- RichContentItemType["THINKING"] = "thinking";
8
- RichContentItemType["IMAGE"] = "image";
9
- RichContentItemType["CODE"] = "code";
10
- RichContentItemType["TOOL"] = "tool";
11
- RichContentItemType["TOOL_APPROVAL"] = "tool_approval";
12
- RichContentItemType["TASK_PROGRESS"] = "task_progress";
13
- RichContentItemType["FILE"] = "file";
14
- RichContentItemType["ERROR"] = "error";
15
- RichContentItemType["CITATION"] = "citation";
16
- })(RichContentItemType || (RichContentItemType = {}));
17
- function toToolArguments(input) {
18
- if (input !== null && typeof input === 'object' && !Array.isArray(input)) {
19
- return input;
20
- }
21
- return { value: input };
22
- }
23
- function normalizeLegacyItems(payload) {
24
- const items = [];
25
- if (payload.thought) {
26
- items.push({
27
- type: RichContentItemType.THINKING,
28
- content: payload.thought,
29
- });
30
- }
31
- if (payload.toolInvocations) {
32
- payload.toolInvocations.forEach((toolInvocation) => {
33
- items.push({
34
- type: RichContentItemType.TOOL,
35
- toolCallId: toolInvocation.id,
36
- toolName: toolInvocation.toolName,
37
- arguments: toToolArguments(toolInvocation.input),
38
- status: toolInvocation.error ? 'error' : 'done',
39
- result: toolInvocation.output,
40
- error: toolInvocation.error,
41
- });
42
- });
43
- }
44
- return items;
45
- }
46
- export function createRichContentItem(type, partial) {
47
- return {
48
- type,
49
- ...partial,
50
- };
51
- }
52
- export function isRichContentItemType(item, type) {
53
- return item.type === type;
54
- }
55
- export function parseMessageRichContent(richContent) {
56
- if (!richContent) {
57
- return { items: [] };
58
- }
59
- try {
60
- const parsed = JSON.parse(richContent);
61
- const { blocks, items, ...rest } = parsed;
62
- if (Array.isArray(items)) {
63
- return { ...rest, items };
64
- }
65
- if (Array.isArray(blocks)) {
66
- return { ...rest, items: blocks };
67
- }
68
- return {
69
- ...rest,
70
- items: normalizeLegacyItems(parsed),
71
- };
72
- }
73
- catch {
74
- return { items: [] };
75
- }
76
- }
77
- export function parseMessageRichContentItems(richContent) {
78
- return parseMessageRichContent(richContent).items ?? [];
79
- }
80
- export function serializeMessageRichContent(content) {
81
- return JSON.stringify(content);
82
- }
83
- export function serializeMessageRichContentItems(items) {
84
- return serializeMessageRichContent({ items });
85
- }
@@ -1,25 +0,0 @@
1
- export declare const vectorStoreTable: 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").ColumnBuilder<"string", null, true, false>;
3
- name: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
4
- container: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
5
- chunkingStrategy: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
6
- status: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
7
- createdAt: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"datetime", null, false, false>;
8
- lastActiveAt: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"datetime", null, false, false>;
9
- }>>;
10
- export declare const indexedFileTable: 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").ColumnBuilder<"string", null, true, false>;
12
- fileUrl: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
13
- vectorId: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"integer", null, false, false>;
14
- chunkingStrategy: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
15
- status: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
16
- usageBytes: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"integer", null, false, false>;
17
- lastError: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
18
- indexedAt: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"datetime", null, false, false>;
19
- }>>;
20
- export type VectorStoreRow = typeof vectorStoreTable.$inferSelect;
21
- export type VectorStoreInsert = typeof vectorStoreTable.$inferInsert;
22
- export type VectorStoreUpdate = typeof vectorStoreTable.$inferUpdate;
23
- export type IndexedFileRow = typeof indexedFileTable.$inferSelect;
24
- export type IndexedFileInsert = typeof indexedFileTable.$inferInsert;
25
- export type IndexedFileUpdate = typeof indexedFileTable.$inferUpdate;
@@ -1,35 +0,0 @@
1
- import { integer, solidSchema, string, timestamp, uri } from '@undefineds.co/drizzle-solid';
2
- import { UDFS } from './namespaces.js';
3
- const vectorStoreSchema = solidSchema({
4
- id: string('id').primaryKey(),
5
- name: string('name').predicate(UDFS.name),
6
- container: uri('container').predicate(UDFS.container),
7
- chunkingStrategy: string('chunkingStrategy').predicate(UDFS.chunkingStrategy),
8
- status: string('status').predicate(UDFS.status),
9
- createdAt: timestamp('createdAt').predicate(UDFS.createdAt),
10
- lastActiveAt: timestamp('lastActiveAt').predicate(UDFS.lastActiveAt),
11
- }, {
12
- type: UDFS.VectorStore,
13
- namespace: UDFS,
14
- });
15
- const indexedFileSchema = solidSchema({
16
- id: string('id').primaryKey(),
17
- fileUrl: uri('fileUrl').predicate(UDFS.fileUrl),
18
- vectorId: integer('vectorId').predicate(UDFS.vectorId),
19
- chunkingStrategy: string('chunkingStrategy').predicate(UDFS.chunkingStrategy),
20
- status: string('status').predicate(UDFS.status),
21
- usageBytes: integer('usageBytes').predicate(UDFS.usageBytes),
22
- lastError: string('lastError').predicate(UDFS.lastError),
23
- indexedAt: timestamp('indexedAt').predicate(UDFS.indexedAt),
24
- }, {
25
- type: UDFS.IndexedFile,
26
- namespace: UDFS,
27
- });
28
- export const vectorStoreTable = vectorStoreSchema.table('vectorStore', {
29
- base: '/settings/ai/vector-stores.ttl',
30
- subjectTemplate: '#{id}',
31
- });
32
- export const indexedFileTable = indexedFileSchema.table('indexedFile', {
33
- base: '/settings/ai/indexed-files.ttl',
34
- subjectTemplate: '#{id}',
35
- });
@@ -1 +0,0 @@
1
- export * from '../namespaces.js';
@@ -1,3 +0,0 @@
1
- // Compatibility re-export.
2
- // Wave A contracts require downstream to import vocab/constants from @undefineds.co/models, not ad-hoc namespaces.
3
- export * from '../namespaces.js';
@@ -1,16 +0,0 @@
1
- /** Chat channel vocab (thin place/container). */
2
- export declare const ChatBaseVocab: {
3
- readonly title: string;
4
- readonly description: string;
5
- readonly avatarUrl: string;
6
- readonly participants: string;
7
- readonly metadata: string;
8
- readonly starred: string;
9
- readonly muted: string;
10
- readonly unreadCount: string;
11
- readonly lastActiveAt: string;
12
- readonly lastMessageId: string;
13
- readonly lastMessagePreview: string;
14
- readonly createdAt: string;
15
- readonly updatedAt: string;
16
- };
@@ -1,22 +0,0 @@
1
- import { DCTerms, SCHEMA, UDFS, WF } from '../namespaces.js';
2
- /** Chat channel vocab (thin place/container). */
3
- export const ChatBaseVocab = {
4
- // Display
5
- title: DCTerms.title,
6
- description: DCTerms.description,
7
- avatarUrl: SCHEMA.image,
8
- // Participants (protocol-aligned)
9
- participants: WF.participant,
10
- metadata: UDFS.metadata,
11
- // State
12
- starred: UDFS.favorite,
13
- muted: UDFS.muted,
14
- unreadCount: UDFS.unreadCount,
15
- // Activity
16
- lastActiveAt: UDFS.lastActiveAt,
17
- lastMessageId: WF.message,
18
- lastMessagePreview: SCHEMA.text,
19
- // Timestamps
20
- createdAt: DCTerms.created,
21
- updatedAt: DCTerms.modified,
22
- };
@@ -1,21 +0,0 @@
1
- export declare const ContactVocab: {
2
- readonly name: string;
3
- readonly avatarUrl: string;
4
- readonly entityUri: string;
5
- readonly rdfType: string;
6
- readonly contactType: string;
7
- readonly isPublic: string;
8
- readonly externalPlatform: string;
9
- readonly externalId: string;
10
- readonly alias: string;
11
- readonly starred: string;
12
- readonly note: string;
13
- readonly sortKey: string;
14
- readonly gender: string;
15
- readonly province: string;
16
- readonly city: string;
17
- readonly createdAt: string;
18
- readonly updatedAt: string;
19
- readonly deletedAt: string;
20
- readonly lastSyncedAt: string;
21
- };
@@ -1,22 +0,0 @@
1
- import { AS, DCTerms, FOAF, RDF, UDFS, VCARD } from '../namespaces.js';
2
- export const ContactVocab = {
3
- name: VCARD.fn,
4
- avatarUrl: VCARD.hasPhoto,
5
- entityUri: FOAF.primaryTopic,
6
- rdfType: RDF.type,
7
- contactType: UDFS.contactType,
8
- isPublic: AS.audience,
9
- externalPlatform: UDFS.externalPlatform,
10
- externalId: UDFS.externalId,
11
- alias: UDFS.alias,
12
- starred: UDFS.favorite,
13
- note: VCARD.note,
14
- sortKey: UDFS.sortKey,
15
- gender: VCARD.hasGender,
16
- province: VCARD.region,
17
- city: VCARD.locality,
18
- createdAt: DCTerms.created,
19
- updatedAt: DCTerms.modified,
20
- deletedAt: UDFS.deletedAt,
21
- lastSyncedAt: UDFS.lastSyncedAt,
22
- };
@@ -1,6 +0,0 @@
1
- export * from './_namespaces.js';
2
- export * from './chat.vocab.js';
3
- export * from './message.vocab.js';
4
- export * from './contact.vocab.js';
5
- export * from './thread.vocab.js';
6
- export * from './workspace.vocab.js';
@@ -1,6 +0,0 @@
1
- export * from './_namespaces.js';
2
- export * from './chat.vocab.js';
3
- export * from './message.vocab.js';
4
- export * from './contact.vocab.js';
5
- export * from './thread.vocab.js';
6
- export * from './workspace.vocab.js';
@@ -1,20 +0,0 @@
1
- export declare const MessageVocab: {
2
- readonly thread: string;
3
- readonly chat: string;
4
- readonly maker: string;
5
- readonly role: string;
6
- readonly content: string;
7
- readonly richContent: string;
8
- readonly status: string;
9
- readonly replacedBy: string;
10
- readonly deletedAt: string;
11
- readonly createdAt: string;
12
- readonly updatedAt: string;
13
- readonly senderName: string;
14
- readonly senderAvatarUrl: string;
15
- readonly mentions: string;
16
- readonly replyTo: string;
17
- readonly routedBy: string;
18
- readonly routeTargetAgentId: string;
19
- readonly coordinationId: string;
20
- };
@@ -1,24 +0,0 @@
1
- import { DCTerms, FOAF, LINX_MSG, SCHEMA, SIOC, UDFS, WF } from '../namespaces.js';
2
- export const MessageVocab = {
3
- // Existing
4
- thread: SIOC.hasContainer,
5
- chat: WF.message,
6
- maker: FOAF.maker,
7
- role: UDFS.messageType,
8
- content: SIOC.content,
9
- richContent: SIOC.richContent,
10
- status: UDFS.messageStatus,
11
- replacedBy: DCTerms.isReplacedBy,
12
- deletedAt: SCHEMA.dateDeleted,
13
- createdAt: DCTerms.created,
14
- updatedAt: DCTerms.modified,
15
- // Group message extensions
16
- senderName: LINX_MSG.senderName,
17
- senderAvatarUrl: LINX_MSG.senderAvatarUrl,
18
- mentions: LINX_MSG.mentions,
19
- replyTo: LINX_MSG.replyTo,
20
- // Multi-AI routing
21
- routedBy: LINX_MSG.routedBy,
22
- routeTargetAgentId: LINX_MSG.routeTargetAgentId,
23
- coordinationId: LINX_MSG.coordinationId,
24
- };
@@ -1,11 +0,0 @@
1
- export declare const ThreadVocab: {
2
- readonly chatId: string;
3
- readonly title: string;
4
- readonly starred: string;
5
- readonly status: string;
6
- readonly metadata: string;
7
- readonly createdAt: string;
8
- readonly updatedAt: string;
9
- readonly workspace: string;
10
- readonly type: string;
11
- };
@@ -1,14 +0,0 @@
1
- import { DCTerms, LINX_CHAT, SIOC, UDFS } from '../namespaces.js';
2
- export const ThreadVocab = {
3
- chatId: SIOC.has_parent,
4
- title: DCTerms.title,
5
- starred: UDFS.favorite,
6
- status: UDFS.status,
7
- metadata: UDFS.metadata,
8
- createdAt: DCTerms.created,
9
- updatedAt: DCTerms.modified,
10
- // Execution context: workspace container (Agent@workspace)
11
- workspace: LINX_CHAT.workspace,
12
- // Type marker (for SPARQL convenience)
13
- type: SIOC.Thread,
14
- };
@@ -1,12 +0,0 @@
1
- export declare const WorkspaceVocab: {
2
- readonly title: string;
3
- readonly workspaceType: string;
4
- readonly kind: string;
5
- readonly rootUri: string;
6
- readonly repoRootUri: string;
7
- readonly baseRef: string;
8
- readonly branch: string;
9
- readonly createdAt: string;
10
- readonly updatedAt: string;
11
- readonly type: string;
12
- };
@@ -1,13 +0,0 @@
1
- import { DCTerms, UDFS } from '../namespaces.js';
2
- export const WorkspaceVocab = {
3
- title: DCTerms.title,
4
- workspaceType: UDFS.workspaceType,
5
- kind: UDFS.workspaceKind,
6
- rootUri: UDFS.rootUri,
7
- repoRootUri: UDFS.repoRootUri,
8
- baseRef: UDFS.baseRef,
9
- branch: UDFS.branch,
10
- createdAt: DCTerms.created,
11
- updatedAt: DCTerms.modified,
12
- type: UDFS.Workspace,
13
- };
@@ -1 +0,0 @@
1
- export * from './vocab/index.js';
@@ -1 +0,0 @@
1
- export * from './vocab/index.js';
@@ -1,35 +0,0 @@
1
- export declare const WORKSPACE_TYPES: readonly ["pod", "local"];
2
- export type WorkspaceType = typeof WORKSPACE_TYPES[number];
3
- export declare const WORKSPACE_KINDS: readonly ["folder", "git", "worktree"];
4
- export type WorkspaceKind = typeof WORKSPACE_KINDS[number];
5
- /**
6
- * Workspace schema.
7
- *
8
- * Only Pod-backed workspace metadata is persisted here.
9
- * Local workspaces are addressed directly via `linx://{node-id}/path/to/root`.
10
- */
11
- export declare const workspaceTable: import("@undefineds.co/models/_drizzle-solid/pod-table").PodTableWithColumns<import("@undefineds.co/models/_drizzle-solid/types").ResolvedColumns<{
12
- id: import("@undefineds.co/models/_drizzle-solid/columns").PodStringColumn<false, false>;
13
- title: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
14
- workspaceType: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, true, true>;
15
- kind: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, true, true>;
16
- rootUri: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
17
- repoRootUri: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
18
- baseRef: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
19
- branch: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
20
- createdAt: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"datetime", null, true, true>;
21
- updatedAt: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"datetime", null, true, true>;
22
- }>>;
23
- export type WorkspaceRow = typeof workspaceTable.$inferSelect;
24
- export type WorkspaceInsert = typeof workspaceTable.$inferInsert;
25
- export type WorkspaceUpdate = typeof workspaceTable.$inferUpdate;
26
- export declare function getWorkspaceContainerPath(workspaceId: string): string;
27
- export declare function resolveWorkspaceContainerUri(podBaseUrl: string, workspaceId: string): string;
28
- export declare function parseWorkspaceIdFromContainerUri(workspaceUri?: string | null): string | null;
29
- export declare function normalizeLocalWorkspacePath(value?: string | null): string | undefined;
30
- export declare function buildLocalWorkspaceUri(nodeId: string, rootPath: string): string;
31
- export declare function isLocalWorkspaceUri(workspaceUri?: string | null): boolean;
32
- export declare function parseLocalWorkspaceUri(workspaceUri?: string | null): {
33
- nodeId: string;
34
- path: string;
35
- } | null;