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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@principles/codex-adapter",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.7",
|
|
4
4
|
"description": "Codex CLI host adapter for Principles Disciple — implements HostAdapter interface for OpenAI Codex CLI's stdin/stdout JSON hook model (ADR-0020).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as fs from 'fs';
|
|
2
2
|
import * as path from 'path';
|
|
3
|
-
import
|
|
4
|
-
const CONFIG_DIR_NAME = '.pd-console';
|
|
3
|
+
import { getPdHome } from '../utils/pd-home.js';
|
|
5
4
|
const WORKSPACES_FILE = 'workspaces.json';
|
|
6
5
|
export class WorkspaceConfigStore {
|
|
7
6
|
configDir;
|
|
8
7
|
configPath;
|
|
9
8
|
entries;
|
|
10
9
|
constructor(configDir) {
|
|
11
|
-
|
|
10
|
+
// PRI-872: the registry lives in the console's PD home, never in a
|
|
11
|
+
// hard-coded `os.homedir()` — an experiment instance must own its own list.
|
|
12
|
+
this.configDir = configDir ?? getPdHome().consoleConfigDir;
|
|
12
13
|
this.configPath = path.join(this.configDir, WORKSPACES_FILE);
|
|
13
14
|
this.entries = this.load();
|
|
14
15
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Console port contract (PRI-872 / SPEC `install-mjs-dev-prod-isolation-review`
|
|
3
|
+
* §6.3). Production keeps the historical 3100; an experiment instance defaults
|
|
4
|
+
* to 13100 so a bare dev start can never take the production port.
|
|
5
|
+
*
|
|
6
|
+
* The paired gateway ports are 18789 (production, read from
|
|
7
|
+
* `<openclawHome>/openclaw.json`) and 19789 (experiment, foreground
|
|
8
|
+
* `openclaw gateway run` owned by the experiment launcher).
|
|
9
|
+
*/
|
|
10
|
+
export declare const PRODUCTION_CONSOLE_PORT = 3100;
|
|
11
|
+
export declare const EXPERIMENT_CONSOLE_PORT = 13100;
|
|
12
|
+
export declare const EXPERIMENT_GATEWAY_PORT = 19789;
|
|
13
|
+
export declare function defaultConsolePort(mode: 'production' | 'experiment'): number;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Console port contract (PRI-872 / SPEC `install-mjs-dev-prod-isolation-review`
|
|
3
|
+
* §6.3). Production keeps the historical 3100; an experiment instance defaults
|
|
4
|
+
* to 13100 so a bare dev start can never take the production port.
|
|
5
|
+
*
|
|
6
|
+
* The paired gateway ports are 18789 (production, read from
|
|
7
|
+
* `<openclawHome>/openclaw.json`) and 19789 (experiment, foreground
|
|
8
|
+
* `openclaw gateway run` owned by the experiment launcher).
|
|
9
|
+
*/
|
|
10
|
+
export const PRODUCTION_CONSOLE_PORT = 3100;
|
|
11
|
+
export const EXPERIMENT_CONSOLE_PORT = 13100;
|
|
12
|
+
export const EXPERIMENT_GATEWAY_PORT = 19789;
|
|
13
|
+
export function defaultConsolePort(mode) {
|
|
14
|
+
return mode === 'experiment' ? EXPERIMENT_CONSOLE_PORT : PRODUCTION_CONSOLE_PORT;
|
|
15
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as http from 'http';
|
|
2
2
|
import * as fs from 'fs';
|
|
3
|
-
import * as os from 'os';
|
|
4
3
|
import * as path from 'path';
|
|
5
4
|
import { fileURLToPath, pathToFileURL } from 'url';
|
|
6
5
|
import { resolveApplyFullTimeoutMs, resolveCheckTimeoutMs } from './update-timeout.js';
|
|
@@ -10,6 +9,8 @@ import { createProductTelemetryService, scheduleProductTelemetryExport } from '@
|
|
|
10
9
|
import { AuthConfig } from './config/AuthConfig.js';
|
|
11
10
|
import { assertLoopbackBindForUnauthenticatedServer } from './bind-guard.js';
|
|
12
11
|
import { WorkspaceConfigStore } from './config/WorkspaceConfigStore.js';
|
|
12
|
+
import { getPdHome, PdHomeConfigurationError } from './utils/pd-home.js';
|
|
13
|
+
import { EXPERIMENT_CONSOLE_PORT, defaultConsolePort } from './console-ports.js';
|
|
13
14
|
import { WorkspaceService } from './models/WorkspaceService.js';
|
|
14
15
|
import { handleFeedbackReportsRoute, handleFeedbackChannelsRoute, disposeFeedbackReportModels, } from './routes/feedback-reports.js';
|
|
15
16
|
import { handleFailedTasksRoute, disposeFailedTasksModels } from './routes/failed-tasks.js';
|
|
@@ -94,10 +95,12 @@ function resolveWorkspaceDir(argv) {
|
|
|
94
95
|
}
|
|
95
96
|
return process.cwd();
|
|
96
97
|
}
|
|
97
|
-
function parseArgs(argv) {
|
|
98
|
+
function parseArgs(argv, mode = 'production') {
|
|
98
99
|
const args = argv.slice(2);
|
|
99
100
|
let workspace = resolveWorkspaceDir(argv);
|
|
100
|
-
|
|
101
|
+
// PRI-872 §3: production keeps 3100; an experiment instance defaults to
|
|
102
|
+
// 13100 so a bare dev start cannot grab the production port. --port wins.
|
|
103
|
+
let port = defaultConsolePort(mode);
|
|
101
104
|
let host = '127.0.0.1';
|
|
102
105
|
let noAuth = false;
|
|
103
106
|
let token = undefined;
|
|
@@ -269,7 +272,7 @@ export async function initServices(workspaceDir, authConfig) {
|
|
|
269
272
|
// missing Owner-facing history entries from the transaction journal. Best
|
|
270
273
|
// effort only: history reconciliation never blocks console startup.
|
|
271
274
|
try {
|
|
272
|
-
reconcileUpdateHistoryFromJournals(workspaceDir,
|
|
275
|
+
reconcileUpdateHistoryFromJournals(workspaceDir, getPdHome().pdHome);
|
|
273
276
|
}
|
|
274
277
|
catch (error) {
|
|
275
278
|
console.warn('[pd-console] update history reconciliation skipped:', error instanceof Error ? error.message : error);
|
|
@@ -599,7 +602,36 @@ export function handleRequest(services) {
|
|
|
599
602
|
}
|
|
600
603
|
// ── Server startup ───────────────────────────────────────────────────────────
|
|
601
604
|
export async function main() {
|
|
602
|
-
|
|
605
|
+
// PRI-872: resolve the PD home BEFORE anything else. Everything below
|
|
606
|
+
// (registry, update history, backups, gateway probes) derives from it, and a
|
|
607
|
+
// broken experiment configuration must stop the process here instead of
|
|
608
|
+
// silently serving the production install.
|
|
609
|
+
let pdHome;
|
|
610
|
+
try {
|
|
611
|
+
pdHome = getPdHome();
|
|
612
|
+
}
|
|
613
|
+
catch (error) {
|
|
614
|
+
if (error instanceof PdHomeConfigurationError) {
|
|
615
|
+
console.error(`[pd-console] Refusing to start: ${error.reason}`);
|
|
616
|
+
console.error(`[pd-console] ${error.message}`);
|
|
617
|
+
console.error(`[pd-console] Next: ${error.nextAction}`);
|
|
618
|
+
for (const [key, value] of Object.entries(error.details)) {
|
|
619
|
+
console.error(`[pd-console] ${key}=${value}`);
|
|
620
|
+
}
|
|
621
|
+
process.exit(1);
|
|
622
|
+
}
|
|
623
|
+
throw error;
|
|
624
|
+
}
|
|
625
|
+
const { workspace, port, host, noAuth, token } = parseArgs(process.argv, pdHome.mode);
|
|
626
|
+
if (pdHome.mode === 'experiment') {
|
|
627
|
+
console.log(`[pd-console] Environment: experiment (PD_EXPERIMENT_ROOT=${pdHome.experimentRoot ?? ''})`);
|
|
628
|
+
console.log(`[pd-console] PD home: ${pdHome.pdHome}`);
|
|
629
|
+
console.log(`[pd-console] Workspace registry: ${pdHome.consoleConfigDir}`);
|
|
630
|
+
console.log(`[pd-console] OpenClaw home: ${pdHome.openclawHome}`);
|
|
631
|
+
}
|
|
632
|
+
else {
|
|
633
|
+
console.log(`[pd-console] Environment: production (PD home: ${pdHome.pdHome})`);
|
|
634
|
+
}
|
|
603
635
|
const authConfig = new AuthConfig({
|
|
604
636
|
cliToken: token,
|
|
605
637
|
envToken: process.env.PD_CONSOLE_TOKEN,
|
|
@@ -645,6 +677,20 @@ export async function main() {
|
|
|
645
677
|
};
|
|
646
678
|
process.on('SIGTERM', () => { void shutdown('SIGTERM'); });
|
|
647
679
|
process.on('SIGINT', () => { void shutdown('SIGINT'); });
|
|
680
|
+
// PRI-872: a second instance on an occupied port must fail with an
|
|
681
|
+
// actionable message, not an unhandled 'error' stack. The usual cause is the
|
|
682
|
+
// production console already listening on 3100.
|
|
683
|
+
server.on('error', (error) => {
|
|
684
|
+
if (error.code === 'EADDRINUSE') {
|
|
685
|
+
console.error(`[pd-console] Port ${port} is already in use on ${host}.`);
|
|
686
|
+
console.error(pdHome.mode === 'production'
|
|
687
|
+
? `[pd-console] Another console is probably serving this installation. Stop it, or pick another port with --port.`
|
|
688
|
+
: `[pd-console] Stop the process holding the port, or pass a different --port (the experiment default is ${EXPERIMENT_CONSOLE_PORT}).`);
|
|
689
|
+
process.exit(1);
|
|
690
|
+
}
|
|
691
|
+
console.error('[pd-console] Server error:', error);
|
|
692
|
+
process.exit(1);
|
|
693
|
+
});
|
|
648
694
|
server.listen(port, host, () => {
|
|
649
695
|
console.log('[pd-console] Listening on http://' + host + ':' + port);
|
|
650
696
|
console.log('[pd-console] Workspace: ' + workspace);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as fs from 'node:fs';
|
|
2
2
|
import * as path from 'node:path';
|
|
3
|
-
import * as os from 'node:os';
|
|
4
3
|
import { sendSuccess, sendMethodNotAllowed, sendNotFound, errorMessage } from '../utils/response.js';
|
|
4
|
+
import { getPdHome } from '../utils/pd-home.js';
|
|
5
5
|
/** Transaction ids are installer/console-generated (`<word>-<ts>-<hex>`); this
|
|
6
6
|
* pattern doubles as the path-traversal guard for the journal file name (rc-1). */
|
|
7
7
|
const TRANSACTION_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/;
|
|
@@ -36,7 +36,7 @@ async function transactionStatus(res, transactionId) {
|
|
|
36
36
|
}
|
|
37
37
|
const journal = await import('create-principles-disciple/update-console');
|
|
38
38
|
const layout = journal;
|
|
39
|
-
const paths = layout.resolvePdHomePaths(
|
|
39
|
+
const paths = layout.resolvePdHomePaths(getPdHome().pdHome);
|
|
40
40
|
const journalPath = path.join(paths.transactionsDir, `${transactionId}.jsonl`);
|
|
41
41
|
if (!fs.existsSync(journalPath)) {
|
|
42
42
|
sendSuccess(res, { transactionId, exists: false });
|
|
@@ -65,7 +65,7 @@ async function transactionStatus(res, transactionId) {
|
|
|
65
65
|
async function recoveryStatus(res) {
|
|
66
66
|
const journal = await import('create-principles-disciple/update-console');
|
|
67
67
|
const layout = journal;
|
|
68
|
-
const paths = layout.resolvePdHomePaths(
|
|
68
|
+
const paths = layout.resolvePdHomePaths(getPdHome().pdHome);
|
|
69
69
|
const entries = (() => {
|
|
70
70
|
try {
|
|
71
71
|
return fs.readdirSync(paths.transactionsDir, { withFileTypes: true })
|
|
@@ -209,7 +209,7 @@ async function recoveryResolve(res, req) {
|
|
|
209
209
|
}
|
|
210
210
|
const journal = await import('create-principles-disciple/update-console');
|
|
211
211
|
const layout = journal;
|
|
212
|
-
const paths = layout.resolvePdHomePaths(
|
|
212
|
+
const paths = layout.resolvePdHomePaths(getPdHome().pdHome);
|
|
213
213
|
const journalPath = path.join(paths.transactionsDir, `${transactionId}.jsonl`);
|
|
214
214
|
if (!fs.existsSync(journalPath)) {
|
|
215
215
|
sendSuccess(res, { ok: false, reason: 'unknown_transaction', message: `No journal exists for transaction ${transactionId}.` });
|
|
@@ -4,6 +4,7 @@ import * as os from 'node:os';
|
|
|
4
4
|
import { spawn } from 'node:child_process';
|
|
5
5
|
import { randomUUID } from 'node:crypto';
|
|
6
6
|
import { sendSuccess, sendMethodNotAllowed, sendNotFound, errorMessage } from '../utils/response.js';
|
|
7
|
+
import { getPdHome, isExperimentInstance } from '../utils/pd-home.js';
|
|
7
8
|
import { appendUpdateHistory } from './update-history.js';
|
|
8
9
|
const REPAIR_ACTION = 'Resolve the reported cause, or run the official installer (npx create-principles-disciple) to repair the installation, then retry.';
|
|
9
10
|
function appendGovernedUpdateHistory(workspaceDir, entry) {
|
|
@@ -56,7 +57,7 @@ async function checkUpdate(authority, res) {
|
|
|
56
57
|
*/
|
|
57
58
|
async function applyFullUpdate(authority, res, workspaceDir) {
|
|
58
59
|
const layout = await import('create-principles-disciple/update-console');
|
|
59
|
-
const pdHomePaths = layout.resolvePdHomePaths(
|
|
60
|
+
const pdHomePaths = layout.resolvePdHomePaths(getPdHome().pdHome);
|
|
60
61
|
const entryPath = path.join(pdHomePaths.bootstrapExecutorDir, 'dist', 'bootstrap-entry.js');
|
|
61
62
|
// Readiness already re-verified the registration digest, but the route owns
|
|
62
63
|
// the spawn-level guard: no executor file → repair next action (this is the
|
|
@@ -190,29 +191,44 @@ export async function handleUpdateRoute(req, res, workspaceDir, subPath) {
|
|
|
190
191
|
let mod;
|
|
191
192
|
let authority;
|
|
192
193
|
let failure = { reason: 'installer_missing', message: 'ReleaseManager is unavailable.', nextAction: REPAIR_ACTION, transactionOpened: false };
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
194
|
+
// PRI-872: an experiment console owns `<root>/.pd`, which is not a signed
|
|
195
|
+
// install. Refuse explicitly instead of letting the readiness gate report a
|
|
196
|
+
// misleading `install_state_corrupt` — and, above all, keep the real
|
|
197
|
+
// installer (which stops the machine-level gateway and swaps the production
|
|
198
|
+
// runtime) unreachable from a second instance.
|
|
199
|
+
if (isExperimentInstance()) {
|
|
200
|
+
failure = {
|
|
201
|
+
reason: 'experimental_instance',
|
|
202
|
+
message: 'This console is an experiment instance; product updates apply to the production installation only.',
|
|
203
|
+
nextAction: 'Run the update from the production console, or install the experiment build with the official installer while PD_EXPERIMENT_ROOT points at this root.',
|
|
204
|
+
transactionOpened: false,
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
try {
|
|
209
|
+
mod = await import('create-principles-disciple/update-console');
|
|
210
|
+
authority = mod.createReleaseManagerAuthority({
|
|
211
|
+
pdHome: getPdHome().pdHome,
|
|
212
|
+
metadataBaseUrl: process.env.PD_RELEASE_METADATA_URL,
|
|
213
|
+
});
|
|
214
|
+
const readiness = authority.kinds[subPath === '/check' ? 'check' : 'apply-full'];
|
|
215
|
+
if (!readiness.ready || authority.installStatus === null) {
|
|
216
|
+
failure = { ...failure, reason: readiness.reasons.join(',') || 'install_state_corrupt', message: 'The installation is not ready for a signed release update.' };
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
if (subPath === '/check')
|
|
220
|
+
await checkUpdate(authority, res);
|
|
221
|
+
else
|
|
222
|
+
await applyFullUpdate(authority, res, workspaceDir);
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
202
225
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
await applyFullUpdate(authority, res, workspaceDir);
|
|
208
|
-
return;
|
|
226
|
+
catch (error) {
|
|
227
|
+
failure = mod
|
|
228
|
+
? mod.mapReleaseManagerError(error)
|
|
229
|
+
: { ...failure, message: errorMessage(error) };
|
|
209
230
|
}
|
|
210
231
|
}
|
|
211
|
-
catch (error) {
|
|
212
|
-
failure = mod
|
|
213
|
-
? mod.mapReleaseManagerError(error)
|
|
214
|
-
: { ...failure, message: errorMessage(error) };
|
|
215
|
-
}
|
|
216
232
|
console.error(`[update] ${subPath} refused (${failure.reason}): ${failure.message}`);
|
|
217
233
|
if (subPath === '/check') {
|
|
218
234
|
// SPEC §12.1: a check that cannot complete is check_failed — it must never
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
import { execFileSync } from 'child_process';
|
|
11
11
|
import * as fs from 'fs';
|
|
12
12
|
import * as path from 'path';
|
|
13
|
-
import * as os from 'os';
|
|
14
13
|
import * as net from 'net';
|
|
15
14
|
import { errorMessage } from './response.js';
|
|
15
|
+
import { getPdHome, getPdHomeResolution } from './pd-home.js';
|
|
16
16
|
// rc-2: type guard instead of `as` cast on parsed JSON.
|
|
17
17
|
function isRecord(v) {
|
|
18
18
|
return typeof v === 'object' && v !== null && !Array.isArray(v);
|
|
@@ -22,13 +22,14 @@ function isRecord(v) {
|
|
|
22
22
|
// ---------------------------------------------------------------------------
|
|
23
23
|
/**
|
|
24
24
|
* Resolve the OpenClaw config directory.
|
|
25
|
-
*
|
|
25
|
+
*
|
|
26
|
+
* PRI-872: derived from the process-wide PD home (production keeps
|
|
27
|
+
* OPENCLAW_HOME > ~/.openclaw; an experiment instance reads its own root), so
|
|
28
|
+
* the console never reports or probes the production gateway from a second
|
|
29
|
+
* instance.
|
|
26
30
|
*/
|
|
27
31
|
function resolveOpenClawConfigDir() {
|
|
28
|
-
|
|
29
|
-
if (envHome && envHome.trim().length > 0)
|
|
30
|
-
return path.resolve(envHome);
|
|
31
|
-
return path.join(os.homedir(), '.openclaw');
|
|
32
|
+
return getPdHome().openclawHome;
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
34
35
|
* Read the gateway port from ~/.openclaw/openclaw.json → { gateway: { port } }.
|
|
@@ -112,6 +113,22 @@ export async function checkOpenClawGateway() {
|
|
|
112
113
|
* with a structured reason + nextAction instead of crashing mid-update.
|
|
113
114
|
*/
|
|
114
115
|
function runGatewayServiceCommand(subcommand, extraArgs = []) {
|
|
116
|
+
// PRI-872: `openclaw gateway stop|start` drives the MACHINE-LEVEL service
|
|
117
|
+
// (launchd/systemd/schtasks), not a process this console owns. An experiment
|
|
118
|
+
// instance must never stop the production gateway — its own gateway is a
|
|
119
|
+
// foreground `openclaw gateway run` owned by the experiment launcher.
|
|
120
|
+
// Resolution failure is reported, not thrown: this helper's contract is
|
|
121
|
+
// "never throws" (rc-9), so callers degrade on a structured result.
|
|
122
|
+
const pdHome = getPdHomeResolution();
|
|
123
|
+
if (!pdHome.ok) {
|
|
124
|
+
return { ok: false, error: `pd_home_invalid (${pdHome.reason}): ${pdHome.message}` };
|
|
125
|
+
}
|
|
126
|
+
if (pdHome.mode === 'experiment') {
|
|
127
|
+
return {
|
|
128
|
+
ok: false,
|
|
129
|
+
error: 'experimental_instance: the machine-level OpenClaw service belongs to the production install; the experiment gateway runs in the foreground under the experiment launcher and must be restarted there.',
|
|
130
|
+
};
|
|
131
|
+
}
|
|
115
132
|
try {
|
|
116
133
|
// EP-08: argv array + typed subcommand union — every argv is a constant
|
|
117
134
|
// literal, so no external input can reach the command line. shell:true is
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import * as fs from 'fs';
|
|
14
14
|
import * as path from 'path';
|
|
15
|
-
import * as os from 'os';
|
|
16
15
|
import { getInstallLayoutPaths, resolveInstallLayout } from '@principles/install-layout';
|
|
17
16
|
import { resolveOpenClawHome } from './pd-backups.js';
|
|
17
|
+
import { getPdHome } from './pd-home.js';
|
|
18
18
|
export function resolveExtensionsDir() {
|
|
19
19
|
return path.join(resolveOpenClawHome(), 'extensions');
|
|
20
20
|
}
|
|
@@ -42,7 +42,9 @@ function resolveCanonicalCodexAdapterDir(paths) {
|
|
|
42
42
|
: undefined;
|
|
43
43
|
}
|
|
44
44
|
export function resolveUpdateLayout() {
|
|
45
|
-
|
|
45
|
+
// PRI-872: the home comes from the process-wide resolution, so an experiment
|
|
46
|
+
// console inspects the EXPERIMENT install instead of the production one.
|
|
47
|
+
const { homeDir } = getPdHome();
|
|
46
48
|
const paths = getInstallLayoutPaths(homeDir);
|
|
47
49
|
const legacyPluginDir = path.join(resolveExtensionsDir(), 'principles-disciple');
|
|
48
50
|
let manifest;
|
|
@@ -99,7 +101,7 @@ export function resolvePluginDir(_workspaceDir) {
|
|
|
99
101
|
* guard allow-root even when the install resolves to legacy mode.
|
|
100
102
|
*/
|
|
101
103
|
export function resolveCanonicalRuntimeRoot() {
|
|
102
|
-
return getInstallLayoutPaths(
|
|
104
|
+
return getInstallLayoutPaths(getPdHome().homeDir).runtimeDir;
|
|
103
105
|
}
|
|
104
106
|
// rc-2: type-guard the parsed JSON instead of an `as` cast (ERR-001).
|
|
105
107
|
function isRecord(value) {
|
|
@@ -7,11 +7,13 @@ export interface LegacyBackupMigrationResult {
|
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* Resolve the OpenClaw install home.
|
|
10
|
-
* Priority: OPENCLAW_HOME env var (explicit override) > ~/.openclaw
|
|
11
10
|
*
|
|
12
|
-
*
|
|
13
|
-
* (
|
|
14
|
-
*
|
|
11
|
+
* PRI-872: delegated to the process-wide PD home resolution. In production it
|
|
12
|
+
* keeps the historical priority (OPENCLAW_HOME env var > ~/.openclaw); in an
|
|
13
|
+
* experiment instance it points at the experiment root, so backup placement
|
|
14
|
+
* and installed-layout resolution can never read the production host.
|
|
15
|
+
* Single authority for home resolution — `resolvePdBackupsRoot` and
|
|
16
|
+
* `utils/installed-layout.ts` both derive from it.
|
|
15
17
|
*/
|
|
16
18
|
export declare function resolveOpenClawHome(): string;
|
|
17
19
|
/** Backups root — outside the extensions dir OpenClaw scans for plugins. */
|
|
@@ -16,21 +16,20 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import * as fs from 'fs';
|
|
18
18
|
import * as path from 'path';
|
|
19
|
-
import * as os from 'os';
|
|
20
19
|
import { errorMessage } from './response.js';
|
|
20
|
+
import { getPdHome } from './pd-home.js';
|
|
21
21
|
/**
|
|
22
22
|
* Resolve the OpenClaw install home.
|
|
23
|
-
* Priority: OPENCLAW_HOME env var (explicit override) > ~/.openclaw
|
|
24
23
|
*
|
|
25
|
-
*
|
|
26
|
-
* (
|
|
27
|
-
*
|
|
24
|
+
* PRI-872: delegated to the process-wide PD home resolution. In production it
|
|
25
|
+
* keeps the historical priority (OPENCLAW_HOME env var > ~/.openclaw); in an
|
|
26
|
+
* experiment instance it points at the experiment root, so backup placement
|
|
27
|
+
* and installed-layout resolution can never read the production host.
|
|
28
|
+
* Single authority for home resolution — `resolvePdBackupsRoot` and
|
|
29
|
+
* `utils/installed-layout.ts` both derive from it.
|
|
28
30
|
*/
|
|
29
31
|
export function resolveOpenClawHome() {
|
|
30
|
-
|
|
31
|
-
if (envHome && envHome.trim().length > 0)
|
|
32
|
-
return path.resolve(envHome);
|
|
33
|
-
return path.join(os.homedir(), '.openclaw');
|
|
32
|
+
return getPdHome().openclawHome;
|
|
34
33
|
}
|
|
35
34
|
/** Backups root — outside the extensions dir OpenClaw scans for plugins. */
|
|
36
35
|
export function resolvePdBackupsRoot() {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The console's single entry point for "which PD home am I serving?".
|
|
3
|
+
*
|
|
4
|
+
* PRI-872: every route and store used to call `os.homedir()` directly, so a
|
|
5
|
+
* second console (a dev/experiment instance) silently read and MUTATED the
|
|
6
|
+
* production install: the update page resolved `~/.pd`, "apply" spawned the
|
|
7
|
+
* production bootstrap executor, and both instances shared
|
|
8
|
+
* `~/.pd-console/workspaces.json`.
|
|
9
|
+
*
|
|
10
|
+
* Deliberately NOT cached: the resolver is a pure derivation from the
|
|
11
|
+
* environment plus a handful of path syscalls, and caching would pin the
|
|
12
|
+
* answer for the process lifetime — including across tests and across a
|
|
13
|
+
* launcher that re-points the root. The failure mode stays fail-closed either
|
|
14
|
+
* way: an unusable `PD_EXPERIMENT_ROOT` throws, it never falls back to the
|
|
15
|
+
* real user home.
|
|
16
|
+
*/
|
|
17
|
+
import { type PdHomeFailureReason, type PdHomePaths, type PdHomeResolution } from '@principles/install-layout';
|
|
18
|
+
export declare class PdHomeConfigurationError extends Error {
|
|
19
|
+
readonly reason: PdHomeFailureReason;
|
|
20
|
+
readonly nextAction: string;
|
|
21
|
+
readonly details: Readonly<Record<string, string>>;
|
|
22
|
+
constructor(failure: Extract<PdHomeResolution, {
|
|
23
|
+
ok: false;
|
|
24
|
+
}>);
|
|
25
|
+
}
|
|
26
|
+
export declare function getPdHomeResolution(): PdHomeResolution;
|
|
27
|
+
/** Throws `PdHomeConfigurationError` when the environment is unusable. */
|
|
28
|
+
export declare function getPdHome(): PdHomePaths;
|
|
29
|
+
/**
|
|
30
|
+
* True only for an explicitly declared experiment instance. A broken
|
|
31
|
+
* configuration throws rather than answering `false` — "cannot tell" must not
|
|
32
|
+
* be reported as "production".
|
|
33
|
+
*/
|
|
34
|
+
export declare function isExperimentInstance(): boolean;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The console's single entry point for "which PD home am I serving?".
|
|
3
|
+
*
|
|
4
|
+
* PRI-872: every route and store used to call `os.homedir()` directly, so a
|
|
5
|
+
* second console (a dev/experiment instance) silently read and MUTATED the
|
|
6
|
+
* production install: the update page resolved `~/.pd`, "apply" spawned the
|
|
7
|
+
* production bootstrap executor, and both instances shared
|
|
8
|
+
* `~/.pd-console/workspaces.json`.
|
|
9
|
+
*
|
|
10
|
+
* Deliberately NOT cached: the resolver is a pure derivation from the
|
|
11
|
+
* environment plus a handful of path syscalls, and caching would pin the
|
|
12
|
+
* answer for the process lifetime — including across tests and across a
|
|
13
|
+
* launcher that re-points the root. The failure mode stays fail-closed either
|
|
14
|
+
* way: an unusable `PD_EXPERIMENT_ROOT` throws, it never falls back to the
|
|
15
|
+
* real user home.
|
|
16
|
+
*/
|
|
17
|
+
import { resolvePdHome, } from '@principles/install-layout';
|
|
18
|
+
export class PdHomeConfigurationError extends Error {
|
|
19
|
+
reason;
|
|
20
|
+
nextAction;
|
|
21
|
+
details;
|
|
22
|
+
constructor(failure) {
|
|
23
|
+
super(failure.message);
|
|
24
|
+
this.name = 'PdHomeConfigurationError';
|
|
25
|
+
this.reason = failure.reason;
|
|
26
|
+
this.nextAction = failure.nextAction;
|
|
27
|
+
this.details = failure.details;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export function getPdHomeResolution() {
|
|
31
|
+
return resolvePdHome();
|
|
32
|
+
}
|
|
33
|
+
/** Throws `PdHomeConfigurationError` when the environment is unusable. */
|
|
34
|
+
export function getPdHome() {
|
|
35
|
+
const resolution = getPdHomeResolution();
|
|
36
|
+
if (!resolution.ok)
|
|
37
|
+
throw new PdHomeConfigurationError(resolution);
|
|
38
|
+
return resolution;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* True only for an explicitly declared experiment instance. A broken
|
|
42
|
+
* configuration throws rather than answering `false` — "cannot tell" must not
|
|
43
|
+
* be reported as "production".
|
|
44
|
+
*/
|
|
45
|
+
export function isExperimentInstance() {
|
|
46
|
+
return getPdHome().mode === 'experiment';
|
|
47
|
+
}
|
package/console/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build:ui:production": "node scripts/build-ui.mjs --production",
|
|
9
9
|
"build": "npm run clean && npm run build:ui:production && tsc -p tsconfig.build.json && node ../../scripts/build/check-dist-hygiene.mjs",
|
|
10
10
|
"clean": "node ../../scripts/build/clean-dist.mjs",
|
|
11
|
-
"dev": "npx tsx src/server/index.ts
|
|
11
|
+
"dev": "npx tsx src/server/index.ts",
|
|
12
12
|
"start": "node dist/server.js",
|
|
13
13
|
"test": "vitest run",
|
|
14
14
|
"test:watch": "vitest",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap-executor.d.ts","sourceRoot":"","sources":["../../src/update/bootstrap-executor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bootstrap-executor.d.ts","sourceRoot":"","sources":["../../src/update/bootstrap-executor.ts"],"names":[],"mappings":"AAmBA,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAIjC,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,sEAAsE;IACtE,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AACD,MAAM,WAAW,wBAAwB;IACvC,sEAAsE;IACtE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,+EAA+E;IAC/E,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1C;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CA+D9G;AAED;;;;;GAKG;AACH,wBAAsB,IAAI,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAqBnE"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap-executor.js","sourceRoot":"","sources":["../../src/update/bootstrap-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"bootstrap-executor.js","sourceRoot":"","sources":["../../src/update/bootstrap-executor.ts"],"names":[],"mappings":"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"}
|
|
@@ -189,3 +189,10 @@ export declare function resolveInstallLayout(options: ResolveInstallLayoutOption
|
|
|
189
189
|
export declare function getConsoleServerEntry(paths: InstallLayoutPaths, mode: InstallLayoutMode): string;
|
|
190
190
|
export declare function getConsoleWebIndex(paths: InstallLayoutPaths, mode: InstallLayoutMode): string;
|
|
191
191
|
export declare function getPdCliEntry(paths: InstallLayoutPaths, mode: InstallLayoutMode): string;
|
|
192
|
+
/**
|
|
193
|
+
* PD home resolution (PRI-872): production keeps the historical `os.homedir()`
|
|
194
|
+
* derivation; `PD_EXPERIMENT_ROOT` opts into a fail-closed isolated root. This
|
|
195
|
+
* is the ONE authority for "which PD home does this process own" — components
|
|
196
|
+
* must not re-derive it locally.
|
|
197
|
+
*/
|
|
198
|
+
export { PD_EXPERIMENT_ROOT_ENV, PD_OPENCLAW_HOME_ENV, PD_HOME_MODES, PD_HOME_FAILURE_REASONS, resolvePdHome, isPathWithinRoot, type PdHomeMode, type PdHomePaths, type PdHomeFailure, type PdHomeFailureReason, type PdHomeSuccess, type PdHomeResolution, type ResolvePdHomeOptions, } from './pd-home.js';
|