@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,35 @@
|
|
|
1
|
+
import * as hono from 'hono';
|
|
2
|
+
import { Context } from 'hono';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Controls error response redaction and logging for {@link createErrorHandler}.
|
|
6
|
+
*/
|
|
7
|
+
interface ErrorHandlerOptions {
|
|
8
|
+
/** Hide message and stack when true; defaults to NODE_ENV === "production". */
|
|
9
|
+
isProduction?: boolean;
|
|
10
|
+
/** Called synchronously with the original error and request context before rendering; defaults to console.error. A thrown logger error propagates. */
|
|
11
|
+
logger?: (err: Error, c: Context) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Creates a Hono error handler that logs errors and renders a JSON 500 response.
|
|
15
|
+
* @param options - Logging and redaction settings; omitted settings use console.error and NODE_ENV.
|
|
16
|
+
* @returns An async handler resolving to a 500 response; production responses omit stacks and use "Internal Server Error".
|
|
17
|
+
* @throws The returned handler rejects if the host logger throws.
|
|
18
|
+
* @remarks Nonproduction responses expose error messages and stacks. Choose production redaction explicitly for externally accessible services.
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* import { Hono } from "hono";
|
|
22
|
+
* import { createErrorHandler } from "@alneas/eaos-server/middleware/error-handler";
|
|
23
|
+
* const app = new Hono();
|
|
24
|
+
* app.onError(createErrorHandler({ isProduction: true }));
|
|
25
|
+
* app.get("/example", () => { throw new Error("example failure"); });
|
|
26
|
+
* console.log((await app.request("/example")).status); // 500
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
declare function createErrorHandler(options?: ErrorHandlerOptions): (err: Error, c: Context) => Promise<Response & hono.TypedResponse<{
|
|
30
|
+
stack?: string | undefined;
|
|
31
|
+
error: string;
|
|
32
|
+
}, 500, "json">>;
|
|
33
|
+
|
|
34
|
+
export { createErrorHandler };
|
|
35
|
+
export type { ErrorHandlerOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as hono from 'hono';
|
|
2
|
+
import { EaosEnv } from '@alneas/eaos-core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Controls the explicit development bypass for {@link createModuleGuard}.
|
|
6
|
+
*/
|
|
7
|
+
interface ModuleGuardOptions {
|
|
8
|
+
/** Skip entitlement checks when true; defaults to NODE_ENV === "development". */
|
|
9
|
+
isDev?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Rejects requests unless verified enabledModules contains the requested module or "all".
|
|
13
|
+
* @param moduleKey - Exact, case-sensitive entitlement key required by this route.
|
|
14
|
+
* @param options - Development bypass; see {@link ModuleGuardOptions}.
|
|
15
|
+
* @returns Hono middleware that responds with 403 for missing, malformed, or insufficient entitlements, or completes downstream handling without returning a value.
|
|
16
|
+
* @throws Request execution propagates downstream middleware rejections.
|
|
17
|
+
* @remarks Install authentication and trusted entitlement resolution first. This guard reads context only and does not query a contract store. The development bypass defaults from NODE_ENV.
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import { Hono } from "hono";
|
|
21
|
+
* import type { EaosEnv } from "@alneas/eaos-core";
|
|
22
|
+
* import { createModuleGuard } from "@alneas/eaos-server/middleware/module-guard";
|
|
23
|
+
* const app = new Hono<EaosEnv>();
|
|
24
|
+
* app.use("/reports/*", createModuleGuard("reports", { isDev: false }));
|
|
25
|
+
* // Populate verified enabledModules in earlier host middleware to allow access.
|
|
26
|
+
* app.get("/reports/summary", c => c.json({ available: true }));
|
|
27
|
+
* console.log((await app.request("/reports/summary")).status); // 403
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
declare function createModuleGuard(moduleKey: string, options?: ModuleGuardOptions): hono.MiddlewareHandler<EaosEnv, string, {}, Response>;
|
|
31
|
+
|
|
32
|
+
export { createModuleGuard };
|
|
33
|
+
export type { ModuleGuardOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Hono } from 'hono';
|
|
2
|
+
import { PlatformAdminAuthorization, PlatformControlStore, PlatformAdminAuditEvent, PlatformPlacementExecutor } from '@alneas/eaos-server/platform';
|
|
3
|
+
export { PlatformPlacementExecutor } from '@alneas/eaos-server/platform';
|
|
4
|
+
export { LifecyclePlatformControlStore } from './store.js';
|
|
5
|
+
import '@alneas/eaos-server/lifecycle-engine';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Trusted control-plane authorization, persistence, audit, and optional migration execution dependencies.
|
|
9
|
+
* @see createPlatformAdminRouter.
|
|
10
|
+
*/
|
|
11
|
+
interface PlatformAdminRouterOptions extends PlatformAdminAuthorization {
|
|
12
|
+
/** Shared authoritative tenant/backend/placement store. */
|
|
13
|
+
store: PlatformControlStore;
|
|
14
|
+
/** Awaited on denied and successful mutations; receives operator/action/outcome/time, without request credentials. Audit failure may occur after persistence. */
|
|
15
|
+
audit: (event: Readonly<PlatformAdminAuditEvent>) => Promise<void>;
|
|
16
|
+
/** Optional host migration executor; absent returns 501 for execute requests. Provisioning, credentials, and SQL remain host-owned. */
|
|
17
|
+
placementExecutor?: PlatformPlacementExecutor;
|
|
18
|
+
/** Clock for audit/plan timestamps; defaults to fresh Date. */
|
|
19
|
+
now?: () => Date;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Platform-wide control routes. They operate on host-registered opaque
|
|
23
|
+
* backends; provisioning, credentials, SQL and tenant membership remain host-owned.
|
|
24
|
+
* @param options - Shared store, live platform-admin authorization, audit sink, optional placement executor, and clock.
|
|
25
|
+
* @returns A Hono router for tenants, backend discovery, placement planning/execution/status/rollback/reconciliation. Unauthenticated/unauthorized requests return 401/403.
|
|
26
|
+
* @throws Synchronously for missing store/auth/audit dependencies. Request-time reads/auth/audit can fail through Hono error handling; mutation failures are generally 400 or migration conflict 409 data.
|
|
27
|
+
* @remarks Every operation requires principal.isPlatformAdmin === true plus host authorize approval. Plan/rollback endpoints persist reviewed plans rather than directly changing routing. Execution verifies reports before cutover and records reconciling state on uncertain failures; host executor effects are not rolled back automatically. Reads expose opaque public backend metadata without credentials/SQL. A failed audit can follow a completed mutation, so errors do not prove no change occurred. No listener, deployment, or scheduler is started.
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* import { createPlatformAdminRouter, type PlatformAdminRouterOptions } from "@alneas/eaos-server/platform-admin";
|
|
31
|
+
* export function controlRoutes(options: PlatformAdminRouterOptions) { return createPlatformAdminRouter(options); }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
declare function createPlatformAdminRouter(options: PlatformAdminRouterOptions): Hono;
|
|
35
|
+
|
|
36
|
+
export { createPlatformAdminRouter };
|
|
37
|
+
export type { PlatformAdminRouterOptions };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createPlatformAdminRouter
|
|
3
|
+
} from "../chunk-753HWDSC.js";
|
|
4
|
+
import {
|
|
5
|
+
LifecyclePlatformControlStore
|
|
6
|
+
} from "../chunk-YMJ7BRKU.js";
|
|
7
|
+
export {
|
|
8
|
+
LifecyclePlatformControlStore,
|
|
9
|
+
createPlatformAdminRouter
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { LifecycleStore, BackendMigrationPlan, LifecyclePlatformMigrationRecord, BackendMigrationVerificationReport, BackendMigrationCutover } from '@alneas/eaos-server/lifecycle-engine';
|
|
2
|
+
import { PlatformControlStore, PlatformTenantRecord, PlatformTenantCreateInput, PlatformTenantPatch, PlatformBackendRecord, TenantBackendPlacement, PlatformMigrationReconcileAction } from '@alneas/eaos-server/platform';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Platform control facade backed by the same LifecycleStore snapshot and lock.
|
|
6
|
+
* Use this with SqlLifecycleStore for distributed hosts; it intentionally does
|
|
7
|
+
* not create a second platform database or a second placement authority.
|
|
8
|
+
* @remarks Mutations normalize one locked lifecycle snapshot, increment its revision, and persist it; transaction/CAS/lock recovery depend on the host LifecycleStore. This facade performs no caller authentication, SQL/infra provisioning, remote migration, or automatic retry. Authorize operators before invoking it and reconcile uncertain store failures.
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
12
|
+
* import type { LifecycleStore } from "@alneas/eaos-server/lifecycle-engine";
|
|
13
|
+
* export function controlStore(lifecycle: LifecycleStore) { return new LifecyclePlatformControlStore(lifecycle); }
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
declare class LifecyclePlatformControlStore implements PlatformControlStore {
|
|
17
|
+
private readonly lifecycle;
|
|
18
|
+
private readonly now;
|
|
19
|
+
/**
|
|
20
|
+
* Captures the shared authoritative lifecycle ledger and clock.
|
|
21
|
+
* @param lifecycle - Host store providing consistent reads and exclusive writer callbacks.
|
|
22
|
+
* @param now - Clock for mutation timestamps; defaults to a fresh Date.
|
|
23
|
+
*/
|
|
24
|
+
constructor(lifecycle: LifecycleStore, now?: () => Date);
|
|
25
|
+
private read;
|
|
26
|
+
private mutate;
|
|
27
|
+
/**
|
|
28
|
+
* Lists tenant records from the authoritative normalized lifecycle snapshot.
|
|
29
|
+
* @returns Tenant records with cloned domains arrays, or an empty array.
|
|
30
|
+
* @throws Host read/normalization failure.
|
|
31
|
+
* @example
|
|
32
|
+
* ```typescript
|
|
33
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
34
|
+
* export async function listTenants(store: LifecyclePlatformControlStore, ...args: Parameters<LifecyclePlatformControlStore["listTenants"]>) {
|
|
35
|
+
* return store.listTenants(...args);
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
listTenants(): Promise<readonly PlatformTenantRecord[]>;
|
|
40
|
+
/**
|
|
41
|
+
* Creates an active tenant and its initial backend routing record under the lifecycle writer lock.
|
|
42
|
+
* @param input - Valid scope ID, nonblank name, nonempty domain strings, and registered initial backendId; a dedicated backend must bind the same tenant.
|
|
43
|
+
* @returns Created tenant record with clock timestamps; initial routing revision is one.
|
|
44
|
+
* @throws Invalid input, duplicate tenant, missing/mismatched backend, or host lock/write/clock failure.
|
|
45
|
+
* @example
|
|
46
|
+
* ```typescript
|
|
47
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
48
|
+
* export async function createTenant(store: LifecyclePlatformControlStore, ...args: Parameters<LifecyclePlatformControlStore["createTenant"]>) {
|
|
49
|
+
* return store.createTenant(...args);
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
createTenant(input: PlatformTenantCreateInput): Promise<PlatformTenantRecord>;
|
|
54
|
+
/**
|
|
55
|
+
* Updates an existing tenant name, active flag, or domains and refreshes updatedAt.
|
|
56
|
+
* @param tenantId - Existing valid tenant scope ID.
|
|
57
|
+
* @param patch - Optional nonblank name, boolean active, and nonempty nonblank domains; omitted fields remain unchanged.
|
|
58
|
+
* @returns Updated tenant with cloned domains.
|
|
59
|
+
* @throws Missing tenant, invalid supplied fields, or host lock/write/clock failure.
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
63
|
+
* export async function updateTenant(store: LifecyclePlatformControlStore, ...args: Parameters<LifecyclePlatformControlStore["updateTenant"]>) {
|
|
64
|
+
* return store.updateTenant(...args);
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
updateTenant(tenantId: string, patch: PlatformTenantPatch): Promise<PlatformTenantRecord>;
|
|
69
|
+
/**
|
|
70
|
+
* Registers an immutable backend placement identity and replaceable public metadata.
|
|
71
|
+
* @param backend - Valid backend/database IDs, dialect/mode, optional dedicated tenant binding, and metadata.
|
|
72
|
+
* @returns Materialized registered target with metadata.
|
|
73
|
+
* @throws Invalid target, changed placement for an existing ID, database dialect conflict, or host store failure.
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
77
|
+
* export async function registerBackend(store: LifecyclePlatformControlStore, ...args: Parameters<LifecyclePlatformControlStore["registerBackend"]>) {
|
|
78
|
+
* return store.registerBackend(...args);
|
|
79
|
+
* }
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
registerBackend(backend: PlatformBackendRecord): Promise<PlatformBackendRecord>;
|
|
83
|
+
/**
|
|
84
|
+
* Materializes registered backend targets with their public metadata.
|
|
85
|
+
* @returns Backend list, or an empty array.
|
|
86
|
+
* @throws Host read/normalization failure.
|
|
87
|
+
* @example
|
|
88
|
+
* ```typescript
|
|
89
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
90
|
+
* export async function listBackends(store: LifecyclePlatformControlStore, ...args: Parameters<LifecyclePlatformControlStore["listBackends"]>) {
|
|
91
|
+
* return store.listBackends(...args);
|
|
92
|
+
* }
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
listBackends(): Promise<readonly PlatformBackendRecord[]>;
|
|
96
|
+
/**
|
|
97
|
+
* Reads a registered backend target and its public metadata.
|
|
98
|
+
* @param backendId - Valid registered backend scope ID.
|
|
99
|
+
* @returns Materialized backend, or null when unregistered.
|
|
100
|
+
* @throws Invalid ID or host read failure.
|
|
101
|
+
* @example
|
|
102
|
+
* ```typescript
|
|
103
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
104
|
+
* export async function getBackend(store: LifecyclePlatformControlStore, ...args: Parameters<LifecyclePlatformControlStore["getBackend"]>) {
|
|
105
|
+
* return store.getBackend(...args);
|
|
106
|
+
* }
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
getBackend(backendId: string): Promise<PlatformBackendRecord | null>;
|
|
110
|
+
/**
|
|
111
|
+
* Resolves a tenant routing record into its registered backend target.
|
|
112
|
+
* @param tenantId - Valid tenant scope ID.
|
|
113
|
+
* @returns Placement with routing revision/time and backend, or null when absent.
|
|
114
|
+
* @throws Invalid ID, dangling backend reference, or host read failure.
|
|
115
|
+
* @example
|
|
116
|
+
* ```typescript
|
|
117
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
118
|
+
* export async function getTenantPlacement(store: LifecyclePlatformControlStore, ...args: Parameters<LifecyclePlatformControlStore["getTenantPlacement"]>) {
|
|
119
|
+
* return store.getTenantPlacement(...args);
|
|
120
|
+
* }
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
getTenantPlacement(tenantId: string): Promise<TenantBackendPlacement | null>;
|
|
124
|
+
/**
|
|
125
|
+
* Persists an immutable migration plan after checking registered backend identities.
|
|
126
|
+
* @param plan - Reviewed plan matching currently registered source/target; identical saved plans may be accepted before completion.
|
|
127
|
+
* @returns No value; resolves after storing the plan and initial planned record if absent.
|
|
128
|
+
* @throws Unregistered/changed backend, conflicting reused plan ID, already completed plan, clone or host store failure.
|
|
129
|
+
* @example
|
|
130
|
+
* ```typescript
|
|
131
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
132
|
+
* export async function saveMigrationPlan(store: LifecyclePlatformControlStore, ...args: Parameters<LifecyclePlatformControlStore["saveMigrationPlan"]>) {
|
|
133
|
+
* return store.saveMigrationPlan(...args);
|
|
134
|
+
* }
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
saveMigrationPlan(plan: BackendMigrationPlan): Promise<void>;
|
|
138
|
+
/**
|
|
139
|
+
* Reads a cloned persisted migration plan by ID.
|
|
140
|
+
* @param migrationId - Valid migration scope ID.
|
|
141
|
+
* @returns Plan clone, or null when absent.
|
|
142
|
+
* @throws Invalid ID or host read/clone failure.
|
|
143
|
+
* @example
|
|
144
|
+
* ```typescript
|
|
145
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
146
|
+
* export async function getMigrationPlan(store: LifecyclePlatformControlStore, ...args: Parameters<LifecyclePlatformControlStore["getMigrationPlan"]>) {
|
|
147
|
+
* return store.getMigrationPlan(...args);
|
|
148
|
+
* }
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
getMigrationPlan(migrationId: string): Promise<BackendMigrationPlan | null>;
|
|
152
|
+
/**
|
|
153
|
+
* Reads the persisted migration execution/reconciliation record.
|
|
154
|
+
* @param migrationId - Valid migration scope ID.
|
|
155
|
+
* @returns Cloned status record, or null when absent.
|
|
156
|
+
* @throws Invalid ID or host read/clone failure.
|
|
157
|
+
* @example
|
|
158
|
+
* ```typescript
|
|
159
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
160
|
+
* export async function getMigrationStatus(store: LifecyclePlatformControlStore, ...args: Parameters<LifecyclePlatformControlStore["getMigrationStatus"]>) {
|
|
161
|
+
* return store.getMigrationStatus(...args);
|
|
162
|
+
* }
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
getMigrationStatus(migrationId: string): Promise<LifecyclePlatformMigrationRecord | null>;
|
|
166
|
+
/**
|
|
167
|
+
* Binds an execution token and transitions a tenant migration record to running.
|
|
168
|
+
* @param input - Verified tenantId, persisted migrationId, and unique host executionId; plan scope must include the tenant.
|
|
169
|
+
* @returns Cloned running record, or completed cutover/rolled-back record unchanged.
|
|
170
|
+
* @throws Missing plan, tenant mismatch, conflicting active token, reconciling state, invalid IDs, or host store failure.
|
|
171
|
+
* @example
|
|
172
|
+
* ```typescript
|
|
173
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
174
|
+
* export async function beginMigrationExecution(store: LifecyclePlatformControlStore, ...args: Parameters<LifecyclePlatformControlStore["beginMigrationExecution"]>) {
|
|
175
|
+
* return store.beginMigrationExecution(...args);
|
|
176
|
+
* }
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
beginMigrationExecution(input: {
|
|
180
|
+
/**
|
|
181
|
+
* Verified tenant included in the persisted migration plan tenant scope; mismatch rejects before recording execution.
|
|
182
|
+
*/
|
|
183
|
+
tenantId: string;
|
|
184
|
+
/**
|
|
185
|
+
* Identity of an already persisted migration plan and its corresponding status record.
|
|
186
|
+
*/
|
|
187
|
+
migrationId: string;
|
|
188
|
+
/**
|
|
189
|
+
* Host execution token bound to this run; a different token cannot replace an active running/verified execution.
|
|
190
|
+
*/
|
|
191
|
+
executionId: string;
|
|
192
|
+
}): Promise<LifecyclePlatformMigrationRecord>;
|
|
193
|
+
/**
|
|
194
|
+
* Records verified migration evidence and cutover data for the active execution token.
|
|
195
|
+
* @param input - Tenant, exact persisted plan, active executionId, verification report, and matching validated cutover.
|
|
196
|
+
* @returns Cloned verified migration record.
|
|
197
|
+
* @throws Invalid cutover/report, nonpersisted/changed plan, tenant/token/state mismatch, changed retry verification, or host store failure.
|
|
198
|
+
* @example
|
|
199
|
+
* ```typescript
|
|
200
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
201
|
+
* export async function recordMigrationVerification(store: LifecyclePlatformControlStore, ...args: Parameters<LifecyclePlatformControlStore["recordMigrationVerification"]>) {
|
|
202
|
+
* return store.recordMigrationVerification(...args);
|
|
203
|
+
* }
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
recordMigrationVerification(input: {
|
|
207
|
+
/**
|
|
208
|
+
* Verified tenant included in the exact persisted plan tenant scope.
|
|
209
|
+
*/
|
|
210
|
+
tenantId: string;
|
|
211
|
+
/**
|
|
212
|
+
* Exact persisted migration plan; canonical contents must match the saved plan rather than a modified caller copy.
|
|
213
|
+
*/
|
|
214
|
+
plan: BackendMigrationPlan;
|
|
215
|
+
/**
|
|
216
|
+
* Current execution token recorded by beginMigrationExecution; only running/verified records with this token may accept evidence.
|
|
217
|
+
*/
|
|
218
|
+
executionId: string;
|
|
219
|
+
/**
|
|
220
|
+
* Passing source/target verification report validated against the plan and cutover; a verified retry must reproduce the recorded report.
|
|
221
|
+
*/
|
|
222
|
+
verification: BackendMigrationVerificationReport;
|
|
223
|
+
/**
|
|
224
|
+
* Matching validated cutover proof recorded with the report for a later explicit routing commit; recording verification does not itself switch placement.
|
|
225
|
+
*/
|
|
226
|
+
cutover: BackendMigrationCutover;
|
|
227
|
+
}): Promise<LifecyclePlatformMigrationRecord>;
|
|
228
|
+
/**
|
|
229
|
+
* Records a failed or reconciling migration status with host diagnostic text.
|
|
230
|
+
* @param input - Persisted migrationId, optional expected executionId, failure status, and nonblank message up to 2048 characters.
|
|
231
|
+
* @returns Cloned updated failure record.
|
|
232
|
+
* @throws Missing/completed migration, mismatched token, invalid input, or host store/clock failure.
|
|
233
|
+
* @example
|
|
234
|
+
* ```typescript
|
|
235
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
236
|
+
* export async function markMigrationFailure(store: LifecyclePlatformControlStore, ...args: Parameters<LifecyclePlatformControlStore["markMigrationFailure"]>) {
|
|
237
|
+
* return store.markMigrationFailure(...args);
|
|
238
|
+
* }
|
|
239
|
+
* ```
|
|
240
|
+
*/
|
|
241
|
+
markMigrationFailure(input: {
|
|
242
|
+
/**
|
|
243
|
+
* Persisted migration record to mark failed or reconciling; completed cutover/rolled-back records cannot be changed through this method.
|
|
244
|
+
*/
|
|
245
|
+
migrationId: string;
|
|
246
|
+
/**
|
|
247
|
+
* Optional expected active execution token; a truthy supplied value must match, while omission skips this token check.
|
|
248
|
+
*/
|
|
249
|
+
executionId?: string;
|
|
250
|
+
/**
|
|
251
|
+
* Failure disposition to persist: failed permits explicit retry preparation, while reconciling requires operator outcome review before retry.
|
|
252
|
+
*/
|
|
253
|
+
status: 'failed' | 'reconciling';
|
|
254
|
+
/**
|
|
255
|
+
* Nonblank diagnostic text up to 2048 characters, stored with a generated occurrence timestamp; exclude secrets and customer payloads.
|
|
256
|
+
*/
|
|
257
|
+
message: string;
|
|
258
|
+
}): Promise<LifecyclePlatformMigrationRecord>;
|
|
259
|
+
/**
|
|
260
|
+
* Applies an operator reconciliation status action and records its note.
|
|
261
|
+
* @param input - Persisted migrationId, action, and nonblank note up to 2048 characters; retry only permits failed/reconciling state and clears execution/verification/cutover.
|
|
262
|
+
* @returns Cloned updated migration record.
|
|
263
|
+
* @throws Missing record, retry from an ineligible state, completed record for mark-failed/mark-reconciling, invalid text, or host store failure.
|
|
264
|
+
* @example
|
|
265
|
+
* ```typescript
|
|
266
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
267
|
+
* export async function reconcileMigration(store: LifecyclePlatformControlStore, ...args: Parameters<LifecyclePlatformControlStore["reconcileMigration"]>) {
|
|
268
|
+
* return store.reconcileMigration(...args);
|
|
269
|
+
* }
|
|
270
|
+
* ```
|
|
271
|
+
*/
|
|
272
|
+
reconcileMigration(input: {
|
|
273
|
+
/**
|
|
274
|
+
* Persisted migration whose operator reconciliation state is being updated.
|
|
275
|
+
*/
|
|
276
|
+
migrationId: string;
|
|
277
|
+
/**
|
|
278
|
+
* Explicit retry, mark-failed or mark-reconciling action; retry requires failed/reconciling state and clears execution, verification and cutover data.
|
|
279
|
+
*/
|
|
280
|
+
action: PlatformMigrationReconcileAction;
|
|
281
|
+
/**
|
|
282
|
+
* Nonblank operator rationale up to 2048 characters, persisted as timestamped diagnostic text; this does not independently verify external outcomes.
|
|
283
|
+
*/
|
|
284
|
+
note: string;
|
|
285
|
+
}): Promise<LifecyclePlatformMigrationRecord>;
|
|
286
|
+
/**
|
|
287
|
+
* Creates a reverse migration plan for a completed cutover without executing rollback.
|
|
288
|
+
* @param input - Verified tenantId, completed migrationId, nonblank reason up to 1024 characters, and parseable requestedAt timestamp.
|
|
289
|
+
* @returns New planned reverse migration linked to the original record.
|
|
290
|
+
* @throws Incomplete/already rollback-planned migration, tenant no longer on migrated target, invalid input/planning, or host store failure.
|
|
291
|
+
* @example
|
|
292
|
+
* ```typescript
|
|
293
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
294
|
+
* export async function createRollbackPlan(store: LifecyclePlatformControlStore, ...args: Parameters<LifecyclePlatformControlStore["createRollbackPlan"]>) {
|
|
295
|
+
* return store.createRollbackPlan(...args);
|
|
296
|
+
* }
|
|
297
|
+
* ```
|
|
298
|
+
*/
|
|
299
|
+
createRollbackPlan(input: {
|
|
300
|
+
/**
|
|
301
|
+
* Verified tenant currently placed on the completed migration target; the current placement must still match before a reverse plan is created.
|
|
302
|
+
*/
|
|
303
|
+
tenantId: string;
|
|
304
|
+
/**
|
|
305
|
+
* Completed cutover migration to reverse; an existing rollback plan prevents creating another one.
|
|
306
|
+
*/
|
|
307
|
+
migrationId: string;
|
|
308
|
+
/**
|
|
309
|
+
* Nonblank rollback planning rationale up to 1024 characters, copied to the new reverse migration request.
|
|
310
|
+
*/
|
|
311
|
+
reason: string;
|
|
312
|
+
/**
|
|
313
|
+
* Parseable rollback request timestamp copied to the new plan/status record; no rollback is executed by planning.
|
|
314
|
+
*/
|
|
315
|
+
requestedAt: string;
|
|
316
|
+
}): Promise<BackendMigrationPlan>;
|
|
317
|
+
/**
|
|
318
|
+
* Commits a verified migration routing change and transfers active plugin activations to the target backend.
|
|
319
|
+
* @param input - Tenant included by the exact persisted plan and its previously recorded cutover proof.
|
|
320
|
+
* @returns New target placement, or current placement for an already-cutover record.
|
|
321
|
+
* @throws Unverified/stale/changed plan, invalid cutover or nonadvancing routing revision, target tenant mismatch, missing planned active plugin or target installation, or host lock/write failure.
|
|
322
|
+
* @example
|
|
323
|
+
* ```typescript
|
|
324
|
+
* import { LifecyclePlatformControlStore } from "@alneas/eaos-server/platform-admin/store";
|
|
325
|
+
* export async function recordTenantPlacement(store: LifecyclePlatformControlStore, ...args: Parameters<LifecyclePlatformControlStore["recordTenantPlacement"]>) {
|
|
326
|
+
* return store.recordTenantPlacement(...args);
|
|
327
|
+
* }
|
|
328
|
+
* ```
|
|
329
|
+
*/
|
|
330
|
+
recordTenantPlacement(input: {
|
|
331
|
+
/**
|
|
332
|
+
* Verified tenant included in the plan whose persisted routing placement and active plugin bindings will be moved.
|
|
333
|
+
*/
|
|
334
|
+
tenantId: string;
|
|
335
|
+
/**
|
|
336
|
+
* Exact persisted verified migration plan; current source/target backend identities and installations are rechecked before commit.
|
|
337
|
+
*/
|
|
338
|
+
plan: BackendMigrationPlan;
|
|
339
|
+
/**
|
|
340
|
+
* Previously recorded verification proof with source retained and an advancing routing revision; its canonical contents must match the saved cutover.
|
|
341
|
+
*/
|
|
342
|
+
cutover: BackendMigrationCutover;
|
|
343
|
+
}): Promise<TenantBackendPlacement>;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export { LifecyclePlatformControlStore };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { AnnotationTarget, ReaderComment, annotationOperations, annotationSchemas, documentAnnotations } from './index.js';
|
|
2
|
+
import '@alneas/eaos-core';
|
|
3
|
+
import 'hono/types';
|
|
4
|
+
import '@alneas/eaos-core/plugin-sdk';
|
|
5
|
+
import 'hono';
|
|
6
|
+
import '@alneas/eaos-server/lifecycle-engine';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
annotationOperations,
|
|
3
|
+
annotationSchemas,
|
|
4
|
+
documentAnnotations
|
|
5
|
+
} from "../chunk-INCHXAFK.js";
|
|
6
|
+
import "../chunk-3VITSHN3.js";
|
|
7
|
+
export {
|
|
8
|
+
annotationOperations,
|
|
9
|
+
annotationSchemas,
|
|
10
|
+
documentAnnotations
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=annotations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { AtomicSession, AtomicSqlConnection, PluginPrincipal, AtomicSqlDriver } from './index.js';
|
|
2
|
+
import '@alneas/eaos-core';
|
|
3
|
+
import 'hono/types';
|
|
4
|
+
import '@alneas/eaos-core/plugin-sdk';
|
|
5
|
+
import 'hono';
|
|
6
|
+
import '@alneas/eaos-server/lifecycle-engine';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Weak capability map joining validated session wrappers to their live SQL connection, principal and dialect; trusted adapter plumbing only.
|
|
10
|
+
*
|
|
11
|
+
*
|
|
12
|
+
* Internal capability propagation through validated session wrappers; never a new transaction.
|
|
13
|
+
* @see inheritAtomicSqlSession for canonical usage.
|
|
14
|
+
*/
|
|
15
|
+
declare const atomicSqlBindings: WeakMap<AtomicSession, {
|
|
16
|
+
/**
|
|
17
|
+
* Exact active SQL connection whose commit/rollback boundary owns this session.
|
|
18
|
+
*/
|
|
19
|
+
connection: AtomicSqlConnection;
|
|
20
|
+
/**
|
|
21
|
+
* Verified tenant/user scope bound to this live connection.
|
|
22
|
+
*/
|
|
23
|
+
principal: PluginPrincipal;
|
|
24
|
+
/**
|
|
25
|
+
* Trusted SQL dialect of the joined transaction driver.
|
|
26
|
+
*/
|
|
27
|
+
dialect: AtomicSqlDriver["dialect"];
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* Temporarily propagate an existing joined SQL capability to a validated session wrapper.
|
|
31
|
+
* @param source - Currently bound source session; if unbound no capability is created.
|
|
32
|
+
* @param wrapper - Wrapper session whose lifetime must not exceed the parent callback.
|
|
33
|
+
* @returns A release callback deleting the wrapper's propagated binding.
|
|
34
|
+
* @remarks Internal trusted capability plumbing exposed for validated host adapters. It never opens a transaction, authenticates a principal or extends the underlying session lifetime.
|
|
35
|
+
* @example
|
|
36
|
+
* import { inheritAtomicSqlSession } from '@alneas/eaos-server/plugin-data/atomic-context'
|
|
37
|
+
* export function withBinding(source: Parameters<typeof inheritAtomicSqlSession>[0], wrapper: Parameters<typeof inheritAtomicSqlSession>[1], work: () => void) { const release = inheritAtomicSqlSession(source, wrapper); try { work() } finally { release() } }
|
|
38
|
+
*/
|
|
39
|
+
declare function inheritAtomicSqlSession(source: AtomicSession, wrapper: AtomicSession): () => void;
|
|
40
|
+
|
|
41
|
+
export { atomicSqlBindings, inheritAtomicSqlSession };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { AtomicRepository, AtomicRepositoryOptions, AtomicRow, AtomicSession, AtomicSqlConnection, AtomicSqlDriver, OracleAtomicConnection, OracleAtomicHost, SqliteAtomicDatabase, atomicCommand, atomicHash, createAtomicRecordStore, createAtomicRepository, createOracleAtomicDriver, createPluginAtomicRepository, createSqliteAtomicDriver, joinedAtomicSqlExecutor, parseRecordCursor, recordCursor } from './index.js';
|
|
2
|
+
import '@alneas/eaos-server/lifecycle-engine';
|
|
3
|
+
import '@alneas/eaos-core/plugin-sdk';
|
|
4
|
+
import '@alneas/eaos-core';
|
|
5
|
+
import 'hono/types';
|
|
6
|
+
import 'hono';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
atomicCommand,
|
|
3
|
+
atomicHash,
|
|
4
|
+
createAtomicRecordStore,
|
|
5
|
+
createAtomicRepository,
|
|
6
|
+
createOracleAtomicDriver,
|
|
7
|
+
createPluginAtomicRepository,
|
|
8
|
+
createSqliteAtomicDriver,
|
|
9
|
+
joinedAtomicSqlExecutor,
|
|
10
|
+
parseRecordCursor,
|
|
11
|
+
recordCursor
|
|
12
|
+
} from "../chunk-INCHXAFK.js";
|
|
13
|
+
import "../chunk-3VITSHN3.js";
|
|
14
|
+
export {
|
|
15
|
+
atomicCommand,
|
|
16
|
+
atomicHash,
|
|
17
|
+
createAtomicRecordStore,
|
|
18
|
+
createAtomicRepository,
|
|
19
|
+
createOracleAtomicDriver,
|
|
20
|
+
createPluginAtomicRepository,
|
|
21
|
+
createSqliteAtomicDriver,
|
|
22
|
+
joinedAtomicSqlExecutor,
|
|
23
|
+
parseRecordCursor,
|
|
24
|
+
recordCursor
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=atomic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|