chatflux-gestao-agente 0.2.5 → 0.2.6

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.
@@ -37,8 +37,13 @@ export async function configurar(flags = [], options = {}) {
37
37
  const fsImpl = options.fsImpl ?? fs, spawnImpl = options.spawnImpl ?? spawn;
38
38
  const home = options.home ?? os.homedir(), env = options.env ?? process.env;
39
39
  const environment = env.GESTAO_ENV === 'dev' ? 'dev' : 'prod';
40
- const commandEnv = { ...env, GESTAO_ENV: environment };
41
40
  const nodePath = options.nodePath ?? process.execPath, entryPath = fsImpl.realpathSync(options.entryPath ?? ENTRY);
41
+ const separator = platform === 'win32' ? ';' : ':';
42
+ // O residente roda pelo launchd/login do SO com PATH mínimo; ferramentas `#!/usr/bin/env node`
43
+ // (ex.: codex) e as do Homebrew precisam destes diretórios também nos filhos.
44
+ const searchDirs = [...new Set([...(env.PATH ?? env.Path ?? '').split(separator),
45
+ p.dirname(nodePath), p.join(home, '.local/bin'), ...(platform === 'darwin' ? ['/opt/homebrew/bin', '/usr/local/bin'] : [])])].filter(Boolean);
46
+ const commandEnv = { ...env, GESTAO_ENV: environment, [platform === 'win32' && env.Path !== undefined && env.PATH === undefined ? 'Path' : 'PATH']: searchDirs.join(separator) };
42
47
  const version = options.version ?? VERSION, now = options.now ?? Date.now;
43
48
  const announce = options.announce ?? console.log, confirm = options.confirm ?? ask;
44
49
  const readToken = options.readToken ?? lerToken;
@@ -55,8 +60,7 @@ export async function configurar(flags = [], options = {}) {
55
60
  }
56
61
  const json = file => { const text = read(file); return text === null ? null : JSON.parse(text); };
57
62
  function resolveCommand(tool) {
58
- const directories = [...new Set([...(env.PATH ?? env.Path ?? '').split(platform === 'win32' ? ';' : ':'),
59
- p.dirname(nodePath), p.join(home, '.local/bin'), ...(platform === 'darwin' ? ['/opt/homebrew/bin', '/usr/local/bin'] : [])])].filter(Boolean);
63
+ const directories = searchDirs;
60
64
  for (const directory of directories) {
61
65
  for (const ext of platform === 'win32' ? ['.exe', '.cmd'] : ['']) {
62
66
  const binary = p.join(directory, `${tool}${ext}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatflux-gestao-agente",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "type": "module",
5
5
  "description": "Opere o portal Gestão da ChatFlux pelo Claude Code, Claude Desktop ou qualquer harness MCP — com a sua identidade e o seu papel.",
6
6
  "keywords": [