@aigne/aos 0.2.0-beta
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 +49 -0
- package/LICENSE.md +26 -0
- package/dist/agent-dsl.cjs +116 -0
- package/dist/agent-dsl.d.cts +31 -0
- package/dist/agent-dsl.d.cts.map +1 -0
- package/dist/agent-dsl.d.mts +31 -0
- package/dist/agent-dsl.d.mts.map +1 -0
- package/dist/agent-dsl.mjs +115 -0
- package/dist/agent-dsl.mjs.map +1 -0
- package/dist/arc-compat.cjs +125 -0
- package/dist/arc-compat.d.cts +17 -0
- package/dist/arc-compat.d.cts.map +1 -0
- package/dist/arc-compat.d.mts +17 -0
- package/dist/arc-compat.d.mts.map +1 -0
- package/dist/arc-compat.mjs +123 -0
- package/dist/arc-compat.mjs.map +1 -0
- package/dist/auto-surface/compiler.cjs +36 -0
- package/dist/auto-surface/compiler.d.cts +7 -0
- package/dist/auto-surface/compiler.d.cts.map +1 -0
- package/dist/auto-surface/compiler.d.mts +7 -0
- package/dist/auto-surface/compiler.d.mts.map +1 -0
- package/dist/auto-surface/compiler.mjs +37 -0
- package/dist/auto-surface/compiler.mjs.map +1 -0
- package/dist/auto-surface/definition-dsl.cjs +333 -0
- package/dist/auto-surface/definition-dsl.d.cts +41 -0
- package/dist/auto-surface/definition-dsl.d.cts.map +1 -0
- package/dist/auto-surface/definition-dsl.d.mts +41 -0
- package/dist/auto-surface/definition-dsl.d.mts.map +1 -0
- package/dist/auto-surface/definition-dsl.mjs +332 -0
- package/dist/auto-surface/definition-dsl.mjs.map +1 -0
- package/dist/auto-surface/fragments.cjs +177 -0
- package/dist/auto-surface/fragments.d.cts +23 -0
- package/dist/auto-surface/fragments.d.cts.map +1 -0
- package/dist/auto-surface/fragments.d.mts +23 -0
- package/dist/auto-surface/fragments.d.mts.map +1 -0
- package/dist/auto-surface/fragments.mjs +175 -0
- package/dist/auto-surface/fragments.mjs.map +1 -0
- package/dist/auto-surface/index.d.mts +9 -0
- package/dist/auto-surface/layering.cjs +43 -0
- package/dist/auto-surface/layering.d.cts +7 -0
- package/dist/auto-surface/layering.d.cts.map +1 -0
- package/dist/auto-surface/layering.d.mts +7 -0
- package/dist/auto-surface/layering.d.mts.map +1 -0
- package/dist/auto-surface/layering.mjs +43 -0
- package/dist/auto-surface/layering.mjs.map +1 -0
- package/dist/auto-surface/projection.cjs +11 -0
- package/dist/auto-surface/projection.d.cts +11 -0
- package/dist/auto-surface/projection.d.cts.map +1 -0
- package/dist/auto-surface/projection.d.mts +11 -0
- package/dist/auto-surface/projection.d.mts.map +1 -0
- package/dist/auto-surface/projection.mjs +12 -0
- package/dist/auto-surface/projection.mjs.map +1 -0
- package/dist/auto-surface/projectors/settings-shell.cjs +114 -0
- package/dist/auto-surface/projectors/settings-shell.d.cts +10 -0
- package/dist/auto-surface/projectors/settings-shell.d.cts.map +1 -0
- package/dist/auto-surface/projectors/settings-shell.d.mts +10 -0
- package/dist/auto-surface/projectors/settings-shell.d.mts.map +1 -0
- package/dist/auto-surface/projectors/settings-shell.mjs +114 -0
- package/dist/auto-surface/projectors/settings-shell.mjs.map +1 -0
- package/dist/auto-surface/scenario.cjs +38 -0
- package/dist/auto-surface/scenario.d.cts +31 -0
- package/dist/auto-surface/scenario.d.cts.map +1 -0
- package/dist/auto-surface/scenario.d.mts +31 -0
- package/dist/auto-surface/scenario.d.mts.map +1 -0
- package/dist/auto-surface/scenario.mjs +37 -0
- package/dist/auto-surface/scenario.mjs.map +1 -0
- package/dist/auto-surface/types.cjs +9 -0
- package/dist/auto-surface/types.d.cts +153 -0
- package/dist/auto-surface/types.d.cts.map +1 -0
- package/dist/auto-surface/types.d.mts +153 -0
- package/dist/auto-surface/types.d.mts.map +1 -0
- package/dist/auto-surface/types.mjs +9 -0
- package/dist/auto-surface/types.mjs.map +1 -0
- package/dist/auto-surface/value-dsl.cjs +80 -0
- package/dist/auto-surface/value-dsl.d.cts +24 -0
- package/dist/auto-surface/value-dsl.d.cts.map +1 -0
- package/dist/auto-surface/value-dsl.d.mts +24 -0
- package/dist/auto-surface/value-dsl.d.mts.map +1 -0
- package/dist/auto-surface/value-dsl.mjs +79 -0
- package/dist/auto-surface/value-dsl.mjs.map +1 -0
- package/dist/blocklet/activation.cjs +94 -0
- package/dist/blocklet/activation.d.cts +30 -0
- package/dist/blocklet/activation.d.cts.map +1 -0
- package/dist/blocklet/activation.d.mts +30 -0
- package/dist/blocklet/activation.d.mts.map +1 -0
- package/dist/blocklet/activation.mjs +94 -0
- package/dist/blocklet/activation.mjs.map +1 -0
- package/dist/blocklet/did-space-registry.cjs +282 -0
- package/dist/blocklet/did-space-registry.d.cts +82 -0
- package/dist/blocklet/did-space-registry.d.cts.map +1 -0
- package/dist/blocklet/did-space-registry.d.mts +82 -0
- package/dist/blocklet/did-space-registry.d.mts.map +1 -0
- package/dist/blocklet/did-space-registry.mjs +281 -0
- package/dist/blocklet/did-space-registry.mjs.map +1 -0
- package/dist/blocklet/handlers.cjs +66 -0
- package/dist/blocklet/handlers.d.cts +16 -0
- package/dist/blocklet/handlers.d.cts.map +1 -0
- package/dist/blocklet/handlers.d.mts +16 -0
- package/dist/blocklet/handlers.d.mts.map +1 -0
- package/dist/blocklet/handlers.mjs +65 -0
- package/dist/blocklet/handlers.mjs.map +1 -0
- package/dist/blocklet/index.d.mts +7 -0
- package/dist/blocklet/manifest.d.cts +2 -0
- package/dist/blocklet/manifest.d.mts +2 -0
- package/dist/blocklet/manifest.mjs +3 -0
- package/dist/blocklet/registry.cjs +447 -0
- package/dist/blocklet/registry.d.cts +197 -0
- package/dist/blocklet/registry.d.cts.map +1 -0
- package/dist/blocklet/registry.d.mts +197 -0
- package/dist/blocklet/registry.d.mts.map +1 -0
- package/dist/blocklet/registry.mjs +441 -0
- package/dist/blocklet/registry.mjs.map +1 -0
- package/dist/blocklet/static-render.cjs +183 -0
- package/dist/blocklet/static-render.d.cts +55 -0
- package/dist/blocklet/static-render.d.cts.map +1 -0
- package/dist/blocklet/static-render.d.mts +55 -0
- package/dist/blocklet/static-render.d.mts.map +1 -0
- package/dist/blocklet/static-render.mjs +181 -0
- package/dist/blocklet/static-render.mjs.map +1 -0
- package/dist/blocklet/types.d.cts +70 -0
- package/dist/blocklet/types.d.cts.map +1 -0
- package/dist/blocklet/types.d.mts +70 -0
- package/dist/blocklet/types.d.mts.map +1 -0
- package/dist/devices/chain.cjs +127 -0
- package/dist/devices/chain.d.cts +48 -0
- package/dist/devices/chain.d.cts.map +1 -0
- package/dist/devices/chain.d.mts +48 -0
- package/dist/devices/chain.d.mts.map +1 -0
- package/dist/devices/chain.mjs +125 -0
- package/dist/devices/chain.mjs.map +1 -0
- package/dist/dsl-shared.cjs +290 -0
- package/dist/dsl-shared.d.cts +54 -0
- package/dist/dsl-shared.d.cts.map +1 -0
- package/dist/dsl-shared.d.mts +54 -0
- package/dist/dsl-shared.d.mts.map +1 -0
- package/dist/dsl-shared.mjs +287 -0
- package/dist/dsl-shared.mjs.map +1 -0
- package/dist/http/afs-mcp.cjs +85 -0
- package/dist/http/afs-mcp.d.cts +14 -0
- package/dist/http/afs-mcp.d.cts.map +1 -0
- package/dist/http/afs-mcp.d.mts +14 -0
- package/dist/http/afs-mcp.d.mts.map +1 -0
- package/dist/http/afs-mcp.mjs +86 -0
- package/dist/http/afs-mcp.mjs.map +1 -0
- package/dist/http/afs-raw.cjs +264 -0
- package/dist/http/afs-raw.d.cts +31 -0
- package/dist/http/afs-raw.d.cts.map +1 -0
- package/dist/http/afs-raw.d.mts +31 -0
- package/dist/http/afs-raw.d.mts.map +1 -0
- package/dist/http/afs-raw.mjs +264 -0
- package/dist/http/afs-raw.mjs.map +1 -0
- package/dist/http/afs-rest.cjs +30 -0
- package/dist/http/afs-rest.d.cts +21 -0
- package/dist/http/afs-rest.d.cts.map +1 -0
- package/dist/http/afs-rest.d.mts +21 -0
- package/dist/http/afs-rest.d.mts.map +1 -0
- package/dist/http/afs-rest.mjs +31 -0
- package/dist/http/afs-rest.mjs.map +1 -0
- package/dist/http/afs-rpc-wire.cjs +271 -0
- package/dist/http/afs-rpc-wire.d.cts +195 -0
- package/dist/http/afs-rpc-wire.d.cts.map +1 -0
- package/dist/http/afs-rpc-wire.d.mts +195 -0
- package/dist/http/afs-rpc-wire.d.mts.map +1 -0
- package/dist/http/afs-rpc-wire.mjs +262 -0
- package/dist/http/afs-rpc-wire.mjs.map +1 -0
- package/dist/http/afs-rpc.cjs +729 -0
- package/dist/http/afs-rpc.d.cts +103 -0
- package/dist/http/afs-rpc.d.cts.map +1 -0
- package/dist/http/afs-rpc.d.mts +103 -0
- package/dist/http/afs-rpc.d.mts.map +1 -0
- package/dist/http/afs-rpc.mjs +729 -0
- package/dist/http/afs-rpc.mjs.map +1 -0
- package/dist/http/afs-upload.cjs +116 -0
- package/dist/http/afs-upload.d.cts +40 -0
- package/dist/http/afs-upload.d.cts.map +1 -0
- package/dist/http/afs-upload.d.mts +40 -0
- package/dist/http/afs-upload.d.mts.map +1 -0
- package/dist/http/afs-upload.mjs +116 -0
- package/dist/http/afs-upload.mjs.map +1 -0
- package/dist/http/aup-client.cjs +60 -0
- package/dist/http/aup-client.d.cts +22 -0
- package/dist/http/aup-client.d.cts.map +1 -0
- package/dist/http/aup-client.d.mts +22 -0
- package/dist/http/aup-client.d.mts.map +1 -0
- package/dist/http/aup-client.mjs +59 -0
- package/dist/http/aup-client.mjs.map +1 -0
- package/dist/http/aup-event.cjs +100 -0
- package/dist/http/aup-event.d.cts +38 -0
- package/dist/http/aup-event.d.cts.map +1 -0
- package/dist/http/aup-event.d.mts +38 -0
- package/dist/http/aup-event.d.mts.map +1 -0
- package/dist/http/aup-event.mjs +101 -0
- package/dist/http/aup-event.mjs.map +1 -0
- package/dist/http/auth-context.cjs +66 -0
- package/dist/http/auth-context.d.cts +64 -0
- package/dist/http/auth-context.d.cts.map +1 -0
- package/dist/http/auth-context.d.mts +64 -0
- package/dist/http/auth-context.d.mts.map +1 -0
- package/dist/http/auth-context.mjs +66 -0
- package/dist/http/auth-context.mjs.map +1 -0
- package/dist/http/csrf.cjs +50 -0
- package/dist/http/csrf.d.cts +8 -0
- package/dist/http/csrf.d.cts.map +1 -0
- package/dist/http/csrf.d.mts +8 -0
- package/dist/http/csrf.d.mts.map +1 -0
- package/dist/http/csrf.mjs +49 -0
- package/dist/http/csrf.mjs.map +1 -0
- package/dist/http/handlers.cjs +106 -0
- package/dist/http/handlers.d.cts +39 -0
- package/dist/http/handlers.d.cts.map +1 -0
- package/dist/http/handlers.d.mts +39 -0
- package/dist/http/handlers.d.mts.map +1 -0
- package/dist/http/handlers.mjs +104 -0
- package/dist/http/handlers.mjs.map +1 -0
- package/dist/http/index.d.mts +1 -0
- package/dist/http/ingest-facade.cjs +315 -0
- package/dist/http/ingest-facade.mjs +314 -0
- package/dist/http/ingest-facade.mjs.map +1 -0
- package/dist/http/raw-url.cjs +136 -0
- package/dist/http/raw-url.d.cts +54 -0
- package/dist/http/raw-url.d.cts.map +1 -0
- package/dist/http/raw-url.d.mts +54 -0
- package/dist/http/raw-url.d.mts.map +1 -0
- package/dist/http/raw-url.mjs +136 -0
- package/dist/http/raw-url.mjs.map +1 -0
- package/dist/http/request-context.cjs +178 -0
- package/dist/http/request-context.d.cts +76 -0
- package/dist/http/request-context.d.cts.map +1 -0
- package/dist/http/request-context.d.mts +76 -0
- package/dist/http/request-context.d.mts.map +1 -0
- package/dist/http/request-context.mjs +179 -0
- package/dist/http/request-context.mjs.map +1 -0
- package/dist/index.cjs +197 -0
- package/dist/index.d.cts +63 -0
- package/dist/index.d.mts +68 -0
- package/dist/index.mjs +61 -0
- package/dist/mcp/index.cjs +9 -0
- package/dist/mcp/index.d.cts +5 -0
- package/dist/mcp/index.d.mts +5 -0
- package/dist/mcp/index.mjs +6 -0
- package/dist/mcp/prompts.cjs +17 -0
- package/dist/mcp/prompts.d.cts +8 -0
- package/dist/mcp/prompts.d.cts.map +1 -0
- package/dist/mcp/prompts.d.mts +8 -0
- package/dist/mcp/prompts.d.mts.map +1 -0
- package/dist/mcp/prompts.mjs +17 -0
- package/dist/mcp/prompts.mjs.map +1 -0
- package/dist/mcp/resources.cjs +22 -0
- package/dist/mcp/resources.d.cts +8 -0
- package/dist/mcp/resources.d.cts.map +1 -0
- package/dist/mcp/resources.d.mts +8 -0
- package/dist/mcp/resources.d.mts.map +1 -0
- package/dist/mcp/resources.mjs +22 -0
- package/dist/mcp/resources.mjs.map +1 -0
- package/dist/mcp/server.cjs +51 -0
- package/dist/mcp/server.d.cts +20 -0
- package/dist/mcp/server.d.cts.map +1 -0
- package/dist/mcp/server.d.mts +20 -0
- package/dist/mcp/server.d.mts.map +1 -0
- package/dist/mcp/server.mjs +52 -0
- package/dist/mcp/server.mjs.map +1 -0
- package/dist/mcp/tools.cjs +218 -0
- package/dist/mcp/tools.d.cts +8 -0
- package/dist/mcp/tools.d.cts.map +1 -0
- package/dist/mcp/tools.d.mts +8 -0
- package/dist/mcp/tools.d.mts.map +1 -0
- package/dist/mcp/tools.mjs +219 -0
- package/dist/mcp/tools.mjs.map +1 -0
- package/dist/mcp/utils.cjs +75 -0
- package/dist/mcp/utils.mjs +69 -0
- package/dist/mcp/utils.mjs.map +1 -0
- package/dist/mount/index.cjs +4 -0
- package/dist/mount/index.d.cts +3 -0
- package/dist/mount/index.d.mts +3 -0
- package/dist/mount/index.mjs +3 -0
- package/dist/mount/materializer.cjs +167 -0
- package/dist/mount/materializer.d.cts +97 -0
- package/dist/mount/materializer.d.cts.map +1 -0
- package/dist/mount/materializer.d.mts +97 -0
- package/dist/mount/materializer.d.mts.map +1 -0
- package/dist/mount/materializer.mjs +167 -0
- package/dist/mount/materializer.mjs.map +1 -0
- package/dist/mount/types.d.cts +90 -0
- package/dist/mount/types.d.cts.map +1 -0
- package/dist/mount/types.d.mts +90 -0
- package/dist/mount/types.d.mts.map +1 -0
- package/dist/mount-config.cjs +61 -0
- package/dist/mount-config.d.cts +19 -0
- package/dist/mount-config.d.cts.map +1 -0
- package/dist/mount-config.d.mts +19 -0
- package/dist/mount-config.d.mts.map +1 -0
- package/dist/mount-config.mjs +61 -0
- package/dist/mount-config.mjs.map +1 -0
- package/dist/projectors/aup-projector.cjs +190 -0
- package/dist/projectors/aup-projector.d.cts +59 -0
- package/dist/projectors/aup-projector.d.cts.map +1 -0
- package/dist/projectors/aup-projector.d.mts +59 -0
- package/dist/projectors/aup-projector.d.mts.map +1 -0
- package/dist/projectors/aup-projector.mjs +188 -0
- package/dist/projectors/aup-projector.mjs.map +1 -0
- package/dist/projectors/index.cjs +6 -0
- package/dist/projectors/index.d.cts +2 -0
- package/dist/projectors/index.d.mts +2 -0
- package/dist/projectors/index.mjs +3 -0
- package/dist/scaffold/afs.cjs +195 -0
- package/dist/scaffold/afs.d.cts +16 -0
- package/dist/scaffold/afs.d.cts.map +1 -0
- package/dist/scaffold/afs.d.mts +16 -0
- package/dist/scaffold/afs.d.mts.map +1 -0
- package/dist/scaffold/afs.mjs +195 -0
- package/dist/scaffold/afs.mjs.map +1 -0
- package/dist/scaffold/composition.cjs +92 -0
- package/dist/scaffold/composition.d.cts +10 -0
- package/dist/scaffold/composition.d.cts.map +1 -0
- package/dist/scaffold/composition.d.mts +10 -0
- package/dist/scaffold/composition.d.mts.map +1 -0
- package/dist/scaffold/composition.mjs +92 -0
- package/dist/scaffold/composition.mjs.map +1 -0
- package/dist/scaffold/dsl-error.cjs +21 -0
- package/dist/scaffold/dsl-error.d.cts +11 -0
- package/dist/scaffold/dsl-error.d.cts.map +1 -0
- package/dist/scaffold/dsl-error.d.mts +11 -0
- package/dist/scaffold/dsl-error.d.mts.map +1 -0
- package/dist/scaffold/dsl-error.mjs +20 -0
- package/dist/scaffold/dsl-error.mjs.map +1 -0
- package/dist/scaffold/index.d.mts +12 -0
- package/dist/scaffold/manifest-dsl.cjs +188 -0
- package/dist/scaffold/manifest-dsl.d.cts +8 -0
- package/dist/scaffold/manifest-dsl.d.cts.map +1 -0
- package/dist/scaffold/manifest-dsl.d.mts +8 -0
- package/dist/scaffold/manifest-dsl.d.mts.map +1 -0
- package/dist/scaffold/manifest-dsl.mjs +188 -0
- package/dist/scaffold/manifest-dsl.mjs.map +1 -0
- package/dist/scaffold/module-dsl.cjs +284 -0
- package/dist/scaffold/module-dsl.d.cts +8 -0
- package/dist/scaffold/module-dsl.d.cts.map +1 -0
- package/dist/scaffold/module-dsl.d.mts +8 -0
- package/dist/scaffold/module-dsl.d.mts.map +1 -0
- package/dist/scaffold/module-dsl.mjs +284 -0
- package/dist/scaffold/module-dsl.mjs.map +1 -0
- package/dist/scaffold/resolver.cjs +156 -0
- package/dist/scaffold/resolver.d.cts +7 -0
- package/dist/scaffold/resolver.d.cts.map +1 -0
- package/dist/scaffold/resolver.d.mts +7 -0
- package/dist/scaffold/resolver.d.mts.map +1 -0
- package/dist/scaffold/resolver.mjs +156 -0
- package/dist/scaffold/resolver.mjs.map +1 -0
- package/dist/scaffold/runtime.cjs +24 -0
- package/dist/scaffold/runtime.d.cts +19 -0
- package/dist/scaffold/runtime.d.cts.map +1 -0
- package/dist/scaffold/runtime.d.mts +19 -0
- package/dist/scaffold/runtime.d.mts.map +1 -0
- package/dist/scaffold/runtime.mjs +25 -0
- package/dist/scaffold/runtime.mjs.map +1 -0
- package/dist/scaffold/shell-dsl.cjs +279 -0
- package/dist/scaffold/shell-dsl.d.cts +8 -0
- package/dist/scaffold/shell-dsl.d.cts.map +1 -0
- package/dist/scaffold/shell-dsl.d.mts +8 -0
- package/dist/scaffold/shell-dsl.d.mts.map +1 -0
- package/dist/scaffold/shell-dsl.mjs +279 -0
- package/dist/scaffold/shell-dsl.mjs.map +1 -0
- package/dist/scaffold/surface-dsl.cjs +182 -0
- package/dist/scaffold/surface-dsl.d.cts +8 -0
- package/dist/scaffold/surface-dsl.d.cts.map +1 -0
- package/dist/scaffold/surface-dsl.d.mts +8 -0
- package/dist/scaffold/surface-dsl.d.mts.map +1 -0
- package/dist/scaffold/surface-dsl.mjs +182 -0
- package/dist/scaffold/surface-dsl.mjs.map +1 -0
- package/dist/scaffold/surfaces.cjs +84 -0
- package/dist/scaffold/surfaces.d.cts +23 -0
- package/dist/scaffold/surfaces.d.cts.map +1 -0
- package/dist/scaffold/surfaces.d.mts +24 -0
- package/dist/scaffold/surfaces.d.mts.map +1 -0
- package/dist/scaffold/surfaces.mjs +84 -0
- package/dist/scaffold/surfaces.mjs.map +1 -0
- package/dist/scaffold/types.d.cts +264 -0
- package/dist/scaffold/types.d.cts.map +1 -0
- package/dist/scaffold/types.d.mts +265 -0
- package/dist/scaffold/types.d.mts.map +1 -0
- package/dist/scaffold/workspace-dsl.cjs +339 -0
- package/dist/scaffold/workspace-dsl.d.cts +49 -0
- package/dist/scaffold/workspace-dsl.d.cts.map +1 -0
- package/dist/scaffold/workspace-dsl.d.mts +49 -0
- package/dist/scaffold/workspace-dsl.d.mts.map +1 -0
- package/dist/scaffold/workspace-dsl.mjs +337 -0
- package/dist/scaffold/workspace-dsl.mjs.map +1 -0
- package/dist/scope/index.d.mts +3 -0
- package/dist/scope/read-blocklet-scope.cjs +29 -0
- package/dist/scope/read-blocklet-scope.d.cts +8 -0
- package/dist/scope/read-blocklet-scope.d.cts.map +1 -0
- package/dist/scope/read-blocklet-scope.d.mts +8 -0
- package/dist/scope/read-blocklet-scope.d.mts.map +1 -0
- package/dist/scope/read-blocklet-scope.mjs +30 -0
- package/dist/scope/read-blocklet-scope.mjs.map +1 -0
- package/dist/scope/resolve-scoped-afs.cjs +87 -0
- package/dist/scope/resolve-scoped-afs.d.cts +7 -0
- package/dist/scope/resolve-scoped-afs.d.cts.map +1 -0
- package/dist/scope/resolve-scoped-afs.d.mts +7 -0
- package/dist/scope/resolve-scoped-afs.d.mts.map +1 -0
- package/dist/scope/resolve-scoped-afs.mjs +88 -0
- package/dist/scope/resolve-scoped-afs.mjs.map +1 -0
- package/dist/scope/types.d.cts +25 -0
- package/dist/scope/types.d.cts.map +1 -0
- package/dist/scope/types.d.mts +25 -0
- package/dist/scope/types.d.mts.map +1 -0
- package/dist/session/backends.cjs +90 -0
- package/dist/session/backends.d.cts +35 -0
- package/dist/session/backends.d.cts.map +1 -0
- package/dist/session/backends.d.mts +35 -0
- package/dist/session/backends.d.mts.map +1 -0
- package/dist/session/backends.mjs +89 -0
- package/dist/session/backends.mjs.map +1 -0
- package/dist/session/replication-resolver.cjs +323 -0
- package/dist/session/replication-resolver.d.cts +71 -0
- package/dist/session/replication-resolver.d.cts.map +1 -0
- package/dist/session/replication-resolver.d.mts +71 -0
- package/dist/session/replication-resolver.d.mts.map +1 -0
- package/dist/session/replication-resolver.mjs +323 -0
- package/dist/session/replication-resolver.mjs.map +1 -0
- package/dist/session/role-level.cjs +36 -0
- package/dist/session/role-level.d.cts +24 -0
- package/dist/session/role-level.d.cts.map +1 -0
- package/dist/session/role-level.d.mts +24 -0
- package/dist/session/role-level.d.mts.map +1 -0
- package/dist/session/role-level.mjs +35 -0
- package/dist/session/role-level.mjs.map +1 -0
- package/dist/session/session-dir-providers.cjs +254 -0
- package/dist/session/session-dir-providers.d.cts +32 -0
- package/dist/session/session-dir-providers.d.cts.map +1 -0
- package/dist/session/session-dir-providers.d.mts +32 -0
- package/dist/session/session-dir-providers.d.mts.map +1 -0
- package/dist/session/session-dir-providers.mjs +252 -0
- package/dist/session/session-dir-providers.mjs.map +1 -0
- package/dist/session/session-id.cjs +20 -0
- package/dist/session/session-id.d.cts +15 -0
- package/dist/session/session-id.d.cts.map +1 -0
- package/dist/session/session-id.d.mts +15 -0
- package/dist/session/session-id.d.mts.map +1 -0
- package/dist/session/session-id.mjs +20 -0
- package/dist/session/session-id.mjs.map +1 -0
- package/dist/session/session-user-afs.cjs +899 -0
- package/dist/session/session-user-afs.d.cts +296 -0
- package/dist/session/session-user-afs.d.cts.map +1 -0
- package/dist/session/session-user-afs.d.mts +296 -0
- package/dist/session/session-user-afs.d.mts.map +1 -0
- package/dist/session/session-user-afs.mjs +896 -0
- package/dist/session/session-user-afs.mjs.map +1 -0
- package/dist/session/settings-cascade.cjs +69 -0
- package/dist/session/settings-cascade.d.cts +81 -0
- package/dist/session/settings-cascade.d.cts.map +1 -0
- package/dist/session/settings-cascade.d.mts +81 -0
- package/dist/session/settings-cascade.d.mts.map +1 -0
- package/dist/session/settings-cascade.mjs +69 -0
- package/dist/session/settings-cascade.mjs.map +1 -0
- package/dist/session/settings-resolver.cjs +770 -0
- package/dist/session/settings-resolver.d.cts +177 -0
- package/dist/session/settings-resolver.d.cts.map +1 -0
- package/dist/session/settings-resolver.d.mts +177 -0
- package/dist/session/settings-resolver.d.mts.map +1 -0
- package/dist/session/settings-resolver.mjs +771 -0
- package/dist/session/settings-resolver.mjs.map +1 -0
- package/dist/session/settings-schema-store.cjs +0 -0
- package/dist/session/settings-schema-store.d.cts +72 -0
- package/dist/session/settings-schema-store.d.cts.map +1 -0
- package/dist/session/settings-schema-store.d.mts +72 -0
- package/dist/session/settings-schema-store.d.mts.map +1 -0
- package/dist/session/settings-schema-store.mjs +0 -0
- package/dist/session/settings-schema-store.mjs.map +1 -0
- package/dist/system-mounts/index.cjs +14 -0
- package/dist/system-mounts/index.d.cts +6 -0
- package/dist/system-mounts/index.d.mts +6 -0
- package/dist/system-mounts/index.mjs +6 -0
- package/dist/system-mounts/install.cjs +101 -0
- package/dist/system-mounts/install.d.cts +36 -0
- package/dist/system-mounts/install.d.cts.map +1 -0
- package/dist/system-mounts/install.d.mts +37 -0
- package/dist/system-mounts/install.d.mts.map +1 -0
- package/dist/system-mounts/install.mjs +102 -0
- package/dist/system-mounts/install.mjs.map +1 -0
- package/dist/system-mounts/installers.cjs +247 -0
- package/dist/system-mounts/installers.d.cts +13 -0
- package/dist/system-mounts/installers.d.cts.map +1 -0
- package/dist/system-mounts/installers.d.mts +14 -0
- package/dist/system-mounts/installers.d.mts.map +1 -0
- package/dist/system-mounts/installers.mjs +244 -0
- package/dist/system-mounts/installers.mjs.map +1 -0
- package/dist/system-mounts/lists.cjs +122 -0
- package/dist/system-mounts/lists.d.cts +34 -0
- package/dist/system-mounts/lists.d.cts.map +1 -0
- package/dist/system-mounts/lists.d.mts +34 -0
- package/dist/system-mounts/lists.d.mts.map +1 -0
- package/dist/system-mounts/lists.mjs +122 -0
- package/dist/system-mounts/lists.mjs.map +1 -0
- package/dist/system-mounts/types.d.cts +124 -0
- package/dist/system-mounts/types.d.cts.map +1 -0
- package/dist/system-mounts/types.d.mts +125 -0
- package/dist/system-mounts/types.d.mts.map +1 -0
- package/dist/system-mounts/validate.cjs +56 -0
- package/dist/system-mounts/validate.d.cts +34 -0
- package/dist/system-mounts/validate.d.cts.map +1 -0
- package/dist/system-mounts/validate.d.mts +34 -0
- package/dist/system-mounts/validate.d.mts.map +1 -0
- package/dist/system-mounts/validate.mjs +56 -0
- package/dist/system-mounts/validate.mjs.map +1 -0
- package/dist/terminal-llm.cjs +90 -0
- package/dist/terminal-llm.d.cts +50 -0
- package/dist/terminal-llm.d.cts.map +1 -0
- package/dist/terminal-llm.d.mts +50 -0
- package/dist/terminal-llm.d.mts.map +1 -0
- package/dist/terminal-llm.mjs +90 -0
- package/dist/terminal-llm.mjs.map +1 -0
- package/dist/terminal-repl.cjs +371 -0
- package/dist/terminal-repl.d.cts +69 -0
- package/dist/terminal-repl.d.cts.map +1 -0
- package/dist/terminal-repl.d.mts +69 -0
- package/dist/terminal-repl.d.mts.map +1 -0
- package/dist/terminal-repl.mjs +370 -0
- package/dist/terminal-repl.mjs.map +1 -0
- package/dist/transport/idle-timer.cjs +136 -0
- package/dist/transport/idle-timer.d.cts +92 -0
- package/dist/transport/idle-timer.d.cts.map +1 -0
- package/dist/transport/idle-timer.d.mts +92 -0
- package/dist/transport/idle-timer.d.mts.map +1 -0
- package/dist/transport/idle-timer.mjs +132 -0
- package/dist/transport/idle-timer.mjs.map +1 -0
- package/dist/web-component-dsl.cjs +153 -0
- package/dist/web-component-dsl.d.cts +27 -0
- package/dist/web-component-dsl.d.cts.map +1 -0
- package/dist/web-component-dsl.d.mts +27 -0
- package/dist/web-component-dsl.d.mts.map +1 -0
- package/dist/web-component-dsl.mjs +152 -0
- package/dist/web-component-dsl.mjs.map +1 -0
- package/package.json +81 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installers.mjs","names":[],"sources":["../../src/system-mounts/installers.ts"],"sourcesContent":["/**\n * Runtime-neutral `install` escape-hatch implementations for the composite\n * entries in {@link SYSTEM_MOUNTS} (design.md §4.1). These orchestrate\n * multi-step mounts that a single `path`+`providerKey` can't express:\n *\n * - {@link aiInstall} — `/dev/ai` device + legacy/compat projections\n * - {@link chainInstall} — `/dev/chain/<network>` per builtin/config network + AUP\n * - {@link deviceInstall} — `/dev/ui`, `/dev/web` projections (conditional on source)\n * - {@link observabilityInstall} — `/dev/observability` (+ optional host-inbox)\n * - {@link messagingInstall} — `/proc/messaging/agents` + `/proc/messaging/tools`\n *\n * Crucial invariant: NONE of these import a runtime-specific module. All\n * provider *construction* is delegated to the `registry` factories the\n * runtime supplies (Node builds disk-backed providers + loads AUP from the\n * package dir; CF builds bundled providers + loads AUP over HTTP). Projection\n * uses `ProjectionProvider` from `@aigne/afs` (runtime-neutral) and AUP\n * companion resources flow through the factory's `resources` field + the\n * materializer's `aupResourceProjector`. So these hatches bundle cleanly into\n * the Cloudflare Worker even when CF's registry omits the keys (the hatch\n * skips that sub-mount).\n */\n\nimport { type AFS, type AFSRoot, ProjectionProvider } from \"@aigne/afs\";\nimport { time } from \"@aigne/afs-timing\";\nimport { joinURL } from \"ufo\";\nimport {\n BUILTIN_CHAIN_NETWORKS,\n type ChainNetworkConfig,\n chainNetworkToMountEntry,\n validateChainNetworks,\n} from \"../devices/chain.js\";\nimport { materializeProviderMount, type ProviderFactory, redactError } from \"../mount/index.js\";\nimport { aupResourceProjector } from \"../projectors/index.js\";\nimport type { InstallOutcome, SystemMountContext } from \"./types.js\";\n\nconst PROJECTION_OVERLAY = { allowOverlay: true } as const;\n\nfunction getMounts(afs: AFSRoot): { path: string }[] {\n const fn = (afs as unknown as AFS).getMounts;\n return typeof fn === \"function\" ? fn.call(afs) : [];\n}\n\nfunction hasMount(afs: AFSRoot, path: string): boolean {\n return getMounts(afs).some((m) => m.path === path);\n}\n\n/** Mount a `ProjectionProvider` alias `target → source`, idempotent + tolerant. */\nasync function mountProjection(\n afs: AFSRoot,\n target: string,\n source: string,\n name: string,\n out: InstallOutcome,\n): Promise<void> {\n if (hasMount(afs, target)) return;\n try {\n await (afs as unknown as AFS).mount(\n new ProjectionProvider({ name, globalAFS: afs as unknown as AFS, sourcePath: source }),\n target,\n PROJECTION_OVERLAY,\n );\n out.mounted.push(target);\n } catch (err) {\n out.warnings.push(`${target}: projection failed — ${redactError(err)}`);\n }\n}\n\n// ── AI ──────────────────────────────────────────────────────────────────────\n// Port of runtimes/node/src/config/system-ai-mounts.ts, with the device\n// constructed via registry[\"ai-device\"] instead of a direct `new AFSAIDevice`.\n\nconst AI_DEVICE = \"/dev/ai\";\nconst AI_HUBS_AIGNEHUB = \"/dev/ai/hubs/aignehub\";\nconst AI_LOCAL_EMBEDDING = \"/dev/ai/local/embedding\";\nconst LEGACY_AIGNEHUB = \"/modules/aignehub\";\nconst LEGACY_EMBEDDING = \"/modules/embedding\";\nconst COMPAT_HUB = \"/dev/ai/hub\";\nconst COMPAT_DEFAULTS = \"/dev/ai/defaults\";\nconst COMPAT_EMBEDDING = \"/dev/ai/embedding\";\n\nexport async function aiInstall(\n afs: AFSRoot,\n _ctx: SystemMountContext,\n registry: Record<string, ProviderFactory>,\n): Promise<InstallOutcome> {\n const out: InstallOutcome = { mounted: [], warnings: [] };\n\n // Step 1: legacy AIGNE Hub → canonical /dev/ai/hubs/aignehub.\n if (!hasMount(afs, AI_HUBS_AIGNEHUB)) {\n const legacy = hasMount(afs, LEGACY_AIGNEHUB)\n ? LEGACY_AIGNEHUB\n : hasMount(afs, COMPAT_HUB)\n ? COMPAT_HUB\n : null;\n if (legacy) await mountProjection(afs, AI_HUBS_AIGNEHUB, legacy, \"dev-ai-hubs-aignehub\", out);\n }\n\n // Step 2: legacy embedding → canonical /dev/ai/local/embedding.\n if (!hasMount(afs, AI_LOCAL_EMBEDDING) && hasMount(afs, LEGACY_EMBEDDING)) {\n await mountProjection(afs, AI_LOCAL_EMBEDDING, LEGACY_EMBEDDING, \"dev-ai-local-embedding\", out);\n }\n\n // Step 3: backward-compat aliases.\n if (hasMount(afs, AI_HUBS_AIGNEHUB)) {\n await mountProjection(afs, COMPAT_HUB, AI_HUBS_AIGNEHUB, \"dev-ai-hub-compat\", out);\n await mountProjection(\n afs,\n COMPAT_DEFAULTS,\n joinURL(AI_HUBS_AIGNEHUB, \"defaults\"),\n \"dev-ai-defaults-compat\",\n out,\n );\n }\n if (hasMount(afs, AI_LOCAL_EMBEDDING)) {\n await mountProjection(\n afs,\n COMPAT_EMBEDDING,\n AI_LOCAL_EMBEDDING,\n \"dev-ai-embedding-compat\",\n out,\n );\n }\n\n // Step 4: device parent at /dev/ai (after hub/local children), via registry.\n // A runtime that doesn't register `ai-device` simply skips this mount — that\n // is intentional subset behaviour (matches the driver's default-path\n // skip-silently), NOT a warning-worthy failure.\n if (!hasMount(afs, AI_DEVICE)) {\n const factory = registry[\"ai-device\"];\n if (factory) {\n try {\n const options: Record<string, unknown> = { globalAFS: afs };\n if (hasMount(afs, \"/user\")) options.userSpaceRoot = \"/user\";\n const { provider } = await factory.create({\n uri: `ai-device://system${AI_DEVICE}`,\n type: \"ai-device\",\n options,\n });\n await (afs as unknown as AFS).mount(provider, AI_DEVICE, PROJECTION_OVERLAY);\n out.mounted.push(AI_DEVICE);\n } catch (err) {\n out.warnings.push(`${AI_DEVICE}: mount failed — ${redactError(err)}`);\n }\n }\n }\n\n return out;\n}\n\n// ── chain ─────────────────────────────────────────────────────────────────\n// Port of runtimes/node/src/config/system-chain-mounts.ts through the\n// materializer. `validateChainNetworks` THROWS on bad config — that throw\n// propagates out of the driver, keeping chain config errors fatal (the Node\n// daemon refuses to start rather than half-applying), matching legacy.\n\nexport async function chainInstall(\n afs: AFSRoot,\n ctx: SystemMountContext,\n registry: Record<string, ProviderFactory>,\n): Promise<InstallOutcome> {\n const out: InstallOutcome = { mounted: [], warnings: [] };\n\n const configs = ctx.chainConfigs as readonly ChainNetworkConfig[] | undefined;\n const source = configs && configs.length > 0 ? configs : BUILTIN_CHAIN_NETWORKS;\n const cfgs: ChainNetworkConfig[] = [...source];\n\n // Fatal on bad config (throws) — do NOT catch.\n validateChainNetworks(cfgs);\n\n // No `ocap` factory → this runtime can't build chain mounts; skip silently\n // (intentional subset, not a failure). validateChainNetworks above still runs\n // so bad config stays fatal regardless of whether the factory is present.\n const factory = registry[\"ocap\"];\n if (!factory) return out;\n\n for (const cfg of cfgs) {\n const path = chainNetworkToMountEntry(cfg).path;\n if (hasMount(afs, path)) continue;\n try {\n // Per-network span (`mnt.dev.chain.main` / `.beta`) so the two builtin\n // networks are individually attributable in cold-start Server-Timing.\n await time(`mnt.dev.chain.${cfg.network}`, () =>\n materializeProviderMount({\n afs: afs as unknown as AFS,\n mountPath: path,\n definition: {\n uri: `ocap://system${path}`,\n type: \"ocap\",\n options: {\n endpoint: cfg.endpoint,\n description: `Chain network ${cfg.network} via ${safeEndpointLabel(cfg.endpoint)}`,\n },\n },\n factory,\n projectors: [aupResourceProjector],\n scope: \"host\",\n mountOptions: PROJECTION_OVERLAY,\n // Host scope: the chain mount is useful without AUP supplements, so a\n // recipe-projection failure must not unmount the data tree.\n projectionFailure: \"warn\",\n }),\n );\n out.mounted.push(path);\n } catch (err) {\n out.warnings.push(`${path}: mount failed — ${redactError(err)}`);\n }\n }\n\n return out;\n}\n\nfunction safeEndpointLabel(endpoint: string): string {\n try {\n const url = new URL(endpoint);\n return `${url.protocol}//${url.host}`;\n } catch {\n return \"<endpoint>\";\n }\n}\n\n// ── device (ui/web) ─────────────────────────────────────────────────────────\n// Port of runtimes/node/src/config/system-device-mounts.ts. Pure projections,\n// conditional on the source mounts existing.\n\nexport async function deviceInstall(afs: AFSRoot): Promise<InstallOutcome> {\n const out: InstallOutcome = { mounted: [], warnings: [] };\n const pairs: Array<[string, string, string]> = [\n [\"/dev/ui\", \"/ui\", \"dev-ui\"],\n [\"/dev/web\", \"/web\", \"dev-web\"],\n ];\n for (const [target, source, name] of pairs) {\n if (hasMount(afs, target)) continue;\n if (!hasMount(afs, source)) continue;\n await mountProjection(afs, target, source, name, out);\n }\n return out;\n}\n\n// ── observability ─────────────────────────────────────────────────────────\n// Port of runtimes/node/src/config/system-observability-mounts.ts. The\n// host-inbox (a node-only AFSFS) is built via registry[\"observability-host-inbox\"];\n// CF omits that key → no host-inbox, viewer still mounts. All failures degrade\n// to warnings (observability is supplementary — never abort startup).\n\nconst OBS_PATH = \"/dev/observability\";\nconst OBS_HOST_INBOX = \"/dev/observability/.host-inbox\";\n\nexport async function observabilityInstall(\n afs: AFSRoot,\n _ctx: SystemMountContext,\n registry: Record<string, ProviderFactory>,\n): Promise<InstallOutcome> {\n const out: InstallOutcome = { mounted: [], warnings: [] };\n\n if (hasMount(afs, OBS_PATH)) {\n out.warnings.push(`${OBS_PATH}: already mounted — skipped`);\n return out;\n }\n\n // Host-inbox: hidden FS where CLI/system runs land jsonl traces. Node-only.\n let hostInboxMounted = false;\n const hostInboxFactory = registry[\"observability-host-inbox\"];\n if (hostInboxFactory) {\n try {\n const { provider } = await hostInboxFactory.create({\n uri: `fs://system${OBS_HOST_INBOX}`,\n type: \"fs\",\n });\n await (afs as unknown as AFS).mount(provider, OBS_HOST_INBOX, { hidden: true });\n hostInboxMounted = true;\n out.mounted.push(OBS_HOST_INBOX);\n } catch (err) {\n out.warnings.push(`${OBS_HOST_INBOX}: mount failed — ${redactError(err)}`);\n }\n }\n\n // No `observability` factory → this runtime doesn't ship the viewer (e.g. CF\n // today; it's a P5 item). Skip silently — intentional subset, not a failure.\n // Logging a warning here on every createAfsFromEnv was pure noise.\n const factory = registry[\"observability\"];\n if (!factory) return out;\n try {\n await materializeProviderMount({\n afs: afs as unknown as AFS,\n mountPath: OBS_PATH,\n definition: {\n uri: `observability://system${OBS_PATH}`,\n type: \"observability\",\n options: {\n upstream: afs,\n description: \"AI agent observability — jsonl event log viewer\",\n ...(hostInboxMounted ? { hostInboxPath: OBS_HOST_INBOX } : {}),\n },\n },\n factory,\n projectors: [aupResourceProjector],\n scope: \"host\",\n mountOptions: PROJECTION_OVERLAY,\n projectionFailure: \"warn\",\n });\n out.mounted.push(OBS_PATH);\n } catch (err) {\n out.warnings.push(`${OBS_PATH}: mount failed — ${redactError(err)}`);\n }\n\n return out;\n}\n\n// ── messaging ─────────────────────────────────────────────────────────────\n// Two subtrees mirroring daemon.ts:3954/3966. Both providers are node-only\n// (FS inbox + the messaging builtin), so the Node daemon mounts them directly\n// in its own context (it owns `userDataRoot`); this hatch is the shared\n// contract + the path CF would take once it registers messaging keys. When the\n// registry lacks the keys (afs-loader, CF today) it no-ops.\n\nconst MSG_AGENTS = \"/proc/messaging/agents\";\nconst MSG_TOOLS = \"/proc/messaging/tools\";\n\nexport async function messagingInstall(\n afs: AFSRoot,\n _ctx: SystemMountContext,\n registry: Record<string, ProviderFactory>,\n): Promise<InstallOutcome> {\n const out: InstallOutcome = { mounted: [], warnings: [] };\n\n const agentsFactory = registry[\"messaging-agents\"];\n if (agentsFactory && !hasMount(afs, MSG_AGENTS)) {\n try {\n const { provider } = await agentsFactory.create({\n uri: `fs://system${MSG_AGENTS}`,\n type: \"fs\",\n });\n await (afs as unknown as AFS).mount(provider, MSG_AGENTS, PROJECTION_OVERLAY);\n out.mounted.push(MSG_AGENTS);\n } catch (err) {\n out.warnings.push(`${MSG_AGENTS}: mount failed — ${redactError(err)}`);\n }\n }\n\n const toolsFactory = registry[\"messaging-tools\"];\n if (toolsFactory && !hasMount(afs, MSG_TOOLS)) {\n try {\n const { provider } = await toolsFactory.create({\n uri: `messaging-tools://system${MSG_TOOLS}`,\n type: \"messaging-tools\",\n });\n await (afs as unknown as AFS).mount(provider, MSG_TOOLS, PROJECTION_OVERLAY);\n out.mounted.push(MSG_TOOLS);\n } catch (err) {\n out.warnings.push(`${MSG_TOOLS}: mount failed — ${redactError(err)}`);\n }\n }\n\n return out;\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
const require_installers = require('./installers.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/system-mounts/lists.ts
|
|
4
|
+
/**
|
|
5
|
+
* The two single-source-of-truth lists this design produces (design.md §4):
|
|
6
|
+
*
|
|
7
|
+
* - {@link SYSTEM_MOUNTS} — axis A, host-install descriptors.
|
|
8
|
+
* - {@link SMALL_WORLD_PROJECTION} — axis B, which host system mounts each
|
|
9
|
+
* blocklet's small-world session AFS may project.
|
|
10
|
+
*
|
|
11
|
+
* Both are frozen so a downstream consumer that mutates one (push/splice/
|
|
12
|
+
* index-assign) can't corrupt the other runtime's view — the lists are
|
|
13
|
+
* shared module singletons.
|
|
14
|
+
*
|
|
15
|
+
* Phase 0 ships `SMALL_WORLD_PROJECTION` fully populated (pure string data,
|
|
16
|
+
* no logic) and `SYSTEM_MOUNTS` as a frozen empty array. Phase 1 replaces
|
|
17
|
+
* the `SYSTEM_MOUNTS` body with the full descriptor list once the `install`
|
|
18
|
+
* escape-hatch logic exists.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Axis A — the host-install single source of truth. Each runtime materializes
|
|
22
|
+
* the entries whose `providerKey` its registry can build (or whose `install`
|
|
23
|
+
* hatch's dependencies it can satisfy); the rest are skipped silently.
|
|
24
|
+
*
|
|
25
|
+
* Order bands (design.md §4): ash(10) → agent(20) → index(30) → ai(40) →
|
|
26
|
+
* ai-agent(41) → chain(50) → device(60) → observability(70) → messaging(80).
|
|
27
|
+
* `/ash` precedes `/dev/agent` (agent's lazy `runAsh` dep); AI device parent
|
|
28
|
+
* is installed after its hub/local children inside the hatch; the `/dev/ai/agent`
|
|
29
|
+
* exec adapter overlays the `/dev/ai` device (so it is ordered right after it).
|
|
30
|
+
*
|
|
31
|
+
* `/modules/memory` is intentionally absent — it is NOT a host-install (§2.1).
|
|
32
|
+
*
|
|
33
|
+
* Frozen so a downstream consumer can't corrupt the shared list.
|
|
34
|
+
*/
|
|
35
|
+
const SYSTEM_MOUNTS = Object.freeze([
|
|
36
|
+
{
|
|
37
|
+
path: "/ash",
|
|
38
|
+
providerKey: "ash",
|
|
39
|
+
order: 10,
|
|
40
|
+
mountOptions: { allowOverlay: true }
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
path: "/dev/agent",
|
|
44
|
+
providerKey: "agent",
|
|
45
|
+
order: 20,
|
|
46
|
+
dependsOn: ["/ash"],
|
|
47
|
+
mountOptions: { allowOverlay: true }
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
path: "/modules/index",
|
|
51
|
+
providerKey: "index",
|
|
52
|
+
order: 30,
|
|
53
|
+
mountOptions: { allowOverlay: true }
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
path: "/modules/embedding",
|
|
57
|
+
providerKey: "embedding",
|
|
58
|
+
order: 35,
|
|
59
|
+
mountOptions: { allowOverlay: true }
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
path: "/dev/ai",
|
|
63
|
+
order: 40,
|
|
64
|
+
install: require_installers.aiInstall
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
path: "/dev/ai/agent",
|
|
68
|
+
providerKey: "ai-agent",
|
|
69
|
+
order: 41,
|
|
70
|
+
dependsOn: ["/dev/ai", "/dev/agent"],
|
|
71
|
+
mountOptions: { allowOverlay: true }
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
path: "/dev/chain",
|
|
75
|
+
order: 50,
|
|
76
|
+
install: require_installers.chainInstall,
|
|
77
|
+
dependsOn: ["/dev/ai"]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
path: "/dev/ui",
|
|
81
|
+
order: 60,
|
|
82
|
+
install: require_installers.deviceInstall
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
path: "/dev/observability",
|
|
86
|
+
order: 70,
|
|
87
|
+
install: require_installers.observabilityInstall
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
path: "/proc/messaging",
|
|
91
|
+
order: 80,
|
|
92
|
+
install: require_installers.messagingInstall
|
|
93
|
+
}
|
|
94
|
+
]);
|
|
95
|
+
/**
|
|
96
|
+
* Axis B — the small-world projection allow-list (design.md §2.1 / §4).
|
|
97
|
+
* Mirrors the Node daemon's `systemMounts` array (daemon.ts:3812). Each
|
|
98
|
+
* runtime projects only the entries it actually has on its host AFS; missing
|
|
99
|
+
* ones are skipped without error (CF, today, only has `/dev/ai` + `/dev/chain`).
|
|
100
|
+
*
|
|
101
|
+
* `/modules/memory` is **legacy-only**: it is NOT a host-install (see §2.1 —
|
|
102
|
+
* it's the `MEMORY_SCRATCH_ROOT` constant wired by `setAgentMemoryRoot`, not
|
|
103
|
+
* an `afs.mount`), but it stays in the projection so older blocklets can keep
|
|
104
|
+
* reading legacy scratch until a dedicated cleanup.
|
|
105
|
+
*/
|
|
106
|
+
const SMALL_WORLD_PROJECTION = Object.freeze([
|
|
107
|
+
"/ash",
|
|
108
|
+
"/dev/ai",
|
|
109
|
+
"/dev/agent",
|
|
110
|
+
"/dev/ui",
|
|
111
|
+
"/dev/web",
|
|
112
|
+
"/dev/chain",
|
|
113
|
+
"/dev/observability",
|
|
114
|
+
"/modules/index",
|
|
115
|
+
"/modules/embedding",
|
|
116
|
+
"/proc/messaging",
|
|
117
|
+
"/modules/memory"
|
|
118
|
+
]);
|
|
119
|
+
|
|
120
|
+
//#endregion
|
|
121
|
+
exports.SMALL_WORLD_PROJECTION = SMALL_WORLD_PROJECTION;
|
|
122
|
+
exports.SYSTEM_MOUNTS = SYSTEM_MOUNTS;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SmallWorldProjection, SystemMountDescriptor } from "./types.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/system-mounts/lists.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Axis A — the host-install single source of truth. Each runtime materializes
|
|
6
|
+
* the entries whose `providerKey` its registry can build (or whose `install`
|
|
7
|
+
* hatch's dependencies it can satisfy); the rest are skipped silently.
|
|
8
|
+
*
|
|
9
|
+
* Order bands (design.md §4): ash(10) → agent(20) → index(30) → ai(40) →
|
|
10
|
+
* ai-agent(41) → chain(50) → device(60) → observability(70) → messaging(80).
|
|
11
|
+
* `/ash` precedes `/dev/agent` (agent's lazy `runAsh` dep); AI device parent
|
|
12
|
+
* is installed after its hub/local children inside the hatch; the `/dev/ai/agent`
|
|
13
|
+
* exec adapter overlays the `/dev/ai` device (so it is ordered right after it).
|
|
14
|
+
*
|
|
15
|
+
* `/modules/memory` is intentionally absent — it is NOT a host-install (§2.1).
|
|
16
|
+
*
|
|
17
|
+
* Frozen so a downstream consumer can't corrupt the shared list.
|
|
18
|
+
*/
|
|
19
|
+
declare const SYSTEM_MOUNTS: readonly SystemMountDescriptor[];
|
|
20
|
+
/**
|
|
21
|
+
* Axis B — the small-world projection allow-list (design.md §2.1 / §4).
|
|
22
|
+
* Mirrors the Node daemon's `systemMounts` array (daemon.ts:3812). Each
|
|
23
|
+
* runtime projects only the entries it actually has on its host AFS; missing
|
|
24
|
+
* ones are skipped without error (CF, today, only has `/dev/ai` + `/dev/chain`).
|
|
25
|
+
*
|
|
26
|
+
* `/modules/memory` is **legacy-only**: it is NOT a host-install (see §2.1 —
|
|
27
|
+
* it's the `MEMORY_SCRATCH_ROOT` constant wired by `setAgentMemoryRoot`, not
|
|
28
|
+
* an `afs.mount`), but it stays in the projection so older blocklets can keep
|
|
29
|
+
* reading legacy scratch until a dedicated cleanup.
|
|
30
|
+
*/
|
|
31
|
+
declare const SMALL_WORLD_PROJECTION: SmallWorldProjection;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { SMALL_WORLD_PROJECTION, SYSTEM_MOUNTS };
|
|
34
|
+
//# sourceMappingURL=lists.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists.d.cts","names":[],"sources":["../../src/system-mounts/lists.ts"],"mappings":";;;;;;;;;;;;;;;;;;cAyCa,aAAA,WAAwB,qBAAA;;;;;;;;;;;;cA0DxB,sBAAA,EAAwB,oBAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SmallWorldProjection, SystemMountDescriptor } from "./types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/system-mounts/lists.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Axis A — the host-install single source of truth. Each runtime materializes
|
|
6
|
+
* the entries whose `providerKey` its registry can build (or whose `install`
|
|
7
|
+
* hatch's dependencies it can satisfy); the rest are skipped silently.
|
|
8
|
+
*
|
|
9
|
+
* Order bands (design.md §4): ash(10) → agent(20) → index(30) → ai(40) →
|
|
10
|
+
* ai-agent(41) → chain(50) → device(60) → observability(70) → messaging(80).
|
|
11
|
+
* `/ash` precedes `/dev/agent` (agent's lazy `runAsh` dep); AI device parent
|
|
12
|
+
* is installed after its hub/local children inside the hatch; the `/dev/ai/agent`
|
|
13
|
+
* exec adapter overlays the `/dev/ai` device (so it is ordered right after it).
|
|
14
|
+
*
|
|
15
|
+
* `/modules/memory` is intentionally absent — it is NOT a host-install (§2.1).
|
|
16
|
+
*
|
|
17
|
+
* Frozen so a downstream consumer can't corrupt the shared list.
|
|
18
|
+
*/
|
|
19
|
+
declare const SYSTEM_MOUNTS: readonly SystemMountDescriptor[];
|
|
20
|
+
/**
|
|
21
|
+
* Axis B — the small-world projection allow-list (design.md §2.1 / §4).
|
|
22
|
+
* Mirrors the Node daemon's `systemMounts` array (daemon.ts:3812). Each
|
|
23
|
+
* runtime projects only the entries it actually has on its host AFS; missing
|
|
24
|
+
* ones are skipped without error (CF, today, only has `/dev/ai` + `/dev/chain`).
|
|
25
|
+
*
|
|
26
|
+
* `/modules/memory` is **legacy-only**: it is NOT a host-install (see §2.1 —
|
|
27
|
+
* it's the `MEMORY_SCRATCH_ROOT` constant wired by `setAgentMemoryRoot`, not
|
|
28
|
+
* an `afs.mount`), but it stays in the projection so older blocklets can keep
|
|
29
|
+
* reading legacy scratch until a dedicated cleanup.
|
|
30
|
+
*/
|
|
31
|
+
declare const SMALL_WORLD_PROJECTION: SmallWorldProjection;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { SMALL_WORLD_PROJECTION, SYSTEM_MOUNTS };
|
|
34
|
+
//# sourceMappingURL=lists.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists.d.mts","names":[],"sources":["../../src/system-mounts/lists.ts"],"mappings":";;;;;;;;;;;;;;;;;;cAyCa,aAAA,WAAwB,qBAAA;;;;;;;;;;;;cA0DxB,sBAAA,EAAwB,oBAAA"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { aiInstall, chainInstall, deviceInstall, messagingInstall, observabilityInstall } from "./installers.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/system-mounts/lists.ts
|
|
4
|
+
/**
|
|
5
|
+
* The two single-source-of-truth lists this design produces (design.md §4):
|
|
6
|
+
*
|
|
7
|
+
* - {@link SYSTEM_MOUNTS} — axis A, host-install descriptors.
|
|
8
|
+
* - {@link SMALL_WORLD_PROJECTION} — axis B, which host system mounts each
|
|
9
|
+
* blocklet's small-world session AFS may project.
|
|
10
|
+
*
|
|
11
|
+
* Both are frozen so a downstream consumer that mutates one (push/splice/
|
|
12
|
+
* index-assign) can't corrupt the other runtime's view — the lists are
|
|
13
|
+
* shared module singletons.
|
|
14
|
+
*
|
|
15
|
+
* Phase 0 ships `SMALL_WORLD_PROJECTION` fully populated (pure string data,
|
|
16
|
+
* no logic) and `SYSTEM_MOUNTS` as a frozen empty array. Phase 1 replaces
|
|
17
|
+
* the `SYSTEM_MOUNTS` body with the full descriptor list once the `install`
|
|
18
|
+
* escape-hatch logic exists.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Axis A — the host-install single source of truth. Each runtime materializes
|
|
22
|
+
* the entries whose `providerKey` its registry can build (or whose `install`
|
|
23
|
+
* hatch's dependencies it can satisfy); the rest are skipped silently.
|
|
24
|
+
*
|
|
25
|
+
* Order bands (design.md §4): ash(10) → agent(20) → index(30) → ai(40) →
|
|
26
|
+
* ai-agent(41) → chain(50) → device(60) → observability(70) → messaging(80).
|
|
27
|
+
* `/ash` precedes `/dev/agent` (agent's lazy `runAsh` dep); AI device parent
|
|
28
|
+
* is installed after its hub/local children inside the hatch; the `/dev/ai/agent`
|
|
29
|
+
* exec adapter overlays the `/dev/ai` device (so it is ordered right after it).
|
|
30
|
+
*
|
|
31
|
+
* `/modules/memory` is intentionally absent — it is NOT a host-install (§2.1).
|
|
32
|
+
*
|
|
33
|
+
* Frozen so a downstream consumer can't corrupt the shared list.
|
|
34
|
+
*/
|
|
35
|
+
const SYSTEM_MOUNTS = Object.freeze([
|
|
36
|
+
{
|
|
37
|
+
path: "/ash",
|
|
38
|
+
providerKey: "ash",
|
|
39
|
+
order: 10,
|
|
40
|
+
mountOptions: { allowOverlay: true }
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
path: "/dev/agent",
|
|
44
|
+
providerKey: "agent",
|
|
45
|
+
order: 20,
|
|
46
|
+
dependsOn: ["/ash"],
|
|
47
|
+
mountOptions: { allowOverlay: true }
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
path: "/modules/index",
|
|
51
|
+
providerKey: "index",
|
|
52
|
+
order: 30,
|
|
53
|
+
mountOptions: { allowOverlay: true }
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
path: "/modules/embedding",
|
|
57
|
+
providerKey: "embedding",
|
|
58
|
+
order: 35,
|
|
59
|
+
mountOptions: { allowOverlay: true }
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
path: "/dev/ai",
|
|
63
|
+
order: 40,
|
|
64
|
+
install: aiInstall
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
path: "/dev/ai/agent",
|
|
68
|
+
providerKey: "ai-agent",
|
|
69
|
+
order: 41,
|
|
70
|
+
dependsOn: ["/dev/ai", "/dev/agent"],
|
|
71
|
+
mountOptions: { allowOverlay: true }
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
path: "/dev/chain",
|
|
75
|
+
order: 50,
|
|
76
|
+
install: chainInstall,
|
|
77
|
+
dependsOn: ["/dev/ai"]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
path: "/dev/ui",
|
|
81
|
+
order: 60,
|
|
82
|
+
install: deviceInstall
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
path: "/dev/observability",
|
|
86
|
+
order: 70,
|
|
87
|
+
install: observabilityInstall
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
path: "/proc/messaging",
|
|
91
|
+
order: 80,
|
|
92
|
+
install: messagingInstall
|
|
93
|
+
}
|
|
94
|
+
]);
|
|
95
|
+
/**
|
|
96
|
+
* Axis B — the small-world projection allow-list (design.md §2.1 / §4).
|
|
97
|
+
* Mirrors the Node daemon's `systemMounts` array (daemon.ts:3812). Each
|
|
98
|
+
* runtime projects only the entries it actually has on its host AFS; missing
|
|
99
|
+
* ones are skipped without error (CF, today, only has `/dev/ai` + `/dev/chain`).
|
|
100
|
+
*
|
|
101
|
+
* `/modules/memory` is **legacy-only**: it is NOT a host-install (see §2.1 —
|
|
102
|
+
* it's the `MEMORY_SCRATCH_ROOT` constant wired by `setAgentMemoryRoot`, not
|
|
103
|
+
* an `afs.mount`), but it stays in the projection so older blocklets can keep
|
|
104
|
+
* reading legacy scratch until a dedicated cleanup.
|
|
105
|
+
*/
|
|
106
|
+
const SMALL_WORLD_PROJECTION = Object.freeze([
|
|
107
|
+
"/ash",
|
|
108
|
+
"/dev/ai",
|
|
109
|
+
"/dev/agent",
|
|
110
|
+
"/dev/ui",
|
|
111
|
+
"/dev/web",
|
|
112
|
+
"/dev/chain",
|
|
113
|
+
"/dev/observability",
|
|
114
|
+
"/modules/index",
|
|
115
|
+
"/modules/embedding",
|
|
116
|
+
"/proc/messaging",
|
|
117
|
+
"/modules/memory"
|
|
118
|
+
]);
|
|
119
|
+
|
|
120
|
+
//#endregion
|
|
121
|
+
export { SMALL_WORLD_PROJECTION, SYSTEM_MOUNTS };
|
|
122
|
+
//# sourceMappingURL=lists.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists.mjs","names":[],"sources":["../../src/system-mounts/lists.ts"],"sourcesContent":["/**\n * The two single-source-of-truth lists this design produces (design.md §4):\n *\n * - {@link SYSTEM_MOUNTS} — axis A, host-install descriptors.\n * - {@link SMALL_WORLD_PROJECTION} — axis B, which host system mounts each\n * blocklet's small-world session AFS may project.\n *\n * Both are frozen so a downstream consumer that mutates one (push/splice/\n * index-assign) can't corrupt the other runtime's view — the lists are\n * shared module singletons.\n *\n * Phase 0 ships `SMALL_WORLD_PROJECTION` fully populated (pure string data,\n * no logic) and `SYSTEM_MOUNTS` as a frozen empty array. Phase 1 replaces\n * the `SYSTEM_MOUNTS` body with the full descriptor list once the `install`\n * escape-hatch logic exists.\n */\n\nimport {\n aiInstall,\n chainInstall,\n deviceInstall,\n messagingInstall,\n observabilityInstall,\n} from \"./installers.js\";\nimport type { SmallWorldProjection, SystemMountDescriptor } from \"./types.js\";\n\n/**\n * Axis A — the host-install single source of truth. Each runtime materializes\n * the entries whose `providerKey` its registry can build (or whose `install`\n * hatch's dependencies it can satisfy); the rest are skipped silently.\n *\n * Order bands (design.md §4): ash(10) → agent(20) → index(30) → ai(40) →\n * ai-agent(41) → chain(50) → device(60) → observability(70) → messaging(80).\n * `/ash` precedes `/dev/agent` (agent's lazy `runAsh` dep); AI device parent\n * is installed after its hub/local children inside the hatch; the `/dev/ai/agent`\n * exec adapter overlays the `/dev/ai` device (so it is ordered right after it).\n *\n * `/modules/memory` is intentionally absent — it is NOT a host-install (§2.1).\n *\n * Frozen so a downstream consumer can't corrupt the shared list.\n */\nexport const SYSTEM_MOUNTS: readonly SystemMountDescriptor[] = Object.freeze([\n { path: \"/ash\", providerKey: \"ash\", order: 10, mountOptions: { allowOverlay: true } },\n {\n path: \"/dev/agent\",\n providerKey: \"agent\",\n order: 20,\n dependsOn: [\"/ash\"],\n mountOptions: { allowOverlay: true },\n },\n { path: \"/modules/index\", providerKey: \"index\", order: 30, mountOptions: { allowOverlay: true } },\n // Local embedding provider — order 35 so it is mounted BEFORE the `/dev/ai`\n // hatch (40), which projects `/modules/embedding` → `/dev/ai/local/embedding`.\n // A runtime whose registry has no `embedding` factory (CF uses workers-ai)\n // skips this silently, and the projection then no-ops.\n {\n path: \"/modules/embedding\",\n providerKey: \"embedding\",\n order: 35,\n mountOptions: { allowOverlay: true },\n },\n // Composite: device parent + legacy/compat projections (design §4.1).\n { path: \"/dev/ai\", order: 40, install: aiInstall },\n // Agent-run exec adapter (@aigne/afs-ai-agent): exposes `.actions/run` +\n // `.actions/run-code` that agent-handler.ts dispatches for the generic chat\n // surface. It overlays the readonly `/dev/ai` device, so it MUST be ordered\n // after it (41 > 40) and mounted with `allowOverlay`. Without this mount the\n // handler's `/dev/ai/agent/.actions/run` exec falls through to the readonly\n // `/dev/ai` device → \"Cannot exec on a readonly provider\" (issue #1390). A\n // runtime whose registry lacks the `ai-agent` key skips it silently.\n {\n path: \"/dev/ai/agent\",\n providerKey: \"ai-agent\",\n order: 41,\n dependsOn: [\"/dev/ai\", \"/dev/agent\"],\n mountOptions: { allowOverlay: true },\n },\n // Composite: per-network OCAP mounts + AUP; chain config errors stay fatal.\n { path: \"/dev/chain\", order: 50, install: chainInstall, dependsOn: [\"/dev/ai\"] },\n // Composite: /dev/ui + /dev/web projections, conditional on /ui + /web.\n { path: \"/dev/ui\", order: 60, install: deviceInstall },\n // Composite: viewer (+ optional node-only host-inbox).\n { path: \"/dev/observability\", order: 70, install: observabilityInstall },\n // Composite: /proc/messaging/agents + /proc/messaging/tools (node-only; the\n // Node daemon mounts these in its own context — this is the shared contract).\n { path: \"/proc/messaging\", order: 80, install: messagingInstall },\n]);\n\n/**\n * Axis B — the small-world projection allow-list (design.md §2.1 / §4).\n * Mirrors the Node daemon's `systemMounts` array (daemon.ts:3812). Each\n * runtime projects only the entries it actually has on its host AFS; missing\n * ones are skipped without error (CF, today, only has `/dev/ai` + `/dev/chain`).\n *\n * `/modules/memory` is **legacy-only**: it is NOT a host-install (see §2.1 —\n * it's the `MEMORY_SCRATCH_ROOT` constant wired by `setAgentMemoryRoot`, not\n * an `afs.mount`), but it stays in the projection so older blocklets can keep\n * reading legacy scratch until a dedicated cleanup.\n */\nexport const SMALL_WORLD_PROJECTION: SmallWorldProjection = Object.freeze([\n \"/ash\",\n \"/dev/ai\",\n \"/dev/agent\",\n \"/dev/ui\",\n \"/dev/web\",\n \"/dev/chain\",\n \"/dev/observability\",\n \"/modules/index\",\n \"/modules/embedding\",\n \"/proc/messaging\",\n \"/modules/memory\",\n]);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,MAAa,gBAAkD,OAAO,OAAO;CAC3E;EAAE,MAAM;EAAQ,aAAa;EAAO,OAAO;EAAI,cAAc,EAAE,cAAc,MAAM;EAAE;CACrF;EACE,MAAM;EACN,aAAa;EACb,OAAO;EACP,WAAW,CAAC,OAAO;EACnB,cAAc,EAAE,cAAc,MAAM;EACrC;CACD;EAAE,MAAM;EAAkB,aAAa;EAAS,OAAO;EAAI,cAAc,EAAE,cAAc,MAAM;EAAE;CAKjG;EACE,MAAM;EACN,aAAa;EACb,OAAO;EACP,cAAc,EAAE,cAAc,MAAM;EACrC;CAED;EAAE,MAAM;EAAW,OAAO;EAAI,SAAS;EAAW;CAQlD;EACE,MAAM;EACN,aAAa;EACb,OAAO;EACP,WAAW,CAAC,WAAW,aAAa;EACpC,cAAc,EAAE,cAAc,MAAM;EACrC;CAED;EAAE,MAAM;EAAc,OAAO;EAAI,SAAS;EAAc,WAAW,CAAC,UAAU;EAAE;CAEhF;EAAE,MAAM;EAAW,OAAO;EAAI,SAAS;EAAe;CAEtD;EAAE,MAAM;EAAsB,OAAO;EAAI,SAAS;EAAsB;CAGxE;EAAE,MAAM;EAAmB,OAAO;EAAI,SAAS;EAAkB;CAClE,CAAC;;;;;;;;;;;;AAaF,MAAa,yBAA+C,OAAO,OAAO;CACxE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { ProviderFactory } from "../mount/types.cjs";
|
|
2
|
+
import { AFSRoot, MountOptions } from "@aigne/afs";
|
|
3
|
+
|
|
4
|
+
//#region src/system-mounts/types.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Runtime-supplied context threaded into descriptor callbacks (`options`,
|
|
7
|
+
* `conditional`, `install`). Lets a descriptor resolve provider options that
|
|
8
|
+
* depend on the live AFS (e.g. detect a `/user` mount) or runtime-specific
|
|
9
|
+
* roots without baking runtime assumptions into the shared list.
|
|
10
|
+
*
|
|
11
|
+
* The shape is intentionally open (`[key: string]: unknown`) — runtimes add
|
|
12
|
+
* their own fields (Node passes `configMountPaths`, a future CF context may
|
|
13
|
+
* pass D1 bindings) and descriptor callbacks read only what they need.
|
|
14
|
+
*/
|
|
15
|
+
interface SystemMountContext {
|
|
16
|
+
/**
|
|
17
|
+
* The global/host AFS the mounts are being installed onto. Same instance
|
|
18
|
+
* passed to {@link installSystemMounts}'s first argument; re-exposed here
|
|
19
|
+
* so `options`/`conditional`/`install` callbacks can inspect existing
|
|
20
|
+
* mounts (e.g. `conditional: (ctx) => hasMount(ctx.afs, "/ui")`).
|
|
21
|
+
*/
|
|
22
|
+
afs: AFSRoot;
|
|
23
|
+
/**
|
|
24
|
+
* Config-declared mount paths already applied to `afs` before system
|
|
25
|
+
* mounts run. Node's `setupSystemAIMounts` uses this to detect legacy
|
|
26
|
+
* `/modules/aignehub` hub mounts; CF may pass `[]`.
|
|
27
|
+
*/
|
|
28
|
+
configMountPaths?: string[];
|
|
29
|
+
/** Runtime-specific extensions (D1 bindings, user-space roots, …). */
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The result of installing one descriptor (or the whole list). `mounted`
|
|
34
|
+
* lists every path actually mounted (including supplement/companion mounts
|
|
35
|
+
* an `install` hatch adds); `warnings` collects non-fatal failures so the
|
|
36
|
+
* caller can log them without aborting siblings.
|
|
37
|
+
*/
|
|
38
|
+
interface InstallOutcome {
|
|
39
|
+
/** Paths newly mounted by this descriptor. */
|
|
40
|
+
mounted: string[];
|
|
41
|
+
/** Non-fatal failures (e.g. provider package missing). */
|
|
42
|
+
warnings: string[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A single system-mount declaration. The common case is
|
|
46
|
+
* `{ path, providerKey, order }` — the driver looks `providerKey` up in the
|
|
47
|
+
* per-runtime registry and materializes it. Multi-step mounts (AI compat
|
|
48
|
+
* projections, chain builtins + AUP, observability host-inbox, messaging's
|
|
49
|
+
* two subtrees) use the {@link SystemMountDescriptor.install} escape hatch.
|
|
50
|
+
*
|
|
51
|
+
* @see design.md §4 / §4.1
|
|
52
|
+
*/
|
|
53
|
+
interface SystemMountDescriptor {
|
|
54
|
+
/** Absolute host-install path, e.g. `"/dev/agent"`. Must start with `/`. */
|
|
55
|
+
path: string;
|
|
56
|
+
/**
|
|
57
|
+
* Registry key the driver looks up to construct the provider, e.g.
|
|
58
|
+
* `"agent"`, `"ocap"`. Ignored when {@link install} is supplied.
|
|
59
|
+
* Optional only when `install` is present (a composite installer owns its
|
|
60
|
+
* own construction).
|
|
61
|
+
*/
|
|
62
|
+
providerKey?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Provider options. Either a literal object or a function of the
|
|
65
|
+
* {@link SystemMountContext} (for options that depend on the live AFS,
|
|
66
|
+
* e.g. wiring `userSpaceRoot: "/user"` only when `/user` is mounted).
|
|
67
|
+
*/
|
|
68
|
+
options?: Record<string, unknown> | ((ctx: SystemMountContext) => Record<string, unknown>);
|
|
69
|
+
/**
|
|
70
|
+
* Install order. Lower runs first. Encodes the ordering constraints from
|
|
71
|
+
* the Node setup group — `/ash` before `/dev/agent`, AI hub children
|
|
72
|
+
* before the `/dev/ai` device parent, etc. See design.md §4 for the
|
|
73
|
+
* canonical order band assignments.
|
|
74
|
+
*/
|
|
75
|
+
order: number;
|
|
76
|
+
/**
|
|
77
|
+
* Declarative dependency paths this mount needs in place first. Advisory
|
|
78
|
+
* metadata for documentation/diagnostics; the driver enforces actual
|
|
79
|
+
* ordering via {@link order}.
|
|
80
|
+
*/
|
|
81
|
+
dependsOn?: string[];
|
|
82
|
+
/**
|
|
83
|
+
* Predicate gating whether this descriptor installs at all. Returning
|
|
84
|
+
* `false` skips the mount (not an error). Example: `/dev/ui` only when its
|
|
85
|
+
* source `/ui` mount exists.
|
|
86
|
+
*/
|
|
87
|
+
conditional?: (ctx: SystemMountContext) => boolean;
|
|
88
|
+
/** Forwarded to `afs.mount()` for the data provider (allowOverlay/hidden). */
|
|
89
|
+
mountOptions?: MountOptions;
|
|
90
|
+
/**
|
|
91
|
+
* Strategy when AUP/companion-resource projection fails. `"warn"` keeps the
|
|
92
|
+
* data mount and logs (host-scope default); `"rollback"` unmounts. Mirrors
|
|
93
|
+
* the materializer's `projectionFailure`.
|
|
94
|
+
*/
|
|
95
|
+
projectionFailure?: "warn" | "rollback";
|
|
96
|
+
/**
|
|
97
|
+
* Escape hatch for composite mounts that a single
|
|
98
|
+
* `path`+`providerKey`+`options` can't express (multi-mount subtrees,
|
|
99
|
+
* legacy-alias projections, validate-then-mount, …). When present the
|
|
100
|
+
* driver calls this INSTEAD of the default materialize path and ignores
|
|
101
|
+
* {@link providerKey}. The installer receives the host AFS, the context,
|
|
102
|
+
* and the runtime registry (so it can reuse registered factories), and
|
|
103
|
+
* returns what it mounted + any warnings.
|
|
104
|
+
*
|
|
105
|
+
* The escape hatch does not break "divergence = data": `install` is still
|
|
106
|
+
* one entry in the shared list. A runtime whose registry lacks the keys
|
|
107
|
+
* the installer needs simply has the installer skip those sub-mounts.
|
|
108
|
+
*
|
|
109
|
+
* @see design.md §4.1
|
|
110
|
+
*/
|
|
111
|
+
install?: (afs: AFSRoot, ctx: SystemMountContext, registry: Record<string, ProviderFactory>) => Promise<InstallOutcome>;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Axis B: the set of host system-mount path prefixes each blocklet's
|
|
115
|
+
* small-world session AFS should project from the global AFS. A readonly
|
|
116
|
+
* string list — pure data, no executable callbacks, no injection surface.
|
|
117
|
+
*
|
|
118
|
+
* Each runtime projects only the entries that actually exist on its host
|
|
119
|
+
* AFS (missing ones are skipped, not errored). See design.md §2.1 / §4.
|
|
120
|
+
*/
|
|
121
|
+
type SmallWorldProjection = readonly string[];
|
|
122
|
+
//#endregion
|
|
123
|
+
export { InstallOutcome, SmallWorldProjection, SystemMountContext, SystemMountDescriptor };
|
|
124
|
+
//# sourceMappingURL=types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/system-mounts/types.ts"],"mappings":";;;;;;;;;;;;;;UAkCiB,kBAAA;EAgHH;;;;;;EAzGZ,GAAA,EAAK,OAAA;EAoDiC;;;;;EA7CtC,gBAAA;EAmEe;EAAA,CAhEd,GAAA;AAAA;;;;;;;UASc,cAAA;EAqFY;EAnF3B,OAAA;EAoFK;EAlFL,QAAA;AAAA;;AA6FF;;;;;;;;UAjFiB,qBAAA;;EAEf,IAAA;;;;;;;EAQA,WAAA;;;;;;EAOA,OAAA,GAAU,MAAA,sBAA4B,GAAA,EAAK,kBAAA,KAAuB,MAAA;;;;;;;EAQlE,KAAA;;;;;;EAOA,SAAA;;;;;;EAOA,WAAA,IAAe,GAAA,EAAK,kBAAA;;EAGpB,YAAA,GAAe,YAAA;;;;;;EAOf,iBAAA;;;;;;;;;;;;;;;;EAiBA,OAAA,IACE,GAAA,EAAK,OAAA,EACL,GAAA,EAAK,kBAAA,EACL,QAAA,EAAU,MAAA,SAAe,eAAA,MACtB,OAAA,CAAQ,cAAA;AAAA;;;;;;;;;KAWH,oBAAA"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { ProviderFactory } from "../mount/types.mjs";
|
|
2
|
+
import "../mount/index.mjs";
|
|
3
|
+
import { AFSRoot, MountOptions } from "@aigne/afs";
|
|
4
|
+
|
|
5
|
+
//#region src/system-mounts/types.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Runtime-supplied context threaded into descriptor callbacks (`options`,
|
|
8
|
+
* `conditional`, `install`). Lets a descriptor resolve provider options that
|
|
9
|
+
* depend on the live AFS (e.g. detect a `/user` mount) or runtime-specific
|
|
10
|
+
* roots without baking runtime assumptions into the shared list.
|
|
11
|
+
*
|
|
12
|
+
* The shape is intentionally open (`[key: string]: unknown`) — runtimes add
|
|
13
|
+
* their own fields (Node passes `configMountPaths`, a future CF context may
|
|
14
|
+
* pass D1 bindings) and descriptor callbacks read only what they need.
|
|
15
|
+
*/
|
|
16
|
+
interface SystemMountContext {
|
|
17
|
+
/**
|
|
18
|
+
* The global/host AFS the mounts are being installed onto. Same instance
|
|
19
|
+
* passed to {@link installSystemMounts}'s first argument; re-exposed here
|
|
20
|
+
* so `options`/`conditional`/`install` callbacks can inspect existing
|
|
21
|
+
* mounts (e.g. `conditional: (ctx) => hasMount(ctx.afs, "/ui")`).
|
|
22
|
+
*/
|
|
23
|
+
afs: AFSRoot;
|
|
24
|
+
/**
|
|
25
|
+
* Config-declared mount paths already applied to `afs` before system
|
|
26
|
+
* mounts run. Node's `setupSystemAIMounts` uses this to detect legacy
|
|
27
|
+
* `/modules/aignehub` hub mounts; CF may pass `[]`.
|
|
28
|
+
*/
|
|
29
|
+
configMountPaths?: string[];
|
|
30
|
+
/** Runtime-specific extensions (D1 bindings, user-space roots, …). */
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The result of installing one descriptor (or the whole list). `mounted`
|
|
35
|
+
* lists every path actually mounted (including supplement/companion mounts
|
|
36
|
+
* an `install` hatch adds); `warnings` collects non-fatal failures so the
|
|
37
|
+
* caller can log them without aborting siblings.
|
|
38
|
+
*/
|
|
39
|
+
interface InstallOutcome {
|
|
40
|
+
/** Paths newly mounted by this descriptor. */
|
|
41
|
+
mounted: string[];
|
|
42
|
+
/** Non-fatal failures (e.g. provider package missing). */
|
|
43
|
+
warnings: string[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* A single system-mount declaration. The common case is
|
|
47
|
+
* `{ path, providerKey, order }` — the driver looks `providerKey` up in the
|
|
48
|
+
* per-runtime registry and materializes it. Multi-step mounts (AI compat
|
|
49
|
+
* projections, chain builtins + AUP, observability host-inbox, messaging's
|
|
50
|
+
* two subtrees) use the {@link SystemMountDescriptor.install} escape hatch.
|
|
51
|
+
*
|
|
52
|
+
* @see design.md §4 / §4.1
|
|
53
|
+
*/
|
|
54
|
+
interface SystemMountDescriptor {
|
|
55
|
+
/** Absolute host-install path, e.g. `"/dev/agent"`. Must start with `/`. */
|
|
56
|
+
path: string;
|
|
57
|
+
/**
|
|
58
|
+
* Registry key the driver looks up to construct the provider, e.g.
|
|
59
|
+
* `"agent"`, `"ocap"`. Ignored when {@link install} is supplied.
|
|
60
|
+
* Optional only when `install` is present (a composite installer owns its
|
|
61
|
+
* own construction).
|
|
62
|
+
*/
|
|
63
|
+
providerKey?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Provider options. Either a literal object or a function of the
|
|
66
|
+
* {@link SystemMountContext} (for options that depend on the live AFS,
|
|
67
|
+
* e.g. wiring `userSpaceRoot: "/user"` only when `/user` is mounted).
|
|
68
|
+
*/
|
|
69
|
+
options?: Record<string, unknown> | ((ctx: SystemMountContext) => Record<string, unknown>);
|
|
70
|
+
/**
|
|
71
|
+
* Install order. Lower runs first. Encodes the ordering constraints from
|
|
72
|
+
* the Node setup group — `/ash` before `/dev/agent`, AI hub children
|
|
73
|
+
* before the `/dev/ai` device parent, etc. See design.md §4 for the
|
|
74
|
+
* canonical order band assignments.
|
|
75
|
+
*/
|
|
76
|
+
order: number;
|
|
77
|
+
/**
|
|
78
|
+
* Declarative dependency paths this mount needs in place first. Advisory
|
|
79
|
+
* metadata for documentation/diagnostics; the driver enforces actual
|
|
80
|
+
* ordering via {@link order}.
|
|
81
|
+
*/
|
|
82
|
+
dependsOn?: string[];
|
|
83
|
+
/**
|
|
84
|
+
* Predicate gating whether this descriptor installs at all. Returning
|
|
85
|
+
* `false` skips the mount (not an error). Example: `/dev/ui` only when its
|
|
86
|
+
* source `/ui` mount exists.
|
|
87
|
+
*/
|
|
88
|
+
conditional?: (ctx: SystemMountContext) => boolean;
|
|
89
|
+
/** Forwarded to `afs.mount()` for the data provider (allowOverlay/hidden). */
|
|
90
|
+
mountOptions?: MountOptions;
|
|
91
|
+
/**
|
|
92
|
+
* Strategy when AUP/companion-resource projection fails. `"warn"` keeps the
|
|
93
|
+
* data mount and logs (host-scope default); `"rollback"` unmounts. Mirrors
|
|
94
|
+
* the materializer's `projectionFailure`.
|
|
95
|
+
*/
|
|
96
|
+
projectionFailure?: "warn" | "rollback";
|
|
97
|
+
/**
|
|
98
|
+
* Escape hatch for composite mounts that a single
|
|
99
|
+
* `path`+`providerKey`+`options` can't express (multi-mount subtrees,
|
|
100
|
+
* legacy-alias projections, validate-then-mount, …). When present the
|
|
101
|
+
* driver calls this INSTEAD of the default materialize path and ignores
|
|
102
|
+
* {@link providerKey}. The installer receives the host AFS, the context,
|
|
103
|
+
* and the runtime registry (so it can reuse registered factories), and
|
|
104
|
+
* returns what it mounted + any warnings.
|
|
105
|
+
*
|
|
106
|
+
* The escape hatch does not break "divergence = data": `install` is still
|
|
107
|
+
* one entry in the shared list. A runtime whose registry lacks the keys
|
|
108
|
+
* the installer needs simply has the installer skip those sub-mounts.
|
|
109
|
+
*
|
|
110
|
+
* @see design.md §4.1
|
|
111
|
+
*/
|
|
112
|
+
install?: (afs: AFSRoot, ctx: SystemMountContext, registry: Record<string, ProviderFactory>) => Promise<InstallOutcome>;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Axis B: the set of host system-mount path prefixes each blocklet's
|
|
116
|
+
* small-world session AFS should project from the global AFS. A readonly
|
|
117
|
+
* string list — pure data, no executable callbacks, no injection surface.
|
|
118
|
+
*
|
|
119
|
+
* Each runtime projects only the entries that actually exist on its host
|
|
120
|
+
* AFS (missing ones are skipped, not errored). See design.md §2.1 / §4.
|
|
121
|
+
*/
|
|
122
|
+
type SmallWorldProjection = readonly string[];
|
|
123
|
+
//#endregion
|
|
124
|
+
export { InstallOutcome, SmallWorldProjection, SystemMountContext, SystemMountDescriptor };
|
|
125
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/system-mounts/types.ts"],"mappings":";;;;;;;;;;;;;;;UAkCiB,kBAAA;EAgHV;;;;;;EAzGL,GAAA,EAAK,OAAA;EAoDsC;;;;;EA7C3C,gBAAA;EAmEoB;EAAA,CAhEnB,GAAA;AAAA;;;;;;;UASc,cAAA;EAqFH;EAnFZ,OAAA;EAmFE;EAjFF,QAAA;AAAA;;;AA6FF;;;;;;;UAjFiB,qBAAA;;EAEf,IAAA;;;;;;;EAQA,WAAA;;;;;;EAOA,OAAA,GAAU,MAAA,sBAA4B,GAAA,EAAK,kBAAA,KAAuB,MAAA;;;;;;;EAQlE,KAAA;;;;;;EAOA,SAAA;;;;;;EAOA,WAAA,IAAe,GAAA,EAAK,kBAAA;;EAGpB,YAAA,GAAe,YAAA;;;;;;EAOf,iBAAA;;;;;;;;;;;;;;;;EAiBA,OAAA,IACE,GAAA,EAAK,OAAA,EACL,GAAA,EAAK,kBAAA,EACL,QAAA,EAAU,MAAA,SAAe,eAAA,MACtB,OAAA,CAAQ,cAAA;AAAA;;;;;;;;;KAWH,oBAAA"}
|