amalgm 0.1.265 → 0.1.267-main.34182640231
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/PURPOSE.md +1096 -0
- package/README.md +159 -73
- package/config/releases/trust/runtime/main.root.json +84 -0
- package/config/releases/trust/runtime/preview.root.json +84 -0
- package/dist/authorization/device-key.d.ts +19 -0
- package/dist/authorization/device-key.js +81 -0
- package/dist/authorization/device-key.js.map +1 -0
- package/dist/authorization/index.d.ts +65 -0
- package/dist/authorization/index.js +63 -0
- package/dist/authorization/index.js.map +1 -0
- package/dist/authorization/issuer.d.ts +11 -0
- package/dist/authorization/issuer.js +76 -0
- package/dist/authorization/issuer.js.map +1 -0
- package/dist/authorization/key-store.d.ts +16 -0
- package/dist/authorization/key-store.js +121 -0
- package/dist/authorization/key-store.js.map +1 -0
- package/dist/authorization/native-keyring.d.ts +8 -0
- package/dist/authorization/native-keyring.js +35 -0
- package/dist/authorization/native-keyring.js.map +1 -0
- package/dist/authorization/recovery-client.d.ts +19 -0
- package/dist/authorization/recovery-client.js +60 -0
- package/dist/authorization/recovery-client.js.map +1 -0
- package/dist/authorization/recovery-host.d.ts +29 -0
- package/dist/authorization/recovery-host.js +81 -0
- package/dist/authorization/recovery-host.js.map +1 -0
- package/dist/authorization/recovery.d.ts +13 -0
- package/dist/authorization/recovery.js +27 -0
- package/dist/authorization/recovery.js.map +1 -0
- package/dist/authorization/registration-http.d.ts +5 -0
- package/dist/authorization/registration-http.js +22 -0
- package/dist/authorization/registration-http.js.map +1 -0
- package/dist/authorization/secret-process.d.ts +2 -0
- package/dist/authorization/secret-process.js +32 -0
- package/dist/authorization/secret-process.js.map +1 -0
- package/dist/authorization/setup-http.d.ts +5 -0
- package/dist/authorization/setup-http.js +63 -0
- package/dist/authorization/setup-http.js.map +1 -0
- package/dist/automations-cli-host.d.ts +4 -0
- package/dist/automations-cli-host.js +12 -0
- package/dist/automations-cli-host.js.map +1 -0
- package/dist/automations-host.d.ts +19 -0
- package/dist/automations-host.js +41 -0
- package/dist/automations-host.js.map +1 -0
- package/dist/boot.d.ts +52 -0
- package/dist/boot.js +299 -0
- package/dist/boot.js.map +1 -0
- package/dist/bounded-for-each.d.ts +3 -0
- package/dist/bounded-for-each.js +26 -0
- package/dist/bounded-for-each.js.map +1 -0
- package/dist/builtin-agents.d.ts +4 -0
- package/dist/builtin-agents.js +48 -0
- package/dist/builtin-agents.js.map +1 -0
- package/dist/bundle-apps.d.ts +12 -0
- package/dist/bundle-apps.js +71 -0
- package/dist/bundle-apps.js.map +1 -0
- package/dist/bundle-automations.d.ts +8 -0
- package/dist/bundle-automations.js +115 -0
- package/dist/bundle-automations.js.map +1 -0
- package/dist/bundle-bindings.d.ts +8 -0
- package/dist/bundle-bindings.js +101 -0
- package/dist/bundle-bindings.js.map +1 -0
- package/dist/bundle-port.d.ts +14 -0
- package/dist/bundle-port.js +166 -0
- package/dist/bundle-port.js.map +1 -0
- package/dist/chat-composition.d.ts +26 -0
- package/dist/chat-composition.js +238 -0
- package/dist/chat-composition.js.map +1 -0
- package/dist/chat-host.d.ts +22 -0
- package/dist/chat-host.js +25 -0
- package/dist/chat-host.js.map +1 -0
- package/dist/cli-arguments.d.ts +8 -0
- package/dist/cli-arguments.js +47 -0
- package/dist/cli-arguments.js.map +1 -0
- package/dist/cli.d.ts +9 -0
- package/dist/cli.js +306 -0
- package/dist/cli.js.map +1 -0
- package/dist/compose.d.ts +32 -0
- package/dist/compose.js +41 -0
- package/dist/compose.js.map +1 -0
- package/dist/content-cache-host.d.ts +130 -0
- package/dist/content-cache-host.js +485 -0
- package/dist/content-cache-host.js.map +1 -0
- package/dist/content-cache-index.d.ts +30 -0
- package/dist/content-cache-index.js +91 -0
- package/dist/content-cache-index.js.map +1 -0
- package/dist/content-direct.d.ts +55 -0
- package/dist/content-direct.js +183 -0
- package/dist/content-direct.js.map +1 -0
- package/dist/content-wire-codec.d.ts +13 -0
- package/dist/content-wire-codec.js +26 -0
- package/dist/content-wire-codec.js.map +1 -0
- package/dist/credentials-host.d.ts +3 -0
- package/dist/credentials-host.js +139 -0
- package/dist/credentials-host.js.map +1 -0
- package/dist/detection/accepted-result.d.ts +13 -0
- package/dist/detection/accepted-result.js +22 -0
- package/dist/detection/accepted-result.js.map +1 -0
- package/dist/detection/notebook-basis.d.ts +23 -0
- package/dist/detection/notebook-basis.js +23 -0
- package/dist/detection/notebook-basis.js.map +1 -0
- package/dist/detection/portable.d.ts +66 -0
- package/dist/detection/portable.js +163 -0
- package/dist/detection/portable.js.map +1 -0
- package/dist/detection/runtime.d.ts +89 -0
- package/dist/detection/runtime.js +1244 -0
- package/dist/detection/runtime.js.map +1 -0
- package/dist/development/profile.d.ts +27 -0
- package/dist/development/profile.js +142 -0
- package/dist/development/profile.js.map +1 -0
- package/dist/diagnostics-host.d.ts +3 -0
- package/dist/diagnostics-host.js +92 -0
- package/dist/diagnostics-host.js.map +1 -0
- package/dist/durability-barrier.d.ts +22 -0
- package/dist/durability-barrier.js +72 -0
- package/dist/durability-barrier.js.map +1 -0
- package/dist/entity-apply-host.d.ts +56 -0
- package/dist/entity-apply-host.js +1297 -0
- package/dist/entity-apply-host.js.map +1 -0
- package/dist/entity-apply-store.d.ts +58 -0
- package/dist/entity-apply-store.js +585 -0
- package/dist/entity-apply-store.js.map +1 -0
- package/dist/entity-record-observability.d.ts +13 -0
- package/dist/entity-record-observability.js +145 -0
- package/dist/entity-record-observability.js.map +1 -0
- package/dist/entity-record-store.d.ts +19 -0
- package/dist/entity-record-store.js +183 -0
- package/dist/entity-record-store.js.map +1 -0
- package/dist/event-triggers-host.d.ts +4 -0
- package/dist/event-triggers-host.js +48 -0
- package/dist/event-triggers-host.js.map +1 -0
- package/dist/external-proxy-host.d.ts +15 -0
- package/dist/external-proxy-host.js +167 -0
- package/dist/external-proxy-host.js.map +1 -0
- package/dist/files-observability.d.ts +26 -0
- package/dist/files-observability.js +11 -0
- package/dist/files-observability.js.map +1 -0
- package/dist/files-register-host.d.ts +54 -0
- package/dist/files-register-host.js +200 -0
- package/dist/files-register-host.js.map +1 -0
- package/dist/files-trace.d.ts +41 -0
- package/dist/files-trace.js +138 -0
- package/dist/files-trace.js.map +1 -0
- package/dist/filesystem.d.ts +20 -0
- package/dist/filesystem.js +145 -0
- package/dist/filesystem.js.map +1 -0
- package/dist/forward.d.ts +11 -0
- package/dist/forward.js +36 -0
- package/dist/forward.js.map +1 -0
- package/dist/gateway.d.ts +38 -0
- package/dist/gateway.js +160 -0
- package/dist/gateway.js.map +1 -0
- package/dist/git-command.d.ts +8 -0
- package/dist/git-command.js +80 -0
- package/dist/git-command.js.map +1 -0
- package/dist/git-registration-host.d.ts +48 -0
- package/dist/git-registration-host.js +259 -0
- package/dist/git-registration-host.js.map +1 -0
- package/dist/git-repository-host.d.ts +63 -0
- package/dist/git-repository-host.js +879 -0
- package/dist/git-repository-host.js.map +1 -0
- package/dist/ground-coordination.d.ts +26 -0
- package/dist/ground-coordination.js +83 -0
- package/dist/ground-coordination.js.map +1 -0
- package/dist/ground-root-index.d.ts +12 -0
- package/dist/ground-root-index.js +26 -0
- package/dist/ground-root-index.js.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/installation/environment.d.ts +30 -0
- package/dist/installation/environment.js +28 -0
- package/dist/installation/environment.js.map +1 -0
- package/dist/installation/lease.d.ts +6 -0
- package/dist/installation/lease.js +28 -0
- package/dist/installation/lease.js.map +1 -0
- package/dist/installation/ownership.d.ts +30 -0
- package/dist/installation/ownership.js +156 -0
- package/dist/installation/ownership.js.map +1 -0
- package/dist/installation/selection.d.ts +8 -0
- package/dist/installation/selection.js +29 -0
- package/dist/installation/selection.js.map +1 -0
- package/dist/local-host.d.ts +8 -0
- package/dist/local-host.js +101 -0
- package/dist/local-host.js.map +1 -0
- package/dist/machine-host.d.ts +154 -0
- package/dist/machine-host.js +1009 -0
- package/dist/machine-host.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +58 -0
- package/dist/main.js.map +1 -0
- package/dist/materialized-graph.d.ts +29 -0
- package/dist/materialized-graph.js +148 -0
- package/dist/materialized-graph.js.map +1 -0
- package/dist/official-mcp-host.d.ts +51 -0
- package/dist/official-mcp-host.js +46 -0
- package/dist/official-mcp-host.js.map +1 -0
- package/dist/parity.d.ts +36 -0
- package/dist/parity.js +71 -0
- package/dist/parity.js.map +1 -0
- package/dist/platform-product-host.d.ts +37 -0
- package/dist/platform-product-host.js +124 -0
- package/dist/platform-product-host.js.map +1 -0
- package/dist/platform-tools.d.ts +21 -0
- package/dist/platform-tools.js +105 -0
- package/dist/platform-tools.js.map +1 -0
- package/dist/ports-host.d.ts +8 -0
- package/dist/ports-host.js +26 -0
- package/dist/ports-host.js.map +1 -0
- package/dist/process-lifecycle.d.ts +6 -0
- package/dist/process-lifecycle.js +42 -0
- package/dist/process-lifecycle.js.map +1 -0
- package/dist/pty-host.d.ts +14 -0
- package/dist/pty-host.js +220 -0
- package/dist/pty-host.js.map +1 -0
- package/dist/register-upload-fusion.d.ts +83 -0
- package/dist/register-upload-fusion.js +169 -0
- package/dist/register-upload-fusion.js.map +1 -0
- package/dist/registry-graph.d.ts +103 -0
- package/dist/registry-graph.js +359 -0
- package/dist/registry-graph.js.map +1 -0
- package/dist/registry-page-cache.d.ts +14 -0
- package/dist/registry-page-cache.js +32 -0
- package/dist/registry-page-cache.js.map +1 -0
- package/dist/release-catalog.d.ts +5 -0
- package/dist/release-catalog.js +26 -0
- package/dist/release-catalog.js.map +1 -0
- package/dist/runtime-command-host.d.ts +40 -0
- package/dist/runtime-command-host.js +225 -0
- package/dist/runtime-command-host.js.map +1 -0
- package/dist/service/adapter.d.ts +36 -0
- package/dist/service/adapter.js +24 -0
- package/dist/service/adapter.js.map +1 -0
- package/dist/service/cli.d.ts +8 -0
- package/dist/service/cli.js +237 -0
- package/dist/service/cli.js.map +1 -0
- package/dist/service/control.d.ts +38 -0
- package/dist/service/control.js +68 -0
- package/dist/service/control.js.map +1 -0
- package/dist/service/index.d.ts +9 -0
- package/dist/service/index.js +10 -0
- package/dist/service/index.js.map +1 -0
- package/dist/service/keepalive.d.ts +18 -0
- package/dist/service/keepalive.js +418 -0
- package/dist/service/keepalive.js.map +1 -0
- package/dist/service/launchd.d.ts +9 -0
- package/dist/service/launchd.js +105 -0
- package/dist/service/launchd.js.map +1 -0
- package/dist/service/owner.d.ts +4 -0
- package/dist/service/owner.js +14 -0
- package/dist/service/owner.js.map +1 -0
- package/dist/service/portable.d.ts +10 -0
- package/dist/service/portable.js +32 -0
- package/dist/service/portable.js.map +1 -0
- package/dist/service/recovery.d.ts +27 -0
- package/dist/service/recovery.js +58 -0
- package/dist/service/recovery.js.map +1 -0
- package/dist/service/registration.d.ts +82 -0
- package/dist/service/registration.js +114 -0
- package/dist/service/registration.js.map +1 -0
- package/dist/service/systemd-unit.d.ts +7 -0
- package/dist/service/systemd-unit.js +43 -0
- package/dist/service/systemd-unit.js.map +1 -0
- package/dist/service/systemd.d.ts +5 -0
- package/dist/service/systemd.js +72 -0
- package/dist/service/systemd.js.map +1 -0
- package/dist/service/windows-action.d.ts +9 -0
- package/dist/service/windows-action.js +55 -0
- package/dist/service/windows-action.js.map +1 -0
- package/dist/service/windows-task.d.ts +9 -0
- package/dist/service/windows-task.js +46 -0
- package/dist/service/windows-task.js.map +1 -0
- package/dist/service/windows.d.ts +2 -0
- package/dist/service/windows.js +65 -0
- package/dist/service/windows.js.map +1 -0
- package/dist/snapshot-delivery-baseline.d.ts +12 -0
- package/dist/snapshot-delivery-baseline.js +58 -0
- package/dist/snapshot-delivery-baseline.js.map +1 -0
- package/dist/sqlite.d.ts +4 -0
- package/dist/sqlite.js +16 -0
- package/dist/sqlite.js.map +1 -0
- package/dist/state-host.d.ts +4 -0
- package/dist/state-host.js +67 -0
- package/dist/state-host.js.map +1 -0
- package/dist/state-store.d.ts +15 -0
- package/dist/state-store.js +63 -0
- package/dist/state-store.js.map +1 -0
- package/dist/transfer-instrumentation.d.ts +47 -0
- package/dist/transfer-instrumentation.js +141 -0
- package/dist/transfer-instrumentation.js.map +1 -0
- package/dist/updates/artifacts.d.ts +40 -0
- package/dist/updates/artifacts.js +299 -0
- package/dist/updates/artifacts.js.map +1 -0
- package/dist/updates/bootstrap.d.ts +48 -0
- package/dist/updates/bootstrap.js +384 -0
- package/dist/updates/bootstrap.js.map +1 -0
- package/dist/updates/controller.d.ts +66 -0
- package/dist/updates/controller.js +322 -0
- package/dist/updates/controller.js.map +1 -0
- package/dist/updates/isolated-command-lifetime.d.ts +1 -0
- package/dist/updates/isolated-command-lifetime.js +63 -0
- package/dist/updates/isolated-command-lifetime.js.map +1 -0
- package/dist/updates/store.d.ts +41 -0
- package/dist/updates/store.js +80 -0
- package/dist/updates/store.js.map +1 -0
- package/dist/updates/trust.d.ts +20 -0
- package/dist/updates/trust.js +138 -0
- package/dist/updates/trust.js.map +1 -0
- package/dist/user-ground-host.d.ts +312 -0
- package/dist/user-ground-host.js +6603 -0
- package/dist/user-ground-host.js.map +1 -0
- package/dist/watching/fsevents.d.ts +2 -0
- package/dist/watching/fsevents.js +91 -0
- package/dist/watching/fsevents.js.map +1 -0
- package/dist/watching/host.d.ts +133 -0
- package/dist/watching/host.js +799 -0
- package/dist/watching/host.js.map +1 -0
- package/dist/watching/index.d.ts +2 -0
- package/dist/watching/index.js +2 -0
- package/dist/watching/index.js.map +1 -0
- package/dist/wire-binary.d.ts +8 -0
- package/dist/wire-binary.js +34 -0
- package/dist/wire-binary.js.map +1 -0
- package/dist/wire-client.d.ts +75 -0
- package/dist/wire-client.js +446 -0
- package/dist/wire-client.js.map +1 -0
- package/dist/workspace-add-staging.d.ts +188 -0
- package/dist/workspace-add-staging.js +436 -0
- package/dist/workspace-add-staging.js.map +1 -0
- package/dist/workspace-host.d.ts +5 -0
- package/dist/workspace-host.js +73 -0
- package/dist/workspace-host.js.map +1 -0
- package/dist/workspace-store.d.ts +10 -0
- package/dist/workspace-store.js +47 -0
- package/dist/workspace-store.js.map +1 -0
- package/examinations/fixtures/machine-control-plane.js +57 -0
- package/examinations/fixtures/private-wire-authority.js +1065 -0
- package/examinations/native-service.mjs +92 -0
- package/examinations/network-view.mjs +202 -0
- package/examinations/runtime-upgrade.native-test.mjs +198 -0
- package/npm-shrinkwrap.json +4558 -0
- package/package.json +99 -38
- package/skills/shell/SKILL.md +149 -0
- package/bin/amalgm.js +0 -105
- package/lib/app-chat.js +0 -271
- package/lib/auth-store.js +0 -327
- package/lib/cli.js +0 -1875
- package/lib/identity-adopt.js +0 -43
- package/lib/layout.js +0 -450
- package/lib/migrate-layout.js +0 -212
- package/lib/paths.js +0 -81
- package/lib/process-cleanup.js +0 -273
- package/lib/react.js +0 -123
- package/lib/runtime-identity.js +0 -171
- package/lib/runtime-manifest.js +0 -3
- package/lib/service.js +0 -1028
- package/lib/shared-realtime-tunnel.js +0 -1262
- package/lib/state-migration.js +0 -199
- package/lib/supervisor.js +0 -1347
- package/lib/tunnel-chat.js +0 -451
- package/lib/tunnel-events.js +0 -981
- package/lib/updater.js +0 -280
- package/runtime/README.md +0 -4
- package/runtime/lib/chatInput.js +0 -311
- package/runtime/lib/harnesses.js +0 -1057
- package/runtime/lib/local/amalgmStore.js +0 -129
- package/runtime/lib/local/credentialResolver.js +0 -425
- package/runtime/lib/mcpApps/registry.js +0 -619
- package/runtime/lib/runtime-manifest.js +0 -159
- package/runtime/package.json +0 -5
- package/runtime/scripts/amalgm-mcp/adapters/contract.js +0 -197
- package/runtime/scripts/amalgm-mcp/adapters/filesystem.js +0 -135
- package/runtime/scripts/amalgm-mcp/adapters/git.js +0 -84
- package/runtime/scripts/amalgm-mcp/adapters/index.js +0 -43
- package/runtime/scripts/amalgm-mcp/adapters/reference.js +0 -31
- package/runtime/scripts/amalgm-mcp/adapters/truth.js +0 -19
- package/runtime/scripts/amalgm-mcp/agent-bundles/app-entries.js +0 -133
- package/runtime/scripts/amalgm-mcp/agent-bundles/automation-entries.js +0 -186
- package/runtime/scripts/amalgm-mcp/agent-bundles/bundles.js +0 -17
- package/runtime/scripts/amalgm-mcp/agent-bundles/export.js +0 -391
- package/runtime/scripts/amalgm-mcp/agent-bundles/graph.js +0 -419
- package/runtime/scripts/amalgm-mcp/agent-bundles/install.js +0 -296
- package/runtime/scripts/amalgm-mcp/agent-bundles/rest.js +0 -54
- package/runtime/scripts/amalgm-mcp/agent-bundles/tool-bindings.js +0 -146
- package/runtime/scripts/amalgm-mcp/agent-config/compiler/instructions.js +0 -82
- package/runtime/scripts/amalgm-mcp/agent-config/importers/claude.js +0 -52
- package/runtime/scripts/amalgm-mcp/agent-config/importers/codex.js +0 -36
- package/runtime/scripts/amalgm-mcp/agent-config/importers/common.js +0 -115
- package/runtime/scripts/amalgm-mcp/agent-config/importers/index.js +0 -14
- package/runtime/scripts/amalgm-mcp/agent-config/importers/opencode.js +0 -59
- package/runtime/scripts/amalgm-mcp/agent-config/loadout.js +0 -65
- package/runtime/scripts/amalgm-mcp/agent-config/renderers/hooks.js +0 -55
- package/runtime/scripts/amalgm-mcp/agent-config/renderers/instructions.js +0 -14
- package/runtime/scripts/amalgm-mcp/agent-config/rest.js +0 -168
- package/runtime/scripts/amalgm-mcp/agent-config/schema.js +0 -232
- package/runtime/scripts/amalgm-mcp/agent-config/store.js +0 -142
- package/runtime/scripts/amalgm-mcp/agents/hooks.js +0 -184
- package/runtime/scripts/amalgm-mcp/agents/rest.js +0 -201
- package/runtime/scripts/amalgm-mcp/agents/store.js +0 -778
- package/runtime/scripts/amalgm-mcp/agents/talk.js +0 -1207
- package/runtime/scripts/amalgm-mcp/agents/tools.js +0 -212
- package/runtime/scripts/amalgm-mcp/apps/advertise.js +0 -171
- package/runtime/scripts/amalgm-mcp/apps/health.js +0 -216
- package/runtime/scripts/amalgm-mcp/apps/manifest.js +0 -135
- package/runtime/scripts/amalgm-mcp/apps/portable.js +0 -334
- package/runtime/scripts/amalgm-mcp/apps/rest.js +0 -211
- package/runtime/scripts/amalgm-mcp/apps/store.js +0 -190
- package/runtime/scripts/amalgm-mcp/apps/supervisor.js +0 -716
- package/runtime/scripts/amalgm-mcp/apps/tools.js +0 -214
- package/runtime/scripts/amalgm-mcp/automations/cell-references.js +0 -237
- package/runtime/scripts/amalgm-mcp/automations/context.js +0 -41
- package/runtime/scripts/amalgm-mcp/automations/deliveries.js +0 -276
- package/runtime/scripts/amalgm-mcp/automations/internal-workflows.js +0 -629
- package/runtime/scripts/amalgm-mcp/automations/rest.js +0 -247
- package/runtime/scripts/amalgm-mcp/automations/runner.js +0 -703
- package/runtime/scripts/amalgm-mcp/automations/scheduler.js +0 -143
- package/runtime/scripts/amalgm-mcp/automations/store.js +0 -1741
- package/runtime/scripts/amalgm-mcp/automations/tool-actions.js +0 -217
- package/runtime/scripts/amalgm-mcp/automations/tools.js +0 -486
- package/runtime/scripts/amalgm-mcp/automations/validator.js +0 -225
- package/runtime/scripts/amalgm-mcp/browser/attach.js +0 -540
- package/runtime/scripts/amalgm-mcp/browser/auth-bundles.js +0 -321
- package/runtime/scripts/amalgm-mcp/browser/auth-tools.js +0 -219
- package/runtime/scripts/amalgm-mcp/browser/auth-vault.js +0 -101
- package/runtime/scripts/amalgm-mcp/browser/backend.js +0 -160
- package/runtime/scripts/amalgm-mcp/browser/capture.js +0 -209
- package/runtime/scripts/amalgm-mcp/browser/cdp.js +0 -198
- package/runtime/scripts/amalgm-mcp/browser/cli.js +0 -268
- package/runtime/scripts/amalgm-mcp/browser/cookie-jar.js +0 -735
- package/runtime/scripts/amalgm-mcp/browser/cookie-source.js +0 -17
- package/runtime/scripts/amalgm-mcp/browser/cua-tools.js +0 -120
- package/runtime/scripts/amalgm-mcp/browser/delta.js +0 -254
- package/runtime/scripts/amalgm-mcp/browser/engine.js +0 -525
- package/runtime/scripts/amalgm-mcp/browser/index.js +0 -28
- package/runtime/scripts/amalgm-mcp/browser/login-sessions.js +0 -333
- package/runtime/scripts/amalgm-mcp/browser/novnc.js +0 -81
- package/runtime/scripts/amalgm-mcp/browser/paths.js +0 -41
- package/runtime/scripts/amalgm-mcp/browser/profiles.js +0 -276
- package/runtime/scripts/amalgm-mcp/browser/recorder-tools.js +0 -84
- package/runtime/scripts/amalgm-mcp/browser/recorder.js +0 -357
- package/runtime/scripts/amalgm-mcp/browser/rest.js +0 -364
- package/runtime/scripts/amalgm-mcp/browser/sessions.js +0 -91
- package/runtime/scripts/amalgm-mcp/browser/store.js +0 -9
- package/runtime/scripts/amalgm-mcp/browser/tools.js +0 -413
- package/runtime/scripts/amalgm-mcp/browser/typing.js +0 -193
- package/runtime/scripts/amalgm-mcp/computer-use/index.js +0 -1038
- package/runtime/scripts/amalgm-mcp/config.js +0 -296
- package/runtime/scripts/amalgm-mcp/credentials/rest.js +0 -45
- package/runtime/scripts/amalgm-mcp/deps.js +0 -10
- package/runtime/scripts/amalgm-mcp/email/inbound.js +0 -240
- package/runtime/scripts/amalgm-mcp/events/desktop-release-runner.js +0 -1917
- package/runtime/scripts/amalgm-mcp/events/ingress.js +0 -88
- package/runtime/scripts/amalgm-mcp/events/internal-workflows.js +0 -169
- package/runtime/scripts/amalgm-mcp/events/matcher.js +0 -161
- package/runtime/scripts/amalgm-mcp/events/npm-release-runner.js +0 -408
- package/runtime/scripts/amalgm-mcp/events/pr-check-runner.js +0 -346
- package/runtime/scripts/amalgm-mcp/events/processor.js +0 -189
- package/runtime/scripts/amalgm-mcp/events/ring-buffer.js +0 -19
- package/runtime/scripts/amalgm-mcp/events/store.js +0 -362
- package/runtime/scripts/amalgm-mcp/events/webhook-url.js +0 -28
- package/runtime/scripts/amalgm-mcp/fs/rest.js +0 -824
- package/runtime/scripts/amalgm-mcp/fs/search.js +0 -464
- package/runtime/scripts/amalgm-mcp/index.js +0 -149
- package/runtime/scripts/amalgm-mcp/lib/chat-payloads.js +0 -158
- package/runtime/scripts/amalgm-mcp/lib/chat-runner.js +0 -167
- package/runtime/scripts/amalgm-mcp/lib/computer.js +0 -77
- package/runtime/scripts/amalgm-mcp/lib/email-deeplinks.js +0 -117
- package/runtime/scripts/amalgm-mcp/lib/email-embeds.js +0 -571
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-aa-57534e-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-c-00599c-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-c-5c6bc0-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-c-68217a-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-go-00add8-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-j-e76f00-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-js-f7df1e-1c1917.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-kt-7f52ff-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-nb-f37626-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-p-d24726-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-php-777bb4-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-rb-cc342d-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-rs-ce4a1f-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-s-cd6799-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-sw-f05138-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-ts-3178c6-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-letter-v-42b883-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-atsign-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-box-d6d3d1.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-box-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-braces-facc15.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-braces-fb923c.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-calendarclock-d6d3d1.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-database-60a5fa.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-externallink-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-file-a8a29e.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-filearchive-facc15.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-fileimage-2dd4bf.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-fileimage-c084fc.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-filespreadsheet-4ade80.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-filetext-60a5fa.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-filetext-a8a29e.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-filetext-f87171.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-folder-d6d3d1.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-globe-d6d3d1.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-lock-facc15.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-messagesquare-ffffff.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-music-f472b6.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-package-38bdf8.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-package-facc15.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-settings-a8a29e.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-settings-d6d3d1.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-settings-f87171.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-terminal-4ade80.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-video-f472b6.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-lucide-zap-fbbf24.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-path-css3-1572b6.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-path-html5-e34f26.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-path-markdown-a8a29e.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-path-python-4b8bbe.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-react.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/amalgm-icon-skill.png +0 -0
- package/runtime/scripts/amalgm-mcp/lib/email-icon-assets/manifest.json +0 -56
- package/runtime/scripts/amalgm-mcp/lib/email-icons.js +0 -86
- package/runtime/scripts/amalgm-mcp/lib/email-md.js +0 -527
- package/runtime/scripts/amalgm-mcp/lib/file-icon-registry.json +0 -1138
- package/runtime/scripts/amalgm-mcp/lib/generated/email-render.json +0 -161
- package/runtime/scripts/amalgm-mcp/lib/layout.js +0 -452
- package/runtime/scripts/amalgm-mcp/lib/mcp-resolver.js +0 -63
- package/runtime/scripts/amalgm-mcp/lib/prefs.js +0 -716
- package/runtime/scripts/amalgm-mcp/lib/prepared.js +0 -27
- package/runtime/scripts/amalgm-mcp/lib/storage.js +0 -92
- package/runtime/scripts/amalgm-mcp/lib/supabase.js +0 -118
- package/runtime/scripts/amalgm-mcp/lib/tool-result.js +0 -142
- package/runtime/scripts/amalgm-mcp/local/rest.js +0 -87
- package/runtime/scripts/amalgm-mcp/mcp-connections/rest.js +0 -244
- package/runtime/scripts/amalgm-mcp/notify/email-media.js +0 -181
- package/runtime/scripts/amalgm-mcp/notify/index.js +0 -124
- package/runtime/scripts/amalgm-mcp/observer/README.md +0 -264
- package/runtime/scripts/amalgm-mcp/observer/apply.js +0 -150
- package/runtime/scripts/amalgm-mcp/observer/continuity.js +0 -111
- package/runtime/scripts/amalgm-mcp/observer/coverage.js +0 -52
- package/runtime/scripts/amalgm-mcp/observer/edges.js +0 -111
- package/runtime/scripts/amalgm-mcp/observer/index.js +0 -1349
- package/runtime/scripts/amalgm-mcp/observer/scan.js +0 -483
- package/runtime/scripts/amalgm-mcp/observer/store.js +0 -311
- package/runtime/scripts/amalgm-mcp/observer/verify.js +0 -200
- package/runtime/scripts/amalgm-mcp/observer/watch.js +0 -66
- package/runtime/scripts/amalgm-mcp/project-context/paths.js +0 -304
- package/runtime/scripts/amalgm-mcp/project-context/prompt.js +0 -264
- package/runtime/scripts/amalgm-mcp/project-context/rest.js +0 -104
- package/runtime/scripts/amalgm-mcp/project-context/store.js +0 -810
- package/runtime/scripts/amalgm-mcp/project-context/tools.js +0 -231
- package/runtime/scripts/amalgm-mcp/registration/classify.js +0 -33
- package/runtime/scripts/amalgm-mcp/registration/entity-cloud.js +0 -1237
- package/runtime/scripts/amalgm-mcp/registration/entity-content.js +0 -487
- package/runtime/scripts/amalgm-mcp/registration/index.js +0 -1155
- package/runtime/scripts/amalgm-mcp/registration/refusal.js +0 -42
- package/runtime/scripts/amalgm-mcp/registration/repo-followers.js +0 -187
- package/runtime/scripts/amalgm-mcp/registration/repo-states.js +0 -141
- package/runtime/scripts/amalgm-mcp/registration/service.js +0 -1098
- package/runtime/scripts/amalgm-mcp/registration/tree.js +0 -364
- package/runtime/scripts/amalgm-mcp/registry/evidence.js +0 -849
- package/runtime/scripts/amalgm-mcp/registry/index.js +0 -769
- package/runtime/scripts/amalgm-mcp/registry/store.js +0 -443
- package/runtime/scripts/amalgm-mcp/repocard/README.md +0 -103
- package/runtime/scripts/amalgm-mcp/repocard/apply.js +0 -111
- package/runtime/scripts/amalgm-mcp/repocard/capture-worker.js +0 -116
- package/runtime/scripts/amalgm-mcp/repocard/capture.js +0 -199
- package/runtime/scripts/amalgm-mcp/repocard/follow.js +0 -365
- package/runtime/scripts/amalgm-mcp/repocard/git.js +0 -48
- package/runtime/scripts/amalgm-mcp/repocard/index.js +0 -48
- package/runtime/scripts/amalgm-mcp/runtime-owner.js +0 -83
- package/runtime/scripts/amalgm-mcp/runtime-worker.js +0 -47
- package/runtime/scripts/amalgm-mcp/server/combined-service.js +0 -27
- package/runtime/scripts/amalgm-mcp/server/control-plane-service.js +0 -24
- package/runtime/scripts/amalgm-mcp/server/core-tools.js +0 -81
- package/runtime/scripts/amalgm-mcp/server/http-context.js +0 -44
- package/runtime/scripts/amalgm-mcp/server/http-service.js +0 -34
- package/runtime/scripts/amalgm-mcp/server/http.js +0 -46
- package/runtime/scripts/amalgm-mcp/server/local-service-router.js +0 -63
- package/runtime/scripts/amalgm-mcp/server/mcp-adapter.js +0 -22
- package/runtime/scripts/amalgm-mcp/server/mcp-http-service.js +0 -24
- package/runtime/scripts/amalgm-mcp/server/mcp-request-context.js +0 -37
- package/runtime/scripts/amalgm-mcp/server/mcp.js +0 -91
- package/runtime/scripts/amalgm-mcp/server/routes/agents.js +0 -64
- package/runtime/scripts/amalgm-mcp/server/routes/apps.js +0 -71
- package/runtime/scripts/amalgm-mcp/server/routes/automations.js +0 -57
- package/runtime/scripts/amalgm-mcp/server/routes/browser.js +0 -77
- package/runtime/scripts/amalgm-mcp/server/routes/chat-payloads.js +0 -37
- package/runtime/scripts/amalgm-mcp/server/routes/credentials.js +0 -30
- package/runtime/scripts/amalgm-mcp/server/routes/entities.js +0 -365
- package/runtime/scripts/amalgm-mcp/server/routes/events.js +0 -18
- package/runtime/scripts/amalgm-mcp/server/routes/files.js +0 -45
- package/runtime/scripts/amalgm-mcp/server/routes/health.js +0 -25
- package/runtime/scripts/amalgm-mcp/server/routes/inbound.js +0 -18
- package/runtime/scripts/amalgm-mcp/server/routes/local.js +0 -21
- package/runtime/scripts/amalgm-mcp/server/routes/preferences.js +0 -18
- package/runtime/scripts/amalgm-mcp/server/routes/project-context.js +0 -41
- package/runtime/scripts/amalgm-mcp/server/routes/state.js +0 -181
- package/runtime/scripts/amalgm-mcp/server/routes/toolbox.js +0 -59
- package/runtime/scripts/amalgm-mcp/server/routes/workspace.js +0 -123
- package/runtime/scripts/amalgm-mcp/server/service-lifecycle.js +0 -54
- package/runtime/scripts/amalgm-mcp/services/control-plane.js +0 -19
- package/runtime/scripts/amalgm-mcp/services/mcp-adapter.js +0 -12
- package/runtime/scripts/amalgm-mcp/services/runtime-worker.js +0 -18
- package/runtime/scripts/amalgm-mcp/skills/public.js +0 -128
- package/runtime/scripts/amalgm-mcp/skills/rest.js +0 -47
- package/runtime/scripts/amalgm-mcp/skills/roots.js +0 -160
- package/runtime/scripts/amalgm-mcp/skills/scanner.js +0 -181
- package/runtime/scripts/amalgm-mcp/skills/store.js +0 -213
- package/runtime/scripts/amalgm-mcp/slack/inbound.js +0 -225
- package/runtime/scripts/amalgm-mcp/state/app-resources.js +0 -240
- package/runtime/scripts/amalgm-mcp/state/attachments.js +0 -286
- package/runtime/scripts/amalgm-mcp/state/cloud-resource-id.js +0 -16
- package/runtime/scripts/amalgm-mcp/state/db.js +0 -833
- package/runtime/scripts/amalgm-mcp/state/docs.js +0 -1298
- package/runtime/scripts/amalgm-mcp/state/events.js +0 -285
- package/runtime/scripts/amalgm-mcp/state/merge3.js +0 -197
- package/runtime/scripts/amalgm-mcp/state/migrations.js +0 -176
- package/runtime/scripts/amalgm-mcp/state/mutation-contracts.js +0 -56
- package/runtime/scripts/amalgm-mcp/state/mutations.js +0 -884
- package/runtime/scripts/amalgm-mcp/state/ports.js +0 -98
- package/runtime/scripts/amalgm-mcp/state/presence.js +0 -271
- package/runtime/scripts/amalgm-mcp/state/promotions.js +0 -333
- package/runtime/scripts/amalgm-mcp/state/registry.js +0 -100
- package/runtime/scripts/amalgm-mcp/state/replicas.js +0 -271
- package/runtime/scripts/amalgm-mcp/state/resources.js +0 -162
- package/runtime/scripts/amalgm-mcp/state/rest.js +0 -343
- package/runtime/scripts/amalgm-mcp/state/shared-rest.js +0 -363
- package/runtime/scripts/amalgm-mcp/state/snapshot.js +0 -52
- package/runtime/scripts/amalgm-mcp/state/trace.js +0 -26
- package/runtime/scripts/amalgm-mcp/tasks/executor.js +0 -299
- package/runtime/scripts/amalgm-mcp/tasks/schedule-normalization.js +0 -85
- package/runtime/scripts/amalgm-mcp/tasks/scheduler.js +0 -146
- package/runtime/scripts/amalgm-mcp/tasks/store.js +0 -882
- package/runtime/scripts/amalgm-mcp/tests/adapters.test.js +0 -379
- package/runtime/scripts/amalgm-mcp/tests/agent-bundles.test.js +0 -309
- package/runtime/scripts/amalgm-mcp/tests/agent-config.test.js +0 -80
- package/runtime/scripts/amalgm-mcp/tests/agents-source-of-truth.test.js +0 -186
- package/runtime/scripts/amalgm-mcp/tests/apps-crash-loop.test.js +0 -96
- package/runtime/scripts/amalgm-mcp/tests/apps-health-e2e.test.js +0 -116
- package/runtime/scripts/amalgm-mcp/tests/apps-health.test.js +0 -150
- package/runtime/scripts/amalgm-mcp/tests/apps-portable.test.js +0 -127
- package/runtime/scripts/amalgm-mcp/tests/apps-supervisor.test.js +0 -190
- package/runtime/scripts/amalgm-mcp/tests/automations-reliability.test.js +0 -547
- package/runtime/scripts/amalgm-mcp/tests/automations-store-runner.test.js +0 -390
- package/runtime/scripts/amalgm-mcp/tests/browser-auth-bundles.test.js +0 -115
- package/runtime/scripts/amalgm-mcp/tests/browser-capture.test.js +0 -139
- package/runtime/scripts/amalgm-mcp/tests/browser-cli.test.js +0 -169
- package/runtime/scripts/amalgm-mcp/tests/browser-cookie-cloud.test.js +0 -181
- package/runtime/scripts/amalgm-mcp/tests/browser-cookie-jar.test.js +0 -152
- package/runtime/scripts/amalgm-mcp/tests/browser-cookie-push.test.js +0 -60
- package/runtime/scripts/amalgm-mcp/tests/browser-cookie-source.test.js +0 -185
- package/runtime/scripts/amalgm-mcp/tests/browser-login-live.test.js +0 -108
- package/runtime/scripts/amalgm-mcp/tests/browser-login-sessions.test.js +0 -61
- package/runtime/scripts/amalgm-mcp/tests/browser-profile-lifecycle.test.js +0 -78
- package/runtime/scripts/amalgm-mcp/tests/browser-recorder.test.js +0 -109
- package/runtime/scripts/amalgm-mcp/tests/browser-routing.test.js +0 -244
- package/runtime/scripts/amalgm-mcp/tests/browser-tools-surface.test.js +0 -165
- package/runtime/scripts/amalgm-mcp/tests/browser-transport.test.js +0 -253
- package/runtime/scripts/amalgm-mcp/tests/bundle-entries.test.js +0 -885
- package/runtime/scripts/amalgm-mcp/tests/chat-payloads.test.js +0 -71
- package/runtime/scripts/amalgm-mcp/tests/computer-use.test.js +0 -151
- package/runtime/scripts/amalgm-mcp/tests/config-migration.test.js +0 -125
- package/runtime/scripts/amalgm-mcp/tests/core-tools.test.js +0 -175
- package/runtime/scripts/amalgm-mcp/tests/desktop-release-automation-seed.test.js +0 -105
- package/runtime/scripts/amalgm-mcp/tests/desktop-release-runner.test.js +0 -637
- package/runtime/scripts/amalgm-mcp/tests/desktop-release-server.test.js +0 -294
- package/runtime/scripts/amalgm-mcp/tests/doorbell.matrix.life.test.js +0 -449
- package/runtime/scripts/amalgm-mcp/tests/doorbell.matrix.rig.js +0 -107
- package/runtime/scripts/amalgm-mcp/tests/doorbell.matrix.watch.test.js +0 -213
- package/runtime/scripts/amalgm-mcp/tests/email-embeds.test.js +0 -132
- package/runtime/scripts/amalgm-mcp/tests/email-media.test.js +0 -53
- package/runtime/scripts/amalgm-mcp/tests/email-render-fixtures/citations.md +0 -9
- package/runtime/scripts/amalgm-mcp/tests/email-render-fixtures/entities.md +0 -15
- package/runtime/scripts/amalgm-mcp/tests/email-render-fixtures/links.md +0 -5
- package/runtime/scripts/amalgm-mcp/tests/email-render-fixtures/media.md +0 -21
- package/runtime/scripts/amalgm-mcp/tests/email-render-fixtures/text.md +0 -30
- package/runtime/scripts/amalgm-mcp/tests/email-render-goldens/citations.html +0 -5
- package/runtime/scripts/amalgm-mcp/tests/email-render-goldens/entities.html +0 -8
- package/runtime/scripts/amalgm-mcp/tests/email-render-goldens/links.html +0 -3
- package/runtime/scripts/amalgm-mcp/tests/email-render-goldens/media.html +0 -11
- package/runtime/scripts/amalgm-mcp/tests/email-render-goldens/notification-shell.html +0 -11
- package/runtime/scripts/amalgm-mcp/tests/email-render-goldens/share-invite.html +0 -13
- package/runtime/scripts/amalgm-mcp/tests/email-render-goldens/text.html +0 -12
- package/runtime/scripts/amalgm-mcp/tests/email-render.test.js +0 -98
- package/runtime/scripts/amalgm-mcp/tests/entity-cloud.test.js +0 -463
- package/runtime/scripts/amalgm-mcp/tests/entity-content.test.js +0 -126
- package/runtime/scripts/amalgm-mcp/tests/entity-materialization.test.js +0 -706
- package/runtime/scripts/amalgm-mcp/tests/entity-oracle/adapter.js +0 -72
- package/runtime/scripts/amalgm-mcp/tests/entity-oracle/assert.js +0 -497
- package/runtime/scripts/amalgm-mcp/tests/entity-oracle/bind.js +0 -91
- package/runtime/scripts/amalgm-mcp/tests/entity-oracle/graph.js +0 -1031
- package/runtime/scripts/amalgm-mcp/tests/entity-oracle/ledger.js +0 -234
- package/runtime/scripts/amalgm-mcp/tests/entity-oracle/referee.js +0 -118
- package/runtime/scripts/amalgm-mcp/tests/entity.oracle.test.js +0 -1365
- package/runtime/scripts/amalgm-mcp/tests/entity.registry.test.js +0 -1116
- package/runtime/scripts/amalgm-mcp/tests/entity.rig.js +0 -253
- package/runtime/scripts/amalgm-mcp/tests/entity.storm.test.js +0 -486
- package/runtime/scripts/amalgm-mcp/tests/events-matcher.test.js +0 -68
- package/runtime/scripts/amalgm-mcp/tests/fake-watch.js +0 -43
- package/runtime/scripts/amalgm-mcp/tests/files-resource.test.js +0 -52
- package/runtime/scripts/amalgm-mcp/tests/health.test.js +0 -20
- package/runtime/scripts/amalgm-mcp/tests/local-live-snapshot.test.js +0 -44
- package/runtime/scripts/amalgm-mcp/tests/mcp-surface.test.js +0 -179
- package/runtime/scripts/amalgm-mcp/tests/npm-release-runner.test.js +0 -102
- package/runtime/scripts/amalgm-mcp/tests/observer.coverage.test.js +0 -197
- package/runtime/scripts/amalgm-mcp/tests/observer.links.test.js +0 -289
- package/runtime/scripts/amalgm-mcp/tests/observer.rig.js +0 -110
- package/runtime/scripts/amalgm-mcp/tests/observer.roots.test.js +0 -505
- package/runtime/scripts/amalgm-mcp/tests/observer.storm.test.js +0 -389
- package/runtime/scripts/amalgm-mcp/tests/observer.territory.test.js +0 -860
- package/runtime/scripts/amalgm-mcp/tests/observer.test.js +0 -742
- package/runtime/scripts/amalgm-mcp/tests/platform-context.test.js +0 -73
- package/runtime/scripts/amalgm-mcp/tests/pr-check-runner.test.js +0 -89
- package/runtime/scripts/amalgm-mcp/tests/private-cookie-tunnel.test.js +0 -108
- package/runtime/scripts/amalgm-mcp/tests/project-context.test.js +0 -477
- package/runtime/scripts/amalgm-mcp/tests/registration.service.test.js +0 -1118
- package/runtime/scripts/amalgm-mcp/tests/registration.test.js +0 -970
- package/runtime/scripts/amalgm-mcp/tests/repocard.scope.test.js +0 -182
- package/runtime/scripts/amalgm-mcp/tests/repocard.storm.test.js +0 -284
- package/runtime/scripts/amalgm-mcp/tests/repocard.test.js +0 -392
- package/runtime/scripts/amalgm-mcp/tests/repofollow.storm.test.js +0 -435
- package/runtime/scripts/amalgm-mcp/tests/repofollow.test.js +0 -675
- package/runtime/scripts/amalgm-mcp/tests/runtime-owner.test.js +0 -63
- package/runtime/scripts/amalgm-mcp/tests/scheduler.test.js +0 -64
- package/runtime/scripts/amalgm-mcp/tests/server-routing.test.js +0 -81
- package/runtime/scripts/amalgm-mcp/tests/server-services.test.js +0 -156
- package/runtime/scripts/amalgm-mcp/tests/shared-presence-tunnel.test.js +0 -106
- package/runtime/scripts/amalgm-mcp/tests/shared-tunnel-rehydration.test.js +0 -215
- package/runtime/scripts/amalgm-mcp/tests/skills.test.js +0 -240
- package/runtime/scripts/amalgm-mcp/tests/state-app-resources.test.js +0 -157
- package/runtime/scripts/amalgm-mcp/tests/state-docs-merge.test.js +0 -251
- package/runtime/scripts/amalgm-mcp/tests/state-docs-versioning.test.js +0 -455
- package/runtime/scripts/amalgm-mcp/tests/state-docs.test.js +0 -308
- package/runtime/scripts/amalgm-mcp/tests/state-events-retention.test.js +0 -67
- package/runtime/scripts/amalgm-mcp/tests/state-mutations.test.js +0 -346
- package/runtime/scripts/amalgm-mcp/tests/state-presence.test.js +0 -199
- package/runtime/scripts/amalgm-mcp/tests/state-promotion-ownership.test.js +0 -109
- package/runtime/scripts/amalgm-mcp/tests/state-registry.test.js +0 -93
- package/runtime/scripts/amalgm-mcp/tests/state-shared-replica.test.js +0 -574
- package/runtime/scripts/amalgm-mcp/tests/state-stream-bootstrap.test.js +0 -223
- package/runtime/scripts/amalgm-mcp/tests/state-stream-replay.test.js +0 -124
- package/runtime/scripts/amalgm-mcp/tests/state-stream.test.js +0 -133
- package/runtime/scripts/amalgm-mcp/tests/system-catalog.test.js +0 -88
- package/runtime/scripts/amalgm-mcp/tests/tasks-store.test.js +0 -113
- package/runtime/scripts/amalgm-mcp/tests/toolbox-artifacts.test.js +0 -88
- package/runtime/scripts/amalgm-mcp/tests/toolbox-cloud-registration.test.js +0 -91
- package/runtime/scripts/amalgm-mcp/tests/toolbox-service.test.js +0 -251
- package/runtime/scripts/amalgm-mcp/tests/windows-release-publish.test.js +0 -88
- package/runtime/scripts/amalgm-mcp/tests/workflows-store-runner.test.js +0 -67
- package/runtime/scripts/amalgm-mcp/tests/workspace-access-store.test.js +0 -120
- package/runtime/scripts/amalgm-mcp/tests/workspace-cards-store.test.js +0 -441
- package/runtime/scripts/amalgm-mcp/tests/workspace-cards.test.js +0 -401
- package/runtime/scripts/amalgm-mcp/tests/workspace-checkpoint-reducer.test.js +0 -116
- package/runtime/scripts/amalgm-mcp/tests/workspace-checkpoint.test.js +0 -327
- package/runtime/scripts/amalgm-mcp/tests/workspace-inclusion.test.js +0 -35
- package/runtime/scripts/amalgm-mcp/tests/workspace-materialize.test.js +0 -54
- package/runtime/scripts/amalgm-mcp/tests/workspace-object-tunnel.test.js +0 -191
- package/runtime/scripts/amalgm-mcp/tests/workspace-objects.test.js +0 -132
- package/runtime/scripts/amalgm-mcp/tests/workspace-publication-invariants.test.js +0 -312
- package/runtime/scripts/amalgm-mcp/tests/workspace-reducer.test.js +0 -986
- package/runtime/scripts/amalgm-mcp/tests/workspace-rest-delete.test.js +0 -128
- package/runtime/scripts/amalgm-mcp/tests/workspace-store.test.js +0 -119
- package/runtime/scripts/amalgm-mcp/tests/workspace-tree-cloud.test.js +0 -155
- package/runtime/scripts/amalgm-mcp/tests/workspace-tree-core.test.js +0 -114
- package/runtime/scripts/amalgm-mcp/tests/workspace-tree-store.test.js +0 -388
- package/runtime/scripts/amalgm-mcp/tests/workspace-wall.test.js +0 -794
- package/runtime/scripts/amalgm-mcp/toolbox/artifacts.js +0 -225
- package/runtime/scripts/amalgm-mcp/toolbox/loadout-context.js +0 -118
- package/runtime/scripts/amalgm-mcp/toolbox/mcp-surface.js +0 -107
- package/runtime/scripts/amalgm-mcp/toolbox/names.js +0 -41
- package/runtime/scripts/amalgm-mcp/toolbox/rest.js +0 -129
- package/runtime/scripts/amalgm-mcp/toolbox/runner.js +0 -196
- package/runtime/scripts/amalgm-mcp/toolbox/service.js +0 -231
- package/runtime/scripts/amalgm-mcp/toolbox/store.js +0 -934
- package/runtime/scripts/amalgm-mcp/toolbox/system-catalog.js +0 -142
- package/runtime/scripts/amalgm-mcp/toolbox/tools.js +0 -219
- package/runtime/scripts/amalgm-mcp/tools/shared-live-smoke.js +0 -227
- package/runtime/scripts/amalgm-mcp/user-api-keys/rest.js +0 -105
- package/runtime/scripts/amalgm-mcp/workflows/compiler.js +0 -227
- package/runtime/scripts/amalgm-mcp/workflows/runner.js +0 -593
- package/runtime/scripts/amalgm-mcp/workflows/store.js +0 -237
- package/runtime/scripts/amalgm-mcp/workspace/access-store.js +0 -182
- package/runtime/scripts/amalgm-mcp/workspace/binding.js +0 -62
- package/runtime/scripts/amalgm-mcp/workspace/card.js +0 -214
- package/runtime/scripts/amalgm-mcp/workspace/cards.js +0 -565
- package/runtime/scripts/amalgm-mcp/workspace/checkpoint.js +0 -430
- package/runtime/scripts/amalgm-mcp/workspace/git.js +0 -418
- package/runtime/scripts/amalgm-mcp/workspace/identity.js +0 -88
- package/runtime/scripts/amalgm-mcp/workspace/materialize.js +0 -292
- package/runtime/scripts/amalgm-mcp/workspace/merge.js +0 -409
- package/runtime/scripts/amalgm-mcp/workspace/objects.js +0 -388
- package/runtime/scripts/amalgm-mcp/workspace/reducer.js +0 -941
- package/runtime/scripts/amalgm-mcp/workspace/repo-scope.js +0 -20
- package/runtime/scripts/amalgm-mcp/workspace/rest.js +0 -943
- package/runtime/scripts/amalgm-mcp/workspace/store.js +0 -322
- package/runtime/scripts/amalgm-mcp/workspace/transition.js +0 -401
- package/runtime/scripts/amalgm-mcp/workspace/tree/access.js +0 -62
- package/runtime/scripts/amalgm-mcp/workspace/tree/identity.js +0 -53
- package/runtime/scripts/amalgm-mcp/workspace/tree/inclusion.js +0 -76
- package/runtime/scripts/amalgm-mcp/workspace/tree/local-state.js +0 -173
- package/runtime/scripts/amalgm-mcp/workspace/tree/operations.js +0 -93
- package/runtime/scripts/amalgm-mcp/workspace/tree/reducer.js +0 -138
- package/runtime/scripts/amalgm-mcp/workspace/tree/snapshot.js +0 -82
- package/runtime/scripts/amalgm-mcp/workspace/tree-cloud.js +0 -391
- package/runtime/scripts/amalgm-mcp/workspace/tree-promotion.js +0 -97
- package/runtime/scripts/amalgm-mcp/workspace/tree-store.js +0 -788
- package/runtime/scripts/amalgm-mcp/workspace/wall.js +0 -885
- package/runtime/scripts/chat-core/adapters/acp-client.js +0 -156
- package/runtime/scripts/chat-core/adapters/claude.js +0 -172
- package/runtime/scripts/chat-core/adapters/codex.js +0 -605
- package/runtime/scripts/chat-core/adapters/cursor.js +0 -265
- package/runtime/scripts/chat-core/adapters/opencode.js +0 -422
- package/runtime/scripts/chat-core/adapters/pi.js +0 -302
- package/runtime/scripts/chat-core/auth.js +0 -264
- package/runtime/scripts/chat-core/chat-payload.js +0 -190
- package/runtime/scripts/chat-core/contract.js +0 -666
- package/runtime/scripts/chat-core/credentials/store.js +0 -213
- package/runtime/scripts/chat-core/egress.js +0 -87
- package/runtime/scripts/chat-core/engine.js +0 -345
- package/runtime/scripts/chat-core/event-schema.js +0 -239
- package/runtime/scripts/chat-core/events.js +0 -195
- package/runtime/scripts/chat-core/index.js +0 -11
- package/runtime/scripts/chat-core/input.js +0 -68
- package/runtime/scripts/chat-core/message-reducer.js +0 -404
- package/runtime/scripts/chat-core/normalizers/claude.js +0 -540
- package/runtime/scripts/chat-core/normalizers/codex.js +0 -415
- package/runtime/scripts/chat-core/normalizers/cursor.js +0 -174
- package/runtime/scripts/chat-core/normalizers/normalizer_spec.md +0 -297
- package/runtime/scripts/chat-core/normalizers/opencode.js +0 -552
- package/runtime/scripts/chat-core/normalizers/pi.js +0 -143
- package/runtime/scripts/chat-core/normalizers/tool_contract.md +0 -123
- package/runtime/scripts/chat-core/normalizers/usage_contract.md +0 -312
- package/runtime/scripts/chat-core/parts.js +0 -26
- package/runtime/scripts/chat-core/recorder.js +0 -66
- package/runtime/scripts/chat-core/runtime.js +0 -86
- package/runtime/scripts/chat-core/server.js +0 -158
- package/runtime/scripts/chat-core/sse.js +0 -206
- package/runtime/scripts/chat-core/stores.js +0 -113
- package/runtime/scripts/chat-core/streams.js +0 -160
- package/runtime/scripts/chat-core/tests/auth.test.js +0 -221
- package/runtime/scripts/chat-core/tests/chat-payload.test.js +0 -221
- package/runtime/scripts/chat-core/tests/claude-normalizer.test.js +0 -144
- package/runtime/scripts/chat-core/tests/cursor.test.js +0 -189
- package/runtime/scripts/chat-core/tests/engine.test.js +0 -397
- package/runtime/scripts/chat-core/tests/message-reducer.test.js +0 -100
- package/runtime/scripts/chat-core/tests/native-binaries.test.js +0 -132
- package/runtime/scripts/chat-core/tests/native-config.test.js +0 -439
- package/runtime/scripts/chat-core/tests/pi.test.js +0 -182
- package/runtime/scripts/chat-core/tests/server.test.js +0 -159
- package/runtime/scripts/chat-core/tests/system-prompt.test.js +0 -67
- package/runtime/scripts/chat-core/tests/workspace-preflight.test.js +0 -116
- package/runtime/scripts/chat-core/tool-display.js +0 -149
- package/runtime/scripts/chat-core/tool-shape.js +0 -173
- package/runtime/scripts/chat-core/tooling/mcp-bundle.js +0 -161
- package/runtime/scripts/chat-core/tooling/mcp-relay.js +0 -97
- package/runtime/scripts/chat-core/tooling/native-binaries.js +0 -662
- package/runtime/scripts/chat-core/tooling/native-config.js +0 -466
- package/runtime/scripts/chat-core/tooling/package-import.js +0 -108
- package/runtime/scripts/chat-core/tooling/runtime-home.js +0 -105
- package/runtime/scripts/chat-core/tooling/system-instructions.js +0 -53
- package/runtime/scripts/chat-core/tooling/system-prompt.js +0 -59
- package/runtime/scripts/chat-core/usage.js +0 -363
- package/runtime/scripts/chat-core/workspace-preflight.js +0 -89
- package/runtime/scripts/chat-server/config.js +0 -112
- package/runtime/scripts/chat-server/db.js +0 -558
- package/runtime/scripts/chat-server/index.js +0 -33
- package/runtime/scripts/chat-server/model-catalog.js +0 -337
- package/runtime/scripts/chat-server.js +0 -76
- package/runtime/scripts/credential-adapter.js +0 -131
- package/runtime/scripts/lib/project-paths.js +0 -95
- package/runtime/scripts/lib/runtime-paths.js +0 -107
- package/runtime/scripts/local-gateway.js +0 -1110
- package/runtime/scripts/platform-context.txt +0 -274
- package/runtime/scripts/port-monitor.js +0 -224
- package/runtime/scripts/proxy-token-store.js +0 -206
- package/runtime/scripts/proxy-token-store.test.js +0 -112
- package/runtime/scripts/runtime-auth.js +0 -162
- package/runtime/tsconfig.json +0 -15
package/PURPOSE.md
ADDED
|
@@ -0,0 +1,1096 @@
|
|
|
1
|
+
# @amalgm/shell — Purpose
|
|
2
|
+
|
|
3
|
+
Amalgm Shell gives a user one dependable machine runtime assembled from the
|
|
4
|
+
published `@amalgm/*` SDKs. An enabled installation should remain available
|
|
5
|
+
while its host can execute, recover without opening a UI, contain a failing
|
|
6
|
+
workload, and leave the machine's resources available for useful work. Shell
|
|
7
|
+
owns composition, process boot, and native host effects; Core and the product
|
|
8
|
+
SDKs own the decisions those effects execute.
|
|
9
|
+
|
|
10
|
+
## Operating axioms
|
|
11
|
+
|
|
12
|
+
These are the required operating contract, not a statement that every current
|
|
13
|
+
installation satisfies it. The [operating contract](docs/operating-contract.md)
|
|
14
|
+
defines the terms and examinations; the [September 2026 audit](docs/operating-audit-2026-09-05.md)
|
|
15
|
+
records implementation gaps and historical evidence.
|
|
16
|
+
The [release environments plan](docs/release-environments-plan.md) records the
|
|
17
|
+
agreed CI/CD and update evolution; its target behavior is not yet delivered.
|
|
18
|
+
|
|
19
|
+
- **O1 — Lifetime follows installation intent.** One installation owner keeps
|
|
20
|
+
the enabled runtime available independently of its launching UI or terminal
|
|
21
|
+
whenever the host can execute and the required machine state is accessible.
|
|
22
|
+
- **O2 — Failure stays with its owner.** A failed workload degrades its own
|
|
23
|
+
capability and declared dependants without restarting its parent or unrelated
|
|
24
|
+
capabilities.
|
|
25
|
+
- **O3 — Recovery has an end.** Automatic process recovery reaches sustained
|
|
26
|
+
health or a durable parked state within a finite attempt budget that parent
|
|
27
|
+
restarts and elapsed backoff cannot replenish.
|
|
28
|
+
- **O4 — Health observation stays available.** Local control and liveness
|
|
29
|
+
perform bounded work independently of product readiness, cloud connectivity,
|
|
30
|
+
and workload size.
|
|
31
|
+
- **O5 — Each decision has one repository owner.** Core owns portable kernel
|
|
32
|
+
policy, each product owns its domain policy, and Shell supplies composition
|
|
33
|
+
and machine effects through their public contracts.
|
|
34
|
+
- **O6 — Resource use follows necessary work.** Every host resource has one
|
|
35
|
+
lifecycle owner and a declared bound, and idle operation performs no work
|
|
36
|
+
except explicitly budgeted health, lease, and reconciliation duties.
|
|
37
|
+
|
|
38
|
+
The detailed axioms below remain binding. Their mechanisms must serve these
|
|
39
|
+
operating rules; a parity-preserved behavior that violates one is a documented
|
|
40
|
+
gap to resolve at its owning SDK, not a reason to perpetuate the violation.
|
|
41
|
+
|
|
42
|
+
## Axioms
|
|
43
|
+
|
|
44
|
+
A materialized row proves local observation, not completed official delivery.
|
|
45
|
+
An independent later observation starts from a settled basis only after earlier
|
|
46
|
+
mutations are accepted, their matching Inbox records resolve, and Apply releases
|
|
47
|
+
their intents; finite observation flushes do not promise global delivery silence.
|
|
48
|
+
Apply retry reads revisit only the requested entities through indexed lookups
|
|
49
|
+
and the same current eligibility rule used by paged discovery; page position
|
|
50
|
+
cannot prevent a due entity from being reconsidered.
|
|
51
|
+
|
|
52
|
+
Managed package delivery starts from a clean, exact main or preview source
|
|
53
|
+
commit. The workflow occurrence supplies only its generated version and source
|
|
54
|
+
record; tests run against those candidate inputs before packing. Every native
|
|
55
|
+
gate and publication use that same tarball and integrity. A candidate tag makes
|
|
56
|
+
bytes available to release assembly; it never promotes an installed runtime.
|
|
57
|
+
Release tooling remains available inside each owner repository so a developer
|
|
58
|
+
or CI job never needs access to another private product repository.
|
|
59
|
+
Registry credentials are available only to the final protected publication job,
|
|
60
|
+
after every native examination proves the exact candidate bytes.
|
|
61
|
+
|
|
62
|
+
Shell owns both the internal `@amalgm/shell` package and the public `amalgm`
|
|
63
|
+
distribution. One tested build supplies both archives; only package identity,
|
|
64
|
+
version and the root lock identity differ. Each final archive passes the same
|
|
65
|
+
native examinations before either becomes a managed public candidate. Public
|
|
66
|
+
metadata records the exact internal archive it was derived from; no wrapper,
|
|
67
|
+
copied Engine implementation or second dependency graph supplies runtime behavior.
|
|
68
|
+
|
|
69
|
+
Consumer assembly reads dependencies from each declared package manifest and
|
|
70
|
+
selects only registry candidates from the same managed branch. It changes exact
|
|
71
|
+
pins and their locks in one reproducible composition change; the consumer's
|
|
72
|
+
complete checks gate merging that exact tree against its unchanged base. Reconciliation keeps one
|
|
73
|
+
pending change per branch, preserves human edits, and never republishes an
|
|
74
|
+
unchanged consumer merely because a notification or check was repeated.
|
|
75
|
+
|
|
76
|
+
1. **The shell implements host effects; SDKs own domain decisions.** Shell
|
|
77
|
+
assembles published capabilities, implements their native effect ports,
|
|
78
|
+
passes configuration, and mounts routes. A portable product decision belongs
|
|
79
|
+
in its product SDK; a portable kernel decision belongs in `@amalgm/core`.
|
|
80
|
+
A missing SDK port is repaired in that owner before Shell consumes it.
|
|
81
|
+
Each SDK remains usable without Shell. Live and Chat preserve their
|
|
82
|
+
Core-free dependency boundaries; Shell injects their host capabilities.
|
|
83
|
+
One installed runtime and command do not require one operating-system
|
|
84
|
+
process: isolation may change the host topology without changing SDK law.
|
|
85
|
+
|
|
86
|
+
Agent-task execution is one example: Agents resolves the current immutable
|
|
87
|
+
revision, Chat owns its new durable conversation and turn, Automations owns
|
|
88
|
+
the queued step and retry key, and Shell only connects those capabilities
|
|
89
|
+
to the selected machine's model, auth, Toolbox, and workspace bindings.
|
|
90
|
+
|
|
91
|
+
The environment controller gives each signed-in user and validated binding one
|
|
92
|
+
OS service outside every UI bundle. It holds an OS-released lease, publishes an
|
|
93
|
+
authenticated control endpoint and supervises one child runtime over IPC. A
|
|
94
|
+
missing heartbeat or a remembered PID never transfers ownership. A child exits
|
|
95
|
+
when its controller disconnects; an intentional stop drains that child before
|
|
96
|
+
releasing ownership. Service adapters derive their names from the same binding
|
|
97
|
+
and never operate another environment's process.
|
|
98
|
+
Every control mutation carries the expected user, binding and owner generation;
|
|
99
|
+
the receiving controller verifies that identity before performing the mutation.
|
|
100
|
+
Authenticating a response after an effect cannot authorize that effect.
|
|
101
|
+
Layer 1 keeps one usable runtime available while the OS session can execute.
|
|
102
|
+
Core supplies its retry allowance, backoff and health timings; Shell records
|
|
103
|
+
each launch in a durable SQLite journal before spawning. Neither elapsed time,
|
|
104
|
+
controller replacement nor repeated service starts grants another attempt.
|
|
105
|
+
Only sustained ready IPC health or an explicit `service retry` resets the
|
|
106
|
+
allowance. Exhaustion parks the child while its controller retains ownership,
|
|
107
|
+
status and stop/retry control; intentional shutdown never launches a replacement.
|
|
108
|
+
Native registration belongs to the current OS account even when the installation
|
|
109
|
+
uses another data home. Windows Task Scheduler owns a hidden action in that
|
|
110
|
+
account's logged-in session; the action owns controller exit recovery using
|
|
111
|
+
Core's restart policy. Scheduler launch retries alone cannot recover a program
|
|
112
|
+
that started successfully and then exited.
|
|
113
|
+
Native service descriptions preserve literal arguments, environment values and
|
|
114
|
+
working directories through the owning OS parser. Each directive uses its own
|
|
115
|
+
grammar; unrepresentable input is refused before replacing a service description.
|
|
116
|
+
Native Watch opens the OS-resolved physical directory; portable or short-name
|
|
117
|
+
aliases cannot become a second path grammar inside a kernel handle.
|
|
118
|
+
Persistent SQLite handles use the OS namespace for the selected file, including
|
|
119
|
+
Windows extended paths; a host API's legacy path limit cannot select another file.
|
|
120
|
+
An active installation from before the ownership protocol must exit once before
|
|
121
|
+
its saved account can move to this controller; a remembered PID is neither a
|
|
122
|
+
stop capability nor permission to start a second writer beside it.
|
|
123
|
+
|
|
124
|
+
Every UI enters one finite setup operation. It serializes installation setup,
|
|
125
|
+
selects the server-approved account, and either proves adoption without changing
|
|
126
|
+
the runtime or acquires that account's runtime lease before enrollment. The OS
|
|
127
|
+
service takes over only after the enrolling foreground owner has drained.
|
|
128
|
+
The operating system selects the credential backend; choosing a data home never
|
|
129
|
+
changes it. Examinations inject their credential store explicitly.
|
|
130
|
+
|
|
131
|
+
2. **Managed bricks arrive through the registry.** Every production/preview
|
|
132
|
+
`@amalgm/*` dependency is an exact published npm version. Explicit local
|
|
133
|
+
development profiles may select local built SDKs; an absent local component
|
|
134
|
+
never silently falls back to a managed package or hosted service.
|
|
135
|
+
Upgrading the runtime means bumping a version, not merging code. Registry
|
|
136
|
+
proof runs under the supported Node executable that launched the gate;
|
|
137
|
+
ambient package-manager shims are not runtime evidence.
|
|
138
|
+
|
|
139
|
+
3. **Parity gates each released service.** The target begins with
|
|
140
|
+
`amalgm-engine`'s runtime surface, then subtracts only owner-approved
|
|
141
|
+
retirements. A service enters the signed Shell release only when its active
|
|
142
|
+
surface answers the same requests the same way. Unreleased services may
|
|
143
|
+
remain in the Engine, but they never run as a fallback beside a released
|
|
144
|
+
Shell service.
|
|
145
|
+
|
|
146
|
+
4. **Each shared host capability has one scoped owner.** Shell constructs
|
|
147
|
+
shared adapters once for their installation scope and injects them instead
|
|
148
|
+
of letting consumers rediscover them. Product-owned resources stay behind
|
|
149
|
+
their SDK's public API: Apps, for example, owns its app processes and store,
|
|
150
|
+
and Shell never opens a second lifecycle owner for them. Portable SDK
|
|
151
|
+
decisions receive effects explicitly and never discover ambient process
|
|
152
|
+
state or disk on their own.
|
|
153
|
+
|
|
154
|
+
5. **Bricks never update themselves; the shell updates.** Every direct `@amalgm/*`
|
|
155
|
+
dependency is pinned to an exact version — no ranges. Publishing a brick
|
|
156
|
+
changes nothing on any user machine until the shell bumps its pin and ships
|
|
157
|
+
a new release through its lane's signed runtime authority. Registry tags
|
|
158
|
+
locate published artifacts; fresh TUF metadata selects installed adoption.
|
|
159
|
+
One version number, one atomic update, one combination that was
|
|
160
|
+
actually tested together — never a per-brick drift of versions in the wild.
|
|
161
|
+
The shrinkwrap fixes the transitive graph as well; direct pins do not
|
|
162
|
+
imply that every consumer resolves the same Core version. Release proof
|
|
163
|
+
checks those actual resolutions and their public contracts, and upgrades
|
|
164
|
+
affected consumers deliberately instead of forcing an untested override.
|
|
165
|
+
|
|
166
|
+
The installed runtime follows the [update axioms](src/updates/README.md).
|
|
167
|
+
Each public managed package declares its controller, process and state-format
|
|
168
|
+
contracts. The native bootstrap stays outside immutable packages and executes
|
|
169
|
+
Core-authored launch intents; a single SQLite commit binds update policy to the
|
|
170
|
+
next controller. Historical signatures identify an already installed baseline,
|
|
171
|
+
and current TUF metadata alone authorizes its desired successor. Every candidate
|
|
172
|
+
is staged with the locked package manager before the previous runtime drains;
|
|
173
|
+
fenced state-format receipts decide whether recovery can safely open its data.
|
|
174
|
+
Local profiles retain their selected sources and do not follow managed targets.
|
|
175
|
+
|
|
176
|
+
5a. **One binding selects the whole installation.** Core's validated label,
|
|
177
|
+
exact source branch and local session select separate mutable roots,
|
|
178
|
+
credentials, databases, process owners and endpoints; production retains
|
|
179
|
+
`~/amalgm`, preview uses `~/amalgm-preview`, and local uses
|
|
180
|
+
`~/amalgm-dev/<session>`. Host effects reserve physical writable roots before
|
|
181
|
+
use, including aliases and enclosing paths, so a second installation cannot
|
|
182
|
+
become another writer of the same ground.
|
|
183
|
+
|
|
184
|
+
6. **Authentication exemptions transfer authority; they do not remove it.**
|
|
185
|
+
Every exempt prefix is explicit and narrow, and the mounted brick must
|
|
186
|
+
authenticate the request with its own session-scoped credential before any
|
|
187
|
+
effect runs.
|
|
188
|
+
|
|
189
|
+
7. **Retirement is measured, not hidden.** A retired Engine surface stays in
|
|
190
|
+
the committed retirement ledger and is excluded from both routing and the
|
|
191
|
+
active parity denominator. Removing a dead contract must never look like
|
|
192
|
+
serving it.
|
|
193
|
+
|
|
194
|
+
8. **The shell is the production runtime for its signed release.** The `amalgm`
|
|
195
|
+
bootstrap may install, supervise, and update the shell, but it never starts
|
|
196
|
+
an Engine implementation beside it or falls back to copied Engine behavior.
|
|
197
|
+
The current release is Core + Files + Agents + Tools + Chat.
|
|
198
|
+
|
|
199
|
+
9. **Login is Core followed by Live.** Core owns authentication, credential
|
|
200
|
+
separation, installation verification, restart proof, and readiness. Its
|
|
201
|
+
mandatory Files step is one `@amalgm/live` user-ground convergence call;
|
|
202
|
+
the shell supplies filesystem, SQLite, Watch, and cloud-wire effects only.
|
|
203
|
+
|
|
204
|
+
10. **One wire reaches the existing authority.** The shell's Live adapter uses
|
|
205
|
+
the authenticated `/wire` private-resource protocol already backed by
|
|
206
|
+
Postgres and R2. A test-only bucket, local cloud, or parallel HTTP authority
|
|
207
|
+
cannot become the production path.
|
|
208
|
+
|
|
209
|
+
11. **A clean account is the cutover examination.** Two isolated Fly machines
|
|
210
|
+
log into the same previously unused account. Machine A conditionally
|
|
211
|
+
publishes the complete user ground; machine B materializes the same UUID
|
|
212
|
+
graph and bytes into a different local SQLite database before Watch. No
|
|
213
|
+
legacy Amalgm directory is mounted into either machine.
|
|
214
|
+
|
|
215
|
+
12. **Boot is idempotent over portable state.** Starting the runtime may
|
|
216
|
+
create state that is absent, but it never rewrites a semantically
|
|
217
|
+
unchanged tracked file with a machine-local timestamp. A materialized
|
|
218
|
+
user ground stays byte-exact until a real user or product mutation occurs.
|
|
219
|
+
|
|
220
|
+
13. **The signed graph bounds boot effects.** Machine readiness starts exactly
|
|
221
|
+
the services named by the verified release. Declared directories and tool
|
|
222
|
+
artifacts may represent later products, but an unreleased product cannot
|
|
223
|
+
instantiate itself, create a database, or mutate user ground during login.
|
|
224
|
+
|
|
225
|
+
14. **Service commands remain service-owned.** The shell parses and routes
|
|
226
|
+
`amalgm <service> <command>`, supplies authenticated host effects, and
|
|
227
|
+
renders the result. `files register` and `files add` decisions live in
|
|
228
|
+
`@amalgm/live`; adding a shell-side Files implementation is forbidden.
|
|
229
|
+
|
|
230
|
+
14a. **Automations CLI is one service-owned command surface.** Shell discovers
|
|
231
|
+
the selected signed-in runtime, supplies its loopback admission credential,
|
|
232
|
+
and delegates `amalgm automations <command>` parsing, schemas, envelopes,
|
|
233
|
+
and behavior to `@amalgm/automations`. The CLI never owns a second
|
|
234
|
+
Automations contract and never receives the durable machine credential or
|
|
235
|
+
device key.
|
|
236
|
+
|
|
237
|
+
14b. **Channels CLI is one service-owned command surface.** Shell discovers
|
|
238
|
+
the selected signed-in runtime, supplies its loopback admission credential,
|
|
239
|
+
and delegates `amalgm channels <command>` parsing, schemas, envelopes, and
|
|
240
|
+
behavior to `@amalgm/channels`. The CLI never owns a second Channels
|
|
241
|
+
contract and never receives the durable machine credential or device key.
|
|
242
|
+
|
|
243
|
+
14c. **An idle Automations worker waits for a notification.** Shell wires the
|
|
244
|
+
Automations SDK's authenticated event stream and executor into one worker;
|
|
245
|
+
it owns no work-polling timer, schedule clock, or delivery queue. Startup
|
|
246
|
+
and reconnect establish notification coverage before claiming retained work.
|
|
247
|
+
|
|
248
|
+
15. **Cloud materialization replaces only portable ground.** When the local
|
|
249
|
+
SQLite projection is absent, stale, or empty, the cloud graph replaces the
|
|
250
|
+
tracked user-ground namespace while the machine-only `.amalgm` control
|
|
251
|
+
tree remains intact. A failed install leaves a clean retry boundary, never
|
|
252
|
+
a partial portable tree.
|
|
253
|
+
|
|
254
|
+
16. **The process that owns Watch owns its shutdown.** A running host flushes
|
|
255
|
+
every filesystem event Watch observed, closes coverage, checks once more
|
|
256
|
+
for queued events, and only then tears down its wire. `files register` and
|
|
257
|
+
`files add` execute inside that same running host, so declaration, SQLite,
|
|
258
|
+
cloud, and Watch work use the established owners rather than constructing a
|
|
259
|
+
second lifecycle. Register waits through graph reconciliation, healthy
|
|
260
|
+
coverage, capture of every repository parcel, immutable upload, and
|
|
261
|
+
graph-head commit before it returns. An uncapturable repository may settle
|
|
262
|
+
its local type and identity evidence, but Register fails and retains its
|
|
263
|
+
durable declaration; no graph containing a `repo.git` without its verified
|
|
264
|
+
Card + Checkpoint transport can become the cloud head. The
|
|
265
|
+
watcher established after authoritative materialization remains the one
|
|
266
|
+
ongoing watcher; the CLI never creates and immediately closes a second
|
|
267
|
+
Watch lifecycle. Closing an unchanged watcher does not invent a full scan. A
|
|
268
|
+
gateway response belongs to the exact wire that delivered its request; if
|
|
269
|
+
that source closes first, the late response is discarded cleanly rather
|
|
270
|
+
than sent through a replacement or closed wire. Closing is a one-way
|
|
271
|
+
lifecycle boundary: an in-flight rescan may finish its durable work, but it
|
|
272
|
+
can never recreate watcher handles afterward. One logical content watcher
|
|
273
|
+
covers each outermost materialized tree: macOS and Windows use the native
|
|
274
|
+
recursive primitive, while Linux expands it to exactly one inotify handle
|
|
275
|
+
per directory. Enclosed logical roots share it, and one non-recursive
|
|
276
|
+
watcher on the outer root's parent guards the root address itself. Roots
|
|
277
|
+
with the same parent share that address watcher. An address ring names a
|
|
278
|
+
root whose own directory entry changed. If the directory at that address
|
|
279
|
+
is still the same device, inode, and filesystem creation generation its
|
|
280
|
+
content handle was opened on, that handle already covers everything inside
|
|
281
|
+
and the ring adds nothing; missing ground, a lost handle, or a replaced
|
|
282
|
+
directory retires the handle, re-establishes coverage, and puts the
|
|
283
|
+
complete root in question. On macOS
|
|
284
|
+
each handle is its own FSEvents stream through the `fsevents` binding, so
|
|
285
|
+
opening or closing one never interrupts another; Node's own watcher serves
|
|
286
|
+
every handle in the process from one stream that it recreates, resuming
|
|
287
|
+
from the present, on every change, and loses the events in between.
|
|
288
|
+
Initialization failure or handle death is reported as degraded, retains
|
|
289
|
+
full-root suspicion, and retries independently of Detect; it can never be
|
|
290
|
+
reported as active coverage.
|
|
291
|
+
|
|
292
|
+
17. **Independent content may travel concurrently; authority remains atomic.**
|
|
293
|
+
The host bounds parallel uploads for small immutable objects and processes
|
|
294
|
+
large objects sequentially so repository size cannot imply unbounded
|
|
295
|
+
memory. The registry head advances only after every referenced object is
|
|
296
|
+
durably acknowledged.
|
|
297
|
+
|
|
298
|
+
18. **A Git repository travels through Git.** Filesystem marker presence
|
|
299
|
+
classifies `repo.git` independently of whether Git commands succeed; a Git
|
|
300
|
+
failure defers cloud publication for that materialized root but never
|
|
301
|
+
demotes the entity, admits `.git` as ordinary ground, or prevents the
|
|
302
|
+
watching runtime and unrelated roots from becoming ready. The host asks Git to pack the declared
|
|
303
|
+
refs against the authority's known object frontier and asks Git to index
|
|
304
|
+
received packs. Every directory with a `.git` directory or file begins its
|
|
305
|
+
own repository rail. Ordinary children keep their UUID rows locally and
|
|
306
|
+
ride in the nearest repository state metadata; a nested repository and its
|
|
307
|
+
ancestry spine remain in the cloud graph, carry their own Card + Checkpoint,
|
|
308
|
+
and materialize after their enclosing repository. The enclosing Card keeps
|
|
309
|
+
its own Gitlink and index truth, but its Checkpoint excludes the nested
|
|
310
|
+
worktree because that state belongs exclusively to the nested rail. Its
|
|
311
|
+
enclosing identity entry carries only path, UUID, and type—never the nested
|
|
312
|
+
repository's payload head. A shallow boundary travels with that metadata
|
|
313
|
+
and is installed before Git reads the imported objects.
|
|
314
|
+
|
|
315
|
+
19. **Live owns transfer; Shell owns transfer effects.** `@amalgm/live`
|
|
316
|
+
decides which entity types have artifacts, which chunks are missing, when
|
|
317
|
+
an upload manifest may commit, and when a download is verified. The Shell
|
|
318
|
+
adapter supplies one seekable verified source — immutable cache evidence
|
|
319
|
+
when present, otherwise the exact registered ground selected by its UUID
|
|
320
|
+
row — plus the authority inventory probe and a machine-local
|
|
321
|
+
content-addressed artifact cache with reusable block locators. It never
|
|
322
|
+
discovers identity, reclassifies ground, materializes, or publishes inside
|
|
323
|
+
those transfer effects. Upload bytes use the authenticated binary
|
|
324
|
+
WebSocket rail. For downloads, Shell obtains the authorized resource key
|
|
325
|
+
once per process, keeps it only in memory, batches short-lived URL-signing
|
|
326
|
+
requests through the gateway, fetches fixed-overhead binary envelopes
|
|
327
|
+
directly from R2, and opens them through Live's protection contract. The
|
|
328
|
+
gateway never relays download bytes, JSON/base64 is not a content
|
|
329
|
+
transport, and no older download rail remains.
|
|
330
|
+
|
|
331
|
+
20. **Git is the repository-transfer performance gate.** On the same source,
|
|
332
|
+
destination inventory, machine, and network path, cold upload sends the
|
|
333
|
+
same Git object pack as a native push and incremental upload sends only the
|
|
334
|
+
newly missing objects. Timing comparisons use repeated runs because wall
|
|
335
|
+
clocks are noisy; byte-work parity is exact and any fixed Amalgm metadata
|
|
336
|
+
overhead is reported separately.
|
|
337
|
+
|
|
338
|
+
20a. **Content layout and cloud namespace advance together.** The host names
|
|
339
|
+
the one current manifest contract on every file-block write and exact
|
|
340
|
+
read. With no customer data requiring an older reader, a content cutover
|
|
341
|
+
deploys the authority first and its matching clients second; obsolete
|
|
342
|
+
namespaces, wire fields, and fallback readers are deleted rather than
|
|
343
|
+
becoming a parallel protocol.
|
|
344
|
+
|
|
345
|
+
20b. **Compression is a wire choice, never content identity.** A bounded file
|
|
346
|
+
batch may use fast compression only when it becomes meaningfully smaller.
|
|
347
|
+
Hashes, manifests, caches, and R2 protection always prove the exact decoded
|
|
348
|
+
bytes; incompressible input travels unchanged.
|
|
349
|
+
|
|
350
|
+
21. **Watch events preserve suspicion until proof.** Watch records only the
|
|
351
|
+
producing handle plus an optional relative path: a named event preserves
|
|
352
|
+
that hint and a nameless or invalid event widens to the complete covered
|
|
353
|
+
root. It does not read `.amalgmignore`, inspect `.git`, classify a file, or
|
|
354
|
+
infer create, move, rename, and delete semantics. Detect reads live policy
|
|
355
|
+
and repository evidence when it observes the suspicion. Only Core's fixed
|
|
356
|
+
`.amalgm/` control subtree is structurally outside Files ground and may be
|
|
357
|
+
dropped at the host callback boundary. A scan settles only the generations
|
|
358
|
+
it observed, so an event received during that scan remains pending.
|
|
359
|
+
|
|
360
|
+
22. **Git supplies clean repository evidence.** Registration obtains clean
|
|
361
|
+
tracked leaf identity and text/binary classification from Git's index,
|
|
362
|
+
attributes, and object database. It reads worktree bytes only for dirty or
|
|
363
|
+
untracked leaves. Git ignore never becomes Amalgm enrollment policy.
|
|
364
|
+
|
|
365
|
+
23. **Cold add never rereads a repository graph.** Download verifies and
|
|
366
|
+
seals each content-addressed transport to a file, streams its Git pack
|
|
367
|
+
range directly into `index-pack`, and derives local SQLite rows from the
|
|
368
|
+
transported UUID/type/payload identity map plus filesystem stats. Nested
|
|
369
|
+
repository rails are applied outside-in at the UUID paths certified by
|
|
370
|
+
their enclosing identity maps. It does not buffer a complete repository
|
|
371
|
+
parcel or reclassify checked-out files.
|
|
372
|
+
|
|
373
|
+
24. **Machine caches are disposable evidence.** A cached immutable object is
|
|
374
|
+
reusable only when its bytes satisfy the current format and the persisted
|
|
375
|
+
entity identity. Missing, corrupt, or obsolete cache bytes are removed and
|
|
376
|
+
recomputed from authoritative local ground; they never become a legacy
|
|
377
|
+
compatibility requirement and never prevent the machine from resuming.
|
|
378
|
+
A pending Send consults its capture-derived manifest and the authority's
|
|
379
|
+
immutable inventory before opening local cargo: after upload succeeded but
|
|
380
|
+
before its acknowledgement became durable, complete cloud cargo is enough
|
|
381
|
+
to finish the same mutation retry. Local bytes are required only for blocks
|
|
382
|
+
the authority proves are still missing. Shell moves exactly the cargo heads
|
|
383
|
+
named by the Record: a structural Record names no cargo and cannot resend
|
|
384
|
+
the entity's existing bytes. When the negotiated wire supports it and all
|
|
385
|
+
declared cargo is bounded, Shell supplies the cached manifest and blocks to
|
|
386
|
+
Live for the same submit frame; otherwise it uses the ordinary missing-block
|
|
387
|
+
effect. The cloud, not Shell, owns the final seal-before-number decision.
|
|
388
|
+
Cache bytes remain only while an unresolved durable operation names their
|
|
389
|
+
content head or while the current verified text or repository head is the
|
|
390
|
+
one exact base for that entity's next delta. Once Send acceptance is
|
|
391
|
+
durable, Shell removes every sealed artifact and manifest that neither a
|
|
392
|
+
pending Record nor a current replay base retains; restart performs the same
|
|
393
|
+
derivation from SQLite, so accepted history cannot accumulate as machine
|
|
394
|
+
storage.
|
|
395
|
+
|
|
396
|
+
25. **Each cold stage performs only its necessary byte pass.** Registration
|
|
397
|
+
reads every ordinary text or binary file once through the bounded capture
|
|
398
|
+
stream to classify it, derive its content head, and retain large-file
|
|
399
|
+
manifest evidence; a graph publication does not also copy those bytes into
|
|
400
|
+
the disposable cache. Upload first proves which heads are already sealed,
|
|
401
|
+
touches no source for those heads, and reads each remaining artifact once
|
|
402
|
+
from the strongest available evidence: an existing verified cache object,
|
|
403
|
+
otherwise its registered ground path. Every emitted block is checked
|
|
404
|
+
against the captured head. If ground moved between capture and Upload, the
|
|
405
|
+
unsubmitted publication is discarded and Register performs a bounded fresh
|
|
406
|
+
capture; stale bytes never travel. Download opens each sealed R2 object
|
|
407
|
+
once. During Add, ordinary text and binary plaintext lands directly in its
|
|
408
|
+
resumable hidden destination; retained chunks are re-proven on recovery,
|
|
409
|
+
so no second whole-artifact cache copy or seal pass sits on the cold path.
|
|
410
|
+
Links, repository transports, warm cached content, and non-Add callers
|
|
411
|
+
keep their dedicated adapter/cache rails. Because Register does not retain a
|
|
412
|
+
text replay base solely for future edits, the first later text save may
|
|
413
|
+
carry a full verified snapshot; that save's own capture establishes the
|
|
414
|
+
base used by subsequent deltas.
|
|
415
|
+
|
|
416
|
+
26. **A Files effect command is not a second login.** `files add` proves the
|
|
417
|
+
selected ready machine, authenticates to its already-running loopback
|
|
418
|
+
runtime, and asks that runtime's existing Files host to download the
|
|
419
|
+
selected graph. It does not run Core convergence, rescan existing ground,
|
|
420
|
+
or create a second cloud wire, SQLite writer, or Watch host.
|
|
421
|
+
27. **Block identity does not dictate transport shape.** Upload may group
|
|
422
|
+
adjacent blocks in bounded binary frames. Download asks the gateway only
|
|
423
|
+
for authorization material and batches of short-lived object URLs; each
|
|
424
|
+
sealed manifest or block then travels directly from R2 to the runtime.
|
|
425
|
+
Content hashes and verification remain identical across those transport
|
|
426
|
+
choices.
|
|
427
|
+
28. **Cache evidence is transactional metadata.** A partial or sealed file's
|
|
428
|
+
block evidence is one disposable machine-local SQLite index, so a cold
|
|
429
|
+
file never creates hundreds of marker files merely to prove resumability.
|
|
430
|
+
29. **Independent files overlap; memory stays bounded.** Add downloads several
|
|
431
|
+
distinct text, binary, or link artifacts concurrently, deduplicates equal
|
|
432
|
+
content heads before transport, and lowers each file's internal batch
|
|
433
|
+
window so the combined cold byte window remains bounded.
|
|
434
|
+
|
|
435
|
+
30. **Files commands converge on one watching runtime.** `amalgm files
|
|
436
|
+
register <workspace>` asks the already-running runtime to create or reuse
|
|
437
|
+
the durable declaration, reconcile the entity graph by UUID and
|
|
438
|
+
containment, establish healthy Watch coverage, upload immutable content,
|
|
439
|
+
and commit the cloud head before returning success.
|
|
440
|
+
`amalgm files add <workspace>` asks that runtime to materialize the selected
|
|
441
|
+
cloud graph, refresh the exact durable reference inventory in core ground,
|
|
442
|
+
and extend its existing Watch coverage before returning. References to
|
|
443
|
+
unselected boundaries stay dangling and create no workspace rows or bytes.
|
|
444
|
+
Add refuses any destination that overlaps already materialized Amalgm
|
|
445
|
+
ground, including the user's own home, so one physical tree can never
|
|
446
|
+
acquire two graph roles or expose staging through an existing watcher.
|
|
447
|
+
Add first journals one local installation intent, downloads into a private
|
|
448
|
+
staging directory beside the destination, and verifies the complete graph.
|
|
449
|
+
It then commits the exact entity rows in one transaction, atomically moves
|
|
450
|
+
the verified ground into place, and exposes its binding last. The intent is
|
|
451
|
+
removed only after healthy Watch coverage exists. Entity rows therefore
|
|
452
|
+
never mean "pending download": a restart resumes the one intent from
|
|
453
|
+
immutable authority plus locally re-proven staging and can repair any
|
|
454
|
+
interrupted reveal without reminting identity. Ground that was already
|
|
455
|
+
visible across a restart is never
|
|
456
|
+
accepted as an authoritative install baseline: Watch retains complete
|
|
457
|
+
suspicion and Detect settles that blind interval before the intent clears.
|
|
458
|
+
Hidden staging is untrusted resume substrate, never materialized truth.
|
|
459
|
+
Ordinary text and binary chunks land directly at their hidden staged
|
|
460
|
+
destinations, and an interrupted Add may retain them only with disposable
|
|
461
|
+
chunk evidence beside the ground database. Resume rereads and re-hashes
|
|
462
|
+
every retained chunk against the pinned manifest, downloads every missing
|
|
463
|
+
or corrupt chunk, and proves the ordered whole-artifact hash. Durability
|
|
464
|
+
is one explicit barrier over the whole staged tree — every file,
|
|
465
|
+
duplicate, and repository — that must succeed before entity rows are
|
|
466
|
+
committed or ground is revealed; no staged file is fsynced on its own. A
|
|
467
|
+
failed barrier leaves the intent retained, no rows committed, no visible
|
|
468
|
+
destination, and staging re-proven as untrusted on retry. Links and
|
|
469
|
+
repository transports keep their type-specific cache and adapter rails.
|
|
470
|
+
One recovered Add intent that cannot currently be satisfied remains
|
|
471
|
+
durable and reports its exact failure, but it cannot hold unrelated machine
|
|
472
|
+
readiness or other Add responsibilities hostage.
|
|
473
|
+
Add and Add recovery read only the selected workspace's recursive closure
|
|
474
|
+
and the exact reference parents they must refresh; unrelated materialized
|
|
475
|
+
workspaces remain SQLite facts and never become the selected operation's
|
|
476
|
+
in-memory graph.
|
|
477
|
+
Staging beside the destination makes the reveal an atomic rename on every
|
|
478
|
+
supported filesystem.
|
|
479
|
+
Register reuses identity at the same native address. Device and inode may
|
|
480
|
+
rescue a move only when the prior address is gone; a different address
|
|
481
|
+
that is still present is a collision or hard link, never the same entity.
|
|
482
|
+
The refreshed references and their parent container's derived membership
|
|
483
|
+
version enter machine SQLite in one transaction, so the authoritative
|
|
484
|
+
install is already internally consistent before Watch opens it.
|
|
485
|
+
Neither command creates a second long-lived watcher. Certification inspects
|
|
486
|
+
real health and handle topology rather than accepting `{ active: true }`.
|
|
487
|
+
A graph that `add` has just materialized and verified is the initial
|
|
488
|
+
baseline for that newly covered root, so Watch does not report the
|
|
489
|
+
downloader's own writes as user edits; every later OS notification remains
|
|
490
|
+
ordinary suspicion. The same verified notebook is Apply's materialization
|
|
491
|
+
baseline: the newest retained Inbox result that exactly equals each
|
|
492
|
+
installed row advances that entity's resolved and materialized sequence
|
|
493
|
+
without replaying historical cargo, while every later different result
|
|
494
|
+
remains ordinary Apply work. Watch may establish native coverage before
|
|
495
|
+
startup Apply is ready, but its suspicions remain unconsumed until Apply
|
|
496
|
+
has adopted or resumed durable materialization. Startup adopts that
|
|
497
|
+
baseline while holding every watched ground cone; only after Apply starts
|
|
498
|
+
does one Detect generation consume the rings accumulated during boot. An
|
|
499
|
+
older Detect transaction settles first and any newer Watch generation
|
|
500
|
+
waits until adoption finishes. Register
|
|
501
|
+
and Watch enumerate the same durable binding inventory, so a missed
|
|
502
|
+
notification for rendering the portable reference cannot make either the
|
|
503
|
+
reference row or its declared external
|
|
504
|
+
boundary disappear from registration. Registering an enclosing parent
|
|
505
|
+
reuses every known descendant UUID and rewrites containment/root projection atomically;
|
|
506
|
+
overlapping registrations never create a second identity family.
|
|
507
|
+
Register success is scoped to the selected workspace's SQLite row, its
|
|
508
|
+
exact durable reference row, immutable content, cloud-head membership for
|
|
509
|
+
both identities, and healthy coverage; merely finding a previously
|
|
510
|
+
discovered nested target is not completed registration. It never waits for
|
|
511
|
+
unrelated Watch traffic across the machine to become silent.
|
|
512
|
+
Registration consumes the suspicion created when Watch reconciles the new
|
|
513
|
+
durable root. Its cold proof reads only core reference ground and the one
|
|
514
|
+
physical coverage family containing that boundary; it never enumerates,
|
|
515
|
+
scans, or reprojects unrelated existing roots. Any unrelated suspicion
|
|
516
|
+
remains ordinary ongoing work of the same host.
|
|
517
|
+
Re-declaring a workspace already present in local identity and the cloud
|
|
518
|
+
head is therefore an idempotent proof, not a second Detect scan; Watch
|
|
519
|
+
continues to own subsequent content changes. Ending any cold command
|
|
520
|
+
rearms a Watch generation that arrived while that command temporarily
|
|
521
|
+
suppressed Detect; a successful idempotent proof cannot strand pending
|
|
522
|
+
suspicion.
|
|
523
|
+
31. **A cold graph publication proves cargo closure under the current
|
|
524
|
+
contract.** A replacement of the selected complete logical roots is one
|
|
525
|
+
atomic cloud operation; unrelated roots already held by authority are
|
|
526
|
+
preserved there and never retransmitted. Their presence in the resulting
|
|
527
|
+
portable graph never makes this machine responsible for those content
|
|
528
|
+
bytes. A graph head never proves cargo: a record in any head may name
|
|
529
|
+
content sealed only under a prior content contract, whose namespace the
|
|
530
|
+
current readers never touch. Only the authority's durable seal for the
|
|
531
|
+
exact (resource, content hash, current content contract) proves an
|
|
532
|
+
artifact's cargo. Before advancing the head — and before answering an
|
|
533
|
+
idempotent re-declaration — the machine asks the authority which of its
|
|
534
|
+
locally materialized content heads are sealed under the current contract
|
|
535
|
+
and uploads exactly the remainder, so Register re-establishes cargo
|
|
536
|
+
closure before returning even when the graph itself is unchanged. The
|
|
537
|
+
finite publication journal retains this exact upload subset across
|
|
538
|
+
retries. This remains true when the local materialization boundary has a
|
|
539
|
+
portable parent outside the local projection.
|
|
540
|
+
|
|
541
|
+
32. **Coverage precedes recovery, and coverage is not currency.** On process
|
|
542
|
+
start Watch first opens the same durable root topology, then Detect closes
|
|
543
|
+
the interval during which no watcher existed. Healthy handles prove that
|
|
544
|
+
new changes cannot be missed; a root remains `catching-up` until its saved
|
|
545
|
+
uncertainty has been inspected and settled.
|
|
546
|
+
|
|
547
|
+
33. **Restart catch-up glances before it opens.** Machine SQLite persists each
|
|
548
|
+
entity's device, inode, kind, size, mode, modification time, and change
|
|
549
|
+
time, plus the instant at which leaf content was last verified. A complete
|
|
550
|
+
recovery walk enumerates names and compares that stat fingerprint without
|
|
551
|
+
reading a stable leaf only when its modification time strictly predates
|
|
552
|
+
that content witness; same-tick evidence is deliberately rechecked. Stable
|
|
553
|
+
directories need no reclassification. New or changed entries enter the
|
|
554
|
+
ordinary Detect and Record path. Directory membership is reused, while
|
|
555
|
+
the cheap `.git` marker classification is always observed from current
|
|
556
|
+
ground. Repository roots re-prove Card + Checkpoint state through Git,
|
|
557
|
+
because `.git` is deliberately outside the entity graph — but on a complete
|
|
558
|
+
pass Git's own records may stand in for the conversation: each accepted
|
|
559
|
+
capture seals a spawn-free fingerprint of HEAD, every loose ref,
|
|
560
|
+
packed-refs, the stash reflog, config, the shallow boundary, and the index
|
|
561
|
+
file's bytes and physical identity, bound to the exact heads and identity
|
|
562
|
+
map it certified.
|
|
563
|
+
Only when the current fingerprint, the stored heads, the derived identity, and every
|
|
564
|
+
owned entry's stat fingerprint all still match that seal is the Git
|
|
565
|
+
conversation skipped. Any single doubt — including a gitfile boundary or a
|
|
566
|
+
Git storage layout those state files do not fully describe — asks Git in
|
|
567
|
+
full.
|
|
568
|
+
|
|
569
|
+
34. **Recovery work and evidence are root-scoped.** Each logical root reports
|
|
570
|
+
its own `catching-up` or `current` state, records its own scan evidence, and
|
|
571
|
+
commits its local projection independently. Detect yields between roots so
|
|
572
|
+
one large recovery walk cannot erase Watch events or hide the readiness of
|
|
573
|
+
unrelated coverage. A root with no current suspicion is reused without
|
|
574
|
+
inspection even when an old repository rail there remains incomplete; its
|
|
575
|
+
own next event or startup suspicion retries that rail. The portable
|
|
576
|
+
registry head remains one atomic graph. Catch-up holds at most one complete
|
|
577
|
+
evidence graph in memory; materialization membership streams from SQLite
|
|
578
|
+
and Detect never builds an unused second portable snapshot. Rows are
|
|
579
|
+
assigned to disjoint outermost roots in one path-depth-bounded pass; restart
|
|
580
|
+
never compares every entity against every registered root.
|
|
581
|
+
Command proofs use indexed existence, descendant-count, and UUID queries;
|
|
582
|
+
they never materialize the complete machine graph merely to answer a
|
|
583
|
+
selected root's yes/no or count question. Cloud publication reads only the
|
|
584
|
+
portable record projection from SQLite, never a second path-and-stat graph.
|
|
585
|
+
A committed cloud registry is likewise held as its small immutable head:
|
|
586
|
+
login reads the core root, Add reads the core root plus its selected
|
|
587
|
+
boundary, and publication carries untouched roots forward by page identity.
|
|
588
|
+
No operation flattens an unrelated cloud root into memory.
|
|
589
|
+
|
|
590
|
+
35. **Container membership is version input, never cargo.** A workspace or
|
|
591
|
+
folder derives its logical version from the UUIDs and names of active
|
|
592
|
+
direct children, while its portable and notebook `payloadVersion` remains
|
|
593
|
+
null. Shell normalizes that boundary before Detect and after every Apply
|
|
594
|
+
projection transaction. An independently ordered container receipt may
|
|
595
|
+
therefore create, move, or rename its address, but it can never overwrite
|
|
596
|
+
membership already established by child UUID rows or emit a second
|
|
597
|
+
container mutation for that derivation. Local adapter evidence can never
|
|
598
|
+
masquerade as a transferable content head.
|
|
599
|
+
|
|
600
|
+
36. **Portable path grammar becomes a native path only at the host boundary.**
|
|
601
|
+
Core and Live describe path components with `/`; Shell performs portable
|
|
602
|
+
parent and name operations with that grammar, preserving `\\` as a literal
|
|
603
|
+
character, and only then resolves those components with the host platform's
|
|
604
|
+
path semantics for a filesystem effect. Durable records never rewrite or
|
|
605
|
+
mix separators accidentally.
|
|
606
|
+
|
|
607
|
+
37. **Git materialization reproduces Card bytes independently of machine
|
|
608
|
+
preferences.** A repository created by Add disables receiver-global line
|
|
609
|
+
ending conversion before checkout. Platform Git configuration cannot
|
|
610
|
+
silently rewrite the committed object truth carried by the Card.
|
|
611
|
+
|
|
612
|
+
38. **The effect owner closes every native resource it opens.** Shell shutdown,
|
|
613
|
+
completed downloads, and examination teardown release their SQLite,
|
|
614
|
+
process, socket, and watcher handles before ground may be moved, deleted,
|
|
615
|
+
or reopened. Unix permission to unlink an open file is never used as proof
|
|
616
|
+
of a complete lifecycle.
|
|
617
|
+
|
|
618
|
+
39. **A finite CLI command leaves no transport alive after its result.** The
|
|
619
|
+
running runtime alone owns persistent connections; register and add close
|
|
620
|
+
their loopback request before the command process exits. That request is
|
|
621
|
+
bounded by the service result, never by a generic HTTP response-header
|
|
622
|
+
deadline: fresh-byte Register and Add journeys may legitimately take
|
|
623
|
+
minutes while their durable work continues.
|
|
624
|
+
|
|
625
|
+
40. **Interactive processes use the host's declared shell.** Unix reads
|
|
626
|
+
`SHELL`; Windows reads `ComSpec`; a test or deployment may override that
|
|
627
|
+
declaration, but Shell never assumes one platform's executable on another.
|
|
628
|
+
|
|
629
|
+
41. **Runtime admission and Files currency are independent boundaries.** Files
|
|
630
|
+
convergence and the ongoing Watch → Detect path alone decide whether ground
|
|
631
|
+
is current. Starting a runtime advertises its already-listening gateway and
|
|
632
|
+
waits for the authority's acknowledgement; it never forces another scan or
|
|
633
|
+
waits for watcher silence.
|
|
634
|
+
|
|
635
|
+
42. **Finite shutdown has one explicit observation cutoff.** Shell first marks
|
|
636
|
+
every covered root suspect, retires native Watch handles, and then performs
|
|
637
|
+
one final Detect/Record pass. Native events cannot make shutdown unbounded;
|
|
638
|
+
changes after the cutoff remain inside the blind interval that startup
|
|
639
|
+
catch-up is required to close.
|
|
640
|
+
|
|
641
|
+
43. **Record commits evidence before Watch settles.** The host reconciles a
|
|
642
|
+
Watch generation against one last-verified detection notebook, writes the
|
|
643
|
+
exact portable Detect proposals into the local-only record outbox, and
|
|
644
|
+
advances that notebook in the same SQLite transaction. The materialized
|
|
645
|
+
`entities` table contains only ground present on this machine; the notebook
|
|
646
|
+
may retain the UUID and last verified evidence for missing ground so an
|
|
647
|
+
external disappearance cannot invent a delete or a replacement identity.
|
|
648
|
+
Repository boundaries own the portable changes of their enclosed children:
|
|
649
|
+
gaining `.git` records one Card + Checkpoint transition, while losing it
|
|
650
|
+
recaptures those children through their newly selected file rails. Watch
|
|
651
|
+
settles only after this transaction is durable and never interprets any of
|
|
652
|
+
these meanings itself. Filesystem observation is optimistic: the commit
|
|
653
|
+
compares every changed UUID with the exact notebook row the pass observed.
|
|
654
|
+
If Apply or another Detect advanced any basis row while the filesystem was
|
|
655
|
+
being read, the whole commit is refused and the retained Watch generation
|
|
656
|
+
observes fresh truth; stale evidence can never overwrite proof or create an
|
|
657
|
+
outgoing echo.
|
|
658
|
+
|
|
659
|
+
44. **One Detect job proves one finite Watch generation, root by root.** A
|
|
660
|
+
scheduled pass or explicit flush observes and settles only the generations
|
|
661
|
+
it froze before reading truth, and it observes only roots with pending
|
|
662
|
+
suspicion. A root that no callback rang costs nothing: no walk, no
|
|
663
|
+
notebook plan, no repository inspection, no ground coordination. Each rung
|
|
664
|
+
root is first proved on its own named lane and settled as soon as its
|
|
665
|
+
transaction is durable; only a root the named lane declines widens to
|
|
666
|
+
reconciliation, and only that root. Metadata noise inside one repository
|
|
667
|
+
root is proved inside that root. Two facts alone can pull an unobserved
|
|
668
|
+
root into a pass: core ground missing a portable reference for a binding,
|
|
669
|
+
and a bound root that has never produced a row. Large walks yield the
|
|
670
|
+
event loop periodically so the wire, Receive, and Apply keep running while
|
|
671
|
+
a root is proved; a ring during that yield remains a later generation. An explicit flush waits until the cutoff it created is
|
|
672
|
+
settled even when it first joins an older in-flight Detect job. Neither
|
|
673
|
+
success nor failure from that older job decides the later cutoff. A ring
|
|
674
|
+
received during that read remains pending and owns a later bounded pass;
|
|
675
|
+
no caller waits for the operating system
|
|
676
|
+
to become globally silent. This keeps duplicate or continuous native
|
|
677
|
+
callbacks from making an otherwise complete Record operation unbounded
|
|
678
|
+
without dropping any suspicion.
|
|
679
|
+
|
|
680
|
+
45. **Named Detect is independent of workspace size.** Shell holds one
|
|
681
|
+
prepared SQLite owner for the live Detect runtime. A named path uses one
|
|
682
|
+
indexed row, its parent chain, one stat, changed bytes when required, and
|
|
683
|
+
one transaction. Structural work widens only to the affected subtree;
|
|
684
|
+
repository work widens only to its Card + Checkpoint territory. A named
|
|
685
|
+
disappearance is ambiguous between deletion and a move whose destination
|
|
686
|
+
event has not arrived, so Detect widens that materialized root before
|
|
687
|
+
removing its physical identity evidence. A destination-only event that
|
|
688
|
+
carries a known inode across a repository boundary widens for the same
|
|
689
|
+
reason: old and new addresses must reconcile in one identity pass.
|
|
690
|
+
Git's transient lock files (`index.lock`, `HEAD.lock`, ref locks) are
|
|
691
|
+
settlement evidence, not repository state: while a named lock still
|
|
692
|
+
exists, that root remains unsettled and retries without inspecting Git or
|
|
693
|
+
reading the worktree. Once the lock disappears, Detect captures Card +
|
|
694
|
+
Checkpoint once even if the OS emitted no second filename callback. Shell's
|
|
695
|
+
own background Git reads disable optional locks so observation never rings
|
|
696
|
+
itself merely by refreshing the index.
|
|
697
|
+
Nameless, invalid, startup, and
|
|
698
|
+
failed-coverage evidence also enter complete reconciliation. No ordinary
|
|
699
|
+
named Detect pass serializes a workspace snapshot or
|
|
700
|
+
enters Send; the exact outbox row is its terminal output. A scoped
|
|
701
|
+
repository observation retains each unaffected row once and rebuilds the
|
|
702
|
+
named path plus its ancestor spine once, so one UUID appears exactly once
|
|
703
|
+
in the assembled graph.
|
|
704
|
+
|
|
705
|
+
46. **The UUID is the Send/Receive channel.** Live's portable Record rail
|
|
706
|
+
preserves pending order for one entity UUID and may send distinct UUIDs
|
|
707
|
+
concurrently. Shell only supplies persistent SQLite, immutable-cargo, and
|
|
708
|
+
authenticated-wire effects. Neither layer assigns an official number: the
|
|
709
|
+
authority returns the next dense sequence for that entity across every
|
|
710
|
+
machine.
|
|
711
|
+
|
|
712
|
+
47. **The two local queues have disjoint writers.** Only Record may insert the
|
|
713
|
+
outbox and every retained row originated on this computer. Only Receive
|
|
714
|
+
may insert the inbox and every row is an authority-accepted global record,
|
|
715
|
+
including records that originated here. Acknowledgement stamps an outbox
|
|
716
|
+
receipt; it does not move or copy that row into the inbox.
|
|
717
|
+
|
|
718
|
+
48. **Receive follows each entity without gaps.** SQLite keys inbox rows by
|
|
719
|
+
`(entityId, globalSequence)` and persists one received-through cursor per
|
|
720
|
+
entity. A separate authority delivery cursor only discovers
|
|
721
|
+
changed entity channels; it has no version meaning and never decides LWW.
|
|
722
|
+
Shell subscribes once before cursor catch-up; thereafter an accepted-row
|
|
723
|
+
event wakes Live to drain from that durable cursor. Idle hosts issue no
|
|
724
|
+
record queries. Reconnect subscribes first and catches up second, so a
|
|
725
|
+
missed event costs latency but never loses a record.
|
|
726
|
+
|
|
727
|
+
49. **Cold graph publication is not the realtime outbox.** Register's
|
|
728
|
+
crash-recoverable snapshot publication has its own finite local table.
|
|
729
|
+
Detect records never enter it, and snapshot rows never enter the entity
|
|
730
|
+
outbox. The superseded mixed mutation journal does not remain as a third
|
|
731
|
+
queue or compatibility path. A journal row has exactly three meanings.
|
|
732
|
+
`pending` and unsubmitted is a local publication intent the authority has
|
|
733
|
+
never seen; if its captured ground moves it may be deleted and re-derived,
|
|
734
|
+
and a newer complete snapshot may supersede it. `pending` and submitted
|
|
735
|
+
has an unknown authority outcome — the same mutation id retries until the
|
|
736
|
+
authority answers, because it may already be accepted with only the
|
|
737
|
+
acknowledgement lost, and nothing may supersede it. `rejected` means the
|
|
738
|
+
authority conclusively refused that mutation; it is never replayed and a
|
|
739
|
+
newer complete snapshot may replace it transactionally (last write wins).
|
|
740
|
+
The submitted boundary is durable before the first commit frame leaves.
|
|
741
|
+
A permanent refusal therefore cannot wedge Register, stale local capture
|
|
742
|
+
cannot publish old bytes, and an unacknowledged acceptance always recovers
|
|
743
|
+
through its original mutation id.
|
|
744
|
+
|
|
745
|
+
50. **The record queues have one prepared SQLite owner.** Shell opens and
|
|
746
|
+
prepares the queue connection once for the rail lifetime. Receive commits
|
|
747
|
+
one delivered batch, its entity cursors, and its authority delivery cursor
|
|
748
|
+
in one transaction. No record opens the database, re-runs schema DDL, or
|
|
749
|
+
forces its own commit. Persistent Detect and Record owners share WAL and a
|
|
750
|
+
bounded busy wait rather than turning ordinary concurrent writes into
|
|
751
|
+
immediate failures.
|
|
752
|
+
|
|
753
|
+
51. **Receive wakes one Live-owned Apply rail.** An Inbox commit is the
|
|
754
|
+
event-driven doorbell; startup and restart also drain unresolved Inbox
|
|
755
|
+
work. Live selects the newest accepted result on each UUID and owns intent,
|
|
756
|
+
local-work protection, retry, and Verify decisions. Shell supplies one
|
|
757
|
+
persistent SQLite store plus type-specific filesystem, cache, and Git
|
|
758
|
+
effects. Apply never polls and never writes either Record queue. A failed
|
|
759
|
+
or conflicted lane parks: its durable intent stays, the failure is reported
|
|
760
|
+
with its attempt and backoff, and the lane re-runs only when that backoff
|
|
761
|
+
elapses, its entity's input changes, or, for a conflict, another lane's
|
|
762
|
+
progress may have moved the occupant. The Detect pass behind the lane's
|
|
763
|
+
own capture is a wake like any other and can never re-run it, so a parked
|
|
764
|
+
lane costs one bounded attempt at a time, never a Detect storm. An
|
|
765
|
+
accepted destination already held by a different recorded active entity is
|
|
766
|
+
a conflict named in evidence, never a local save to capture. The park timer
|
|
767
|
+
and attempt count are process-local: after restart, the durable intent is
|
|
768
|
+
re-proved once and, if still blocked, parks again from attempt one.
|
|
769
|
+
|
|
770
|
+
52. **Visible Apply follows durable identity.** Before any filesystem effect,
|
|
771
|
+
Shell persists one intent. Its first read-only preflight is optimistic and
|
|
772
|
+
never waits for exclusive ground. Immutable cargo is then prepared
|
|
773
|
+
privately beneath the materialized root's reserved `.amalgm/` control tree,
|
|
774
|
+
which Detect structurally excludes. A final guard, recoverable reveal,
|
|
775
|
+
exact reread, and one SQLite transaction then update entity rows, the
|
|
776
|
+
detection notebook, resolved Inbox proof, and the intent. Lock waits and
|
|
777
|
+
content requests are finite attempts with transient stage evidence; failure
|
|
778
|
+
retains the same responsibility for retry. A crash resumes the same intent;
|
|
779
|
+
it never invents another entity or treats private preparation as user
|
|
780
|
+
ground. Completed or abandoned work removes its private preparation using
|
|
781
|
+
the accepted plan's materialized root, including when the target entity row
|
|
782
|
+
is created by that same completion transaction. When an accepted result
|
|
783
|
+
changes an entity's address and payload together, Apply moves the verified
|
|
784
|
+
current entity to its accepted address before replacing its payload. The
|
|
785
|
+
prior address cannot survive as unmanaged ground that Detect could remint
|
|
786
|
+
and publish as an echo.
|
|
787
|
+
If an active accepted target below a still-present materialized root
|
|
788
|
+
disappears before Verify, raw absence is not a local lifecycle edit. The
|
|
789
|
+
adapter reports missing official ground, Apply reacquires the final address
|
|
790
|
+
cone, and the same intent reveals and verifies the accepted result again.
|
|
791
|
+
A missing or physically replaced root waits for the root-recovery law;
|
|
792
|
+
entity Apply never rebuilds a workspace piecemeal.
|
|
793
|
+
|
|
794
|
+
53. **Visible ground coordinates by address cone.** Detect, Register, Add, Add
|
|
795
|
+
recovery, and Apply each name the directory cones their filesystem plus
|
|
796
|
+
SQLite projection effects touch, and two effects wait for each other only
|
|
797
|
+
when one cone contains the other. A Detect pass holds exactly the roots it
|
|
798
|
+
observes; Register holds its coverage family and core reference ground;
|
|
799
|
+
Add holds its destination, staging, and core ground; Apply's final guard
|
|
800
|
+
holds its target address, the entity's current address, and any addresses
|
|
801
|
+
a repository identity map relocates. Conflicting effects are served in
|
|
802
|
+
request order, so a stream of small effects can never starve an earlier
|
|
803
|
+
large one, and a timed-out waiter leaves the queue instead of poisoning
|
|
804
|
+
it. Unrelated cones never wait: a save applied in one workspace does not
|
|
805
|
+
queue behind a reconciliation of another. Apply preflights and prepares
|
|
806
|
+
immutable cargo without holding any cone, but its final guard, reveal,
|
|
807
|
+
Verify, and SQLite completion exclude Detect on the same addresses. Add
|
|
808
|
+
establishes singular Watch coverage before releasing its cones. A watcher
|
|
809
|
+
may ring throughout, but Detect observes only the complete state before or
|
|
810
|
+
after a transaction, never its half-written middle. When Apply observes a
|
|
811
|
+
save racing its reveal, it rings exactly the addresses it compared, so
|
|
812
|
+
that proof costs one named Detect lane rather than a walk of every root. A local save observed before
|
|
813
|
+
or during reveal is restored and passed through ordinary Detect + Record
|
|
814
|
+
before accepted ground may replace it. Equal accepted truth at the same
|
|
815
|
+
UUID and address advances proof without a redundant write. If Detect runs
|
|
816
|
+
before Apply advances its notebook, an exact unresolved Inbox result may
|
|
817
|
+
advance local evidence but never create a second Outbox record; different
|
|
818
|
+
result, replay, or immutable cargo remains a real local change. Watch stays
|
|
819
|
+
active throughout, and its Apply-created ring settles to notebook equality
|
|
820
|
+
without an outgoing echo. The Inbox may know cloud-only entities that this
|
|
821
|
+
machine does not materialize: core-ground Apply consults the current
|
|
822
|
+
portable enrollment policy before creating an intent, so excluded entities
|
|
823
|
+
retain history without receiving local rows or bytes.
|
|
824
|
+
|
|
825
|
+
54. **Repository Apply is Card + Checkpoint + identity as one result.** Shell
|
|
826
|
+
imports the immutable Git transport chain, materializes Card and
|
|
827
|
+
Checkpoint, verifies the resulting repository state, and projects the exact
|
|
828
|
+
transported child UUID map transactionally. The accepted target type,
|
|
829
|
+
never the replay's cargo shape, selects that adapter: a repository rename
|
|
830
|
+
or move with an unchanged parcel is structural on the wire but still
|
|
831
|
+
prepares, reveals, repairs, and verifies through Git. Moving its checkout
|
|
832
|
+
carries the current repository subtree as one unit; only transported UUIDs
|
|
833
|
+
outside that subtree are independent relocations. Sender capture rechecks Git
|
|
834
|
+
identity after Card + Checkpoint capture and retries if Git crossed that
|
|
835
|
+
boundary, so one parcel cannot mix pre-operation worktree hashes with a
|
|
836
|
+
post-operation Card. A `.git` ring may arrive before its related worktree
|
|
837
|
+
ring, so Git's dirty tracked paths and current untracked inventory join
|
|
838
|
+
the same observation; those exact worktree bytes enter both Checkpoint and
|
|
839
|
+
identity before Record.
|
|
840
|
+
A delayed ring for that already-captured path is equality; transport
|
|
841
|
+
packaging alone can never mint another logical record. A Checkpoint path
|
|
842
|
+
with no UUID widens to full Detect before publication. If repository
|
|
843
|
+
capture must retry after local type and UUID projection, the next pass
|
|
844
|
+
reuses that materialized identity while still treating the absent notebook
|
|
845
|
+
row as unverified. Every incremental
|
|
846
|
+
identity delta is derived from the exact immutable parent transport, never
|
|
847
|
+
from the mutable SQLite projection that may already contain an
|
|
848
|
+
independently recorded child move. The host seals the complete identity
|
|
849
|
+
frontier against the transport header's identity hash and retains that
|
|
850
|
+
compact evidence with the current transport head, so older pack artifacts
|
|
851
|
+
may be pruned without replacing immutable proof with current rows. Apply
|
|
852
|
+
proves physical repository ground from Card + Checkpoint and that sealed
|
|
853
|
+
transport frontier, never from child rows whose independent entity
|
|
854
|
+
channels may have advanced before or after it. Missing or invalid compact
|
|
855
|
+
evidence falls back only to a complete immutable transport chain; if that
|
|
856
|
+
chain is unavailable, the next capture emits one self-contained transport
|
|
857
|
+
rather than guessing a delta. Cold materialization requires cloud rows and the parcel's
|
|
858
|
+
identity map to describe the same addresses. Hot Apply instead treats its
|
|
859
|
+
rows as the prior materialization: an accepted identity map may relocate
|
|
860
|
+
the same UUID into repository territory, keeps the prior source privately
|
|
861
|
+
recoverable through Verify, then projects the new address transactionally.
|
|
862
|
+
Apply observes Card + Checkpoint once for each guard moment and never builds
|
|
863
|
+
a Git pack merely to prove equality. The held address cone keeps the final
|
|
864
|
+
guard's observation valid through reveal, and reveal's own verified result
|
|
865
|
+
is the observation consumed by Verify. A visible repository rewrite carries
|
|
866
|
+
`.git/amalgm-reveal` from its first Git mutation until exact Verify; Detect
|
|
867
|
+
treats that marker as unsettled private Apply ground, and restart resumes the
|
|
868
|
+
same durable intent before the marker is removed. Incremental materialization
|
|
869
|
+
imports only transport ranges whose declared Git tips are absent locally.
|
|
870
|
+
Gaining or losing `.git` keeps the containing UUID and changes only its
|
|
871
|
+
type rail.
|
|
872
|
+
|
|
873
|
+
55. **A request timeout invalidates the request wire.** Request/reply framing
|
|
874
|
+
cannot prove that only one response was lost. When an authenticated wire
|
|
875
|
+
fails to answer before its deadline, Shell rejects every request in flight,
|
|
876
|
+
discards that exact socket, and lets the owning portable rail retry through
|
|
877
|
+
a newly authenticated connection. A late frame or close from the discarded
|
|
878
|
+
socket can never acknowledge work or tear down its replacement. A timeout
|
|
879
|
+
is therefore visible continuity evidence, not permission to reuse a
|
|
880
|
+
possibly wedged transport.
|
|
881
|
+
The reply deadline begins only after the WebSocket reports that the request
|
|
882
|
+
left this process; a bounded queued-byte turn prevents bulk cargo from
|
|
883
|
+
growing memory without limit or starving gateway heartbeats. Separately,
|
|
884
|
+
an authenticated socket that remains open without any inbound gateway
|
|
885
|
+
frame across the heartbeat allowance is discarded and rejoined from the
|
|
886
|
+
durable cursor.
|
|
887
|
+
|
|
888
|
+
56. **Files timing observes boundaries; it never becomes a boundary.** An
|
|
889
|
+
opt-in observer may report Register, Upload, Download, Watch, Detect,
|
|
890
|
+
Record, Send, Receive, and Apply milestones with stable entity or workspace
|
|
891
|
+
identity. The evidence is transient and cannot schedule work, enter entity
|
|
892
|
+
SQLite, or change a protocol decision. Same-process durations use a
|
|
893
|
+
monotonic clock. Wall time exists only to correlate processes and machines,
|
|
894
|
+
so a cross-machine duration must state its clock-skew bound rather than
|
|
895
|
+
pretending to be more exact than its clocks.
|
|
896
|
+
|
|
897
|
+
57. **Directory posture is local; the ordinary-file executable bit travels.** The shell's
|
|
898
|
+
own private and control directories — machine SQLite, caches, staging,
|
|
899
|
+
every `.amalgm/` control tree — are created `0700` and re-asserted `0700`
|
|
900
|
+
on every touch. A fresh user-visible directory that materialization or
|
|
901
|
+
Apply creates gets the standard `0755` a fresh `mkdir` would give the
|
|
902
|
+
user, and an existing user directory keeps whatever mode the user chose;
|
|
903
|
+
no file effect inside a directory rewrites its parent's mode. Text and
|
|
904
|
+
binary files are different: capture reduces their mode to `0644` or `0755`,
|
|
905
|
+
the cloud record carries it, and Add, Apply, and Verify reproduce it.
|
|
906
|
+
Ownership, ACLs, read-only bits, and every other mode remain local.
|
|
907
|
+
|
|
908
|
+
58. **A materialization graph and its delivery watermark are one fact.**
|
|
909
|
+
Every entity-registry snapshot names the complete authority delivery
|
|
910
|
+
prefix already represented by its graph. Before workspace selection, Add
|
|
911
|
+
folds any complete later committed tail onto that verified base, producing
|
|
912
|
+
one current graph and watermark `N`. It installs that graph and advances
|
|
913
|
+
Receive and Apply through `N` in the same local adoption boundary; records
|
|
914
|
+
at or below `N` are retained history, never filesystem work, and only
|
|
915
|
+
later records may Apply. When publication folds that tail, final ancestry
|
|
916
|
+
in the complete prefix places every result: a container created after the
|
|
917
|
+
snapshot can own later children, and a cross-root move vacates its old root;
|
|
918
|
+
old snapshot membership alone never chooses the result's root. The settled
|
|
919
|
+
fold passes through the repository parcel projection exactly as publication
|
|
920
|
+
does: a tail that turns a container into a repository retires that
|
|
921
|
+
container's snapshot children into its parcel, and a tail that turns a
|
|
922
|
+
repository back into a folder carries every newly independent descendant
|
|
923
|
+
first and the boundary retype last. Every retype into a container uses the
|
|
924
|
+
same visibility barrier because it may expose descendant ground, so no
|
|
925
|
+
committed delivery prefix can expose a partial tree and Add never selects
|
|
926
|
+
a graph the parcel law would not publish. The first
|
|
927
|
+
later record on an entity UUID establishes its immediate entity predecessor
|
|
928
|
+
from the complete snapshot prefix, after which ordinary dense per-entity gap
|
|
929
|
+
checking resumes. A publisher may name only the exact locally received
|
|
930
|
+
and applied prefix, and authority accepts that graph only while `N` is
|
|
931
|
+
still the committed delivery tail under the entity-record ordering gate.
|
|
932
|
+
|
|
933
|
+
59. **Shell journals graph publication without duplicating the graph.**
|
|
934
|
+
Live decides the immutable pages and head. Shell stores only the small
|
|
935
|
+
head operation plus the changed pages needed to replay that publication;
|
|
936
|
+
it never writes a second whole-registry snapshot into SQLite or rebuilds
|
|
937
|
+
roots Live did not select. A submitted intent keeps its mutation identity
|
|
938
|
+
across restart, and all pre-page journal shapes convert atomically without
|
|
939
|
+
dropping an unknown authority outcome.
|
|
940
|
+
|
|
941
|
+
60. **Runtime binding is proved, never inferred.** A platform adapter adopts
|
|
942
|
+
an existing runtime only when Shell's published loopback address answers
|
|
943
|
+
its authenticated identity probe for the selected user, device, environment,
|
|
944
|
+
exact branch, local session, and process generation. A
|
|
945
|
+
durable ready registration with no answering runtime may be resumed; an
|
|
946
|
+
absent or incomplete registration requires login. A UI marker, PID, open
|
|
947
|
+
port, or installed executable alone is never service readiness.
|
|
948
|
+
|
|
949
|
+
61. **Browser is composed once and driven through capability ports.** Shell
|
|
950
|
+
owns the one `BrowserService` composition for a machine runtime. A fresh,
|
|
951
|
+
private Electron host may supply Browser's visible driver and isolated
|
|
952
|
+
cookie adapter; without that capability Browser selects headless. Shell
|
|
953
|
+
never implements a second browser action, registry, profile, cookie, or
|
|
954
|
+
authentication authority, and a Browser session never changes backend. A
|
|
955
|
+
signed machine release that does not declare Browser must not instantiate
|
|
956
|
+
Browser state merely because the SDK is installed.
|
|
957
|
+
|
|
958
|
+
62. **PTY is one authenticated Shell host capability.** The running machine
|
|
959
|
+
runtime mounts the Core-owned PTY contract through Shell's native process
|
|
960
|
+
adapter and retains every spawned terminal until native exit, including
|
|
961
|
+
sessions already removed from the public catalog. Runtime close seals new
|
|
962
|
+
terminal admission and drains all terminals concurrently: one second permits
|
|
963
|
+
hangup, then forced termination must prove exit within five seconds before
|
|
964
|
+
close succeeds. A UI targeting
|
|
965
|
+
this computer connects through the published authenticated loopback
|
|
966
|
+
binding; only a different computer uses the remote relay. Electron never
|
|
967
|
+
creates a second PTY implementation. A session with no explicit working
|
|
968
|
+
directory starts at that signed-in user's portable Amalgm root.
|
|
969
|
+
|
|
970
|
+
63. **Chat has one execution path.** Agents resolves an installed identity and
|
|
971
|
+
exact immutable revision; Tools resolves the selected catalog revision;
|
|
972
|
+
Chat owns the conversation, provider pump, journal, reconnect, usage, and
|
|
973
|
+
interrupt. Shell mounts Chat's public HTTP adapter in both `bootShell` and
|
|
974
|
+
the signed `MachineHost`; it owns no session store, event translation, or
|
|
975
|
+
callback driver.
|
|
976
|
+
|
|
977
|
+
64. **One installation device key and broker serve every local product.**
|
|
978
|
+
Before registration, Shell creates one P-256 private key for the physical
|
|
979
|
+
installation, binds its public thumbprint into the approved setup intent,
|
|
980
|
+
and proves possession before pinning that thumbprint across the computer's
|
|
981
|
+
runtime labels. The key stays in macOS Keychain or a Windows DPAPI envelope
|
|
982
|
+
where available (or one mode-0600 fallback file). A registered runtime
|
|
983
|
+
treats missing or corrupt key material as a visible failure; it never
|
|
984
|
+
generates a replacement during startup. Replacement is an explicit,
|
|
985
|
+
browser-approved recovery: Shell stages one candidate, proves its private
|
|
986
|
+
key, reuses it across uncertain retries, and promotes it only after the
|
|
987
|
+
control plane conditionally accepts the server-derived prior thumbprint.
|
|
988
|
+
Shell mints short-lived grants through Core's broker and creates a fresh
|
|
989
|
+
DPoP proof for each request. Chat, Apps, and future products never receive
|
|
990
|
+
the key or durable machine credential.
|
|
991
|
+
|
|
992
|
+
65. **A Shell release is tested as the artifact users install.** The release
|
|
993
|
+
gate packs Shell, installs that tarball with the exact public Amalgm
|
|
994
|
+
dependency versions declared by its manifest, and exercises authorization
|
|
995
|
+
through Chat using package exports only. Sibling repositories and source
|
|
996
|
+
paths are never an integration-test dependency.
|
|
997
|
+
|
|
998
|
+
66. **Provider credentials never become process configuration.** Shell does
|
|
999
|
+
not accept a proxy token from UI, an environment variable, or a local
|
|
1000
|
+
credential-resolution route. A product request uses an injected broker
|
|
1001
|
+
adapter that obtains an exact short-lived grant and signs fresh DPoP while
|
|
1002
|
+
the durable credential and device key stay inside Shell.
|
|
1003
|
+
|
|
1004
|
+
67. **Portable product deployments and machine coordination are physically
|
|
1005
|
+
separate.** Shell gives Tools its immutable deployment directory at
|
|
1006
|
+
`users/<email>/toolbox` and a different machine-local SQLite path. It
|
|
1007
|
+
observes each `deployment.activate` operation through Tools' Live surface;
|
|
1008
|
+
a cloud-capable composition must bind that surface, while local StateRail
|
|
1009
|
+
events remain presentation evidence rather than cloud authority. Shell
|
|
1010
|
+
never syncs a database, WAL, lock, or whole-catalog replacement as product
|
|
1011
|
+
authority.
|
|
1012
|
+
|
|
1013
|
+
68. **First-party products enter agent sessions through Toolbox selection.**
|
|
1014
|
+
Shell projects each owning SDK's MCP descriptors as an immutable system
|
|
1015
|
+
tool, and a host source names a distinct server plus loopback route. Agent
|
|
1016
|
+
preparation resolves only the selected exact Toolbox revision to official
|
|
1017
|
+
ACP `McpServer[]`; no product receives ambient injection. An undeclared
|
|
1018
|
+
product adapter may initialize only after explicit tool selection, never as
|
|
1019
|
+
a login side effect.
|
|
1020
|
+
|
|
1021
|
+
69. **The MCP relay authenticates as the composed runtime.** Shell supplies
|
|
1022
|
+
its runtime-admission token explicitly to Chat's native host. Chat gives it
|
|
1023
|
+
only to the selected provider child for calls back through the
|
|
1024
|
+
session-local relay. When a selected source is a guarded Shell host route,
|
|
1025
|
+
Shell separately binds the same credential to that prepared upstream
|
|
1026
|
+
server, and Chat applies it only on relay forwarding. Neither product tool
|
|
1027
|
+
definitions nor process-global environment discovery own that credential.
|
|
1028
|
+
|
|
1029
|
+
70. **Every Shell MCP route speaks official JSON-RPC over HTTP.** A mounted
|
|
1030
|
+
product SDK still owns method behavior, while the one Shell gateway owns
|
|
1031
|
+
the transport envelope: requests require JSON-RPC 2.0, responses preserve
|
|
1032
|
+
the exact request id, notifications return without a response message, and
|
|
1033
|
+
failures use JSON-RPC error objects. No product route exposes its inner
|
|
1034
|
+
result object as a private HTTP dialect.
|
|
1035
|
+
|
|
1036
|
+
71. **Hosted products remain direct and independently owned.** Automations and
|
|
1037
|
+
Channels each run on their own service deployment. Shell uses the one Core
|
|
1038
|
+
credential broker to mint audience-specific DPoP requests directly to
|
|
1039
|
+
those services, exposes each owning SDK's official MCP adapter, and claims
|
|
1040
|
+
only runs and channel messages targeted to this computer. External events
|
|
1041
|
+
enter Automations at its hosted opaque capability URL and become durable
|
|
1042
|
+
work before a machine is involved; Shell never exposes a webhook ingress
|
|
1043
|
+
route. The generic
|
|
1044
|
+
Automations executor calls qualified injected actions and its typed process
|
|
1045
|
+
capability; Shell injects the selected machine's process host with the
|
|
1046
|
+
user's OS home as the stable default directory. Direct command steps spawn
|
|
1047
|
+
argv without a shell, explicit script steps own shell or language
|
|
1048
|
+
evaluation, and neither inherits the creator CLI's directory.
|
|
1049
|
+
`channels.notify_user` is one registered automation action, never a special
|
|
1050
|
+
scheduling path. Gateway is not a product relay, and Shell stores no
|
|
1051
|
+
portable Automations or Channels database.
|
|
1052
|
+
Channels inbound work stays hosted only until Chat durably admits its turn;
|
|
1053
|
+
the machine reconciles on every event-stream connection, so a wakeup is
|
|
1054
|
+
never the authority. Shell preserves Chat's session id as hidden MCP
|
|
1055
|
+
metadata and never exposes it as a model-chosen Channels argument. The
|
|
1056
|
+
global product CLI discovers the already-running Shell and enters through
|
|
1057
|
+
that same private loopback MCP route; it never receives a hosted access
|
|
1058
|
+
token or the machine's DPoP key.
|
|
1059
|
+
|
|
1060
|
+
72. **Built-in agents are versioned platform installations.** Shell owns one
|
|
1061
|
+
declared revision of each native built-in agent and advances it only with a
|
|
1062
|
+
Shell release. Every built-in selects the complete first-party Toolbox
|
|
1063
|
+
loadout—Agents, Apps, Automations, Browser, Channels, Chat, and Tools—and
|
|
1064
|
+
Chat prepares that exact immutable agent revision and tool deployment.
|
|
1065
|
+
|
|
1066
|
+
73. **Git host capture distinguishes moving state from durable conflicts.** An
|
|
1067
|
+
index lock or Amalgm reveal is transient and refuses capture. A stable
|
|
1068
|
+
unfinished merge is portable Checkpoint truth: Shell captures its
|
|
1069
|
+
unmerged stages, worktree conflict bytes, and merge continuation through
|
|
1070
|
+
Live's one repository contract, and restores ordinary stages only after
|
|
1071
|
+
their Git objects are present. Gitlink stages are opaque commit identities
|
|
1072
|
+
owned by the nested repository, so the parent preserves but never packs
|
|
1073
|
+
them and never creates, replaces, or removes that nested worktree. Paused
|
|
1074
|
+
rebase, cherry-pick, and revert state is not yet represented
|
|
1075
|
+
by the current contract and refuses explicitly rather than being mistaken
|
|
1076
|
+
for transient work or flattened into a clean stage-zero entry.
|
|
1077
|
+
|
|
1078
|
+
74. **Same-slot records keep identity and derive distinct disk addresses.**
|
|
1079
|
+
Shell never rewrites a portable name to settle concurrent identities.
|
|
1080
|
+
Cold materialization and Apply derive the same UUID-ordered suffixes from
|
|
1081
|
+
the complete active sibling set; Detect recognizes both the portable name
|
|
1082
|
+
and that exact derived name as the same record. A sibling-set change
|
|
1083
|
+
relocates affected materializations while holding every source and
|
|
1084
|
+
destination cone, with row addresses committed before disk movement so a
|
|
1085
|
+
crash can only re-prove the same portable identities.
|
|
1086
|
+
|
|
1087
|
+
## Relationship to amalgm-engine
|
|
1088
|
+
|
|
1089
|
+
Stage 1 cut the bricks out of the engine. Stage 2 proves them here, composed.
|
|
1090
|
+
Stage 3 ships each signed service from this shell and retires its Engine copy.
|
|
1091
|
+
The current signed release is Core + Files + Agents + Tools + Chat, with
|
|
1092
|
+
Automations hosted independently and claimed by its target Shell. The Engine
|
|
1093
|
+
`/events` compatibility route is retired: webhook senders use
|
|
1094
|
+
`https://automations.amalgm.ai/e/<capability>` and never depend on the target
|
|
1095
|
+
machine being online. Later services cross the same parity gate without
|
|
1096
|
+
creating a second runtime for anything already released.
|