@devrouter/cli 0.0.75 → 0.0.77
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.
|
@@ -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.77" : "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.77" : "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(
|
|
@@ -13905,6 +13911,14 @@ async function workspaceEnsure(requestedRepoPath, options = {}) {
|
|
|
13905
13911
|
"Claimed network repair requires exact retained-network reconciliation; automatic repair is unavailable."
|
|
13906
13912
|
);
|
|
13907
13913
|
}
|
|
13914
|
+
let earlyTlsRefreshed = false;
|
|
13915
|
+
if (!options.repair) {
|
|
13916
|
+
claimLifecycleEffect();
|
|
13917
|
+
earlyTlsRefreshed = (await ensureTLSHostsCovered(
|
|
13918
|
+
apps.map((app) => app.host),
|
|
13919
|
+
{ repoPath }
|
|
13920
|
+
)).refreshed;
|
|
13921
|
+
}
|
|
13908
13922
|
if (managedPlan && !options.repair && !network) {
|
|
13909
13923
|
if (!target.hadExactDevpod && devpodId && inspectLegacyNetworkCapacity({
|
|
13910
13924
|
provider: resolveWorkspaceRuntimeOrDefault(repoPath),
|
|
@@ -14327,7 +14341,7 @@ async function workspaceEnsure(requestedRepoPath, options = {}) {
|
|
|
14327
14341
|
devpodId,
|
|
14328
14342
|
urls,
|
|
14329
14343
|
recreated,
|
|
14330
|
-
tlsRefreshed: publication.tlsRefreshed,
|
|
14344
|
+
tlsRefreshed: earlyTlsRefreshed || publication.tlsRefreshed,
|
|
14331
14345
|
...applicationReadiness ? { applicationReadiness } : {},
|
|
14332
14346
|
...managedRuntimeStatus ? { managedRuntime: managedRuntimeStatus } : {}
|
|
14333
14347
|
};
|
|
@@ -14463,6 +14477,10 @@ async function workspaceEnsure(requestedRepoPath, options = {}) {
|
|
|
14463
14477
|
linked,
|
|
14464
14478
|
previousState: previousManagedState
|
|
14465
14479
|
});
|
|
14480
|
+
} else if (capturedStopState) {
|
|
14481
|
+
if (capturedStopState.sourceConfigSha256 !== managedPlan.sourceConfigSha256 || capturedStopState.effectiveConfigSha256 !== managedPlan.effectiveConfigSha256 || inspectManagedDevcontainerGeneratedConfig(managedPlan).status !== "valid") {
|
|
14482
|
+
throw new Error("Captured managed configuration changed during rollback.");
|
|
14483
|
+
}
|
|
14466
14484
|
} else if (managedRuntimeConfig) {
|
|
14467
14485
|
restoreFirstTransitionManagedConfig({
|
|
14468
14486
|
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.77" : "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.77" : "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(
|
|
@@ -15255,6 +15261,7 @@ var init_workspace_ensure = __esm({
|
|
|
15255
15261
|
init_repo_config();
|
|
15256
15262
|
init_route_publication();
|
|
15257
15263
|
init_router();
|
|
15264
|
+
init_tls();
|
|
15258
15265
|
init_traefik_route_health();
|
|
15259
15266
|
init_workspace();
|
|
15260
15267
|
init_workspace_ownership();
|
|
@@ -21116,7 +21123,7 @@ async function buildDoctorReport(options = {}) {
|
|
|
21116
21123
|
const config = runtimeConfig.config;
|
|
21117
21124
|
loadedConfig = config;
|
|
21118
21125
|
loadedWorkspace = runtimeConfig.workspace;
|
|
21119
|
-
const cliVersion = true ? "0.0.
|
|
21126
|
+
const cliVersion = true ? "0.0.77" : "0.0.0-dev";
|
|
21120
21127
|
const configVersion = config.devrouter?.version;
|
|
21121
21128
|
if (configVersion && cliVersion !== "0.0.0-dev" && compareSemver(configVersion, cliVersion) > 0) {
|
|
21122
21129
|
addCheck(checks, {
|
|
@@ -26557,7 +26564,7 @@ var init_version = __esm({
|
|
|
26557
26564
|
|
|
26558
26565
|
// src/cli.ts
|
|
26559
26566
|
var import_commander = require("commander");
|
|
26560
|
-
var CLI_VERSION = true ? "0.0.
|
|
26567
|
+
var CLI_VERSION = true ? "0.0.77" : "0.0.0-dev";
|
|
26561
26568
|
var VERSION_FLAGS = /* @__PURE__ */ new Set(["-V", "--version"]);
|
|
26562
26569
|
function withErrorHandling(action2) {
|
|
26563
26570
|
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.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Upgrade to devrouter 0.0.77
|
|
2
|
+
|
|
3
|
+
Ordinary ensure now prepares TLS coverage for resolved HTTP and TCP proxy hosts
|
|
4
|
+
before provider startup and container-side repository hooks. The existing
|
|
5
|
+
certificate lock preserves coverage for other checkouts. Late publication checks
|
|
6
|
+
remain, and retained-runtime repair keeps its infrastructure-free behavior.
|
|
7
|
+
No schema, command, flag, or environment-variable migration is needed.
|
|
8
|
+
|
|
9
|
+
## Task
|
|
10
|
+
|
|
11
|
+
Use the published 0.0.77 CLI. Update `.devrouter.yml` devrouter.version only when
|
|
12
|
+
consumer source changes are authorized. Preserve staged work owned by another
|
|
13
|
+
task. Refresh generated agent guidance only with the repository owner's authority.
|
|
14
|
+
No generated runtime configuration or journal rewrite is needed.
|
|
15
|
+
|
|
16
|
+
For an affected checkout, retain one owner for its supported ensure/check/stop
|
|
17
|
+
sequence. Historical degraded state can select retained-runtime repair, which
|
|
18
|
+
skips shared infrastructure. If certificate coverage is missing, reconcile it
|
|
19
|
+
through the supported TLS setup or refresh path with the relevant machine-change
|
|
20
|
+
authority; do not bypass TLS verification or repeat lifecycle mutations blindly.
|
|
21
|
+
|
|
22
|
+
## Validation
|
|
23
|
+
|
|
24
|
+
Verify the installed version and exact checkout ownership. Check that the served
|
|
25
|
+
certificate validates the resolved hostname using the trusted local CA; certificate
|
|
26
|
+
file coverage alone does not prove live serving. Verify application readiness
|
|
27
|
+
separately. Finish with canonical stop and exact provider-stopped/zero-route proof
|
|
28
|
+
unless the owner explicitly retains the runtime. Preserve live-worker, ownership,
|
|
29
|
+
configuration and surviving-resource refusals.
|
|
30
|
+
|
|
31
|
+
## Report
|
|
32
|
+
|
|
33
|
+
Report release revision, installed executable, exact checkout and producing-run
|
|
34
|
+
results. Separate source/CI and TLS proof from application readiness and runtime
|
|
35
|
+
shutdown. A trusted TLS handshake or an HTTP404 is not successful app recovery.
|