@jaromil/gestalt 0.18.1 → 0.18.2
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/lib/gestalt.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// GESTALT_CLI_VERSION='0.18.
|
|
2
|
+
// GESTALT_CLI_VERSION='0.18.2'
|
|
3
3
|
// GESTALT_UPDATED_MANAGER_API='1'
|
|
4
4
|
/*! tuiuiu.js
|
|
5
5
|
MIT License
|
|
@@ -10379,7 +10379,7 @@ var init_yaml = __esm({
|
|
|
10379
10379
|
|
|
10380
10380
|
// src/cli/skill-profiles/store.ts
|
|
10381
10381
|
import { randomUUID as randomUUID10 } from "node:crypto";
|
|
10382
|
-
import { mkdir as
|
|
10382
|
+
import { mkdir as mkdir7, readFile as readFile11, readdir as readdir3, rename as rename7, rm as rm6, writeFile as writeFile4 } from "node:fs/promises";
|
|
10383
10383
|
import path28 from "node:path";
|
|
10384
10384
|
var FileSkillProfiles;
|
|
10385
10385
|
var init_store = __esm({
|
|
@@ -10446,7 +10446,7 @@ var init_store = __esm({
|
|
|
10446
10446
|
await storage.replaceFile(file, bytes);
|
|
10447
10447
|
return;
|
|
10448
10448
|
}
|
|
10449
|
-
await
|
|
10449
|
+
await mkdir7(this.root, { recursive: true, mode: 448 });
|
|
10450
10450
|
await this.checkRoot();
|
|
10451
10451
|
const temporary = path28.join(this.root, `.profile-${randomUUID10()}.tmp`);
|
|
10452
10452
|
await writeFile4(temporary, bytes, { flag: "wx", mode: 384 });
|
|
@@ -35830,7 +35830,7 @@ async function runCli(invocation, streams, metadata, handlers = {}) {
|
|
|
35830
35830
|
import path19 from "node:path";
|
|
35831
35831
|
|
|
35832
35832
|
// src/cli/setup/agents.ts
|
|
35833
|
-
import { readFile as readFile3, realpath as realpath5, rename as rename3, rm, unlink as unlink3 } from "node:fs/promises";
|
|
35833
|
+
import { mkdir as mkdir3, readFile as readFile3, realpath as realpath5, rename as rename3, rm, stat as stat3, unlink as unlink3 } from "node:fs/promises";
|
|
35834
35834
|
import path10 from "node:path";
|
|
35835
35835
|
import { pathToFileURL } from "node:url";
|
|
35836
35836
|
|
|
@@ -36824,7 +36824,7 @@ function managedMcpOverrides(config, baseline, owner) {
|
|
|
36824
36824
|
}
|
|
36825
36825
|
|
|
36826
36826
|
// src/cli/setup/configuration.mjs
|
|
36827
|
-
function permissionConfiguration(source, homeReadRoots, temporaryRoot = "/tmp") {
|
|
36827
|
+
function permissionConfiguration(source, homeReadRoots, temporaryRoot = "/tmp", cacheRoots = []) {
|
|
36828
36828
|
parse(source);
|
|
36829
36829
|
const newline = source.match(/\r\n|\n|\r/)?.[0] ?? "\n";
|
|
36830
36830
|
const retained = [];
|
|
@@ -36860,6 +36860,8 @@ function permissionConfiguration(source, homeReadRoots, temporaryRoot = "/tmp")
|
|
|
36860
36860
|
'approval_policy = "never"',
|
|
36861
36861
|
'default_permissions = "workspace-git"'
|
|
36862
36862
|
];
|
|
36863
|
+
const writeRoots = /* @__PURE__ */ new Set([temporaryRoot, ...cacheRoots]);
|
|
36864
|
+
for (const path31 of homeReadRoots) writeRoots.delete(path31);
|
|
36863
36865
|
const profile = [
|
|
36864
36866
|
"[permissions.workspace-git]",
|
|
36865
36867
|
'description = "Workspace and Git writable with local test support"',
|
|
@@ -36871,7 +36873,7 @@ function permissionConfiguration(source, homeReadRoots, temporaryRoot = "/tmp")
|
|
|
36871
36873
|
"allow_local_binding = true",
|
|
36872
36874
|
"",
|
|
36873
36875
|
"[permissions.workspace-git.filesystem]",
|
|
36874
|
-
`${JSON.stringify(
|
|
36876
|
+
...[...writeRoots].map((path31) => `${JSON.stringify(path31)} = "write"`),
|
|
36875
36877
|
...homeReadRoots.map((path31) => `${JSON.stringify(path31)} = "read"`),
|
|
36876
36878
|
"",
|
|
36877
36879
|
'[permissions.workspace-git.filesystem.":workspace_roots"]',
|
|
@@ -37114,12 +37116,26 @@ async function setupAgents(context, _mode, extraSkills) {
|
|
|
37114
37116
|
const configFile = path10.join(codexHome, "config.toml");
|
|
37115
37117
|
const normalize2 = async () => {
|
|
37116
37118
|
const before = await readProfile(configFile), source = before?.bytes.toString("utf8") ?? "";
|
|
37117
|
-
const
|
|
37118
|
-
const
|
|
37119
|
-
|
|
37120
|
-
|
|
37121
|
-
|
|
37122
|
-
);
|
|
37119
|
+
const { LOCALAPPDATA, XDG_CACHE_HOME, XDG_RUNTIME_DIR } = context.environment;
|
|
37120
|
+
const windows = process.platform === "win32";
|
|
37121
|
+
const localAppData = LOCALAPPDATA || path10.join(userHome, "AppData/Local");
|
|
37122
|
+
const temporaryRoot = windows ? path10.join(localAppData, "Temp") : "/tmp";
|
|
37123
|
+
const cacheHome = windows ? localAppData : XDG_CACHE_HOME && path10.isAbsolute(XDG_CACHE_HOME) ? XDG_CACHE_HOME : path10.join(userHome, process.platform === "darwin" ? "Library/Caches" : ".cache");
|
|
37124
|
+
const legacyCache = path10.join(userHome, ".ccache");
|
|
37125
|
+
const legacy = await stat3(legacyCache).catch((error) => {
|
|
37126
|
+
if (!absent2(error)) throw error;
|
|
37127
|
+
});
|
|
37128
|
+
const cacheDir = legacy?.isDirectory() ? legacyCache : path10.join(cacheHome, "ccache");
|
|
37129
|
+
const cacheRoots = [cacheDir];
|
|
37130
|
+
if (!windows && XDG_RUNTIME_DIR && path10.isAbsolute(XDG_RUNTIME_DIR))
|
|
37131
|
+
cacheRoots.push(path10.join(XDG_RUNTIME_DIR, "ccache-tmp"));
|
|
37132
|
+
const readRoots = [.../* @__PURE__ */ new Set([codexHome, gestaltHome, ...[".agents", ".local", ".config"].map((name2) => path10.join(userHome, name2))])];
|
|
37133
|
+
const output = permissionConfiguration(approvalConfiguration(source, manager, codexHome), readRoots, temporaryRoot, cacheRoots);
|
|
37134
|
+
if (!readRoots.includes(cacheDir)) {
|
|
37135
|
+
await mkdir3(cacheDir, { recursive: true, mode: 448 }).catch((error) => {
|
|
37136
|
+
if (!["EACCES", "EPERM", "EROFS", "ENOTDIR", "EEXIST"].includes(error.code ?? "")) throw error;
|
|
37137
|
+
});
|
|
37138
|
+
}
|
|
37123
37139
|
await replaceProfile(codexStorage, configFile, Buffer.from(output), before);
|
|
37124
37140
|
};
|
|
37125
37141
|
const unlisten = context.listen();
|
|
@@ -37363,7 +37379,7 @@ async function installMobile(context, explicit = false) {
|
|
|
37363
37379
|
}
|
|
37364
37380
|
|
|
37365
37381
|
// src/cli/setup/manager-update.ts
|
|
37366
|
-
import { chmod as chmod2, lstat as lstat7, mkdir as
|
|
37382
|
+
import { chmod as chmod2, lstat as lstat7, mkdir as mkdir4, mkdtemp, readFile as readFile5, rename as rename5, rm as rm3, writeFile } from "node:fs/promises";
|
|
37367
37383
|
import { tmpdir } from "node:os";
|
|
37368
37384
|
import path12 from "node:path";
|
|
37369
37385
|
import { fileURLToPath as fileURLToPath3, pathToFileURL as pathToFileURL2 } from "node:url";
|
|
@@ -37383,7 +37399,7 @@ async function updateManager(context, originalArgv, resumed) {
|
|
|
37383
37399
|
if (!current) throw new Error(`could not resolve manager executable: ${target}`);
|
|
37384
37400
|
const lockRoot = path12.join(directory, ".gestalt-manager-update.lock");
|
|
37385
37401
|
if (process.platform === "win32") await windowsSystem({ operation: "create-directory", path: lockRoot });
|
|
37386
|
-
else await
|
|
37402
|
+
else await mkdir4(lockRoot, { mode: 448 });
|
|
37387
37403
|
const storage = await NativePrivateStorage.open(lockRoot, context.paths.unixProbe, context.windowsReadHelper);
|
|
37388
37404
|
const lockIdentity = await lstat7(lockRoot, { bigint: true });
|
|
37389
37405
|
const scratch = await mkdtemp(path12.join(tmpdir(), "gestalt-update."));
|
|
@@ -37605,7 +37621,7 @@ function retireManagedConfiguration(selectedCodex, selectedHome, manager) {
|
|
|
37605
37621
|
}
|
|
37606
37622
|
|
|
37607
37623
|
// src/cli/setup/restart.ts
|
|
37608
|
-
import { lstat as lstat8, open as open3, readFile as readFile6, rmdir as rmdir2, stat as
|
|
37624
|
+
import { lstat as lstat8, open as open3, readFile as readFile6, rmdir as rmdir2, stat as stat4, unlink as unlink4 } from "node:fs/promises";
|
|
37609
37625
|
import path13 from "node:path";
|
|
37610
37626
|
import { setTimeout as delay } from "node:timers/promises";
|
|
37611
37627
|
init_context();
|
|
@@ -37668,7 +37684,7 @@ async function restartWorker(context, args, update) {
|
|
|
37668
37684
|
const record2 = bytes.toString("utf8").slice(0, -1).split("\0");
|
|
37669
37685
|
const cwd = record2.shift();
|
|
37670
37686
|
const argv = retiredRestartArguments(record2);
|
|
37671
|
-
if (!path13.isAbsolute(cwd) || !(await
|
|
37687
|
+
if (!path13.isAbsolute(cwd) || !(await stat4(cwd)).isDirectory()) throw new Error(`the Gestalt Mobile restart directory is invalid: ${cwd}`);
|
|
37672
37688
|
if (await update(worker, component2, extra === "true")) return 0;
|
|
37673
37689
|
await relayContext(worker, relay, descriptor);
|
|
37674
37690
|
if (!(await readFile6(descriptor)).equals(bytes)) throw new Error("the Gestalt Mobile restart descriptor changed during update; relay preserved");
|
|
@@ -38374,12 +38390,12 @@ init_skills_owner();
|
|
|
38374
38390
|
// src/cli/runtime/skills-transfer.ts
|
|
38375
38391
|
import path21 from "node:path";
|
|
38376
38392
|
import { randomUUID as randomUUID8 } from "node:crypto";
|
|
38377
|
-
import { cp as cp2, link, lstat as lstat11, mkdir as
|
|
38393
|
+
import { cp as cp2, link, lstat as lstat11, mkdir as mkdir6, readFile as readFile9, readdir as readdir2, realpath as realpath9, rename as rename6, rm as rm5, symlink, unlink as unlink5, writeFile as writeFile3 } from "node:fs/promises";
|
|
38378
38394
|
|
|
38379
38395
|
// src/cli/platform/archive.ts
|
|
38380
38396
|
init_windows_system();
|
|
38381
38397
|
import { constants as constants4 } from "node:fs";
|
|
38382
|
-
import { lstat as lstat10, open as open4, readdir, mkdir as
|
|
38398
|
+
import { lstat as lstat10, open as open4, readdir, mkdir as mkdir5, realpath as realpath8, writeFile as writeFile2 } from "node:fs/promises";
|
|
38383
38399
|
import path20 from "node:path";
|
|
38384
38400
|
import { gunzipSync, gzipSync } from "node:zlib";
|
|
38385
38401
|
var maximumArchive = 64 * 1024 * 1024;
|
|
@@ -38503,7 +38519,7 @@ var NativeArchives = class {
|
|
|
38503
38519
|
for (const part of relative.split("/").filter(Boolean)) {
|
|
38504
38520
|
cursor = path20.join(cursor, part);
|
|
38505
38521
|
try {
|
|
38506
|
-
await
|
|
38522
|
+
await mkdir5(cursor, { mode: 448 });
|
|
38507
38523
|
} catch (error) {
|
|
38508
38524
|
if (error.code !== "EEXIST") throw error;
|
|
38509
38525
|
}
|
|
@@ -38639,11 +38655,11 @@ async function exportSkills(context, argv) {
|
|
|
38639
38655
|
let skillCount = 0, profileCount = 0;
|
|
38640
38656
|
const temporary = path21.join(parent, `.gestalt-skills-${randomUUID8()}.tar.gz`);
|
|
38641
38657
|
try {
|
|
38642
|
-
await
|
|
38658
|
+
await mkdir6(bundle, { mode: 448 });
|
|
38643
38659
|
for (let index = 0; index < categories.length; index++) {
|
|
38644
38660
|
context.check();
|
|
38645
38661
|
const source = destinations[index], destination = path21.join(bundle, categories[index]);
|
|
38646
|
-
await
|
|
38662
|
+
await mkdir6(destination, { mode: 448 });
|
|
38647
38663
|
const info = await optionalStat(source);
|
|
38648
38664
|
if (!info) continue;
|
|
38649
38665
|
if (!info.isDirectory() || info.isSymbolicLink()) throw new Error(`skill root must be a directory without links: ${source}`);
|
|
@@ -39837,7 +39853,7 @@ function packagedWindowsHelper() {
|
|
|
39837
39853
|
async function continueUpdatedManager(invocation, streams, options) {
|
|
39838
39854
|
if (options.commands?.apiVersion !== 1 || typeof options.commands.launch !== "function" || !options.signal || invocation.argv[0] !== "__updated-manager") throw new Error("invalid managed updated-manager handoff");
|
|
39839
39855
|
let unknown = false;
|
|
39840
|
-
const metadata = { version: "0.18.
|
|
39856
|
+
const metadata = { version: "0.18.2", help: "Usage: gestalt <command> [options]\n\nManage Gestalt Agents and Gestalt Mobile in isolated, user-owned directories.\n\nCommands:\n install [--extra-skills] Install or reconcile Agents, optional skills, and Mobile.\n agents install, update Install or reconcile Agents and context-mode only.\n update [COMPONENT] [--extra-skills]\n Update all installed managed components (default).\n update-restart [COMPONENT] [--extra-skills]\n Update from a live Mobile session, then restart Mobile.\n cli [--] [args...] Start Codex with ~/.codex-gestalt as CODEX_HOME.\n mobile [--] [args...] Start the managed Gestalt Mobile executable.\n scratch inspect --cwd ROOT --owner ID\n Inspect an empty Mobile containment fence (read-only).\n scratch recover --cwd ROOT --owner ID --expect TOKEN --confirm-quiescent\n Offline recovery after all owner processes have stopped.\n playwright install [VERSION] Install MCP; add missing system Chrome on Debian amd64.\n playwright update [VERSION] Stage, verify and activate an explicit package update.\n playwright version [--json] Read versioned installation metadata.\n playwright doctor [--json] [--launch] [--executable-path PATH] Check package and Chrome; optionally test a local page.\n playwright mcp --cwd ROOT Managed headless stdio (workspace profile).\n serena install Install private uv, Python 3.13 and tested Serena.\n serena update [VERSION] Validate and activate a release; retain prior tooling.\n serena version, -V Read installed package metadata without creating state.\n serena doctor [--cwd ROOT] Check install, sandbox, MCP tools and optional language readiness.\n serena index --cwd ROOT Explicit native symbol/cache warmup for one project.\n serena mcp --cwd ROOT Confined workspace MCP; always Codex context and editing mode.\n path [NAME|--json] Print managed executable and runtime paths.\n skills install, update Maintain the optional Dyne.org skill collection only.\n skills status [--json] Read installed version, revision and integrity.\n skills-export [ARCHIVE] Export installed skills and skill profiles.\n skills-import ARCHIVE Import a skills archive into this installation.\n doctor [--cwd ROOT] Check prerequisites and installation.\n version Print manager and detected component versions.\n help Show this help.\n\nUpdate components (also accepted as --component COMPONENT):\n all Gestalt core plus installed Serena and Playwright (default).\n gestalt Manager, Agents, Mobile, and context-mode runtime.\n serena Latest stable Serena and its private uv/Python tooling.\n playwright Stable Playwright MCP package; Chrome is externally maintained.\n\nOptional components absent from this installation are skipped by 'all'.\nSelecting serena or playwright explicitly installs or updates that component only.\n--extra-skills applies only to all or gestalt; it adds curated third-party skills.\nNode, npm, Codex, Kimi, and system language servers are externally maintained.\n\nEnvironment:\n CODEX_HOME Isolated Codex home (default: ~/.codex-gestalt).\n GESTALT_HOME Runtime and Mobile root (default: ~/.gestalt).\n GESTALT_INSTALL_BASE_URL Manager update source (default: https://dyne.github.io/gestalt).\n GESTALT_MARKETPLACE Marketplace source (default: dyne/gestalt-agents).\n GESTALT_MARKETPLACE_NAME Codex checkout name (default: dyne-gestalt-agents).\n GESTALT_MOBILE_VERSION npm version or tag (default: latest).\n GESTALT_SKILLS_SOURCE Collection source override (always unverified).\n GESTALT_SKILLS_REF Collection Git ref or immutable revision (default: main).\n" };
|
|
39841
39857
|
const status = await runCli(
|
|
39842
39858
|
{ argv: [...invocation.argv], cwd: invocation.cwd, environment: { ...invocation.environment } },
|
|
39843
39859
|
streams,
|
|
@@ -39884,7 +39900,7 @@ async function main2() {
|
|
|
39884
39900
|
const selected = selectInteractiveRuntime({ legacyManager: fileURLToPath7(new URL("./legacy/gestalt", import.meta.url)) });
|
|
39885
39901
|
if (selected.kind === "unix-compatibility") selected.exec({ argv, cwd: process.cwd(), environment });
|
|
39886
39902
|
}
|
|
39887
|
-
const metadata = { version: "0.18.
|
|
39903
|
+
const metadata = { version: "0.18.2", help: "Usage: gestalt <command> [options]\n\nManage Gestalt Agents and Gestalt Mobile in isolated, user-owned directories.\n\nCommands:\n install [--extra-skills] Install or reconcile Agents, optional skills, and Mobile.\n agents install, update Install or reconcile Agents and context-mode only.\n update [COMPONENT] [--extra-skills]\n Update all installed managed components (default).\n update-restart [COMPONENT] [--extra-skills]\n Update from a live Mobile session, then restart Mobile.\n cli [--] [args...] Start Codex with ~/.codex-gestalt as CODEX_HOME.\n mobile [--] [args...] Start the managed Gestalt Mobile executable.\n scratch inspect --cwd ROOT --owner ID\n Inspect an empty Mobile containment fence (read-only).\n scratch recover --cwd ROOT --owner ID --expect TOKEN --confirm-quiescent\n Offline recovery after all owner processes have stopped.\n playwright install [VERSION] Install MCP; add missing system Chrome on Debian amd64.\n playwright update [VERSION] Stage, verify and activate an explicit package update.\n playwright version [--json] Read versioned installation metadata.\n playwright doctor [--json] [--launch] [--executable-path PATH] Check package and Chrome; optionally test a local page.\n playwright mcp --cwd ROOT Managed headless stdio (workspace profile).\n serena install Install private uv, Python 3.13 and tested Serena.\n serena update [VERSION] Validate and activate a release; retain prior tooling.\n serena version, -V Read installed package metadata without creating state.\n serena doctor [--cwd ROOT] Check install, sandbox, MCP tools and optional language readiness.\n serena index --cwd ROOT Explicit native symbol/cache warmup for one project.\n serena mcp --cwd ROOT Confined workspace MCP; always Codex context and editing mode.\n path [NAME|--json] Print managed executable and runtime paths.\n skills install, update Maintain the optional Dyne.org skill collection only.\n skills status [--json] Read installed version, revision and integrity.\n skills-export [ARCHIVE] Export installed skills and skill profiles.\n skills-import ARCHIVE Import a skills archive into this installation.\n doctor [--cwd ROOT] Check prerequisites and installation.\n version Print manager and detected component versions.\n help Show this help.\n\nUpdate components (also accepted as --component COMPONENT):\n all Gestalt core plus installed Serena and Playwright (default).\n gestalt Manager, Agents, Mobile, and context-mode runtime.\n serena Latest stable Serena and its private uv/Python tooling.\n playwright Stable Playwright MCP package; Chrome is externally maintained.\n\nOptional components absent from this installation are skipped by 'all'.\nSelecting serena or playwright explicitly installs or updates that component only.\n--extra-skills applies only to all or gestalt; it adds curated third-party skills.\nNode, npm, Codex, Kimi, and system language servers are externally maintained.\n\nEnvironment:\n CODEX_HOME Isolated Codex home (default: ~/.codex-gestalt).\n GESTALT_HOME Runtime and Mobile root (default: ~/.gestalt).\n GESTALT_INSTALL_BASE_URL Manager update source (default: https://dyne.github.io/gestalt).\n GESTALT_MARKETPLACE Marketplace source (default: dyne/gestalt-agents).\n GESTALT_MARKETPLACE_NAME Codex checkout name (default: dyne-gestalt-agents).\n GESTALT_MOBILE_VERSION npm version or tag (default: latest).\n GESTALT_SKILLS_SOURCE Collection source override (always unverified).\n GESTALT_SKILLS_REF Collection Git ref or immutable revision (default: main).\n" };
|
|
39888
39904
|
const ownershipHelper = packagedWindowsHelper();
|
|
39889
39905
|
return runCli(
|
|
39890
39906
|
{ argv, cwd: process.cwd(), environment },
|
package/lib/legacy/gestalt
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
set -Eeuo pipefail
|
|
4
4
|
IFS=$'\n\t'
|
|
5
5
|
|
|
6
|
-
readonly GESTALT_CLI_VERSION='0.18.
|
|
6
|
+
readonly GESTALT_CLI_VERSION='0.18.2'
|
|
7
7
|
readonly DEFAULT_INSTALL_BASE_URL='https://dyne.github.io/gestalt'
|
|
8
8
|
readonly DEFAULT_MARKETPLACE='dyne/gestalt-agents'
|
|
9
9
|
readonly DEFAULT_MARKETPLACE_NAME='dyne-gestalt-agents'
|
|
@@ -3339,14 +3339,24 @@ configure_codex_permissions() {
|
|
|
3339
3339
|
|
|
3340
3340
|
node --input-type=module - \
|
|
3341
3341
|
"$config_path" "${BASH_SOURCE[0]}" "$codex_home" "$gestalt_home" "$HOME/.agents" \
|
|
3342
|
-
"$HOME/.local" "$HOME/.config" <<'NODE'
|
|
3342
|
+
"$HOME/.local" "$HOME/.config" "$HOME" <<'NODE'
|
|
3343
3343
|
import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from 'node:fs';
|
|
3344
|
-
import { dirname } from 'node:path';
|
|
3344
|
+
import { dirname, isAbsolute, join } from 'node:path';
|
|
3345
3345
|
import { runInNewContext } from 'node:vm';
|
|
3346
3346
|
|
|
3347
3347
|
const configPath = process.argv[2];
|
|
3348
3348
|
const managerPath = process.argv[3];
|
|
3349
|
-
const homeReadRoots = [...new Set(process.argv.slice(4))];
|
|
3349
|
+
const homeReadRoots = [...new Set(process.argv.slice(4, -1))];
|
|
3350
|
+
const userHome = process.argv.at(-1);
|
|
3351
|
+
const { XDG_CACHE_HOME, XDG_RUNTIME_DIR } = process.env;
|
|
3352
|
+
const legacyCache = join(userHome, '.ccache');
|
|
3353
|
+
const cacheHome = isAbsolute(XDG_CACHE_HOME || '') ? XDG_CACHE_HOME
|
|
3354
|
+
: join(userHome, process.platform === 'darwin' ? 'Library/Caches' : '.cache');
|
|
3355
|
+
const cacheDir = statSync(legacyCache, { throwIfNoEntry: false })?.isDirectory()
|
|
3356
|
+
? legacyCache : join(cacheHome, 'ccache');
|
|
3357
|
+
const writeRoots = new Set(['/tmp', cacheDir]);
|
|
3358
|
+
if (isAbsolute(XDG_RUNTIME_DIR || '')) writeRoots.add(join(XDG_RUNTIME_DIR, 'ccache-tmp'));
|
|
3359
|
+
for (const root of homeReadRoots) writeRoots.delete(root);
|
|
3350
3360
|
const bundle = readFileSync(managerPath, 'utf8').match(/^\/\/ BEGIN BUNDLED PROFILE TOML PARSER\n([\s\S]*?)^\/\/ END BUNDLED PROFILE TOML PARSER/m);
|
|
3351
3361
|
if (!bundle) throw new Error('Bundled TOML parser missing');
|
|
3352
3362
|
const { parse } = runInNewContext(bundle[1] + '\ngestaltProfileToml');
|
|
@@ -3396,7 +3406,7 @@ const profile = [
|
|
|
3396
3406
|
'allow_local_binding = true',
|
|
3397
3407
|
'',
|
|
3398
3408
|
'[permissions.workspace-git.filesystem]',
|
|
3399
|
-
|
|
3409
|
+
...[...writeRoots].map((path) => `${JSON.stringify(path)} = "write"`),
|
|
3400
3410
|
...homeReadRoots.map((path) => `${JSON.stringify(path)} = "read"`),
|
|
3401
3411
|
'',
|
|
3402
3412
|
'[permissions.workspace-git.filesystem.":workspace_roots"]',
|
|
@@ -3414,6 +3424,13 @@ if (before && !/[\r\n]$/.test(before)) before += newline;
|
|
|
3414
3424
|
const output = root.join(newline) + newline + before +
|
|
3415
3425
|
profile.filter(line => line !== '').join(newline) + newline + retained.slice(position).join('');
|
|
3416
3426
|
parse(output);
|
|
3427
|
+
if (writeRoots.has(cacheDir)) {
|
|
3428
|
+
// Codex needs an existing mount target for writes beneath a read-only home.
|
|
3429
|
+
try { mkdirSync(cacheDir, { recursive: true, mode: 0o700 }); }
|
|
3430
|
+
catch (error) {
|
|
3431
|
+
if (!['EACCES', 'EPERM', 'EROFS', 'ENOTDIR', 'EEXIST'].includes(error.code)) throw error;
|
|
3432
|
+
}
|
|
3433
|
+
}
|
|
3417
3434
|
if (output === source) process.exit(0);
|
|
3418
3435
|
|
|
3419
3436
|
mkdirSync(dirname(configPath), { recursive: true });
|
|
Binary file
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"source": "src/cli/platform/native/owned-process.c",
|
|
3
3
|
"license": "MIT (full license in source)",
|
|
4
4
|
"sourceSha256": "8b8499245e4213e3e842497f815d4b0d19685bcd806b461fdacb66119500ad58",
|
|
5
|
-
"artifactSha256": "
|
|
5
|
+
"artifactSha256": "dfb39729b94b3d6155640d6ce566a967076470617b13ad0b01ec97897babfdf7",
|
|
6
6
|
"platform": "win32",
|
|
7
7
|
"architecture": "x64",
|
|
8
8
|
"node": "v24.22.3",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"advapi32.lib",
|
|
24
24
|
"netapi32.lib"
|
|
25
25
|
],
|
|
26
|
-
"observedAt": "2026-11-
|
|
26
|
+
"observedAt": "2026-11-24T00:22:51.067Z",
|
|
27
27
|
"sourceInputs": [
|
|
28
28
|
{
|
|
29
29
|
"path": "src/cli/platform/native/owned-process.c",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jaromil/gestalt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.18.
|
|
4
|
+
"version": "0.18.2",
|
|
5
5
|
"description": "Manage Gestalt's isolated Codex profile, agent skills and Mobile installation",
|
|
6
6
|
"license": "AGPL-3.0-or-later",
|
|
7
7
|
"author": "Dyne.org foundation",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"access": "public",
|
|
45
45
|
"registry": "https://registry.npmjs.org/"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "1b55ecf70fb71bd1a0171a73bb13b242fe32aa40"
|
|
48
48
|
}
|