@bakers-build/addon-codex 0.10.1-next.7 → 0.10.1-next.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.
- package/dist/src/run.js +13 -16
- package/package.json +4 -4
package/dist/src/run.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { copyFileSync, cpSync, existsSync, lstatSync, mkdirSync,
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
'log',
|
|
10
|
-
'shell_snapshots',
|
|
11
|
-
'tmp',
|
|
12
|
-
]);
|
|
1
|
+
import { copyFileSync, cpSync, existsSync, lstatSync, mkdirSync, realpathSync, symlinkSync, writeFileSync, } from 'node:fs';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
/**
|
|
4
|
+
* Source directories shared read-only; everything else starts fresh and
|
|
5
|
+
* writable in the private home, since Codex writes leftovers such as
|
|
6
|
+
* thread-writer-locks at startup. Marketplace clones live in .tmp/marketplaces.
|
|
7
|
+
*/
|
|
8
|
+
const SHARED = ['plugins', 'skills', 'packages', '.tmp/marketplaces'];
|
|
13
9
|
/** Prepare Codex's files in the home supplied by any execution backend. */
|
|
14
10
|
export function prepareCodexRun(context, configDir, hostEnv = process.env) {
|
|
15
11
|
const source = context.env.CODEX_HOME ?? configDir;
|
|
@@ -28,15 +24,16 @@ export function prepareCodexRun(context, configDir, hostEnv = process.env) {
|
|
|
28
24
|
recursive: true,
|
|
29
25
|
dereference: true,
|
|
30
26
|
});
|
|
31
|
-
//
|
|
32
|
-
//
|
|
27
|
+
// Shared directories are linked each on its own: the runtimes refuse a
|
|
28
|
+
// write path inside a read path.
|
|
33
29
|
// shortcut: files such as the state DB and history start empty in the
|
|
34
30
|
// private home and are discarded with it; link one if it must persist.
|
|
35
31
|
const readPaths = [];
|
|
36
|
-
for (const name of
|
|
32
|
+
for (const name of SHARED) {
|
|
37
33
|
const path = join(source, name);
|
|
38
|
-
if (
|
|
34
|
+
if (!existsSync(path) || !lstatSync(path).isDirectory())
|
|
39
35
|
continue;
|
|
36
|
+
mkdirSync(dirname(join(home, name)), { recursive: true });
|
|
40
37
|
symlinkSync(path, join(home, name));
|
|
41
38
|
readPaths.push(path);
|
|
42
39
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bakers-build/addon-codex",
|
|
3
|
-
"version": "0.10.1-next.
|
|
3
|
+
"version": "0.10.1-next.8",
|
|
4
4
|
"description": "bakers.build agent plugin for the Codex CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"directory": "bakers-cli/addons/codex"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@bakers-build/conductor": "^0.10.1-next.
|
|
26
|
-
"@bakers-build/core": "^0.10.1-next.
|
|
25
|
+
"@bakers-build/conductor": "^0.10.1-next.8",
|
|
26
|
+
"@bakers-build/core": "^0.10.1-next.8"
|
|
27
27
|
},
|
|
28
28
|
"bakersBuild": {
|
|
29
|
-
"commit": "
|
|
29
|
+
"commit": "6d6a551127b476e4a073f4d842b7fdb10ef6ccb1",
|
|
30
30
|
"channel": "next"
|
|
31
31
|
}
|
|
32
32
|
}
|