@alneas/eaos-server 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/LICENSE +21 -0
- package/README.ja.md +49 -0
- package/README.md +46 -2
- package/dist/agentic/agent-jobs.d.ts +333 -0
- package/dist/agentic/agent-jobs.js +15 -0
- package/dist/agentic/agent-jobs.js.map +1 -0
- package/dist/agentic/agent-node.d.ts +40 -0
- package/dist/agentic/agent-node.js +7 -0
- package/dist/agentic/agent-node.js.map +1 -0
- package/dist/agentic/agent-runner.d.ts +33 -0
- package/dist/agentic/agent-runner.js +7 -0
- package/dist/agentic/agent-runner.js.map +1 -0
- package/dist/agentic/ai-broker.d.ts +169 -0
- package/dist/agentic/ai-broker.js +8 -0
- package/dist/agentic/ai-broker.js.map +1 -0
- package/dist/agentic/atomic-checkpointer.d.ts +137 -0
- package/dist/agentic/atomic-checkpointer.js +9 -0
- package/dist/agentic/atomic-checkpointer.js.map +1 -0
- package/dist/agentic/autonomous-worker.d.ts +122 -0
- package/dist/agentic/autonomous-worker.js +10 -0
- package/dist/agentic/autonomous-worker.js.map +1 -0
- package/dist/agentic/event-bridge.d.ts +350 -0
- package/dist/agentic/event-bridge.js +9 -0
- package/dist/agentic/event-bridge.js.map +1 -0
- package/dist/agentic/executor.d.ts +91 -0
- package/dist/agentic/executor.js +12 -0
- package/dist/agentic/executor.js.map +1 -0
- package/dist/agentic/graph-projection.d.ts +119 -0
- package/dist/agentic/graph-projection.js +7 -0
- package/dist/agentic/graph-projection.js.map +1 -0
- package/dist/agentic/graph.d.ts +524 -0
- package/dist/agentic/graph.js +7 -0
- package/dist/agentic/graph.js.map +1 -0
- package/dist/agentic/index.d.ts +28 -0
- package/dist/agentic/index.js +87 -0
- package/dist/agentic/index.js.map +1 -0
- package/dist/agentic/local-runner.d.ts +106 -0
- package/dist/agentic/local-runner.js +7 -0
- package/dist/agentic/local-runner.js.map +1 -0
- package/dist/agentic/remote-executor.d.ts +67 -0
- package/dist/agentic/remote-executor.js +8 -0
- package/dist/agentic/remote-executor.js.map +1 -0
- package/dist/agentic/types.d.ts +157 -0
- package/dist/agentic/types.js +7 -0
- package/dist/agentic/types.js.map +1 -0
- package/dist/agentic/workflow-catalog.d.ts +152 -0
- package/dist/agentic/workflow-catalog.js +7 -0
- package/dist/agentic/workflow-catalog.js.map +1 -0
- package/dist/agentic/workflow-compiler.d.ts +44 -0
- package/dist/agentic/workflow-compiler.js +8 -0
- package/dist/agentic/workflow-compiler.js.map +1 -0
- package/dist/agentic/workflow-coordinator.d.ts +170 -0
- package/dist/agentic/workflow-coordinator.js +8 -0
- package/dist/agentic/workflow-coordinator.js.map +1 -0
- package/dist/agentic/workflow-manager.d.ts +91 -0
- package/dist/agentic/workflow-manager.js +7 -0
- package/dist/agentic/workflow-manager.js.map +1 -0
- package/dist/agentic/workflow-registry.d.ts +334 -0
- package/dist/agentic/workflow-registry.js +7 -0
- package/dist/agentic/workflow-registry.js.map +1 -0
- package/dist/artifacts-CteHmCMI.d.ts +614 -0
- package/dist/auth-hooks/api-key.d.ts +75 -0
- package/dist/auth-hooks/api-key.js +7 -0
- package/dist/auth-hooks/api-key.js.map +1 -0
- package/dist/auth-hooks/index.d.ts +80 -0
- package/dist/auth-hooks/index.js +28 -0
- package/dist/auth-hooks/index.js.map +1 -0
- package/dist/browser-auth/account-memberships.d.ts +213 -0
- package/dist/browser-auth/account-memberships.js +13 -0
- package/dist/browser-auth/account-memberships.js.map +1 -0
- package/dist/browser-auth/index.d.ts +8 -0
- package/dist/browser-auth/index.js +59 -0
- package/dist/browser-auth/index.js.map +1 -0
- package/dist/browser-auth/kratos-session.d.ts +37 -0
- package/dist/browser-auth/kratos-session.js +7 -0
- package/dist/browser-auth/kratos-session.js.map +1 -0
- package/dist/browser-auth/platform-session.d.ts +120 -0
- package/dist/browser-auth/platform-session.js +7 -0
- package/dist/browser-auth/platform-session.js.map +1 -0
- package/dist/browser-auth/public-memberships.d.ts +22 -0
- package/dist/browser-auth/public-memberships.js +7 -0
- package/dist/browser-auth/public-memberships.js.map +1 -0
- package/dist/cache/index.d.ts +181 -0
- package/dist/cache/index.js +197 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/chunk-32746UQZ.js +131 -0
- package/dist/chunk-32746UQZ.js.map +1 -0
- package/dist/chunk-3NLSWP2Y.js +223 -0
- package/dist/chunk-3NLSWP2Y.js.map +1 -0
- package/dist/chunk-3P4XTTQH.js +346 -0
- package/dist/chunk-3P4XTTQH.js.map +1 -0
- package/dist/chunk-3VITSHN3.js +15 -0
- package/dist/chunk-3VITSHN3.js.map +1 -0
- package/dist/chunk-46UWPEW2.js +226 -0
- package/dist/chunk-46UWPEW2.js.map +1 -0
- package/dist/chunk-4BARRLJR.js +180 -0
- package/dist/chunk-4BARRLJR.js.map +1 -0
- package/dist/chunk-4VORUFKR.js +45 -0
- package/dist/chunk-4VORUFKR.js.map +1 -0
- package/dist/chunk-55D4ERWO.js +1 -0
- package/dist/chunk-55D4ERWO.js.map +1 -0
- package/dist/chunk-5TBBZIND.js +18 -0
- package/dist/chunk-5TBBZIND.js.map +1 -0
- package/dist/chunk-5WOZWPZA.js +211 -0
- package/dist/chunk-5WOZWPZA.js.map +1 -0
- package/dist/chunk-6CBVZ6CT.js +168 -0
- package/dist/chunk-6CBVZ6CT.js.map +1 -0
- package/dist/chunk-6XZXYNJR.js +74 -0
- package/dist/chunk-6XZXYNJR.js.map +1 -0
- package/dist/chunk-753HWDSC.js +222 -0
- package/dist/chunk-753HWDSC.js.map +1 -0
- package/dist/chunk-7AHSS7SO.js +81 -0
- package/dist/chunk-7AHSS7SO.js.map +1 -0
- package/dist/chunk-7FTJN4SA.js +1 -0
- package/dist/chunk-7FTJN4SA.js.map +1 -0
- package/dist/chunk-AVDMLTPF.js +24 -0
- package/dist/chunk-AVDMLTPF.js.map +1 -0
- package/dist/chunk-BKAHUEIT.js +95 -0
- package/dist/chunk-BKAHUEIT.js.map +1 -0
- package/dist/chunk-CJ7OFEF7.js +134 -0
- package/dist/chunk-CJ7OFEF7.js.map +1 -0
- package/dist/chunk-EJKWDZIU.js +111 -0
- package/dist/chunk-EJKWDZIU.js.map +1 -0
- package/dist/chunk-F2J6IQ6I.js +247 -0
- package/dist/chunk-F2J6IQ6I.js.map +1 -0
- package/dist/chunk-F3O7CELI.js +23 -0
- package/dist/chunk-F3O7CELI.js.map +1 -0
- package/dist/chunk-F4IITPGX.js +221 -0
- package/dist/chunk-F4IITPGX.js.map +1 -0
- package/dist/chunk-FD6VC2NA.js +66 -0
- package/dist/chunk-FD6VC2NA.js.map +1 -0
- package/dist/chunk-FRRRWAHO.js +14 -0
- package/dist/chunk-FRRRWAHO.js.map +1 -0
- package/dist/chunk-HCKAGLLB.js +17 -0
- package/dist/chunk-HCKAGLLB.js.map +1 -0
- package/dist/chunk-HVC7FG6B.js +191 -0
- package/dist/chunk-HVC7FG6B.js.map +1 -0
- package/dist/chunk-HXFVOR7Z.js +496 -0
- package/dist/chunk-HXFVOR7Z.js.map +1 -0
- package/dist/chunk-IJWYS2PF.js +122 -0
- package/dist/chunk-IJWYS2PF.js.map +1 -0
- package/dist/chunk-INCHXAFK.js +1395 -0
- package/dist/chunk-INCHXAFK.js.map +1 -0
- package/dist/chunk-JT6BRGQM.js +1 -0
- package/dist/chunk-JT6BRGQM.js.map +1 -0
- package/dist/chunk-L6PMAEMB.js +115 -0
- package/dist/chunk-L6PMAEMB.js.map +1 -0
- package/dist/chunk-LOUGW6MU.js +126 -0
- package/dist/chunk-LOUGW6MU.js.map +1 -0
- package/dist/chunk-LYPZPE53.js +129 -0
- package/dist/chunk-LYPZPE53.js.map +1 -0
- package/dist/chunk-NNCCN7JP.js +186 -0
- package/dist/chunk-NNCCN7JP.js.map +1 -0
- package/dist/chunk-PBC3MZUL.js +212 -0
- package/dist/chunk-PBC3MZUL.js.map +1 -0
- package/dist/chunk-R4ADP2DC.js +20 -0
- package/dist/chunk-R4ADP2DC.js.map +1 -0
- package/dist/chunk-RHN4Y6VS.js +44 -0
- package/dist/chunk-RHN4Y6VS.js.map +1 -0
- package/dist/chunk-SDJNYPYK.js +770 -0
- package/dist/chunk-SDJNYPYK.js.map +1 -0
- package/dist/chunk-UGNTCOVR.js +28 -0
- package/dist/chunk-UGNTCOVR.js.map +1 -0
- package/dist/chunk-VC2PCK2S.js +31 -0
- package/dist/chunk-VC2PCK2S.js.map +1 -0
- package/dist/chunk-VF5YDZJC.js +305 -0
- package/dist/chunk-VF5YDZJC.js.map +1 -0
- package/dist/chunk-VISRDVTK.js +675 -0
- package/dist/chunk-VISRDVTK.js.map +1 -0
- package/dist/chunk-W6O3LVBY.js +102 -0
- package/dist/chunk-W6O3LVBY.js.map +1 -0
- package/dist/chunk-WFEAKJLR.js +47 -0
- package/dist/chunk-WFEAKJLR.js.map +1 -0
- package/dist/chunk-XIEY2OF4.js +67 -0
- package/dist/chunk-XIEY2OF4.js.map +1 -0
- package/dist/chunk-XITLHDG3.js +37 -0
- package/dist/chunk-XITLHDG3.js.map +1 -0
- package/dist/chunk-XMWPYZWZ.js +61 -0
- package/dist/chunk-XMWPYZWZ.js.map +1 -0
- package/dist/chunk-XUP6CNOM.js +34 -0
- package/dist/chunk-XUP6CNOM.js.map +1 -0
- package/dist/chunk-YABTQZDJ.js +25 -0
- package/dist/chunk-YABTQZDJ.js.map +1 -0
- package/dist/chunk-YMHVRBUU.js +199 -0
- package/dist/chunk-YMHVRBUU.js.map +1 -0
- package/dist/chunk-YMJ7BRKU.js +510 -0
- package/dist/chunk-YMJ7BRKU.js.map +1 -0
- package/dist/chunk-ZC3XWU7B.js +28 -0
- package/dist/chunk-ZC3XWU7B.js.map +1 -0
- package/dist/chunk-ZHMTD5KV.js +90 -0
- package/dist/chunk-ZHMTD5KV.js.map +1 -0
- package/dist/chunk-ZWZDLOE7.js +160 -0
- package/dist/chunk-ZWZDLOE7.js.map +1 -0
- package/dist/db-package/db/local-first-sqlite-adapter.d.ts +432 -0
- package/dist/db-package/db/local-first-sqlite-adapter.js +7 -0
- package/dist/db-package/db/local-first-sqlite-adapter.js.map +1 -0
- package/dist/db-package/index.d.ts +7 -0
- package/dist/db-package/index.js +16 -0
- package/dist/db-package/index.js.map +1 -0
- package/dist/db-package/migration/aggregator.d.ts +86 -0
- package/dist/db-package/migration/aggregator.js +7 -0
- package/dist/db-package/migration/aggregator.js.map +1 -0
- package/dist/db-package/migration/index.d.ts +3 -0
- package/dist/db-package/migration/index.js +8 -0
- package/dist/db-package/migration/index.js.map +1 -0
- package/dist/engine.d.ts +205 -0
- package/dist/engine.js +20 -0
- package/dist/engine.js.map +1 -0
- package/dist/entitlements/index.d.ts +313 -0
- package/dist/entitlements/index.js +23 -0
- package/dist/entitlements/index.js.map +1 -0
- package/dist/execution/chat.d.ts +7 -0
- package/dist/execution/chat.js +7 -0
- package/dist/execution/chat.js.map +1 -0
- package/dist/execution/index.d.ts +342 -0
- package/dist/execution/index.js +66 -0
- package/dist/execution/index.js.map +1 -0
- package/dist/execution/tool-agent.d.ts +7 -0
- package/dist/execution/tool-agent.js +8 -0
- package/dist/execution/tool-agent.js.map +1 -0
- package/dist/extensions/index.d.ts +172 -0
- package/dist/extensions/index.js +95 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/health/index.d.ts +35 -0
- package/dist/health/index.js +7 -0
- package/dist/health/index.js.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +161 -0
- package/dist/index.js.map +1 -0
- package/dist/lifecycle/index.d.ts +133 -0
- package/dist/lifecycle/index.js +13 -0
- package/dist/lifecycle/index.js.map +1 -0
- package/dist/lifecycle-engine/backend-migration.d.ts +2 -0
- package/dist/lifecycle-engine/backend-migration.js +11 -0
- package/dist/lifecycle-engine/backend-migration.js.map +1 -0
- package/dist/lifecycle-engine/baseline.d.ts +2 -0
- package/dist/lifecycle-engine/baseline.js +9 -0
- package/dist/lifecycle-engine/baseline.js.map +1 -0
- package/dist/lifecycle-engine/index.d.ts +1497 -0
- package/dist/lifecycle-engine/index.js +41 -0
- package/dist/lifecycle-engine/index.js.map +1 -0
- package/dist/lifecycle-engine/platform/artifacts.d.ts +4 -0
- package/dist/lifecycle-engine/platform/artifacts.js +7 -0
- package/dist/lifecycle-engine/platform/artifacts.js.map +1 -0
- package/dist/lifecycle-engine/platform/control-plane.d.ts +12 -0
- package/dist/lifecycle-engine/platform/control-plane.js +2 -0
- package/dist/lifecycle-engine/platform/control-plane.js.map +1 -0
- package/dist/lifecycle-engine/platform/database-router.d.ts +118 -0
- package/dist/lifecycle-engine/platform/database-router.js +7 -0
- package/dist/lifecycle-engine/platform/database-router.js.map +1 -0
- package/dist/lifecycle-engine/platform/deployment-placements.d.ts +464 -0
- package/dist/lifecycle-engine/platform/deployment-placements.js +16 -0
- package/dist/lifecycle-engine/platform/deployment-placements.js.map +1 -0
- package/dist/lifecycle-engine/platform/deployment.d.ts +4 -0
- package/dist/lifecycle-engine/platform/deployment.js +17 -0
- package/dist/lifecycle-engine/platform/deployment.js.map +1 -0
- package/dist/lifecycle-engine/platform/index.d.ts +737 -0
- package/dist/lifecycle-engine/platform/index.js +60 -0
- package/dist/lifecycle-engine/platform/index.js.map +1 -0
- package/dist/lifecycle-engine/platform/runtime.d.ts +80 -0
- package/dist/lifecycle-engine/platform/runtime.js +11 -0
- package/dist/lifecycle-engine/platform/runtime.js.map +1 -0
- package/dist/lifecycle-engine/platform/site-publication.d.ts +102 -0
- package/dist/lifecycle-engine/platform/site-publication.js +7 -0
- package/dist/lifecycle-engine/platform/site-publication.js.map +1 -0
- package/dist/lifecycle-engine/platform/user-directory.d.ts +139 -0
- package/dist/lifecycle-engine/platform/user-directory.js +13 -0
- package/dist/lifecycle-engine/platform/user-directory.js.map +1 -0
- package/dist/mcp.d.ts +92 -0
- package/dist/mcp.js +10 -0
- package/dist/mcp.js.map +1 -0
- package/dist/middleware/auth.d.ts +118 -0
- package/dist/middleware/auth.js +7 -0
- package/dist/middleware/auth.js.map +1 -0
- package/dist/middleware/error-handler.d.ts +35 -0
- package/dist/middleware/error-handler.js +7 -0
- package/dist/middleware/error-handler.js.map +1 -0
- package/dist/middleware/module-guard.d.ts +33 -0
- package/dist/middleware/module-guard.js +7 -0
- package/dist/middleware/module-guard.js.map +1 -0
- package/dist/platform-admin/index.d.ts +37 -0
- package/dist/platform-admin/index.js +11 -0
- package/dist/platform-admin/index.js.map +1 -0
- package/dist/platform-admin/store.d.ts +346 -0
- package/dist/platform-admin/store.js +7 -0
- package/dist/platform-admin/store.js.map +1 -0
- package/dist/plugin-data/annotations.d.ts +6 -0
- package/dist/plugin-data/annotations.js +12 -0
- package/dist/plugin-data/annotations.js.map +1 -0
- package/dist/plugin-data/atomic-context.d.ts +41 -0
- package/dist/plugin-data/atomic-context.js +9 -0
- package/dist/plugin-data/atomic-context.js.map +1 -0
- package/dist/plugin-data/atomic.d.ts +6 -0
- package/dist/plugin-data/atomic.js +26 -0
- package/dist/plugin-data/atomic.js.map +1 -0
- package/dist/plugin-data/audit.d.ts +6 -0
- package/dist/plugin-data/audit.js +12 -0
- package/dist/plugin-data/audit.js.map +1 -0
- package/dist/plugin-data/commands.d.ts +6 -0
- package/dist/plugin-data/commands.js +8 -0
- package/dist/plugin-data/commands.js.map +1 -0
- package/dist/plugin-data/composite.d.ts +6 -0
- package/dist/plugin-data/composite.js +8 -0
- package/dist/plugin-data/composite.js.map +1 -0
- package/dist/plugin-data/delivery.d.ts +6 -0
- package/dist/plugin-data/delivery.js +16 -0
- package/dist/plugin-data/delivery.js.map +1 -0
- package/dist/plugin-data/index.d.ts +2798 -0
- package/dist/plugin-data/index.js +102 -0
- package/dist/plugin-data/index.js.map +1 -0
- package/dist/plugin-data/json-documents.d.ts +6 -0
- package/dist/plugin-data/json-documents.js +16 -0
- package/dist/plugin-data/json-documents.js.map +1 -0
- package/dist/plugin-data/outbox.d.ts +6 -0
- package/dist/plugin-data/outbox.js +16 -0
- package/dist/plugin-data/outbox.js.map +1 -0
- package/dist/plugin-data/scoped-records.d.ts +6 -0
- package/dist/plugin-data/scoped-records.js +10 -0
- package/dist/plugin-data/scoped-records.js.map +1 -0
- package/dist/plugin-sdk.d.ts +41 -0
- package/dist/plugin-sdk.js +10 -0
- package/dist/plugin-sdk.js.map +1 -0
- package/dist/sql-lifecycle/index.d.ts +138 -0
- package/dist/sql-lifecycle/index.js +167 -0
- package/dist/sql-lifecycle/index.js.map +1 -0
- package/dist/storage/index.d.ts +2 -0
- package/dist/storage/index.js +13 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/s3-compatible.d.ts +139 -0
- package/dist/storage/s3-compatible.js +11 -0
- package/dist/storage/s3-compatible.js.map +1 -0
- package/dist/tenant.d.ts +108 -0
- package/dist/tenant.js +9 -0
- package/dist/tenant.js.map +1 -0
- package/dist/workspace-context.d.ts +119 -0
- package/dist/workspace-context.js +9 -0
- package/dist/workspace-context.js.map +1 -0
- package/docs/api.md +30560 -0
- package/docs/db/README.md +49 -0
- package/docs/db/docs/api.md +1613 -0
- package/docs/db/docs/guide.md +47 -0
- package/docs/entitlements.md +60 -0
- package/docs/guide.md +92 -0
- package/docs/index.md +57 -0
- package/docs/ja/db/README.md +46 -0
- package/docs/ja/db/docs/guide.md +53 -0
- package/docs/ja/guide.md +46 -0
- package/docs/ja/lifecycle/README.md +46 -0
- package/docs/ja/lifecycle/docs/guide.md +45 -0
- package/docs/ja/storage/README.md +46 -0
- package/docs/ja/storage/docs/guide.md +43 -0
- package/docs/lifecycle/README.md +49 -0
- package/docs/lifecycle/docs/api.md +3770 -0
- package/docs/lifecycle/docs/baseline.md +50 -0
- package/docs/lifecycle/docs/guide.md +47 -0
- package/docs/storage/README.md +49 -0
- package/docs/storage/docs/api.md +470 -0
- package/docs/storage/docs/guide.md +47 -0
- package/package.json +354 -4
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ArtifactDeliveryService,
|
|
3
|
+
PluginError,
|
|
4
|
+
RecordCommandService,
|
|
5
|
+
ScopedRecordService,
|
|
6
|
+
annotationOperations,
|
|
7
|
+
annotationSchemas,
|
|
8
|
+
appendAtomicAudit,
|
|
9
|
+
assertPrincipal,
|
|
10
|
+
atomicCommand,
|
|
11
|
+
atomicHash,
|
|
12
|
+
createAtomicOutboxDispatcher,
|
|
13
|
+
createAtomicOutboxStore,
|
|
14
|
+
createAtomicRecordStore,
|
|
15
|
+
createAtomicRepository,
|
|
16
|
+
createAtomicWorkflowEventSink,
|
|
17
|
+
createCloudflareD1Driver,
|
|
18
|
+
createCompositePluginService,
|
|
19
|
+
createMcpOperationHandler,
|
|
20
|
+
createMcpToolBinder,
|
|
21
|
+
createOracleAtomicDriver,
|
|
22
|
+
createPluginAtomicRepository,
|
|
23
|
+
createPluginRecordStore,
|
|
24
|
+
createPluginRouter,
|
|
25
|
+
createRecordDocumentValidator,
|
|
26
|
+
createSqlRecordStore,
|
|
27
|
+
createSqliteAtomicDriver,
|
|
28
|
+
createStandardPluginServer,
|
|
29
|
+
createValidatedAtomicRepository,
|
|
30
|
+
createValidatedRecordHost,
|
|
31
|
+
createValidatedRecordStore,
|
|
32
|
+
deliveryJobSchema,
|
|
33
|
+
deliveryOperations,
|
|
34
|
+
documentAnnotations,
|
|
35
|
+
enqueueDeliverySchema,
|
|
36
|
+
enqueueOutboxEvent,
|
|
37
|
+
exactKeys,
|
|
38
|
+
joinedAtomicSqlExecutor,
|
|
39
|
+
jsonBody,
|
|
40
|
+
parseRecordCursor,
|
|
41
|
+
readAtomicAudit,
|
|
42
|
+
recordCursor,
|
|
43
|
+
recordDocuments,
|
|
44
|
+
recoverDeliverySchema,
|
|
45
|
+
requeueOutboxEvent,
|
|
46
|
+
revisionInput,
|
|
47
|
+
textInput,
|
|
48
|
+
uniqueRecordKey,
|
|
49
|
+
verifyAtomicAudit
|
|
50
|
+
} from "../chunk-INCHXAFK.js";
|
|
51
|
+
import "../chunk-3VITSHN3.js";
|
|
52
|
+
export {
|
|
53
|
+
ArtifactDeliveryService,
|
|
54
|
+
PluginError,
|
|
55
|
+
RecordCommandService,
|
|
56
|
+
ScopedRecordService,
|
|
57
|
+
annotationOperations,
|
|
58
|
+
annotationSchemas,
|
|
59
|
+
appendAtomicAudit,
|
|
60
|
+
assertPrincipal,
|
|
61
|
+
atomicCommand,
|
|
62
|
+
atomicHash,
|
|
63
|
+
createAtomicOutboxDispatcher,
|
|
64
|
+
createAtomicOutboxStore,
|
|
65
|
+
createAtomicRecordStore,
|
|
66
|
+
createAtomicRepository,
|
|
67
|
+
createAtomicWorkflowEventSink,
|
|
68
|
+
createCloudflareD1Driver,
|
|
69
|
+
createCompositePluginService,
|
|
70
|
+
createMcpOperationHandler,
|
|
71
|
+
createMcpToolBinder,
|
|
72
|
+
createOracleAtomicDriver,
|
|
73
|
+
createPluginAtomicRepository,
|
|
74
|
+
createPluginRecordStore,
|
|
75
|
+
createPluginRouter,
|
|
76
|
+
createRecordDocumentValidator,
|
|
77
|
+
createSqlRecordStore,
|
|
78
|
+
createSqliteAtomicDriver,
|
|
79
|
+
createStandardPluginServer,
|
|
80
|
+
createValidatedAtomicRepository,
|
|
81
|
+
createValidatedRecordHost,
|
|
82
|
+
createValidatedRecordStore,
|
|
83
|
+
deliveryJobSchema,
|
|
84
|
+
deliveryOperations,
|
|
85
|
+
documentAnnotations,
|
|
86
|
+
enqueueDeliverySchema,
|
|
87
|
+
enqueueOutboxEvent,
|
|
88
|
+
exactKeys,
|
|
89
|
+
joinedAtomicSqlExecutor,
|
|
90
|
+
jsonBody,
|
|
91
|
+
parseRecordCursor,
|
|
92
|
+
readAtomicAudit,
|
|
93
|
+
recordCursor,
|
|
94
|
+
recordDocuments,
|
|
95
|
+
recoverDeliverySchema,
|
|
96
|
+
requeueOutboxEvent,
|
|
97
|
+
revisionInput,
|
|
98
|
+
textInput,
|
|
99
|
+
uniqueRecordKey,
|
|
100
|
+
verifyAtomicAudit
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import '@alneas/eaos-server/lifecycle-engine';
|
|
2
|
+
export { createRecordDocumentValidator, createValidatedAtomicRepository, createValidatedRecordHost, createValidatedRecordStore, recordDocuments } from './index.js';
|
|
3
|
+
import '@alneas/eaos-core';
|
|
4
|
+
import 'hono/types';
|
|
5
|
+
import '@alneas/eaos-core/plugin-sdk';
|
|
6
|
+
import 'hono';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createRecordDocumentValidator,
|
|
3
|
+
createValidatedAtomicRepository,
|
|
4
|
+
createValidatedRecordHost,
|
|
5
|
+
createValidatedRecordStore,
|
|
6
|
+
recordDocuments
|
|
7
|
+
} from "../chunk-INCHXAFK.js";
|
|
8
|
+
import "../chunk-3VITSHN3.js";
|
|
9
|
+
export {
|
|
10
|
+
createRecordDocumentValidator,
|
|
11
|
+
createValidatedAtomicRepository,
|
|
12
|
+
createValidatedRecordHost,
|
|
13
|
+
createValidatedRecordStore,
|
|
14
|
+
recordDocuments
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=json-documents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import '@alneas/eaos-core';
|
|
2
|
+
export { AtomicOutboxDispatcherOptions, AtomicOutboxStoreOptions, createAtomicOutboxDispatcher, createAtomicOutboxStore, createAtomicWorkflowEventSink, enqueueOutboxEvent, requeueOutboxEvent } from './index.js';
|
|
3
|
+
import 'hono/types';
|
|
4
|
+
import '@alneas/eaos-core/plugin-sdk';
|
|
5
|
+
import 'hono';
|
|
6
|
+
import '@alneas/eaos-server/lifecycle-engine';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAtomicOutboxDispatcher,
|
|
3
|
+
createAtomicOutboxStore,
|
|
4
|
+
createAtomicWorkflowEventSink,
|
|
5
|
+
enqueueOutboxEvent,
|
|
6
|
+
requeueOutboxEvent
|
|
7
|
+
} from "../chunk-INCHXAFK.js";
|
|
8
|
+
import "../chunk-3VITSHN3.js";
|
|
9
|
+
export {
|
|
10
|
+
createAtomicOutboxDispatcher,
|
|
11
|
+
createAtomicOutboxStore,
|
|
12
|
+
createAtomicWorkflowEventSink,
|
|
13
|
+
enqueueOutboxEvent,
|
|
14
|
+
requeueOutboxEvent
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=outbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Hono } from 'hono';
|
|
2
|
+
import { PlatformPrincipal, PluginContext, DefinedPlugin } from '@alneas/eaos-core';
|
|
3
|
+
import { EntitlementPrincipalResolver, PluginEntitlementRuntime } from './entitlements/index.js';
|
|
4
|
+
import 'hono/types';
|
|
5
|
+
import './plugin-data/index.js';
|
|
6
|
+
import '@alneas/eaos-core/plugin-sdk';
|
|
7
|
+
import '@alneas/eaos-server/lifecycle-engine';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Host authentication, live admission, and scoped capabilities injected into {@link createSdkPluginRouter}.
|
|
11
|
+
*/
|
|
12
|
+
interface PluginSdkHost {
|
|
13
|
+
/** Resolves a verified current principal for each invocation, or null to deny; may be invoked multiple times in one request. */
|
|
14
|
+
resolvePrincipal: EntitlementPrincipalResolver;
|
|
15
|
+
/** Mandatory live lifecycle/resource gate, independent of commercial licensing. */
|
|
16
|
+
authorize: (principal: PlatformPrincipal, pluginId: string, operation: string) => Promise<boolean>;
|
|
17
|
+
/** Optional subscription/quota runtime; required when the plugin declares a rule needing external entitlement admission. */
|
|
18
|
+
entitlements?: PluginEntitlementRuntime;
|
|
19
|
+
/** Must return tenant/plugin-scoped app-core/EAOS capabilities with per-operation authorization. */
|
|
20
|
+
createContext: (principal: PlatformPrincipal, pluginId: string) => Promise<Omit<PluginContext<any>, 'principal' | 'pluginId'>>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Mounts defined plugin routes behind host authentication, live authorization, and optional entitlement admission.
|
|
24
|
+
* @param plugin - Trusted defined plugin containing route methods, paths, handlers, and optional entitlement policy.
|
|
25
|
+
* @param host - Verified principal resolution, lifecycle/resource authorization, and tenant/plugin-scoped capability factory.
|
|
26
|
+
* @returns A Hono router with a 1 MiB body limit; GET/DELETE inputs are query parameter objects, other methods require JSON input.
|
|
27
|
+
* @throws Request handling propagates host, entitlement, context, and handler failures except malformed JSON/auth/admission responses explicitly returned by the router.
|
|
28
|
+
* @remarks Authorization runs before route handling and again after asynchronous context creation. The verified principal/plugin scope overwrites factory dependencies, but the host must enforce scope inside supplied capabilities. Metered entitlement admission can count requests whose later body parsing or handler fails. No transactions, retries, rollback, or idempotency are supplied around handlers.
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* import { createSdkPluginRouter, type PluginSdkHost } from "@alneas/eaos-server/plugin-sdk";
|
|
32
|
+
* import type { DefinedPlugin } from "@alneas/eaos-core";
|
|
33
|
+
* export function pluginRouter(plugin: DefinedPlugin, host: PluginSdkHost) {
|
|
34
|
+
* return createSdkPluginRouter(plugin, host);
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare function createSdkPluginRouter(plugin: DefinedPlugin, host: PluginSdkHost): Hono;
|
|
39
|
+
|
|
40
|
+
export { createSdkPluginRouter };
|
|
41
|
+
export type { PluginSdkHost };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { Dialect, LifecycleStore, LifecycleWriter } from '@alneas/eaos-server/lifecycle-engine';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Privileged primary SQL connection used by {@link SqlLifecycleStore}; it is not a tenant data adapter.
|
|
5
|
+
*/
|
|
6
|
+
interface ControlSqlDriver {
|
|
7
|
+
/** SQL placeholder/schema dialect. */
|
|
8
|
+
dialect: Dialect;
|
|
9
|
+
/** Outside an explicit withAtomicLock transaction, each write must commit before resolving. Reads must use the primary, never a lagging replica.
|
|
10
|
+
* Bind arrays are positional; Oracle payloads must be bound/read as CLOB strings.
|
|
11
|
+
* This is a privileged control DB connection, NOT a tenant data connection.
|
|
12
|
+
* @param sql - Statement supplied by the lifecycle store.
|
|
13
|
+
* @param bindings - Positional values, using the selected dialect placeholders.
|
|
14
|
+
* @returns Optional rows and affectedRows; lock/update statements require affectedRows exactly reflecting the write count.
|
|
15
|
+
* @throws Driver/database failures reject the store operation.
|
|
16
|
+
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import type { ControlSqlDriver } from "@alneas/eaos-server/sql-lifecycle";
|
|
20
|
+
* export async function probePrimaryControlConnection(driver: ControlSqlDriver) {
|
|
21
|
+
* // Use a host-owned primary control connection, not a tenant adapter or replica.
|
|
22
|
+
* const sql = driver.dialect === "oracle" ? "SELECT 1 AS ready FROM dual" : "SELECT 1 AS ready";
|
|
23
|
+
* const result = await driver.execute(sql, []);
|
|
24
|
+
* return result.rows ?? [];
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
execute(sql: string, bindings: unknown[]): Promise<{
|
|
29
|
+
/** Optional primary-database result rows for read statements; column names and CLOB decoding follow the connected SQL driver contract. */
|
|
30
|
+
rows?: Record<string, unknown>[];
|
|
31
|
+
/** Optional exact write count; lifecycle lock/CAS/update paths require it and reject missing or unexpected counts rather than assuming success. */
|
|
32
|
+
affectedRows?: number;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Provides explicit baseline CREATE TABLE statements for the shared lifecycle ledger in each dialect.
|
|
37
|
+
* @remarks No SQL executes on import or construction. Review and apply the selected baseline separately before initialize.
|
|
38
|
+
* @see SqlLifecycleStore for host driver requirements.
|
|
39
|
+
*/
|
|
40
|
+
declare const controlSchemaSql: Record<Dialect, string[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Persists lifecycle state with durable writer-token exclusion and revision-checked updates across hosts.
|
|
43
|
+
* @remarks Apply reviewed controlSchemaSql before initialize. Host connections must read the primary and report affectedRows. Locks do not expire; a crashed writer requires operator reconciliation. Normal callback failures attempt token release; database outcomes can be uncertain if commit or cleanup fails. No connection is opened or disposed by this store.
|
|
44
|
+
* @example
|
|
45
|
+
* ```typescript
|
|
46
|
+
* import { SqlLifecycleStore, type ControlSqlDriver } from "@alneas/eaos-server/sql-lifecycle";
|
|
47
|
+
* export async function example(driver: ControlSqlDriver, controlId: string) {
|
|
48
|
+
* const store = new SqlLifecycleStore(driver, controlId);
|
|
49
|
+
* await store.initialize();
|
|
50
|
+
* return store.read();
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
declare class SqlLifecycleStore implements LifecycleStore {
|
|
55
|
+
private readonly driver;
|
|
56
|
+
private readonly controlId;
|
|
57
|
+
/**
|
|
58
|
+
* Captures a privileged host SQL driver and ledger identifier without executing SQL.
|
|
59
|
+
* @param driver - Primary control-plane driver; connection lifecycle remains host-owned.
|
|
60
|
+
* @param controlId - Alphanumeric-first scope ID containing letters/digits/underscore/hyphen, length 1–128.
|
|
61
|
+
* @throws If controlId fails validation.
|
|
62
|
+
*/
|
|
63
|
+
constructor(driver: ControlSqlDriver, controlId: string);
|
|
64
|
+
private b;
|
|
65
|
+
private row;
|
|
66
|
+
private decode;
|
|
67
|
+
/**
|
|
68
|
+
* Bootstraps an empty ledger row after reviewed schema application, preserving an existing valid ledger.
|
|
69
|
+
* @returns No value; resolves after existing-state validation or insertion, including a recognized concurrent duplicate-insert race.
|
|
70
|
+
* @throws Rejects schema/driver failures or corrupt existing state.
|
|
71
|
+
* @example
|
|
72
|
+
* ```typescript
|
|
73
|
+
* import { SqlLifecycleStore, type ControlSqlDriver } from "@alneas/eaos-server/sql-lifecycle";
|
|
74
|
+
* export async function example(driver: ControlSqlDriver, controlId: string) {
|
|
75
|
+
* const store = new SqlLifecycleStore(driver, controlId);
|
|
76
|
+
* await store.initialize();
|
|
77
|
+
* }
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
initialize(): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Reads and validates the primary control ledger and its revision.
|
|
83
|
+
* @returns Normalized lifecycle state decoded from the driver row.
|
|
84
|
+
* @throws Rejects missing initialization, corrupt JSON/state, revision mismatch, or SQL failures.
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* import { SqlLifecycleStore, type ControlSqlDriver } from "@alneas/eaos-server/sql-lifecycle";
|
|
88
|
+
* export async function example(driver: ControlSqlDriver, controlId: string) {
|
|
89
|
+
* const store = new SqlLifecycleStore(driver, controlId);
|
|
90
|
+
* return store.read();
|
|
91
|
+
* }
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
read(): Promise<LifecycleState>;
|
|
95
|
+
private update;
|
|
96
|
+
/**
|
|
97
|
+
* Runs lifecycle read/write work under a durably committed exclusive writer token.
|
|
98
|
+
* @typeParam T - Callback result forwarded after lock cleanup.
|
|
99
|
+
* @param fn - Receives a writer; each write must advance revision exactly once and is independently committed by the driver.
|
|
100
|
+
* @returns The callback result after token release; writes made before callback failure are not rolled back by this method.
|
|
101
|
+
* @throws Rejects locked/uninitialized state, invalid revision, lost lock, callback/driver failures, or cleanup failure; combined operation/cleanup errors use AggregateError.
|
|
102
|
+
* @remarks No wait, expiry, or retry is supplied. Never nest locks. For atomic host records plus ledger updates use withAtomicLock instead.
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* import { SqlLifecycleStore, type ControlSqlDriver } from "@alneas/eaos-server/sql-lifecycle";
|
|
106
|
+
* export async function example(driver: ControlSqlDriver, controlId: string) {
|
|
107
|
+
* const store = new SqlLifecycleStore(driver, controlId);
|
|
108
|
+
* return store.withLock(async writer => writer.read());
|
|
109
|
+
* }
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
withLock<T>(fn: (writer: LifecycleWriter) => Promise<T>): Promise<T>;
|
|
113
|
+
/** Hold a durably committed writer token while atomically committing lifecycle state and host records.
|
|
114
|
+
* The host transaction must use one primary connection, commit before resolving, and roll back on rejection.
|
|
115
|
+
* Transaction-scoped driver writes are deliberately uncommitted until the callback finishes.
|
|
116
|
+
* Never use this for DDL, remote effects or nested locks; a crashed writer still requires reconciliation.
|
|
117
|
+
* @typeParam T - Callback result forwarded after transaction completion and token cleanup.
|
|
118
|
+
* @param transaction - Host transaction wrapper receiving a driver callback; use one primary connection, commit before resolving, and roll back on rejection.
|
|
119
|
+
* @param fn - Receives a lifecycle writer and the same transaction driver; await all work and advance ledger revision exactly once per write.
|
|
120
|
+
* @returns The callback result after the host transaction commits and the durable writer token is released.
|
|
121
|
+
* @throws Rejects acquisition, revision/lock, callback, transaction, or cleanup failures; combined operation/cleanup failures use AggregateError.
|
|
122
|
+
* @remarks The token is acquired outside the host transaction and is released separately. Transaction rollback and commit uncertainty depend on the host adapter; reconcile uncertain outcomes.
|
|
123
|
+
* @example
|
|
124
|
+
* ```typescript
|
|
125
|
+
* import { SqlLifecycleStore, type ControlSqlDriver } from "@alneas/eaos-server/sql-lifecycle";
|
|
126
|
+
* export async function example(driver: ControlSqlDriver, controlId: string, transaction: Parameters<SqlLifecycleStore["withAtomicLock"]>[0]) {
|
|
127
|
+
* const store = new SqlLifecycleStore(driver, controlId);
|
|
128
|
+
* // Supply a real single-primary-connection host transaction wrapper.
|
|
129
|
+
* return store.withAtomicLock(transaction, async writer => writer.read());
|
|
130
|
+
* }
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
withAtomicLock<T>(transaction: <R>(fn: (driver: ControlSqlDriver) => Promise<R>) => Promise<R>, fn: (writer: LifecycleWriter, driver: ControlSqlDriver) => Promise<T>): Promise<T>;
|
|
134
|
+
private withLockedDriver;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export { SqlLifecycleStore, controlSchemaSql };
|
|
138
|
+
export type { ControlSqlDriver };
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// src/sql-lifecycle/index.ts
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
3
|
+
import { emptyLifecycleState, normalizeLifecycleState } from "@alneas/eaos-server/lifecycle-engine";
|
|
4
|
+
var controlSchemaSql = {
|
|
5
|
+
sqlite: ["CREATE TABLE eaos_lifecycle_state (control_id TEXT PRIMARY KEY NOT NULL, revision INTEGER NOT NULL, payload TEXT NOT NULL, writer_token TEXT)"],
|
|
6
|
+
postgres: ["CREATE TABLE eaos_lifecycle_state (control_id VARCHAR(128) PRIMARY KEY, revision BIGINT NOT NULL, payload TEXT NOT NULL, writer_token VARCHAR(36))"],
|
|
7
|
+
oracle: ["CREATE TABLE eaos_lifecycle_state (control_id VARCHAR2(128) PRIMARY KEY, revision NUMBER(19) NOT NULL, payload CLOB NOT NULL CHECK (payload IS JSON), writer_token VARCHAR2(36))"]
|
|
8
|
+
};
|
|
9
|
+
function valid(state) {
|
|
10
|
+
if (!state || state.format !== 1 || !Number.isSafeInteger(state.revision) || state.revision < 0 || ["backends", "installations", "activations", "migrations", "infrastructure", "platform"].some((k) => !state[k] || typeof state[k] !== "object" || Array.isArray(state[k]))) throw new Error("Corrupt lifecycle state");
|
|
11
|
+
}
|
|
12
|
+
var SqlLifecycleStore = class _SqlLifecycleStore {
|
|
13
|
+
/**
|
|
14
|
+
* Captures a privileged host SQL driver and ledger identifier without executing SQL.
|
|
15
|
+
* @param driver - Primary control-plane driver; connection lifecycle remains host-owned.
|
|
16
|
+
* @param controlId - Alphanumeric-first scope ID containing letters/digits/underscore/hyphen, length 1–128.
|
|
17
|
+
* @throws If controlId fails validation.
|
|
18
|
+
*/
|
|
19
|
+
constructor(driver, controlId) {
|
|
20
|
+
this.driver = driver;
|
|
21
|
+
this.controlId = controlId;
|
|
22
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/.test(controlId)) throw new Error("Invalid control ID");
|
|
23
|
+
}
|
|
24
|
+
driver;
|
|
25
|
+
controlId;
|
|
26
|
+
b(i) {
|
|
27
|
+
return this.driver.dialect === "postgres" ? `$${i}` : this.driver.dialect === "oracle" ? `:${i}` : "?";
|
|
28
|
+
}
|
|
29
|
+
async row() {
|
|
30
|
+
const result = await this.driver.execute(`SELECT revision, payload FROM eaos_lifecycle_state WHERE control_id = ${this.b(1)}`, [this.controlId]);
|
|
31
|
+
return result.rows?.[0];
|
|
32
|
+
}
|
|
33
|
+
decode(row) {
|
|
34
|
+
const state = normalizeLifecycleState(JSON.parse(String(row.payload ?? row.PAYLOAD)));
|
|
35
|
+
valid(state);
|
|
36
|
+
if (state.revision !== Number(row.revision ?? row.REVISION)) throw new Error("Lifecycle revision mismatch");
|
|
37
|
+
return state;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Bootstraps an empty ledger row after reviewed schema application, preserving an existing valid ledger.
|
|
41
|
+
* @returns No value; resolves after existing-state validation or insertion, including a recognized concurrent duplicate-insert race.
|
|
42
|
+
* @throws Rejects schema/driver failures or corrupt existing state.
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* import { SqlLifecycleStore, type ControlSqlDriver } from "@alneas/eaos-server/sql-lifecycle";
|
|
46
|
+
* export async function example(driver: ControlSqlDriver, controlId: string) {
|
|
47
|
+
* const store = new SqlLifecycleStore(driver, controlId);
|
|
48
|
+
* await store.initialize();
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
async initialize() {
|
|
53
|
+
const existing = await this.row();
|
|
54
|
+
if (existing) {
|
|
55
|
+
this.decode(existing);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
await this.driver.execute(`INSERT INTO eaos_lifecycle_state (control_id, revision, payload, writer_token) VALUES (${this.b(1)}, ${this.b(2)}, ${this.b(3)}, NULL)`, [this.controlId, 0, JSON.stringify(emptyLifecycleState())]);
|
|
60
|
+
} catch (error) {
|
|
61
|
+
if (!["23505", "SQLITE_CONSTRAINT_PRIMARYKEY", "SQLITE_CONSTRAINT_UNIQUE", "ORA-00001"].includes(error?.code) && error?.errorNum !== 1) throw error;
|
|
62
|
+
await this.read();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Reads and validates the primary control ledger and its revision.
|
|
67
|
+
* @returns Normalized lifecycle state decoded from the driver row.
|
|
68
|
+
* @throws Rejects missing initialization, corrupt JSON/state, revision mismatch, or SQL failures.
|
|
69
|
+
* @example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* import { SqlLifecycleStore, type ControlSqlDriver } from "@alneas/eaos-server/sql-lifecycle";
|
|
72
|
+
* export async function example(driver: ControlSqlDriver, controlId: string) {
|
|
73
|
+
* const store = new SqlLifecycleStore(driver, controlId);
|
|
74
|
+
* return store.read();
|
|
75
|
+
* }
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
async read() {
|
|
79
|
+
const row = await this.row();
|
|
80
|
+
if (!row) throw new Error("Control store is not initialized");
|
|
81
|
+
return this.decode(row);
|
|
82
|
+
}
|
|
83
|
+
async update(sql, bindings) {
|
|
84
|
+
const result = await this.driver.execute(sql, bindings);
|
|
85
|
+
if (typeof result.affectedRows !== "number") throw new Error("Control driver must report affectedRows");
|
|
86
|
+
return result.affectedRows === 1;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Runs lifecycle read/write work under a durably committed exclusive writer token.
|
|
90
|
+
* @typeParam T - Callback result forwarded after lock cleanup.
|
|
91
|
+
* @param fn - Receives a writer; each write must advance revision exactly once and is independently committed by the driver.
|
|
92
|
+
* @returns The callback result after token release; writes made before callback failure are not rolled back by this method.
|
|
93
|
+
* @throws Rejects locked/uninitialized state, invalid revision, lost lock, callback/driver failures, or cleanup failure; combined operation/cleanup errors use AggregateError.
|
|
94
|
+
* @remarks No wait, expiry, or retry is supplied. Never nest locks. For atomic host records plus ledger updates use withAtomicLock instead.
|
|
95
|
+
* @example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* import { SqlLifecycleStore, type ControlSqlDriver } from "@alneas/eaos-server/sql-lifecycle";
|
|
98
|
+
* export async function example(driver: ControlSqlDriver, controlId: string) {
|
|
99
|
+
* const store = new SqlLifecycleStore(driver, controlId);
|
|
100
|
+
* return store.withLock(async writer => writer.read());
|
|
101
|
+
* }
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
async withLock(fn) {
|
|
105
|
+
return this.withLockedDriver(async (operation) => operation(this.driver), fn);
|
|
106
|
+
}
|
|
107
|
+
/** Hold a durably committed writer token while atomically committing lifecycle state and host records.
|
|
108
|
+
* The host transaction must use one primary connection, commit before resolving, and roll back on rejection.
|
|
109
|
+
* Transaction-scoped driver writes are deliberately uncommitted until the callback finishes.
|
|
110
|
+
* Never use this for DDL, remote effects or nested locks; a crashed writer still requires reconciliation.
|
|
111
|
+
* @typeParam T - Callback result forwarded after transaction completion and token cleanup.
|
|
112
|
+
* @param transaction - Host transaction wrapper receiving a driver callback; use one primary connection, commit before resolving, and roll back on rejection.
|
|
113
|
+
* @param fn - Receives a lifecycle writer and the same transaction driver; await all work and advance ledger revision exactly once per write.
|
|
114
|
+
* @returns The callback result after the host transaction commits and the durable writer token is released.
|
|
115
|
+
* @throws Rejects acquisition, revision/lock, callback, transaction, or cleanup failures; combined operation/cleanup failures use AggregateError.
|
|
116
|
+
* @remarks The token is acquired outside the host transaction and is released separately. Transaction rollback and commit uncertainty depend on the host adapter; reconcile uncertain outcomes.
|
|
117
|
+
* @example
|
|
118
|
+
* ```typescript
|
|
119
|
+
* import { SqlLifecycleStore, type ControlSqlDriver } from "@alneas/eaos-server/sql-lifecycle";
|
|
120
|
+
* export async function example(driver: ControlSqlDriver, controlId: string, transaction: Parameters<SqlLifecycleStore["withAtomicLock"]>[0]) {
|
|
121
|
+
* const store = new SqlLifecycleStore(driver, controlId);
|
|
122
|
+
* // Supply a real single-primary-connection host transaction wrapper.
|
|
123
|
+
* return store.withAtomicLock(transaction, async writer => writer.read());
|
|
124
|
+
* }
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
async withAtomicLock(transaction, fn) {
|
|
128
|
+
return this.withLockedDriver(transaction, fn);
|
|
129
|
+
}
|
|
130
|
+
async withLockedDriver(transaction, fn) {
|
|
131
|
+
const token = randomUUID();
|
|
132
|
+
if (!await this.update(`UPDATE eaos_lifecycle_state SET writer_token = ${this.b(1)} WHERE control_id = ${this.b(2)} AND writer_token IS NULL`, [token, this.controlId])) throw new Error("Control writer is locked or uninitialized; reconcile crashed operations before recovery");
|
|
133
|
+
let failure;
|
|
134
|
+
try {
|
|
135
|
+
return await transaction(async (driver) => {
|
|
136
|
+
const read = () => new _SqlLifecycleStore(driver, this.controlId).read();
|
|
137
|
+
let expected = (await read()).revision;
|
|
138
|
+
return await fn({ read, write: async (state) => {
|
|
139
|
+
valid(state);
|
|
140
|
+
if (state.revision !== expected + 1) throw new Error("Invalid lifecycle revision transition");
|
|
141
|
+
const result = await driver.execute(`UPDATE eaos_lifecycle_state SET revision = ${this.b(1)}, payload = ${this.b(2)} WHERE control_id = ${this.b(3)} AND writer_token = ${this.b(4)} AND revision = ${this.b(5)}`, [state.revision, JSON.stringify(state), this.controlId, token, expected]);
|
|
142
|
+
if (result.affectedRows !== 1) throw new Error("Lifecycle writer lost its lock or revision");
|
|
143
|
+
expected = state.revision;
|
|
144
|
+
} }, driver);
|
|
145
|
+
});
|
|
146
|
+
} catch (error) {
|
|
147
|
+
failure = error;
|
|
148
|
+
throw error;
|
|
149
|
+
} finally {
|
|
150
|
+
try {
|
|
151
|
+
if (!await this.update(`UPDATE eaos_lifecycle_state SET writer_token = NULL WHERE control_id = ${this.b(1)} AND writer_token = ${this.b(2)}`, [this.controlId, token])) {
|
|
152
|
+
throw new Error("Lifecycle lock release failed");
|
|
153
|
+
}
|
|
154
|
+
} catch (error) {
|
|
155
|
+
if (failure) {
|
|
156
|
+
throw new AggregateError([failure, error], "Operation and lock cleanup failed; reconcile control state");
|
|
157
|
+
}
|
|
158
|
+
throw error;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
export {
|
|
164
|
+
SqlLifecycleStore,
|
|
165
|
+
controlSchemaSql
|
|
166
|
+
};
|
|
167
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/sql-lifecycle/index.ts"],"sourcesContent":["import { randomUUID } from 'node:crypto'\nimport { emptyLifecycleState, normalizeLifecycleState, type LifecycleStore, type LifecycleWriter, type LifecycleState, type Dialect } from '@alneas/eaos-server/lifecycle-engine'\n/**\n * Privileged primary SQL connection used by {@link SqlLifecycleStore}; it is not a tenant data adapter.\n */\nexport interface ControlSqlDriver {\n /** SQL placeholder/schema dialect. */\n dialect: Dialect\n /** Outside an explicit withAtomicLock transaction, each write must commit before resolving. Reads must use the primary, never a lagging replica.\n * Bind arrays are positional; Oracle payloads must be bound/read as CLOB strings.\n * This is a privileged control DB connection, NOT a tenant data connection.\n * @param sql - Statement supplied by the lifecycle store.\n * @param bindings - Positional values, using the selected dialect placeholders.\n * @returns Optional rows and affectedRows; lock/update statements require affectedRows exactly reflecting the write count.\n * @throws Driver/database failures reject the store operation.\n \n * @example\n * ```typescript\n * import type { ControlSqlDriver } from \"@alneas/eaos-server/sql-lifecycle\";\n * export async function probePrimaryControlConnection(driver: ControlSqlDriver) {\n * // Use a host-owned primary control connection, not a tenant adapter or replica.\n * const sql = driver.dialect === \"oracle\" ? \"SELECT 1 AS ready FROM dual\" : \"SELECT 1 AS ready\";\n * const result = await driver.execute(sql, []);\n * return result.rows ?? [];\n * }\n * ```\n */\n execute(sql: string, bindings: unknown[]): Promise<{ \n /** Optional primary-database result rows for read statements; column names and CLOB decoding follow the connected SQL driver contract. */\n rows?: Record<string, unknown>[]; \n /** Optional exact write count; lifecycle lock/CAS/update paths require it and reject missing or unexpected counts rather than assuming success. */\n affectedRows?: number }>\n}\n/**\n * Provides explicit baseline CREATE TABLE statements for the shared lifecycle ledger in each dialect.\n * @remarks No SQL executes on import or construction. Review and apply the selected baseline separately before initialize.\n * @see SqlLifecycleStore for host driver requirements.\n */\nexport const controlSchemaSql: Record<Dialect, string[]> = {\n sqlite: ['CREATE TABLE eaos_lifecycle_state (control_id TEXT PRIMARY KEY NOT NULL, revision INTEGER NOT NULL, payload TEXT NOT NULL, writer_token TEXT)'],\n postgres: ['CREATE TABLE eaos_lifecycle_state (control_id VARCHAR(128) PRIMARY KEY, revision BIGINT NOT NULL, payload TEXT NOT NULL, writer_token VARCHAR(36))'],\n oracle: ['CREATE TABLE eaos_lifecycle_state (control_id VARCHAR2(128) PRIMARY KEY, revision NUMBER(19) NOT NULL, payload CLOB NOT NULL CHECK (payload IS JSON), writer_token VARCHAR2(36))'],\n}\nfunction valid(state: LifecycleState): void {\n if (!state || state.format !== 1 || !Number.isSafeInteger(state.revision) || state.revision < 0 || ['backends', 'installations', 'activations', 'migrations', 'infrastructure', 'platform'].some(k => !(state as any)[k] || typeof (state as any)[k] !== 'object' || Array.isArray((state as any)[k]))) throw new Error('Corrupt lifecycle state')\n}\n/**\n * Persists lifecycle state with durable writer-token exclusion and revision-checked updates across hosts.\n * @remarks Apply reviewed controlSchemaSql before initialize. Host connections must read the primary and report affectedRows. Locks do not expire; a crashed writer requires operator reconciliation. Normal callback failures attempt token release; database outcomes can be uncertain if commit or cleanup fails. No connection is opened or disposed by this store.\n * @example\n * ```typescript\n * import { SqlLifecycleStore, type ControlSqlDriver } from \"@alneas/eaos-server/sql-lifecycle\";\n * export async function example(driver: ControlSqlDriver, controlId: string) {\n * const store = new SqlLifecycleStore(driver, controlId);\n * await store.initialize();\n * return store.read();\n * }\n * ```\n */\nexport class SqlLifecycleStore implements LifecycleStore {\n /**\n * Captures a privileged host SQL driver and ledger identifier without executing SQL.\n * @param driver - Primary control-plane driver; connection lifecycle remains host-owned.\n * @param controlId - Alphanumeric-first scope ID containing letters/digits/underscore/hyphen, length 1–128.\n * @throws If controlId fails validation.\n */\n constructor(private readonly driver: ControlSqlDriver, private readonly controlId: string) {\n if (!/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/.test(controlId)) throw new Error('Invalid control ID')\n }\n private b(i: number) { return this.driver.dialect === 'postgres' ? `$${i}` : this.driver.dialect === 'oracle' ? `:${i}` : '?' }\n private async row() {\n const result = await this.driver.execute(`SELECT revision, payload FROM eaos_lifecycle_state WHERE control_id = ${this.b(1)}`, [this.controlId])\n return result.rows?.[0]\n }\n private decode(row: Record<string, unknown>): LifecycleState {\n const state = normalizeLifecycleState(JSON.parse(String(row.payload ?? row.PAYLOAD)) as LifecycleState); valid(state)\n if (state.revision !== Number(row.revision ?? row.REVISION)) throw new Error('Lifecycle revision mismatch')\n return state\n }\n /**\n * Bootstraps an empty ledger row after reviewed schema application, preserving an existing valid ledger.\n * @returns No value; resolves after existing-state validation or insertion, including a recognized concurrent duplicate-insert race.\n * @throws Rejects schema/driver failures or corrupt existing state.\n * @example\n * ```typescript\n * import { SqlLifecycleStore, type ControlSqlDriver } from \"@alneas/eaos-server/sql-lifecycle\";\n * export async function example(driver: ControlSqlDriver, controlId: string) {\n * const store = new SqlLifecycleStore(driver, controlId);\n * await store.initialize();\n * }\n * ```\n */\n async initialize(): Promise<void> {\n const existing = await this.row(); if (existing) { this.decode(existing); return }\n try { await this.driver.execute(`INSERT INTO eaos_lifecycle_state (control_id, revision, payload, writer_token) VALUES (${this.b(1)}, ${this.b(2)}, ${this.b(3)}, NULL)`, [this.controlId, 0, JSON.stringify(emptyLifecycleState())]) }\n catch (error: any) {\n if (!['23505', 'SQLITE_CONSTRAINT_PRIMARYKEY', 'SQLITE_CONSTRAINT_UNIQUE', 'ORA-00001'].includes(error?.code) && error?.errorNum !== 1) throw error\n await this.read()\n }\n }\n /**\n * Reads and validates the primary control ledger and its revision.\n * @returns Normalized lifecycle state decoded from the driver row.\n * @throws Rejects missing initialization, corrupt JSON/state, revision mismatch, or SQL failures.\n * @example\n * ```typescript\n * import { SqlLifecycleStore, type ControlSqlDriver } from \"@alneas/eaos-server/sql-lifecycle\";\n * export async function example(driver: ControlSqlDriver, controlId: string) {\n * const store = new SqlLifecycleStore(driver, controlId);\n * return store.read();\n * }\n * ```\n */\n async read() { const row = await this.row(); if (!row) throw new Error('Control store is not initialized'); return this.decode(row) }\n private async update(sql: string, bindings: unknown[]) {\n const result = await this.driver.execute(sql, bindings)\n if (typeof result.affectedRows !== 'number') throw new Error('Control driver must report affectedRows')\n return result.affectedRows === 1\n }\n /**\n * Runs lifecycle read/write work under a durably committed exclusive writer token.\n * @typeParam T - Callback result forwarded after lock cleanup.\n * @param fn - Receives a writer; each write must advance revision exactly once and is independently committed by the driver.\n * @returns The callback result after token release; writes made before callback failure are not rolled back by this method.\n * @throws Rejects locked/uninitialized state, invalid revision, lost lock, callback/driver failures, or cleanup failure; combined operation/cleanup errors use AggregateError.\n * @remarks No wait, expiry, or retry is supplied. Never nest locks. For atomic host records plus ledger updates use withAtomicLock instead.\n * @example\n * ```typescript\n * import { SqlLifecycleStore, type ControlSqlDriver } from \"@alneas/eaos-server/sql-lifecycle\";\n * export async function example(driver: ControlSqlDriver, controlId: string) {\n * const store = new SqlLifecycleStore(driver, controlId);\n * return store.withLock(async writer => writer.read());\n * }\n * ```\n */\n async withLock<T>(fn: (writer: LifecycleWriter) => Promise<T>): Promise<T> {\n return this.withLockedDriver(async operation => operation(this.driver), fn)\n }\n /** Hold a durably committed writer token while atomically committing lifecycle state and host records.\n * The host transaction must use one primary connection, commit before resolving, and roll back on rejection.\n * Transaction-scoped driver writes are deliberately uncommitted until the callback finishes.\n * Never use this for DDL, remote effects or nested locks; a crashed writer still requires reconciliation.\n * @typeParam T - Callback result forwarded after transaction completion and token cleanup.\n * @param transaction - Host transaction wrapper receiving a driver callback; use one primary connection, commit before resolving, and roll back on rejection.\n * @param fn - Receives a lifecycle writer and the same transaction driver; await all work and advance ledger revision exactly once per write.\n * @returns The callback result after the host transaction commits and the durable writer token is released.\n * @throws Rejects acquisition, revision/lock, callback, transaction, or cleanup failures; combined operation/cleanup failures use AggregateError.\n * @remarks The token is acquired outside the host transaction and is released separately. Transaction rollback and commit uncertainty depend on the host adapter; reconcile uncertain outcomes.\n * @example\n * ```typescript\n * import { SqlLifecycleStore, type ControlSqlDriver } from \"@alneas/eaos-server/sql-lifecycle\";\n * export async function example(driver: ControlSqlDriver, controlId: string, transaction: Parameters<SqlLifecycleStore[\"withAtomicLock\"]>[0]) {\n * const store = new SqlLifecycleStore(driver, controlId);\n * // Supply a real single-primary-connection host transaction wrapper.\n * return store.withAtomicLock(transaction, async writer => writer.read());\n * }\n * ```\n */\n async withAtomicLock<T>(transaction: <R>(fn: (driver: ControlSqlDriver) => Promise<R>) => Promise<R>, fn: (writer: LifecycleWriter, driver: ControlSqlDriver) => Promise<T>): Promise<T> {\n return this.withLockedDriver(transaction, fn)\n }\n private async withLockedDriver<T>(transaction: <R>(fn: (driver: ControlSqlDriver) => Promise<R>) => Promise<R>, fn: (writer: LifecycleWriter, driver: ControlSqlDriver) => Promise<T>): Promise<T> {\n const token = randomUUID()\n if (!await this.update(`UPDATE eaos_lifecycle_state SET writer_token = ${this.b(1)} WHERE control_id = ${this.b(2)} AND writer_token IS NULL`, [token, this.controlId])) throw new Error('Control writer is locked or uninitialized; reconcile crashed operations before recovery')\n let failure: unknown\n try {\n return await transaction(async driver => {\n const read = () => new SqlLifecycleStore(driver, this.controlId).read()\n let expected = (await read()).revision\n return await fn({ read, write: async state => {\n valid(state)\n if (state.revision !== expected + 1) throw new Error('Invalid lifecycle revision transition')\n const result = await driver.execute(`UPDATE eaos_lifecycle_state SET revision = ${this.b(1)}, payload = ${this.b(2)} WHERE control_id = ${this.b(3)} AND writer_token = ${this.b(4)} AND revision = ${this.b(5)}`, [state.revision, JSON.stringify(state), this.controlId, token, expected])\n if (result.affectedRows !== 1) throw new Error('Lifecycle writer lost its lock or revision')\n expected = state.revision\n } }, driver)\n })\n } catch (error) { failure = error; throw error }\n finally {\n /* eslint-disable no-unsafe-finally -- Cleanup failure must reject success; preserve both errors in AggregateError. */\n try {\n if (!await this.update(`UPDATE eaos_lifecycle_state SET writer_token = NULL WHERE control_id = ${this.b(1)} AND writer_token = ${this.b(2)}`, [this.controlId, token])) {\n // biome-ignore lint/correctness/noUnsafeFinally: Cleanup failure must reject success; the catch below preserves the original operation failure.\n throw new Error('Lifecycle lock release failed')\n }\n }\n // eslint-disable-next-line preserve-caught-error -- AggregateError.errors already retains the caught error and operation failure.\n catch (error) {\n if (failure) {\n // biome-ignore lint/correctness/noUnsafeFinally: Both operation and cleanup failures are retained in AggregateError.errors.\n throw new AggregateError([failure, error], 'Operation and lock cleanup failed; reconcile control state')\n }\n // biome-ignore lint/correctness/noUnsafeFinally: A cleanup failure must reject an otherwise successful operation.\n throw error\n }\n /* eslint-enable no-unsafe-finally */\n }\n }\n}\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { S3CompatibleStorageConfig, StorageCredentials, S as StorageOperation, T as TenantStorageOptions, createS3CompatibleStorage, createTenantS3CompatibleStorage, c as createTenantStorage, readS3CompatibleStorageConfig } from './s3-compatible.js';
|
|
2
|
+
export { StorageAdapter } from '@alneas/appkit-core/storage';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createS3CompatibleStorage,
|
|
3
|
+
createTenantS3CompatibleStorage,
|
|
4
|
+
createTenantStorage,
|
|
5
|
+
readS3CompatibleStorageConfig
|
|
6
|
+
} from "../chunk-NNCCN7JP.js";
|
|
7
|
+
export {
|
|
8
|
+
createS3CompatibleStorage,
|
|
9
|
+
createTenantS3CompatibleStorage,
|
|
10
|
+
createTenantStorage,
|
|
11
|
+
readS3CompatibleStorageConfig
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|