@m6d/cortex-server 1.8.0 → 2.0.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.
- package/README.md +8 -3
- package/contracts/README.md +23 -0
- package/contracts/graph/embed.ts +50 -0
- package/{src/lib → contracts}/graph/helpers.ts +4 -10
- package/{src/lib → contracts}/graph/neo4j.ts +14 -27
- package/contracts/graph/schema.ts +65 -0
- package/{src/lib → contracts}/graph/types.ts +2 -29
- package/contracts/graph.ts +36 -0
- package/contracts/rich-text.ts +207 -0
- package/contracts/runtime.ts +243 -0
- package/contracts/wire.ts +143 -0
- package/dist/contracts/graph/embed.d.ts +22 -0
- package/dist/{src/lib → contracts}/graph/helpers.d.ts +16 -14
- package/dist/{src/lib → contracts}/graph/neo4j.d.ts +5 -5
- package/dist/contracts/graph/schema.d.ts +62 -0
- package/dist/{src/lib → contracts}/graph/types.d.ts +1 -1
- package/dist/contracts/graph.d.ts +14 -0
- package/dist/contracts/rich-text.d.ts +32 -0
- package/dist/contracts/runtime.d.ts +310 -0
- package/dist/contracts/wire.d.ts +120 -0
- package/dist/src/lib/adapters/database/index.d.ts +61 -0
- package/dist/src/lib/adapters/database/message-content.d.ts +30 -0
- package/dist/src/lib/adapters/database/mssql/attachments.d.ts +100 -0
- package/dist/src/lib/adapters/database/mssql/client.d.ts +8 -0
- package/dist/src/lib/adapters/database/mssql/index.d.ts +194 -0
- package/dist/src/lib/adapters/database/mssql/llm-requests.d.ts +17 -0
- package/dist/src/lib/adapters/database/mssql/messages.d.ts +37 -0
- package/dist/src/lib/adapters/database/mssql/threads.d.ts +50 -0
- package/dist/src/lib/adapters/database/postgres/attachments.d.ts +113 -0
- package/dist/src/lib/adapters/database/postgres/client.d.ts +8 -0
- package/dist/src/lib/adapters/database/postgres/index.d.ts +207 -0
- package/dist/src/lib/adapters/database/postgres/llm-requests.d.ts +17 -0
- package/dist/src/lib/adapters/database/postgres/messages.d.ts +37 -0
- package/dist/src/lib/adapters/database/postgres/threads.d.ts +50 -0
- package/{src/lib/adapters/storage.ts → dist/src/lib/adapters/storage/index.d.ts} +1 -1
- package/dist/src/lib/adapters/{minio.d.ts → storage/minio.d.ts} +1 -1
- package/dist/src/lib/ai/active-runs.d.ts +63 -0
- package/dist/src/lib/ai/attachments.d.ts +30 -0
- package/dist/src/lib/ai/backend-url.d.ts +16 -0
- package/dist/src/lib/ai/cc-runtime.d.ts +61 -0
- package/dist/src/lib/ai/commit-gate.d.ts +21 -0
- package/dist/src/lib/ai/context/builder.d.ts +6 -7
- package/dist/src/lib/ai/context/compression-middleware.d.ts +15 -0
- package/dist/src/lib/ai/context/compressor.d.ts +2 -13
- package/dist/src/lib/ai/context/intra-turn-compressor.d.ts +9 -9
- package/dist/src/lib/ai/context/optimize-thread-context.d.ts +9 -0
- package/dist/src/lib/ai/context/summarizer.d.ts +3 -3
- package/dist/src/lib/ai/context/token-estimator.d.ts +5 -8
- package/dist/src/lib/ai/fetch.d.ts +1 -1
- package/dist/src/lib/ai/finish-turn.d.ts +23 -0
- package/dist/src/lib/ai/helpers.d.ts +37 -4
- package/dist/src/lib/ai/index.d.ts +6 -3
- package/dist/src/lib/ai/inspector.d.ts +41 -0
- package/dist/src/lib/ai/interceptors/request-interceptor.d.ts +6 -5
- package/dist/src/lib/ai/prompt.d.ts +5 -4
- package/dist/src/lib/ai/redis-runs.d.ts +41 -0
- package/dist/src/lib/ai/redis-stream-log.d.ts +39 -0
- package/dist/src/lib/ai/tools/execute-code.tool.d.ts +18 -4
- package/dist/src/lib/ai/tools/query-graph.tool.d.ts +13 -5
- package/dist/src/lib/ai/tools/read-attachment.tool.d.ts +21 -0
- package/dist/src/lib/ai/tools/search-common.d.ts +17 -0
- package/dist/src/lib/ai/tools/search-knowledge.tool.d.ts +15 -0
- package/dist/src/lib/ai/tools/search-services.tool.d.ts +12 -0
- package/dist/src/lib/ai/tools/search-tools.tool.d.ts +12 -0
- package/dist/src/lib/ai/turn-tools.d.ts +39 -0
- package/dist/src/lib/ai/vision/rasterize-pdf.d.ts +26 -0
- package/dist/src/lib/ai/vision/rasterize-pdf.worker.d.ts +1 -0
- package/dist/src/lib/ai/vision/vision-reader.d.ts +45 -0
- package/dist/src/lib/cc/client.d.ts +183 -0
- package/dist/src/lib/cc/config-cache.d.ts +20 -0
- package/dist/src/lib/cc/format.d.ts +23 -0
- package/dist/src/lib/cc/registry.d.ts +34 -0
- package/dist/src/lib/cc/types.d.ts +27 -0
- package/dist/src/lib/config.d.ts +81 -64
- package/dist/src/lib/db/drizzle.config.mssql.d.ts +2 -0
- package/dist/src/lib/db/drizzle.config.pg.d.ts +2 -0
- package/dist/src/lib/db/migrate.d.ts +7 -1
- package/dist/src/lib/db/{schema.d.ts → schema.mssql.d.ts} +138 -29
- package/dist/src/lib/db/schema.pg.d.ts +546 -0
- package/dist/src/lib/factory.d.ts +2 -12
- package/dist/src/lib/graph/index.d.ts +10 -11
- package/dist/src/lib/graph/resolver.d.ts +2 -3
- package/dist/src/lib/index.d.ts +3 -3
- package/dist/src/lib/redis.d.ts +19 -0
- package/dist/src/lib/routes/chat.d.ts +1 -1
- package/dist/src/lib/routes/files.d.ts +1 -1
- package/dist/src/lib/routes/owned-thread.d.ts +17 -0
- package/dist/src/lib/routes/threads.d.ts +1 -1
- package/dist/src/lib/routes/ws.d.ts +1 -1
- package/dist/src/lib/types.d.ts +20 -37
- package/dist/src/lib/ws/connections.d.ts +2 -1
- package/package.json +33 -18
- package/src/lib/adapters/database/index.ts +78 -0
- package/src/lib/adapters/database/message-content.ts +39 -0
- package/src/lib/adapters/database/mssql/attachments.ts +90 -0
- package/src/lib/adapters/database/mssql/client.ts +11 -0
- package/src/lib/adapters/database/mssql/index.ts +23 -0
- package/src/lib/adapters/database/mssql/llm-requests.ts +43 -0
- package/src/lib/adapters/database/mssql/messages.ts +92 -0
- package/src/lib/adapters/database/mssql/threads.ts +83 -0
- package/src/lib/adapters/database/postgres/attachments.ts +88 -0
- package/src/lib/adapters/database/postgres/client.ts +11 -0
- package/src/lib/adapters/database/postgres/index.ts +23 -0
- package/src/lib/adapters/database/postgres/llm-requests.ts +45 -0
- package/src/lib/adapters/database/postgres/messages.ts +92 -0
- package/src/lib/adapters/database/postgres/threads.ts +84 -0
- package/{dist/src/lib/adapters/storage.d.ts → src/lib/adapters/storage/index.ts} +1 -1
- package/src/lib/adapters/{minio.ts → storage/minio.ts} +5 -5
- package/src/lib/ai/active-runs.ts +157 -0
- package/src/lib/ai/attachments.ts +144 -0
- package/src/lib/ai/backend-url.ts +27 -0
- package/src/lib/ai/cc-runtime.ts +63 -0
- package/src/lib/ai/commit-gate.ts +116 -0
- package/src/lib/ai/context/builder.ts +12 -14
- package/src/lib/ai/context/compression-middleware.ts +44 -0
- package/src/lib/ai/context/compressor.ts +67 -59
- package/src/lib/ai/context/intra-turn-compressor.ts +121 -204
- package/src/lib/ai/context/optimize-thread-context.ts +50 -0
- package/src/lib/ai/context/summarizer.ts +28 -30
- package/src/lib/ai/context/token-estimator.ts +35 -30
- package/src/lib/ai/fetch.ts +10 -5
- package/src/lib/ai/finish-turn.ts +75 -0
- package/src/lib/ai/helpers.ts +83 -15
- package/src/lib/ai/index.ts +366 -329
- package/src/lib/ai/inspector.ts +112 -0
- package/src/lib/ai/interceptors/request-interceptor.ts +70 -42
- package/src/lib/ai/prompt.ts +126 -125
- package/src/lib/ai/redis-runs.ts +167 -0
- package/src/lib/ai/redis-stream-log.ts +219 -0
- package/src/lib/ai/tools/execute-code.tool.ts +178 -67
- package/src/lib/ai/tools/query-graph.tool.ts +7 -8
- package/src/lib/ai/tools/read-attachment.tool.ts +59 -0
- package/src/lib/ai/tools/search-common.ts +15 -0
- package/src/lib/ai/tools/search-knowledge.tool.ts +33 -0
- package/src/lib/ai/tools/search-services.tool.ts +31 -0
- package/src/lib/ai/tools/search-tools.tool.ts +29 -0
- package/src/lib/ai/turn-tools.ts +154 -0
- package/src/lib/ai/vision/rasterize-pdf.ts +69 -0
- package/src/lib/ai/vision/rasterize-pdf.worker.ts +81 -0
- package/src/lib/ai/vision/vision-reader.ts +130 -0
- package/src/lib/auth/middleware.ts +5 -3
- package/src/lib/cc/client.ts +273 -0
- package/src/lib/cc/config-cache.ts +32 -0
- package/src/lib/cc/format.ts +92 -0
- package/src/lib/cc/registry.ts +62 -0
- package/src/lib/cc/types.ts +44 -0
- package/src/lib/config.ts +102 -71
- package/src/lib/db/drizzle.config.mssql.ts +9 -0
- package/src/lib/db/drizzle.config.pg.ts +9 -0
- package/src/lib/db/migrate.ts +45 -10
- package/src/lib/db/migrations/mssql/20260729092726_talented_wilson_fisk/migration.sql +20 -0
- package/src/lib/db/migrations/mssql/20260729092726_talented_wilson_fisk/snapshot.json +497 -0
- package/src/lib/db/migrations/mssql/20260801003652_perpetual_blue_shield/migration.sql +1 -0
- package/src/lib/db/migrations/mssql/20260801003652_perpetual_blue_shield/snapshot.json +516 -0
- package/src/lib/db/migrations/mssql/20260812174642_user_id_text/migration.sql +2 -0
- package/src/lib/db/migrations/mssql/20260812174642_user_id_text/snapshot.json +516 -0
- package/src/lib/db/migrations/pg/20260801084117_thick_ben_grimm/migration.sql +53 -0
- package/src/lib/db/migrations/pg/20260801084117_thick_ben_grimm/snapshot.json +584 -0
- package/src/lib/db/migrations/pg/20260812174622_user_id_text/migration.sql +2 -0
- package/src/lib/db/migrations/pg/20260812174622_user_id_text/snapshot.json +584 -0
- package/src/lib/db/{schema.ts → schema.mssql.ts} +29 -18
- package/src/lib/db/schema.pg.ts +95 -0
- package/src/lib/factory.ts +44 -89
- package/src/lib/graph/index.ts +12 -40
- package/src/lib/graph/resolver.ts +146 -116
- package/src/lib/index.ts +11 -4
- package/src/lib/redis.ts +44 -0
- package/src/lib/routes/chat.ts +91 -62
- package/src/lib/routes/files.ts +105 -83
- package/src/lib/routes/owned-thread.ts +17 -0
- package/src/lib/routes/threads.ts +14 -30
- package/src/lib/routes/ws.ts +9 -3
- package/src/lib/types.ts +37 -36
- package/src/lib/ws/connections.ts +9 -1
- package/tsconfig.json +48 -0
- package/dist/src/lib/adapters/database.d.ts +0 -45
- package/dist/src/lib/adapters/mssql.d.ts +0 -3
- package/dist/src/lib/ai/active-streams.d.ts +0 -14
- package/dist/src/lib/ai/context/index.d.ts +0 -16
- package/dist/src/lib/ai/tools/capture-files.tool.d.ts +0 -6
- package/dist/src/lib/cli/extract-endpoints.d.ts +0 -6
- package/dist/src/lib/graph/expand-domains.d.ts +0 -2
- package/dist/src/lib/graph/generate-cypher.d.ts +0 -22
- package/dist/src/lib/graph/seed.d.ts +0 -19
- package/dist/src/lib/graph/validate.d.ts +0 -2
- package/dist/src/lib/routes/index.d.ts +0 -4
- package/dist/src/lib/ws/events.d.ts +0 -39
- package/dist/src/lib/ws/index.d.ts +0 -3
- package/dist/src/lib/ws/notify.d.ts +0 -2
- package/src/lib/adapters/database.ts +0 -48
- package/src/lib/adapters/mssql.ts +0 -231
- package/src/lib/ai/active-streams.ts +0 -123
- package/src/lib/ai/context/index.ts +0 -80
- package/src/lib/ai/tools/capture-files.tool.ts +0 -20
- package/src/lib/cli/extract-endpoints.ts +0 -550
- package/src/lib/graph/expand-domains.ts +0 -276
- package/src/lib/graph/generate-cypher.ts +0 -192
- package/src/lib/graph/seed.ts +0 -162
- package/src/lib/graph/validate.ts +0 -78
- package/src/lib/routes/index.ts +0 -4
- package/src/lib/ws/events.ts +0 -39
- package/src/lib/ws/index.ts +0 -11
- package/src/lib/ws/notify.ts +0 -9
- package/src/sample/db/client.ts +0 -9
- package/src/sample/db/migrations/20260411023125_rich_purple_man/migration.sql +0 -5
- package/src/sample/db/migrations/20260411023125_rich_purple_man/snapshot.json +0 -50
- package/src/sample/db/schema.ts +0 -10
- package/src/sample/domains/account/concepts/session.concept.ts +0 -17
- package/src/sample/domains/account/endpoints/listCurrentSessions.endpoint.ts +0 -31
- package/src/sample/domains/account/endpoints/revokeAllOtherSessions.endpoint.ts +0 -22
- package/src/sample/domains/account/endpoints/revokeCurrentSession.endpoint.ts +0 -33
- package/src/sample/domains/account/index.ts +0 -18
- package/src/sample/domains/appraisals/concepts/appraisalCycle.concept.ts +0 -15
- package/src/sample/domains/appraisals/concepts/appraisalRecord.concept.ts +0 -20
- package/src/sample/domains/appraisals/concepts/appraisalRecordCompetency.concept.ts +0 -10
- package/src/sample/domains/appraisals/concepts/appraisalRecordFunctionalRequirement.concept.ts +0 -10
- package/src/sample/domains/appraisals/concepts/appraisalRecordGoal.concept.ts +0 -17
- package/src/sample/domains/appraisals/endpoints/getAppraisalRecordById.endpoint.ts +0 -321
- package/src/sample/domains/appraisals/endpoints/getAppraisalRecordCompetencies.endpoint.ts +0 -120
- package/src/sample/domains/appraisals/endpoints/getAppraisalRecordFunctionalRequirements.endpoint.ts +0 -126
- package/src/sample/domains/appraisals/endpoints/getAppraisalRecordGoals.endpoint.ts +0 -104
- package/src/sample/domains/appraisals/endpoints/getAppraisalRecordScore.endpoint.ts +0 -58
- package/src/sample/domains/appraisals/endpoints/listAppraisalCyclesSimple.endpoint.ts +0 -52
- package/src/sample/domains/appraisals/endpoints/listAppraisalRecords.endpoint.ts +0 -245
- package/src/sample/domains/appraisals/endpoints/listAppraisalTemplatesSimple.endpoint.ts +0 -52
- package/src/sample/domains/appraisals/index.ts +0 -40
- package/src/sample/domains/appraisals/rules/appraisalRecordScoping.rule.ts +0 -7
- package/src/sample/domains/attendance/concepts/attendancePermission.concept.ts +0 -17
- package/src/sample/domains/attendance/concepts/attendanceTransaction.concept.ts +0 -17
- package/src/sample/domains/attendance/concepts/publicHoliday.concept.ts +0 -10
- package/src/sample/domains/attendance/concepts/punch.concept.ts +0 -19
- package/src/sample/domains/attendance/endpoints/getAttendanceTransactionById.endpoint.ts +0 -444
- package/src/sample/domains/attendance/endpoints/getCurrentAttendanceProfile.endpoint.ts +0 -886
- package/src/sample/domains/attendance/endpoints/getCurrentAttendanceStatistics.endpoint.ts +0 -49
- package/src/sample/domains/attendance/endpoints/listAttendancePermissions.endpoint.ts +0 -176
- package/src/sample/domains/attendance/endpoints/listAttendanceTransactionStates.endpoint.ts +0 -26
- package/src/sample/domains/attendance/endpoints/listAttendanceTransactions.endpoint.ts +0 -373
- package/src/sample/domains/attendance/endpoints/listPublicHolidaysSimple.endpoint.ts +0 -52
- package/src/sample/domains/attendance/endpoints/listPunchTypes.endpoint.ts +0 -25
- package/src/sample/domains/attendance/endpoints/listPunches.endpoint.ts +0 -178
- package/src/sample/domains/attendance/index.ts +0 -41
- package/src/sample/domains/attendance/services/attendancePermissions.service.ts +0 -15
- package/src/sample/domains/employees/concepts/employee.concept.ts +0 -20
- package/src/sample/domains/employees/concepts/employeeBankAccount.concept.ts +0 -19
- package/src/sample/domains/employees/concepts/employeeChild.concept.ts +0 -19
- package/src/sample/domains/employees/concepts/employeeDocument.concept.ts +0 -21
- package/src/sample/domains/employees/concepts/employeeEvent.concept.ts +0 -21
- package/src/sample/domains/employees/concepts/employeeExperience.concept.ts +0 -18
- package/src/sample/domains/employees/concepts/employeeJobLevelChange.concept.ts +0 -21
- package/src/sample/domains/employees/concepts/employeeMedal.concept.ts +0 -20
- package/src/sample/domains/employees/concepts/employeeQualification.concept.ts +0 -20
- package/src/sample/domains/employees/concepts/employeeSpouse.concept.ts +0 -21
- package/src/sample/domains/employees/concepts/employeeViolation.concept.ts +0 -19
- package/src/sample/domains/employees/endpoints/getCurrentEmployee.endpoint.ts +0 -1651
- package/src/sample/domains/employees/endpoints/getCurrentIdentity.endpoint.ts +0 -197
- package/src/sample/domains/employees/endpoints/getCurrentManagers.endpoint.ts +0 -142
- package/src/sample/domains/employees/endpoints/getEmployeeById.endpoint.ts +0 -1659
- package/src/sample/domains/employees/endpoints/getEmployeeStatistics.endpoint.ts +0 -43
- package/src/sample/domains/employees/endpoints/listBankAccounts.endpoint.ts +0 -223
- package/src/sample/domains/employees/endpoints/listChildren.endpoint.ts +0 -211
- package/src/sample/domains/employees/endpoints/listDocuments.endpoint.ts +0 -222
- package/src/sample/domains/employees/endpoints/listEmployeesSimple.endpoint.ts +0 -156
- package/src/sample/domains/employees/endpoints/listEvents.endpoint.ts +0 -120
- package/src/sample/domains/employees/endpoints/listExperiences.endpoint.ts +0 -188
- package/src/sample/domains/employees/endpoints/listJobLevelChanges.endpoint.ts +0 -240
- package/src/sample/domains/employees/endpoints/listMedals.endpoint.ts +0 -266
- package/src/sample/domains/employees/endpoints/listQualifications.endpoint.ts +0 -265
- package/src/sample/domains/employees/endpoints/listSpouses.endpoint.ts +0 -278
- package/src/sample/domains/employees/endpoints/listViolations.endpoint.ts +0 -245
- package/src/sample/domains/employees/index.ts +0 -75
- package/src/sample/domains/employees/services/employees.service.ts +0 -181
- package/src/sample/domains/index.ts +0 -10
- package/src/sample/domains/leaves/concepts/leave.concept.ts +0 -21
- package/src/sample/domains/leaves/concepts/leaveBalance.concept.ts +0 -17
- package/src/sample/domains/leaves/concepts/leaveBalanceTransaction.concept.ts +0 -16
- package/src/sample/domains/leaves/concepts/leaveType.concept.ts +0 -13
- package/src/sample/domains/leaves/concepts/leaveTypes.concept.ts +0 -205
- package/src/sample/domains/leaves/endpoints/getBalance.endpoint.ts +0 -53
- package/src/sample/domains/leaves/endpoints/getLeaveById.endpoint.ts +0 -53
- package/src/sample/domains/leaves/endpoints/listBalanceTransactions.endpoint.ts +0 -196
- package/src/sample/domains/leaves/endpoints/listBalanceTypes.endpoint.ts +0 -26
- package/src/sample/domains/leaves/endpoints/listBalances.endpoint.ts +0 -201
- package/src/sample/domains/leaves/endpoints/listLeaveTypes.endpoint.ts +0 -28
- package/src/sample/domains/leaves/endpoints/listLeaves.endpoint.ts +0 -234
- package/src/sample/domains/leaves/index.ts +0 -38
- package/src/sample/domains/leaves/services/leaveRequests.service.ts +0 -232
- package/src/sample/domains/notifications/concepts/notification.concept.ts +0 -19
- package/src/sample/domains/notifications/endpoints/countMyNotifications.endpoint.ts +0 -21
- package/src/sample/domains/notifications/endpoints/getMyNotification.endpoint.ts +0 -57
- package/src/sample/domains/notifications/endpoints/listMyNotifications.endpoint.ts +0 -59
- package/src/sample/domains/notifications/endpoints/markMyNotificationAsRead.endpoint.ts +0 -32
- package/src/sample/domains/notifications/index.ts +0 -20
- package/src/sample/domains/payroll/concepts/payslip.concept.ts +0 -18
- package/src/sample/domains/payroll/concepts/salaryCertificate.concept.ts +0 -17
- package/src/sample/domains/payroll/concepts/salaryCertificateRequestingEntity.concept.ts +0 -8
- package/src/sample/domains/payroll/endpoints/getPayslipById.endpoint.ts +0 -238
- package/src/sample/domains/payroll/endpoints/listPayslips.endpoint.ts +0 -216
- package/src/sample/domains/payroll/endpoints/listSalaryCertificateLanguages.endpoint.ts +0 -25
- package/src/sample/domains/payroll/endpoints/listSalaryCertificateRequestingEntities.endpoint.ts +0 -62
- package/src/sample/domains/payroll/endpoints/listSalaryCertificateTypes.endpoint.ts +0 -24
- package/src/sample/domains/payroll/endpoints/listSalaryCertificates.endpoint.ts +0 -122
- package/src/sample/domains/payroll/endpoints/previewSalaryCertificate.endpoint.ts +0 -45
- package/src/sample/domains/payroll/index.ts +0 -32
- package/src/sample/domains/payroll/rules/payrollEmployeeContext.rule.ts +0 -7
- package/src/sample/domains/payroll/services/salaryCertificates.service.ts +0 -15
- package/src/sample/domains/servicing/concepts/service.concept.ts +0 -6
- package/src/sample/domains/servicing/concepts/serviceRequest.concept.ts +0 -12
- package/src/sample/domains/servicing/concepts/serviceRequestApproval.concept.ts +0 -9
- package/src/sample/domains/servicing/endpoints/cancelServiceRequest.endpoint.ts +0 -21
- package/src/sample/domains/servicing/endpoints/createServiceRequest.endpoint.ts +0 -511
- package/src/sample/domains/servicing/endpoints/getServiceRequest.endpoint.ts +0 -352
- package/src/sample/domains/servicing/endpoints/getServiceRequestFormItems.endpoint.ts +0 -219
- package/src/sample/domains/servicing/endpoints/getServiceRequestTransactionFormItems.endpoint.ts +0 -216
- package/src/sample/domains/servicing/endpoints/getServiceStates.endpoint.ts +0 -47
- package/src/sample/domains/servicing/endpoints/invokeServiceRequestAction.endpoint.ts +0 -139
- package/src/sample/domains/servicing/endpoints/listServiceRequests.endpoint.ts +0 -292
- package/src/sample/domains/servicing/endpoints/listServices.endpoint.ts +0 -108
- package/src/sample/domains/servicing/endpoints/updateServiceRequest.endpoint.ts +0 -355
- package/src/sample/domains/servicing/index.ts +0 -44
- package/src/sample/domains/servicing/rules/checkValidActions.rule.ts +0 -7
- package/src/sample/domains/servicing/rules/createServiceRequest.rule.ts +0 -7
- package/src/sample/domains/servicing/rules/filterServiceRequestsByState.rule.ts +0 -7
- package/src/sample/domains/servicing/rules/passingOptionFields.rule.ts +0 -7
- package/src/sample/domains/shared/rules/pagination.rule.ts +0 -7
- package/src/sample/domains/suggestions/concepts/suggestion.concept.ts +0 -19
- package/src/sample/domains/suggestions/concepts/suggestionCategory.concept.ts +0 -7
- package/src/sample/domains/suggestions/concepts/suggestionImpactLevel.concept.ts +0 -7
- package/src/sample/domains/suggestions/endpoints/createSuggestion.endpoint.ts +0 -705
- package/src/sample/domains/suggestions/endpoints/deleteSuggestion.endpoint.ts +0 -32
- package/src/sample/domains/suggestions/endpoints/getSuggestionById.endpoint.ts +0 -635
- package/src/sample/domains/suggestions/endpoints/listSuggestionCategories.endpoint.ts +0 -62
- package/src/sample/domains/suggestions/endpoints/listSuggestionImpactLevels.endpoint.ts +0 -62
- package/src/sample/domains/suggestions/endpoints/listSuggestionStates.endpoint.ts +0 -24
- package/src/sample/domains/suggestions/endpoints/listSuggestions.endpoint.ts +0 -132
- package/src/sample/domains/suggestions/endpoints/updateSuggestion.endpoint.ts +0 -690
- package/src/sample/domains/suggestions/endpoints/updateSuggestionState.endpoint.ts +0 -39
- package/src/sample/domains/suggestions/index.ts +0 -34
- package/src/sample/domains/suggestions/rules/suggestionScope.rule.ts +0 -7
- package/src/sample/domains/surveys/concepts/survey.concept.ts +0 -10
- package/src/sample/domains/surveys/concepts/surveyResponse.concept.ts +0 -14
- package/src/sample/domains/surveys/endpoints/getSurveyResponseById.endpoint.ts +0 -131
- package/src/sample/domains/surveys/endpoints/getTargetedSurvey.endpoint.ts +0 -129
- package/src/sample/domains/surveys/endpoints/listTargetedSurveys.endpoint.ts +0 -160
- package/src/sample/domains/surveys/endpoints/respondToSurvey.endpoint.ts +0 -144
- package/src/sample/domains/surveys/index.ts +0 -21
- package/src/sample/drizzle.config.ts +0 -11
- package/src/sample/index.bak.ts +0 -341
- package/src/sample/index.ts +0 -318
- package/src/sample/official-statements/defaults.ts +0 -57
- package/src/sample/official-statements/routes.ts +0 -137
- package/src/sample/official-statements/service.ts +0 -148
- package/src/sample/official-statements/types.ts +0 -23
- /package/src/lib/db/migrations/{20260326231647_nice_speedball → mssql/20260326231647_nice_speedball}/migration.sql +0 -0
- /package/src/lib/db/migrations/{20260326231647_nice_speedball → mssql/20260326231647_nice_speedball}/snapshot.json +0 -0
package/dist/src/lib/config.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { DatabaseAdapter } from "./adapters/database";
|
|
3
|
-
import type { StorageAdapter } from "./adapters/storage";
|
|
4
|
-
import type { DomainDef } from "
|
|
5
|
-
import type { RequestInterceptorOptions } from "./ai/interceptors/request-interceptor
|
|
6
|
-
import type { ContextConfig } from "./ai/context/types
|
|
7
|
-
import type { Thread } from "./types
|
|
1
|
+
import type { AnyServerTool } from "@tanstack/ai";
|
|
2
|
+
import type { DatabaseAdapter } from "./adapters/database/index";
|
|
3
|
+
import type { StorageAdapter } from "./adapters/storage/index";
|
|
4
|
+
import type { DomainDef } from "../../contracts/graph";
|
|
5
|
+
import type { RequestInterceptorOptions } from "./ai/interceptors/request-interceptor";
|
|
6
|
+
import type { ContextConfig } from "./ai/context/types";
|
|
7
|
+
import type { ChatMessage, Thread } from "./types";
|
|
8
|
+
/** An agent's tools, as `chat()` takes them. */
|
|
9
|
+
export type ToolSet = ReadonlyArray<AnyServerTool>;
|
|
8
10
|
type ModelConfig = {
|
|
9
11
|
baseURL: string;
|
|
10
12
|
apiKey: string;
|
|
@@ -26,6 +28,10 @@ type RerankerConfig = {
|
|
|
26
28
|
url: string;
|
|
27
29
|
apiKey: string;
|
|
28
30
|
};
|
|
31
|
+
export type ControlCenterConfig = {
|
|
32
|
+
url: string;
|
|
33
|
+
apiKey: string;
|
|
34
|
+
};
|
|
29
35
|
export type KnowledgeConfig = {
|
|
30
36
|
swagger?: {
|
|
31
37
|
url: string;
|
|
@@ -50,9 +56,19 @@ export type ToolContext<TSession extends Record<string, unknown> = Record<string
|
|
|
50
56
|
};
|
|
51
57
|
export type ToolSetFactory<TSession extends Record<string, unknown> = Record<string, unknown>, TRequestContext extends Record<string, unknown> = Record<string, unknown>> = (context: ToolContext<TSession, TRequestContext>) => ToolSet;
|
|
52
58
|
export type DatabaseConfig = {
|
|
53
|
-
type: "mssql";
|
|
59
|
+
type: "mssql" | "postgres";
|
|
54
60
|
connectionString: string;
|
|
55
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* Optional. With Redis, live runs survive a producer restart and reach every
|
|
64
|
+
* instance: the chunk log, the thread→run claims, and abort fan-out all move
|
|
65
|
+
* there. Without it, an in-memory fallback covers a single process.
|
|
66
|
+
*/
|
|
67
|
+
export type RedisConfig = {
|
|
68
|
+
url: string;
|
|
69
|
+
/** How long a finished run's stream log stays replayable. Defaults to 24 h. */
|
|
70
|
+
streamTtlSeconds?: number;
|
|
71
|
+
};
|
|
56
72
|
export type StorageConfig = {
|
|
57
73
|
endPoint: string;
|
|
58
74
|
port: number;
|
|
@@ -61,18 +77,34 @@ export type StorageConfig = {
|
|
|
61
77
|
secretKey: string;
|
|
62
78
|
bucketName?: string;
|
|
63
79
|
};
|
|
64
|
-
|
|
65
|
-
|
|
80
|
+
type BackendFetchConfig = {
|
|
81
|
+
baseUrl: string;
|
|
82
|
+
apiKey: string;
|
|
83
|
+
headers?: Record<string, string>;
|
|
84
|
+
transformRequestBody?: (body: Record<string, unknown>, context: {
|
|
85
|
+
token: string;
|
|
86
|
+
}) => Promise<Record<string, unknown>>;
|
|
87
|
+
interceptor?: RequestInterceptorOptions;
|
|
88
|
+
};
|
|
89
|
+
/** Model and knowledge-graph providers. Declared once at server level; an agent may override any of them. */
|
|
90
|
+
type ProviderConfig = {
|
|
91
|
+
model: ModelConfig;
|
|
92
|
+
fastModel?: ModelConfig;
|
|
93
|
+
vision?: ModelConfig;
|
|
94
|
+
embedding?: EmbeddingConfig;
|
|
95
|
+
neo4j?: Neo4jConfig;
|
|
96
|
+
reranker?: RerankerConfig;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* What an agent *does*, independent of where its providers came from. Shared
|
|
100
|
+
* verbatim by the authored definition and its resolved form — the two differ
|
|
101
|
+
* only in how providers and opt-outs are expressed, so everything else lives
|
|
102
|
+
* here and cannot drift between them.
|
|
103
|
+
*/
|
|
104
|
+
type AgentBehavior<TSession extends Record<string, unknown>, TRequestContext extends Record<string, unknown>> = {
|
|
105
|
+
systemPrompt?: string | ((context: PromptContext<TSession, TRequestContext>) => string | Promise<string>);
|
|
66
106
|
tools?: ToolSet | ToolSetFactory<TSession, TRequestContext>;
|
|
67
|
-
backendFetch?:
|
|
68
|
-
baseUrl: string;
|
|
69
|
-
apiKey: string;
|
|
70
|
-
headers?: Record<string, string>;
|
|
71
|
-
transformRequestBody?: (body: Record<string, unknown>, context: {
|
|
72
|
-
token: string;
|
|
73
|
-
}) => Promise<Record<string, unknown>>;
|
|
74
|
-
interceptor?: RequestInterceptorOptions;
|
|
75
|
-
};
|
|
107
|
+
backendFetch?: BackendFetchConfig;
|
|
76
108
|
loadSessionData?: (token: string) => Promise<TSession>;
|
|
77
109
|
resolveRequestContext?: (request: Request) => TRequestContext | Promise<TRequestContext>;
|
|
78
110
|
onToolCall?: (toolCall: {
|
|
@@ -81,68 +113,53 @@ export type CortexAgentDefinition<TSession extends Record<string, unknown> = Rec
|
|
|
81
113
|
args: Record<string, unknown>;
|
|
82
114
|
}) => void;
|
|
83
115
|
onStreamFinish?: (result: {
|
|
84
|
-
messages:
|
|
116
|
+
messages: ChatMessage[];
|
|
85
117
|
isAborted: boolean;
|
|
86
118
|
}) => void;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* An agent as authored. Providers are optional because an unset one inherits
|
|
122
|
+
* from server level; `null` on knowledge means "opt out entirely" rather than
|
|
123
|
+
* "inherit". The Control Center is server-level only: which agents it backs is
|
|
124
|
+
* decided by publishing them there, not per entry here.
|
|
125
|
+
*/
|
|
126
|
+
export type CortexAgentDefinition<TSession extends Record<string, unknown> = Record<string, unknown>, TRequestContext extends Record<string, unknown> = Record<string, unknown>> = AgentBehavior<TSession, TRequestContext> & Partial<ProviderConfig> & {
|
|
93
127
|
knowledge?: KnowledgeConfig | null;
|
|
128
|
+
context?: Partial<ContextConfig>;
|
|
94
129
|
};
|
|
95
|
-
|
|
130
|
+
/**
|
|
131
|
+
* An agent after the factory has merged it with server-level config. Every
|
|
132
|
+
* inherit-or-opt-out decision is already resolved, so nothing here is nullable
|
|
133
|
+
* and `model`/`context` are guaranteed present.
|
|
134
|
+
*/
|
|
135
|
+
export type ResolvedCortexAgentConfig = AgentBehavior<Record<string, unknown>, Record<string, unknown>> & ProviderConfig & {
|
|
136
|
+
agentId: string;
|
|
96
137
|
db: DatabaseAdapter;
|
|
97
|
-
storage
|
|
98
|
-
|
|
99
|
-
fastModel?: ModelConfig;
|
|
100
|
-
embedding: EmbeddingConfig;
|
|
101
|
-
neo4j?: Neo4jConfig;
|
|
102
|
-
reranker?: RerankerConfig;
|
|
103
|
-
systemPrompt: string | ((context: PromptContext) => string | Promise<string>);
|
|
104
|
-
tools?: ToolSet | ToolSetFactory;
|
|
105
|
-
backendFetch?: {
|
|
106
|
-
baseUrl: string;
|
|
107
|
-
apiKey: string;
|
|
108
|
-
headers?: Record<string, string>;
|
|
109
|
-
transformRequestBody?: (body: Record<string, unknown>, context: {
|
|
110
|
-
token: string;
|
|
111
|
-
}) => Promise<Record<string, unknown>>;
|
|
112
|
-
interceptor?: RequestInterceptorOptions;
|
|
113
|
-
};
|
|
114
|
-
loadSessionData?: (token: string) => Promise<Record<string, unknown>>;
|
|
115
|
-
resolveRequestContext?: (request: Request) => Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
116
|
-
onToolCall?: (toolCall: {
|
|
117
|
-
toolName: string;
|
|
118
|
-
toolCallId: string;
|
|
119
|
-
args: Record<string, unknown>;
|
|
120
|
-
}) => void;
|
|
121
|
-
onStreamFinish?: (result: {
|
|
122
|
-
messages: UIMessage[];
|
|
123
|
-
isAborted: boolean;
|
|
124
|
-
}) => void;
|
|
125
|
-
context: ContextConfig;
|
|
138
|
+
storage?: StorageAdapter;
|
|
139
|
+
controlCenter?: ControlCenterConfig;
|
|
126
140
|
knowledge?: KnowledgeConfig;
|
|
141
|
+
context: ContextConfig;
|
|
127
142
|
};
|
|
128
|
-
export type CortexConfig = {
|
|
143
|
+
export type CortexConfig = ProviderConfig & {
|
|
129
144
|
port?: number;
|
|
130
145
|
database: DatabaseConfig;
|
|
131
|
-
storage
|
|
146
|
+
storage?: StorageConfig;
|
|
147
|
+
redis?: RedisConfig;
|
|
132
148
|
auth?: {
|
|
133
149
|
jwksUri: string;
|
|
134
150
|
issuer: string;
|
|
135
151
|
tokenExtractor?: (req: Request) => string | null;
|
|
136
152
|
cookieName?: string;
|
|
137
153
|
};
|
|
138
|
-
|
|
139
|
-
fastModel?: ModelConfig;
|
|
140
|
-
embedding: EmbeddingConfig;
|
|
141
|
-
neo4j?: Neo4jConfig;
|
|
142
|
-
reranker?: RerankerConfig;
|
|
154
|
+
controlCenter?: ControlCenterConfig;
|
|
143
155
|
context?: Partial<ContextConfig>;
|
|
144
156
|
knowledge?: KnowledgeConfig;
|
|
145
|
-
|
|
157
|
+
/**
|
|
158
|
+
* Locally-defined agents. With `controlCenter` set, agents published there
|
|
159
|
+
* are served automatically and need no entry here; an entry is only needed
|
|
160
|
+
* for local behavior (tools, backendFetch, provider overrides).
|
|
161
|
+
*/
|
|
162
|
+
agents?: Record<string, CortexAgentDefinition>;
|
|
146
163
|
};
|
|
147
164
|
/**
|
|
148
165
|
* Helper to define an agent with full type inference for `systemPrompt` context.
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { DatabaseConfig } from "../config";
|
|
2
|
+
/**
|
|
3
|
+
* Each dialect keeps its own migration history — Postgres starts from a
|
|
4
|
+
* squashed initial migration rather than replaying MSSQL's. The driver imports
|
|
5
|
+
* are lazy so a server only loads the one it was configured for.
|
|
6
|
+
*/
|
|
7
|
+
export declare function runMigrations(database: DatabaseConfig): Promise<void>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { ThreadContextMeta } from "../ai/context/types.ts";
|
|
1
|
+
import type { ChatMessage, TokenUsage } from "../types";
|
|
2
|
+
import type { ThreadContextMeta } from "../ai/context/types";
|
|
4
3
|
export declare const aiSchema: import("drizzle-orm/mssql-core").MsSqlSchema<"ai">;
|
|
5
4
|
export declare const threads: import("drizzle-orm/mssql-core").MsSqlTableWithColumns<{
|
|
6
5
|
name: "threads";
|
|
@@ -57,15 +56,15 @@ export declare const threads: import("drizzle-orm/mssql-core").MsSqlTableWithCol
|
|
|
57
56
|
userId: import("drizzle-orm/mssql-core").MsSqlColumn<{
|
|
58
57
|
name: string;
|
|
59
58
|
tableName: "threads";
|
|
60
|
-
dataType: "
|
|
59
|
+
dataType: "string";
|
|
61
60
|
data: string;
|
|
62
|
-
driverParam:
|
|
61
|
+
driverParam: string | number;
|
|
63
62
|
notNull: true;
|
|
64
63
|
hasDefault: false;
|
|
65
64
|
isPrimaryKey: false;
|
|
66
65
|
isAutoincrement: false;
|
|
67
66
|
hasRuntimeDefault: false;
|
|
68
|
-
enumValues:
|
|
67
|
+
enumValues: [string, ...string[]];
|
|
69
68
|
baseColumn: never;
|
|
70
69
|
identity: undefined;
|
|
71
70
|
generated: undefined;
|
|
@@ -225,7 +224,7 @@ export declare const messages: import("drizzle-orm/mssql-core").MsSqlTableWithCo
|
|
|
225
224
|
name: string;
|
|
226
225
|
tableName: "messages";
|
|
227
226
|
dataType: "object json";
|
|
228
|
-
data:
|
|
227
|
+
data: ChatMessage;
|
|
229
228
|
driverParam: string;
|
|
230
229
|
notNull: true;
|
|
231
230
|
hasDefault: false;
|
|
@@ -237,6 +236,22 @@ export declare const messages: import("drizzle-orm/mssql-core").MsSqlTableWithCo
|
|
|
237
236
|
identity: undefined;
|
|
238
237
|
generated: undefined;
|
|
239
238
|
}, {}>;
|
|
239
|
+
ordinal: import("drizzle-orm/mssql-core").MsSqlColumn<{
|
|
240
|
+
name: string;
|
|
241
|
+
tableName: "messages";
|
|
242
|
+
dataType: "number int32";
|
|
243
|
+
data: number;
|
|
244
|
+
driverParam: number;
|
|
245
|
+
notNull: true;
|
|
246
|
+
hasDefault: true;
|
|
247
|
+
isPrimaryKey: false;
|
|
248
|
+
isAutoincrement: false;
|
|
249
|
+
hasRuntimeDefault: false;
|
|
250
|
+
enumValues: undefined;
|
|
251
|
+
baseColumn: never;
|
|
252
|
+
identity: undefined;
|
|
253
|
+
generated: undefined;
|
|
254
|
+
}, {}>;
|
|
240
255
|
role: import("drizzle-orm/mssql-core").MsSqlColumn<{
|
|
241
256
|
name: string;
|
|
242
257
|
tableName: "messages";
|
|
@@ -359,13 +374,45 @@ export declare const llmRequests: import("drizzle-orm/mssql-core").MsSqlTableWit
|
|
|
359
374
|
};
|
|
360
375
|
dialect: "mssql";
|
|
361
376
|
}>;
|
|
362
|
-
export declare const
|
|
363
|
-
name: "
|
|
377
|
+
export declare const attachments: import("drizzle-orm/mssql-core").MsSqlTableWithColumns<{
|
|
378
|
+
name: "attachments";
|
|
364
379
|
schema: "ai";
|
|
365
380
|
columns: {
|
|
381
|
+
createdAt: import("drizzle-orm/mssql-core").MsSqlColumn<{
|
|
382
|
+
name: string;
|
|
383
|
+
tableName: "attachments";
|
|
384
|
+
dataType: "object date";
|
|
385
|
+
data: Date;
|
|
386
|
+
driverParam: string | Date;
|
|
387
|
+
notNull: true;
|
|
388
|
+
hasDefault: true;
|
|
389
|
+
isPrimaryKey: false;
|
|
390
|
+
isAutoincrement: false;
|
|
391
|
+
hasRuntimeDefault: true;
|
|
392
|
+
enumValues: undefined;
|
|
393
|
+
baseColumn: never;
|
|
394
|
+
identity: undefined;
|
|
395
|
+
generated: undefined;
|
|
396
|
+
}, {}>;
|
|
397
|
+
updatedAt: import("drizzle-orm/mssql-core").MsSqlColumn<{
|
|
398
|
+
name: string;
|
|
399
|
+
tableName: "attachments";
|
|
400
|
+
dataType: "object date";
|
|
401
|
+
data: Date;
|
|
402
|
+
driverParam: string | Date;
|
|
403
|
+
notNull: true;
|
|
404
|
+
hasDefault: true;
|
|
405
|
+
isPrimaryKey: false;
|
|
406
|
+
isAutoincrement: false;
|
|
407
|
+
hasRuntimeDefault: true;
|
|
408
|
+
enumValues: undefined;
|
|
409
|
+
baseColumn: never;
|
|
410
|
+
identity: undefined;
|
|
411
|
+
generated: undefined;
|
|
412
|
+
}, {}>;
|
|
366
413
|
id: import("drizzle-orm/mssql-core").MsSqlColumn<{
|
|
367
414
|
name: string;
|
|
368
|
-
tableName: "
|
|
415
|
+
tableName: "attachments";
|
|
369
416
|
dataType: "custom";
|
|
370
417
|
data: string;
|
|
371
418
|
driverParam: unknown;
|
|
@@ -379,9 +426,25 @@ export declare const capturedFiles: import("drizzle-orm/mssql-core").MsSqlTableW
|
|
|
379
426
|
identity: undefined;
|
|
380
427
|
generated: undefined;
|
|
381
428
|
}, {}>;
|
|
382
|
-
|
|
429
|
+
threadId: import("drizzle-orm/mssql-core").MsSqlColumn<{
|
|
383
430
|
name: string;
|
|
384
|
-
tableName: "
|
|
431
|
+
tableName: "attachments";
|
|
432
|
+
dataType: "custom";
|
|
433
|
+
data: string;
|
|
434
|
+
driverParam: unknown;
|
|
435
|
+
notNull: true;
|
|
436
|
+
hasDefault: false;
|
|
437
|
+
isPrimaryKey: false;
|
|
438
|
+
isAutoincrement: false;
|
|
439
|
+
hasRuntimeDefault: false;
|
|
440
|
+
enumValues: undefined;
|
|
441
|
+
baseColumn: never;
|
|
442
|
+
identity: undefined;
|
|
443
|
+
generated: undefined;
|
|
444
|
+
}, {}>;
|
|
445
|
+
userId: import("drizzle-orm/mssql-core").MsSqlColumn<{
|
|
446
|
+
name: string;
|
|
447
|
+
tableName: "attachments";
|
|
385
448
|
dataType: "string";
|
|
386
449
|
data: string;
|
|
387
450
|
driverParam: string | number;
|
|
@@ -395,25 +458,25 @@ export declare const capturedFiles: import("drizzle-orm/mssql-core").MsSqlTableW
|
|
|
395
458
|
identity: undefined;
|
|
396
459
|
generated: undefined;
|
|
397
460
|
}, {}>;
|
|
398
|
-
|
|
461
|
+
messageId: import("drizzle-orm/mssql-core").MsSqlColumn<{
|
|
399
462
|
name: string;
|
|
400
|
-
tableName: "
|
|
401
|
-
dataType: "
|
|
463
|
+
tableName: "attachments";
|
|
464
|
+
dataType: "string";
|
|
402
465
|
data: string;
|
|
403
|
-
driverParam:
|
|
404
|
-
notNull:
|
|
466
|
+
driverParam: string | number;
|
|
467
|
+
notNull: false;
|
|
405
468
|
hasDefault: false;
|
|
406
469
|
isPrimaryKey: false;
|
|
407
470
|
isAutoincrement: false;
|
|
408
471
|
hasRuntimeDefault: false;
|
|
409
|
-
enumValues:
|
|
472
|
+
enumValues: [string, ...string[]];
|
|
410
473
|
baseColumn: never;
|
|
411
474
|
identity: undefined;
|
|
412
475
|
generated: undefined;
|
|
413
476
|
}, {}>;
|
|
414
|
-
|
|
477
|
+
filename: import("drizzle-orm/mssql-core").MsSqlColumn<{
|
|
415
478
|
name: string;
|
|
416
|
-
tableName: "
|
|
479
|
+
tableName: "attachments";
|
|
417
480
|
dataType: "string";
|
|
418
481
|
data: string;
|
|
419
482
|
driverParam: string | number;
|
|
@@ -427,9 +490,9 @@ export declare const capturedFiles: import("drizzle-orm/mssql-core").MsSqlTableW
|
|
|
427
490
|
identity: undefined;
|
|
428
491
|
generated: undefined;
|
|
429
492
|
}, {}>;
|
|
430
|
-
|
|
493
|
+
contentType: import("drizzle-orm/mssql-core").MsSqlColumn<{
|
|
431
494
|
name: string;
|
|
432
|
-
tableName: "
|
|
495
|
+
tableName: "attachments";
|
|
433
496
|
dataType: "string";
|
|
434
497
|
data: string;
|
|
435
498
|
driverParam: string | number;
|
|
@@ -443,14 +506,12 @@ export declare const capturedFiles: import("drizzle-orm/mssql-core").MsSqlTableW
|
|
|
443
506
|
identity: undefined;
|
|
444
507
|
generated: undefined;
|
|
445
508
|
}, {}>;
|
|
446
|
-
|
|
509
|
+
sizeBytes: import("drizzle-orm/mssql-core").MsSqlColumn<{
|
|
447
510
|
name: string;
|
|
448
|
-
tableName: "
|
|
449
|
-
dataType: "
|
|
450
|
-
data:
|
|
451
|
-
|
|
452
|
-
} & import("ai").UIToolInvocation<import("ai").UITool>;
|
|
453
|
-
driverParam: string;
|
|
511
|
+
tableName: "attachments";
|
|
512
|
+
dataType: "number int32";
|
|
513
|
+
data: number;
|
|
514
|
+
driverParam: number;
|
|
454
515
|
notNull: true;
|
|
455
516
|
hasDefault: false;
|
|
456
517
|
isPrimaryKey: false;
|
|
@@ -461,6 +522,54 @@ export declare const capturedFiles: import("drizzle-orm/mssql-core").MsSqlTableW
|
|
|
461
522
|
identity: undefined;
|
|
462
523
|
generated: undefined;
|
|
463
524
|
}, {}>;
|
|
525
|
+
storageKey: import("drizzle-orm/mssql-core").MsSqlColumn<{
|
|
526
|
+
name: string;
|
|
527
|
+
tableName: "attachments";
|
|
528
|
+
dataType: "string";
|
|
529
|
+
data: string;
|
|
530
|
+
driverParam: string | number;
|
|
531
|
+
notNull: true;
|
|
532
|
+
hasDefault: false;
|
|
533
|
+
isPrimaryKey: false;
|
|
534
|
+
isAutoincrement: false;
|
|
535
|
+
hasRuntimeDefault: false;
|
|
536
|
+
enumValues: [string, ...string[]];
|
|
537
|
+
baseColumn: never;
|
|
538
|
+
identity: undefined;
|
|
539
|
+
generated: undefined;
|
|
540
|
+
}, {}>;
|
|
541
|
+
status: import("drizzle-orm/mssql-core").MsSqlColumn<{
|
|
542
|
+
name: string;
|
|
543
|
+
tableName: "attachments";
|
|
544
|
+
dataType: "string enum";
|
|
545
|
+
data: "pending" | "described" | "failed" | "skipped";
|
|
546
|
+
driverParam: string | number;
|
|
547
|
+
notNull: true;
|
|
548
|
+
hasDefault: false;
|
|
549
|
+
isPrimaryKey: false;
|
|
550
|
+
isAutoincrement: false;
|
|
551
|
+
hasRuntimeDefault: false;
|
|
552
|
+
enumValues: ["pending", "described", "failed", "skipped"];
|
|
553
|
+
baseColumn: never;
|
|
554
|
+
identity: undefined;
|
|
555
|
+
generated: undefined;
|
|
556
|
+
}, {}>;
|
|
557
|
+
description: import("drizzle-orm/mssql-core").MsSqlColumn<{
|
|
558
|
+
name: string;
|
|
559
|
+
tableName: "attachments";
|
|
560
|
+
dataType: "string";
|
|
561
|
+
data: string;
|
|
562
|
+
driverParam: string | number;
|
|
563
|
+
notNull: false;
|
|
564
|
+
hasDefault: false;
|
|
565
|
+
isPrimaryKey: false;
|
|
566
|
+
isAutoincrement: false;
|
|
567
|
+
hasRuntimeDefault: false;
|
|
568
|
+
enumValues: [string, ...string[]];
|
|
569
|
+
baseColumn: never;
|
|
570
|
+
identity: undefined;
|
|
571
|
+
generated: undefined;
|
|
572
|
+
}, {}>;
|
|
464
573
|
};
|
|
465
574
|
dialect: "mssql";
|
|
466
575
|
}>;
|