iron-edge 2.22.0 → 2.23.1
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/installer/doctor.js +24 -4
- package/package.json +1 -1
package/installer/doctor.js
CHANGED
|
@@ -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 não entrou: rode ' + (IS_WIN ? 'claude.cmd' : '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'));
|
|
@@ -116,14 +130,19 @@ function checkAtalho(home, opts) {
|
|
|
116
130
|
}
|
|
117
131
|
|
|
118
132
|
function checkCofre(home) {
|
|
119
|
-
|
|
120
|
-
|
|
133
|
+
if (fs.existsSync(path.join(home, 'Iron Cofre', 'CLAUDE.md'))) return item(true, '~/Iron Cofre');
|
|
134
|
+
// quem aponta outro cofre no config.yaml tem cofre: nao e' falha
|
|
135
|
+
let apontado = null;
|
|
136
|
+
try { apontado = require('./cofre').cofreApontado(home); } catch (_) {}
|
|
137
|
+
if (apontado) return item(true, 'outro cofre, apontado no config');
|
|
138
|
+
return item(false, 'sem cofre pronto (rode ' + npxIron('install --cofre') + ')');
|
|
121
139
|
}
|
|
122
140
|
|
|
123
141
|
async function medir(opts) {
|
|
124
142
|
const o = opts || {};
|
|
125
143
|
const home = o.home || homeDir();
|
|
126
144
|
const claude = checkClaude();
|
|
145
|
+
const login = checkLogin(claude.bin);
|
|
127
146
|
const key = await checkKey(home, o.baseUrl);
|
|
128
147
|
const result = {
|
|
129
148
|
os: cut(process.platform + '-' + process.arch, 20),
|
|
@@ -132,6 +151,7 @@ async function medir(opts) {
|
|
|
132
151
|
node: checkNode(),
|
|
133
152
|
git: checkGit(),
|
|
134
153
|
claude: claude.check,
|
|
154
|
+
...(login ? { login } : {}),
|
|
135
155
|
iron_edge: checkIronEdge(home),
|
|
136
156
|
key: key.check,
|
|
137
157
|
plugin: checkPlugin(claude.bin),
|
|
@@ -164,7 +184,7 @@ async function enviar(result, key, baseUrl) {
|
|
|
164
184
|
}
|
|
165
185
|
}
|
|
166
186
|
|
|
167
|
-
const ROTULO = { node: 'Node', git: 'git', claude: 'Claude Code', iron_edge: 'Iron Edge', key: 'chave', plugin: 'plugin', cofre: 'cofre', atalho: 'atalho' };
|
|
187
|
+
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
188
|
const OBRIGATORIOS = ['node', 'git', 'claude', 'iron_edge'];
|
|
169
189
|
|
|
170
190
|
async function main(argv, opts) {
|
|
@@ -195,7 +215,7 @@ async function main(argv, opts) {
|
|
|
195
215
|
return exit;
|
|
196
216
|
}
|
|
197
217
|
|
|
198
|
-
module.exports = { medir, enviar, main, checkAtalho };
|
|
218
|
+
module.exports = { medir, enviar, main, checkAtalho, checkLogin };
|
|
199
219
|
|
|
200
220
|
if (require.main === module) {
|
|
201
221
|
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.
|
|
3
|
+
"version": "2.23.1",
|
|
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",
|