create-principles-disciple 1.134.7 → 1.134.8
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.
|
@@ -10,10 +10,12 @@ export interface UpdateLayout {
|
|
|
10
10
|
releaseManagerDir: string;
|
|
11
11
|
/**
|
|
12
12
|
* PRI-711: codex-adapter is a runtime-layout component pd-cli resolves
|
|
13
|
-
* eagerly. Undefined when the
|
|
14
|
-
* generation
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* eagerly. Undefined only when the canonical runtime root itself cannot be
|
|
14
|
+
* resolved: a one-generation-old deployed install-layout (this update runs
|
|
15
|
+
* inside the currently-running console, which resolves the layout helper
|
|
16
|
+
* installed by the PREVIOUS update) lacks the codexAdapterDir field, but
|
|
17
|
+
* PRI-724 derives the destination from the stable runtimeDir instead of
|
|
18
|
+
* degrading to a silent skip.
|
|
17
19
|
*/
|
|
18
20
|
codexAdapterDir: string | undefined;
|
|
19
21
|
hosts: InstallHost[];
|
|
@@ -18,6 +18,29 @@ import { resolveOpenClawHome } from './pd-backups.js';
|
|
|
18
18
|
export function resolveExtensionsDir() {
|
|
19
19
|
return path.join(resolveOpenClawHome(), 'extensions');
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Resolve where the codex-adapter component lives in a CANONICAL layout.
|
|
23
|
+
*
|
|
24
|
+
* PRI-724: a one-generation-old deployed install-layout does not export the
|
|
25
|
+
* codexAdapterDir field (introduced 2026-09-09, PRI-711). The full update
|
|
26
|
+
* runs inside the currently-running console, which resolves the layout
|
|
27
|
+
* helper installed by the PREVIOUS update — so during exactly one update
|
|
28
|
+
* generation the field is always missing. Derive the destination from the
|
|
29
|
+
* stable runtimeDir (the adapter has always been installed at
|
|
30
|
+
* <runtimeDir>/codex-adapter) instead of degrading the update to skipping
|
|
31
|
+
* the adapter copy, which left the deployed adapter one release behind
|
|
32
|
+
* while the update reported success (observed 2026-09-10).
|
|
33
|
+
*/
|
|
34
|
+
function resolveCanonicalCodexAdapterDir(paths) {
|
|
35
|
+
if (typeof paths.codexAdapterDir === 'string' && paths.codexAdapterDir.length > 0) {
|
|
36
|
+
return paths.codexAdapterDir;
|
|
37
|
+
}
|
|
38
|
+
// rc-1/rc-2: the deployed module's shape is not trusted — only derive from
|
|
39
|
+
// a runtimeDir that is actually a non-empty string.
|
|
40
|
+
return typeof paths.runtimeDir === 'string' && paths.runtimeDir.length > 0
|
|
41
|
+
? path.join(paths.runtimeDir, 'codex-adapter')
|
|
42
|
+
: undefined;
|
|
43
|
+
}
|
|
21
44
|
export function resolveUpdateLayout() {
|
|
22
45
|
const homeDir = os.homedir();
|
|
23
46
|
const paths = getInstallLayoutPaths(homeDir);
|
|
@@ -46,9 +69,11 @@ export function resolveUpdateLayout() {
|
|
|
46
69
|
pdCliDir: paths.pdCliDir,
|
|
47
70
|
installLayoutDir: paths.installLayoutDir,
|
|
48
71
|
releaseManagerDir: paths.releaseManagerDir,
|
|
49
|
-
//
|
|
50
|
-
// field — guard instead of trusting the shape.
|
|
51
|
-
|
|
72
|
+
// PRI-711: the deployed install-layout may predate the codexAdapterDir
|
|
73
|
+
// field — guard instead of trusting the shape. PRI-724: when the field
|
|
74
|
+
// is missing, derive the destination from runtimeDir so the update
|
|
75
|
+
// still swaps the adapter (see resolveCanonicalCodexAdapterDir).
|
|
76
|
+
codexAdapterDir: resolveCanonicalCodexAdapterDir(paths),
|
|
52
77
|
hosts: resolution.manifest?.hosts ?? [],
|
|
53
78
|
};
|
|
54
79
|
}
|
package/package.json
CHANGED