@ran-sh/dsh-crew 1.5.0 → 1.5.1
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/.claude-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/src/hub/entry.mjs +6 -0
- package/src/install/install-legacy.mjs +739 -725
- package/src/install/npx-lifecycle.mjs +16 -2
- package/src/multimodal.mjs +0 -0
- package/src/release-in-use.mjs +110 -0
- package/src/runtime-identity.mjs +1 -1
package/package.json
CHANGED
package/src/hub/entry.mjs
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import { apply as applyHub, inject, name, WorkerRegistry } from './index.mjs';
|
|
11
11
|
import { getHubRuntimeIdentity } from '../runtime-identity.mjs';
|
|
12
12
|
import { getProcessAdaptiveHealthStore } from '../adaptive-routing.mjs';
|
|
13
|
+
import { claimReleaseInUse } from '../release-in-use.mjs';
|
|
13
14
|
|
|
14
15
|
const RUNTIME_PATH = '/_dsh/dsh-crew/runtime';
|
|
15
16
|
const ADAPTIVE_OBSERVER_INSTALLED = Symbol.for('@ran-sh/dsh-crew/adaptive-observer-installed');
|
|
@@ -92,6 +93,11 @@ export function installAdaptiveHealthObserver() {
|
|
|
92
93
|
}
|
|
93
94
|
|
|
94
95
|
export async function apply(ctx) {
|
|
96
|
+
// Declare this release in use before anything else. The Hub loads several
|
|
97
|
+
// modules lazily with a cache-busting query, so deleting the release under a
|
|
98
|
+
// running process would break those routes with no way to recover but a
|
|
99
|
+
// restart. Retention reads these claims and leaves a live release alone.
|
|
100
|
+
claimReleaseInUse();
|
|
95
101
|
registerRuntimeEndpoint(ctx);
|
|
96
102
|
installAdaptiveHealthObserver();
|
|
97
103
|
return applyHub(ctx);
|