@jaromil/gestalt 0.20.2 → 0.20.3
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.20.
|
|
2
|
+
// GESTALT_CLI_VERSION='0.20.3'
|
|
3
3
|
// GESTALT_UPDATED_MANAGER_API='1'
|
|
4
4
|
/*! tuiuiu.js
|
|
5
5
|
MIT License
|
|
@@ -39862,7 +39862,7 @@ function packagedWindowsHelper() {
|
|
|
39862
39862
|
async function continueUpdatedManager(invocation, streams, options) {
|
|
39863
39863
|
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");
|
|
39864
39864
|
let unknown = false;
|
|
39865
|
-
const metadata = { version: "0.20.
|
|
39865
|
+
const metadata = { version: "0.20.3", 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 mobile reset-passkeys --public-origin ORIGIN --confirm\n Reset the local Mobile passkeys and browser sessions for a new hostname.\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] [--prune-offline]\n Update Serena; optionally remove inactive releases after shutdown.\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" };
|
|
39866
39866
|
const status = await runCli(
|
|
39867
39867
|
{ argv: [...invocation.argv], cwd: invocation.cwd, environment: { ...invocation.environment } },
|
|
39868
39868
|
streams,
|
|
@@ -39909,7 +39909,7 @@ async function main2() {
|
|
|
39909
39909
|
const selected = selectInteractiveRuntime({ legacyManager: fileURLToPath7(new URL("./legacy/gestalt", import.meta.url)) });
|
|
39910
39910
|
if (selected.kind === "unix-compatibility") selected.exec({ argv, cwd: process.cwd(), environment });
|
|
39911
39911
|
}
|
|
39912
|
-
const metadata = { version: "0.20.
|
|
39912
|
+
const metadata = { version: "0.20.3", 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 mobile reset-passkeys --public-origin ORIGIN --confirm\n Reset the local Mobile passkeys and browser sessions for a new hostname.\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] [--prune-offline]\n Update Serena; optionally remove inactive releases after shutdown.\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" };
|
|
39913
39913
|
const ownershipHelper = packagedWindowsHelper();
|
|
39914
39914
|
return runCli(
|
|
39915
39915
|
{ 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.20.
|
|
6
|
+
readonly GESTALT_CLI_VERSION='0.20.3'
|
|
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'
|
|
@@ -849,7 +849,8 @@ Commands:
|
|
|
849
849
|
playwright doctor [--json] [--launch] [--executable-path PATH] Check package and Chrome; optionally test a local page.
|
|
850
850
|
playwright mcp --cwd ROOT Managed headless stdio (workspace profile).
|
|
851
851
|
serena install Install private uv, Python 3.13 and tested Serena.
|
|
852
|
-
serena update [VERSION]
|
|
852
|
+
serena update [VERSION] [--prune-offline]
|
|
853
|
+
Update Serena; optionally remove inactive releases after shutdown.
|
|
853
854
|
serena version, -V Read installed package metadata without creating state.
|
|
854
855
|
serena doctor [--cwd ROOT] Check install, sandbox, MCP tools and optional language readiness.
|
|
855
856
|
serena index --cwd ROOT Explicit native symbol/cache warmup for one project.
|
|
@@ -1163,7 +1164,7 @@ JS
|
|
|
1163
1164
|
}
|
|
1164
1165
|
|
|
1165
1166
|
install_serena() {
|
|
1166
|
-
local version=${1:-$MANAGED_SERENA_VERSION} os cpu target asset base expected actual listing candidate
|
|
1167
|
+
local version=${1:-$MANAGED_SERENA_VERSION} prune=${2:-false} os cpu target asset base expected actual listing candidate
|
|
1167
1168
|
[[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || die 'Serena release must be a stable VERSION (major.minor.patch)'
|
|
1168
1169
|
require_command node
|
|
1169
1170
|
require_command curl
|
|
@@ -1189,6 +1190,11 @@ install_serena() {
|
|
|
1189
1190
|
serena_install_lock=$gestalt_home/serena/.install-lock
|
|
1190
1191
|
trap 'exit 130' INT
|
|
1191
1192
|
trap 'exit 143' TERM
|
|
1193
|
+
if [[ $# -gt 0 ]] && serena_install_valid "$version" "$MANAGED_UV_VERSION"; then
|
|
1194
|
+
log "Serena $version already installed and validated"
|
|
1195
|
+
if [[ $prune == true ]]; then prune_serena_releases; fi
|
|
1196
|
+
return
|
|
1197
|
+
fi
|
|
1192
1198
|
# Construct at the final path: uv environments contain absolute interpreter paths.
|
|
1193
1199
|
serena_install_candidate=$(mktemp -d "$gestalt_home/serena/release-$version.XXXXXXXX")
|
|
1194
1200
|
candidate=$serena_install_candidate
|
|
@@ -1299,6 +1305,31 @@ PYTHON
|
|
|
1299
1305
|
rm -rf -- "$candidate/probe" "$candidate/probe-workspace" "${candidate:?}/home" "$candidate/tmp" "$candidate/cache"
|
|
1300
1306
|
rm -f -- "$candidate/uv.tar.gz" "$candidate/uv.sha256"
|
|
1301
1307
|
log "installed Serena $version with uv $MANAGED_UV_VERSION and Python 3.13"
|
|
1308
|
+
if [[ $prune == true ]]; then prune_serena_releases; fi
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
# Called only with the installation lock and explicit offline authorization.
|
|
1312
|
+
prune_serena_releases() {
|
|
1313
|
+
node - "$gestalt_home/serena" <<'JS'
|
|
1314
|
+
const fs = require('node:fs'), path = require('node:path');
|
|
1315
|
+
const root = process.argv[2], pattern = /^release-\d+\.\d+\.\d+\.[A-Za-z0-9]{8}$/;
|
|
1316
|
+
const active = JSON.parse(fs.readFileSync(path.join(root, 'active.json'), 'utf8'));
|
|
1317
|
+
const release = path.dirname(path.dirname(active.executable));
|
|
1318
|
+
if (path.dirname(release) !== root || !pattern.test(path.basename(release)) ||
|
|
1319
|
+
!fs.lstatSync(release).isDirectory() ||
|
|
1320
|
+
![[active.executable, 'bin/serena'], [active.python, 'tools/serena-agent/bin/python'],
|
|
1321
|
+
[active.uv, 'bin/uv'], [active.pythonInstallDir, 'python']].every(([value, relative]) =>
|
|
1322
|
+
value === path.join(release, relative) &&
|
|
1323
|
+
fs.realpathSync(value).startsWith(fs.realpathSync(release) + path.sep))) {
|
|
1324
|
+
throw new Error('cannot identify the active managed Serena release for pruning');
|
|
1325
|
+
}
|
|
1326
|
+
for (const entry of fs.readdirSync(root, {withFileTypes: true})) {
|
|
1327
|
+
const candidate = path.join(root, entry.name);
|
|
1328
|
+
if (candidate === release || !entry.isDirectory() || !pattern.test(entry.name)) continue;
|
|
1329
|
+
fs.rmSync(candidate, {recursive: true});
|
|
1330
|
+
console.error('gestalt: removed inactive Serena release ' + entry.name);
|
|
1331
|
+
}
|
|
1332
|
+
JS
|
|
1302
1333
|
}
|
|
1303
1334
|
|
|
1304
1335
|
# Embedded to preserve the manager's single-file distribution contract.
|
|
@@ -1874,7 +1905,8 @@ Usage: gestalt serena <command> [options]
|
|
|
1874
1905
|
|
|
1875
1906
|
Commands:
|
|
1876
1907
|
install Install private uv, Python 3.13 and tested Serena.
|
|
1877
|
-
update [VERSION]
|
|
1908
|
+
update [VERSION] [--prune-offline]
|
|
1909
|
+
Update Serena; remove inactive releases only after shutdown.
|
|
1878
1910
|
version Read the installed version without starting Serena.
|
|
1879
1911
|
doctor [--cwd ROOT] [--json] Check installation and optional workspace readiness.
|
|
1880
1912
|
index --cwd ROOT Warm symbol and language caches for a project.
|
|
@@ -1895,7 +1927,12 @@ EOF
|
|
|
1895
1927
|
fi
|
|
1896
1928
|
;;
|
|
1897
1929
|
update)
|
|
1898
|
-
|
|
1930
|
+
local prune=false
|
|
1931
|
+
if [[ ${!#} == --prune-offline ]]; then
|
|
1932
|
+
prune=true
|
|
1933
|
+
set -- "${@:1:$#-1}"
|
|
1934
|
+
fi
|
|
1935
|
+
(($# <= 1)) || die 'usage: gestalt serena update [VERSION] [--prune-offline]'
|
|
1899
1936
|
local version=${1:-latest}
|
|
1900
1937
|
if [[ $version == latest ]]; then
|
|
1901
1938
|
require_command curl
|
|
@@ -1905,7 +1942,7 @@ EOF
|
|
|
1905
1942
|
node -e 'let s=""; process.stdin.on("data",b=>s+=b); process.stdin.on("end",()=>{const d=JSON.parse(s);const versions=Object.keys(d.releases??{}).filter(v=>/^\d+\.\d+\.\d+$/.test(v)&&d.releases[v]?.some(f=>!f.yanked)).sort((a,b)=>{const x=a.split(".").map(Number),y=b.split(".").map(Number);return x[0]-y[0]||x[1]-y[1]||x[2]-y[2];});if(!versions.length)process.exit(1);process.stdout.write(versions.at(-1));});') ||
|
|
1906
1943
|
die 'could not resolve the latest stable Serena release; prior installation preserved'
|
|
1907
1944
|
fi
|
|
1908
|
-
install_serena "$version"
|
|
1945
|
+
install_serena "$version" "$prune"
|
|
1909
1946
|
;;
|
|
1910
1947
|
mcp)
|
|
1911
1948
|
[[ $# == 2 && $1 == --cwd && -n $2 ]] || die 'usage: gestalt serena mcp --cwd ROOT; context, mode and project cannot be overridden'
|
|
@@ -1933,16 +1970,18 @@ EOF
|
|
|
1933
1970
|
[[ $action != index || -n $workspace ]] || die 'usage: gestalt serena index --cwd ROOT'
|
|
1934
1971
|
serena_operator "$action" "$workspace" "$json_output"
|
|
1935
1972
|
;;
|
|
1936
|
-
*) die 'usage: gestalt serena install | update [VERSION] | version | doctor [--cwd ROOT] | index --cwd ROOT | mcp --cwd ROOT' ;;
|
|
1973
|
+
*) die 'usage: gestalt serena install | update [VERSION] [--prune-offline] | version | doctor [--cwd ROOT] | index --cwd ROOT | mcp --cwd ROOT' ;;
|
|
1937
1974
|
esac
|
|
1938
1975
|
}
|
|
1939
1976
|
|
|
1940
1977
|
serena_install_valid() {
|
|
1941
1978
|
require_command node
|
|
1942
|
-
node - "$gestalt_home/serena/active.json" <<'JS'
|
|
1979
|
+
node - "$gestalt_home/serena/active.json" "${1:-}" "${2:-}" <<'JS'
|
|
1943
1980
|
const fs = require('node:fs'), {spawnSync} = require('node:child_process');
|
|
1944
1981
|
try {
|
|
1945
1982
|
const d = JSON.parse(fs.readFileSync(process.argv[2], 'utf8'));
|
|
1983
|
+
const [, , , expectedVersion, expectedUv] = process.argv;
|
|
1984
|
+
if (expectedVersion && d.version !== expectedVersion) process.exit(1);
|
|
1946
1985
|
if (d.schemaVersion !== 1 || (d.contractVersion !== 1 && d.version !== '1.7.0') || !Array.isArray(d.tools) ||
|
|
1947
1986
|
!['get_symbols_overview', 'find_symbol', 'replace_symbol_body'].every(n => d.tools.some(t => t.name === n && t.inputSchema))) process.exit(1);
|
|
1948
1987
|
for (const p of [d.executable, d.python, d.uv]) fs.accessSync(p, fs.constants.X_OK);
|
|
@@ -1950,6 +1989,10 @@ try {
|
|
|
1950
1989
|
const result = spawnSync(d.python, ['-I', '-B', '-c', 'import importlib.metadata; print(importlib.metadata.version("serena-agent"))'],
|
|
1951
1990
|
{encoding: 'utf8', timeout: 5000});
|
|
1952
1991
|
if (result.status !== 0 || result.stdout.trim() !== d.version) process.exit(1);
|
|
1992
|
+
if (expectedUv) {
|
|
1993
|
+
const uv = spawnSync(d.uv, ['--version'], {encoding: 'utf8', timeout: 5000});
|
|
1994
|
+
if (uv.status !== 0 || uv.stdout.trim().split(/\s+/).slice(0, 2).join(' ') !== 'uv ' + expectedUv) process.exit(1);
|
|
1995
|
+
}
|
|
1953
1996
|
} catch { process.exit(1); }
|
|
1954
1997
|
JS
|
|
1955
1998
|
}
|
|
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": "71ccaebde2ccba1e530730d28d0f8c896c620da85b52c4dffb0cf8386e0f1f0e",
|
|
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-28T10:12:14.213Z",
|
|
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.20.
|
|
4
|
+
"version": "0.20.3",
|
|
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": "50a28ad86e9fe3e133a5acb3322f815b7b46a78e"
|
|
48
48
|
}
|