@jaromil/gestalt 0.18.2 → 0.20.0
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/README.md
CHANGED
|
@@ -26,7 +26,7 @@ macOS retains its best-effort Unix behavior.
|
|
|
26
26
|
With npm 11, install a release available for your platform.
|
|
27
27
|
|
|
28
28
|
```sh
|
|
29
|
-
npm install -g @jaromil/gestalt
|
|
29
|
+
npm install -g @jaromil/gestalt@latest --foreground-scripts
|
|
30
30
|
gestalt cli
|
|
31
31
|
```
|
|
32
32
|
|
|
@@ -39,7 +39,7 @@ lifecycle script with the following command. npm 12.2.2 requires at least
|
|
|
39
39
|
Node 24.15.0 when using Node 24.
|
|
40
40
|
|
|
41
41
|
```sh
|
|
42
|
-
npm install -g @jaromil/gestalt --allow-scripts=@jaromil/gestalt
|
|
42
|
+
npm install -g @jaromil/gestalt@latest --foreground-scripts --allow-scripts=@jaromil/gestalt
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
Use the same flag for npm 12 updates unless the package is already approved in
|
|
@@ -56,7 +56,7 @@ On Windows it installs the available core and reports deferred components.
|
|
|
56
56
|
Retry or refresh only Agents with `gestalt agents install` or `gestalt agents update`.
|
|
57
57
|
Setup errors fail the npm installation and print recovery instructions.
|
|
58
58
|
|
|
59
|
-
To install only the wrapper, use `npm install -g @jaromil/gestalt --ignore-scripts`;
|
|
59
|
+
To install only the wrapper, use `npm install -g @jaromil/gestalt@latest --ignore-scripts`;
|
|
60
60
|
run `gestalt agents install` later. Local dependency installs and npx inspection
|
|
61
61
|
do not automatically provision a user profile.
|
|
62
62
|
|
|
@@ -84,9 +84,16 @@ administrative commands run without the picker.
|
|
|
84
84
|
Update the npm-installed command with:
|
|
85
85
|
|
|
86
86
|
```sh
|
|
87
|
-
npm install -g @jaromil/gestalt@latest
|
|
87
|
+
npm install -g @jaromil/gestalt@latest --foreground-scripts
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
+
For an existing local dependency, run `npm install @jaromil/gestalt@latest --foreground-scripts`
|
|
91
|
+
from its project. The explicit tag selects the current release even when the project's
|
|
92
|
+
saved version range excludes it. Foreground scripts show the installed version report
|
|
93
|
+
when npm runs the install hook. With npm 12, local installs require the project to
|
|
94
|
+
approve the package’s install script. If npm reports that everything is already up to date,
|
|
95
|
+
use `npm exec -- gestalt version` in that project to see the report again.
|
|
96
|
+
|
|
90
97
|
`gestalt update` updates the managed components and prints the npm command for
|
|
91
98
|
updating this package. It preserves the npm-managed executable and package metadata.
|
|
92
99
|
Installing a newer global npm version also reconciles Agents automatically.
|
package/lib/gestalt.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// GESTALT_CLI_VERSION='0.
|
|
2
|
+
// GESTALT_CLI_VERSION='0.20.0'
|
|
3
3
|
// GESTALT_UPDATED_MANAGER_API='1'
|
|
4
4
|
/*! tuiuiu.js
|
|
5
5
|
MIT License
|
|
@@ -37389,7 +37389,7 @@ init_storage();
|
|
|
37389
37389
|
init_windows_system();
|
|
37390
37390
|
async function updateManager(context, originalArgv, resumed) {
|
|
37391
37391
|
if (context.environment.GESTALT_MANAGER_DISTRIBUTION === "npm") {
|
|
37392
|
-
await context.log("manager is installed with npm; update it with: npm install -g @jaromil/gestalt@latest");
|
|
37392
|
+
await context.log("manager is installed with npm; update it with: npm install -g @jaromil/gestalt@latest --foreground-scripts");
|
|
37393
37393
|
return false;
|
|
37394
37394
|
}
|
|
37395
37395
|
if (resumed) return false;
|
|
@@ -38269,7 +38269,7 @@ async function runUpdate(context, options, originalArgv, resumed, operations = d
|
|
|
38269
38269
|
await operations.agents(context, "upgrade", options.extra);
|
|
38270
38270
|
const mobile = await optionalMobile(context, operations, platform);
|
|
38271
38271
|
const summary = mobile === false ? "Agents, optional skills, and context-mode" : "Agents, optional skills, Mobile, and context-mode";
|
|
38272
|
-
await context.log(context.environment.GESTALT_MANAGER_DISTRIBUTION === "npm" ? `${summary} are up to date; update the manager with npm install -g @jaromil/gestalt@latest` : `manager, ${summary} are up to date`);
|
|
38272
|
+
await context.log(context.environment.GESTALT_MANAGER_DISTRIBUTION === "npm" ? `${summary} are up to date; update the manager with npm install -g @jaromil/gestalt@latest --foreground-scripts` : `manager, ${summary} are up to date`);
|
|
38273
38273
|
}
|
|
38274
38274
|
for (const component2 of ["serena", "playwright"]) {
|
|
38275
38275
|
if (platform === "win32") {
|
|
@@ -38282,6 +38282,8 @@ async function runUpdate(context, options, originalArgv, resumed, operations = d
|
|
|
38282
38282
|
}
|
|
38283
38283
|
if (options.component === "all" || options.component === "gestalt") await operations.diagnostics?.(context);
|
|
38284
38284
|
await context.log(`update complete (${options.component})`);
|
|
38285
|
+
await version(new DiagnosticContext(context.paths, { ...context.invocation, environment: context.environment }, context.streams), context);
|
|
38286
|
+
context.check();
|
|
38285
38287
|
return false;
|
|
38286
38288
|
}
|
|
38287
38289
|
function createSetupHandlers(metadata, operations = defaults, resumed = false, managed, platform = process.platform, ownershipHelper) {
|
|
@@ -39853,7 +39855,7 @@ function packagedWindowsHelper() {
|
|
|
39853
39855
|
async function continueUpdatedManager(invocation, streams, options) {
|
|
39854
39856
|
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");
|
|
39855
39857
|
let unknown = false;
|
|
39856
|
-
const metadata = { version: "0.
|
|
39858
|
+
const metadata = { version: "0.20.0", 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 Workspace defaults to ~/gestalt; override with --cwd ROOT.\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" };
|
|
39857
39859
|
const status = await runCli(
|
|
39858
39860
|
{ argv: [...invocation.argv], cwd: invocation.cwd, environment: { ...invocation.environment } },
|
|
39859
39861
|
streams,
|
|
@@ -39900,7 +39902,7 @@ async function main2() {
|
|
|
39900
39902
|
const selected = selectInteractiveRuntime({ legacyManager: fileURLToPath7(new URL("./legacy/gestalt", import.meta.url)) });
|
|
39901
39903
|
if (selected.kind === "unix-compatibility") selected.exec({ argv, cwd: process.cwd(), environment });
|
|
39902
39904
|
}
|
|
39903
|
-
const metadata = { version: "0.
|
|
39905
|
+
const metadata = { version: "0.20.0", 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 Workspace defaults to ~/gestalt; override with --cwd ROOT.\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" };
|
|
39904
39906
|
const ownershipHelper = packagedWindowsHelper();
|
|
39905
39907
|
return runCli(
|
|
39906
39908
|
{ 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.
|
|
6
|
+
readonly GESTALT_CLI_VERSION='0.20.0'
|
|
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'
|
|
@@ -836,6 +836,7 @@ Commands:
|
|
|
836
836
|
Update from a live Mobile session, then restart Mobile.
|
|
837
837
|
cli [--] [args...] Start Codex with ~/.codex-gestalt as CODEX_HOME.
|
|
838
838
|
mobile [--] [args...] Start the managed Gestalt Mobile executable.
|
|
839
|
+
Workspace defaults to ~/gestalt; override with --cwd ROOT.
|
|
839
840
|
scratch inspect --cwd ROOT --owner ID
|
|
840
841
|
Inspect an empty Mobile containment fence (read-only).
|
|
841
842
|
scratch recover --cwd ROOT --owner ID --expect TOKEN --confirm-quiescent
|
|
@@ -3273,7 +3274,7 @@ calculate_sha256() {
|
|
|
3273
3274
|
|
|
3274
3275
|
update_manager() {
|
|
3275
3276
|
if [[ ${GESTALT_MANAGER_DISTRIBUTION:-} == npm ]]; then
|
|
3276
|
-
log 'manager is installed with npm; update it with: npm install -g @jaromil/gestalt@latest'
|
|
3277
|
+
log 'manager is installed with npm; update it with: npm install -g @jaromil/gestalt@latest --foreground-scripts'
|
|
3277
3278
|
return 0
|
|
3278
3279
|
fi
|
|
3279
3280
|
# The replacement has already been installed and validated by this invocation.
|
|
@@ -3906,7 +3907,7 @@ command_update() {
|
|
|
3906
3907
|
run_marketplace_setup upgrade "$include_extra_skills"
|
|
3907
3908
|
install_mobile
|
|
3908
3909
|
if [[ ${GESTALT_MANAGER_DISTRIBUTION:-} == npm ]]; then
|
|
3909
|
-
log 'Agents, optional skills, Mobile, and context-mode are up to date; update the manager with npm install -g @jaromil/gestalt@latest'
|
|
3910
|
+
log 'Agents, optional skills, Mobile, and context-mode are up to date; update the manager with npm install -g @jaromil/gestalt@latest --foreground-scripts'
|
|
3910
3911
|
else
|
|
3911
3912
|
log 'manager, Agents, optional skills, Mobile, and context-mode are up to date'
|
|
3912
3913
|
fi
|
|
@@ -3934,6 +3935,7 @@ command_update() {
|
|
|
3934
3935
|
log 'post-update diagnostics reported a problem; see the checks above'
|
|
3935
3936
|
fi
|
|
3936
3937
|
log "update complete ($update_component)"
|
|
3938
|
+
command_version
|
|
3937
3939
|
}
|
|
3938
3940
|
|
|
3939
3941
|
parse_update_options() {
|
|
@@ -4104,6 +4106,10 @@ command_update_restart_worker() {
|
|
|
4104
4106
|
restart_args=(${migrated_restart_args[@]+"${migrated_restart_args[@]}"})
|
|
4105
4107
|
[[ $restart_cwd == /* && -d $restart_cwd ]] ||
|
|
4106
4108
|
die "the Gestalt Mobile restart directory is invalid: $restart_cwd"
|
|
4109
|
+
# Older descriptors without --cwd used the recorded working directory.
|
|
4110
|
+
if mobile_workspace_is_implicit ${restart_args[@]+"${restart_args[@]}"}; then
|
|
4111
|
+
restart_args+=(--cwd "$restart_cwd")
|
|
4112
|
+
fi
|
|
4107
4113
|
[[ $worker_extra_skills == false || $worker_extra_skills == true ]] ||
|
|
4108
4114
|
die 'the update-restart worker received an invalid setup mode'
|
|
4109
4115
|
if [[ $worker_extra_skills == true ]]; then
|
|
@@ -5352,6 +5358,18 @@ process.on('SIGTERM',()=>stop(143));process.on('SIGINT',()=>stop(130));
|
|
|
5352
5358
|
NODE
|
|
5353
5359
|
}
|
|
5354
5360
|
|
|
5361
|
+
mobile_workspace_is_implicit() {
|
|
5362
|
+
[[ ${1:-} != trace ]] || return 1
|
|
5363
|
+
while (($#)); do
|
|
5364
|
+
case $1 in
|
|
5365
|
+
--cwd | --cwd=* | --help | --version | --) return 1 ;;
|
|
5366
|
+
--skills) [[ ${2:-} != list ]] || return 1 ;;
|
|
5367
|
+
esac
|
|
5368
|
+
shift
|
|
5369
|
+
done
|
|
5370
|
+
return 0
|
|
5371
|
+
}
|
|
5372
|
+
|
|
5355
5373
|
command_mobile() {
|
|
5356
5374
|
local mobile_restart_dir mobile_restart_state mobile_restart_staged restart_cwd
|
|
5357
5375
|
local context_mode_runtime context_mode_plugin_root gestalt_plugin_root
|
|
@@ -5366,6 +5384,12 @@ command_mobile() {
|
|
|
5366
5384
|
--xerj | --xerj=*) die 'Xerj has been retired; omit --xerj when starting Mobile. Run gestalt update before restarting older generated launchers.' ;;
|
|
5367
5385
|
esac
|
|
5368
5386
|
done
|
|
5387
|
+
if mobile_workspace_is_implicit ${forwarded_args[@]+"${forwarded_args[@]}"}; then
|
|
5388
|
+
local -r mobile_workspace=$HOME/gestalt
|
|
5389
|
+
(umask 077; mkdir -p -- "$mobile_workspace") ||
|
|
5390
|
+
die "could not create the default Mobile workspace: $mobile_workspace"
|
|
5391
|
+
forwarded_args+=(--cwd "$mobile_workspace")
|
|
5392
|
+
fi
|
|
5369
5393
|
if [[ ! -x $mobile_bin ]]; then
|
|
5370
5394
|
log 'Gestalt Mobile is not installed; installing it now'
|
|
5371
5395
|
install_mobile
|
|
@@ -5438,6 +5462,7 @@ command_version() {
|
|
|
5438
5462
|
value=$("$mobile_bin" --version 2>/dev/null) && print_check 'Gestalt Mobile' "$value"
|
|
5439
5463
|
fi
|
|
5440
5464
|
for plugin in gestalt context-mode; do
|
|
5465
|
+
[[ -d $codex_home ]] || break
|
|
5441
5466
|
value=$(CODEX_HOME=$codex_home codex plugin list --marketplace "$marketplace_name" --json 2>/dev/null |
|
|
5442
5467
|
read_plugin_version "$plugin" 2>/dev/null) || continue
|
|
5443
5468
|
print_check "$plugin" "$value"
|
|
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": "f62f1fb9c088daf74276f0c96eac86c22823997dd1780c514d34cc46cbd17a85",
|
|
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-24T01:35:08.758Z",
|
|
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.
|
|
4
|
+
"version": "0.20.0",
|
|
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": "ebed25c32d61880f52e81bfaa70da4dc5f601f05"
|
|
48
48
|
}
|
package/postinstall.mjs
CHANGED
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process';
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
const globalInstall = (process.env.npm_config_global ?? process.env.NPM_CONFIG_GLOBAL) === 'true';
|
|
5
|
+
const manager = fileURLToPath(new URL('./bin/gestalt', import.meta.url));
|
|
6
|
+
|
|
7
|
+
// Delegated commands must use the selected profile and their own npm prefixes.
|
|
8
|
+
const environment = { ...process.env };
|
|
9
|
+
for (const key of Object.keys(environment)) {
|
|
10
|
+
if (/^npm_config_(?:global|prefix|location|workspace|workspaces|include_workspace_root)$/i.test(key))
|
|
11
|
+
delete environment[key];
|
|
12
|
+
}
|
|
13
|
+
environment.npm_config_global = 'false';
|
|
14
|
+
|
|
15
|
+
function run(...args) {
|
|
16
|
+
return spawnSync(process.execPath, [manager, ...args], { env: environment, stdio: 'inherit' });
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Only global installs provision Agents. Local dependency installs just report.
|
|
20
|
+
if (globalInstall) {
|
|
21
|
+
const result = run('agents', 'install');
|
|
18
22
|
if (result.error || result.status !== 0) {
|
|
19
|
-
console.error('gestalt: Agents setup failed. Ensure Codex and Node.js 24+ are installed (Unix also requires Bash), then retry npm install -g @jaromil/gestalt. Existing installations can run: gestalt agents install');
|
|
23
|
+
console.error('gestalt: Agents setup failed. Ensure Codex and Node.js 24+ are installed (Unix also requires Bash), then retry npm install -g @jaromil/gestalt@latest --foreground-scripts. Existing installations can run: gestalt agents install');
|
|
20
24
|
process.exitCode = result.status || 1;
|
|
21
25
|
}
|
|
22
26
|
}
|
|
27
|
+
if (!process.exitCode) {
|
|
28
|
+
const result = run('version');
|
|
29
|
+
if (result.error || result.status !== 0)
|
|
30
|
+
console.error('gestalt: Could not finish the installed version report. Run gestalt version to retry.');
|
|
31
|
+
}
|