iron-edge 2.22.0 → 2.23.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.
@@ -62,6 +62,20 @@ function checkClaude() {
62
62
  return { bin, check: item(true, ((r.stdout || '').trim().split('\n')[0]) || 'instalado') };
63
63
  }
64
64
 
65
+ // Setup 04/11: o login no Claude. So' o booleano sai daqui: e-mail e organizacao do `auth status` nao entram no resultado.
66
+ // Versao antiga do Claude Code, sem esse comando, ou saida ilegivel: null, e o site mostra "nao conferido".
67
+ function checkLogin(claudeBin) {
68
+ if (!claudeBin) return null;
69
+ const r = run(claudeBin, ['auth', 'status']);
70
+ try {
71
+ const j = JSON.parse((r.stdout || '').trim());
72
+ if (typeof j.loggedIn !== 'boolean') return null;
73
+ return j.loggedIn ? item(true, 'entrou') : item(false, 'ainda nao entrou: rode claude e entre com a conta da assinatura');
74
+ } catch (_) {
75
+ return null;
76
+ }
77
+ }
78
+
65
79
  function checkIronEdge(home) {
66
80
  const man = path.join(home, '.iron', 'install-manifest.json');
67
81
  if (!fs.existsSync(man)) return item(false, 'não instalado pelo npm: rode ' + npxIron('install'));
@@ -124,6 +138,7 @@ async function medir(opts) {
124
138
  const o = opts || {};
125
139
  const home = o.home || homeDir();
126
140
  const claude = checkClaude();
141
+ const login = checkLogin(claude.bin);
127
142
  const key = await checkKey(home, o.baseUrl);
128
143
  const result = {
129
144
  os: cut(process.platform + '-' + process.arch, 20),
@@ -132,6 +147,7 @@ async function medir(opts) {
132
147
  node: checkNode(),
133
148
  git: checkGit(),
134
149
  claude: claude.check,
150
+ ...(login ? { login } : {}),
135
151
  iron_edge: checkIronEdge(home),
136
152
  key: key.check,
137
153
  plugin: checkPlugin(claude.bin),
@@ -164,7 +180,7 @@ async function enviar(result, key, baseUrl) {
164
180
  }
165
181
  }
166
182
 
167
- const ROTULO = { node: 'Node', git: 'git', claude: 'Claude Code', iron_edge: 'Iron Edge', key: 'chave', plugin: 'plugin', cofre: 'cofre', atalho: 'atalho' };
183
+ const ROTULO = { node: 'Node', git: 'git', claude: 'Claude Code', login: 'login no Claude', iron_edge: 'Iron Edge', key: 'chave', plugin: 'plugin', cofre: 'cofre', atalho: 'atalho' };
168
184
  const OBRIGATORIOS = ['node', 'git', 'claude', 'iron_edge'];
169
185
 
170
186
  async function main(argv, opts) {
@@ -195,7 +211,7 @@ async function main(argv, opts) {
195
211
  return exit;
196
212
  }
197
213
 
198
- module.exports = { medir, enviar, main, checkAtalho };
214
+ module.exports = { medir, enviar, main, checkAtalho, checkLogin };
199
215
 
200
216
  if (require.main === module) {
201
217
  main(process.argv.slice(2)).then(code => process.exit(code), err => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iron-edge",
3
- "version": "2.22.0",
3
+ "version": "2.23.0",
4
4
  "description": "Ecossistema de agentes para Claude Code: 44 agentes de topo, 18 squads e 23 skills, com quality gate, memoria, instalador que nunca sobrescreve o comando office (chat do Iron Office no dashboard; confere a chave com o site antes de abrir o Claude) e o doctor (mede a maquina e acende o Setup do site).",
5
5
  "keywords": [
6
6
  "claude",