@undefineds.co/xpod 0.2.34 → 0.2.36
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/dist/agents/schema/agent-config.js +1 -1
- package/dist/agents/schema/agent-config.js.map +1 -1
- package/dist/agents/schema/create-agent-schema.js +17 -16
- package/dist/agents/schema/create-agent-schema.js.map +1 -1
- package/dist/agents/schema/tables.js +1 -1
- package/dist/agents/schema/tables.js.map +1 -1
- package/dist/ai/schema/config.js +1 -1
- package/dist/ai/schema/config.js.map +1 -1
- package/dist/ai/schema/model.js +2 -2
- package/dist/ai/schema/model.js.map +1 -1
- package/dist/ai/schema/provider.js +1 -1
- package/dist/ai/schema/provider.js.map +1 -1
- package/dist/ai/schema/vector-store.js +2 -2
- package/dist/ai/schema/vector-store.js.map +1 -1
- package/dist/api/container/local.js +1 -5
- package/dist/api/container/local.js.map +1 -1
- package/dist/api/container/routes.js +16 -1
- package/dist/api/container/routes.js.map +1 -1
- package/dist/api/handlers/PodManagementHandler.d.ts +8 -0
- package/dist/api/handlers/PodManagementHandler.js +5 -3
- package/dist/api/handlers/PodManagementHandler.js.map +1 -1
- package/dist/api/handlers/WebIdProfileHandler.js +64 -6
- package/dist/api/handlers/WebIdProfileHandler.js.map +1 -1
- package/dist/api/runtime.js +11 -6
- package/dist/api/runtime.js.map +1 -1
- package/dist/components/components.jsonld +1 -0
- package/dist/components/context.jsonld +36 -0
- package/dist/credential/schema/tables.js +3 -3
- package/dist/credential/schema/tables.js.map +1 -1
- package/dist/edge/LocalNetworkManager.d.ts +2 -7
- package/dist/edge/LocalNetworkManager.js +7 -34
- package/dist/edge/LocalNetworkManager.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/provision/LocalPodProvisioningService.d.ts +34 -0
- package/dist/provision/LocalPodProvisioningService.js +294 -0
- package/dist/provision/LocalPodProvisioningService.js.map +1 -0
- package/dist/provision/LocalPodProvisioningService.jsonld +142 -0
- package/dist/provision/ProvisionPodCreator.js +3 -4
- package/dist/provision/ProvisionPodCreator.js.map +1 -1
- package/dist/tunnel/LocalTunnelProvider.d.ts +2 -2
- package/dist/tunnel/LocalTunnelProvider.js +12 -14
- package/dist/tunnel/LocalTunnelProvider.js.map +1 -1
- package/dist/tunnel/TunnelProvider.d.ts +2 -0
- package/dist/tunnel/TunnelProvider.js.map +1 -1
- package/dist/tunnel/TunnelProvider.jsonld +4 -0
- package/package.json +2 -2
- package/node_modules/@undefineds.co/models/README.md +0 -578
- package/node_modules/@undefineds.co/models/dist/_drizzle-solid/columns.d.ts +0 -37
- package/node_modules/@undefineds.co/models/dist/_drizzle-solid/columns.js +0 -1
- package/node_modules/@undefineds.co/models/dist/_drizzle-solid/pod-table.d.ts +0 -3
- package/node_modules/@undefineds.co/models/dist/_drizzle-solid/pod-table.js +0 -1
- package/node_modules/@undefineds.co/models/dist/_drizzle-solid/types.d.ts +0 -40
- package/node_modules/@undefineds.co/models/dist/_drizzle-solid/types.js +0 -1
- package/node_modules/@undefineds.co/models/dist/agent.providers.d.ts +0 -13
- package/node_modules/@undefineds.co/models/dist/agent.providers.js +0 -69
- package/node_modules/@undefineds.co/models/dist/agent.repository.d.ts +0 -85
- package/node_modules/@undefineds.co/models/dist/agent.repository.js +0 -7
- package/node_modules/@undefineds.co/models/dist/agent.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/agent.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/ai-config/index.d.ts +0 -61
- package/node_modules/@undefineds.co/models/dist/ai-config/index.js +0 -294
- package/node_modules/@undefineds.co/models/dist/ai-config.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/ai-config.js +0 -1
- package/node_modules/@undefineds.co/models/dist/ai-model.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/ai-model.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/ai-provider.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/ai-provider.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/approval.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/approval.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/audit.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/audit.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/chat.repository.d.ts +0 -61
- package/node_modules/@undefineds.co/models/dist/chat.repository.js +0 -8
- package/node_modules/@undefineds.co/models/dist/chat.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/chat.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/chat.utils.d.ts +0 -3
- package/node_modules/@undefineds.co/models/dist/chat.utils.js +0 -30
- package/node_modules/@undefineds.co/models/dist/contact.repository.d.ts +0 -85
- package/node_modules/@undefineds.co/models/dist/contact.repository.js +0 -8
- package/node_modules/@undefineds.co/models/dist/contact.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/contact.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/core/agent-provider.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core/agent-provider.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/core/agent-status.schema.d.ts +0 -12
- package/node_modules/@undefineds.co/models/dist/core/agent-status.schema.js +0 -18
- package/node_modules/@undefineds.co/models/dist/core/agent.schema.d.ts +0 -72
- package/node_modules/@undefineds.co/models/dist/core/agent.schema.js +0 -38
- package/node_modules/@undefineds.co/models/dist/core/ai-config.schema.d.ts +0 -11
- package/node_modules/@undefineds.co/models/dist/core/ai-config.schema.js +0 -18
- package/node_modules/@undefineds.co/models/dist/core/ai-model.schema.d.ts +0 -15
- package/node_modules/@undefineds.co/models/dist/core/ai-model.schema.js +0 -21
- package/node_modules/@undefineds.co/models/dist/core/ai-provider.schema.d.ts +0 -16
- package/node_modules/@undefineds.co/models/dist/core/ai-provider.schema.js +0 -28
- package/node_modules/@undefineds.co/models/dist/core/approval.schema.d.ts +0 -21
- package/node_modules/@undefineds.co/models/dist/core/approval.schema.js +0 -33
- package/node_modules/@undefineds.co/models/dist/core/audit.schema.d.ts +0 -17
- package/node_modules/@undefineds.co/models/dist/core/audit.schema.js +0 -29
- package/node_modules/@undefineds.co/models/dist/core/chat.schema.d.ts +0 -36
- package/node_modules/@undefineds.co/models/dist/core/chat.schema.js +0 -45
- package/node_modules/@undefineds.co/models/dist/core/contact.schema.d.ts +0 -47
- package/node_modules/@undefineds.co/models/dist/core/contact.schema.js +0 -59
- package/node_modules/@undefineds.co/models/dist/core/credential.schema.d.ts +0 -56
- package/node_modules/@undefineds.co/models/dist/core/credential.schema.js +0 -40
- package/node_modules/@undefineds.co/models/dist/core/extension/extension.schema.d.ts +0 -4
- package/node_modules/@undefineds.co/models/dist/core/extension/extension.schema.js +0 -11
- package/node_modules/@undefineds.co/models/dist/core/extension/index.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core/extension/index.js +0 -1
- package/node_modules/@undefineds.co/models/dist/core/extension.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core/extension.js +0 -1
- package/node_modules/@undefineds.co/models/dist/core/favorite/favorite.schema.d.ts +0 -24
- package/node_modules/@undefineds.co/models/dist/core/favorite/favorite.schema.js +0 -34
- package/node_modules/@undefineds.co/models/dist/core/favorite/index.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core/favorite/index.js +0 -1
- package/node_modules/@undefineds.co/models/dist/core/file/file.schema.d.ts +0 -39
- package/node_modules/@undefineds.co/models/dist/core/file/file.schema.js +0 -51
- package/node_modules/@undefineds.co/models/dist/core/file/index.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core/file/index.js +0 -1
- package/node_modules/@undefineds.co/models/dist/core/file.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core/file.js +0 -1
- package/node_modules/@undefineds.co/models/dist/core/grant.schema.d.ts +0 -16
- package/node_modules/@undefineds.co/models/dist/core/grant.schema.js +0 -29
- package/node_modules/@undefineds.co/models/dist/core/import/import-job.schema.d.ts +0 -5
- package/node_modules/@undefineds.co/models/dist/core/import/import-job.schema.js +0 -5
- package/node_modules/@undefineds.co/models/dist/core/import/index.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core/import/index.js +0 -1
- package/node_modules/@undefineds.co/models/dist/core/import.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core/import.js +0 -1
- package/node_modules/@undefineds.co/models/dist/core/inbox-notification.schema.d.ts +0 -9
- package/node_modules/@undefineds.co/models/dist/core/inbox-notification.schema.js +0 -16
- package/node_modules/@undefineds.co/models/dist/core/index.d.ts +0 -31
- package/node_modules/@undefineds.co/models/dist/core/index.js +0 -32
- package/node_modules/@undefineds.co/models/dist/core/knowledge/index.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core/knowledge/index.js +0 -1
- package/node_modules/@undefineds.co/models/dist/core/knowledge/knowledge-folder.schema.d.ts +0 -7
- package/node_modules/@undefineds.co/models/dist/core/knowledge/knowledge-folder.schema.js +0 -6
- package/node_modules/@undefineds.co/models/dist/core/knowledge.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core/knowledge.js +0 -1
- package/node_modules/@undefineds.co/models/dist/core/message.schema.d.ts +0 -33
- package/node_modules/@undefineds.co/models/dist/core/message.schema.js +0 -49
- package/node_modules/@undefineds.co/models/dist/core/namespaces.d.ts +0 -176
- package/node_modules/@undefineds.co/models/dist/core/namespaces.js +0 -289
- package/node_modules/@undefineds.co/models/dist/core/profile.d.ts +0 -16
- package/node_modules/@undefineds.co/models/dist/core/profile.js +0 -19
- package/node_modules/@undefineds.co/models/dist/core/schema.d.ts +0 -304
- package/node_modules/@undefineds.co/models/dist/core/schema.js +0 -46
- package/node_modules/@undefineds.co/models/dist/core/session/index.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core/session/index.js +0 -1
- package/node_modules/@undefineds.co/models/dist/core/session/session.schema.d.ts +0 -6
- package/node_modules/@undefineds.co/models/dist/core/session/session.schema.js +0 -6
- package/node_modules/@undefineds.co/models/dist/core/session.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core/session.js +0 -1
- package/node_modules/@undefineds.co/models/dist/core/settings/index.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core/settings/index.js +0 -1
- package/node_modules/@undefineds.co/models/dist/core/settings/settings.schema.d.ts +0 -49
- package/node_modules/@undefineds.co/models/dist/core/settings/settings.schema.js +0 -63
- package/node_modules/@undefineds.co/models/dist/core/settings.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core/settings.js +0 -1
- package/node_modules/@undefineds.co/models/dist/core/thread.schema.d.ts +0 -28
- package/node_modules/@undefineds.co/models/dist/core/thread.schema.js +0 -36
- package/node_modules/@undefineds.co/models/dist/core/types/collaboration-blocks.d.ts +0 -52
- package/node_modules/@undefineds.co/models/dist/core/types/collaboration-blocks.js +0 -7
- package/node_modules/@undefineds.co/models/dist/core/types/message-block.d.ts +0 -270
- package/node_modules/@undefineds.co/models/dist/core/types/message-block.js +0 -125
- package/node_modules/@undefineds.co/models/dist/core/vector-store.schema.d.ts +0 -25
- package/node_modules/@undefineds.co/models/dist/core/vector-store.schema.js +0 -35
- package/node_modules/@undefineds.co/models/dist/core/vocab/_namespaces.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core/vocab/_namespaces.js +0 -3
- package/node_modules/@undefineds.co/models/dist/core/vocab/chat.vocab.d.ts +0 -16
- package/node_modules/@undefineds.co/models/dist/core/vocab/chat.vocab.js +0 -22
- package/node_modules/@undefineds.co/models/dist/core/vocab/contact.vocab.d.ts +0 -21
- package/node_modules/@undefineds.co/models/dist/core/vocab/contact.vocab.js +0 -22
- package/node_modules/@undefineds.co/models/dist/core/vocab/index.d.ts +0 -6
- package/node_modules/@undefineds.co/models/dist/core/vocab/index.js +0 -6
- package/node_modules/@undefineds.co/models/dist/core/vocab/message.vocab.d.ts +0 -20
- package/node_modules/@undefineds.co/models/dist/core/vocab/message.vocab.js +0 -24
- package/node_modules/@undefineds.co/models/dist/core/vocab/sidecar.vocab.d.ts +0 -46
- package/node_modules/@undefineds.co/models/dist/core/vocab/sidecar.vocab.js +0 -47
- package/node_modules/@undefineds.co/models/dist/core/vocab/thread.vocab.d.ts +0 -11
- package/node_modules/@undefineds.co/models/dist/core/vocab/thread.vocab.js +0 -14
- package/node_modules/@undefineds.co/models/dist/core/vocab/workspace.vocab.d.ts +0 -12
- package/node_modules/@undefineds.co/models/dist/core/vocab/workspace.vocab.js +0 -13
- package/node_modules/@undefineds.co/models/dist/core/vocab.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core/vocab.js +0 -1
- package/node_modules/@undefineds.co/models/dist/core/workspace.schema.d.ts +0 -35
- package/node_modules/@undefineds.co/models/dist/core/workspace.schema.js +0 -106
- package/node_modules/@undefineds.co/models/dist/core.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/core.js +0 -1
- package/node_modules/@undefineds.co/models/dist/credential.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/credential.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/discovery/index.d.ts +0 -31
- package/node_modules/@undefineds.co/models/dist/discovery/index.js +0 -147
- package/node_modules/@undefineds.co/models/dist/discovery/models.json +0 -2623
- package/node_modules/@undefineds.co/models/dist/discovery/providers.json +0 -156
- package/node_modules/@undefineds.co/models/dist/discovery/types.d.ts +0 -103
- package/node_modules/@undefineds.co/models/dist/discovery/types.js +0 -12
- package/node_modules/@undefineds.co/models/dist/discovery/vercel.d.ts +0 -25
- package/node_modules/@undefineds.co/models/dist/discovery/vercel.js +0 -95
- package/node_modules/@undefineds.co/models/dist/discovery.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/discovery.js +0 -1
- package/node_modules/@undefineds.co/models/dist/extension/extension.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/extension/extension.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/extension/index.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/extension/index.js +0 -1
- package/node_modules/@undefineds.co/models/dist/extension.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/extension.js +0 -1
- package/node_modules/@undefineds.co/models/dist/favorite/favorite.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/favorite/favorite.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/favorite/index.d.ts +0 -2
- package/node_modules/@undefineds.co/models/dist/favorite/index.js +0 -7
- package/node_modules/@undefineds.co/models/dist/favorite/starred-sync.d.ts +0 -66
- package/node_modules/@undefineds.co/models/dist/favorite/starred-sync.js +0 -156
- package/node_modules/@undefineds.co/models/dist/favorite.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/favorite.js +0 -1
- package/node_modules/@undefineds.co/models/dist/file/file.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/file/file.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/file/index.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/file/index.js +0 -1
- package/node_modules/@undefineds.co/models/dist/file.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/file.js +0 -1
- package/node_modules/@undefineds.co/models/dist/fixtures/contracts-chat-contact.d.ts +0 -13
- package/node_modules/@undefineds.co/models/dist/fixtures/contracts-chat-contact.js +0 -76
- package/node_modules/@undefineds.co/models/dist/grant.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/grant.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/import/import-job.schema.d.ts +0 -5
- package/node_modules/@undefineds.co/models/dist/import/import-job.schema.js +0 -5
- package/node_modules/@undefineds.co/models/dist/import/index.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/import/index.js +0 -1
- package/node_modules/@undefineds.co/models/dist/import.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/import.js +0 -1
- package/node_modules/@undefineds.co/models/dist/inbox-notification.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/inbox-notification.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/index.d.ts +0 -41
- package/node_modules/@undefineds.co/models/dist/index.js +0 -83
- package/node_modules/@undefineds.co/models/dist/knowledge/index.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/knowledge/index.js +0 -1
- package/node_modules/@undefineds.co/models/dist/knowledge/knowledge-folder.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/knowledge/knowledge-folder.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/knowledge.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/knowledge.js +0 -1
- package/node_modules/@undefineds.co/models/dist/message.repository.d.ts +0 -81
- package/node_modules/@undefineds.co/models/dist/message.repository.js +0 -8
- package/node_modules/@undefineds.co/models/dist/message.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/message.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/namespaces.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/namespaces.js +0 -1
- package/node_modules/@undefineds.co/models/dist/profile.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/profile.js +0 -1
- package/node_modules/@undefineds.co/models/dist/repository.d.ts +0 -59
- package/node_modules/@undefineds.co/models/dist/repository.js +0 -186
- package/node_modules/@undefineds.co/models/dist/schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/session/index.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/session/index.js +0 -1
- package/node_modules/@undefineds.co/models/dist/session/session.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/session/session.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/session.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/session.js +0 -1
- package/node_modules/@undefineds.co/models/dist/settings/index.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/settings/index.js +0 -1
- package/node_modules/@undefineds.co/models/dist/settings/settings.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/settings/settings.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/settings.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/settings.js +0 -1
- package/node_modules/@undefineds.co/models/dist/sidecar/index.d.ts +0 -2
- package/node_modules/@undefineds.co/models/dist/sidecar/index.js +0 -2
- package/node_modules/@undefineds.co/models/dist/sidecar/persistence-mapping.d.ts +0 -51
- package/node_modules/@undefineds.co/models/dist/sidecar/persistence-mapping.js +0 -44
- package/node_modules/@undefineds.co/models/dist/sidecar/sidecar-events.d.ts +0 -632
- package/node_modules/@undefineds.co/models/dist/sidecar/sidecar-events.js +0 -133
- package/node_modules/@undefineds.co/models/dist/thread.repository.d.ts +0 -41
- package/node_modules/@undefineds.co/models/dist/thread.repository.js +0 -8
- package/node_modules/@undefineds.co/models/dist/thread.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/thread.schema.js +0 -1
- package/node_modules/@undefineds.co/models/dist/types/collaboration-blocks.d.ts +0 -52
- package/node_modules/@undefineds.co/models/dist/types/collaboration-blocks.js +0 -7
- package/node_modules/@undefineds.co/models/dist/types/message-block.d.ts +0 -270
- package/node_modules/@undefineds.co/models/dist/types/message-block.js +0 -125
- package/node_modules/@undefineds.co/models/dist/vocab/_namespaces.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/vocab/_namespaces.js +0 -3
- package/node_modules/@undefineds.co/models/dist/vocab/chat.vocab.d.ts +0 -16
- package/node_modules/@undefineds.co/models/dist/vocab/chat.vocab.js +0 -22
- package/node_modules/@undefineds.co/models/dist/vocab/contact.vocab.d.ts +0 -21
- package/node_modules/@undefineds.co/models/dist/vocab/contact.vocab.js +0 -22
- package/node_modules/@undefineds.co/models/dist/vocab/index.d.ts +0 -6
- package/node_modules/@undefineds.co/models/dist/vocab/index.js +0 -6
- package/node_modules/@undefineds.co/models/dist/vocab/message.vocab.d.ts +0 -20
- package/node_modules/@undefineds.co/models/dist/vocab/message.vocab.js +0 -24
- package/node_modules/@undefineds.co/models/dist/vocab/sidecar.vocab.d.ts +0 -46
- package/node_modules/@undefineds.co/models/dist/vocab/sidecar.vocab.js +0 -47
- package/node_modules/@undefineds.co/models/dist/vocab/thread.vocab.d.ts +0 -11
- package/node_modules/@undefineds.co/models/dist/vocab/thread.vocab.js +0 -14
- package/node_modules/@undefineds.co/models/dist/vocab/workspace.vocab.d.ts +0 -12
- package/node_modules/@undefineds.co/models/dist/vocab/workspace.vocab.js +0 -13
- package/node_modules/@undefineds.co/models/dist/vocab.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/vocab.js +0 -1
- package/node_modules/@undefineds.co/models/dist/workspace.repository.d.ts +0 -45
- package/node_modules/@undefineds.co/models/dist/workspace.repository.js +0 -8
- package/node_modules/@undefineds.co/models/dist/workspace.schema.d.ts +0 -1
- package/node_modules/@undefineds.co/models/dist/workspace.schema.js +0 -1
- package/node_modules/@undefineds.co/models/package.json +0 -67
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
export const DEFAULT_AGENT_PROVIDERS = [
|
|
2
|
-
{
|
|
3
|
-
slug: 'openai',
|
|
4
|
-
displayName: 'OpenAI',
|
|
5
|
-
homepage: 'https://platform.openai.com',
|
|
6
|
-
logoUrl: 'https://openai.com/favicon.ico',
|
|
7
|
-
models: [
|
|
8
|
-
{ id: 'gpt-4o-mini', displayName: 'GPT-4o mini' },
|
|
9
|
-
{ id: 'gpt-4o', displayName: 'GPT-4o' },
|
|
10
|
-
{ id: 'gpt-4o-realtime', displayName: 'GPT-4o Realtime' },
|
|
11
|
-
],
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
slug: 'anthropic',
|
|
15
|
-
displayName: 'Anthropic',
|
|
16
|
-
homepage: 'https://www.anthropic.com',
|
|
17
|
-
logoUrl: 'https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/anthropic.svg',
|
|
18
|
-
models: [
|
|
19
|
-
{ id: 'claude-3-5-sonnet-latest', displayName: 'Claude 3.5 Sonnet' },
|
|
20
|
-
{ id: 'claude-3-opus', displayName: 'Claude 3 Opus' },
|
|
21
|
-
{ id: 'claude-3-haiku', displayName: 'Claude 3 Haiku' },
|
|
22
|
-
],
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
slug: 'google',
|
|
26
|
-
displayName: 'Google (Gemini)',
|
|
27
|
-
homepage: 'https://ai.google.dev',
|
|
28
|
-
logoUrl: 'https://ai.google.dev/favicon.ico',
|
|
29
|
-
models: [
|
|
30
|
-
{ id: 'gemini-1.5-flash', displayName: 'Gemini 1.5 Flash' },
|
|
31
|
-
{ id: 'gemini-1.5-pro', displayName: 'Gemini 1.5 Pro' },
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
slug: 'x-ai',
|
|
36
|
-
displayName: 'xAI',
|
|
37
|
-
homepage: 'https://x.ai',
|
|
38
|
-
logoUrl: 'https://x.ai/favicon.ico',
|
|
39
|
-
models: [
|
|
40
|
-
{ id: 'grok-2', displayName: 'Grok-2' },
|
|
41
|
-
],
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
slug: 'deepseek',
|
|
45
|
-
displayName: 'DeepSeek',
|
|
46
|
-
homepage: 'https://www.deepseek.com',
|
|
47
|
-
logoUrl: 'https://www.deepseek.com/favicon.ico',
|
|
48
|
-
models: [
|
|
49
|
-
{ id: 'deepseek-chat', displayName: 'DeepSeek Chat' },
|
|
50
|
-
{ id: 'deepseek-coder', displayName: 'DeepSeek Coder' },
|
|
51
|
-
],
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
slug: 'openrouter',
|
|
55
|
-
displayName: 'OpenRouter',
|
|
56
|
-
homepage: 'https://openrouter.ai',
|
|
57
|
-
logoUrl: 'https://openrouter.ai/favicon.ico',
|
|
58
|
-
models: [
|
|
59
|
-
{ id: 'openai/gpt-4o-mini', displayName: 'GPT-4o mini' },
|
|
60
|
-
{ id: 'openai/gpt-4o', displayName: 'GPT-4o' },
|
|
61
|
-
{ id: 'anthropic/claude-3.5-sonnet', displayName: 'Claude 3.5 Sonnet' },
|
|
62
|
-
{ id: 'anthropic/claude-3-haiku', displayName: 'Claude 3 Haiku' },
|
|
63
|
-
{ id: 'google/gemini-flash-1.5', displayName: 'Gemini 1.5 Flash' },
|
|
64
|
-
{ id: 'deepseek/deepseek-chat', displayName: 'DeepSeek Chat' },
|
|
65
|
-
{ id: 'meta-llama/llama-3.1-8b-instruct', displayName: 'Llama 3.1 8B' },
|
|
66
|
-
{ id: 'qwen/qwen-2.5-72b-instruct', displayName: 'Qwen 2.5 72B' },
|
|
67
|
-
],
|
|
68
|
-
},
|
|
69
|
-
];
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
export declare const agentRepository: 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").ColumnBuilder<"string", null, true, false>;
|
|
3
|
-
name: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
|
|
4
|
-
description: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
|
|
5
|
-
avatarUrl: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
|
|
6
|
-
instructions: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
|
|
7
|
-
provider: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
|
|
8
|
-
runtimeKind: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
|
|
9
|
-
credential: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
|
|
10
|
-
model: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
|
|
11
|
-
enabled: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, true>;
|
|
12
|
-
temperature: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"integer", null, false, true>;
|
|
13
|
-
tools: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"array", "string", false, false>;
|
|
14
|
-
contextRound: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"integer", null, false, true>;
|
|
15
|
-
maxTurns: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"integer", null, false, false>;
|
|
16
|
-
timeout: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"integer", null, false, false>;
|
|
17
|
-
ttsModel: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
|
|
18
|
-
videoModel: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", 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, true, true>;
|
|
21
|
-
deletedAt: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"datetime", null, false, false>;
|
|
22
|
-
}>>, {
|
|
23
|
-
id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
description: string;
|
|
26
|
-
avatarUrl: string;
|
|
27
|
-
instructions: string;
|
|
28
|
-
provider: string;
|
|
29
|
-
runtimeKind: string;
|
|
30
|
-
credential: string;
|
|
31
|
-
model: string;
|
|
32
|
-
enabled: string;
|
|
33
|
-
temperature: number;
|
|
34
|
-
tools: string[];
|
|
35
|
-
contextRound: number;
|
|
36
|
-
maxTurns: number;
|
|
37
|
-
timeout: number;
|
|
38
|
-
ttsModel: string;
|
|
39
|
-
videoModel: string;
|
|
40
|
-
createdAt: Date;
|
|
41
|
-
updatedAt: Date;
|
|
42
|
-
deletedAt: Date;
|
|
43
|
-
}, {
|
|
44
|
-
id: string;
|
|
45
|
-
name?: string | undefined;
|
|
46
|
-
description?: string | undefined;
|
|
47
|
-
avatarUrl?: string | undefined;
|
|
48
|
-
instructions?: string | undefined;
|
|
49
|
-
provider?: string | undefined;
|
|
50
|
-
runtimeKind?: string | undefined;
|
|
51
|
-
credential?: string | undefined;
|
|
52
|
-
model?: string | undefined;
|
|
53
|
-
enabled?: string | undefined;
|
|
54
|
-
temperature?: number | undefined;
|
|
55
|
-
tools?: string[] | undefined;
|
|
56
|
-
contextRound?: number | undefined;
|
|
57
|
-
maxTurns?: number | undefined;
|
|
58
|
-
timeout?: number | undefined;
|
|
59
|
-
ttsModel?: string | undefined;
|
|
60
|
-
videoModel?: string | undefined;
|
|
61
|
-
createdAt?: Date | undefined;
|
|
62
|
-
updatedAt?: Date | undefined;
|
|
63
|
-
deletedAt?: Date | undefined;
|
|
64
|
-
}, {
|
|
65
|
-
id?: string | undefined;
|
|
66
|
-
name?: string | null | undefined;
|
|
67
|
-
description?: string | null | undefined;
|
|
68
|
-
avatarUrl?: string | null | undefined;
|
|
69
|
-
instructions?: string | null | undefined;
|
|
70
|
-
provider?: string | null | undefined;
|
|
71
|
-
runtimeKind?: string | null | undefined;
|
|
72
|
-
credential?: string | null | undefined;
|
|
73
|
-
model?: string | null | undefined;
|
|
74
|
-
enabled?: string | null | undefined;
|
|
75
|
-
temperature?: number | null | undefined;
|
|
76
|
-
tools?: string[] | null | undefined;
|
|
77
|
-
contextRound?: number | null | undefined;
|
|
78
|
-
maxTurns?: number | null | undefined;
|
|
79
|
-
timeout?: number | null | undefined;
|
|
80
|
-
ttsModel?: string | null | undefined;
|
|
81
|
-
videoModel?: string | null | undefined;
|
|
82
|
-
createdAt?: Date | undefined;
|
|
83
|
-
updatedAt?: Date | undefined;
|
|
84
|
-
deletedAt?: Date | null | undefined;
|
|
85
|
-
}, Record<string, unknown>>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { definePodRepository } from './repository.js';
|
|
2
|
-
import { agentTable } from './agent.schema.js';
|
|
3
|
-
export const agentRepository = definePodRepository({
|
|
4
|
-
namespace: 'agent',
|
|
5
|
-
table: agentTable,
|
|
6
|
-
searchableFields: ['name', 'description', 'instructions'],
|
|
7
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createAgentSchema, agentSchema, agentTable, type AgentRow, type AgentInsert, type AgentUpdate, type CreateAgentSchemaOptions, } from './core.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createAgentSchema, agentSchema, agentTable, } from './core.js';
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { AIModelInsert, AIModelRow } from '../ai-model.schema.js';
|
|
2
|
-
import type { AIProviderInsert, AIProviderRow } from '../ai-provider.schema.js';
|
|
3
|
-
import type { CredentialInsert, CredentialRow } from '../credential.schema.js';
|
|
4
|
-
export interface AIConfigProviderCatalogEntry {
|
|
5
|
-
id: string;
|
|
6
|
-
displayName: string;
|
|
7
|
-
defaultBaseUrl?: string;
|
|
8
|
-
defaultModels?: string[];
|
|
9
|
-
}
|
|
10
|
-
export interface AIConfigModel {
|
|
11
|
-
id: string;
|
|
12
|
-
name: string;
|
|
13
|
-
enabled: boolean;
|
|
14
|
-
capabilities: string[];
|
|
15
|
-
isCustom?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export interface AIConfigProviderState {
|
|
18
|
-
id: string;
|
|
19
|
-
enabled: boolean;
|
|
20
|
-
apiKey?: string;
|
|
21
|
-
baseUrl?: string;
|
|
22
|
-
models: AIConfigModel[];
|
|
23
|
-
selectedModelId?: string;
|
|
24
|
-
}
|
|
25
|
-
export interface AIConfigUpdate {
|
|
26
|
-
enabled?: boolean;
|
|
27
|
-
apiKey?: string;
|
|
28
|
-
baseUrl?: string;
|
|
29
|
-
models?: AIConfigModel[];
|
|
30
|
-
}
|
|
31
|
-
export interface BuildAIConfigProviderStateMapOptions {
|
|
32
|
-
catalog?: readonly AIConfigProviderCatalogEntry[];
|
|
33
|
-
providerRows: Array<Partial<AIProviderRow> & Record<string, unknown>>;
|
|
34
|
-
credentialRows: Array<Partial<CredentialRow> & Record<string, unknown>>;
|
|
35
|
-
modelRows: Array<Partial<AIModelRow> & Record<string, unknown>>;
|
|
36
|
-
fallbackToCatalogModels?: boolean;
|
|
37
|
-
}
|
|
38
|
-
export interface AIConfigMutationPlan {
|
|
39
|
-
providerId: string;
|
|
40
|
-
providerPayload?: AIProviderInsert;
|
|
41
|
-
credentialPayload?: CredentialInsert;
|
|
42
|
-
modelUpserts: AIModelInsert[];
|
|
43
|
-
modelDeleteIds: string[];
|
|
44
|
-
}
|
|
45
|
-
export declare function getAIConfigProviderCatalog(): readonly AIConfigProviderCatalogEntry[];
|
|
46
|
-
export declare function getAIConfigProviderMetadata(providerId: string): AIConfigProviderCatalogEntry;
|
|
47
|
-
export declare function extractAIConfigResourceId(raw?: string | null): string;
|
|
48
|
-
export declare function extractAIConfigProviderId(raw?: string | null): string;
|
|
49
|
-
export declare function sameAIConfigProviderId(left?: string | null, right?: string | null): boolean;
|
|
50
|
-
export declare function getAIConfigDefaultBaseUrl(providerId: string): string | undefined;
|
|
51
|
-
export declare function getDefaultAIConfigCredentialId(providerId: string): string;
|
|
52
|
-
export declare function aiConfigProviderUri(providerId: string): string;
|
|
53
|
-
export declare function aiConfigModelUri(modelId: string): string;
|
|
54
|
-
export declare function buildAIConfigProviderStateMap(options: BuildAIConfigProviderStateMapOptions): Record<string, AIConfigProviderState>;
|
|
55
|
-
export declare function buildAIConfigMutationPlan(input: {
|
|
56
|
-
providerId: string;
|
|
57
|
-
currentProviderRows: Array<Partial<AIProviderRow> & Record<string, unknown>>;
|
|
58
|
-
currentCredentialRows: Array<Partial<CredentialRow> & Record<string, unknown>>;
|
|
59
|
-
currentModelRows: Array<Partial<AIModelRow> & Record<string, unknown>>;
|
|
60
|
-
updates: AIConfigUpdate;
|
|
61
|
-
}): AIConfigMutationPlan;
|
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
const AI_CONFIG_PROVIDER_CATALOG = [
|
|
2
|
-
{
|
|
3
|
-
id: 'openai',
|
|
4
|
-
displayName: 'OpenAI',
|
|
5
|
-
defaultBaseUrl: 'https://api.openai.com/v1',
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
id: 'anthropic',
|
|
9
|
-
displayName: 'Anthropic',
|
|
10
|
-
defaultBaseUrl: 'https://api.anthropic.com/v1',
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
id: 'google',
|
|
14
|
-
displayName: 'Google',
|
|
15
|
-
defaultBaseUrl: 'https://generativelanguage.googleapis.com/v1beta',
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
id: 'deepseek',
|
|
19
|
-
displayName: 'DeepSeek',
|
|
20
|
-
defaultBaseUrl: 'https://api.deepseek.com/v1',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
id: 'ollama',
|
|
24
|
-
displayName: 'Ollama',
|
|
25
|
-
defaultBaseUrl: 'http://localhost:11434/v1',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
id: 'x-ai',
|
|
29
|
-
displayName: 'xAI',
|
|
30
|
-
defaultBaseUrl: 'https://api.x.ai/v1',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
id: 'openrouter',
|
|
34
|
-
displayName: 'OpenRouter',
|
|
35
|
-
defaultBaseUrl: 'https://openrouter.ai/api/v1',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
id: 'minimax',
|
|
39
|
-
displayName: 'MiniMax',
|
|
40
|
-
defaultBaseUrl: 'https://api.minimax.chat/v1',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
id: 'mistral',
|
|
44
|
-
displayName: 'Mistral',
|
|
45
|
-
defaultBaseUrl: 'https://api.mistral.ai/v1',
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
id: 'groq',
|
|
49
|
-
displayName: 'Groq',
|
|
50
|
-
defaultBaseUrl: 'https://api.groq.com/openai/v1',
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: 'moonshot',
|
|
54
|
-
displayName: 'Moonshot',
|
|
55
|
-
defaultBaseUrl: 'https://api.moonshot.cn/v1',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
id: 'zhipu',
|
|
59
|
-
displayName: 'ZhiPu',
|
|
60
|
-
defaultBaseUrl: 'https://open.bigmodel.cn/api/paas/v4',
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
id: 'codebuddy',
|
|
64
|
-
displayName: 'CodeBuddy',
|
|
65
|
-
defaultBaseUrl: 'https://api.codebuddy.ai/v1',
|
|
66
|
-
},
|
|
67
|
-
];
|
|
68
|
-
const AI_CONFIG_PROVIDER_MAP = new Map(AI_CONFIG_PROVIDER_CATALOG.map((entry) => [entry.id, entry]));
|
|
69
|
-
function normalizeText(value) {
|
|
70
|
-
return value.trim().toLowerCase();
|
|
71
|
-
}
|
|
72
|
-
function titleizeProviderId(id) {
|
|
73
|
-
return id
|
|
74
|
-
.split(/[-_]/)
|
|
75
|
-
.filter(Boolean)
|
|
76
|
-
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
77
|
-
.join(' ');
|
|
78
|
-
}
|
|
79
|
-
function resolveCatalogEntry(id, catalog) {
|
|
80
|
-
return catalog.find((entry) => entry.id === id);
|
|
81
|
-
}
|
|
82
|
-
function collectKnownProviderIds(catalog) {
|
|
83
|
-
const ids = new Set();
|
|
84
|
-
for (const entry of catalog) {
|
|
85
|
-
ids.add(entry.id);
|
|
86
|
-
}
|
|
87
|
-
return ids;
|
|
88
|
-
}
|
|
89
|
-
function preferredSelectedModelId(models) {
|
|
90
|
-
return models.find((model) => model.enabled)?.id ?? models[0]?.id;
|
|
91
|
-
}
|
|
92
|
-
function existingDate(value) {
|
|
93
|
-
return value instanceof Date ? value : undefined;
|
|
94
|
-
}
|
|
95
|
-
export function getAIConfigProviderCatalog() {
|
|
96
|
-
return AI_CONFIG_PROVIDER_CATALOG;
|
|
97
|
-
}
|
|
98
|
-
export function getAIConfigProviderMetadata(providerId) {
|
|
99
|
-
const canonicalId = extractAIConfigProviderId(providerId);
|
|
100
|
-
return AI_CONFIG_PROVIDER_MAP.get(canonicalId) ?? {
|
|
101
|
-
id: canonicalId,
|
|
102
|
-
displayName: titleizeProviderId(canonicalId),
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
export function extractAIConfigResourceId(raw) {
|
|
106
|
-
if (!raw)
|
|
107
|
-
return '';
|
|
108
|
-
if (raw.includes('#'))
|
|
109
|
-
return raw.split('#').pop() || raw;
|
|
110
|
-
const clean = raw.replace(/\/$/, '');
|
|
111
|
-
const tail = clean.split('/').pop() || clean;
|
|
112
|
-
return tail.endsWith('.ttl') ? tail.slice(0, -4) : tail;
|
|
113
|
-
}
|
|
114
|
-
export function extractAIConfigProviderId(raw) {
|
|
115
|
-
return normalizeText(extractAIConfigResourceId(raw));
|
|
116
|
-
}
|
|
117
|
-
export function sameAIConfigProviderId(left, right) {
|
|
118
|
-
const normalizedLeft = extractAIConfigProviderId(left);
|
|
119
|
-
const normalizedRight = extractAIConfigProviderId(right);
|
|
120
|
-
return Boolean(normalizedLeft) && normalizedLeft === normalizedRight;
|
|
121
|
-
}
|
|
122
|
-
export function getAIConfigDefaultBaseUrl(providerId) {
|
|
123
|
-
return getAIConfigProviderMetadata(providerId).defaultBaseUrl;
|
|
124
|
-
}
|
|
125
|
-
export function getDefaultAIConfigCredentialId(providerId) {
|
|
126
|
-
return `${extractAIConfigProviderId(providerId)}-default`;
|
|
127
|
-
}
|
|
128
|
-
export function aiConfigProviderUri(providerId) {
|
|
129
|
-
return `/settings/ai/providers.ttl#${extractAIConfigProviderId(providerId)}`;
|
|
130
|
-
}
|
|
131
|
-
export function aiConfigModelUri(modelId) {
|
|
132
|
-
return `/settings/ai/models.ttl#${extractAIConfigResourceId(modelId)}`;
|
|
133
|
-
}
|
|
134
|
-
export function buildAIConfigProviderStateMap(options) {
|
|
135
|
-
const catalog = options.catalog ?? AI_CONFIG_PROVIDER_CATALOG;
|
|
136
|
-
const fallbackToCatalogModels = options.fallbackToCatalogModels ?? true;
|
|
137
|
-
const states = {};
|
|
138
|
-
const knownIds = collectKnownProviderIds(catalog);
|
|
139
|
-
const providerMap = new Map();
|
|
140
|
-
for (const row of options.providerRows) {
|
|
141
|
-
const providerId = typeof row.id === 'string' ? row.id : '';
|
|
142
|
-
if (!providerId)
|
|
143
|
-
continue;
|
|
144
|
-
const previous = providerMap.get(providerId) ?? {};
|
|
145
|
-
providerMap.set(providerId, { ...previous, ...row });
|
|
146
|
-
}
|
|
147
|
-
const credentialMap = new Map();
|
|
148
|
-
for (const row of options.credentialRows) {
|
|
149
|
-
const providerId = extractAIConfigProviderId(typeof row.provider === 'string' ? row.provider : '');
|
|
150
|
-
if (!providerId)
|
|
151
|
-
continue;
|
|
152
|
-
const previous = credentialMap.get(providerId) ?? {};
|
|
153
|
-
credentialMap.set(providerId, { ...previous, ...row });
|
|
154
|
-
}
|
|
155
|
-
const modelMap = new Map();
|
|
156
|
-
for (const row of options.modelRows) {
|
|
157
|
-
const providerId = extractAIConfigProviderId(typeof row.isProvidedBy === 'string' ? row.isProvidedBy : '');
|
|
158
|
-
if (!providerId)
|
|
159
|
-
continue;
|
|
160
|
-
const modelId = typeof row.id === 'string' ? row.id : '';
|
|
161
|
-
if (!modelId)
|
|
162
|
-
continue;
|
|
163
|
-
const list = modelMap.get(providerId) ?? [];
|
|
164
|
-
list.push({
|
|
165
|
-
id: modelId,
|
|
166
|
-
name: typeof row.displayName === 'string' && row.displayName.trim() ? row.displayName : modelId,
|
|
167
|
-
enabled: (typeof row.status === 'string' ? row.status : 'active') !== 'inactive',
|
|
168
|
-
capabilities: [],
|
|
169
|
-
isCustom: !(resolveCatalogEntry(providerId, catalog)?.defaultModels ?? []).includes(modelId),
|
|
170
|
-
});
|
|
171
|
-
modelMap.set(providerId, list);
|
|
172
|
-
}
|
|
173
|
-
const providerIds = new Set();
|
|
174
|
-
for (const entry of catalog)
|
|
175
|
-
providerIds.add(entry.id);
|
|
176
|
-
for (const providerId of providerMap.keys())
|
|
177
|
-
providerIds.add(providerId);
|
|
178
|
-
for (const providerId of credentialMap.keys())
|
|
179
|
-
providerIds.add(providerId);
|
|
180
|
-
for (const providerId of modelMap.keys())
|
|
181
|
-
providerIds.add(providerId);
|
|
182
|
-
for (const providerId of providerIds) {
|
|
183
|
-
if (!knownIds.has(providerId) && !providerMap.has(providerId) && !credentialMap.has(providerId) && !modelMap.has(providerId)) {
|
|
184
|
-
continue;
|
|
185
|
-
}
|
|
186
|
-
const metadata = resolveCatalogEntry(providerId, catalog) ?? getAIConfigProviderMetadata(providerId);
|
|
187
|
-
const providerRow = providerMap.get(providerId);
|
|
188
|
-
const credentialRow = credentialMap.get(providerId);
|
|
189
|
-
const persistedModels = modelMap.get(providerId) ?? [];
|
|
190
|
-
const models = persistedModels.length > 0 || !fallbackToCatalogModels
|
|
191
|
-
? persistedModels
|
|
192
|
-
: (metadata.defaultModels ?? []).map((modelId) => ({
|
|
193
|
-
id: modelId,
|
|
194
|
-
name: modelId,
|
|
195
|
-
enabled: true,
|
|
196
|
-
capabilities: [],
|
|
197
|
-
}));
|
|
198
|
-
const selectedModelId = extractAIConfigResourceId(typeof providerRow?.hasModel === 'string' ? providerRow.hasModel : '') || preferredSelectedModelId(models);
|
|
199
|
-
states[providerId] = {
|
|
200
|
-
id: providerId,
|
|
201
|
-
enabled: (typeof credentialRow?.status === 'string' ? credentialRow.status : 'inactive') === 'active',
|
|
202
|
-
apiKey: typeof credentialRow?.apiKey === 'string' ? credentialRow.apiKey : undefined,
|
|
203
|
-
baseUrl: (typeof credentialRow?.baseUrl === 'string' && credentialRow.baseUrl) ||
|
|
204
|
-
(typeof providerRow?.baseUrl === 'string' && providerRow.baseUrl) ||
|
|
205
|
-
metadata.defaultBaseUrl,
|
|
206
|
-
models,
|
|
207
|
-
selectedModelId: selectedModelId || undefined,
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
return states;
|
|
211
|
-
}
|
|
212
|
-
export function buildAIConfigMutationPlan(input) {
|
|
213
|
-
const providerId = extractAIConfigProviderId(input.providerId);
|
|
214
|
-
const metadata = getAIConfigProviderMetadata(providerId);
|
|
215
|
-
const existingProvider = input.currentProviderRows.find((row) => row.id === providerId);
|
|
216
|
-
const existingCredential = input.currentCredentialRows.find((row) => sameAIConfigProviderId(typeof row.provider === 'string' ? row.provider : '', providerId));
|
|
217
|
-
const existingModels = input.currentModelRows.filter((row) => sameAIConfigProviderId(typeof row.isProvidedBy === 'string' ? row.isProvidedBy : '', providerId));
|
|
218
|
-
const hasConfigUpdate = input.updates.enabled !== undefined || input.updates.apiKey !== undefined || input.updates.baseUrl !== undefined;
|
|
219
|
-
let providerPayload;
|
|
220
|
-
let credentialPayload;
|
|
221
|
-
const modelUpserts = [];
|
|
222
|
-
const modelDeleteIds = [];
|
|
223
|
-
if (hasConfigUpdate || input.updates.models !== undefined) {
|
|
224
|
-
const selectedModelId = input.updates.models
|
|
225
|
-
? preferredSelectedModelId(input.updates.models)
|
|
226
|
-
: extractAIConfigResourceId(typeof existingProvider?.hasModel === 'string' ? existingProvider.hasModel : '');
|
|
227
|
-
providerPayload = {
|
|
228
|
-
id: providerId,
|
|
229
|
-
baseUrl: input.updates.baseUrl ??
|
|
230
|
-
(typeof existingProvider?.baseUrl === 'string' ? existingProvider.baseUrl : undefined) ??
|
|
231
|
-
metadata.defaultBaseUrl,
|
|
232
|
-
proxyUrl: typeof existingProvider?.proxyUrl === 'string' ? existingProvider.proxyUrl : undefined,
|
|
233
|
-
hasModel: selectedModelId ? aiConfigModelUri(selectedModelId) : undefined,
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
if (hasConfigUpdate) {
|
|
237
|
-
credentialPayload = {
|
|
238
|
-
id: (typeof existingCredential?.id === 'string' ? existingCredential.id : '') ||
|
|
239
|
-
getDefaultAIConfigCredentialId(providerId),
|
|
240
|
-
provider: aiConfigProviderUri(providerId),
|
|
241
|
-
service: typeof existingCredential?.service === 'string' && existingCredential.service ? existingCredential.service : 'ai',
|
|
242
|
-
status: input.updates.enabled !== undefined
|
|
243
|
-
? input.updates.enabled
|
|
244
|
-
? 'active'
|
|
245
|
-
: 'inactive'
|
|
246
|
-
: typeof existingCredential?.status === 'string' && existingCredential.status
|
|
247
|
-
? existingCredential.status
|
|
248
|
-
: 'active',
|
|
249
|
-
apiKey: input.updates.apiKey ??
|
|
250
|
-
(typeof existingCredential?.apiKey === 'string' ? existingCredential.apiKey : undefined),
|
|
251
|
-
baseUrl: input.updates.baseUrl ??
|
|
252
|
-
(typeof existingCredential?.baseUrl === 'string' ? existingCredential.baseUrl : undefined),
|
|
253
|
-
label: typeof existingCredential?.label === 'string' && existingCredential.label
|
|
254
|
-
? existingCredential.label
|
|
255
|
-
: `${metadata.displayName} Key`,
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
if (input.updates.models !== undefined) {
|
|
259
|
-
const existingById = new Map(existingModels.map((row) => [
|
|
260
|
-
typeof row.id === 'string' ? row.id : '',
|
|
261
|
-
row,
|
|
262
|
-
]));
|
|
263
|
-
const nextIds = new Set();
|
|
264
|
-
for (const model of input.updates.models) {
|
|
265
|
-
const modelId = extractAIConfigResourceId(model.id);
|
|
266
|
-
if (!modelId)
|
|
267
|
-
continue;
|
|
268
|
-
nextIds.add(modelId);
|
|
269
|
-
const existing = existingById.get(modelId);
|
|
270
|
-
const now = new Date();
|
|
271
|
-
modelUpserts.push({
|
|
272
|
-
id: modelId,
|
|
273
|
-
displayName: model.name || modelId,
|
|
274
|
-
modelType: 'chat',
|
|
275
|
-
isProvidedBy: aiConfigProviderUri(providerId),
|
|
276
|
-
status: model.enabled ? 'active' : 'inactive',
|
|
277
|
-
createdAt: existingDate(existing?.createdAt) ?? now,
|
|
278
|
-
updatedAt: now,
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
for (const modelId of existingById.keys()) {
|
|
282
|
-
if (!nextIds.has(modelId)) {
|
|
283
|
-
modelDeleteIds.push(modelId);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
return {
|
|
288
|
-
providerId,
|
|
289
|
-
providerPayload,
|
|
290
|
-
credentialPayload,
|
|
291
|
-
modelUpserts,
|
|
292
|
-
modelDeleteIds,
|
|
293
|
-
};
|
|
294
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ai-config/index.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ai-config/index.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { aiModelTable, type AIModelRow, type AIModelInsert, type AIModelUpdate, } from './core.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { aiModelTable, } from './core.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { aiProviderTable, aiProviderRelations, type AIProviderRow, type AIProviderInsert, type AIProviderUpdate, } from './core.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { aiProviderTable, aiProviderRelations, } from './core.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { approvalTable, type ApprovalRow, type ApprovalInsert, type ApprovalUpdate, } from './core.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { approvalTable, } from './core.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { auditTable, type AuditRow, type AuditInsert, type AuditUpdate, } from './core.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { auditTable, } from './core.js';
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
export declare const chatRepository: 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
|
-
title: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, true, false>;
|
|
4
|
-
description: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
|
|
5
|
-
avatarUrl: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
|
|
6
|
-
starred: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"boolean", null, false, true>;
|
|
7
|
-
muted: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"boolean", null, false, true>;
|
|
8
|
-
unreadCount: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"integer", null, false, true>;
|
|
9
|
-
participants: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"array", "uri", false, false>;
|
|
10
|
-
metadata: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"object", null, false, false>;
|
|
11
|
-
lastActiveAt: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"datetime", null, false, false>;
|
|
12
|
-
lastMessageId: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"uri", null, false, false>;
|
|
13
|
-
lastMessagePreview: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"string", null, false, false>;
|
|
14
|
-
createdAt: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"datetime", null, true, true>;
|
|
15
|
-
updatedAt: import("@undefineds.co/models/_drizzle-solid/columns").ColumnBuilder<"datetime", null, true, true>;
|
|
16
|
-
}>>, {
|
|
17
|
-
id: string;
|
|
18
|
-
title: string;
|
|
19
|
-
description: string;
|
|
20
|
-
avatarUrl: string;
|
|
21
|
-
starred: boolean;
|
|
22
|
-
muted: boolean;
|
|
23
|
-
unreadCount: number;
|
|
24
|
-
participants: string[];
|
|
25
|
-
metadata: Record<string, unknown>;
|
|
26
|
-
lastActiveAt: Date;
|
|
27
|
-
lastMessageId: string;
|
|
28
|
-
lastMessagePreview: string;
|
|
29
|
-
createdAt: Date;
|
|
30
|
-
updatedAt: Date;
|
|
31
|
-
}, {
|
|
32
|
-
title: string;
|
|
33
|
-
id?: string | undefined;
|
|
34
|
-
description?: string | undefined;
|
|
35
|
-
avatarUrl?: string | undefined;
|
|
36
|
-
starred?: boolean | undefined;
|
|
37
|
-
muted?: boolean | undefined;
|
|
38
|
-
unreadCount?: number | undefined;
|
|
39
|
-
participants?: string[] | undefined;
|
|
40
|
-
metadata?: Record<string, unknown> | undefined;
|
|
41
|
-
lastActiveAt?: Date | undefined;
|
|
42
|
-
lastMessageId?: string | undefined;
|
|
43
|
-
lastMessagePreview?: string | undefined;
|
|
44
|
-
createdAt?: Date | undefined;
|
|
45
|
-
updatedAt?: Date | undefined;
|
|
46
|
-
}, {
|
|
47
|
-
id?: string | null | undefined;
|
|
48
|
-
title?: string | undefined;
|
|
49
|
-
description?: string | null | undefined;
|
|
50
|
-
avatarUrl?: string | null | undefined;
|
|
51
|
-
starred?: boolean | null | undefined;
|
|
52
|
-
muted?: boolean | null | undefined;
|
|
53
|
-
unreadCount?: number | null | undefined;
|
|
54
|
-
participants?: string[] | null | undefined;
|
|
55
|
-
metadata?: Record<string, unknown> | null | undefined;
|
|
56
|
-
lastActiveAt?: Date | null | undefined;
|
|
57
|
-
lastMessageId?: string | null | undefined;
|
|
58
|
-
lastMessagePreview?: string | null | undefined;
|
|
59
|
-
createdAt?: Date | undefined;
|
|
60
|
-
updatedAt?: Date | undefined;
|
|
61
|
-
}, Record<string, unknown>>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { definePodRepository } from './repository.js';
|
|
2
|
-
import { chatTable } from './chat.schema.js';
|
|
3
|
-
export const chatRepository = definePodRepository({
|
|
4
|
-
namespace: 'chat',
|
|
5
|
-
table: chatTable,
|
|
6
|
-
searchableFields: ['title', 'description'],
|
|
7
|
-
defaultSort: { field: 'lastActiveAt', direction: 'desc' },
|
|
8
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { chatTable, type ChatMetadata, type ChatMemberRole, type ChatRow, type ChatInsert, type ChatUpdate, } from './core.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { chatTable, } from './core.js';
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const resolveRowId: (row?: Partial<Record<string, unknown>> | null) => string | null;
|
|
2
|
-
export declare const ensureRowId: (row?: Partial<Record<string, unknown>> | null, fallback?: string) => string;
|
|
3
|
-
export declare const toTimestamp: (value: unknown, fallback?: number) => number;
|