@orkastery/cli 0.6.1 → 0.6.2
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/adapters/claude-code/agents/ork-check.md +1 -1
- package/adapters/claude-code/agents/ork-go.md +1 -1
- package/adapters/claude-code/agents/ork-goal.md +1 -1
- package/adapters/claude-code/agents/ork-master.md +1 -1
- package/adapters/claude-code/agents/ork-plan.md +1 -1
- package/adapters/claude-code/agents/ork-ship.md +1 -1
- package/adapters/claude-code/commands/ork.md +1 -1
- package/adapters/claude-code/mods/ork-torre/hooks/frases.ts +2 -0
- package/adapters/codex/skills/ork/SKILL.md +1 -1
- package/adapters/openclaw/openclaw.plugin.json +1 -1
- package/adapters/openclaw/package.json +1 -1
- package/assets/adapters-en/claude-code/agents/ork-check.md +1 -1
- package/assets/adapters-en/claude-code/agents/ork-go.md +1 -1
- package/assets/adapters-en/claude-code/agents/ork-goal.md +1 -1
- package/assets/adapters-en/claude-code/agents/ork-master.md +1 -1
- package/assets/adapters-en/claude-code/agents/ork-plan.md +1 -1
- package/assets/adapters-en/claude-code/agents/ork-ship.md +1 -1
- package/assets/adapters-en/claude-code/commands/ork.md +1 -1
- package/assets/adapters-en/codex/skills/ork/SKILL.md +1 -1
- package/assets/orkmind_fixture.py +4 -1
- package/assets/skills-en/core/orkastery-bootstrap/SKILL.md +1 -1
- package/assets/skills-en/phases/check-quality/SKILL.md +1 -1
- package/assets/skills-en/phases/go-implementation/SKILL.md +1 -1
- package/dist/adapters/claude-bg.js +3 -1
- package/dist/adapters/grok-mcp-servidor.js +22 -12
- package/dist/adapters/grok.js +1 -1
- package/dist/changelog-check.js +217 -0
- package/dist/check-agil.js +241 -5
- package/dist/ci.js +3 -2
- package/dist/claim-lint.js +29 -0
- package/dist/claims.js +4 -0
- package/dist/docs.js +7 -0
- package/dist/fila-pesada.js +121 -11
- package/dist/hitl-classificacao.js +1 -0
- package/dist/index.js +43 -25
- package/dist/intelligence-graph-cli.js +27 -9
- package/dist/locale-claims.js +16 -2
- package/dist/locale-grafo.js +56 -1
- package/dist/locale-maestro.js +38 -0
- package/dist/locale-network.js +8 -6
- package/dist/locale-onboarding.js +14 -0
- package/dist/locale-preflight.js +80 -0
- package/dist/locale-projetos.js +6 -0
- package/dist/locale-prompts.js +8 -8
- package/dist/locale-pulse.js +4 -0
- package/dist/locale-retry.js +16 -0
- package/dist/locale-security-scan.js +35 -1
- package/dist/locale-verify.js +15 -0
- package/dist/locale.js +24 -7
- package/dist/maestro-cli.js +12 -17
- package/dist/mcp-install.js +2 -1
- package/dist/mcp-server.js +20 -17
- package/dist/mcp-verify-async.js +353 -0
- package/dist/mcp-verify-worker.js +17 -0
- package/dist/mcp-verify.js +10 -1
- package/dist/pedido-conducao.js +51 -0
- package/dist/preflight.js +25 -26
- package/dist/prompts.js +4 -2
- package/dist/pulse.js +4 -2
- package/dist/rede.js +24 -12
- package/dist/retry.js +12 -0
- package/dist/security-scan/cli.js +2 -2
- package/dist/security-scan/report.js +1 -1
- package/dist/session-watcher.js +33 -7
- package/dist/verify.js +166 -34
- package/package.json +1 -1
- package/skills/core/orkastery-bootstrap/SKILL.md +1 -1
- package/skills/phases/check-quality/SKILL.md +1 -1
- package/skills/phases/go-implementation/SKILL.md +1 -1
package/dist/locale-prompts.js
CHANGED
|
@@ -31,15 +31,15 @@ exports.PROMPTS_PT_BR = {
|
|
|
31
31
|
'Passos irreversiveis (push, merge, delecao) so acontecem quando o modo autoriza.',
|
|
32
32
|
],
|
|
33
33
|
regraDasEsperas: 'Esperas: nunca dispare verify, build ou suite com `&` dentro do comando, porque o processo se perde e a sessao ' +
|
|
34
|
-
'espera um aviso que nunca vem;
|
|
35
|
-
'recursos pesados), ou use a execucao em segundo plano do host, que avisa quando termina; nunca espere com ' +
|
|
34
|
+
'espera um aviso que nunca vem; prefira `ork_verify` assíncrono e consulte `ork_verify_status` a cada 30–60 s; sem essa ' +
|
|
35
|
+
'ferramenta, rode o `ork verify` em primeiro plano, com `timeout` (ele espera a vez na fila de recursos pesados), ou use a execucao em segundo plano do host, que avisa quando termina; nunca espere com ' +
|
|
36
36
|
'`pgrep -f` cujo padrao aparece no proprio comando, porque o laco acha a si mesmo e nao termina: espere pelo ' +
|
|
37
37
|
'arquivo de saida com prazo, ou pelo PID guardado.',
|
|
38
38
|
fechoDoGo: (t) => [
|
|
39
39
|
'## Fecho obrigatório do GO',
|
|
40
40
|
'',
|
|
41
|
-
`Antes de encerrar o bloco com GO, rode \`ork verify ${t}\`
|
|
42
|
-
`
|
|
41
|
+
`Antes de encerrar o bloco com GO, use \`ork_verify\` e aguarde o veredito verde por \`ork_verify_status\`; sem a consulta assíncrona, rode \`ork verify ${t}\` em primeiro plano. Rode também o build declarado no manifesto em primeiro plano.`,
|
|
42
|
+
`Com o veredito verde, gere o bundle com \`ork ci prepare ${t}\`, faça o commit atômico final \`ci(${t}): bundle ...\` e siga para CHECK e SHIP conforme os gates.`,
|
|
43
43
|
`Grave \`.orkastery/threads/${t}/pr-body.md\` curto, no idioma do projeto, com o modo do CHECK da rodada (Agile Check ou Classic Check, da linha \`check\` do \`ork verify\`); ` +
|
|
44
44
|
'se o perfil não puder gravá-lo pelo transporte autorizado, devolva o corpo completo no resumo final.',
|
|
45
45
|
'O rito é idêntico em Claude Code e Codex. Ele fecha o GO, mas não autoriza SHIP, push, PR ou merge.',
|
|
@@ -125,14 +125,14 @@ exports.PROMPTS_EN = {
|
|
|
125
125
|
'Irreversible steps (push, merge, deletion) happen only when the mode authorizes them.',
|
|
126
126
|
],
|
|
127
127
|
regraDasEsperas: 'Waiting: never start verify, build, or a test suite with `&` inside the command; the process may be lost while the session ' +
|
|
128
|
-
'waits for a notice that never comes.
|
|
129
|
-
'or use the host background execution that reports completion. Never wait with `pgrep -f` when its pattern appears in the command itself; ' +
|
|
128
|
+
'waits for a notice that never comes. Prefer asynchronous `ork_verify` and query `ork_verify_status` every 30–60 seconds; without that ' +
|
|
129
|
+
'tool, run `ork verify` in the foreground with `timeout` (it waits for the heavy-resource queue), or use the host background execution that reports completion. Never wait with `pgrep -f` when its pattern appears in the command itself; ' +
|
|
130
130
|
'the loop finds itself and never ends. Wait for an output file with a deadline, or for a stored PID.',
|
|
131
131
|
fechoDoGo: (t) => [
|
|
132
132
|
'## Mandatory GO closing',
|
|
133
133
|
'',
|
|
134
|
-
`Before ending a block that includes GO, run \`ork verify ${t}\`
|
|
135
|
-
`
|
|
134
|
+
`Before ending a block that includes GO, use \`ork_verify\` and wait for its green verdict through \`ork_verify_status\`; without the asynchronous query, run \`ork verify ${t}\` in the foreground. Also run the manifest build in the foreground.`,
|
|
135
|
+
`After the green verdict, generate the bundle with \`ork ci prepare ${t}\`, make the final atomic commit \`ci(${t}): bundle ...\`, and continue to CHECK and SHIP as their gates allow.`,
|
|
136
136
|
`Write a short \`.orkastery/threads/${t}/pr-body.md\` in the project language, naming the CHECK mode of the round (Agile Check or Classic Check, from the \`check\` line of \`ork verify\`); ` +
|
|
137
137
|
'if the profile cannot write it through the authorized transport, return the full body in the final summary.',
|
|
138
138
|
'The ritual is identical in Claude Code and Codex. It closes GO, but it does not authorize SHIP, push, PR, or merge.',
|
package/dist/locale-pulse.js
CHANGED
|
@@ -192,7 +192,9 @@ exports.PULSE_PT_BR = {
|
|
|
192
192
|
'tree.blocked': 'a arvore de destino nao esta disponivel para o merge (branch em check-out com alteracao nao commitada, ou worktree que nao pode ser montada)',
|
|
193
193
|
'lease.busy': 'lease ocupado por outra thread',
|
|
194
194
|
'lease.resume-unavailable': 'retomada indisponivel; libere o lease explicitamente com --forcar',
|
|
195
|
+
'concurrency.lease-indeterminado': 'a vida do dono do lease nao pode ser provada deste host ou namespace; desconhecido nunca e orfao',
|
|
195
196
|
'conducao.em-andamento': 'outra conducao ja executa na worktree da thread (I-36): o pedido foi recusado com quem conduz e as tres acoes (esperar, acompanhar, assumir)',
|
|
197
|
+
'conducao.acao-necessaria': 'a sessao parou de proposito e deixou um comando exato para a conducao executar fora do sandbox',
|
|
196
198
|
'hitl.formato': 'o pedido HITL saiu fora do formato obrigatorio (pergunta em uma frase, de 3 a 5 alternativas rotuladas com consequencia, exatamente uma com o selo Recomendacao e o porque, corpo em lista; texto livre so com dependencia tecnica tipada)',
|
|
197
199
|
'human.pending': 'gate humano do modo de conducao ainda nao autorizou',
|
|
198
200
|
},
|
|
@@ -342,7 +344,9 @@ exports.PULSE_EN = {
|
|
|
342
344
|
'tree.blocked': 'the target tree is not available for the merge (branch checked out with uncommitted changes, or a worktree that cannot be set up)',
|
|
343
345
|
'lease.busy': 'lease held by another thread',
|
|
344
346
|
'lease.resume-unavailable': 'resume unavailable; release the lease explicitly with `--forcar`',
|
|
347
|
+
'concurrency.lease-indeterminado': 'the lease owner life cannot be proven from this host or namespace; unknown is never orphaned',
|
|
345
348
|
'conducao.em-andamento': 'another conduction already runs on the thread worktree (I-36): the request was refused with who conducts and the three actions (wait, follow, take over)',
|
|
349
|
+
'conducao.acao-necessaria': 'the session stopped on purpose and left an exact command for the conductor to run outside the sandbox',
|
|
346
350
|
'hitl.formato': 'the HITL request came out of the required format (question in one sentence, 3 to 5 labeled alternatives with a consequence each, exactly one with the Recommendation seal and the reason, body as a list; free text only with a typed technical dependency)',
|
|
347
351
|
'human.pending': 'the human gate of the conduction mode has not authorized yet',
|
|
348
352
|
},
|
package/dist/locale-retry.js
CHANGED
|
@@ -107,10 +107,18 @@ exports.RETRY_PT_BR = {
|
|
|
107
107
|
porque: 'o lease e de outra thread e vai ser liberado: a fila ja serializa, entao a acao e tentar de novo quando chegar a vez, nunca furar a fila',
|
|
108
108
|
correcao: 'ork lease list mostra a fila; a vez chega sem ninguem forcar',
|
|
109
109
|
},
|
|
110
|
+
'concurrency.lease-indeterminado': {
|
|
111
|
+
porque: 'o sandbox nao conseguiu provar se o dono do lease esta vivo ou morto: ausencia de PID visivel nao prova orfandade, e reexecutar poderia abrir duas operacoes pesadas',
|
|
112
|
+
correcao: 'espere com --esperar; se a observacao continuar inconclusiva, execute pela conducao o comando exato do pedido aberto',
|
|
113
|
+
},
|
|
110
114
|
'conducao.em-andamento': {
|
|
111
115
|
porque: 'outra conducao executa na mesma worktree agora: a vez chega quando ela terminar, e furar a fila e o incidente de 19/09/2026',
|
|
112
116
|
correcao: 'ork conducao status <thread> mostra quem conduz; repita o pedido com --esperar <min> para seguir sozinho quando liberar',
|
|
113
117
|
},
|
|
118
|
+
'conducao.acao-necessaria': {
|
|
119
|
+
porque: 'a sessao parou de proposito porque a proxima operacao exige a autoridade da conducao; reexecutar a fase antes desse comando so repete a mesma parada',
|
|
120
|
+
correcao: 'execute o comando exato do pedido no canal da conducao; depois retome a mesma fase',
|
|
121
|
+
},
|
|
114
122
|
'hitl.formato': {
|
|
115
123
|
porque: 'o pedido HITL saiu fora do formato obrigatorio: quem errou foi o emissor, e a correcao e reemitir com alternativas rotuladas, consequencia por alternativa e exatamente uma recomendada com o porque',
|
|
116
124
|
correcao: 'ork fix open <thread> abre a rodada com a spec exata do formato',
|
|
@@ -386,10 +394,18 @@ exports.RETRY_EN = {
|
|
|
386
394
|
porque: 'the lease belongs to another thread and will be released: the queue already serializes, so the action is to try again when the turn comes, never to jump the queue',
|
|
387
395
|
correcao: '`ork lease list` shows the queue; the turn comes with nobody forcing it',
|
|
388
396
|
},
|
|
397
|
+
'concurrency.lease-indeterminado': {
|
|
398
|
+
porque: 'the sandbox could not prove whether the lease owner is alive or dead: an invisible PID does not prove orphanhood, and rerunning could open two heavy operations',
|
|
399
|
+
correcao: 'wait with `--esperar`; if observation stays inconclusive, run the exact command from the open request through the conductor',
|
|
400
|
+
},
|
|
389
401
|
'conducao.em-andamento': {
|
|
390
402
|
porque: 'another conduction runs on the same worktree now: the turn comes when it finishes, and jumping the queue is the 2026-09-19 incident',
|
|
391
403
|
correcao: '`ork conducao status <thread>` shows who conducts; repeat the request with `--esperar <min>` to go on by itself when it frees up',
|
|
392
404
|
},
|
|
405
|
+
'conducao.acao-necessaria': {
|
|
406
|
+
porque: 'the session stopped on purpose because the next operation needs conductor authority; rerunning the phase before that command only repeats the same stop',
|
|
407
|
+
correcao: 'run the exact request command in the conductor channel; then resume the same phase',
|
|
408
|
+
},
|
|
393
409
|
'hitl.formato': {
|
|
394
410
|
porque: 'the HITL request came out of the required format: the issuer made the mistake, and the fix is to issue it again with labeled alternatives, a consequence per alternative and exactly one recommended, with the reason',
|
|
395
411
|
correcao: '`ork fix open <thread>` opens the round with the exact format spec',
|
|
@@ -2,15 +2,47 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* The `securityScan` family of the message catalog: `ork security-scan` output (stdout summary, `report.md`) and its
|
|
4
4
|
* usage error. pt-BR is the source; English is typed by it. No import from the core. Values that are data (tool names,
|
|
5
|
-
* states, reasons, rule ids, paths)
|
|
5
|
+
* states, reasons, rule ids, paths) remain unchanged in report.json. The human render translates the known reason
|
|
6
|
+
* vocabulary without rewriting the stored data.
|
|
6
7
|
*/
|
|
7
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
9
|
exports.SECURITY_SCAN_EN = exports.SECURITY_SCAN_PT_BR = void 0;
|
|
10
|
+
const motivoEmPtBR = (reason) => {
|
|
11
|
+
const exact = new Map([
|
|
12
|
+
['not in the catalog', 'não está no catálogo'], ['unbalanced JSON', 'JSON desbalanceado'],
|
|
13
|
+
['truncated JSON', 'JSON truncado'], ['empty stream', 'fluxo vazio'], ['invalid JSON', 'JSON inválido'],
|
|
14
|
+
['expected a JSON array', 'era esperado um array JSON'], ['expected a JSON object', 'era esperado um objeto JSON'],
|
|
15
|
+
['unreadable output', 'saída ilegível'], ['commit-range-unresolved', 'intervalo de commits não resolvido'],
|
|
16
|
+
['timeout', 'tempo esgotado'], ['no-requirements-file', 'nenhum arquivo requirements'],
|
|
17
|
+
['zero-commits-scanned', 'nenhum commit varrido'], ['disabled', 'desabilitada'], ['unsupported-ci', 'CI não suportada'],
|
|
18
|
+
]);
|
|
19
|
+
const conhecida = exact.get(reason);
|
|
20
|
+
if (conhecida !== undefined)
|
|
21
|
+
return conhecida;
|
|
22
|
+
return reason
|
|
23
|
+
.replace(/not in the catalog/g, 'não está no catálogo')
|
|
24
|
+
.replace(/unbalanced JSON/g, 'JSON desbalanceado')
|
|
25
|
+
.replace(/truncated JSON/g, 'JSON truncado')
|
|
26
|
+
.replace(/empty stream/g, 'fluxo vazio')
|
|
27
|
+
.replace(/invalid JSON/g, 'JSON inválido')
|
|
28
|
+
.replace(/expected a JSON array/g, 'era esperado um array JSON')
|
|
29
|
+
.replace(/expected a JSON object/g, 'era esperado um objeto JSON')
|
|
30
|
+
.replace(/unexpected "([^"]+)" outside a JSON value/g, '"$1" inesperado fora de um valor JSON')
|
|
31
|
+
.replace(/missing key "([^"]+)"/g, 'chave "$1" ausente')
|
|
32
|
+
.replace(/tool reported "([^"]+)"/g, 'a ferramenta relatou "$1"')
|
|
33
|
+
.replace(/must be a list of strings/g, 'deve ser uma lista de strings')
|
|
34
|
+
.replace(/expected an object/g, 'era esperado um objeto')
|
|
35
|
+
.replace(/expected a list/g, 'era esperada uma lista')
|
|
36
|
+
.replace(/\(no fingerprint\)/g, '(sem fingerprint)')
|
|
37
|
+
.replace(/missing-output/g, 'saída-ausente');
|
|
38
|
+
};
|
|
9
39
|
exports.SECURITY_SCAN_PT_BR = {
|
|
10
40
|
usage: 'uso: ork security-scan [--base <ref>] [--json] [--check classic|agile]',
|
|
11
41
|
// RM-072 (D9): o modo da varredura aceita so os dois valores.
|
|
12
42
|
checkInvalido: (valor) => `--check inválido: ${valor === null ? '(sem valor)' : JSON.stringify(valor)} (aceitos: classic, agile)`,
|
|
13
43
|
unknownFlag: (flag) => `opção desconhecida: ${flag}`,
|
|
44
|
+
error: (message) => motivoEmPtBR(message),
|
|
45
|
+
reason: (reason) => motivoEmPtBR(reason),
|
|
14
46
|
// report.md
|
|
15
47
|
title: 'Varredura de segurança',
|
|
16
48
|
headBase: (head, base) => `HEAD \`${head.slice(0, 12)}\`, base \`${base ? base.slice(0, 12) : '(não resolvida)'}\``,
|
|
@@ -42,6 +74,8 @@ exports.SECURITY_SCAN_EN = {
|
|
|
42
74
|
usage: 'usage: ork security-scan [--base <ref>] [--json] [--check classic|agile]',
|
|
43
75
|
checkInvalido: (valor) => `invalid --check: ${valor === null ? '(no value)' : JSON.stringify(valor)} (accepted: classic, agile)`,
|
|
44
76
|
unknownFlag: (flag) => `unknown option: ${flag}`,
|
|
77
|
+
error: (message) => message,
|
|
78
|
+
reason: (reason) => reason,
|
|
45
79
|
title: 'Security scan',
|
|
46
80
|
headBase: (head, base) => `HEAD \`${head.slice(0, 12)}\`, base \`${base ? base.slice(0, 12) : '(unresolved)'}\``,
|
|
47
81
|
generatedAt: (iso) => `Generated at ${iso}`,
|
package/dist/locale-verify.js
CHANGED
|
@@ -82,6 +82,14 @@ exports.VERIFY_PT_BR = {
|
|
|
82
82
|
semVeredito: (nomes) => `Sem veredito por tempo (nao e reprovacao: prazo estourado ou relogio sob steal): ${nomes}`,
|
|
83
83
|
// Classificacao e veredito
|
|
84
84
|
classificacao: (regressoes, preExistentes, semBaseline) => `Classificacao: ${regressoes} regressao(oes), ${preExistentes} pre-existente(s), ${semBaseline} falha(s) sem baseline`,
|
|
85
|
+
comparacaoPorTeste: (comando, regressoes, preExistentes, corrigidos) => `Comparacao teste a teste (${comando}): ${regressoes} regressao(oes), ${preExistentes} pre-existente(s), ` +
|
|
86
|
+
`${corrigidos} corrigido(s)`,
|
|
87
|
+
testeRegressao: (nome) => ` regressao ${nome}`,
|
|
88
|
+
testePreExistente: (nome) => ` pre-existente ${nome}`,
|
|
89
|
+
testeCorrigido: (nome) => ` corrigido ${nome}`,
|
|
90
|
+
comparacaoPorComando: (comando, classificacao, motivo) => `Comparacao somente por comando (${comando}): ${classificacao}; ${motivo === 'baseline-sem-nomes'
|
|
91
|
+
? 'a baseline nao guardou nomes de testes' : 'a rodada atual nao informou nomes de testes'}. ` +
|
|
92
|
+
'Nenhuma contagem de regressoes por teste foi calculada.',
|
|
85
93
|
regressao: (nome, comando) => ` regressao ${nome}: ${comando}`,
|
|
86
94
|
preExistente: (nome, comando) => ` pre-existente ${nome}: ${comando}`,
|
|
87
95
|
falhaSemBaseline: (nome, comando) => ` sem baseline ${nome}: ${comando}`,
|
|
@@ -171,6 +179,13 @@ exports.VERIFY_EN = {
|
|
|
171
179
|
falhou: (code) => `FAILED (exit ${code})`,
|
|
172
180
|
semVeredito: (nomes) => `No verdict for lack of time (not a failure: deadline exceeded or clock under steal): ${nomes}`,
|
|
173
181
|
classificacao: (regressoes, preExistentes, semBaseline) => `Classification: ${regressoes} regression(s), ${preExistentes} pre-existing, ${semBaseline} failure(s) without a baseline`,
|
|
182
|
+
comparacaoPorTeste: (comando, regressoes, preExistentes, corrigidos) => `Test-by-test comparison (${comando}): ${regressoes} regression(s), ${preExistentes} pre-existing, ${corrigidos} fixed`,
|
|
183
|
+
testeRegressao: (nome) => ` regression ${nome}`,
|
|
184
|
+
testePreExistente: (nome) => ` pre-existing ${nome}`,
|
|
185
|
+
testeCorrigido: (nome) => ` fixed ${nome}`,
|
|
186
|
+
comparacaoPorComando: (comando, classificacao, motivo) => `Command-only comparison (${comando}): ${classificacao === 'regressao' ? 'regression' : classificacao === 'pre-existente'
|
|
187
|
+
? 'pre-existing' : 'fixed'}; ${motivo === 'baseline-sem-nomes' ? 'the baseline did not store test names'
|
|
188
|
+
: 'the current run did not report test names'}. No per-test regression count was calculated.`,
|
|
174
189
|
regressao: (nome, comando) => ` regression ${nome}: ${comando}`,
|
|
175
190
|
preExistente: (nome, comando) => ` pre-existing ${nome}: ${comando}`,
|
|
176
191
|
falhaSemBaseline: (nome, comando) => ` no baseline ${nome}: ${comando}`,
|
package/dist/locale.js
CHANGED
|
@@ -108,22 +108,25 @@ const locale_operacao_restante_1 = require("./locale-operacao-restante");
|
|
|
108
108
|
const locale_conducao_1 = require("./locale-conducao");
|
|
109
109
|
const locale_grafo_1 = require("./locale-grafo");
|
|
110
110
|
const locale_audit_1 = require("./locale-audit");
|
|
111
|
+
const locale_preflight_1 = require("./locale-preflight");
|
|
112
|
+
const locale_maestro_1 = require("./locale-maestro");
|
|
111
113
|
exports.LOCALE_PADRAO = 'pt-BR';
|
|
112
114
|
/**
|
|
113
115
|
* Comandos cujo texto ja sai pelo catalogo, por `comando` ou por `comando subcomando`; `comando ?` e o
|
|
114
116
|
* subcomando desconhecido (o erro de uso e do proprio comando). Os demais seguem em pt-BR. Ficam de
|
|
115
|
-
* fora por decisao (D2 da F2a): `
|
|
116
|
-
* `experiencia uninstall`. A F2b (G3) acrescenta `verify` (com `--baseline`),
|
|
117
|
+
* fora por decisao (D2 da F2a): `thread new --from-finding`. A F3e acrescenta `doctor --modo`,
|
|
118
|
+
* `onboarding sync` e `experiencia uninstall`. A F2b (G3) acrescenta `verify` (com `--baseline`),
|
|
117
119
|
* `ship`, `ship registrar-pr`, `retry plan`, `retry run`, `master` (o indice), `master aceitar-omissao` e
|
|
118
120
|
* `master pedir`, `pulse` (sem `responder` nem `cadencia`) e `roadmap status`. A F3a (D5) acrescenta `docs init`, e a
|
|
119
121
|
* F3b (D1), o resto da lista do dono; a F3c completa `decisao registrar` e `network roadmap`. O conhecimento escrito
|
|
120
122
|
* (RM-026 K7, fatia 2) nasce coberto: `conhecimento listar|mostrar|colecoes|verificar` e o uso errado dele.
|
|
121
123
|
*/
|
|
122
124
|
exports.COMANDOS_COM_LOCALE = ['doctor', 'init', 'onboarding show', 'onboarding set', 'onboarding reset',
|
|
123
|
-
'onboarding ?', 'experiencia show', 'experiencia ?', 'thread new', 'thread status', 'thread ?',
|
|
125
|
+
'onboarding sync', 'onboarding ?', 'experiencia show', 'experiencia uninstall', 'experiencia ?', 'thread new', 'thread status', 'thread ?',
|
|
124
126
|
'phase list', 'phase run', 'phase ?', 'verify', 'ship', 'ship registrar-pr', 'retry plan', 'retry run',
|
|
125
127
|
'retry policy', 'retry parse', 'retry list', 'retry resume', 'retry cancel', 'retry ?',
|
|
126
|
-
'master', 'master <thread>', 'master aceitar-omissao', 'master pedir', 'master
|
|
128
|
+
'master', 'master <thread>', 'master aceitar-omissao', 'master pedir', 'master audit', 'master digest', 'master migrar',
|
|
129
|
+
'master classes', 'master ratificar', 'master batch', 'master propor',
|
|
127
130
|
'pulse', 'roadmap status', 'docs init',
|
|
128
131
|
// F3b (D1): o resto do CLI, na ordem do pedido.
|
|
129
132
|
'thread list', 'thread close', 'thread entrega', 'worktree ensure', 'worktree sync', 'worktree audit', 'worktree release', 'worktree ?',
|
|
@@ -151,7 +154,7 @@ exports.COMANDOS_COM_LOCALE = ['doctor', 'init', 'onboarding show', 'onboarding
|
|
|
151
154
|
'orquestracao status', 'orquestracao ?', 'monitor', 'licoes', 'demo',
|
|
152
155
|
'fabrica list', 'fabrica publicar', 'fabrica entrar', 'fabrica sair', 'fabrica batida', 'fabrica ?', 'eval',
|
|
153
156
|
'memory status', 'memory inventory', 'memory migrate', 'memory sync', 'memory search', 'memory index', 'memory ?',
|
|
154
|
-
'mcp install', 'conducao status', 'conducao assumir', 'conducao atualizar', 'conducao autorizar',
|
|
157
|
+
'mcp install', 'mcp serve', 'mcp ?', 'brain', 'activation', 'conducao status', 'conducao assumir', 'conducao atualizar', 'conducao autorizar',
|
|
155
158
|
'conducao autorizacao', 'conducao batida', 'conducao sentinela', 'conducao ?', 'grafo',
|
|
156
159
|
'audit packs', 'audit pack', 'audit lint', 'audit run', 'audit list', 'audit show', 'audit prompt',
|
|
157
160
|
'audit ingest', 'audit finding', 'audit achado', 'audit verify', 'audit report', 'audit relatorio',
|
|
@@ -226,8 +229,6 @@ function chaveDoMaster(bruto, opcoes) {
|
|
|
226
229
|
function cobreLocale(posicionais, opcoes) {
|
|
227
230
|
if (opcoes.json !== undefined)
|
|
228
231
|
return false;
|
|
229
|
-
if (posicionais[0] === 'doctor' && opcoes.modo !== undefined)
|
|
230
|
-
return false;
|
|
231
232
|
return exports.COMANDOS_COM_LOCALE.includes(chaveDoLocale(posicionais, opcoes));
|
|
232
233
|
}
|
|
233
234
|
/** `en_US.UTF-8`, `en-GB`, `en` viram `en`; `pt_BR.UTF-8`, `pt` viram pt-BR; o resto, undefined. */
|
|
@@ -293,7 +294,14 @@ const PT_BR = {
|
|
|
293
294
|
subcomandoDesconhecido: (comando, sub) => `subcomando desconhecido: ${comando} ${sub}`,
|
|
294
295
|
/** `exigirManifesto` fora de um projeto: o primeiro erro de quem chega (D14). */
|
|
295
296
|
manifestoNaoEncontrado: (nome, dir) => `manifesto ${nome} nao encontrado a partir de ${dir}. Rode: ork init`,
|
|
297
|
+
receiptVerifiersUso: 'uso: ork receipt-verifiers --json',
|
|
298
|
+
activationUso: 'uso: ork activation plan|status|enable|disable',
|
|
299
|
+
masterDigestUso: 'uso: ork master digest <enviar|preview|responder>',
|
|
300
|
+
masterRatificarUso: 'resposta deve ser ratificar <thread> <assinatura> <classe>',
|
|
301
|
+
masterSelecaoUso: 'seleção deve ser thread:assinatura',
|
|
296
302
|
},
|
|
303
|
+
preflight: locale_preflight_1.PREFLIGHT_PT_BR,
|
|
304
|
+
maestro: locale_maestro_1.MAESTRO_PT_BR,
|
|
297
305
|
horario: {
|
|
298
306
|
brasilia: 'horário de Brasília',
|
|
299
307
|
legendaBrasilia: 'Horários de Brasília.',
|
|
@@ -307,6 +315,7 @@ const PT_BR = {
|
|
|
307
315
|
},
|
|
308
316
|
doctor: {
|
|
309
317
|
titulo: 'ork doctor: o que vale nesta maquina agora',
|
|
318
|
+
modoUso: (modos) => `uso: ork doctor --modo ${modos}`,
|
|
310
319
|
correcao: 'correcao',
|
|
311
320
|
bloqueado: (falhas, avisos) => `Veredito: BLOQUEADO (${falhas} fail, ${avisos} warn). Corrija os itens acima antes de despachar fase.`,
|
|
312
321
|
pronto: (avisos) => `Veredito: PRONTO (${avisos} warn). Despacho de fase liberado por \`ork phase run\`.`,
|
|
@@ -731,7 +740,14 @@ const EN = {
|
|
|
731
740
|
erro: (mensagem) => `error: ${mensagem}`,
|
|
732
741
|
subcomandoDesconhecido: (comando, sub) => sub === undefined ? `missing subcommand: ${comando}` : `unknown subcommand: ${comando} ${sub}`,
|
|
733
742
|
manifestoNaoEncontrado: (nome, dir) => `\`${nome}\` not found in ${dir} or any parent directory; run \`ork init\` first.`,
|
|
743
|
+
receiptVerifiersUso: 'usage: ork receipt-verifiers --json',
|
|
744
|
+
activationUso: 'usage: ork activation plan|status|enable|disable',
|
|
745
|
+
masterDigestUso: 'usage: ork master digest <enviar|preview|responder>',
|
|
746
|
+
masterRatificarUso: 'the response must be ratificar <thread> <signature> <class>',
|
|
747
|
+
masterSelecaoUso: 'the selection must be thread:signature',
|
|
734
748
|
},
|
|
749
|
+
preflight: locale_preflight_1.PREFLIGHT_EN,
|
|
750
|
+
maestro: locale_maestro_1.MAESTRO_EN,
|
|
735
751
|
horario: {
|
|
736
752
|
brasilia: 'Brasília time',
|
|
737
753
|
legendaBrasilia: 'Times in Brasília time.',
|
|
@@ -744,6 +760,7 @@ const EN = {
|
|
|
744
760
|
},
|
|
745
761
|
doctor: {
|
|
746
762
|
titulo: 'ork doctor: what holds on this machine now',
|
|
763
|
+
modoUso: (modes) => `usage: ork doctor --modo ${modes}`,
|
|
747
764
|
correcao: 'fix',
|
|
748
765
|
bloqueado: (falhas, avisos) => `Verdict: BLOCKED (${falhas} fail, ${avisos} warn). Fix the items above before dispatching a phase.`,
|
|
749
766
|
pronto: (avisos) => `Verdict: READY (${avisos} warn). Phase dispatch allowed through \`ork phase run\`.`,
|
package/dist/maestro-cli.js
CHANGED
|
@@ -10,6 +10,7 @@ const maestro_sources_1 = require("./maestro-sources");
|
|
|
10
10
|
const maestro_actions_1 = require("./maestro-actions");
|
|
11
11
|
const maestro_runtime_1 = require("./maestro-runtime");
|
|
12
12
|
const horario_1 = require("./horario");
|
|
13
|
+
const locale_maestro_1 = require("./locale-maestro");
|
|
13
14
|
function readMaestro(context, options) {
|
|
14
15
|
const observations = options.native && options.threadId ? (0, maestro_runtime_1.nativeForThread)(context.root, options.threadId) : [];
|
|
15
16
|
return (0, maestro_snapshot_1.maestroSnapshot)(context, { ...options, collect: ctx => {
|
|
@@ -31,31 +32,25 @@ function readMaestro(context, options) {
|
|
|
31
32
|
return sources;
|
|
32
33
|
} });
|
|
33
34
|
}
|
|
34
|
-
|
|
35
|
-
const ORIGEM_DO_PANORAMA = Object.freeze({
|
|
36
|
-
installation: 'fixado na instalação', cwd: 'pelo diretório atual', worktree: 'pela worktree da thread',
|
|
37
|
-
selection: 'pedido explicitamente (--projeto ou ORK_PROJETO)',
|
|
38
|
-
});
|
|
39
|
-
function maestroText(snapshot) {
|
|
35
|
+
function maestroText(snapshot, textos = locale_maestro_1.MAESTRO_PT_BR) {
|
|
40
36
|
const p = snapshot.project;
|
|
41
|
-
return [
|
|
37
|
+
return [textos.titulo(p.name),
|
|
42
38
|
// I-35: o snapshot guarda ISO; o texto ao dono diz quando consultou, no fuso dele.
|
|
43
|
-
|
|
39
|
+
textos.consulta((0, horario_1.formatarDataHoraRotulada)(snapshot.observedAt, { agora: snapshot.observedAt })),
|
|
44
40
|
// RM-052: qual cópia foi lida e o que o panorama não lê, antes de qualquer seção.
|
|
45
|
-
|
|
46
|
-
...(snapshot.notConsulted?.length ? [
|
|
41
|
+
textos.projeto(p.name, p.root ?? '', p.remote === null ? textos.semRemoto : p.remote, textos.origem[p.origin]),
|
|
42
|
+
...(snapshot.notConsulted?.length ? [textos.naoLido(snapshot.notConsulted.join(' · '))] : []),
|
|
47
43
|
...maestro_contract_1.SECTION_NAMES.map(name => {
|
|
48
44
|
const s = snapshot.sections[name];
|
|
49
|
-
return
|
|
45
|
+
return textos.secao(name, s.state, s.coverage.returned, s.coverage.total, !!s.coverage.omitted);
|
|
50
46
|
}),
|
|
51
|
-
...snapshot.sections.threads.items.slice(0, 8).map(t =>
|
|
52
|
-
|
|
53
|
-
'Use ork maestro --json para cobertura e ações; --thread ID consulta o detalhe nativo.',
|
|
47
|
+
...snapshot.sections.threads.items.slice(0, 8).map(t => textos.thread(t.title, String(t.facts.phase), t.status)),
|
|
48
|
+
textos.recomendacao(snapshot.conflicts.length, snapshot.gaps.length), textos.final,
|
|
54
49
|
].join('\n');
|
|
55
50
|
}
|
|
56
|
-
function runMaestroCli(argv, cwd = process.cwd(), trusted = {}, io = { out: (v) => console.log(v), err: (v) => console.error(v) }) {
|
|
51
|
+
function runMaestroCli(argv, cwd = process.cwd(), trusted = {}, io = { out: (v) => console.log(v), err: (v) => console.error(v) }, textos = locale_maestro_1.MAESTRO_PT_BR) {
|
|
57
52
|
if (argv.length === 1 && argv[0] === '--help') {
|
|
58
|
-
io.out(
|
|
53
|
+
io.out(textos.help);
|
|
59
54
|
return 0;
|
|
60
55
|
}
|
|
61
56
|
try {
|
|
@@ -94,7 +89,7 @@ function runMaestroCli(argv, cwd = process.cwd(), trusted = {}, io = { out: (v)
|
|
|
94
89
|
const context = (0, maestro_discovery_1.discoverMaestro)({ cwd, ...trusted });
|
|
95
90
|
const snapshot = readMaestro(context, { threadId, offsets: section ? { [section]: offset } : undefined, native: true,
|
|
96
91
|
host: { tools: ['ork_thread_status', 'ork_observe', 'ork_git_status'], child: false } });
|
|
97
|
-
io.out(json ? JSON.stringify(snapshot) : maestroText(snapshot));
|
|
92
|
+
io.out(json ? JSON.stringify(snapshot) : maestroText(snapshot, textos));
|
|
98
93
|
return 0;
|
|
99
94
|
}
|
|
100
95
|
catch (e) {
|
package/dist/mcp-install.js
CHANGED
|
@@ -55,7 +55,8 @@ const IMPRESSAO_SSH = /^SHA256:[A-Za-z0-9+/]{43}$/;
|
|
|
55
55
|
exports.TOOLS_DONO_CODEX = ['ork_thread_new', 'ork_phase_run', 'ork_request_decision'];
|
|
56
56
|
// RM-037 (rm037defeito, defeito 1): a decisao autonoma da sessao entra com as outras mutacoes do filho;
|
|
57
57
|
// sem o grant, o codex com approval_policy never recusaria a chamada.
|
|
58
|
-
exports.TOOLS_FILHO_CODEX = ['ork_artifact_write', 'ork_claim_add', 'ork_decision_record', '
|
|
58
|
+
exports.TOOLS_FILHO_CODEX = ['ork_artifact_write', 'ork_claim_add', 'ork_decision_record', 'ork_request_conduction',
|
|
59
|
+
'ork_git_commit', 'ork_verify', 'ork_verify_status', 'ork_ship'];
|
|
59
60
|
// Brain mutation tools are deliberately excluded from the existing opt-in bundle.
|
|
60
61
|
// A native integration must request exact startup grants plus scoped activation.
|
|
61
62
|
var company_brain_mcp_1 = require("./company-brain-mcp");
|
package/dist/mcp-server.js
CHANGED
|
@@ -70,9 +70,7 @@ const preflight_1 = require("./preflight");
|
|
|
70
70
|
const modos_1 = require("./modos");
|
|
71
71
|
const mcp_noctum_1 = require("./mcp-noctum");
|
|
72
72
|
const versao_1 = require("./versao");
|
|
73
|
-
const mcp_verify_1 = require("./mcp-verify");
|
|
74
73
|
const conducao_1 = require("./conducao");
|
|
75
|
-
const fila_pesada_1 = require("./fila-pesada");
|
|
76
74
|
const decisao_autonoma_1 = require("./decisao-autonoma");
|
|
77
75
|
const conducao_texto_1 = require("./conducao-texto");
|
|
78
76
|
const mcp_ship_1 = require("./mcp-ship");
|
|
@@ -87,6 +85,7 @@ const mcp_experiencia_1 = require("./mcp-experiencia");
|
|
|
87
85
|
const mcp_grafo_1 = require("./mcp-grafo");
|
|
88
86
|
const mcp_conhecimento_1 = require("./mcp-conhecimento");
|
|
89
87
|
const locale_1 = require("./locale");
|
|
88
|
+
const pedido_conducao_1 = require("./pedido-conducao");
|
|
90
89
|
const identidade = zod_1.z.string().min(1).max(80).regex(/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/);
|
|
91
90
|
const daThread = zod_1.z.object({ threadId: identidade }).strict();
|
|
92
91
|
const daDecisao = daThread.extend({ pedidoId: identidade }).strict();
|
|
@@ -456,23 +455,20 @@ function criarServidorMcp(opcoes) {
|
|
|
456
455
|
const r = await (0, mcp_ship_1.shipMcp)(perfilShip, args, extra.signal);
|
|
457
456
|
return { ...resposta(r), ...(r.ok ? {} : { isError: true }) };
|
|
458
457
|
});
|
|
459
|
-
registrarTool('ork_verify', { description: '
|
|
458
|
+
registrarTool('ork_verify', { description: 'Inicia uma rodada assíncrona do verify canônico no processo do servidor, vinculada à thread e ao despacho. Devolve imediatamente o UUID; repetir enquanto viva reutiliza a rodada.',
|
|
460
459
|
inputSchema: daThread, annotations: { readOnlyHint: false, destructiveHint: false } }, async ({ threadId }) => {
|
|
461
460
|
thread(threadId);
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
return { ...resposta(e.recusa), isError: true };
|
|
474
|
-
throw e;
|
|
475
|
-
}
|
|
461
|
+
const { iniciarVerifyMcp } = await Promise.resolve().then(() => __importStar(require('./mcp-verify-async')));
|
|
462
|
+
const r = iniciarVerifyMcp(raiz, threadId, { host: opcoes.host, despacho: opcoes.dispatchId ?? null });
|
|
463
|
+
return { ...resposta(r), ...(r.estado === 'falhou' ? { isError: true } : {}) };
|
|
464
|
+
});
|
|
465
|
+
registrarTool('ork_verify_status', { description: 'Consulta uma rodada assíncrona do verify por UUID: na fila, rodando com a lane atual, concluída com o veredito completo do CLI ou falha tipada. Não inicia nem duplica rodada.',
|
|
466
|
+
inputSchema: daThread.extend({ rodadaId: zod_1.z.string().uuid() }).strict(), annotations: { readOnlyHint: true, destructiveHint: false } }, async ({ threadId, rodadaId }) => {
|
|
467
|
+
thread(threadId);
|
|
468
|
+
const { consultarVerifyMcp } = await Promise.resolve().then(() => __importStar(require('./mcp-verify-async')));
|
|
469
|
+
const r = consultarVerifyMcp(raiz, threadId, rodadaId);
|
|
470
|
+
const reprovou = r.estado === 'falhou' || (r.estado === 'concluido' && r.veredito?.ok === false);
|
|
471
|
+
return { ...resposta(r), ...(reprovou ? { isError: true } : {}) };
|
|
476
472
|
});
|
|
477
473
|
registrarTool('ork_git_commit', { description: 'Commita somente paths com claims e HEAD esperado na worktree da thread. Recusa hooks/filtros ativos; preserva configuracao. Commit local nao e SHIP.',
|
|
478
474
|
inputSchema: daThread.extend({ expectedHead: zod_1.z.string().regex(/^[a-f0-9]{40}$/),
|
|
@@ -649,6 +645,13 @@ function criarServidorMcp(opcoes) {
|
|
|
649
645
|
});
|
|
650
646
|
if (opcoes.threadId && opcoes.dispatchId) {
|
|
651
647
|
const despacho = opcoes.dispatchId;
|
|
648
|
+
registrarTool('ork_request_conduction', { description: 'Registra um pedido tipado desta sessao para a conducao, com comando ork exato. Nao executa o comando, nao aprova gate e nao responde pelo dono.',
|
|
649
|
+
inputSchema: daThread.extend({ motivo: zod_1.z.enum(pedido_conducao_1.MOTIVOS_DE_PEDIDO_A_CONDUCAO), detalhe: zod_1.z.string().trim().min(1).max(2000),
|
|
650
|
+
comando: zod_1.z.string().trim().min(1).max(1000) }).strict(),
|
|
651
|
+
annotations: { readOnlyHint: false, destructiveHint: false } }, async ({ threadId, motivo, detalhe, comando }) => {
|
|
652
|
+
thread(threadId);
|
|
653
|
+
return resposta((0, pedido_conducao_1.registrarPedidoAConducao)(raiz, threadId, { despacho, motivo, detalhe, comando, host: opcoes.host }));
|
|
654
|
+
});
|
|
652
655
|
registrarTool('ork_session_inbox', { description: 'Lado receptor do Mensageiro de Sessoes na sessao de fase deste despacho: confere e reserva uma vez a resposta do dono que chegou de outra sessao (conferir, com o prazo ate) e, depois de ela entrar na fila, grava o recibo (confirmar). A sessao sai do despacho deste servidor, nunca de argumento. Nao responde nem aprova pedido.',
|
|
653
656
|
inputSchema: daThread.extend({ operacao: zod_1.z.enum(['conferir', 'confirmar']), texto: zod_1.z.string().max(entrega_por_mod_1.LIMITE_DA_MENSAGEM),
|
|
654
657
|
envioId: zod_1.z.string().uuid().optional(), ate: zod_1.z.string().max(40).optional() }).strict(),
|