@devrouter/cli 0.0.75 → 0.0.76
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/dist/devrouter-lifecycle-worker.js +16 -6
- package/dist/devrouter.js +14 -8
- package/package.json +1 -1
- package/upgrade-prompts/0.0.76.md +33 -0
|
@@ -4683,7 +4683,7 @@ var ControllerStore = class {
|
|
|
4683
4683
|
|
|
4684
4684
|
// src/core/reliability-operation-store.ts
|
|
4685
4685
|
function installedCliVersion() {
|
|
4686
|
-
return true ? "0.0.
|
|
4686
|
+
return true ? "0.0.76" : "0.0.0-dev";
|
|
4687
4687
|
}
|
|
4688
4688
|
function compareCliVersions(left, right) {
|
|
4689
4689
|
const parts = (value) => value.split(".").map((part) => Number.parseInt(part, 10) || 0);
|
|
@@ -6383,7 +6383,7 @@ function loadRepoConfig(repoPath, read2 = (file) => import_node_fs18.default.rea
|
|
|
6383
6383
|
const config = parseConfig(parsed ?? {}, configPath);
|
|
6384
6384
|
const requiredVersion = config.devrouter?.version;
|
|
6385
6385
|
if (requiredVersion && !hasWarnedVersionMismatch) {
|
|
6386
|
-
const cliVersion = true ? "0.0.
|
|
6386
|
+
const cliVersion = true ? "0.0.76" : "0.0.0-dev";
|
|
6387
6387
|
if (cliVersion !== "0.0.0-dev" && compareSemver(requiredVersion, cliVersion) > 0) {
|
|
6388
6388
|
hasWarnedVersionMismatch = true;
|
|
6389
6389
|
process.stderr.write(
|
|
@@ -7317,6 +7317,9 @@ function stopInitialManagedDevsyWorkspace(repoPath, devsyId) {
|
|
|
7317
7317
|
const authority = readAuthority();
|
|
7318
7318
|
const gitCommonDir = linked ? resolveGitCommonDir(repoPath) : void 0;
|
|
7319
7319
|
const workspaceEnv = workspace && gitCommonDir ? { token: workspace, gitCommonDir } : void 0;
|
|
7320
|
+
function canonicalProfile(recorded) {
|
|
7321
|
+
return resolveProfile(loadRepoConfig(repoPath), recorded).name;
|
|
7322
|
+
}
|
|
7320
7323
|
const registration2 = () => {
|
|
7321
7324
|
resetWorkspaceRuntimeCaches();
|
|
7322
7325
|
if (resolveWorkspaceRuntimeOrDefault(repoPath) !== "devsy")
|
|
@@ -7331,8 +7334,9 @@ function stopInitialManagedDevsyWorkspace(repoPath, devsyId) {
|
|
|
7331
7334
|
}
|
|
7332
7335
|
return owner2.workspace;
|
|
7333
7336
|
};
|
|
7334
|
-
const
|
|
7335
|
-
|
|
7337
|
+
const canonicalName = canonicalProfile(authority.entry.profile);
|
|
7338
|
+
const runtime = loadRuntimeConfig(repoPath, workspace ?? "", canonicalName);
|
|
7339
|
+
if (!runtime.config.managedRuntime || runtime.profile !== canonicalName)
|
|
7336
7340
|
throw new Error("Initial managed stop requires the recorded managed profile.");
|
|
7337
7341
|
const owner = registration2();
|
|
7338
7342
|
proveLocalDockerSelection(owner);
|
|
@@ -7366,14 +7370,16 @@ function stopInitialManagedDevsyWorkspace(repoPath, devsyId) {
|
|
|
7366
7370
|
(entry) => entry.id === devsyId || entry.source.localFolder !== "" && sameWorkspacePath(entry.source.localFolder, repoPath)
|
|
7367
7371
|
))
|
|
7368
7372
|
throw new Error("Initial managed stop found conflicting provider ownership.");
|
|
7369
|
-
|
|
7373
|
+
if (canonicalProfile(authority.entry.profile) !== canonicalName)
|
|
7374
|
+
throw new Error("Initial managed stop configuration changed.");
|
|
7375
|
+
const currentRuntime = loadRuntimeConfig(repoPath, workspace ?? "", canonicalName);
|
|
7370
7376
|
const currentPlan = inspectManagedDevcontainerConfig({
|
|
7371
7377
|
repoPath,
|
|
7372
7378
|
config: currentRuntime.config,
|
|
7373
7379
|
profile: currentRuntime.resolvedProfile,
|
|
7374
7380
|
linked
|
|
7375
7381
|
});
|
|
7376
|
-
if (currentRuntime.profile !==
|
|
7382
|
+
if (currentRuntime.profile !== canonicalName || !(0, import_node_util5.isDeepStrictEqual)(currentRuntime.resolvedProfile, runtime.resolvedProfile) || !(0, import_node_util5.isDeepStrictEqual)(currentPlan, plan) || inspectManagedDevcontainerGeneratedConfig(currentPlan).status !== "valid")
|
|
7377
7383
|
throw new Error("Initial managed stop configuration changed.");
|
|
7378
7384
|
const matches = inspectWorkspaceContainers().filter(
|
|
7379
7385
|
(c) => sameWorkspacePath(
|
|
@@ -14463,6 +14469,10 @@ async function workspaceEnsure(requestedRepoPath, options = {}) {
|
|
|
14463
14469
|
linked,
|
|
14464
14470
|
previousState: previousManagedState
|
|
14465
14471
|
});
|
|
14472
|
+
} else if (capturedStopState) {
|
|
14473
|
+
if (capturedStopState.sourceConfigSha256 !== managedPlan.sourceConfigSha256 || capturedStopState.effectiveConfigSha256 !== managedPlan.effectiveConfigSha256 || inspectManagedDevcontainerGeneratedConfig(managedPlan).status !== "valid") {
|
|
14474
|
+
throw new Error("Captured managed configuration changed during rollback.");
|
|
14475
|
+
}
|
|
14466
14476
|
} else if (managedRuntimeConfig) {
|
|
14467
14477
|
restoreFirstTransitionManagedConfig({
|
|
14468
14478
|
repoPath,
|
package/dist/devrouter.js
CHANGED
|
@@ -4256,7 +4256,7 @@ function loadRepoConfig(repoPath, read2 = (file) => import_node_fs7.default.read
|
|
|
4256
4256
|
const config = parseConfig(parsed ?? {}, configPath);
|
|
4257
4257
|
const requiredVersion = config.devrouter?.version;
|
|
4258
4258
|
if (requiredVersion && !hasWarnedVersionMismatch) {
|
|
4259
|
-
const cliVersion = true ? "0.0.
|
|
4259
|
+
const cliVersion = true ? "0.0.76" : "0.0.0-dev";
|
|
4260
4260
|
if (cliVersion !== "0.0.0-dev" && compareSemver(requiredVersion, cliVersion) > 0) {
|
|
4261
4261
|
hasWarnedVersionMismatch = true;
|
|
4262
4262
|
process.stderr.write(
|
|
@@ -5509,7 +5509,7 @@ var init_reliability_contract = __esm({
|
|
|
5509
5509
|
|
|
5510
5510
|
// src/core/reliability-operation-store.ts
|
|
5511
5511
|
function installedCliVersion() {
|
|
5512
|
-
return true ? "0.0.
|
|
5512
|
+
return true ? "0.0.76" : "0.0.0-dev";
|
|
5513
5513
|
}
|
|
5514
5514
|
function compareCliVersions(left, right) {
|
|
5515
5515
|
const parts = (value) => value.split(".").map((part) => Number.parseInt(part, 10) || 0);
|
|
@@ -10642,6 +10642,9 @@ function stopInitialManagedDevsyWorkspace(repoPath, devsyId) {
|
|
|
10642
10642
|
const authority = readAuthority();
|
|
10643
10643
|
const gitCommonDir = linked ? resolveGitCommonDir(repoPath) : void 0;
|
|
10644
10644
|
const workspaceEnv = workspace && gitCommonDir ? { token: workspace, gitCommonDir } : void 0;
|
|
10645
|
+
function canonicalProfile(recorded) {
|
|
10646
|
+
return resolveProfile(loadRepoConfig(repoPath), recorded).name;
|
|
10647
|
+
}
|
|
10645
10648
|
const registration2 = () => {
|
|
10646
10649
|
resetWorkspaceRuntimeCaches();
|
|
10647
10650
|
if (resolveWorkspaceRuntimeOrDefault(repoPath) !== "devsy")
|
|
@@ -10656,8 +10659,9 @@ function stopInitialManagedDevsyWorkspace(repoPath, devsyId) {
|
|
|
10656
10659
|
}
|
|
10657
10660
|
return owner2.workspace;
|
|
10658
10661
|
};
|
|
10659
|
-
const
|
|
10660
|
-
|
|
10662
|
+
const canonicalName = canonicalProfile(authority.entry.profile);
|
|
10663
|
+
const runtime = loadRuntimeConfig(repoPath, workspace ?? "", canonicalName);
|
|
10664
|
+
if (!runtime.config.managedRuntime || runtime.profile !== canonicalName)
|
|
10661
10665
|
throw new Error("Initial managed stop requires the recorded managed profile.");
|
|
10662
10666
|
const owner = registration2();
|
|
10663
10667
|
proveLocalDockerSelection(owner);
|
|
@@ -10691,14 +10695,16 @@ function stopInitialManagedDevsyWorkspace(repoPath, devsyId) {
|
|
|
10691
10695
|
(entry) => entry.id === devsyId || entry.source.localFolder !== "" && sameWorkspacePath(entry.source.localFolder, repoPath)
|
|
10692
10696
|
))
|
|
10693
10697
|
throw new Error("Initial managed stop found conflicting provider ownership.");
|
|
10694
|
-
|
|
10698
|
+
if (canonicalProfile(authority.entry.profile) !== canonicalName)
|
|
10699
|
+
throw new Error("Initial managed stop configuration changed.");
|
|
10700
|
+
const currentRuntime = loadRuntimeConfig(repoPath, workspace ?? "", canonicalName);
|
|
10695
10701
|
const currentPlan = inspectManagedDevcontainerConfig({
|
|
10696
10702
|
repoPath,
|
|
10697
10703
|
config: currentRuntime.config,
|
|
10698
10704
|
profile: currentRuntime.resolvedProfile,
|
|
10699
10705
|
linked
|
|
10700
10706
|
});
|
|
10701
|
-
if (currentRuntime.profile !==
|
|
10707
|
+
if (currentRuntime.profile !== canonicalName || !(0, import_node_util9.isDeepStrictEqual)(currentRuntime.resolvedProfile, runtime.resolvedProfile) || !(0, import_node_util9.isDeepStrictEqual)(currentPlan, plan) || inspectManagedDevcontainerGeneratedConfig(currentPlan).status !== "valid")
|
|
10702
10708
|
throw new Error("Initial managed stop configuration changed.");
|
|
10703
10709
|
const matches = inspectWorkspaceContainers().filter(
|
|
10704
10710
|
(c) => sameWorkspacePath(
|
|
@@ -21116,7 +21122,7 @@ async function buildDoctorReport(options = {}) {
|
|
|
21116
21122
|
const config = runtimeConfig.config;
|
|
21117
21123
|
loadedConfig = config;
|
|
21118
21124
|
loadedWorkspace = runtimeConfig.workspace;
|
|
21119
|
-
const cliVersion = true ? "0.0.
|
|
21125
|
+
const cliVersion = true ? "0.0.76" : "0.0.0-dev";
|
|
21120
21126
|
const configVersion = config.devrouter?.version;
|
|
21121
21127
|
if (configVersion && cliVersion !== "0.0.0-dev" && compareSemver(configVersion, cliVersion) > 0) {
|
|
21122
21128
|
addCheck(checks, {
|
|
@@ -26557,7 +26563,7 @@ var init_version = __esm({
|
|
|
26557
26563
|
|
|
26558
26564
|
// src/cli.ts
|
|
26559
26565
|
var import_commander = require("commander");
|
|
26560
|
-
var CLI_VERSION = true ? "0.0.
|
|
26566
|
+
var CLI_VERSION = true ? "0.0.76" : "0.0.0-dev";
|
|
26561
26567
|
var VERSION_FLAGS = /* @__PURE__ */ new Set(["-V", "--version"]);
|
|
26562
26568
|
function withErrorHandling(action2) {
|
|
26563
26569
|
return async (...args) => {
|
package/package.json
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Upgrade to devrouter 0.0.76
|
|
2
|
+
|
|
3
|
+
This patch accepts canonical-equivalent historical profile selections during
|
|
4
|
+
initial managed stop and prevents first-transition rollback from contradicting
|
|
5
|
+
captured degraded configuration. No schema, command or flag migration is needed.
|
|
6
|
+
|
|
7
|
+
## Task
|
|
8
|
+
|
|
9
|
+
Use the published 0.0.76 CLI. Update `.devrouter.yml` devrouter.version only when
|
|
10
|
+
consumer source changes are authorized. Preserve another task's staged work.
|
|
11
|
+
Refresh generated agent guidance only with the repository owner's authority.
|
|
12
|
+
No generated runtime configuration or journal rewrite is required or authorized.
|
|
13
|
+
|
|
14
|
+
For an affected exact checkout, its runtime owner uses `devrouter stop <path>
|
|
15
|
+
--json` with the original Compose inputs. Canonical-equivalent selections pass
|
|
16
|
+
the profile check; every ownership and configuration proof still applies. A
|
|
17
|
+
Compose hash refusal must be investigated rather than bypassed. Historical
|
|
18
|
+
contradictory generated configuration remains unproved without writer evidence;
|
|
19
|
+
a valid retained stop baseline can support containment, not automatic resume.
|
|
20
|
+
|
|
21
|
+
## Validation
|
|
22
|
+
|
|
23
|
+
Verify the installed version and exact checkout ownership. Require live provider,
|
|
24
|
+
container and route cessation proof for stop. A later ensure needs its own runtime
|
|
25
|
+
and readiness proof. New compatible failed-first-transition retries retain matching
|
|
26
|
+
configuration; extra resources and manual drift remain refusals. Source tests or a
|
|
27
|
+
passed profile check do not establish full consumer recovery.
|
|
28
|
+
|
|
29
|
+
## Report
|
|
30
|
+
|
|
31
|
+
Report release revision, installed executable, exact checkout, stop/ensure result
|
|
32
|
+
or precise refusal, and source/index preservation. Separate release/install proof
|
|
33
|
+
from live consumer acceptance.
|