@vibesdotdev/pm 0.0.0-stage → 1.0.0-rc.3
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/LICENSE +18 -0
- package/README.md +227 -2
- package/dist/admission-store.d.ts +43 -0
- package/dist/admission-store.d.ts.map +1 -0
- package/dist/admission-store.js +108 -0
- package/dist/admission-store.js.map +1 -0
- package/dist/admission.d.ts +46 -0
- package/dist/admission.d.ts.map +1 -0
- package/dist/admission.js +81 -0
- package/dist/admission.js.map +1 -0
- package/dist/admitted-workspace.context.descriptor.d.ts +39 -0
- package/dist/admitted-workspace.context.descriptor.d.ts.map +1 -0
- package/dist/admitted-workspace.context.descriptor.js +18 -0
- package/dist/admitted-workspace.context.descriptor.js.map +1 -0
- package/dist/admitted-workspace.context.impl.consumer.d.ts +16 -0
- package/dist/admitted-workspace.context.impl.consumer.d.ts.map +1 -0
- package/dist/admitted-workspace.context.impl.consumer.js +7 -0
- package/dist/admitted-workspace.context.impl.consumer.js.map +1 -0
- package/dist/cli/admission-read.d.ts +12 -0
- package/dist/cli/admission-read.d.ts.map +1 -0
- package/dist/cli/admission-read.js +42 -0
- package/dist/cli/admission-read.js.map +1 -0
- package/dist/cli/command-input.d.ts +37 -0
- package/dist/cli/command-input.d.ts.map +1 -0
- package/dist/cli/command-input.js +34 -0
- package/dist/cli/command-input.js.map +1 -0
- package/dist/cli/consumer-components/startup-progress.d.ts +107 -0
- package/dist/cli/consumer-components/startup-progress.d.ts.map +1 -0
- package/dist/cli/consumer-components/startup-progress.js +392 -0
- package/dist/cli/consumer-components/startup-progress.js.map +1 -0
- package/dist/cli/consumer-services/control.d.ts +147 -0
- package/dist/cli/consumer-services/control.d.ts.map +1 -0
- package/dist/cli/consumer-services/control.js +209 -0
- package/dist/cli/consumer-services/control.js.map +1 -0
- package/dist/cli/daemon-launch-child.d.ts +35 -0
- package/dist/cli/daemon-launch-child.d.ts.map +1 -0
- package/dist/cli/daemon-launch-child.js +25 -0
- package/dist/cli/daemon-launch-child.js.map +1 -0
- package/dist/cli/docs/pm.cli.docs.descriptor.d.ts +4 -0
- package/dist/cli/docs/pm.cli.docs.descriptor.d.ts.map +1 -0
- package/dist/cli/docs/pm.cli.docs.descriptor.js +93 -0
- package/dist/cli/docs/pm.cli.docs.descriptor.js.map +1 -0
- package/dist/cli/filter-process-states.d.ts +12 -0
- package/dist/cli/filter-process-states.d.ts.map +1 -0
- package/dist/cli/filter-process-states.js +12 -0
- package/dist/cli/filter-process-states.js.map +1 -0
- package/dist/cli/output.d.ts +21 -0
- package/dist/cli/output.d.ts.map +1 -0
- package/dist/cli/output.js +19 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/cli/plugin.d.ts +3 -0
- package/dist/cli/plugin.d.ts.map +1 -0
- package/dist/cli/plugin.js +12 -0
- package/dist/cli/plugin.js.map +1 -0
- package/dist/cli/pm.cli-group.descriptor.d.ts +10 -0
- package/dist/cli/pm.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.cli-group.descriptor.js +18 -0
- package/dist/cli/pm.cli-group.descriptor.js.map +1 -0
- package/dist/cli/pm.completion.cli-group.descriptor.d.ts +9 -0
- package/dist/cli/pm.completion.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.completion.cli-group.descriptor.js +17 -0
- package/dist/cli/pm.completion.cli-group.descriptor.js.map +1 -0
- package/dist/cli/pm.completion.install.descriptor.d.ts +9 -0
- package/dist/cli/pm.completion.install.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.completion.install.descriptor.js +24 -0
- package/dist/cli/pm.completion.install.descriptor.js.map +1 -0
- package/dist/cli/pm.completion.install.impl.d.ts +11 -0
- package/dist/cli/pm.completion.install.impl.d.ts.map +1 -0
- package/dist/cli/pm.completion.install.impl.js +207 -0
- package/dist/cli/pm.completion.install.impl.js.map +1 -0
- package/dist/cli/pm.config.cli.descriptor.d.ts +10 -0
- package/dist/cli/pm.config.cli.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.config.cli.descriptor.js +25 -0
- package/dist/cli/pm.config.cli.descriptor.js.map +1 -0
- package/dist/cli/pm.config.impl.d.ts +12 -0
- package/dist/cli/pm.config.impl.d.ts.map +1 -0
- package/dist/cli/pm.config.impl.js +117 -0
- package/dist/cli/pm.config.impl.js.map +1 -0
- package/dist/cli/pm.daemon.cli-group.descriptor.d.ts +9 -0
- package/dist/cli/pm.daemon.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.daemon.cli-group.descriptor.js +17 -0
- package/dist/cli/pm.daemon.cli-group.descriptor.js.map +1 -0
- package/dist/cli/pm.daemon.logs.descriptor.d.ts +9 -0
- package/dist/cli/pm.daemon.logs.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.daemon.logs.descriptor.js +29 -0
- package/dist/cli/pm.daemon.logs.descriptor.js.map +1 -0
- package/dist/cli/pm.daemon.logs.impl.d.ts +11 -0
- package/dist/cli/pm.daemon.logs.impl.d.ts.map +1 -0
- package/dist/cli/pm.daemon.logs.impl.js +53 -0
- package/dist/cli/pm.daemon.logs.impl.js.map +1 -0
- package/dist/cli/pm.daemon.reconcile.descriptor.d.ts +9 -0
- package/dist/cli/pm.daemon.reconcile.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.daemon.reconcile.descriptor.js +24 -0
- package/dist/cli/pm.daemon.reconcile.descriptor.js.map +1 -0
- package/dist/cli/pm.daemon.reconcile.impl.d.ts +16 -0
- package/dist/cli/pm.daemon.reconcile.impl.d.ts.map +1 -0
- package/dist/cli/pm.daemon.reconcile.impl.js +51 -0
- package/dist/cli/pm.daemon.reconcile.impl.js.map +1 -0
- package/dist/cli/pm.daemon.recover.descriptor.d.ts +9 -0
- package/dist/cli/pm.daemon.recover.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.daemon.recover.descriptor.js +24 -0
- package/dist/cli/pm.daemon.recover.descriptor.js.map +1 -0
- package/dist/cli/pm.daemon.recover.impl.d.ts +16 -0
- package/dist/cli/pm.daemon.recover.impl.d.ts.map +1 -0
- package/dist/cli/pm.daemon.recover.impl.js +66 -0
- package/dist/cli/pm.daemon.recover.impl.js.map +1 -0
- package/dist/cli/pm.daemon.restart.descriptor.d.ts +9 -0
- package/dist/cli/pm.daemon.restart.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.daemon.restart.descriptor.js +25 -0
- package/dist/cli/pm.daemon.restart.descriptor.js.map +1 -0
- package/dist/cli/pm.daemon.restart.impl.d.ts +28 -0
- package/dist/cli/pm.daemon.restart.impl.d.ts.map +1 -0
- package/dist/cli/pm.daemon.restart.impl.js +174 -0
- package/dist/cli/pm.daemon.restart.impl.js.map +1 -0
- package/dist/cli/pm.daemon.serve.descriptor.d.ts +10 -0
- package/dist/cli/pm.daemon.serve.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.daemon.serve.descriptor.js +28 -0
- package/dist/cli/pm.daemon.serve.descriptor.js.map +1 -0
- package/dist/cli/pm.daemon.serve.impl.d.ts +37 -0
- package/dist/cli/pm.daemon.serve.impl.d.ts.map +1 -0
- package/dist/cli/pm.daemon.serve.impl.js +257 -0
- package/dist/cli/pm.daemon.serve.impl.js.map +1 -0
- package/dist/cli/pm.daemon.start.descriptor.d.ts +9 -0
- package/dist/cli/pm.daemon.start.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.daemon.start.descriptor.js +28 -0
- package/dist/cli/pm.daemon.start.descriptor.js.map +1 -0
- package/dist/cli/pm.daemon.start.impl.d.ts +40 -0
- package/dist/cli/pm.daemon.start.impl.d.ts.map +1 -0
- package/dist/cli/pm.daemon.start.impl.js +341 -0
- package/dist/cli/pm.daemon.start.impl.js.map +1 -0
- package/dist/cli/pm.daemon.status.descriptor.d.ts +9 -0
- package/dist/cli/pm.daemon.status.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.daemon.status.descriptor.js +24 -0
- package/dist/cli/pm.daemon.status.descriptor.js.map +1 -0
- package/dist/cli/pm.daemon.status.impl.d.ts +11 -0
- package/dist/cli/pm.daemon.status.impl.d.ts.map +1 -0
- package/dist/cli/pm.daemon.status.impl.js +123 -0
- package/dist/cli/pm.daemon.status.impl.js.map +1 -0
- package/dist/cli/pm.daemon.stop.descriptor.d.ts +9 -0
- package/dist/cli/pm.daemon.stop.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.daemon.stop.descriptor.js +24 -0
- package/dist/cli/pm.daemon.stop.descriptor.js.map +1 -0
- package/dist/cli/pm.daemon.stop.impl.d.ts +21 -0
- package/dist/cli/pm.daemon.stop.impl.d.ts.map +1 -0
- package/dist/cli/pm.daemon.stop.impl.js +108 -0
- package/dist/cli/pm.daemon.stop.impl.js.map +1 -0
- package/dist/cli/pm.dashboard.descriptor.d.ts +10 -0
- package/dist/cli/pm.dashboard.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.dashboard.descriptor.js +30 -0
- package/dist/cli/pm.dashboard.descriptor.js.map +1 -0
- package/dist/cli/pm.dashboard.impl.d.ts +16 -0
- package/dist/cli/pm.dashboard.impl.d.ts.map +1 -0
- package/dist/cli/pm.dashboard.impl.js +134 -0
- package/dist/cli/pm.dashboard.impl.js.map +1 -0
- package/dist/cli/pm.init.descriptor.d.ts +9 -0
- package/dist/cli/pm.init.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.init.descriptor.js +28 -0
- package/dist/cli/pm.init.descriptor.js.map +1 -0
- package/dist/cli/pm.init.impl.d.ts +11 -0
- package/dist/cli/pm.init.impl.d.ts.map +1 -0
- package/dist/cli/pm.init.impl.js +112 -0
- package/dist/cli/pm.init.impl.js.map +1 -0
- package/dist/cli/pm.list.descriptor.d.ts +9 -0
- package/dist/cli/pm.list.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.list.descriptor.js +44 -0
- package/dist/cli/pm.list.descriptor.js.map +1 -0
- package/dist/cli/pm.list.impl.d.ts +24 -0
- package/dist/cli/pm.list.impl.d.ts.map +1 -0
- package/dist/cli/pm.list.impl.js +204 -0
- package/dist/cli/pm.list.impl.js.map +1 -0
- package/dist/cli/pm.liveness.cli-group.descriptor.d.ts +25 -0
- package/dist/cli/pm.liveness.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.liveness.cli-group.descriptor.js +33 -0
- package/dist/cli/pm.liveness.cli-group.descriptor.js.map +1 -0
- package/dist/cli/pm.liveness.set.descriptor.d.ts +18 -0
- package/dist/cli/pm.liveness.set.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.liveness.set.descriptor.js +65 -0
- package/dist/cli/pm.liveness.set.descriptor.js.map +1 -0
- package/dist/cli/pm.liveness.set.impl.d.ts +6 -0
- package/dist/cli/pm.liveness.set.impl.d.ts.map +1 -0
- package/dist/cli/pm.liveness.set.impl.js +61 -0
- package/dist/cli/pm.liveness.set.impl.js.map +1 -0
- package/dist/cli/pm.logs.descriptor.d.ts +9 -0
- package/dist/cli/pm.logs.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.logs.descriptor.js +39 -0
- package/dist/cli/pm.logs.descriptor.js.map +1 -0
- package/dist/cli/pm.logs.impl.d.ts +11 -0
- package/dist/cli/pm.logs.impl.d.ts.map +1 -0
- package/dist/cli/pm.logs.impl.js +208 -0
- package/dist/cli/pm.logs.impl.js.map +1 -0
- package/dist/cli/pm.preset.cli-group.descriptor.d.ts +9 -0
- package/dist/cli/pm.preset.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.preset.cli-group.descriptor.js +17 -0
- package/dist/cli/pm.preset.cli-group.descriptor.js.map +1 -0
- package/dist/cli/pm.preset.list.descriptor.d.ts +9 -0
- package/dist/cli/pm.preset.list.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.preset.list.descriptor.js +24 -0
- package/dist/cli/pm.preset.list.descriptor.js.map +1 -0
- package/dist/cli/pm.preset.list.impl.d.ts +6 -0
- package/dist/cli/pm.preset.list.impl.d.ts.map +1 -0
- package/dist/cli/pm.preset.list.impl.js +67 -0
- package/dist/cli/pm.preset.list.impl.js.map +1 -0
- package/dist/cli/pm.preset.restart.descriptor.d.ts +9 -0
- package/dist/cli/pm.preset.restart.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.preset.restart.descriptor.js +39 -0
- package/dist/cli/pm.preset.restart.descriptor.js.map +1 -0
- package/dist/cli/pm.preset.restart.impl.d.ts +11 -0
- package/dist/cli/pm.preset.restart.impl.d.ts.map +1 -0
- package/dist/cli/pm.preset.restart.impl.js +85 -0
- package/dist/cli/pm.preset.restart.impl.js.map +1 -0
- package/dist/cli/pm.preset.show.descriptor.d.ts +9 -0
- package/dist/cli/pm.preset.show.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.preset.show.descriptor.js +30 -0
- package/dist/cli/pm.preset.show.descriptor.js.map +1 -0
- package/dist/cli/pm.preset.show.impl.d.ts +6 -0
- package/dist/cli/pm.preset.show.impl.d.ts.map +1 -0
- package/dist/cli/pm.preset.show.impl.js +92 -0
- package/dist/cli/pm.preset.show.impl.js.map +1 -0
- package/dist/cli/pm.preset.start.descriptor.d.ts +9 -0
- package/dist/cli/pm.preset.start.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.preset.start.descriptor.js +39 -0
- package/dist/cli/pm.preset.start.descriptor.js.map +1 -0
- package/dist/cli/pm.preset.start.impl.d.ts +11 -0
- package/dist/cli/pm.preset.start.impl.d.ts.map +1 -0
- package/dist/cli/pm.preset.start.impl.js +88 -0
- package/dist/cli/pm.preset.start.impl.js.map +1 -0
- package/dist/cli/pm.preset.status.descriptor.d.ts +9 -0
- package/dist/cli/pm.preset.status.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.preset.status.descriptor.js +30 -0
- package/dist/cli/pm.preset.status.descriptor.js.map +1 -0
- package/dist/cli/pm.preset.status.impl.d.ts +11 -0
- package/dist/cli/pm.preset.status.impl.d.ts.map +1 -0
- package/dist/cli/pm.preset.status.impl.js +166 -0
- package/dist/cli/pm.preset.status.impl.js.map +1 -0
- package/dist/cli/pm.preset.stop.descriptor.d.ts +9 -0
- package/dist/cli/pm.preset.stop.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.preset.stop.descriptor.js +39 -0
- package/dist/cli/pm.preset.stop.descriptor.js.map +1 -0
- package/dist/cli/pm.preset.stop.impl.d.ts +11 -0
- package/dist/cli/pm.preset.stop.impl.d.ts.map +1 -0
- package/dist/cli/pm.preset.stop.impl.js +68 -0
- package/dist/cli/pm.preset.stop.impl.js.map +1 -0
- package/dist/cli/pm.preset.teardown.descriptor.d.ts +9 -0
- package/dist/cli/pm.preset.teardown.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.preset.teardown.descriptor.js +43 -0
- package/dist/cli/pm.preset.teardown.descriptor.js.map +1 -0
- package/dist/cli/pm.preset.teardown.impl.d.ts +12 -0
- package/dist/cli/pm.preset.teardown.impl.d.ts.map +1 -0
- package/dist/cli/pm.preset.teardown.impl.js +91 -0
- package/dist/cli/pm.preset.teardown.impl.js.map +1 -0
- package/dist/cli/pm.presets.descriptor.d.ts +9 -0
- package/dist/cli/pm.presets.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.presets.descriptor.js +24 -0
- package/dist/cli/pm.presets.descriptor.js.map +1 -0
- package/dist/cli/pm.presets.impl.d.ts +11 -0
- package/dist/cli/pm.presets.impl.d.ts.map +1 -0
- package/dist/cli/pm.presets.impl.js +13 -0
- package/dist/cli/pm.presets.impl.js.map +1 -0
- package/dist/cli/pm.register.descriptor.d.ts +11 -0
- package/dist/cli/pm.register.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.register.descriptor.js +32 -0
- package/dist/cli/pm.register.descriptor.js.map +1 -0
- package/dist/cli/pm.register.impl.d.ts +15 -0
- package/dist/cli/pm.register.impl.d.ts.map +1 -0
- package/dist/cli/pm.register.impl.js +81 -0
- package/dist/cli/pm.register.impl.js.map +1 -0
- package/dist/cli/pm.resource.apply.descriptor.d.ts +15 -0
- package/dist/cli/pm.resource.apply.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.resource.apply.descriptor.js +41 -0
- package/dist/cli/pm.resource.apply.descriptor.js.map +1 -0
- package/dist/cli/pm.resource.apply.impl.d.ts +14 -0
- package/dist/cli/pm.resource.apply.impl.d.ts.map +1 -0
- package/dist/cli/pm.resource.apply.impl.js +91 -0
- package/dist/cli/pm.resource.apply.impl.js.map +1 -0
- package/dist/cli/pm.resource.cli-group.descriptor.d.ts +9 -0
- package/dist/cli/pm.resource.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.resource.cli-group.descriptor.js +17 -0
- package/dist/cli/pm.resource.cli-group.descriptor.js.map +1 -0
- package/dist/cli/pm.resource.list.descriptor.d.ts +9 -0
- package/dist/cli/pm.resource.list.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.resource.list.descriptor.js +25 -0
- package/dist/cli/pm.resource.list.descriptor.js.map +1 -0
- package/dist/cli/pm.resource.list.impl.d.ts +11 -0
- package/dist/cli/pm.resource.list.impl.d.ts.map +1 -0
- package/dist/cli/pm.resource.list.impl.js +141 -0
- package/dist/cli/pm.resource.list.impl.js.map +1 -0
- package/dist/cli/pm.resource.recreate.descriptor.d.ts +4 -0
- package/dist/cli/pm.resource.recreate.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.resource.recreate.descriptor.js +29 -0
- package/dist/cli/pm.resource.recreate.descriptor.js.map +1 -0
- package/dist/cli/pm.resource.recreate.impl.d.ts +6 -0
- package/dist/cli/pm.resource.recreate.impl.d.ts.map +1 -0
- package/dist/cli/pm.resource.recreate.impl.js +123 -0
- package/dist/cli/pm.resource.recreate.impl.js.map +1 -0
- package/dist/cli/pm.resource.status.descriptor.d.ts +9 -0
- package/dist/cli/pm.resource.status.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.resource.status.descriptor.js +31 -0
- package/dist/cli/pm.resource.status.descriptor.js.map +1 -0
- package/dist/cli/pm.resource.status.impl.d.ts +11 -0
- package/dist/cli/pm.resource.status.impl.d.ts.map +1 -0
- package/dist/cli/pm.resource.status.impl.js +230 -0
- package/dist/cli/pm.resource.status.impl.js.map +1 -0
- package/dist/cli/pm.restart.descriptor.d.ts +9 -0
- package/dist/cli/pm.restart.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.restart.descriptor.js +40 -0
- package/dist/cli/pm.restart.descriptor.js.map +1 -0
- package/dist/cli/pm.restart.impl.d.ts +12 -0
- package/dist/cli/pm.restart.impl.d.ts.map +1 -0
- package/dist/cli/pm.restart.impl.js +109 -0
- package/dist/cli/pm.restart.impl.js.map +1 -0
- package/dist/cli/pm.show.descriptor.d.ts +9 -0
- package/dist/cli/pm.show.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.show.descriptor.js +30 -0
- package/dist/cli/pm.show.descriptor.js.map +1 -0
- package/dist/cli/pm.show.impl.d.ts +25 -0
- package/dist/cli/pm.show.impl.d.ts.map +1 -0
- package/dist/cli/pm.show.impl.js +175 -0
- package/dist/cli/pm.show.impl.js.map +1 -0
- package/dist/cli/pm.start-all.descriptor.d.ts +9 -0
- package/dist/cli/pm.start-all.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.start-all.descriptor.js +34 -0
- package/dist/cli/pm.start-all.descriptor.js.map +1 -0
- package/dist/cli/pm.start-all.impl.d.ts +12 -0
- package/dist/cli/pm.start-all.impl.d.ts.map +1 -0
- package/dist/cli/pm.start-all.impl.js +91 -0
- package/dist/cli/pm.start-all.impl.js.map +1 -0
- package/dist/cli/pm.start.descriptor.d.ts +9 -0
- package/dist/cli/pm.start.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.start.descriptor.js +40 -0
- package/dist/cli/pm.start.descriptor.js.map +1 -0
- package/dist/cli/pm.start.impl.d.ts +19 -0
- package/dist/cli/pm.start.impl.d.ts.map +1 -0
- package/dist/cli/pm.start.impl.js +170 -0
- package/dist/cli/pm.start.impl.js.map +1 -0
- package/dist/cli/pm.status.descriptor.d.ts +10 -0
- package/dist/cli/pm.status.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.status.descriptor.js +31 -0
- package/dist/cli/pm.status.descriptor.js.map +1 -0
- package/dist/cli/pm.status.impl.d.ts +96 -0
- package/dist/cli/pm.status.impl.d.ts.map +1 -0
- package/dist/cli/pm.status.impl.js +425 -0
- package/dist/cli/pm.status.impl.js.map +1 -0
- package/dist/cli/pm.stop-all.descriptor.d.ts +9 -0
- package/dist/cli/pm.stop-all.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.stop-all.descriptor.js +41 -0
- package/dist/cli/pm.stop-all.descriptor.js.map +1 -0
- package/dist/cli/pm.stop-all.impl.d.ts +14 -0
- package/dist/cli/pm.stop-all.impl.d.ts.map +1 -0
- package/dist/cli/pm.stop-all.impl.js +138 -0
- package/dist/cli/pm.stop-all.impl.js.map +1 -0
- package/dist/cli/pm.stop.descriptor.d.ts +9 -0
- package/dist/cli/pm.stop.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.stop.descriptor.js +40 -0
- package/dist/cli/pm.stop.descriptor.js.map +1 -0
- package/dist/cli/pm.stop.impl.d.ts +13 -0
- package/dist/cli/pm.stop.impl.d.ts.map +1 -0
- package/dist/cli/pm.stop.impl.js +120 -0
- package/dist/cli/pm.stop.impl.js.map +1 -0
- package/dist/cli/pm.unregister-all.descriptor.d.ts +9 -0
- package/dist/cli/pm.unregister-all.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.unregister-all.descriptor.js +28 -0
- package/dist/cli/pm.unregister-all.descriptor.js.map +1 -0
- package/dist/cli/pm.unregister-all.impl.d.ts +11 -0
- package/dist/cli/pm.unregister-all.impl.d.ts.map +1 -0
- package/dist/cli/pm.unregister-all.impl.js +106 -0
- package/dist/cli/pm.unregister-all.impl.js.map +1 -0
- package/dist/cli/pm.unregister.descriptor.d.ts +9 -0
- package/dist/cli/pm.unregister.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.unregister.descriptor.js +34 -0
- package/dist/cli/pm.unregister.descriptor.js.map +1 -0
- package/dist/cli/pm.unregister.impl.d.ts +11 -0
- package/dist/cli/pm.unregister.impl.d.ts.map +1 -0
- package/dist/cli/pm.unregister.impl.js +77 -0
- package/dist/cli/pm.unregister.impl.js.map +1 -0
- package/dist/cli/pm.validate.descriptor.d.ts +9 -0
- package/dist/cli/pm.validate.descriptor.d.ts.map +1 -0
- package/dist/cli/pm.validate.descriptor.js +24 -0
- package/dist/cli/pm.validate.descriptor.js.map +1 -0
- package/dist/cli/pm.validate.impl.d.ts +6 -0
- package/dist/cli/pm.validate.impl.d.ts.map +1 -0
- package/dist/cli/pm.validate.impl.js +235 -0
- package/dist/cli/pm.validate.impl.js.map +1 -0
- package/dist/cli/preset-execution-options.d.ts +8 -0
- package/dist/cli/preset-execution-options.d.ts.map +1 -0
- package/dist/cli/preset-execution-options.js +22 -0
- package/dist/cli/preset-execution-options.js.map +1 -0
- package/dist/cli/register-manifest.d.ts +23 -0
- package/dist/cli/register-manifest.d.ts.map +1 -0
- package/dist/cli/register-manifest.js +80 -0
- package/dist/cli/register-manifest.js.map +1 -0
- package/dist/cli/runtime.d.ts +3 -0
- package/dist/cli/runtime.d.ts.map +1 -0
- package/dist/cli/runtime.js +134 -0
- package/dist/cli/runtime.js.map +1 -0
- package/dist/cli/table-columns.d.ts +22 -0
- package/dist/cli/table-columns.d.ts.map +1 -0
- package/dist/cli/table-columns.js +61 -0
- package/dist/cli/table-columns.js.map +1 -0
- package/dist/client-replies.d.ts +1188 -0
- package/dist/client-replies.d.ts.map +1 -0
- package/dist/client-replies.js +145 -0
- package/dist/client-replies.js.map +1 -0
- package/dist/client.d.ts +345 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +1005 -0
- package/dist/client.js.map +1 -0
- package/dist/config/pm.config.config.descriptor.d.ts +10 -0
- package/dist/config/pm.config.config.descriptor.d.ts.map +1 -0
- package/dist/config/pm.config.config.descriptor.js +37 -0
- package/dist/config/pm.config.config.descriptor.js.map +1 -0
- package/dist/context.d.ts +121 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +6 -0
- package/dist/context.js.map +1 -0
- package/dist/daemon/command-handler.d.ts +74 -0
- package/dist/daemon/command-handler.d.ts.map +1 -0
- package/dist/daemon/command-handler.js +220 -0
- package/dist/daemon/command-handler.js.map +1 -0
- package/dist/daemon/command-ids.d.ts +10 -0
- package/dist/daemon/command-ids.d.ts.map +1 -0
- package/dist/daemon/command-ids.js +51 -0
- package/dist/daemon/command-ids.js.map +1 -0
- package/dist/daemon/command-implementations.d.ts +30 -0
- package/dist/daemon/command-implementations.d.ts.map +1 -0
- package/dist/daemon/command-implementations.js +340 -0
- package/dist/daemon/command-implementations.js.map +1 -0
- package/dist/daemon/command-payload.d.ts +803 -0
- package/dist/daemon/command-payload.d.ts.map +1 -0
- package/dist/daemon/command-payload.js +128 -0
- package/dist/daemon/command-payload.js.map +1 -0
- package/dist/daemon/commands.plugin.d.ts +6 -0
- package/dist/daemon/commands.plugin.d.ts.map +1 -0
- package/dist/daemon/commands.plugin.js +22 -0
- package/dist/daemon/commands.plugin.js.map +1 -0
- package/dist/daemon/config-watcher.d.ts +125 -0
- package/dist/daemon/config-watcher.d.ts.map +1 -0
- package/dist/daemon/config-watcher.js +541 -0
- package/dist/daemon/config-watcher.js.map +1 -0
- package/dist/daemon/daemon-module-context.d.ts +16 -0
- package/dist/daemon/daemon-module-context.d.ts.map +1 -0
- package/dist/daemon/daemon-module-context.js +25 -0
- package/dist/daemon/daemon-module-context.js.map +1 -0
- package/dist/daemon/declared-commands.d.ts +39 -0
- package/dist/daemon/declared-commands.d.ts.map +1 -0
- package/dist/daemon/declared-commands.js +200 -0
- package/dist/daemon/declared-commands.js.map +1 -0
- package/dist/daemon/executable-freshness-reconciler.d.ts +99 -0
- package/dist/daemon/executable-freshness-reconciler.d.ts.map +1 -0
- package/dist/daemon/executable-freshness-reconciler.js +396 -0
- package/dist/daemon/executable-freshness-reconciler.js.map +1 -0
- package/dist/daemon/fleet-attach-state.d.ts +22 -0
- package/dist/daemon/fleet-attach-state.d.ts.map +1 -0
- package/dist/daemon/fleet-attach-state.js +39 -0
- package/dist/daemon/fleet-attach-state.js.map +1 -0
- package/dist/daemon/health-monitor.d.ts +105 -0
- package/dist/daemon/health-monitor.d.ts.map +1 -0
- package/dist/daemon/health-monitor.js +453 -0
- package/dist/daemon/health-monitor.js.map +1 -0
- package/dist/daemon/liveness-checker.d.ts +49 -0
- package/dist/daemon/liveness-checker.d.ts.map +1 -0
- package/dist/daemon/liveness-checker.js +330 -0
- package/dist/daemon/liveness-checker.js.map +1 -0
- package/dist/daemon/orphan-scanner.d.ts +114 -0
- package/dist/daemon/orphan-scanner.d.ts.map +1 -0
- package/dist/daemon/orphan-scanner.js +684 -0
- package/dist/daemon/orphan-scanner.js.map +1 -0
- package/dist/daemon/resource-health-monitor.d.ts +65 -0
- package/dist/daemon/resource-health-monitor.d.ts.map +1 -0
- package/dist/daemon/resource-health-monitor.js +247 -0
- package/dist/daemon/resource-health-monitor.js.map +1 -0
- package/dist/daemon/role.context.impl.d.ts +13 -0
- package/dist/daemon/role.context.impl.d.ts.map +1 -0
- package/dist/daemon/role.context.impl.js +7 -0
- package/dist/daemon/role.context.impl.js.map +1 -0
- package/dist/daemon/role.d.ts +56 -0
- package/dist/daemon/role.d.ts.map +1 -0
- package/dist/daemon/role.js +18 -0
- package/dist/daemon/role.js.map +1 -0
- package/dist/daemon/rpc-result.d.ts +9 -0
- package/dist/daemon/rpc-result.d.ts.map +1 -0
- package/dist/daemon/rpc-result.js +28 -0
- package/dist/daemon/rpc-result.js.map +1 -0
- package/dist/daemon/stray-daemons.d.ts +52 -0
- package/dist/daemon/stray-daemons.d.ts.map +1 -0
- package/dist/daemon/stray-daemons.js +101 -0
- package/dist/daemon/stray-daemons.js.map +1 -0
- package/dist/daemon/supervised-commands.d.ts +3 -0
- package/dist/daemon/supervised-commands.d.ts.map +1 -0
- package/dist/daemon/supervised-commands.js +51 -0
- package/dist/daemon/supervised-commands.js.map +1 -0
- package/dist/daemon.d.ts +329 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/daemon.js +1654 -0
- package/dist/daemon.js.map +1 -0
- package/dist/definitions.d.ts +2 -0
- package/dist/definitions.d.ts.map +1 -0
- package/dist/definitions.js +2 -0
- package/dist/definitions.js.map +1 -0
- package/dist/dev/command.d.ts +39 -0
- package/dist/dev/command.d.ts.map +1 -0
- package/dist/dev/command.js +79 -0
- package/dist/dev/command.js.map +1 -0
- package/dist/dev/defaults.d.ts +34 -0
- package/dist/dev/defaults.d.ts.map +1 -0
- package/dist/dev/defaults.js +58 -0
- package/dist/dev/defaults.js.map +1 -0
- package/dist/dev/env.d.ts +31 -0
- package/dist/dev/env.d.ts.map +1 -0
- package/dist/dev/env.js +56 -0
- package/dist/dev/env.js.map +1 -0
- package/dist/dev/index.d.ts +26 -0
- package/dist/dev/index.d.ts.map +1 -0
- package/dist/dev/index.js +28 -0
- package/dist/dev/index.js.map +1 -0
- package/dist/dev/sveltekit.d.ts +41 -0
- package/dist/dev/sveltekit.d.ts.map +1 -0
- package/dist/dev/sveltekit.js +93 -0
- package/dist/dev/sveltekit.js.map +1 -0
- package/dist/dev/workspace-shape.d.ts +64 -0
- package/dist/dev/workspace-shape.d.ts.map +1 -0
- package/dist/dev/workspace-shape.js +19 -0
- package/dist/dev/workspace-shape.js.map +1 -0
- package/dist/docs/pm.daemon.docs.descriptor.d.ts +4 -0
- package/dist/docs/pm.daemon.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/pm.daemon.docs.descriptor.js +48 -0
- package/dist/docs/pm.daemon.docs.descriptor.js.map +1 -0
- package/dist/docs/pm.docs.descriptor.d.ts +4 -0
- package/dist/docs/pm.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/pm.docs.descriptor.js +45 -0
- package/dist/docs/pm.docs.descriptor.js.map +1 -0
- package/dist/docs/pm.preset.docs.descriptor.d.ts +4 -0
- package/dist/docs/pm.preset.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/pm.preset.docs.descriptor.js +37 -0
- package/dist/docs/pm.preset.docs.descriptor.js.map +1 -0
- package/dist/docs/pm.queues.docs.descriptor.d.ts +4 -0
- package/dist/docs/pm.queues.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/pm.queues.docs.descriptor.js +157 -0
- package/dist/docs/pm.queues.docs.descriptor.js.map +1 -0
- package/dist/docs/pm.resource.docs.descriptor.d.ts +4 -0
- package/dist/docs/pm.resource.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/pm.resource.docs.descriptor.js +38 -0
- package/dist/docs/pm.resource.docs.descriptor.js.map +1 -0
- package/dist/docs/pm.tasks.docs.descriptor.d.ts +4 -0
- package/dist/docs/pm.tasks.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/pm.tasks.docs.descriptor.js +242 -0
- package/dist/docs/pm.tasks.docs.descriptor.js.map +1 -0
- package/dist/docs/pm.workers.docs.descriptor.d.ts +4 -0
- package/dist/docs/pm.workers.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/pm.workers.docs.descriptor.js +427 -0
- package/dist/docs/pm.workers.docs.descriptor.js.map +1 -0
- package/dist/errors.d.ts +262 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +479 -0
- package/dist/errors.js.map +1 -0
- package/dist/graph.d.ts +82 -0
- package/dist/graph.d.ts.map +1 -0
- package/dist/graph.js +247 -0
- package/dist/graph.js.map +1 -0
- package/dist/helpers/failure.d.ts +10 -0
- package/dist/helpers/failure.d.ts.map +1 -0
- package/dist/helpers/failure.js +10 -0
- package/dist/helpers/failure.js.map +1 -0
- package/dist/helpers/launch-custody.d.ts +16 -0
- package/dist/helpers/launch-custody.d.ts.map +1 -0
- package/dist/helpers/launch-custody.js +117 -0
- package/dist/helpers/launch-custody.js.map +1 -0
- package/dist/helpers/launch-identity.d.ts +20 -0
- package/dist/helpers/launch-identity.d.ts.map +1 -0
- package/dist/helpers/launch-identity.js +70 -0
- package/dist/helpers/launch-identity.js.map +1 -0
- package/dist/helpers/managed-http-origin.d.ts +4 -0
- package/dist/helpers/managed-http-origin.d.ts.map +1 -0
- package/dist/helpers/managed-http-origin.js +9 -0
- package/dist/helpers/managed-http-origin.js.map +1 -0
- package/dist/helpers/managed-process-admission.d.ts +55 -0
- package/dist/helpers/managed-process-admission.d.ts.map +1 -0
- package/dist/helpers/managed-process-admission.js +102 -0
- package/dist/helpers/managed-process-admission.js.map +1 -0
- package/dist/helpers/managed-process-id.d.ts +13 -0
- package/dist/helpers/managed-process-id.d.ts.map +1 -0
- package/dist/helpers/managed-process-id.js +16 -0
- package/dist/helpers/managed-process-id.js.map +1 -0
- package/dist/helpers/node-path.d.ts +16 -0
- package/dist/helpers/node-path.d.ts.map +1 -0
- package/dist/helpers/node-path.js +67 -0
- package/dist/helpers/node-path.js.map +1 -0
- package/dist/helpers/output-redaction.d.ts +36 -0
- package/dist/helpers/output-redaction.d.ts.map +1 -0
- package/dist/helpers/output-redaction.js +120 -0
- package/dist/helpers/output-redaction.js.map +1 -0
- package/dist/helpers/process-credentials.d.ts +62 -0
- package/dist/helpers/process-credentials.d.ts.map +1 -0
- package/dist/helpers/process-credentials.js +107 -0
- package/dist/helpers/process-credentials.js.map +1 -0
- package/dist/helpers/process-env.d.ts +72 -0
- package/dist/helpers/process-env.d.ts.map +1 -0
- package/dist/helpers/process-env.js +265 -0
- package/dist/helpers/process-env.js.map +1 -0
- package/dist/helpers/process-watch.d.ts +7 -0
- package/dist/helpers/process-watch.d.ts.map +1 -0
- package/dist/helpers/process-watch.js +27 -0
- package/dist/helpers/process-watch.js.map +1 -0
- package/dist/helpers/rlimits.d.ts +10 -0
- package/dist/helpers/rlimits.d.ts.map +1 -0
- package/dist/helpers/rlimits.js +14 -0
- package/dist/helpers/rlimits.js.map +1 -0
- package/dist/helpers/runtime-files.d.ts +42 -0
- package/dist/helpers/runtime-files.d.ts.map +1 -0
- package/dist/helpers/runtime-files.js +155 -0
- package/dist/helpers/runtime-files.js.map +1 -0
- package/dist/helpers/worker-routing.d.ts +35 -0
- package/dist/helpers/worker-routing.d.ts.map +1 -0
- package/dist/helpers/worker-routing.js +70 -0
- package/dist/helpers/worker-routing.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/interface.d.ts +150 -0
- package/dist/interface.d.ts.map +1 -0
- package/dist/interface.js +6 -0
- package/dist/interface.js.map +1 -0
- package/dist/kinds/daemon-module.kind.d.ts +103 -0
- package/dist/kinds/daemon-module.kind.d.ts.map +1 -0
- package/dist/kinds/daemon-module.kind.js +38 -0
- package/dist/kinds/daemon-module.kind.js.map +1 -0
- package/dist/kinds/launch-preparation.kind.d.ts +24 -0
- package/dist/kinds/launch-preparation.kind.d.ts.map +1 -0
- package/dist/kinds/launch-preparation.kind.js +7 -0
- package/dist/kinds/launch-preparation.kind.js.map +1 -0
- package/dist/kinds/liveness-profile.kind.d.ts +33 -0
- package/dist/kinds/liveness-profile.kind.d.ts.map +1 -0
- package/dist/kinds/liveness-profile.kind.js +27 -0
- package/dist/kinds/liveness-profile.kind.js.map +1 -0
- package/dist/kinds/preset.kind.d.ts +59 -0
- package/dist/kinds/preset.kind.d.ts.map +1 -0
- package/dist/kinds/preset.kind.js +35 -0
- package/dist/kinds/preset.kind.js.map +1 -0
- package/dist/kinds/process-source.kind.d.ts +6 -0
- package/dist/kinds/process-source.kind.d.ts.map +1 -0
- package/dist/kinds/process-source.kind.js +24 -0
- package/dist/kinds/process-source.kind.js.map +1 -0
- package/dist/kinds/process.kind.d.ts +237 -0
- package/dist/kinds/process.kind.d.ts.map +1 -0
- package/dist/kinds/process.kind.js +36 -0
- package/dist/kinds/process.kind.js.map +1 -0
- package/dist/kinds/resource-provider.kind.d.ts +41 -0
- package/dist/kinds/resource-provider.kind.d.ts.map +1 -0
- package/dist/kinds/resource-provider.kind.js +56 -0
- package/dist/kinds/resource-provider.kind.js.map +1 -0
- package/dist/kinds/resource.kind.d.ts +73 -0
- package/dist/kinds/resource.kind.d.ts.map +1 -0
- package/dist/kinds/resource.kind.js +35 -0
- package/dist/kinds/resource.kind.js.map +1 -0
- package/dist/kinds/runtime-daemon-endpoint.d.ts +34 -0
- package/dist/kinds/runtime-daemon-endpoint.d.ts.map +1 -0
- package/dist/kinds/runtime-daemon-endpoint.js +83 -0
- package/dist/kinds/runtime-daemon-endpoint.js.map +1 -0
- package/dist/kinds/runtime-daemon-endpoint.kind.d.ts +144 -0
- package/dist/kinds/runtime-daemon-endpoint.kind.d.ts.map +1 -0
- package/dist/kinds/runtime-daemon-endpoint.kind.js +104 -0
- package/dist/kinds/runtime-daemon-endpoint.kind.js.map +1 -0
- package/dist/launch-preparation.d.ts +12 -0
- package/dist/launch-preparation.d.ts.map +1 -0
- package/dist/launch-preparation.js +42 -0
- package/dist/launch-preparation.js.map +1 -0
- package/dist/logging/pm-daemon.logger.descriptor.d.ts +7 -0
- package/dist/logging/pm-daemon.logger.descriptor.d.ts.map +1 -0
- package/dist/logging/pm-daemon.logger.descriptor.js +16 -0
- package/dist/logging/pm-daemon.logger.descriptor.js.map +1 -0
- package/dist/logging/pm-daemon.output.descriptor.d.ts +9 -0
- package/dist/logging/pm-daemon.output.descriptor.d.ts.map +1 -0
- package/dist/logging/pm-daemon.output.descriptor.js +22 -0
- package/dist/logging/pm-daemon.output.descriptor.js.map +1 -0
- package/dist/manager.d.ts +206 -0
- package/dist/manager.d.ts.map +1 -0
- package/dist/manager.js +682 -0
- package/dist/manager.js.map +1 -0
- package/dist/managers/dependency-resolver.d.ts +85 -0
- package/dist/managers/dependency-resolver.d.ts.map +1 -0
- package/dist/managers/dependency-resolver.js +237 -0
- package/dist/managers/dependency-resolver.js.map +1 -0
- package/dist/managers/preset-executor.d.ts +138 -0
- package/dist/managers/preset-executor.d.ts.map +1 -0
- package/dist/managers/preset-executor.js +763 -0
- package/dist/managers/preset-executor.js.map +1 -0
- package/dist/managers/resource-manager.d.ts +142 -0
- package/dist/managers/resource-manager.d.ts.map +1 -0
- package/dist/managers/resource-manager.js +767 -0
- package/dist/managers/resource-manager.js.map +1 -0
- package/dist/migrations.generated.d.ts +14 -0
- package/dist/migrations.generated.d.ts.map +1 -0
- package/dist/migrations.generated.js +27 -0
- package/dist/migrations.generated.js.map +1 -0
- package/dist/pm.assets.runtime.d.ts +151 -0
- package/dist/pm.assets.runtime.d.ts.map +1 -0
- package/dist/pm.assets.runtime.js +30 -0
- package/dist/pm.assets.runtime.js.map +1 -0
- package/dist/pm.client.descriptor.d.ts +4 -0
- package/dist/pm.client.descriptor.d.ts.map +1 -0
- package/dist/pm.client.descriptor.js +8 -0
- package/dist/pm.client.descriptor.js.map +1 -0
- package/dist/pm.client.impl.consumer.d.ts +9 -0
- package/dist/pm.client.impl.consumer.d.ts.map +1 -0
- package/dist/pm.client.impl.consumer.js +13 -0
- package/dist/pm.client.impl.consumer.js.map +1 -0
- package/dist/pm.cloud.plugin.d.ts +29 -0
- package/dist/pm.cloud.plugin.d.ts.map +1 -0
- package/dist/pm.cloud.plugin.js +57 -0
- package/dist/pm.cloud.plugin.js.map +1 -0
- package/dist/pm.consumer.plugin.d.ts +3 -0
- package/dist/pm.consumer.plugin.d.ts.map +1 -0
- package/dist/pm.consumer.plugin.js +70 -0
- package/dist/pm.consumer.plugin.js.map +1 -0
- package/dist/pm.context.descriptor.d.ts +35 -0
- package/dist/pm.context.descriptor.d.ts.map +1 -0
- package/dist/pm.context.descriptor.js +12 -0
- package/dist/pm.context.descriptor.js.map +1 -0
- package/dist/pm.context.impl.consumer.d.ts +8 -0
- package/dist/pm.context.impl.consumer.d.ts.map +1 -0
- package/dist/pm.context.impl.consumer.js +6 -0
- package/dist/pm.context.impl.consumer.js.map +1 -0
- package/dist/pm.plugin.d.ts +6 -0
- package/dist/pm.plugin.d.ts.map +1 -0
- package/dist/pm.plugin.js +6 -0
- package/dist/pm.plugin.js.map +1 -0
- package/dist/presets/index.d.ts +5 -0
- package/dist/presets/index.d.ts.map +1 -0
- package/dist/presets/index.js +5 -0
- package/dist/presets/index.js.map +1 -0
- package/dist/presets/preset/index.d.ts +2 -0
- package/dist/presets/preset/index.d.ts.map +1 -0
- package/dist/presets/preset/index.js +2 -0
- package/dist/presets/preset/index.js.map +1 -0
- package/dist/presets/preset/web-dev.d.ts +39 -0
- package/dist/presets/preset/web-dev.d.ts.map +1 -0
- package/dist/presets/preset/web-dev.js +69 -0
- package/dist/presets/preset/web-dev.js.map +1 -0
- package/dist/presets/process/index.d.ts +3 -0
- package/dist/presets/process/index.d.ts.map +1 -0
- package/dist/presets/process/index.js +3 -0
- package/dist/presets/process/index.js.map +1 -0
- package/dist/presets/process/sveltekit.d.ts +125 -0
- package/dist/presets/process/sveltekit.d.ts.map +1 -0
- package/dist/presets/process/sveltekit.js +52 -0
- package/dist/presets/process/sveltekit.js.map +1 -0
- package/dist/presets/process/web.d.ts +34 -0
- package/dist/presets/process/web.d.ts.map +1 -0
- package/dist/presets/process/web.js +52 -0
- package/dist/presets/process/web.js.map +1 -0
- package/dist/presets/resource/database.d.ts +39 -0
- package/dist/presets/resource/database.d.ts.map +1 -0
- package/dist/presets/resource/database.js +60 -0
- package/dist/presets/resource/database.js.map +1 -0
- package/dist/presets/resource/index.d.ts +2 -0
- package/dist/presets/resource/index.d.ts.map +1 -0
- package/dist/presets/resource/index.js +2 -0
- package/dist/presets/resource/index.js.map +1 -0
- package/dist/presets/types.d.ts +101 -0
- package/dist/presets/types.d.ts.map +1 -0
- package/dist/presets/types.js +53 -0
- package/dist/presets/types.js.map +1 -0
- package/dist/register-migrations.impl.consumer.d.ts +8 -0
- package/dist/register-migrations.impl.consumer.d.ts.map +1 -0
- package/dist/register-migrations.impl.consumer.js +145 -0
- package/dist/register-migrations.impl.consumer.js.map +1 -0
- package/dist/resources/index.d.ts +7 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +7 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/provider.d.ts +216 -0
- package/dist/resources/provider.d.ts.map +1 -0
- package/dist/resources/provider.js +54 -0
- package/dist/resources/provider.js.map +1 -0
- package/dist/resources/providers/builtin.assets.d.ts +8 -0
- package/dist/resources/providers/builtin.assets.d.ts.map +1 -0
- package/dist/resources/providers/builtin.assets.js +26 -0
- package/dist/resources/providers/builtin.assets.js.map +1 -0
- package/dist/resources/providers/index.d.ts +14 -0
- package/dist/resources/providers/index.d.ts.map +1 -0
- package/dist/resources/providers/index.js +14 -0
- package/dist/resources/providers/index.js.map +1 -0
- package/dist/resources/providers/local-mkcert.d.ts +31 -0
- package/dist/resources/providers/local-mkcert.d.ts.map +1 -0
- package/dist/resources/providers/local-mkcert.js +169 -0
- package/dist/resources/providers/local-mkcert.js.map +1 -0
- package/dist/resources/providers/shell-setup.d.ts +17 -0
- package/dist/resources/providers/shell-setup.d.ts.map +1 -0
- package/dist/resources/providers/shell-setup.js +41 -0
- package/dist/resources/providers/shell-setup.js.map +1 -0
- package/dist/resources/providers/tool-env.d.ts +63 -0
- package/dist/resources/providers/tool-env.d.ts.map +1 -0
- package/dist/resources/providers/tool-env.js +99 -0
- package/dist/resources/providers/tool-env.js.map +1 -0
- package/dist/resources/resource-state-summary.d.ts +3 -0
- package/dist/resources/resource-state-summary.d.ts.map +1 -0
- package/dist/resources/resource-state-summary.js +82 -0
- package/dist/resources/resource-state-summary.js.map +1 -0
- package/dist/resources/status-options.d.ts +4 -0
- package/dist/resources/status-options.d.ts.map +1 -0
- package/dist/resources/status-options.js +6 -0
- package/dist/resources/status-options.js.map +1 -0
- package/dist/runnable/executor.d.ts +11 -0
- package/dist/runnable/executor.d.ts.map +1 -0
- package/dist/runnable/executor.js +41 -0
- package/dist/runnable/executor.js.map +1 -0
- package/dist/runnable/plugin.d.ts +3 -0
- package/dist/runnable/plugin.d.ts.map +1 -0
- package/dist/runnable/plugin.js +12 -0
- package/dist/runnable/plugin.js.map +1 -0
- package/dist/runnable/schemas.d.ts +28 -0
- package/dist/runnable/schemas.d.ts.map +1 -0
- package/dist/runnable/schemas.js +10 -0
- package/dist/runnable/schemas.js.map +1 -0
- package/dist/runtime-daemon-supervisor.descriptor.d.ts +16 -0
- package/dist/runtime-daemon-supervisor.descriptor.d.ts.map +1 -0
- package/dist/runtime-daemon-supervisor.descriptor.js +17 -0
- package/dist/runtime-daemon-supervisor.descriptor.js.map +1 -0
- package/dist/runtime-daemon-supervisor.impl.consumer.d.ts +22 -0
- package/dist/runtime-daemon-supervisor.impl.consumer.d.ts.map +1 -0
- package/dist/runtime-daemon-supervisor.impl.consumer.js +66 -0
- package/dist/runtime-daemon-supervisor.impl.consumer.js.map +1 -0
- package/dist/schemas/action-error.d.ts +8 -0
- package/dist/schemas/action-error.d.ts.map +1 -0
- package/dist/schemas/action-error.js +8 -0
- package/dist/schemas/action-error.js.map +1 -0
- package/dist/schemas/admission.d.ts +36 -0
- package/dist/schemas/admission.d.ts.map +1 -0
- package/dist/schemas/admission.js +22 -0
- package/dist/schemas/admission.js.map +1 -0
- package/dist/schemas/builder.d.ts +402 -0
- package/dist/schemas/builder.d.ts.map +1 -0
- package/dist/schemas/builder.js +410 -0
- package/dist/schemas/builder.js.map +1 -0
- package/dist/schemas/client.d.ts +18 -0
- package/dist/schemas/client.d.ts.map +1 -0
- package/dist/schemas/client.js +2 -0
- package/dist/schemas/client.js.map +1 -0
- package/dist/schemas/commands.d.ts +315 -0
- package/dist/schemas/commands.d.ts.map +1 -0
- package/dist/schemas/commands.js +268 -0
- package/dist/schemas/commands.js.map +1 -0
- package/dist/schemas/common.d.ts +35 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +43 -0
- package/dist/schemas/common.js.map +1 -0
- package/dist/schemas/daemon-command.d.ts +61 -0
- package/dist/schemas/daemon-command.d.ts.map +1 -0
- package/dist/schemas/daemon-command.js +2 -0
- package/dist/schemas/daemon-command.js.map +1 -0
- package/dist/schemas/daemon-host.d.ts +70 -0
- package/dist/schemas/daemon-host.d.ts.map +1 -0
- package/dist/schemas/daemon-host.js +2 -0
- package/dist/schemas/daemon-host.js.map +1 -0
- package/dist/schemas/daemon-launch.d.ts +43 -0
- package/dist/schemas/daemon-launch.d.ts.map +1 -0
- package/dist/schemas/daemon-launch.js +3 -0
- package/dist/schemas/daemon-launch.js.map +1 -0
- package/dist/schemas/daemon.d.ts +98 -0
- package/dist/schemas/daemon.d.ts.map +1 -0
- package/dist/schemas/daemon.js +88 -0
- package/dist/schemas/daemon.js.map +1 -0
- package/dist/schemas/dev.d.ts +169 -0
- package/dist/schemas/dev.d.ts.map +1 -0
- package/dist/schemas/dev.js +8 -0
- package/dist/schemas/dev.js.map +1 -0
- package/dist/schemas/executable-freshness.d.ts +88 -0
- package/dist/schemas/executable-freshness.d.ts.map +1 -0
- package/dist/schemas/executable-freshness.js +2 -0
- package/dist/schemas/executable-freshness.js.map +1 -0
- package/dist/schemas/forward-config.d.ts +11 -0
- package/dist/schemas/forward-config.d.ts.map +1 -0
- package/dist/schemas/forward-config.js +15 -0
- package/dist/schemas/forward-config.js.map +1 -0
- package/dist/schemas/graph.d.ts +444 -0
- package/dist/schemas/graph.d.ts.map +1 -0
- package/dist/schemas/graph.js +59 -0
- package/dist/schemas/graph.js.map +1 -0
- package/dist/schemas/health.d.ts +43 -0
- package/dist/schemas/health.d.ts.map +1 -0
- package/dist/schemas/health.js +6 -0
- package/dist/schemas/health.js.map +1 -0
- package/dist/schemas/launch-preparation.d.ts +106 -0
- package/dist/schemas/launch-preparation.d.ts.map +1 -0
- package/dist/schemas/launch-preparation.js +50 -0
- package/dist/schemas/launch-preparation.js.map +1 -0
- package/dist/schemas/liveness-profile.d.ts +108 -0
- package/dist/schemas/liveness-profile.d.ts.map +1 -0
- package/dist/schemas/liveness-profile.js +33 -0
- package/dist/schemas/liveness-profile.js.map +1 -0
- package/dist/schemas/liveness.d.ts +37 -0
- package/dist/schemas/liveness.d.ts.map +1 -0
- package/dist/schemas/liveness.js +41 -0
- package/dist/schemas/liveness.js.map +1 -0
- package/dist/schemas/manager.d.ts +46 -0
- package/dist/schemas/manager.d.ts.map +1 -0
- package/dist/schemas/manager.js +5 -0
- package/dist/schemas/manager.js.map +1 -0
- package/dist/schemas/port-forward.d.ts +47 -0
- package/dist/schemas/port-forward.d.ts.map +1 -0
- package/dist/schemas/port-forward.js +27 -0
- package/dist/schemas/port-forward.js.map +1 -0
- package/dist/schemas/process-source.d.ts +354 -0
- package/dist/schemas/process-source.d.ts.map +1 -0
- package/dist/schemas/process-source.js +19 -0
- package/dist/schemas/process-source.js.map +1 -0
- package/dist/schemas/process-tree.d.ts +12 -0
- package/dist/schemas/process-tree.d.ts.map +1 -0
- package/dist/schemas/process-tree.js +2 -0
- package/dist/schemas/process-tree.js.map +1 -0
- package/dist/schemas/process.d.ts +944 -0
- package/dist/schemas/process.d.ts.map +1 -0
- package/dist/schemas/process.js +429 -0
- package/dist/schemas/process.js.map +1 -0
- package/dist/schemas/resource.d.ts +223 -0
- package/dist/schemas/resource.d.ts.map +1 -0
- package/dist/schemas/resource.js +92 -0
- package/dist/schemas/resource.js.map +1 -0
- package/dist/schemas/store.d.ts +97 -0
- package/dist/schemas/store.d.ts.map +1 -0
- package/dist/schemas/store.js +2 -0
- package/dist/schemas/store.js.map +1 -0
- package/dist/schemas/task-supervision.d.ts +16 -0
- package/dist/schemas/task-supervision.d.ts.map +1 -0
- package/dist/schemas/task-supervision.js +10 -0
- package/dist/schemas/task-supervision.js.map +1 -0
- package/dist/schemas/tui-state.d.ts +777 -0
- package/dist/schemas/tui-state.d.ts.map +1 -0
- package/dist/schemas/tui-state.js +119 -0
- package/dist/schemas/tui-state.js.map +1 -0
- package/dist/schemas/worker-manager.d.ts +19 -0
- package/dist/schemas/worker-manager.d.ts.map +1 -0
- package/dist/schemas/worker-manager.js +2 -0
- package/dist/schemas/worker-manager.js.map +1 -0
- package/dist/services/cleanup.d.ts +78 -0
- package/dist/services/cleanup.d.ts.map +1 -0
- package/dist/services/cleanup.js +329 -0
- package/dist/services/cleanup.js.map +1 -0
- package/dist/services/health.d.ts +81 -0
- package/dist/services/health.d.ts.map +1 -0
- package/dist/services/health.js +435 -0
- package/dist/services/health.js.map +1 -0
- package/dist/services/index.d.ts +11 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +10 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/lifecycle.d.ts +238 -0
- package/dist/services/lifecycle.d.ts.map +1 -0
- package/dist/services/lifecycle.js +1391 -0
- package/dist/services/lifecycle.js.map +1 -0
- package/dist/services/liveness-state.d.ts +95 -0
- package/dist/services/liveness-state.d.ts.map +1 -0
- package/dist/services/liveness-state.js +239 -0
- package/dist/services/liveness-state.js.map +1 -0
- package/dist/services/orphans.d.ts +72 -0
- package/dist/services/orphans.d.ts.map +1 -0
- package/dist/services/orphans.js +185 -0
- package/dist/services/orphans.js.map +1 -0
- package/dist/services/process-command.d.ts +25 -0
- package/dist/services/process-command.d.ts.map +1 -0
- package/dist/services/process-command.js +36 -0
- package/dist/services/process-command.js.map +1 -0
- package/dist/services/process-log-archive.d.ts +62 -0
- package/dist/services/process-log-archive.d.ts.map +1 -0
- package/dist/services/process-log-archive.js +150 -0
- package/dist/services/process-log-archive.js.map +1 -0
- package/dist/services/run-log-frames.d.ts +26 -0
- package/dist/services/run-log-frames.d.ts.map +1 -0
- package/dist/services/run-log-frames.js +45 -0
- package/dist/services/run-log-frames.js.map +1 -0
- package/dist/services/startup-warmup.d.ts +23 -0
- package/dist/services/startup-warmup.d.ts.map +1 -0
- package/dist/services/startup-warmup.js +21 -0
- package/dist/services/startup-warmup.js.map +1 -0
- package/dist/services/state-wait.d.ts +28 -0
- package/dist/services/state-wait.d.ts.map +1 -0
- package/dist/services/state-wait.js +57 -0
- package/dist/services/state-wait.js.map +1 -0
- package/dist/services/supervision-policy.d.ts +40 -0
- package/dist/services/supervision-policy.d.ts.map +1 -0
- package/dist/services/supervision-policy.js +48 -0
- package/dist/services/supervision-policy.js.map +1 -0
- package/dist/services/task-supervision.d.ts +14 -0
- package/dist/services/task-supervision.d.ts.map +1 -0
- package/dist/services/task-supervision.js +112 -0
- package/dist/services/task-supervision.js.map +1 -0
- package/dist/services/types/index.d.ts +74 -0
- package/dist/services/types/index.d.ts.map +1 -0
- package/dist/services/types/index.js +11 -0
- package/dist/services/types/index.js.map +1 -0
- package/dist/services/workers.d.ts +75 -0
- package/dist/services/workers.d.ts.map +1 -0
- package/dist/services/workers.js +212 -0
- package/dist/services/workers.js.map +1 -0
- package/dist/storage/workspaces.descriptor.d.ts +12 -0
- package/dist/storage/workspaces.descriptor.d.ts.map +1 -0
- package/dist/storage/workspaces.descriptor.js +33 -0
- package/dist/storage/workspaces.descriptor.js.map +1 -0
- package/dist/store/process-admission.d.ts +11 -0
- package/dist/store/process-admission.d.ts.map +1 -0
- package/dist/store/process-admission.js +46 -0
- package/dist/store/process-admission.js.map +1 -0
- package/dist/store/process-config.impl.consumer.d.ts +22 -0
- package/dist/store/process-config.impl.consumer.d.ts.map +1 -0
- package/dist/store/process-config.impl.consumer.js +84 -0
- package/dist/store/process-config.impl.consumer.js.map +1 -0
- package/dist/store/process-state.impl.consumer.d.ts +25 -0
- package/dist/store/process-state.impl.consumer.d.ts.map +1 -0
- package/dist/store/process-state.impl.consumer.js +140 -0
- package/dist/store/process-state.impl.consumer.js.map +1 -0
- package/dist/store/resource-state.impl.consumer.d.ts +9 -0
- package/dist/store/resource-state.impl.consumer.d.ts.map +1 -0
- package/dist/store/resource-state.impl.consumer.js +48 -0
- package/dist/store/resource-state.impl.consumer.js.map +1 -0
- package/dist/store.impl.consumer.d.ts +121 -0
- package/dist/store.impl.consumer.d.ts.map +1 -0
- package/dist/store.impl.consumer.js +436 -0
- package/dist/store.impl.consumer.js.map +1 -0
- package/dist/surface.d.ts +93 -0
- package/dist/surface.d.ts.map +1 -0
- package/dist/surface.js +153 -0
- package/dist/surface.js.map +1 -0
- package/dist/svelte/components/PMOverview.svelte +527 -0
- package/dist/svelte/components/PMOverview.svelte.d.ts +12 -0
- package/dist/svelte/components/PMOverview.svelte.d.ts.map +1 -0
- package/dist/svelte/index.d.ts +4 -0
- package/dist/svelte/index.d.ts.map +1 -0
- package/dist/svelte/index.js +2 -0
- package/dist/svelte/runtime.d.ts +33 -0
- package/dist/svelte/runtime.d.ts.map +1 -0
- package/dist/svelte/runtime.js +148 -0
- package/dist/svelte/styles.css +2 -0
- package/dist/tasks/completion.d.ts +6 -0
- package/dist/tasks/completion.d.ts.map +1 -0
- package/dist/tasks/completion.js +105 -0
- package/dist/tasks/completion.js.map +1 -0
- package/dist/tasks/index.d.ts +11 -0
- package/dist/tasks/index.d.ts.map +1 -0
- package/dist/tasks/index.js +11 -0
- package/dist/tasks/index.js.map +1 -0
- package/dist/tasks/launch.d.ts +196 -0
- package/dist/tasks/launch.d.ts.map +1 -0
- package/dist/tasks/launch.js +10 -0
- package/dist/tasks/launch.js.map +1 -0
- package/dist/tasks/run-task.d.ts +11 -0
- package/dist/tasks/run-task.d.ts.map +1 -0
- package/dist/tasks/run-task.js +144 -0
- package/dist/tasks/run-task.js.map +1 -0
- package/dist/tasks/schemas.d.ts +83 -0
- package/dist/tasks/schemas.d.ts.map +1 -0
- package/dist/tasks/schemas.js +67 -0
- package/dist/tasks/schemas.js.map +1 -0
- package/dist/testing/daemon.d.ts +64 -0
- package/dist/testing/daemon.d.ts.map +1 -0
- package/dist/testing/daemon.js +125 -0
- package/dist/testing/daemon.js.map +1 -0
- package/dist/tui/components/DaemonHealthCard.d.ts +22 -0
- package/dist/tui/components/DaemonHealthCard.d.ts.map +1 -0
- package/dist/tui/components/DaemonHealthCard.js +30 -0
- package/dist/tui/components/DaemonHealthCard.js.map +1 -0
- package/dist/tui/components/ErrorDetailsPanel.d.ts +16 -0
- package/dist/tui/components/ErrorDetailsPanel.d.ts.map +1 -0
- package/dist/tui/components/ErrorDetailsPanel.js +22 -0
- package/dist/tui/components/ErrorDetailsPanel.js.map +1 -0
- package/dist/tui/components/FilterBar.d.ts +21 -0
- package/dist/tui/components/FilterBar.d.ts.map +1 -0
- package/dist/tui/components/FilterBar.js +31 -0
- package/dist/tui/components/FilterBar.js.map +1 -0
- package/dist/tui/components/StatsBar.d.ts +17 -0
- package/dist/tui/components/StatsBar.d.ts.map +1 -0
- package/dist/tui/components/StatsBar.js +28 -0
- package/dist/tui/components/StatsBar.js.map +1 -0
- package/dist/tui/components/index.d.ts +5 -0
- package/dist/tui/components/index.d.ts.map +1 -0
- package/dist/tui/components/index.js +5 -0
- package/dist/tui/components/index.js.map +1 -0
- package/dist/tui/index.d.ts +7 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +7 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/pm-dashboard.descriptor.d.ts +11 -0
- package/dist/tui/pm-dashboard.descriptor.d.ts.map +1 -0
- package/dist/tui/pm-dashboard.descriptor.js +26 -0
- package/dist/tui/pm-dashboard.descriptor.js.map +1 -0
- package/dist/tui/pm-dashboard.impl.consumer.d.ts +19 -0
- package/dist/tui/pm-dashboard.impl.consumer.d.ts.map +1 -0
- package/dist/tui/pm-dashboard.impl.consumer.js +839 -0
- package/dist/tui/pm-dashboard.impl.consumer.js.map +1 -0
- package/dist/tui/pm-open.descriptor.d.ts +10 -0
- package/dist/tui/pm-open.descriptor.d.ts.map +1 -0
- package/dist/tui/pm-open.descriptor.js +21 -0
- package/dist/tui/pm-open.descriptor.js.map +1 -0
- package/dist/tui/pm-open.impl.consumer.d.ts +9 -0
- package/dist/tui/pm-open.impl.consumer.d.ts.map +1 -0
- package/dist/tui/pm-open.impl.consumer.js +13 -0
- package/dist/tui/pm-open.impl.consumer.js.map +1 -0
- package/dist/tui/pm-processes.descriptor.d.ts +12 -0
- package/dist/tui/pm-processes.descriptor.d.ts.map +1 -0
- package/dist/tui/pm-processes.descriptor.js +30 -0
- package/dist/tui/pm-processes.descriptor.js.map +1 -0
- package/dist/tui/pm-processes.impl.consumer.d.ts +14 -0
- package/dist/tui/pm-processes.impl.consumer.d.ts.map +1 -0
- package/dist/tui/pm-processes.impl.consumer.js +214 -0
- package/dist/tui/pm-processes.impl.consumer.js.map +1 -0
- package/dist/tui/pm-state-keys.d.ts +316 -0
- package/dist/tui/pm-state-keys.d.ts.map +1 -0
- package/dist/tui/pm-state-keys.js +10 -0
- package/dist/tui/pm-state-keys.js.map +1 -0
- package/dist/tui/pm-status.descriptor.d.ts +11 -0
- package/dist/tui/pm-status.descriptor.d.ts.map +1 -0
- package/dist/tui/pm-status.descriptor.js +29 -0
- package/dist/tui/pm-status.descriptor.js.map +1 -0
- package/dist/tui/pm-status.impl.consumer.d.ts +11 -0
- package/dist/tui/pm-status.impl.consumer.d.ts.map +1 -0
- package/dist/tui/pm-status.impl.consumer.js +75 -0
- package/dist/tui/pm-status.impl.consumer.js.map +1 -0
- package/dist/tui/pm-tui.plugin.d.ts +13 -0
- package/dist/tui/pm-tui.plugin.d.ts.map +1 -0
- package/dist/tui/pm-tui.plugin.js +34 -0
- package/dist/tui/pm-tui.plugin.js.map +1 -0
- package/dist/utils/attempt.d.ts +31 -0
- package/dist/utils/attempt.d.ts.map +1 -0
- package/dist/utils/attempt.js +43 -0
- package/dist/utils/attempt.js.map +1 -0
- package/dist/utils/bounded-wait.d.ts +31 -0
- package/dist/utils/bounded-wait.d.ts.map +1 -0
- package/dist/utils/bounded-wait.js +35 -0
- package/dist/utils/bounded-wait.js.map +1 -0
- package/dist/utils/command-exists.d.ts +5 -0
- package/dist/utils/command-exists.d.ts.map +1 -0
- package/dist/utils/command-exists.js +8 -0
- package/dist/utils/command-exists.js.map +1 -0
- package/dist/utils/daemon-launch-lock.d.ts +143 -0
- package/dist/utils/daemon-launch-lock.d.ts.map +1 -0
- package/dist/utils/daemon-launch-lock.js +420 -0
- package/dist/utils/daemon-launch-lock.js.map +1 -0
- package/dist/utils/daemon-launch-recovery.d.ts +82 -0
- package/dist/utils/daemon-launch-recovery.d.ts.map +1 -0
- package/dist/utils/daemon-launch-recovery.js +173 -0
- package/dist/utils/daemon-launch-recovery.js.map +1 -0
- package/dist/utils/daemon-log-follower.d.ts +41 -0
- package/dist/utils/daemon-log-follower.d.ts.map +1 -0
- package/dist/utils/daemon-log-follower.js +124 -0
- package/dist/utils/daemon-log-follower.js.map +1 -0
- package/dist/utils/daemon-pid.d.ts +42 -0
- package/dist/utils/daemon-pid.d.ts.map +1 -0
- package/dist/utils/daemon-pid.js +80 -0
- package/dist/utils/daemon-pid.js.map +1 -0
- package/dist/utils/daemon-reachability.d.ts +87 -0
- package/dist/utils/daemon-reachability.d.ts.map +1 -0
- package/dist/utils/daemon-reachability.js +131 -0
- package/dist/utils/daemon-reachability.js.map +1 -0
- package/dist/utils/daemon-stdio-timestamps.d.ts +24 -0
- package/dist/utils/daemon-stdio-timestamps.d.ts.map +1 -0
- package/dist/utils/daemon-stdio-timestamps.js +59 -0
- package/dist/utils/daemon-stdio-timestamps.js.map +1 -0
- package/dist/utils/daemon-stop.d.ts +66 -0
- package/dist/utils/daemon-stop.d.ts.map +1 -0
- package/dist/utils/daemon-stop.js +100 -0
- package/dist/utils/daemon-stop.js.map +1 -0
- package/dist/utils/errno-failure.d.ts +16 -0
- package/dist/utils/errno-failure.d.ts.map +1 -0
- package/dist/utils/errno-failure.js +15 -0
- package/dist/utils/errno-failure.js.map +1 -0
- package/dist/utils/exec.d.ts +27 -0
- package/dist/utils/exec.d.ts.map +1 -0
- package/dist/utils/exec.js +36 -0
- package/dist/utils/exec.js.map +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/liveness.d.ts +100 -0
- package/dist/utils/liveness.d.ts.map +1 -0
- package/dist/utils/liveness.js +225 -0
- package/dist/utils/liveness.js.map +1 -0
- package/dist/utils/logging.d.ts +60 -0
- package/dist/utils/logging.d.ts.map +1 -0
- package/dist/utils/logging.js +169 -0
- package/dist/utils/logging.js.map +1 -0
- package/dist/utils/path-under.d.ts +15 -0
- package/dist/utils/path-under.d.ts.map +1 -0
- package/dist/utils/path-under.js +16 -0
- package/dist/utils/path-under.js.map +1 -0
- package/dist/utils/port-ownership.d.ts +160 -0
- package/dist/utils/port-ownership.d.ts.map +1 -0
- package/dist/utils/port-ownership.js +176 -0
- package/dist/utils/port-ownership.js.map +1 -0
- package/dist/utils/ports.d.ts +43 -0
- package/dist/utils/ports.d.ts.map +1 -0
- package/dist/utils/ports.js +200 -0
- package/dist/utils/ports.js.map +1 -0
- package/dist/utils/process-tree.d.ts +33 -0
- package/dist/utils/process-tree.d.ts.map +1 -0
- package/dist/utils/process-tree.js +197 -0
- package/dist/utils/process-tree.js.map +1 -0
- package/dist/utils/semaphore.d.ts +16 -0
- package/dist/utils/semaphore.d.ts.map +1 -0
- package/dist/utils/semaphore.js +30 -0
- package/dist/utils/semaphore.js.map +1 -0
- package/dist/utils/socket-inode.impl.consumer.d.ts +26 -0
- package/dist/utils/socket-inode.impl.consumer.d.ts.map +1 -0
- package/dist/utils/socket-inode.impl.consumer.js +30 -0
- package/dist/utils/socket-inode.impl.consumer.js.map +1 -0
- package/dist/utils/socket-paths.d.ts +121 -0
- package/dist/utils/socket-paths.d.ts.map +1 -0
- package/dist/utils/socket-paths.js +167 -0
- package/dist/utils/socket-paths.js.map +1 -0
- package/dist/utils/socket.d.ts +65 -0
- package/dist/utils/socket.d.ts.map +1 -0
- package/dist/utils/socket.js +87 -0
- package/dist/utils/socket.js.map +1 -0
- package/dist/utils/version.d.ts +40 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +65 -0
- package/dist/utils/version.js.map +1 -0
- package/dist/utils/vibes-home.d.ts +34 -0
- package/dist/utils/vibes-home.d.ts.map +1 -0
- package/dist/utils/vibes-home.js +27 -0
- package/dist/utils/vibes-home.js.map +1 -0
- package/dist/workspace-runtime.d.ts +38 -0
- package/dist/workspace-runtime.d.ts.map +1 -0
- package/dist/workspace-runtime.js +176 -0
- package/dist/workspace-runtime.js.map +1 -0
- package/package.json +465 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bounded-wait.d.ts","sourceRoot":"","sources":["../../src/utils/bounded-wait.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAqB,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAI7F,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;AAE7D,MAAM,WAAW,gBAAgB;IAChC,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,MAAM,CAAC,EAAE,WAAW,CAAC;CACrB;AAED,iHAAiH;AACjH,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAE7D;AAED;;;;GAIG;AACH,wBAAsB,SAAS,CAC9B,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,EAC7B,OAAO,EAAE,gBAAgB,GACvB,OAAO,CAAC,OAAO,CAAC,CAalB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PM's bounded waits over the runtime lifecycle (RC07).
|
|
3
|
+
*
|
|
4
|
+
* A wait awaits the owner's event or readiness promise inside
|
|
5
|
+
* `runtime.lifecycle.wait`, bounded by a deadline, the invocation's signal and
|
|
6
|
+
* the runtime's own disposal. Where the owner offers no event, `pollUntil`
|
|
7
|
+
* re-checks with `runtime.lifecycle.delay` inside that same wait; each caller
|
|
8
|
+
* names the owner and the missing event beside the call, so the poll is
|
|
9
|
+
* visible debt, never a hand-rolled sleep.
|
|
10
|
+
*/
|
|
11
|
+
import { isCapabilityError } from '@vibesdotdev/kernel';
|
|
12
|
+
import { attempt } from "./attempt.js";
|
|
13
|
+
import { rethrowFailure } from "../helpers/failure.js";
|
|
14
|
+
/** Whether `error` is the lifecycle's deadline (`TIMEOUT` `wait-timeout`), the one outcome read as "not yet". */
|
|
15
|
+
export function isWaitTimeout(failure) {
|
|
16
|
+
return failure instanceof Error && isCapabilityError(failure) && failure.code === 'TIMEOUT' && failure.reason === 'wait-timeout';
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Re-check `check` until it answers true (resolves true) or the deadline
|
|
20
|
+
* passes (resolves false). A check that throws, a caller abort and the
|
|
21
|
+
* runtime's disposal reject with their own error.
|
|
22
|
+
*/
|
|
23
|
+
export async function pollUntil(runtime, check, options) {
|
|
24
|
+
const waited = await attempt(() => runtime.lifecycle.wait(async (signal) => {
|
|
25
|
+
while (!(await check()))
|
|
26
|
+
await runtime.lifecycle.delay(options.intervalMs, signal);
|
|
27
|
+
return true;
|
|
28
|
+
}, { timeoutMs: options.timeoutMs, reason: options.reason, signal: options.signal }));
|
|
29
|
+
if (waited.ok)
|
|
30
|
+
return waited.value;
|
|
31
|
+
if (isWaitTimeout(waited.failure))
|
|
32
|
+
return false;
|
|
33
|
+
return rethrowFailure(waited.failure);
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=bounded-wait.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bounded-wait.js","sourceRoot":"","sources":["../../src/utils/bounded-wait.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,iBAAiB,EAAuC,MAAM,qBAAqB,CAAC;AAC7F,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAevD,iHAAiH;AACjH,MAAM,UAAU,aAAa,CAAC,OAAsB;IACnD,OAAO,OAAO,YAAY,KAAK,IAAI,iBAAiB,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,CAAC,MAAM,KAAK,cAAc,CAAC;AAClI,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC9B,OAAyB,EACzB,KAA6B,EAC7B,OAAyB;IAEzB,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,EAAE,CACjC,OAAO,CAAC,SAAS,CAAC,IAAI,CACrB,KAAK,EAAE,MAAM,EAAE,EAAE;QAChB,OAAO,CAAC,CAAC,MAAM,KAAK,EAAE,CAAC;YAAE,MAAM,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QACnF,OAAO,IAAI,CAAC;IACb,CAAC,EACD,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAChF,CACD,CAAC;IACF,IAAI,MAAM,CAAC,EAAE;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC;IACnC,IAAI,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IAChD,OAAO,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Command readiness through the supplied runtime's execution owner. */
|
|
2
|
+
import type { RuntimeRef } from '@vibesdotdev/kernel';
|
|
3
|
+
/** Explicit PATH overrides stay exact; otherwise the host uses its captured facts. */
|
|
4
|
+
export declare function commandExists(runtime: RuntimeRef, command: string, pathEnv?: string): Promise<boolean>;
|
|
5
|
+
//# sourceMappingURL=command-exists.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-exists.d.ts","sourceRoot":"","sources":["../../src/utils/command-exists.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,sFAAsF;AACtF,wBAAsB,aAAa,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAI5G"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { getRuntimeExecution } from '@vibesdotdev/kernel/execution';
|
|
2
|
+
/** Explicit PATH overrides stay exact; otherwise the host uses its captured facts. */
|
|
3
|
+
export async function commandExists(runtime, command, pathEnv) {
|
|
4
|
+
const execution = await getRuntimeExecution(runtime);
|
|
5
|
+
const options = pathEnv === undefined ? undefined : { env: { PATH: pathEnv } };
|
|
6
|
+
return (await execution.resolveCommand(command, options)) !== null;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=command-exists.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-exists.js","sourceRoot":"","sources":["../../src/utils/command-exists.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,sFAAsF;AACtF,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAAmB,EAAE,OAAe,EAAE,OAAgB;IACzF,MAAM,SAAS,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACrD,MAAM,OAAO,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC;IAC/E,OAAO,CAAC,MAAM,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,IAAI,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Daemon Launch Lock
|
|
3
|
+
*
|
|
4
|
+
* PM's launch custody over the filesystem owner's lease queue
|
|
5
|
+
* (`@vibesdotdev/filesystem` `acquireLease`, moved here from PM on
|
|
6
|
+
* 2026-10-11, decision D): immutable uniquely named claims, bakery admission,
|
|
7
|
+
* exact-path release. What stays PM's own:
|
|
8
|
+
*
|
|
9
|
+
* - Launch guards: once custody is held, a launch reserves an `unresolved`
|
|
10
|
+
* claim of its generation before spawning, and a `child` receipt once it
|
|
11
|
+
* owns a child. They are generation claims of the queue
|
|
12
|
+
* (`publishGenerationClaim`) whose staleness is PM's policy
|
|
13
|
+
* ({@link pmLaunchClaimStaleness}).
|
|
14
|
+
* - Staleness policy: an `unresolved` guard is retained until its
|
|
15
|
+
* generation's `child` receipt is gone; a `child` receipt is stale once its
|
|
16
|
+
* child is gone; an ordinary claim is stale when its owner is gone OR its
|
|
17
|
+
* heartbeat is older than 30 s. That last rule is PM's recovery policy
|
|
18
|
+
* (stalled launchers), not exclusion-safe: it can retire a live owner
|
|
19
|
+
* (SPEC).
|
|
20
|
+
* - The heartbeat that feeds that age: the lifecycle `touch` of the claim
|
|
21
|
+
* every 5 s while waiting and holding, started through the queue's
|
|
22
|
+
* `onClaim` and stopped with the claim. `touch` never creates, so a beat
|
|
23
|
+
* that finishes after release cannot bring the claim back.
|
|
24
|
+
* - Bare-PID lockfiles from the pre-lease implementation stay visible and
|
|
25
|
+
* recoverable during the cutover (the queue's `admissible` gate).
|
|
26
|
+
*
|
|
27
|
+
* Timers are the handed runtime's (RC07).
|
|
28
|
+
*/
|
|
29
|
+
import { type PMPathOptions, type VibesHomeResolverOptions } from './vibes-home.ts';
|
|
30
|
+
import { type CaughtFailure, type Disposer, type RuntimeRef } from '@vibesdotdev/kernel';
|
|
31
|
+
import { type LeaseClaimObservation, type LeaseQueueLease } from '@vibesdotdev/filesystem';
|
|
32
|
+
/**
|
|
33
|
+
* What the lock uses from the runtime it is handed: its filesystem, process
|
|
34
|
+
* service, lifecycle timers and waits, and its Logging for a heartbeat that
|
|
35
|
+
* fails (C083a).
|
|
36
|
+
*/
|
|
37
|
+
export type LaunchLockRuntime = RuntimeRef;
|
|
38
|
+
export declare const PM_DAEMON_LAUNCH_HEADROOM_MS = 10000;
|
|
39
|
+
export interface DaemonLaunchLockLease {
|
|
40
|
+
lockFile: string;
|
|
41
|
+
claimFile: string;
|
|
42
|
+
ownerPid: number;
|
|
43
|
+
token: string;
|
|
44
|
+
order: string;
|
|
45
|
+
/** The runtime whose filesystem holds this lease's files. */
|
|
46
|
+
runtime: LaunchLockRuntime;
|
|
47
|
+
/** The queue lease this launch custody is. */
|
|
48
|
+
queueLease: LeaseQueueLease;
|
|
49
|
+
/** Stops this lease's heartbeat (a lifecycle timer); idempotent. */
|
|
50
|
+
stopHeartbeat: Disposer;
|
|
51
|
+
/** Set when the lease is released: a heartbeat still in flight then ends instead of beating again. */
|
|
52
|
+
released?: boolean;
|
|
53
|
+
/** Set before spawning; cleared only when failure is known to leave no child. */
|
|
54
|
+
preserveOnFailure: boolean;
|
|
55
|
+
/** A new immutable claim that protects the child independently of this launcher. */
|
|
56
|
+
childClaimFile?: string;
|
|
57
|
+
unresolvedClaimFile?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface DaemonLaunchLockState {
|
|
60
|
+
exists: boolean;
|
|
61
|
+
holderPid: number | null;
|
|
62
|
+
ageMs: number | null;
|
|
63
|
+
stale: boolean;
|
|
64
|
+
guard?: 'unresolved' | 'child';
|
|
65
|
+
claimFile?: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* PM's launch-claim staleness over the lease queue. An `unresolved` guard is
|
|
69
|
+
* retained until its generation's `child` receipt is gone (retention: always
|
|
70
|
+
* exclusion-safe); a `child` receipt is stale once its child is gone; an
|
|
71
|
+
* ordinary claim is stale when its owner is gone, or when its heartbeat is
|
|
72
|
+
* older than 30 s. That age rule is PM's declared recovery policy for stalled
|
|
73
|
+
* launchers and is NOT exclusion-safe: it can retire a live owner (SPEC).
|
|
74
|
+
*/
|
|
75
|
+
export declare function pmLaunchClaimStaleness(claim: LeaseClaimObservation, generation: readonly LeaseClaimObservation[]): boolean;
|
|
76
|
+
/** Read current launch custody through `runtime`'s filesystem without mutating or waiting on it. */
|
|
77
|
+
export declare function readDaemonLaunchLockState(runtime: LaunchLockRuntime, lockFile: string, nowMs?: number): Promise<DaemonLaunchLockState>;
|
|
78
|
+
/**
|
|
79
|
+
* The launch lock of a workspace's PM daemon, by its admitted workspace's
|
|
80
|
+
* tooling id, under the handed roots' active home; there is no default.
|
|
81
|
+
*/
|
|
82
|
+
export declare function getDaemonLaunchLockPath(toolingId: string, options: PMPathOptions | VibesHomeResolverOptions): string;
|
|
83
|
+
export interface AcquireLockOptions {
|
|
84
|
+
timeoutMs: number;
|
|
85
|
+
/** Override the PID stamped into the claim. Tests use this. */
|
|
86
|
+
ownerPid?: number;
|
|
87
|
+
/** Override `Date.now`. Tests use this. */
|
|
88
|
+
now?: () => number;
|
|
89
|
+
/** The claim's heartbeat period; defaults to 5s. Tests shorten it. */
|
|
90
|
+
heartbeatMs?: number;
|
|
91
|
+
/** PM daemon launches reserve a fail-closed outcome before any child can exist. */
|
|
92
|
+
unresolvedLaunch?: boolean;
|
|
93
|
+
}
|
|
94
|
+
export declare function resolvePMDaemonStartTimeoutMs(value: string | number | null | undefined): number;
|
|
95
|
+
export declare function getPMDaemonLaunchLockTimeoutMs(startTimeoutMs: number): number;
|
|
96
|
+
/** The reason of the launch-lock acquisition timeout (a possibly orphaned guard, not a crash). */
|
|
97
|
+
export declare const LAUNCH_LOCK_TIMEOUT_REASON = "pm-daemon-launch-lock-timeout";
|
|
98
|
+
/** Whether `failure` is a launch-lock acquisition timeout (a possibly orphaned guard, not a crash). */
|
|
99
|
+
export declare function isLaunchLockTimeoutError(failure: CaughtFailure): boolean;
|
|
100
|
+
export declare function withDaemonLaunchLock<T>(runtime: LaunchLockRuntime, lockFile: string, timeoutMs: number, action: (lease: DaemonLaunchLockLease) => Promise<T>, options?: {
|
|
101
|
+
unresolvedLaunch?: boolean;
|
|
102
|
+
}): Promise<T>;
|
|
103
|
+
/**
|
|
104
|
+
* Acquire launch custody: the queue lease under PM's staleness policy, the
|
|
105
|
+
* claim heartbeat started with the claim, and the pre-lease lockfile as an
|
|
106
|
+
* extra admission gate. With `unresolvedLaunch`, an `unresolved` guard of the
|
|
107
|
+
* generation is published before the lease is handed over.
|
|
108
|
+
*/
|
|
109
|
+
export declare function acquireDaemonLaunchLock(runtime: LaunchLockRuntime, lockFile: string, opts: AcquireLockOptions): Promise<DaemonLaunchLockLease | null>;
|
|
110
|
+
export declare function releaseDaemonLaunchLock(lease: DaemonLaunchLockLease): Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* The queue's oldest generation, when it holds an unresolved launch guard: the
|
|
113
|
+
* only generation orphan recovery may consider. A younger unresolved guard
|
|
114
|
+
* behind a live head is not blocking anyone; a stale ordinary corpse ahead of
|
|
115
|
+
* an orphan clears on the next acquire poll, and recovery runs again after it.
|
|
116
|
+
*/
|
|
117
|
+
export interface OldestUnresolvedLaunchGeneration {
|
|
118
|
+
order: string;
|
|
119
|
+
token: string;
|
|
120
|
+
/** The launcher pid from the unresolved record (never the guarded child's). */
|
|
121
|
+
holderPid: number;
|
|
122
|
+
/** Age of the unresolved guard file: the launch failed this long ago. */
|
|
123
|
+
ageMs: number;
|
|
124
|
+
unresolvedClaimFile: string;
|
|
125
|
+
/** A published child receipt for this exact generation (a known child). */
|
|
126
|
+
hasChildGuard: boolean;
|
|
127
|
+
childPid: number | null;
|
|
128
|
+
}
|
|
129
|
+
export declare function inspectOldestUnresolvedGeneration(runtime: LaunchLockRuntime, lockFile: string, nowMs?: number): Promise<OldestUnresolvedLaunchGeneration | null>;
|
|
130
|
+
/**
|
|
131
|
+
* Remove exactly the claim files whose parsed record matches (`order`, `token`):
|
|
132
|
+
* the orphaned generation and nothing else. Unparseable files are never
|
|
133
|
+
* touched, and removal is idempotent under concurrent removers.
|
|
134
|
+
*/
|
|
135
|
+
export declare function removeLaunchClaimGeneration(runtime: LaunchLockRuntime, lockFile: string, order: string, token: string): Promise<string[]>;
|
|
136
|
+
/**
|
|
137
|
+
* Retain the same queue position for the exact child the launch owns. Write a
|
|
138
|
+
* new immutable claim before removing anything; a failed write leaves the
|
|
139
|
+
* unresolved original intact. A live/reused/unreadable pid blocks rather than
|
|
140
|
+
* granting another launch. This never signals or adopts a process.
|
|
141
|
+
*/
|
|
142
|
+
export declare function guardDaemonLaunchChild(lease: DaemonLaunchLockLease, childPid: number): Promise<void>;
|
|
143
|
+
//# sourceMappingURL=daemon-launch-lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daemon-launch-lock.d.ts","sourceRoot":"","sources":["../../src/utils/daemon-launch-lock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAe,KAAK,aAAa,EAAE,KAAK,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAA8D,KAAK,aAAa,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGrJ,OAAO,EAON,KAAK,qBAAqB,EAE1B,KAAK,eAAe,EAEpB,MAAM,yBAAyB,CAAC;AAOjC;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAM3C,eAAO,MAAM,4BAA4B,QAAS,CAAC;AAEnD,MAAM,WAAW,qBAAqB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,OAAO,EAAE,iBAAiB,CAAC;IAC3B,8CAA8C;IAC9C,UAAU,EAAE,eAAe,CAAC;IAC5B,oEAAoE;IACpE,aAAa,EAAE,QAAQ,CAAC;IACxB,sGAAsG;IACtG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iFAAiF;IACjF,iBAAiB,EAAE,OAAO,CAAC;IAC3B,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,SAAS,qBAAqB,EAAE,GAAG,OAAO,CAO1H;AA8CD,oGAAoG;AACpG,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,SAAa,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAKhJ;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,wBAAwB,GAAG,MAAM,CAEpH;AAED,MAAM,WAAW,kBAAkB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAG/F;AAED,wBAAgB,8BAA8B,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED,kGAAkG;AAClG,eAAO,MAAM,0BAA0B,kCAAkC,CAAC;AAE1E,uGAAuG;AACvG,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAExE;AAED,wBAAsB,oBAAoB,CAAC,CAAC,EAC3C,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,OAAO,CAAC,CAAC,CAAC,EACpD,OAAO,GAAE;IAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAO,GAC1C,OAAO,CAAC,CAAC,CAAC,CA0BZ;AAaD;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC5C,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,kBAAkB,GACtB,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAmDvC;AASD,wBAAsB,uBAAuB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CASzF;AAED;;;;;GAKG;AACH,MAAM,WAAW,gCAAgC;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,SAAS,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,MAAM,CAAC;IAC5B,2EAA2E;IAC3E,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,wBAAsB,iCAAiC,CACtD,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,MAAM,EAChB,KAAK,SAAa,GAChB,OAAO,CAAC,gCAAgC,GAAG,IAAI,CAAC,CAoBlD;AAED;;;;GAIG;AACH,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAE/I;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAAC,KAAK,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB1G"}
|
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Daemon Launch Lock
|
|
3
|
+
*
|
|
4
|
+
* PM's launch custody over the filesystem owner's lease queue
|
|
5
|
+
* (`@vibesdotdev/filesystem` `acquireLease`, moved here from PM on
|
|
6
|
+
* 2026-10-11, decision D): immutable uniquely named claims, bakery admission,
|
|
7
|
+
* exact-path release. What stays PM's own:
|
|
8
|
+
*
|
|
9
|
+
* - Launch guards: once custody is held, a launch reserves an `unresolved`
|
|
10
|
+
* claim of its generation before spawning, and a `child` receipt once it
|
|
11
|
+
* owns a child. They are generation claims of the queue
|
|
12
|
+
* (`publishGenerationClaim`) whose staleness is PM's policy
|
|
13
|
+
* ({@link pmLaunchClaimStaleness}).
|
|
14
|
+
* - Staleness policy: an `unresolved` guard is retained until its
|
|
15
|
+
* generation's `child` receipt is gone; a `child` receipt is stale once its
|
|
16
|
+
* child is gone; an ordinary claim is stale when its owner is gone OR its
|
|
17
|
+
* heartbeat is older than 30 s. That last rule is PM's recovery policy
|
|
18
|
+
* (stalled launchers), not exclusion-safe: it can retire a live owner
|
|
19
|
+
* (SPEC).
|
|
20
|
+
* - The heartbeat that feeds that age: the lifecycle `touch` of the claim
|
|
21
|
+
* every 5 s while waiting and holding, started through the queue's
|
|
22
|
+
* `onClaim` and stopped with the claim. `touch` never creates, so a beat
|
|
23
|
+
* that finishes after release cannot bring the claim back.
|
|
24
|
+
* - Bare-PID lockfiles from the pre-lease implementation stay visible and
|
|
25
|
+
* recoverable during the cutover (the queue's `admissible` gate).
|
|
26
|
+
*
|
|
27
|
+
* Timers are the handed runtime's (RC07).
|
|
28
|
+
*/
|
|
29
|
+
import { getVibesDir } from "./vibes-home.js";
|
|
30
|
+
import { CapabilityError, getRuntimeHostIdentity, isCapabilityError } from '@vibesdotdev/kernel';
|
|
31
|
+
import { getRuntimeProcessService } from '@vibesdotdev/kernel/process';
|
|
32
|
+
import { getLogger } from '@vibesdotdev/logging';
|
|
33
|
+
import { acquireLease, LeaseClaimRecordSchema, publishGenerationClaim, readLeaseQueue, releaseLease, removeLeaseGeneration } from '@vibesdotdev/filesystem';
|
|
34
|
+
import { touchChecked } from '@vibesdotdev/filesystem/core';
|
|
35
|
+
import { attempt, attemptSync, failureLabel } from "./attempt.js";
|
|
36
|
+
import { hasErrno, rethrowFailure } from "../helpers/failure.js";
|
|
37
|
+
import { pmFileSystem, readTextFileIfPresent } from "../helpers/runtime-files.js";
|
|
38
|
+
import { joinUnder } from "./path-under.js";
|
|
39
|
+
const STALE_MTIME_MS = 30_000;
|
|
40
|
+
const HEARTBEAT_INTERVAL_MS = 5_000;
|
|
41
|
+
export const PM_DAEMON_LAUNCH_HEADROOM_MS = 10_000;
|
|
42
|
+
/**
|
|
43
|
+
* PM's launch-claim staleness over the lease queue. An `unresolved` guard is
|
|
44
|
+
* retained until its generation's `child` receipt is gone (retention: always
|
|
45
|
+
* exclusion-safe); a `child` receipt is stale once its child is gone; an
|
|
46
|
+
* ordinary claim is stale when its owner is gone, or when its heartbeat is
|
|
47
|
+
* older than 30 s. That age rule is PM's declared recovery policy for stalled
|
|
48
|
+
* launchers and is NOT exclusion-safe: it can retire a live owner (SPEC).
|
|
49
|
+
*/
|
|
50
|
+
export function pmLaunchClaimStaleness(claim, generation) {
|
|
51
|
+
if (claim.record.guard === 'unresolved') {
|
|
52
|
+
const child = generation.find((candidate) => candidate.record.guard === 'child');
|
|
53
|
+
return child ? child.ownerGone : false;
|
|
54
|
+
}
|
|
55
|
+
if (claim.record.guard === 'child')
|
|
56
|
+
return claim.ownerGone;
|
|
57
|
+
return claim.ownerGone || claim.ageMs > STALE_MTIME_MS;
|
|
58
|
+
}
|
|
59
|
+
/** The pid a pre-lease lockfile's text names, if it names one. */
|
|
60
|
+
function parseLegacyHolderPid(text) {
|
|
61
|
+
const trimmed = text.trim();
|
|
62
|
+
if (!/^[1-9]\d*$/.test(trimmed))
|
|
63
|
+
return undefined;
|
|
64
|
+
const pid = Number(trimmed);
|
|
65
|
+
return Number.isSafeInteger(pid) ? pid : undefined;
|
|
66
|
+
}
|
|
67
|
+
/** A pre-lease lockfile's state, from its mtime and the pid its text names. */
|
|
68
|
+
function legacyState(mtimeMs, holderPid, nowMs, alive) {
|
|
69
|
+
if (mtimeMs === undefined)
|
|
70
|
+
return { exists: false, holderPid: null, ageMs: null, stale: false };
|
|
71
|
+
const ageMs = Math.max(0, nowMs - mtimeMs);
|
|
72
|
+
return {
|
|
73
|
+
exists: true,
|
|
74
|
+
holderPid: holderPid ?? null,
|
|
75
|
+
ageMs,
|
|
76
|
+
stale: (holderPid !== undefined && !alive(holderPid)) || ageMs > STALE_MTIME_MS
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/** The lock state a queue's oldest claim describes. */
|
|
80
|
+
function queueState(claims) {
|
|
81
|
+
const first = claims[0];
|
|
82
|
+
if (!first)
|
|
83
|
+
return { exists: false, holderPid: null, ageMs: null, stale: false };
|
|
84
|
+
const state = {
|
|
85
|
+
exists: true,
|
|
86
|
+
holderPid: first.record.pid,
|
|
87
|
+
ageMs: first.ageMs,
|
|
88
|
+
stale: first.stale
|
|
89
|
+
};
|
|
90
|
+
const guard = first.record.guard;
|
|
91
|
+
if (guard === 'unresolved' || guard === 'child') {
|
|
92
|
+
state.guard = guard;
|
|
93
|
+
state.claimFile = first.claimFile;
|
|
94
|
+
}
|
|
95
|
+
return state;
|
|
96
|
+
}
|
|
97
|
+
/** Whether a mtime string off the filesystem kind is usable: ms since epoch, or `undefined` when it carries none. */
|
|
98
|
+
function mtimeMsOf(mtime) {
|
|
99
|
+
const ms = Date.parse(mtime ?? '');
|
|
100
|
+
return Number.isNaN(ms) ? undefined : ms;
|
|
101
|
+
}
|
|
102
|
+
/** Read current launch custody through `runtime`'s filesystem without mutating or waiting on it. */
|
|
103
|
+
export async function readDaemonLaunchLockState(runtime, lockFile, nowMs = Date.now()) {
|
|
104
|
+
const io = await openLockIO(runtime);
|
|
105
|
+
const legacy = await inspectLegacyLock(io, lockFile, nowMs);
|
|
106
|
+
if (legacy.exists)
|
|
107
|
+
return legacy;
|
|
108
|
+
return queueState(await readLeaseQueue(runtime, lockFile, { staleness: pmLaunchClaimStaleness, nowMs }));
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The launch lock of a workspace's PM daemon, by its admitted workspace's
|
|
112
|
+
* tooling id, under the handed roots' active home; there is no default.
|
|
113
|
+
*/
|
|
114
|
+
export function getDaemonLaunchLockPath(toolingId, options) {
|
|
115
|
+
return joinUnder(options, getVibesDir(options), 'pm', `daemon-launch-${toolingId}.lock`);
|
|
116
|
+
}
|
|
117
|
+
export function resolvePMDaemonStartTimeoutMs(value) {
|
|
118
|
+
const configured = Number(value ?? '');
|
|
119
|
+
return Number.isFinite(configured) && configured > 0 ? configured : 30_000;
|
|
120
|
+
}
|
|
121
|
+
export function getPMDaemonLaunchLockTimeoutMs(startTimeoutMs) {
|
|
122
|
+
return startTimeoutMs + PM_DAEMON_LAUNCH_HEADROOM_MS;
|
|
123
|
+
}
|
|
124
|
+
/** The reason of the launch-lock acquisition timeout (a possibly orphaned guard, not a crash). */
|
|
125
|
+
export const LAUNCH_LOCK_TIMEOUT_REASON = 'pm-daemon-launch-lock-timeout';
|
|
126
|
+
/** Whether `failure` is a launch-lock acquisition timeout (a possibly orphaned guard, not a crash). */
|
|
127
|
+
export function isLaunchLockTimeoutError(failure) {
|
|
128
|
+
return isCapabilityError(failure) && failure.reason === LAUNCH_LOCK_TIMEOUT_REASON;
|
|
129
|
+
}
|
|
130
|
+
export async function withDaemonLaunchLock(runtime, lockFile, timeoutMs, action, options = {}) {
|
|
131
|
+
const lease = await acquireDaemonLaunchLock(runtime, lockFile, { timeoutMs, ...options });
|
|
132
|
+
if (!lease) {
|
|
133
|
+
throw new CapabilityError(`Failed to acquire daemon launch lock (timeout ${timeoutMs}ms)`, 'TIMEOUT', {
|
|
134
|
+
reason: LAUNCH_LOCK_TIMEOUT_REASON,
|
|
135
|
+
retryable: true,
|
|
136
|
+
details: { timeoutMs, lockFile }
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
let completed = false;
|
|
140
|
+
try {
|
|
141
|
+
const result = await action(lease);
|
|
142
|
+
completed = true;
|
|
143
|
+
return result;
|
|
144
|
+
}
|
|
145
|
+
finally {
|
|
146
|
+
if (!completed && lease.preserveOnFailure) {
|
|
147
|
+
lease.stopHeartbeat();
|
|
148
|
+
const files = await pmFileSystem(runtime);
|
|
149
|
+
// Guards keep the acquired queue position without turning a crashed
|
|
150
|
+
// waiting contender into permanent custody.
|
|
151
|
+
if (lease.childClaimFile || lease.unresolvedClaimFile)
|
|
152
|
+
await releaseLease(lease.queueLease);
|
|
153
|
+
if (lease.childClaimFile && lease.unresolvedClaimFile)
|
|
154
|
+
await removeIfPresent(files, lease.unresolvedClaimFile);
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
await releaseDaemonLaunchLock(lease);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
/** Admit the supplied host's default owner without consulting it for an explicit owner. */
|
|
162
|
+
async function hostPid(runtime) {
|
|
163
|
+
const pid = (await getRuntimeHostIdentity(runtime)).currentPid();
|
|
164
|
+
if (!Number.isSafeInteger(pid) || pid <= 0) {
|
|
165
|
+
throw new CapabilityError('The selected host supplied an invalid process identity.', 'INVALID_INPUT', {
|
|
166
|
+
reason: 'pm-host-pid-invalid', retryable: false
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
return pid;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Acquire launch custody: the queue lease under PM's staleness policy, the
|
|
173
|
+
* claim heartbeat started with the claim, and the pre-lease lockfile as an
|
|
174
|
+
* extra admission gate. With `unresolvedLaunch`, an `unresolved` guard of the
|
|
175
|
+
* generation is published before the lease is handed over.
|
|
176
|
+
*/
|
|
177
|
+
export async function acquireDaemonLaunchLock(runtime, lockFile, opts) {
|
|
178
|
+
const ownerPid = opts.ownerPid ?? await hostPid(runtime);
|
|
179
|
+
const now = opts.now ?? preciseWallClockMs;
|
|
180
|
+
const heartbeatMs = opts.heartbeatMs ?? HEARTBEAT_INTERVAL_MS;
|
|
181
|
+
const io = await openLockIO(runtime);
|
|
182
|
+
const leases = new Map();
|
|
183
|
+
const queueLease = await acquireLease(runtime, lockFile, {
|
|
184
|
+
timeoutMs: opts.timeoutMs,
|
|
185
|
+
reason: 'pm-daemon-launch-lock',
|
|
186
|
+
ownerPid,
|
|
187
|
+
now,
|
|
188
|
+
staleness: pmLaunchClaimStaleness,
|
|
189
|
+
// A pre-lease lockfile still holds custody; a stale one is reclaimed and re-checked next pass.
|
|
190
|
+
admissible: async () => !(await reclaimLegacyLock(io, lockFile, now())) && !(await inspectLegacyLock(io, lockFile, now())).exists,
|
|
191
|
+
onClaim: (claim) => {
|
|
192
|
+
const lease = {
|
|
193
|
+
lockFile: claim.lockFile,
|
|
194
|
+
claimFile: claim.claimFile,
|
|
195
|
+
ownerPid: claim.ownerPid,
|
|
196
|
+
token: claim.token,
|
|
197
|
+
order: claim.order,
|
|
198
|
+
runtime,
|
|
199
|
+
queueLease: claim,
|
|
200
|
+
stopHeartbeat: () => { },
|
|
201
|
+
preserveOnFailure: false
|
|
202
|
+
};
|
|
203
|
+
lease.stopHeartbeat = startHeartbeat(runtime, io.files, lease, heartbeatMs);
|
|
204
|
+
leases.set(claim, lease);
|
|
205
|
+
return () => lease.stopHeartbeat();
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
if (!queueLease)
|
|
209
|
+
return null;
|
|
210
|
+
const held = leases.get(queueLease);
|
|
211
|
+
if (!held)
|
|
212
|
+
throw new CapabilityError('The launch lease was granted without its claim.', 'INTERNAL', { reason: 'pm-launch-lease-unbound' });
|
|
213
|
+
if (opts.unresolvedLaunch) {
|
|
214
|
+
const unresolvedClaimFile = `${held.claimFile}.unresolved.claim`;
|
|
215
|
+
const written = await attempt(() => publishGenerationClaim(queueLease, unresolvedClaimFile, 'unresolved', ownerPid));
|
|
216
|
+
if (!written.ok) {
|
|
217
|
+
// No action has run: this exact generation cannot own a child. A guard
|
|
218
|
+
// that cannot be withdrawn either is kept beside the primary failure.
|
|
219
|
+
const withdrawn = await attempt(() => removeIfPresent(io.files, unresolvedClaimFile));
|
|
220
|
+
const failure = withdrawn.ok
|
|
221
|
+
? written.failure
|
|
222
|
+
: new AggregateError([written.failure, withdrawn.failure], 'The unresolved launch guard failed and could not be withdrawn');
|
|
223
|
+
return releaseThenRethrow(held, failure);
|
|
224
|
+
}
|
|
225
|
+
held.unresolvedClaimFile = unresolvedClaimFile;
|
|
226
|
+
}
|
|
227
|
+
return held;
|
|
228
|
+
}
|
|
229
|
+
/** Release `lease`, then fail with `failure`; a release that fails too is kept beside it. */
|
|
230
|
+
async function releaseThenRethrow(lease, failure) {
|
|
231
|
+
const released = await attempt(() => releaseDaemonLaunchLock(lease));
|
|
232
|
+
if (!released.ok)
|
|
233
|
+
throw new AggregateError([failure, released.failure], 'The launch claim failed and could not be released');
|
|
234
|
+
return rethrowFailure(failure);
|
|
235
|
+
}
|
|
236
|
+
export async function releaseDaemonLaunchLock(lease) {
|
|
237
|
+
lease.released = true;
|
|
238
|
+
lease.stopHeartbeat();
|
|
239
|
+
const files = await pmFileSystem(lease.runtime);
|
|
240
|
+
// Claim paths include a UUID and are never reused. Removing this exact path
|
|
241
|
+
// is generation-aware in one filesystem operation; no token/delete gap exists.
|
|
242
|
+
await releaseLease(lease.queueLease);
|
|
243
|
+
if (lease.childClaimFile)
|
|
244
|
+
await removeIfPresent(files, lease.childClaimFile);
|
|
245
|
+
if (lease.unresolvedClaimFile)
|
|
246
|
+
await removeIfPresent(files, lease.unresolvedClaimFile);
|
|
247
|
+
}
|
|
248
|
+
export async function inspectOldestUnresolvedGeneration(runtime, lockFile, nowMs = Date.now()) {
|
|
249
|
+
const claims = await readLeaseQueue(runtime, lockFile, { staleness: pmLaunchClaimStaleness, nowMs });
|
|
250
|
+
const oldest = claims[0];
|
|
251
|
+
if (!oldest)
|
|
252
|
+
return null;
|
|
253
|
+
const generation = claims.filter((candidate) => candidate.record.order === oldest.record.order && candidate.record.token === oldest.record.token);
|
|
254
|
+
const unresolved = generation.find((candidate) => candidate.record.guard === 'unresolved');
|
|
255
|
+
if (!unresolved)
|
|
256
|
+
return null;
|
|
257
|
+
const child = generation.find((candidate) => candidate.record.guard === 'child');
|
|
258
|
+
return {
|
|
259
|
+
order: unresolved.record.order,
|
|
260
|
+
token: unresolved.record.token,
|
|
261
|
+
holderPid: unresolved.record.pid,
|
|
262
|
+
ageMs: unresolved.ageMs,
|
|
263
|
+
unresolvedClaimFile: unresolved.claimFile,
|
|
264
|
+
hasChildGuard: child !== undefined,
|
|
265
|
+
childPid: child?.record.pid ?? null
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Remove exactly the claim files whose parsed record matches (`order`, `token`):
|
|
270
|
+
* the orphaned generation and nothing else. Unparseable files are never
|
|
271
|
+
* touched, and removal is idempotent under concurrent removers.
|
|
272
|
+
*/
|
|
273
|
+
export async function removeLaunchClaimGeneration(runtime, lockFile, order, token) {
|
|
274
|
+
return removeLeaseGeneration(runtime, lockFile, order, token);
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Retain the same queue position for the exact child the launch owns. Write a
|
|
278
|
+
* new immutable claim before removing anything; a failed write leaves the
|
|
279
|
+
* unresolved original intact. A live/reused/unreadable pid blocks rather than
|
|
280
|
+
* granting another launch. This never signals or adopts a process.
|
|
281
|
+
*/
|
|
282
|
+
export async function guardDaemonLaunchChild(lease, childPid) {
|
|
283
|
+
if (!Number.isSafeInteger(childPid) || childPid <= 0) {
|
|
284
|
+
throw new CapabilityError('A daemon launch guard requires its owned child pid', 'INVALID_INPUT', {
|
|
285
|
+
reason: 'pm-daemon-launch-guard-pid-invalid',
|
|
286
|
+
details: { childPid }
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
const files = await pmFileSystem(lease.runtime);
|
|
290
|
+
const childClaimFile = `${lease.lockFile}.${lease.order}-${childPid}-${lease.token}.child.claim`;
|
|
291
|
+
await publishGenerationClaim(lease.queueLease, childClaimFile, 'child', childPid);
|
|
292
|
+
lease.childClaimFile = childClaimFile;
|
|
293
|
+
// Publication hands uncertainty to the observable child. Do not leave an
|
|
294
|
+
// immortal unresolved guard if this launcher dies before its finally block.
|
|
295
|
+
if (lease.unresolvedClaimFile) {
|
|
296
|
+
await removeIfPresent(files, lease.unresolvedClaimFile);
|
|
297
|
+
lease.unresolvedClaimFile = undefined;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
/** Remove `path`; a path that is already gone (`ENOENT`) is the goal, any other failure propagates. */
|
|
301
|
+
async function removeIfPresent(files, path) {
|
|
302
|
+
const removed = await attempt(() => files.remove(path));
|
|
303
|
+
if (!removed.ok && !hasErrno(removed.failure, 'ENOENT'))
|
|
304
|
+
rethrowFailure(removed.failure);
|
|
305
|
+
}
|
|
306
|
+
async function openLockIO(runtime) {
|
|
307
|
+
const service = await getRuntimeProcessService(runtime);
|
|
308
|
+
return { files: await pmFileSystem(runtime), isRunning: (pid) => service.isRunning(pid) };
|
|
309
|
+
}
|
|
310
|
+
/** Which of `pids` are running, read once each. */
|
|
311
|
+
async function livenessOf(io, pids) {
|
|
312
|
+
const running = new Map();
|
|
313
|
+
for (const pid of new Set(pids))
|
|
314
|
+
running.set(pid, await io.isRunning(pid));
|
|
315
|
+
return (pid) => running.get(pid) ?? false;
|
|
316
|
+
}
|
|
317
|
+
/** A claim's record; `undefined` when the claim is gone (`ENOENT`: released) or is not a claim record. Any other read failure propagates. */
|
|
318
|
+
async function readClaimRecord(files, claimFile) {
|
|
319
|
+
const text = await readTextFileIfPresent(files, claimFile);
|
|
320
|
+
if (text === undefined)
|
|
321
|
+
return undefined;
|
|
322
|
+
const json = attemptSync(() => JSON.parse(text));
|
|
323
|
+
if (!json.ok) {
|
|
324
|
+
if (json.failure instanceof SyntaxError)
|
|
325
|
+
return undefined;
|
|
326
|
+
return rethrowFailure(json.failure);
|
|
327
|
+
}
|
|
328
|
+
const record = LeaseClaimRecordSchema.safeParse(json.value);
|
|
329
|
+
return record.success ? record.data : undefined;
|
|
330
|
+
}
|
|
331
|
+
/** A path's mtime in ms; `undefined` when the path is gone (`ENOENT`). Any other failure propagates. */
|
|
332
|
+
async function readMtimeMs(files, path) {
|
|
333
|
+
const read = await attempt(() => files.stat(path));
|
|
334
|
+
if (read.ok)
|
|
335
|
+
return mtimeMsOf(read.value.mtime);
|
|
336
|
+
if (hasErrno(read.failure, 'ENOENT'))
|
|
337
|
+
return undefined;
|
|
338
|
+
return rethrowFailure(read.failure);
|
|
339
|
+
}
|
|
340
|
+
/** A pre-lease lockfile's mtime and the pid its text names. */
|
|
341
|
+
async function readLegacyLock(io, lockFile) {
|
|
342
|
+
const mtimeMs = await readMtimeMs(io.files, lockFile);
|
|
343
|
+
if (mtimeMs === undefined)
|
|
344
|
+
return { mtimeMs, holderPid: undefined };
|
|
345
|
+
const text = await readTextFileIfPresent(io.files, lockFile);
|
|
346
|
+
return { mtimeMs, holderPid: text === undefined ? undefined : parseLegacyHolderPid(text) };
|
|
347
|
+
}
|
|
348
|
+
async function inspectLegacyLock(io, lockFile, nowMs) {
|
|
349
|
+
const { mtimeMs, holderPid } = await readLegacyLock(io, lockFile);
|
|
350
|
+
const alive = await livenessOf(io, holderPid === undefined ? [] : [holderPid]);
|
|
351
|
+
return legacyState(mtimeMs, holderPid, nowMs, alive);
|
|
352
|
+
}
|
|
353
|
+
async function reclaimLegacyLock(io, lockFile, nowMs) {
|
|
354
|
+
const legacy = await inspectLegacyLock(io, lockFile, nowMs);
|
|
355
|
+
if (!legacy.exists || !legacy.stale)
|
|
356
|
+
return false;
|
|
357
|
+
// This path exists only for pre-lease binaries during cutover. New binaries
|
|
358
|
+
// never recreate it; all permanent generations use immutable claim paths.
|
|
359
|
+
await removeIfPresent(io.files, lockFile);
|
|
360
|
+
return true;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Touch the claim every `heartbeatMs` (default 5s) while the lease lives: a chain of
|
|
364
|
+
* lifecycle one-shots, each arming the next. It stops when the returned
|
|
365
|
+
* disposer runs, when the claim is no longer this lease's, or when the touch
|
|
366
|
+
* fails; the runtime's disposal clears the pending one.
|
|
367
|
+
*/
|
|
368
|
+
function startHeartbeat(runtime, files, lease, heartbeatMs) {
|
|
369
|
+
let cancel;
|
|
370
|
+
let stopped = false;
|
|
371
|
+
/** Touch this lease's own claim; false when the claim is gone or is not this lease's. */
|
|
372
|
+
const republish = async () => {
|
|
373
|
+
// The disposer is synchronous and the touch is not: a beat that has not
|
|
374
|
+
// touched yet ends here, so a stopped heartbeat never advances (or
|
|
375
|
+
// revives) the claim's mtime.
|
|
376
|
+
if (stopped)
|
|
377
|
+
return false;
|
|
378
|
+
const record = await readClaimRecord(files, lease.claimFile);
|
|
379
|
+
if (!record || record.pid !== lease.ownerPid || record.token !== lease.token)
|
|
380
|
+
return false;
|
|
381
|
+
// Re-read after the awaits: the heartbeat may have been stopped (or the
|
|
382
|
+
// lease released) while the read was in flight.
|
|
383
|
+
if (stopped)
|
|
384
|
+
return false;
|
|
385
|
+
// `touch` advances the mtime and never creates: it answers `false` when the claim is gone,
|
|
386
|
+
// so a release that ran while this beat was in flight is never undone.
|
|
387
|
+
return (await touchChecked(files, lease.claimFile)) && !lease.released;
|
|
388
|
+
};
|
|
389
|
+
const beat = async () => {
|
|
390
|
+
cancel = undefined;
|
|
391
|
+
if (stopped)
|
|
392
|
+
return;
|
|
393
|
+
const beaten = await attempt(republish);
|
|
394
|
+
if (!beaten.ok) {
|
|
395
|
+
// The claim is gone (ENOENT: released or reclaimed) or unwritable:
|
|
396
|
+
// this lease's heartbeat ends; an unwritable claim is reported, and
|
|
397
|
+
// goes stale for other launchers exactly as a dead owner's would.
|
|
398
|
+
if (!hasErrno(beaten.failure, 'ENOENT')) {
|
|
399
|
+
getLogger('pm:daemon-launch-lock', runtime).warn('daemon launch claim heartbeat failed', {
|
|
400
|
+
claimFile: lease.claimFile,
|
|
401
|
+
reason: failureLabel(beaten.failure)
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
if (!beaten.value || stopped)
|
|
407
|
+
return;
|
|
408
|
+
cancel = runtime.lifecycle.timeout(() => void beat(), heartbeatMs);
|
|
409
|
+
};
|
|
410
|
+
cancel = runtime.lifecycle.timeout(() => void beat(), heartbeatMs);
|
|
411
|
+
return () => {
|
|
412
|
+
stopped = true;
|
|
413
|
+
cancel?.();
|
|
414
|
+
cancel = undefined;
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
function preciseWallClockMs() {
|
|
418
|
+
return performance.timeOrigin + performance.now();
|
|
419
|
+
}
|
|
420
|
+
//# sourceMappingURL=daemon-launch-lock.js.map
|