@jaromil/gestalt 0.14.0 → 0.15.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
@@ -1,17 +1,34 @@
1
1
  # Gestalt
2
2
 
3
3
  The Gestalt command manages an isolated Codex profile, agent skills, and the
4
- Gestalt Mobile web interface. Requires Linux or macOS, Bash, and Node.js 24 or newer.
4
+ Gestalt Mobile web interface. Requires Linux or macOS, Bash, Node.js 24 or newer,
5
+ and an installed Codex CLI for automatic Agents setup.
5
6
 
6
7
  ```sh
7
8
  npm install -g @jaromil/gestalt
8
- gestalt install
9
- gestalt doctor
9
+ gestalt cli
10
+ ```
11
+
12
+ When install scripts are allowed, global installation makes the command available
13
+ and automatically installs or reconciles Gestalt Agents, their context-mode runtime, and the isolated Codex
14
+ profile under `~/.codex-gestalt`. Your normal `~/.codex` profile remains separate.
15
+
16
+ npm 12 requires approval for install scripts. Allow this package's setup with:
17
+
18
+ ```sh
19
+ npm install -g @jaromil/gestalt --allow-scripts=@jaromil/gestalt
10
20
  ```
11
21
 
12
- Installing this package makes the `gestalt` command available. It has no install
13
- hooks and does not download tools or change your Codex configuration until you
14
- run a setup command. Your normal `~/.codex` profile remains separate.
22
+ Use the same flag for npm 12 updates unless the package is already approved in
23
+ your npm configuration. The package does not override blocked-script policies.
24
+
25
+ To add Mobile and the optional skill collection, run `gestalt install`.
26
+ Retry or refresh only Agents with `gestalt agents install` or `gestalt agents update`.
27
+ Setup errors fail the npm installation and print recovery instructions.
28
+
29
+ To install only the wrapper, use `npm install -g @jaromil/gestalt --ignore-scripts`;
30
+ run `gestalt agents install` later. Local dependency installs and npx inspection
31
+ do not automatically provision a user profile.
15
32
 
16
33
  ```sh
17
34
  gestalt cli
@@ -27,6 +44,7 @@ npm install -g @jaromil/gestalt@latest
27
44
 
28
45
  `gestalt update` updates the managed components and prints the npm command for
29
46
  updating this package. It preserves the npm-managed executable and package metadata.
47
+ Installing a newer global npm version also reconciles Agents automatically.
30
48
 
31
49
  You can also run the command without a global installation:
32
50
 
package/lib/gestalt CHANGED
@@ -3,7 +3,7 @@
3
3
  set -Eeuo pipefail
4
4
  IFS=$'\n\t'
5
5
 
6
- readonly GESTALT_CLI_VERSION='0.14.0'
6
+ readonly GESTALT_CLI_VERSION='0.15.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'
@@ -687,6 +687,7 @@ Manage Gestalt Agents and Gestalt Mobile in isolated, user-owned directories.
687
687
 
688
688
  Commands:
689
689
  install [--extra-skills] Install or reconcile Agents, optional skills, and Mobile.
690
+ agents install, update Install or reconcile Agents and context-mode only.
690
691
  update [COMPONENT] [--extra-skills]
691
692
  Update all installed managed components (default).
692
693
  update-restart [COMPONENT] [--extra-skills]
@@ -4779,6 +4780,20 @@ parse_setup_options() {
4779
4780
  done
4780
4781
  }
4781
4782
 
4783
+ command_agents() {
4784
+ if (($# == 0)) || [[ $# == 1 && ( $1 == help || $1 == -h || $1 == --help ) ]]; then
4785
+ printf '%s\n' 'Usage: gestalt agents install|update' \
4786
+ 'Install or reconcile Gestalt Agents and their context-mode runtime.'
4787
+ return 0
4788
+ fi
4789
+ (($# == 1)) || die 'usage: gestalt agents install|update'
4790
+ case $1 in
4791
+ install) run_marketplace_setup install false ;;
4792
+ update) run_marketplace_setup upgrade false ;;
4793
+ *) die 'usage: gestalt agents install|update' ;;
4794
+ esac
4795
+ }
4796
+
4782
4797
  command_install() {
4783
4798
  parse_setup_options "$@"
4784
4799
  command_skills install
@@ -6965,6 +6980,7 @@ main() {
6965
6980
  load_paths
6966
6981
  case $command_name in
6967
6982
  install) command_install "$@" ;;
6983
+ agents) command_agents "$@" ;;
6968
6984
  update) command_update "$@" ;;
6969
6985
  update-restart) command_update_restart "$@" ;;
6970
6986
  __update-restart-worker) command_update_restart_worker "$@" ;;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaromil/gestalt",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Manage Gestalt's isolated Codex profile, agent skills and Mobile installation",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "author": "Dyne.org foundation",
@@ -24,9 +24,13 @@
24
24
  "files": [
25
25
  "bin/gestalt",
26
26
  "lib/gestalt",
27
+ "postinstall.mjs",
27
28
  "README.md",
28
29
  "LICENSE"
29
30
  ],
31
+ "scripts": {
32
+ "postinstall": "node postinstall.mjs"
33
+ },
30
34
  "engines": {
31
35
  "node": ">=24.0.0"
32
36
  },
@@ -38,5 +42,5 @@
38
42
  "access": "public",
39
43
  "registry": "https://registry.npmjs.org/"
40
44
  },
41
- "gitHead": "fde7d64b5345c343b49fd6b76c5138a1a95192fd"
45
+ "gitHead": "08a8ef8b77ef4b626a4d5bfd6b254bdc13482362"
42
46
  }
@@ -0,0 +1,22 @@
1
+ import { spawnSync } from 'node:child_process';
2
+ import { fileURLToPath } from 'node:url';
3
+
4
+ // Local dependency installs and npx inspection do not provision a user profile.
5
+ if ((process.env.npm_config_global ?? process.env.NPM_CONFIG_GLOBAL) === 'true') {
6
+ // A global install must not make the delegated runtime's npm installs global
7
+ // or redirect their explicit prefixes into this package's installation.
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
+ const result = spawnSync('bash', [fileURLToPath(new URL('./bin/gestalt', import.meta.url)), 'agents', 'install'], {
15
+ env: environment,
16
+ stdio: 'inherit',
17
+ });
18
+ if (result.error || result.status !== 0) {
19
+ console.error('gestalt: Agents setup failed. Ensure Codex, Bash and Node.js 24+ are installed, then retry npm install -g @jaromil/gestalt. Existing installations can run: gestalt agents install');
20
+ process.exitCode = result.status || 1;
21
+ }
22
+ }