@undefineds.co/models 0.2.19 → 0.2.22
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.
- package/README.md +178 -522
- package/dist/agent.repository.js +2 -2
- package/dist/agent.schema.d.ts +20 -3
- package/dist/agent.schema.js +3 -1
- package/dist/ai-config/index.d.ts +24 -0
- package/dist/ai-config/index.js +133 -23
- package/dist/ai-model.schema.d.ts +13 -3
- package/dist/ai-model.schema.js +6 -4
- package/dist/ai-provider.schema.d.ts +13 -3
- package/dist/ai-provider.schema.js +7 -3
- package/dist/ai-runtime.schema.d.ts +84 -0
- package/dist/ai-runtime.schema.js +64 -0
- package/dist/approval.schema.d.ts +1 -0
- package/dist/approval.schema.js +11 -0
- package/dist/audit.schema.d.ts +1 -0
- package/dist/audit.schema.js +11 -0
- package/dist/chat.repository.js +2 -2
- package/dist/chat.schema.d.ts +1 -1
- package/dist/chat.schema.js +1 -1
- package/dist/contact.repository.js +2 -2
- package/dist/contact.schema.d.ts +26 -4
- package/dist/contact.schema.js +4 -2
- package/dist/credential.schema.d.ts +111 -3
- package/dist/credential.schema.js +15 -2
- package/dist/favorite/favorite.schema.d.ts +18 -4
- package/dist/favorite/favorite.schema.js +4 -2
- package/dist/favorite/index.d.ts +1 -1
- package/dist/favorite/index.js +1 -1
- package/dist/favorite/starred-sync.d.ts +2 -2
- package/dist/favorite/starred-sync.js +4 -4
- package/dist/file/file.schema.d.ts +26 -5
- package/dist/file/file.schema.js +5 -3
- package/dist/file/index.d.ts +1 -1
- package/dist/file/index.js +1 -1
- package/dist/grant.schema.d.ts +1 -0
- package/dist/grant.schema.js +3 -0
- package/dist/inbox-notification.schema.d.ts +10 -3
- package/dist/inbox-notification.schema.js +3 -1
- package/dist/index.d.ts +17 -17
- package/dist/index.js +17 -21
- package/dist/message.repository.js +2 -2
- package/dist/message.schema.js +8 -8
- package/dist/namespaces.d.ts +0 -3
- package/dist/namespaces.js +33 -7
- package/dist/profile.d.ts +2 -1
- package/dist/profile.js +6 -3
- package/dist/profile.repository.js +3 -3
- package/dist/profile.schema.d.ts +16 -3
- package/dist/profile.schema.js +3 -1
- package/dist/repository.d.ts +6 -1
- package/dist/repository.js +6 -1
- package/dist/schema.d.ts +102 -10
- package/dist/schema.js +31 -21
- package/dist/session/index.d.ts +1 -1
- package/dist/session/index.js +1 -1
- package/dist/session/session.schema.d.ts +7 -2
- package/dist/session/session.schema.js +32 -4
- package/dist/session.repository.d.ts +4 -0
- package/dist/session.repository.js +2 -2
- package/dist/settings/index.d.ts +1 -1
- package/dist/settings/index.js +1 -1
- package/dist/settings/settings.schema.d.ts +17 -5
- package/dist/settings/settings.schema.js +4 -2
- package/dist/thread.repository.js +2 -2
- package/dist/thread.schema.js +2 -2
- package/dist/vocab/message.vocab.js +8 -8
- package/dist/vocab/thread.vocab.js +2 -2
- package/package.json +15 -8
- package/dist/watch/index.d.ts +0 -281
- package/dist/watch/index.js +0 -1493
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { UDFS, UDFS_NAMESPACE, SIOC, DCTerms, SCHEMA, RDF, RDFS, ACL, ODRL, OWL, FOAF, MEETING, AS, VCARD, WF, LDP, XPOD_CREDENTIAL, XPOD_AI, } from "./namespaces";
|
|
2
2
|
export * from "./vocab";
|
|
3
3
|
export * from './profile';
|
|
4
4
|
export * from './profile.repository';
|
|
5
5
|
export * from './profile.schema';
|
|
6
|
-
export { ContactGender, contactTable, ContactClass, ContactType, isAgentContact, isGroupContact, normalizeContactGender, type ContactRow, type ContactInsert, type ContactUpdate, type ContactClassValue, type ContactGenderValue, type ContactTypeValue, } from './contact.schema';
|
|
6
|
+
export { ContactGender, contactResource, contactTable, ContactClass, ContactType, isAgentContact, isGroupContact, normalizeContactGender, type ContactRow, type ContactInsert, type ContactUpdate, type ContactClassValue, type ContactGenderValue, type ContactTypeValue, } from './contact.schema';
|
|
7
7
|
export { contactRepository } from './contact.repository';
|
|
8
8
|
export { chatResource, chatTable, type ChatMetadata, type ChatMemberRole, type ChatRow, type ChatInsert, type ChatUpdate, } from './chat.schema';
|
|
9
9
|
export { chatRepository } from './chat.repository';
|
|
@@ -15,31 +15,31 @@ export { messageRepository } from './message.repository';
|
|
|
15
15
|
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';
|
|
16
16
|
export { type ToolApprovalBlock, type ToolCallBlock, type TaskProgressBlock, type CollaborationRichBlock, type ToolRisk, type ToolApprovalStatus, type ToolCallStatus, type TaskProgressStepStatus, } from "./types/collaboration-blocks";
|
|
17
17
|
export * from "./fixtures/contracts-chat-contact";
|
|
18
|
-
export { fileTable, type FileRow, type FileInsert, type FileUpdate, } from './file';
|
|
19
|
-
export { favoriteTable, type FavoriteRow, type FavoriteInsert, type FavoriteUpdate, createStarredSyncHook, registerDbForStarredSync, chatStarredSyncHook, threadStarredSyncHook, contactStarredSyncHook, chatSnapshotExtractor, threadSnapshotExtractor, contactSnapshotExtractor, type SnapshotExtractor, type StarredSyncConfig, type SourceModule, } from './favorite';
|
|
20
|
-
export { settingsTable, SETTING_KEYS, type SettingKey, type SettingsRow, type SettingsInsert, type SettingsUpdate, } from './settings';
|
|
21
|
-
export { agentTable, type AgentRow, type AgentInsert, type AgentUpdate, } from './agent.schema';
|
|
18
|
+
export { fileResource, fileTable, type FileRow, type FileInsert, type FileUpdate, } from './file';
|
|
19
|
+
export { favoriteResource, favoriteTable, type FavoriteRow, type FavoriteInsert, type FavoriteUpdate, createStarredSyncHook, registerDbForStarredSync, chatStarredSyncHook, threadStarredSyncHook, contactStarredSyncHook, chatSnapshotExtractor, threadSnapshotExtractor, contactSnapshotExtractor, type SnapshotExtractor, type StarredSyncConfig, type SourceModule, } from './favorite';
|
|
20
|
+
export { settingsResource, settingsTable, SETTING_KEYS, type SettingKey, type SettingsRow, type SettingsInsert, type SettingsUpdate, } from './settings';
|
|
21
|
+
export { agentResource, agentTable, type AgentRow, type AgentInsert, type AgentUpdate, } from './agent.schema';
|
|
22
22
|
export { agentRepository } from './agent.repository';
|
|
23
23
|
export { DEFAULT_AGENT_PROVIDERS, type AgentProviderMetadata, type AgentModelOption, } from './agent.providers';
|
|
24
|
-
export { sessionResource, sessionTable, buildRuntimeSessionIri, extractRuntimeSessionId, type SessionType, type SessionStatus, type SessionRow, type SessionInsert, type SessionUpdate, } from './session';
|
|
24
|
+
export { sessionResource, sessionTable, buildSessionResourceId, buildSessionSubjectPath, buildRuntimeSessionIri, extractSessionIdFromSessionRef, extractRuntimeSessionId, type SessionType, type SessionStatus, type SessionRow, type SessionInsert, type SessionUpdate, } from './session';
|
|
25
25
|
export { sessionRepository } from './session.repository';
|
|
26
|
-
export { approvalResource, approvalTable, extractApprovalIdFromApprovalRef, type ApprovalRow, type ApprovalInsert, type ApprovalUpdate, } from './approval.schema';
|
|
27
|
-
export { auditResource, auditTable, extractAuditIdFromAuditRef, type AuditRow, type AuditInsert, type AuditUpdate, } from './audit.schema';
|
|
26
|
+
export { approvalResource, approvalTable, buildApprovalSubjectPath, extractApprovalIdFromApprovalRef, type ApprovalRow, type ApprovalInsert, type ApprovalUpdate, } from './approval.schema';
|
|
27
|
+
export { auditResource, auditTable, buildAuditSubjectPath, extractAuditIdFromAuditRef, type AuditRow, type AuditInsert, type AuditUpdate, } from './audit.schema';
|
|
28
28
|
export { buildAuditDetailRecord, buildAuditPresentation, createResolvedAuthTimestampsIndex, formatAuditActorRole, formatInboxStatusLabel, type AuditPresentation, } from './audit.presentation';
|
|
29
|
-
export { grantResource, grantTable, type GrantRow, type GrantInsert, type GrantUpdate, } from './grant.schema';
|
|
30
|
-
export { inboxNotificationTable, type InboxNotificationRow, type InboxNotificationInsert, type InboxNotificationUpdate, } from './inbox-notification.schema';
|
|
29
|
+
export { grantResource, grantTable, buildGrantSubjectPath, type GrantRow, type GrantInsert, type GrantUpdate, } from './grant.schema';
|
|
30
|
+
export { inboxNotificationResource, inboxNotificationTable, type InboxNotificationRow, type InboxNotificationInsert, type InboxNotificationUpdate, } from './inbox-notification.schema';
|
|
31
31
|
export { ApprovalVocab, AuditVocab, GrantVocab, InboxNotificationVocab } from './vocab/sidecar.vocab';
|
|
32
32
|
export * from './sidecar/sidecar-events';
|
|
33
33
|
export * from './sidecar/persistence-mapping';
|
|
34
34
|
export { knowledgeFolderSchema, type KnowledgeFolderScope } from './knowledge';
|
|
35
35
|
export { extensionSchema } from './extension';
|
|
36
|
-
export { credentialTable, type CredentialRow, type CredentialInsert, type CredentialUpdate, } from "./credential.schema";
|
|
37
|
-
export { aiProviderTable, type AIProviderRow, type AIProviderInsert, type AIProviderUpdate, } from "./ai-provider.schema";
|
|
38
|
-
export { aiModelTable, type AIModelRow, type AIModelInsert, type AIModelUpdate, } from "./ai-model.schema";
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
36
|
+
export { apiKeyCredentialResource, apiKeyCredentialTable, credentialResource, credentialTable, oauthCredentialResource, oauthCredentialTable, type ApiKeyCredentialRow, type ApiKeyCredentialInsert, type ApiKeyCredentialUpdate, type CredentialRow, type CredentialInsert, type CredentialUpdate, type OAuthCredentialRow, type OAuthCredentialInsert, type OAuthCredentialUpdate, } from "./credential.schema";
|
|
37
|
+
export { aiProviderResource, aiProviderTable, type AIProviderRow, type AIProviderInsert, type AIProviderUpdate, } from "./ai-provider.schema";
|
|
38
|
+
export { aiModelResource, aiModelTable, type AIModelRow, type AIModelInsert, type AIModelUpdate, } from "./ai-model.schema";
|
|
39
|
+
export { agentStatusResource, agentStatusTable, aiConfigResource, aiConfigTable, indexedFileResource, indexedFileTable, vectorStoreResource, vectorStoreTable, type AgentStatusRow, type AgentStatusInsert, type AgentStatusUpdate, type AIConfigRow, type AIConfigInsert, type AIConfigUpdate as AIConfigResourceUpdate, type IndexedFileRow, type IndexedFileInsert, type IndexedFileUpdate, type VectorStoreRow, type VectorStoreInsert, type VectorStoreUpdate, } from './ai-runtime.schema';
|
|
40
|
+
export { aiConfigModelRef, aiConfigModelUri, aiConfigProviderRef, aiConfigProviderUri, buildAIConfigDisconnectPlan, buildAIConfigMutationPlan, buildAIConfigProviderStateMap, getAIConfigDefaultBaseUrl, getAIConfigProviderCatalog, getAIConfigProviderFamilyIds, getAIConfigProviderMetadata, getDefaultAIConfigCredentialId, normalizeAIConfigProviderId, normalizeAIConfigModelId, normalizeAIConfigResourceId, sameAIConfigProviderFamily, selectAIConfigCredential, type AIConfigModel, type AIConfigCredentialSelection, type AIConfigDisconnectPlan, type AIConfigMutationPlan, type AIConfigProviderCatalogEntry, type AIConfigProviderState, type AIConfigUpdate, type BuildAIConfigProviderStateMapOptions, } from './ai-config';
|
|
41
41
|
export { applySolidComunicaPatches, } from './comunica-patches';
|
|
42
|
-
export { createRepositoryDescriptor, definePodRepository, initSolidTables, type AnyPodTable, type PodRepositoryDescriptor, type RepositoryCacheOptions, type RepositoryInvalidations, type RepositoryScope, type SolidDatabase, } from './repository';
|
|
42
|
+
export { createRepositoryDescriptor, definePodRepository, initSolidResources, initSolidTables, type AnyPodResource, type AnyPodTable, type PodRepositoryDescriptor, type RepositoryCacheOptions, type RepositoryInvalidations, type RepositoryScope, type SolidDatabase, } from './repository';
|
|
43
43
|
export { importJobSchema } from './import';
|
|
44
44
|
export { eq, ne, and, or, drizzle } from '@undefineds.co/drizzle-solid';
|
|
45
45
|
export { solidResources, solidSchema } from './schema';
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
// ============================================
|
|
2
2
|
// 命名空间和词汇表
|
|
3
3
|
// ============================================
|
|
4
|
-
export {
|
|
5
|
-
// Legacy + Wave A aliases
|
|
6
|
-
LINQ, UDFS, UDFS_NAMESPACE,
|
|
7
|
-
// Wave A contracts
|
|
8
|
-
LINX_CHAT, LINX_MSG,
|
|
4
|
+
export { UDFS, UDFS_NAMESPACE,
|
|
9
5
|
// Standard vocabs
|
|
10
6
|
SIOC, DCTerms, SCHEMA, RDF, RDFS, ACL, ODRL, OWL, FOAF, MEETING, AS, VCARD, WF, LDP,
|
|
11
7
|
// xpod vocabs
|
|
@@ -20,7 +16,7 @@ export * from './profile.js';
|
|
|
20
16
|
export * from './profile.repository.js';
|
|
21
17
|
export * from './profile.schema.js';
|
|
22
18
|
// Contact - 联系人 (unified index for Solid users, external users, and AI agents)
|
|
23
|
-
export { ContactGender, contactTable, ContactClass, ContactType, isAgentContact, isGroupContact, normalizeContactGender, } from './contact.schema.js';
|
|
19
|
+
export { ContactGender, contactResource, contactTable, ContactClass, ContactType, isAgentContact, isGroupContact, normalizeContactGender, } from './contact.schema.js';
|
|
24
20
|
export { contactRepository } from './contact.repository.js';
|
|
25
21
|
// Chat & Message - 聊天和消息
|
|
26
22
|
export { chatResource, chatTable, } from './chat.schema.js';
|
|
@@ -35,29 +31,29 @@ export { MessageBlockType, MessageBlockStatus, createMessageBlock, isBlockType,
|
|
|
35
31
|
// Wave A CP0: fixtures for downstream parallel development
|
|
36
32
|
export * from "./fixtures/contracts-chat-contact.js";
|
|
37
33
|
// File - 文件管理
|
|
38
|
-
export { fileTable, } from './file/index.js';
|
|
34
|
+
export { fileResource, fileTable, } from './file/index.js';
|
|
39
35
|
// Favorite - 收藏
|
|
40
|
-
export { favoriteTable,
|
|
36
|
+
export { favoriteResource, favoriteTable,
|
|
41
37
|
// Starred Sync Hook
|
|
42
38
|
createStarredSyncHook, registerDbForStarredSync, chatStarredSyncHook, threadStarredSyncHook, contactStarredSyncHook, chatSnapshotExtractor, threadSnapshotExtractor, contactSnapshotExtractor, } from './favorite/index.js';
|
|
43
39
|
// Settings - 用户设置
|
|
44
|
-
export { settingsTable, SETTING_KEYS, } from './settings/index.js';
|
|
40
|
+
export { settingsResource, settingsTable, SETTING_KEYS, } from './settings/index.js';
|
|
45
41
|
// Agent - AI 助手配置
|
|
46
|
-
export { agentTable, } from './agent.schema.js';
|
|
42
|
+
export { agentResource, agentTable, } from './agent.schema.js';
|
|
47
43
|
export { agentRepository } from './agent.repository.js';
|
|
48
44
|
export { DEFAULT_AGENT_PROVIDERS, } from './agent.providers.js';
|
|
49
45
|
// ============================================
|
|
50
46
|
// 其他模型
|
|
51
47
|
// ============================================
|
|
52
48
|
// Session - 会话管理
|
|
53
|
-
export { sessionResource, sessionTable, buildRuntimeSessionIri, extractRuntimeSessionId, } from './session/index.js';
|
|
49
|
+
export { sessionResource, sessionTable, buildSessionResourceId, buildSessionSubjectPath, buildRuntimeSessionIri, extractSessionIdFromSessionRef, extractRuntimeSessionId, } from './session/index.js';
|
|
54
50
|
export { sessionRepository } from './session.repository.js';
|
|
55
51
|
// Approval / Audit / Grant / Inbox Notification
|
|
56
|
-
export { approvalResource, approvalTable, extractApprovalIdFromApprovalRef, } from './approval.schema.js';
|
|
57
|
-
export { auditResource, auditTable, extractAuditIdFromAuditRef, } from './audit.schema.js';
|
|
52
|
+
export { approvalResource, approvalTable, buildApprovalSubjectPath, extractApprovalIdFromApprovalRef, } from './approval.schema.js';
|
|
53
|
+
export { auditResource, auditTable, buildAuditSubjectPath, extractAuditIdFromAuditRef, } from './audit.schema.js';
|
|
58
54
|
export { buildAuditDetailRecord, buildAuditPresentation, createResolvedAuthTimestampsIndex, formatAuditActorRole, formatInboxStatusLabel, } from './audit.presentation.js';
|
|
59
|
-
export { grantResource, grantTable, } from './grant.schema.js';
|
|
60
|
-
export { inboxNotificationTable, } from './inbox-notification.schema.js';
|
|
55
|
+
export { grantResource, grantTable, buildGrantSubjectPath, } from './grant.schema.js';
|
|
56
|
+
export { inboxNotificationResource, inboxNotificationTable, } from './inbox-notification.schema.js';
|
|
61
57
|
// Sidecar vocab + runtime contracts
|
|
62
58
|
export { ApprovalVocab, AuditVocab, GrantVocab, InboxNotificationVocab } from './vocab/sidecar.vocab.js';
|
|
63
59
|
export * from './sidecar/sidecar-events.js';
|
|
@@ -67,13 +63,13 @@ export { knowledgeFolderSchema } from './knowledge/index.js';
|
|
|
67
63
|
// Extension - 扩展
|
|
68
64
|
export { extensionSchema } from './extension/index.js';
|
|
69
65
|
// xpod AI schema
|
|
70
|
-
export { credentialTable, } from "./credential.schema.js";
|
|
71
|
-
export { aiProviderTable, } from "./ai-provider.schema.js";
|
|
72
|
-
export { aiModelTable, } from "./ai-model.schema.js";
|
|
73
|
-
export {
|
|
74
|
-
export {
|
|
66
|
+
export { apiKeyCredentialResource, apiKeyCredentialTable, credentialResource, credentialTable, oauthCredentialResource, oauthCredentialTable, } from "./credential.schema.js";
|
|
67
|
+
export { aiProviderResource, aiProviderTable, } from "./ai-provider.schema.js";
|
|
68
|
+
export { aiModelResource, aiModelTable, } from "./ai-model.schema.js";
|
|
69
|
+
export { agentStatusResource, agentStatusTable, aiConfigResource, aiConfigTable, indexedFileResource, indexedFileTable, vectorStoreResource, vectorStoreTable, } from './ai-runtime.schema.js';
|
|
70
|
+
export { aiConfigModelRef, aiConfigModelUri, aiConfigProviderRef, aiConfigProviderUri, buildAIConfigDisconnectPlan, buildAIConfigMutationPlan, buildAIConfigProviderStateMap, getAIConfigDefaultBaseUrl, getAIConfigProviderCatalog, getAIConfigProviderFamilyIds, getAIConfigProviderMetadata, getDefaultAIConfigCredentialId, normalizeAIConfigProviderId, normalizeAIConfigModelId, normalizeAIConfigResourceId, sameAIConfigProviderFamily, selectAIConfigCredential, } from './ai-config/index.js';
|
|
75
71
|
export { applySolidComunicaPatches, } from './comunica-patches.js';
|
|
76
|
-
export { createRepositoryDescriptor, definePodRepository, initSolidTables, } from './repository.js';
|
|
72
|
+
export { createRepositoryDescriptor, definePodRepository, initSolidResources, initSolidTables, } from './repository.js';
|
|
77
73
|
// Import Job - 导入任务
|
|
78
74
|
export { importJobSchema } from './import/index.js';
|
|
79
75
|
// ============================================
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { definePodRepository } from './repository.js';
|
|
2
|
-
import {
|
|
2
|
+
import { messageResource } from './message.schema.js';
|
|
3
3
|
export const messageRepository = definePodRepository({
|
|
4
4
|
namespace: 'message',
|
|
5
|
-
table:
|
|
5
|
+
table: messageResource,
|
|
6
6
|
searchableFields: ['content'],
|
|
7
7
|
defaultSort: { field: 'createdAt', direction: 'asc' },
|
|
8
8
|
});
|
package/dist/message.schema.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { podTable, uri, string, text, timestamp, id } from '@undefineds.co/drizzle-solid';
|
|
2
|
-
import { UDFS, DCTerms, FOAF,
|
|
2
|
+
import { UDFS, DCTerms, FOAF, MEETING, SCHEMA, SIOC, WF } from './namespaces.js';
|
|
3
3
|
import { chatResource } from './chat.schema.js';
|
|
4
4
|
import { threadResource } from './thread.schema.js';
|
|
5
5
|
/**
|
|
@@ -34,14 +34,14 @@ export const messageResource = podTable('chat_message', {
|
|
|
34
34
|
replacedBy: string('replacedBy').predicate(DCTerms.isReplacedBy),
|
|
35
35
|
deletedAt: timestamp('deletedAt').predicate(SCHEMA.dateDeleted),
|
|
36
36
|
// Group message extensions
|
|
37
|
-
senderName: string('senderName').predicate(
|
|
38
|
-
senderAvatarUrl: uri('senderAvatarUrl').predicate(
|
|
39
|
-
mentions: uri('mentions').array().predicate(
|
|
40
|
-
replyTo: uri('replyTo').predicate(
|
|
37
|
+
senderName: string('senderName').predicate(UDFS.senderName),
|
|
38
|
+
senderAvatarUrl: uri('senderAvatarUrl').predicate(UDFS.senderAvatarUrl),
|
|
39
|
+
mentions: uri('mentions').array().predicate(UDFS.mentions),
|
|
40
|
+
replyTo: uri('replyTo').predicate(UDFS.replyTo),
|
|
41
41
|
// Multi-AI routing
|
|
42
|
-
routedBy: uri('routedBy').predicate(
|
|
43
|
-
routeTargetAgentId: string('routeTargetAgentId').predicate(
|
|
44
|
-
coordinationId: string('coordinationId').predicate(
|
|
42
|
+
routedBy: uri('routedBy').predicate(UDFS.routedBy),
|
|
43
|
+
routeTargetAgentId: string('routeTargetAgentId').predicate(UDFS.routeTargetAgentId),
|
|
44
|
+
coordinationId: string('coordinationId').predicate(UDFS.coordinationId),
|
|
45
45
|
createdAt: timestamp('createdAt').predicate(DCTerms.created).notNull().defaultNow(),
|
|
46
46
|
updatedAt: timestamp('updatedAt').predicate(DCTerms.modified),
|
|
47
47
|
}, {
|
package/dist/namespaces.d.ts
CHANGED
|
@@ -171,8 +171,5 @@ export declare const WF: NamespaceObject;
|
|
|
171
171
|
export declare const AS: NamespaceObject;
|
|
172
172
|
export declare const UDFS: NamespaceObject;
|
|
173
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;
|
|
177
174
|
export declare const XPOD_CREDENTIAL: NamespaceObject;
|
|
178
175
|
export declare const XPOD_AI: NamespaceObject;
|
package/dist/namespaces.js
CHANGED
|
@@ -110,6 +110,7 @@ export const UDFS = createNamespace('udfs', 'https://undefineds.co/ns#', {
|
|
|
110
110
|
inThread: 'inThread',
|
|
111
111
|
participants: 'participants',
|
|
112
112
|
messageContent: 'messageContent',
|
|
113
|
+
messageResource: 'messageResource',
|
|
113
114
|
messageType: 'messageType',
|
|
114
115
|
messageStatus: 'messageStatus',
|
|
115
116
|
readBy: 'readBy',
|
|
@@ -231,31 +232,38 @@ export const UDFS = createNamespace('udfs', 'https://undefineds.co/ns#', {
|
|
|
231
232
|
snapshotMeta: 'snapshotMeta',
|
|
232
233
|
});
|
|
233
234
|
export const UDFS_NAMESPACE = UDFS.NAMESPACE;
|
|
234
|
-
// Legacy alias: existing code may still import LINQ.
|
|
235
|
-
// Keep as alias to avoid churn.
|
|
236
|
-
export const LINQ = UDFS;
|
|
237
|
-
// Wave A contracts: unified under company namespace (UDFS).
|
|
238
|
-
// Keep legacy names as aliases to avoid downstream churn.
|
|
239
|
-
export const LINX_CHAT = UDFS;
|
|
240
|
-
export const LINX_MSG = UDFS;
|
|
241
235
|
export const XPOD_CREDENTIAL = createNamespace('cred', 'https://vocab.xpod.dev/credential#', {
|
|
242
236
|
Credential: 'Credential',
|
|
237
|
+
ApiKeyCredential: 'ApiKeyCredential',
|
|
238
|
+
OAuthCredential: 'OAuthCredential',
|
|
243
239
|
provider: 'provider',
|
|
244
240
|
service: 'service',
|
|
245
241
|
status: 'status',
|
|
246
242
|
apiKey: 'apiKey',
|
|
247
243
|
baseUrl: 'baseUrl',
|
|
244
|
+
proxyUrl: 'proxyUrl',
|
|
248
245
|
label: 'label',
|
|
246
|
+
isDefault: 'isDefault',
|
|
249
247
|
lastUsedAt: 'lastUsedAt',
|
|
250
248
|
failCount: 'failCount',
|
|
251
249
|
rateLimitResetAt: 'rateLimitResetAt',
|
|
250
|
+
oauthRefreshToken: 'oauthRefreshToken',
|
|
251
|
+
oauthAccessToken: 'oauthAccessToken',
|
|
252
|
+
oauthExpiresAt: 'oauthExpiresAt',
|
|
253
|
+
projectId: 'projectId',
|
|
254
|
+
organizationId: 'organizationId',
|
|
252
255
|
});
|
|
253
256
|
export const XPOD_AI = createNamespace('ai', 'https://vocab.xpod.dev/ai#', {
|
|
254
257
|
Provider: 'Provider',
|
|
255
258
|
Model: 'Model',
|
|
259
|
+
AIConfig: 'AIConfig',
|
|
260
|
+
VectorStore: 'VectorStore',
|
|
261
|
+
IndexedFile: 'IndexedFile',
|
|
262
|
+
AgentStatus: 'AgentStatus',
|
|
256
263
|
baseUrl: 'baseUrl',
|
|
257
264
|
proxyUrl: 'proxyUrl',
|
|
258
265
|
hasModel: 'hasModel',
|
|
266
|
+
defaultModel: 'defaultModel',
|
|
259
267
|
displayName: 'displayName',
|
|
260
268
|
modelType: 'modelType',
|
|
261
269
|
isProvidedBy: 'isProvidedBy',
|
|
@@ -263,4 +271,22 @@ export const XPOD_AI = createNamespace('ai', 'https://vocab.xpod.dev/ai#', {
|
|
|
263
271
|
status: 'status',
|
|
264
272
|
createdAt: 'createdAt',
|
|
265
273
|
updatedAt: 'updatedAt',
|
|
274
|
+
embeddingModel: 'embeddingModel',
|
|
275
|
+
previousModel: 'previousModel',
|
|
276
|
+
migrationStatus: 'migrationStatus',
|
|
277
|
+
migrationProgress: 'migrationProgress',
|
|
278
|
+
name: 'name',
|
|
279
|
+
container: 'container',
|
|
280
|
+
chunkingStrategy: 'chunkingStrategy',
|
|
281
|
+
lastActiveAt: 'lastActiveAt',
|
|
282
|
+
lastActivityAt: 'lastActivityAt',
|
|
283
|
+
fileUrl: 'fileUrl',
|
|
284
|
+
vectorId: 'vectorId',
|
|
285
|
+
usageBytes: 'usageBytes',
|
|
286
|
+
lastError: 'lastError',
|
|
287
|
+
indexedAt: 'indexedAt',
|
|
288
|
+
agentId: 'agentId',
|
|
289
|
+
startedAt: 'startedAt',
|
|
290
|
+
currentTaskId: 'currentTaskId',
|
|
291
|
+
errorMessage: 'errorMessage',
|
|
266
292
|
});
|
package/dist/profile.d.ts
CHANGED
|
@@ -8,12 +8,13 @@ export interface SolidProfileSessionLike {
|
|
|
8
8
|
fetch?: typeof fetch;
|
|
9
9
|
}
|
|
10
10
|
export interface SolidProfileReader<TTable = unknown> {
|
|
11
|
-
findByIri(
|
|
11
|
+
findByIri(resource: TTable, iri: string): Promise<unknown | null>;
|
|
12
12
|
}
|
|
13
13
|
export declare function createSolidProfileDatabase(session: unknown): Promise<SolidProfileReader>;
|
|
14
14
|
export declare function applySolidProfileComunicaPatches(): boolean;
|
|
15
15
|
export declare function resolveSolidProfile(db: SolidProfileReader, webId: string): Promise<SolidProfileRow | null>;
|
|
16
16
|
export declare function resolveSolidProfileWithTable<TTable>(db: SolidProfileReader<TTable>, webId: string, table: TTable): Promise<SolidProfileRow | null>;
|
|
17
|
+
export declare function resolveSolidProfileWithResource<TResource>(db: SolidProfileReader<TResource>, webId: string, resource: TResource): Promise<SolidProfileRow | null>;
|
|
17
18
|
export declare function resolveSolidProfileDisplayName(db: SolidProfileReader, webId: string): Promise<string | null>;
|
|
18
19
|
export declare function resolveSolidProfileIdentityWithReader(db: SolidProfileReader, webId: string): Promise<SolidProfileIdentity | null>;
|
|
19
20
|
export declare function resolveSolidProfileIdentityFromWebIdDocument(session: SolidProfileSessionLike, options?: {
|
package/dist/profile.js
CHANGED
|
@@ -6,14 +6,14 @@ import { applySolidComunicaPatches } from "./comunica-patches.js";
|
|
|
6
6
|
export { pickSolidProfileDisplayName, profileRepository, } from "./profile.repository.js";
|
|
7
7
|
export async function createSolidProfileDatabase(session) {
|
|
8
8
|
applySolidProfileComunicaPatches();
|
|
9
|
-
const [{ drizzle }, {
|
|
9
|
+
const [{ drizzle }, { solidProfileResource }] = await Promise.all([
|
|
10
10
|
import("@undefineds.co/drizzle-solid"),
|
|
11
11
|
import("./profile.schema.js"),
|
|
12
12
|
]);
|
|
13
13
|
return drizzle(session, {
|
|
14
14
|
logger: false,
|
|
15
15
|
disableInteropDiscovery: true,
|
|
16
|
-
schema: {
|
|
16
|
+
schema: { solidProfileResource },
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
export function applySolidProfileComunicaPatches() {
|
|
@@ -23,10 +23,13 @@ export async function resolveSolidProfile(db, webId) {
|
|
|
23
23
|
return await profileRepository.findByWebId(db, webId);
|
|
24
24
|
}
|
|
25
25
|
export async function resolveSolidProfileWithTable(db, webId, table) {
|
|
26
|
+
return resolveSolidProfileWithResource(db, webId, table);
|
|
27
|
+
}
|
|
28
|
+
export async function resolveSolidProfileWithResource(db, webId, resource) {
|
|
26
29
|
if (!webId.trim()) {
|
|
27
30
|
return null;
|
|
28
31
|
}
|
|
29
|
-
return await db.findByIri(
|
|
32
|
+
return await db.findByIri(resource, webId);
|
|
30
33
|
}
|
|
31
34
|
export async function resolveSolidProfileDisplayName(db, webId) {
|
|
32
35
|
return await profileRepository.resolveDisplayName(db, webId);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { extractProfileUsernameFromWebId } from './client/index.js';
|
|
2
2
|
import { definePodRepository } from './repository.js';
|
|
3
|
-
import {
|
|
3
|
+
import { solidProfileResource, } from './profile.schema.js';
|
|
4
4
|
const baseProfileRepository = definePodRepository({
|
|
5
5
|
namespace: 'profile',
|
|
6
|
-
table:
|
|
6
|
+
table: solidProfileResource,
|
|
7
7
|
searchableFields: ['name', 'nick'],
|
|
8
8
|
disableMutations: {
|
|
9
9
|
create: true,
|
|
@@ -17,7 +17,7 @@ export const profileRepository = {
|
|
|
17
17
|
if (!webId.trim()) {
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
|
-
return await db.findByIri?.(
|
|
20
|
+
return await db.findByIri?.(solidProfileResource, webId) ?? null;
|
|
21
21
|
},
|
|
22
22
|
async resolveDisplayName(db, webId) {
|
|
23
23
|
return pickSolidProfileDisplayName(await profileRepository.findByWebId(db, webId));
|
package/dist/profile.schema.d.ts
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
export declare const solidProfileResource: import("@undefineds.co/drizzle-solid/dist/core/schema/pod-table.js").PodTableWithColumns<import("@undefineds.co/drizzle-solid/dist/core/schema/types.js").ResolvedColumns<{
|
|
2
|
+
id: import("@undefineds.co/drizzle-solid/dist/core/schema/columns.js").PodStringColumn<false, false>;
|
|
3
|
+
name: import("@undefineds.co/drizzle-solid/dist/core/schema/columns.js").ColumnBuilder<"string", null, false, false>;
|
|
4
|
+
nick: import("@undefineds.co/drizzle-solid/dist/core/schema/columns.js").ColumnBuilder<"string", null, false, false>;
|
|
5
|
+
avatar: import("@undefineds.co/drizzle-solid/dist/core/schema/columns.js").ColumnBuilder<"string", null, false, false>;
|
|
6
|
+
note: import("@undefineds.co/drizzle-solid/dist/core/schema/columns.js").ColumnBuilder<"string", null, false, false>;
|
|
7
|
+
email: import("@undefineds.co/drizzle-solid/dist/core/schema/columns.js").ColumnBuilder<"string", null, false, false>;
|
|
8
|
+
phone: import("@undefineds.co/drizzle-solid/dist/core/schema/columns.js").ColumnBuilder<"string", null, false, false>;
|
|
9
|
+
region: import("@undefineds.co/drizzle-solid/dist/core/schema/columns.js").ColumnBuilder<"string", null, false, false>;
|
|
10
|
+
gender: import("@undefineds.co/drizzle-solid/dist/core/schema/columns.js").ColumnBuilder<"string", null, false, false>;
|
|
11
|
+
favorite: import("@undefineds.co/drizzle-solid/dist/core/schema/columns.js").ColumnBuilder<"string", null, false, false>;
|
|
12
|
+
inbox: import("@undefineds.co/drizzle-solid/dist/core/schema/columns.js").ColumnBuilder<"string", null, false, false>;
|
|
13
|
+
}>>;
|
|
1
14
|
export declare const solidProfileTable: import("@undefineds.co/drizzle-solid/dist/core/schema/pod-table.js").PodTableWithColumns<import("@undefineds.co/drizzle-solid/dist/core/schema/types.js").ResolvedColumns<{
|
|
2
15
|
id: import("@undefineds.co/drizzle-solid/dist/core/schema/columns.js").PodStringColumn<false, false>;
|
|
3
16
|
name: import("@undefineds.co/drizzle-solid/dist/core/schema/columns.js").ColumnBuilder<"string", null, false, false>;
|
|
@@ -11,6 +24,6 @@ export declare const solidProfileTable: import("@undefineds.co/drizzle-solid/dis
|
|
|
11
24
|
favorite: import("@undefineds.co/drizzle-solid/dist/core/schema/columns.js").ColumnBuilder<"string", null, false, false>;
|
|
12
25
|
inbox: import("@undefineds.co/drizzle-solid/dist/core/schema/columns.js").ColumnBuilder<"string", null, false, false>;
|
|
13
26
|
}>>;
|
|
14
|
-
export type SolidProfileRow = typeof
|
|
15
|
-
export type SolidProfileInsert = typeof
|
|
16
|
-
export type SolidProfileUpdate = typeof
|
|
27
|
+
export type SolidProfileRow = typeof solidProfileResource.$inferSelect;
|
|
28
|
+
export type SolidProfileInsert = typeof solidProfileResource.$inferInsert;
|
|
29
|
+
export type SolidProfileUpdate = typeof solidProfileResource.$inferUpdate;
|
package/dist/profile.schema.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { id, podTable, string } from "@undefineds.co/drizzle-solid";
|
|
2
2
|
import { FOAF, LDP, UDFS, VCARD } from "./namespaces.js";
|
|
3
|
-
export const
|
|
3
|
+
export const solidProfileResource = podTable("profile", {
|
|
4
4
|
id: id("id"),
|
|
5
5
|
name: string("name").predicate(VCARD.fn),
|
|
6
6
|
nick: string("nick").predicate(FOAF.nick),
|
|
@@ -17,3 +17,5 @@ export const solidProfileTable = podTable("profile", {
|
|
|
17
17
|
type: FOAF.Person,
|
|
18
18
|
namespace: UDFS,
|
|
19
19
|
});
|
|
20
|
+
// Compatibility alias. New model code should prefer `solidProfileResource`.
|
|
21
|
+
export const solidProfileTable = solidProfileResource;
|
package/dist/repository.d.ts
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { initSolidTables, type AnyPodTable } from '@undefineds.co/drizzle-solid';
|
|
2
|
+
export { createRepositoryDescriptor, definePodRepository, type PodRepositoryDescriptor, type RepositoryCacheOptions, type RepositoryInvalidations, type RepositoryScope, type SolidDatabase, } from '@undefineds.co/drizzle-solid';
|
|
3
|
+
export { initSolidTables };
|
|
4
|
+
export type { AnyPodTable };
|
|
5
|
+
export declare const initSolidResources: typeof initSolidTables;
|
|
6
|
+
export type AnyPodResource = AnyPodTable;
|
package/dist/repository.js
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { initSolidTables, } from '@undefineds.co/drizzle-solid';
|
|
2
|
+
export { createRepositoryDescriptor, definePodRepository, } from '@undefineds.co/drizzle-solid';
|
|
3
|
+
export { initSolidTables };
|
|
4
|
+
// Resource-first aliases for shared Solid model call sites. The underlying
|
|
5
|
+
// drizzle-solid API still uses table-shaped arguments for compatibility.
|
|
6
|
+
export const initSolidResources = initSolidTables;
|