create-principles-disciple 1.148.9 → 1.148.10
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/_release/product-identity.json +1 -1
- package/codex-adapter/package.json +1 -1
- package/console/dist/server/config/WorkspaceConfigStore.js +4 -3
- package/console/dist/server/console-ports.d.ts +13 -0
- package/console/dist/server/console-ports.js +15 -0
- package/console/dist/server/index.js +51 -5
- package/console/dist/server/routes/update-transaction.js +4 -4
- package/console/dist/server/routes/update.js +37 -21
- package/console/dist/server/utils/gateway.js +23 -6
- package/console/dist/server/utils/installed-layout.js +5 -3
- package/console/dist/server/utils/pd-backups.d.ts +6 -4
- package/console/dist/server/utils/pd-backups.js +8 -9
- package/console/dist/server/utils/pd-home.d.ts +34 -0
- package/console/dist/server/utils/pd-home.js +47 -0
- package/console/package.json +1 -1
- package/dist/update/bootstrap-executor.d.ts.map +1 -1
- package/dist/update/bootstrap-executor.js +33 -19
- package/dist/update/bootstrap-executor.js.map +1 -1
- package/host-runtime/package.json +1 -1
- package/install-layout/dist/index.d.ts +7 -0
- package/install-layout/dist/index.js +7 -0
- package/install-layout/dist/pd-home.d.ts +55 -0
- package/install-layout/dist/pd-home.js +226 -0
- package/install-layout/package.json +1 -1
- package/package.json +3 -3
- package/pd-cli/package.json +1 -1
- package/plugin/dist/bundle.js +5 -5
- package/release-manager/dist/update/bootstrap-executor.js +33 -19
- package/release-manager/package.json +1 -1
- package/workbuddy-adapter/package.json +1 -1
|
@@ -16,11 +16,10 @@
|
|
|
16
16
|
* never writes installation files directly.
|
|
17
17
|
*/
|
|
18
18
|
import * as fs from 'node:fs';
|
|
19
|
-
import * as path from 'node:path';
|
|
20
|
-
import * as os from 'node:os';
|
|
21
19
|
import { readFileSync, writeFileSync } from 'node:fs';
|
|
22
20
|
import { parseBootstrapRequest, serializeBootstrapResponse, handleBootstrapRequest, } from './bootstrap-protocol.js';
|
|
23
21
|
import { createReleaseManagerAuthority } from './release-manager-authority.js';
|
|
22
|
+
import { resolvePdHome } from '@principles/install-layout';
|
|
24
23
|
export async function runBootstrapExecutor(options) {
|
|
25
24
|
let response;
|
|
26
25
|
let resultFile = null;
|
|
@@ -34,28 +33,43 @@ export async function runBootstrapExecutor(options) {
|
|
|
34
33
|
response = { ok: true, result: { pong: true } };
|
|
35
34
|
}
|
|
36
35
|
else {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
// Only apply passes the authority readiness gate — read ops (inspect /
|
|
44
|
-
// check) must answer on ANY installation so the repair flow can see the
|
|
45
|
-
// actual state; check carries its own policy gating.
|
|
46
|
-
if (request.op === 'apply' && !authority.kinds['apply-full'].ready) {
|
|
47
|
-
const readiness = authority.kinds['apply-full'];
|
|
36
|
+
// PRI-872: the executor runs detached from the Console that spawned it,
|
|
37
|
+
// so it must resolve the SAME home through the same authority. Without
|
|
38
|
+
// this an experiment Console's update transaction would target the
|
|
39
|
+
// production install — the exact dual-open failure this ticket removes.
|
|
40
|
+
const pdHome = resolvePdHome();
|
|
41
|
+
if (!pdHome.ok) {
|
|
48
42
|
response = {
|
|
49
43
|
ok: false,
|
|
50
|
-
reason:
|
|
51
|
-
message:
|
|
52
|
-
nextAction:
|
|
44
|
+
reason: pdHome.reason,
|
|
45
|
+
message: pdHome.message,
|
|
46
|
+
nextAction: pdHome.nextAction,
|
|
53
47
|
};
|
|
54
48
|
}
|
|
55
49
|
else {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
const authority = createReleaseManagerAuthority({
|
|
51
|
+
pdHome: pdHome.pdHome,
|
|
52
|
+
// The executor resolves the metadata source exactly like the Console:
|
|
53
|
+
// process env first, then the durable install.json tier. No guessing.
|
|
54
|
+
metadataBaseUrl: process.env.PD_RELEASE_METADATA_URL,
|
|
55
|
+
});
|
|
56
|
+
// Only apply passes the authority readiness gate — read ops (inspect /
|
|
57
|
+
// check) must answer on ANY installation so the repair flow can see the
|
|
58
|
+
// actual state; check carries its own policy gating.
|
|
59
|
+
if (request.op === 'apply' && !authority.kinds['apply-full'].ready) {
|
|
60
|
+
const readiness = authority.kinds['apply-full'];
|
|
61
|
+
response = {
|
|
62
|
+
ok: false,
|
|
63
|
+
reason: readiness.reasons[0] ?? 'install_state_corrupt',
|
|
64
|
+
message: 'The installation is not ready for a signed release update.',
|
|
65
|
+
nextAction: 'Run the official installer (npx create-principles-disciple) to repair the installation, then retry.',
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
// handleBootstrapRequest never throws: manager failures come back as
|
|
70
|
+
// structured protocol refusals.
|
|
71
|
+
response = await handleBootstrapRequest(request, authority.manager);
|
|
72
|
+
}
|
|
59
73
|
}
|
|
60
74
|
}
|
|
61
75
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@principles/workbuddy-adapter",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.9",
|
|
4
4
|
"description": "WorkBuddy host adapter for Principles Disciple — implements the HostAdapter interface for WorkBuddy's Git Bash command-hook model (ADR-0020 third host, SPEC workbuddy-host-adapter v0.3.0).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|