@orkastery/cli 0.6.1 → 0.6.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/adapters/claude-code/README.md +1 -1
- 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/hermes/README.md +1 -1
- package/adapters/openclaw/openclaw.plugin.json +1 -1
- package/adapters/openclaw/package.json +1 -1
- package/assets/adapters-en/claude-code/README.md +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/adapters-en/hermes/README.md +1 -1
- package/assets/docs/padroes/roadmap-de-produto.md +1 -1
- package/assets/docs-en/padroes/roadmap-de-produto.md +1 -1
- package/assets/orkmind_fixture.py +4 -1
- package/assets/references-en/testing-patterns.md +1 -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/agendador-cpu.js +10 -2
- package/dist/catalogo.js +3 -3
- package/dist/{canarios-hitl.js → cenarios-hitl.js} +7 -7
- package/dist/{canarios-i43.js → cenarios-i43.js} +16 -16
- package/dist/{canarios-pulse.js → cenarios-pulse.js} +3 -3
- package/dist/{canarios-rm057.js → cenarios-rm057.js} +3 -3
- package/dist/{canarios-sensores.js → cenarios-sensores.js} +5 -5
- package/dist/{canarios.js → cenarios.js} +22 -22
- package/dist/changelog-check.js +217 -0
- package/dist/check-agil.js +242 -5
- package/dist/check-paralelo.js +17 -4
- package/dist/ci.js +3 -2
- package/dist/claim-lint.js +29 -0
- package/dist/claims.js +5 -1
- package/dist/docs.js +8 -1
- package/dist/evalrunner.js +37 -37
- package/dist/fila-pesada.js +121 -11
- package/dist/hitl-canais.js +1 -1
- package/dist/hitl-classificacao.js +1 -0
- package/dist/hitl-presentation.js +1 -1
- package/dist/hitl-tempo-parado.js +1 -1
- package/dist/index.js +47 -29
- package/dist/init.js +1 -1
- package/dist/intelligence-graph-cli.js +27 -9
- package/dist/locale-ajuda.js +6 -6
- 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-operacao-restante.js +18 -18
- 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/sandbox.js +11 -11
- 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/eval/README.md +8 -8
- package/eval/fixtures/fx-codex-dry/caso.json +1 -1
- package/eval/fixtures/fx-happy/caso.json +1 -1
- package/eval/fixtures/fx-indice-reversao/caso.json +1 -1
- package/eval/fixtures/fx-listagem-abertas/caso.json +1 -1
- package/eval/fixtures/fx-omnicanal/caso.json +1 -1
- package/eval/fixtures/fx-pedido-colado/caso.json +1 -1
- package/eval/fixtures/fx-schema-drift/caso.json +1 -1
- package/package.json +1 -1
- package/references/testing-patterns.md +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
|
@@ -144,7 +144,7 @@ resultado contém o SHA do HEAD confirmado no Git. O comando recebido nunca é e
|
|
|
144
144
|
|
|
145
145
|
Teste de integração isolado: `npm --prefix core run build && npm --prefix core run build:test && node --test core/dist-test/test/claude-sensors.test.js`.
|
|
146
146
|
|
|
147
|
-
O
|
|
147
|
+
O cenário `node core/dist/index.js eval --so-cenarios --cenario fx-sensores-runtime`
|
|
148
148
|
integra hook, CLI, supervisor e watcher em um repositório temporário. Seus eventos Codex
|
|
149
149
|
são sintéticos; a saída identifica esse limite e mede ingestão, morte e duplicatas.
|
|
150
150
|
|
|
@@ -27,7 +27,7 @@ ork phase list <thread> # o que ja aconteceu, com evidencia
|
|
|
27
27
|
|
|
28
28
|
- O modo de conducao afrouxa a PAUSA, nunca a VERIFICACAO.
|
|
29
29
|
- Nada de self-report: toda alegacao vem com o comando que a comprova e a saida real.
|
|
30
|
-
- Esperas: nunca dispare verify, build ou suite com `&` dentro do comando, porque o processo se perde e a sessao espera um aviso que nunca vem; 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 `pgrep -f` cujo padrao aparece no proprio comando, porque o laco acha a si mesmo e nao termina: espere pelo arquivo de saida com prazo, ou pelo PID guardado.
|
|
30
|
+
- Esperas: nunca dispare verify, build ou suite com `&` dentro do comando, porque o processo se perde e a sessao espera um aviso que nunca vem; prefira `ork_verify` assíncrono e consulte `ork_verify_status` a cada 30–60 s; sem essa 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 `pgrep -f` cujo padrao aparece no proprio comando, porque o laco acha a si mesmo e nao termina: espere pelo arquivo de saida com prazo, ou pelo PID guardado.
|
|
31
31
|
- Passo irreversivel (push, merge, delecao) so acontece quando o modo autoriza, e a autorizacao
|
|
32
32
|
fica registrada no ledger.
|
|
33
33
|
- Termine dizendo, em uma linha, em que ponto a thread esta e o que acontece agora.
|
|
@@ -27,7 +27,7 @@ ork phase list <thread> # o que ja aconteceu, com evidencia
|
|
|
27
27
|
|
|
28
28
|
- O modo de conducao afrouxa a PAUSA, nunca a VERIFICACAO.
|
|
29
29
|
- Nada de self-report: toda alegacao vem com o comando que a comprova e a saida real.
|
|
30
|
-
- Esperas: nunca dispare verify, build ou suite com `&` dentro do comando, porque o processo se perde e a sessao espera um aviso que nunca vem; 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 `pgrep -f` cujo padrao aparece no proprio comando, porque o laco acha a si mesmo e nao termina: espere pelo arquivo de saida com prazo, ou pelo PID guardado.
|
|
30
|
+
- Esperas: nunca dispare verify, build ou suite com `&` dentro do comando, porque o processo se perde e a sessao espera um aviso que nunca vem; prefira `ork_verify` assíncrono e consulte `ork_verify_status` a cada 30–60 s; sem essa 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 `pgrep -f` cujo padrao aparece no proprio comando, porque o laco acha a si mesmo e nao termina: espere pelo arquivo de saida com prazo, ou pelo PID guardado.
|
|
31
31
|
- Passo irreversivel (push, merge, delecao) so acontece quando o modo autoriza, e a autorizacao
|
|
32
32
|
fica registrada no ledger.
|
|
33
33
|
- Termine dizendo, em uma linha, em que ponto a thread esta e o que acontece agora.
|
|
@@ -28,7 +28,7 @@ ork phase list <thread> # o que ja aconteceu, com evidencia
|
|
|
28
28
|
|
|
29
29
|
- O modo de conducao afrouxa a PAUSA, nunca a VERIFICACAO.
|
|
30
30
|
- Nada de self-report: toda alegacao vem com o comando que a comprova e a saida real.
|
|
31
|
-
- Esperas: nunca dispare verify, build ou suite com `&` dentro do comando, porque o processo se perde e a sessao espera um aviso que nunca vem; 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 `pgrep -f` cujo padrao aparece no proprio comando, porque o laco acha a si mesmo e nao termina: espere pelo arquivo de saida com prazo, ou pelo PID guardado.
|
|
31
|
+
- Esperas: nunca dispare verify, build ou suite com `&` dentro do comando, porque o processo se perde e a sessao espera um aviso que nunca vem; prefira `ork_verify` assíncrono e consulte `ork_verify_status` a cada 30–60 s; sem essa 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 `pgrep -f` cujo padrao aparece no proprio comando, porque o laco acha a si mesmo e nao termina: espere pelo arquivo de saida com prazo, ou pelo PID guardado.
|
|
32
32
|
- Passo irreversivel (push, merge, delecao) so acontece quando o modo autoriza, e a autorizacao
|
|
33
33
|
fica registrada no ledger.
|
|
34
34
|
- Termine dizendo, em uma linha, em que ponto a thread esta e o que acontece agora.
|
|
@@ -29,7 +29,7 @@ ork phase list <thread> # o que ja aconteceu, com evidencia
|
|
|
29
29
|
|
|
30
30
|
- O modo de conducao afrouxa a PAUSA, nunca a VERIFICACAO.
|
|
31
31
|
- Nada de self-report: toda alegacao vem com o comando que a comprova e a saida real.
|
|
32
|
-
- Esperas: nunca dispare verify, build ou suite com `&` dentro do comando, porque o processo se perde e a sessao espera um aviso que nunca vem; 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 `pgrep -f` cujo padrao aparece no proprio comando, porque o laco acha a si mesmo e nao termina: espere pelo arquivo de saida com prazo, ou pelo PID guardado.
|
|
32
|
+
- Esperas: nunca dispare verify, build ou suite com `&` dentro do comando, porque o processo se perde e a sessao espera um aviso que nunca vem; prefira `ork_verify` assíncrono e consulte `ork_verify_status` a cada 30–60 s; sem essa 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 `pgrep -f` cujo padrao aparece no proprio comando, porque o laco acha a si mesmo e nao termina: espere pelo arquivo de saida com prazo, ou pelo PID guardado.
|
|
33
33
|
- Passo irreversivel (push, merge, delecao) so acontece quando o modo autoriza, e a autorizacao
|
|
34
34
|
fica registrada no ledger.
|
|
35
35
|
- Termine dizendo, em uma linha, em que ponto a thread esta e o que acontece agora.
|
|
@@ -27,7 +27,7 @@ ork phase list <thread> # o que ja aconteceu, com evidencia
|
|
|
27
27
|
|
|
28
28
|
- O modo de conducao afrouxa a PAUSA, nunca a VERIFICACAO.
|
|
29
29
|
- Nada de self-report: toda alegacao vem com o comando que a comprova e a saida real.
|
|
30
|
-
- Esperas: nunca dispare verify, build ou suite com `&` dentro do comando, porque o processo se perde e a sessao espera um aviso que nunca vem; 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 `pgrep -f` cujo padrao aparece no proprio comando, porque o laco acha a si mesmo e nao termina: espere pelo arquivo de saida com prazo, ou pelo PID guardado.
|
|
30
|
+
- Esperas: nunca dispare verify, build ou suite com `&` dentro do comando, porque o processo se perde e a sessao espera um aviso que nunca vem; prefira `ork_verify` assíncrono e consulte `ork_verify_status` a cada 30–60 s; sem essa 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 `pgrep -f` cujo padrao aparece no proprio comando, porque o laco acha a si mesmo e nao termina: espere pelo arquivo de saida com prazo, ou pelo PID guardado.
|
|
31
31
|
- Passo irreversivel (push, merge, delecao) so acontece quando o modo autoriza, e a autorizacao
|
|
32
32
|
fica registrada no ledger.
|
|
33
33
|
- Termine dizendo, em uma linha, em que ponto a thread esta e o que acontece agora.
|
|
@@ -27,7 +27,7 @@ ork phase list <thread> # o que ja aconteceu, com evidencia
|
|
|
27
27
|
|
|
28
28
|
- O modo de conducao afrouxa a PAUSA, nunca a VERIFICACAO.
|
|
29
29
|
- Nada de self-report: toda alegacao vem com o comando que a comprova e a saida real.
|
|
30
|
-
- Esperas: nunca dispare verify, build ou suite com `&` dentro do comando, porque o processo se perde e a sessao espera um aviso que nunca vem; 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 `pgrep -f` cujo padrao aparece no proprio comando, porque o laco acha a si mesmo e nao termina: espere pelo arquivo de saida com prazo, ou pelo PID guardado.
|
|
30
|
+
- Esperas: nunca dispare verify, build ou suite com `&` dentro do comando, porque o processo se perde e a sessao espera um aviso que nunca vem; prefira `ork_verify` assíncrono e consulte `ork_verify_status` a cada 30–60 s; sem essa 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 `pgrep -f` cujo padrao aparece no proprio comando, porque o laco acha a si mesmo e nao termina: espere pelo arquivo de saida com prazo, ou pelo PID guardado.
|
|
31
31
|
- Passo irreversivel (push, merge, delecao) so acontece quando o modo autoriza, e a autorizacao
|
|
32
32
|
fica registrada no ledger.
|
|
33
33
|
- Termine dizendo, em uma linha, em que ponto a thread esta e o que acontece agora.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Reconhece orkastery maestro e conduz pedidos, retomadas e status na conversa com o Maestro/Builder.
|
|
3
3
|
argument-hint: "[pedido em linguagem natural|thread|status|board|plan|doctor|modos]"
|
|
4
|
-
allowed-tools: Bash(ork:*), Read, mcp__orkastery__ork_thread_status, mcp__orkastery__ork_phase_list, mcp__orkastery__ork_hitl_pending, mcp__orkastery__ork_observe, mcp__orkastery__ork_artifact_read, mcp__orkastery__ork_claims_list, mcp__orkastery__ork_git_status, mcp__orkastery__ork_thread_new, mcp__orkastery__ork_phase_run, mcp__orkastery__ork_preflight
|
|
4
|
+
allowed-tools: Bash(ork:*), Read, mcp__orkastery__ork_thread_status, mcp__orkastery__ork_phase_list, mcp__orkastery__ork_hitl_pending, mcp__orkastery__ork_observe, mcp__orkastery__ork_artifact_read, mcp__orkastery__ork_claims_list, mcp__orkastery__ork_verify_status, mcp__orkastery__ork_git_status, mcp__orkastery__ork_thread_new, mcp__orkastery__ork_phase_run, mcp__orkastery__ork_preflight
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# /orkastery:ork
|
|
@@ -7,6 +7,8 @@ export const FRASE_DO_MOTIVO: Readonly<Record<string, string>> = {
|
|
|
7
7
|
'artifact.missing': 'falta um artefato que a fase exige',
|
|
8
8
|
'claims.failed': 'uma claim reprovou no HEAD',
|
|
9
9
|
'claims.unverifiable': 'há claim sem comando de verificação',
|
|
10
|
+
'concurrency.lease-indeterminado': 'não foi possível provar se a vaga está livre',
|
|
11
|
+
'conducao.acao-necessaria': 'a condução precisa executar uma ação',
|
|
10
12
|
'policy.violation': 'uma policy de bloqueio foi violada',
|
|
11
13
|
'runtime.autoconferencia': 'o CHECK caiu no mesmo runtime do GO',
|
|
12
14
|
'verify.regression': 'um teste que passava na baseline caiu',
|
|
@@ -44,7 +44,7 @@ O dono conversa sobre o objetivo; voce opera o nucleo `ork` e apresenta o result
|
|
|
44
44
|
passo. Preserve o modo e as autorizacoes da thread. Se ja recebeu uma fase do Orkastery,
|
|
45
45
|
execute essa fase no escopo recebido, sem redespachar a si mesmo.
|
|
46
46
|
|
|
47
|
-
- Esperas: nunca dispare verify, build ou suite com `&` dentro do comando, porque o processo se perde e a sessao espera um aviso que nunca vem; 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 `pgrep -f` cujo padrao aparece no proprio comando, porque o laco acha a si mesmo e nao termina: espere pelo arquivo de saida com prazo, ou pelo PID guardado.
|
|
47
|
+
- Esperas: nunca dispare verify, build ou suite com `&` dentro do comando, porque o processo se perde e a sessao espera um aviso que nunca vem; prefira `ork_verify` assíncrono e consulte `ork_verify_status` a cada 30–60 s; sem essa 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 `pgrep -f` cujo padrao aparece no proprio comando, porque o laco acha a si mesmo e nao termina: espere pelo arquivo de saida com prazo, ou pelo PID guardado.
|
|
48
48
|
|
|
49
49
|
Quando descobertas, prefira as ferramentas MCP vinculadas ao projeto pelo servidor:
|
|
50
50
|
`ork_thread_status`, `ork_phase_list`, `ork_hitl_pending`, `ork_thread_new(nome, modo)`,
|
|
@@ -176,7 +176,7 @@ Verificação: `python3 -m unittest discover -s adapters/hermes/test -p conducao
|
|
|
176
176
|
|
|
177
177
|
O gateway autenticado entrega o update original por stdin a `bin/ork-hitl-answer.py ork_gate_answer <thread> <pedido>` ou `ork_session_answer`. Configure `ORK_BIN`, `ORK_HITL_TELEGRAM_USERS` e `ORK_HITL_TELEGRAM_CHATS` com os ids permitidos. Responda ao alerta que contém a linha `ork-hitl <thread> <pedido>`; botões usam `ork:<thread>:<pedido>:<número>`. O transporte recusa bots, chat/usuário não autorizado e resposta sem correlação. O núcleo decide sobre prazo, modo e validade do pedido.
|
|
178
178
|
|
|
179
|
-
O script deve receber eventos diretamente do gateway, cuja autenticação do Telegram é a fronteira de confiança. JSON criado por um agente não é evidência humana. O
|
|
179
|
+
O script deve receber eventos diretamente do gateway, cuja autenticação do Telegram é a fronteira de confiança. JSON criado por um agente não é evidência humana. O cenário usa um transporte controlado; ele não mede a rede Telegram real. Para aposentar `ork-watchdog-5min`, desative o job no agendador do host e guarde o recibo; nenhum watchdog deve chamar aprovação em nome do builder.
|
|
180
180
|
|
|
181
181
|
Verificação: `python3 -m unittest discover -s adapters/hermes/test -p hitl_answer_test.py -v`.
|
|
182
182
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "orkastery",
|
|
3
3
|
"name": "Orkastery",
|
|
4
4
|
"description": "Conducao de looping threads em 6 fases pelo nucleo `ork`, exposta ao OpenClaw como tools `ork_*`. Zero regra de negocio no host: cada tool e uma chamada de CLI. Toda tool de projeto aceita projeto (nome do projeto pedido); o cwd do gateway nunca escolhe o projeto. O status do roadmap vem de ork_network_roadmap; as maquinas da pessoa, de ork_network_status (sem projeto).",
|
|
5
|
-
"version": "0.6.
|
|
5
|
+
"version": "0.6.3",
|
|
6
6
|
"configSchema": {
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orkastery/openclaw-plugin",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "Plugin Orkastery para OpenClaw: 32 tools ork_* que traduzem intencao em chamada de CLI do nucleo `ork`. Zero regra de negocio no host.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": true,
|
|
@@ -144,7 +144,7 @@ result contains the HEAD SHA confirmed in Git. The received command is never exe
|
|
|
144
144
|
|
|
145
145
|
Isolated integration test: `npm --prefix core run build && npm --prefix core run build:test && node --test core/dist-test/test/claude-sensors.test.js`.
|
|
146
146
|
|
|
147
|
-
The
|
|
147
|
+
The scenario `node core/dist/index.js eval --so-cenarios --cenario fx-sensores-runtime`
|
|
148
148
|
integrates hook, CLI, supervisor and watcher in a temporary repository. Its Codex events
|
|
149
149
|
are synthetic; the output states that limit and measures ingestion, death and duplicates.
|
|
150
150
|
|
|
@@ -27,7 +27,7 @@ ork phase list <thread> # o que ja aconteceu, com evidencia
|
|
|
27
27
|
|
|
28
28
|
- The conduction mode loosens the PAUSE, never the VERIFICATION.
|
|
29
29
|
- No self-report: every statement comes with the command that proves it and the real output.
|
|
30
|
-
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
30
|
+
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; prefer asynchronous `ork_verify` and query `ork_verify_status` every 30–60 s; without it, run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
31
31
|
- An irreversible step (push, merge, deletion) only happens when the mode authorizes it, and the authorization
|
|
32
32
|
is recorded in the ledger.
|
|
33
33
|
- End by saying, in one line, where the thread stands and what happens now.
|
|
@@ -27,7 +27,7 @@ ork phase list <thread> # o que ja aconteceu, com evidencia
|
|
|
27
27
|
|
|
28
28
|
- The conduction mode loosens the PAUSE, never the VERIFICATION.
|
|
29
29
|
- No self-report: every statement comes with the command that proves it and the real output.
|
|
30
|
-
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
30
|
+
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; prefer asynchronous `ork_verify` and query `ork_verify_status` every 30–60 s; without it, run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
31
31
|
- An irreversible step (push, merge, deletion) only happens when the mode authorizes it, and the authorization
|
|
32
32
|
is recorded in the ledger.
|
|
33
33
|
- End by saying, in one line, where the thread stands and what happens now.
|
|
@@ -28,7 +28,7 @@ ork phase list <thread> # o que ja aconteceu, com evidencia
|
|
|
28
28
|
|
|
29
29
|
- The conduction mode loosens the PAUSE, never the VERIFICATION.
|
|
30
30
|
- No self-report: every statement comes with the command that proves it and the real output.
|
|
31
|
-
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
31
|
+
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; prefer asynchronous `ork_verify` and query `ork_verify_status` every 30–60 s; without it, run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
32
32
|
- An irreversible step (push, merge, deletion) only happens when the mode authorizes it, and the authorization
|
|
33
33
|
is recorded in the ledger.
|
|
34
34
|
- End by saying, in one line, where the thread stands and what happens now.
|
|
@@ -29,7 +29,7 @@ ork phase list <thread> # o que ja aconteceu, com evidencia
|
|
|
29
29
|
|
|
30
30
|
- The conduction mode loosens the PAUSE, never the VERIFICATION.
|
|
31
31
|
- No self-report: every statement comes with the command that proves it and the real output.
|
|
32
|
-
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
32
|
+
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; prefer asynchronous `ork_verify` and query `ork_verify_status` every 30–60 s; without it, run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
33
33
|
- An irreversible step (push, merge, deletion) only happens when the mode authorizes it, and the authorization
|
|
34
34
|
is recorded in the ledger.
|
|
35
35
|
- End by saying, in one line, where the thread stands and what happens now.
|
|
@@ -27,7 +27,7 @@ ork phase list <thread> # o que ja aconteceu, com evidencia
|
|
|
27
27
|
|
|
28
28
|
- The conduction mode loosens the PAUSE, never the VERIFICATION.
|
|
29
29
|
- No self-report: every statement comes with the command that proves it and the real output.
|
|
30
|
-
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
30
|
+
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; prefer asynchronous `ork_verify` and query `ork_verify_status` every 30–60 s; without it, run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
31
31
|
- An irreversible step (push, merge, deletion) only happens when the mode authorizes it, and the authorization
|
|
32
32
|
is recorded in the ledger.
|
|
33
33
|
- End by saying, in one line, where the thread stands and what happens now.
|
|
@@ -27,7 +27,7 @@ ork phase list <thread> # o que ja aconteceu, com evidencia
|
|
|
27
27
|
|
|
28
28
|
- The conduction mode loosens the PAUSE, never the VERIFICATION.
|
|
29
29
|
- No self-report: every statement comes with the command that proves it and the real output.
|
|
30
|
-
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
30
|
+
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; prefer asynchronous `ork_verify` and query `ork_verify_status` every 30–60 s; without it, run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
31
31
|
- An irreversible step (push, merge, deletion) only happens when the mode authorizes it, and the authorization
|
|
32
32
|
is recorded in the ledger.
|
|
33
33
|
- End by saying, in one line, where the thread stands and what happens now.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Recognizes orkastery maestro and conducts requests, resumptions and status in the conversation with the Maestro/Builder.
|
|
3
3
|
argument-hint: "[natural-language request|thread|status|board|plan|doctor|modos]"
|
|
4
|
-
allowed-tools: Bash(ork:*), Read, mcp__orkastery__ork_thread_status, mcp__orkastery__ork_phase_list, mcp__orkastery__ork_hitl_pending, mcp__orkastery__ork_observe, mcp__orkastery__ork_artifact_read, mcp__orkastery__ork_claims_list, mcp__orkastery__ork_git_status, mcp__orkastery__ork_thread_new, mcp__orkastery__ork_phase_run, mcp__orkastery__ork_preflight
|
|
4
|
+
allowed-tools: Bash(ork:*), Read, mcp__orkastery__ork_thread_status, mcp__orkastery__ork_phase_list, mcp__orkastery__ork_hitl_pending, mcp__orkastery__ork_observe, mcp__orkastery__ork_artifact_read, mcp__orkastery__ork_claims_list, mcp__orkastery__ork_verify_status, mcp__orkastery__ork_git_status, mcp__orkastery__ork_thread_new, mcp__orkastery__ork_phase_run, mcp__orkastery__ork_preflight
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# /orkastery:ork
|
|
@@ -44,7 +44,7 @@ The owner talks about the goal; you operate the `ork` core and present the resul
|
|
|
44
44
|
step. Preserve the thread's mode and authorizations. If you already received an Orkastery phase,
|
|
45
45
|
run that phase within the received scope, without redispatching yourself.
|
|
46
46
|
|
|
47
|
-
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
47
|
+
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; prefer asynchronous `ork_verify` and query `ork_verify_status` every 30–60 s; without it, run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
48
48
|
|
|
49
49
|
When discovered, prefer the MCP tools bound to the project by the server:
|
|
50
50
|
`ork_thread_status`, `ork_phase_list`, `ork_hitl_pending`, `ork_thread_new(nome, modo)`,
|
|
@@ -176,7 +176,7 @@ Verification: `python3 -m unittest discover -s adapters/hermes/test -p conducao_
|
|
|
176
176
|
|
|
177
177
|
The authenticated gateway delivers the original update over stdin to `bin/ork-hitl-answer.py ork_gate_answer <thread> <pedido>` or `ork_session_answer`. Set `ORK_BIN`, `ORK_HITL_TELEGRAM_USERS` and `ORK_HITL_TELEGRAM_CHATS` to the allowed ids. Reply to the alert that contains the line `ork-hitl <thread> <pedido>`; buttons use `ork:<thread>:<pedido>:<número>`. The transport refuses bots, an unauthorized chat/user and an answer without correlation. The core decides on the deadline, the mode and the validity of the request.
|
|
178
178
|
|
|
179
|
-
The script must receive events directly from the gateway, whose Telegram authentication is the trust boundary. JSON created by an agent is not human evidence. The
|
|
179
|
+
The script must receive events directly from the gateway, whose Telegram authentication is the trust boundary. JSON created by an agent is not human evidence. The scenario uses a controlled transport; it does not measure the real Telegram network. To retire `ork-watchdog-5min`, disable the job in the host scheduler and keep the receipt; no watchdog may call an approval on the builder's behalf.
|
|
180
180
|
|
|
181
181
|
Verification: `python3 -m unittest discover -s adapters/hermes/test -p hitl_answer_test.py -v`.
|
|
182
182
|
|
|
@@ -56,7 +56,7 @@ Não use um único campo para ocultar diferenças entre plano, código e entrega
|
|
|
56
56
|
| Código | `Não iniciado`, `Branch criada`, `PR aberto`, `Mesclado` | Repositório, branch/PR e commit. |
|
|
57
57
|
| Testes | `Não iniciados`, `Em execução`, `Aprovados`, `Falhando` | Execução e data; cobertura, se relevante. |
|
|
58
58
|
| Deploy | `Não implantado`, `Dev`, `Staging`, `Produção` | Pipeline, release e data efetiva. |
|
|
59
|
-
| Exposição | `Flag desligada`, `Piloto/
|
|
59
|
+
| Exposição | `Flag desligada`, `Piloto/Gradual`, `Parcial`, `Geral` | Configuração por ambiente/coorte e verificação. |
|
|
60
60
|
| Habilitação | `Pendente`, `Em andamento`, `Concluída` | Comunicação, treinamento ou material publicado. |
|
|
61
61
|
|
|
62
62
|
`Bloqueado` exige motivo, dependência, responsável e próxima revisão. `Concluído` exige critérios de aceite cumpridos, evidência de disponibilidade e registro de medição inicial ou plano de avaliação pós-lançamento. O status não deve ser atualizado por mera passagem do tempo.
|
|
@@ -58,7 +58,7 @@ Do not use a single field to hide differences between plan, code and delivery. U
|
|
|
58
58
|
| Code | `Não iniciado` (not started), `Branch criada` (branch created), `PR aberto` (PR open), `Mesclado` (merged) | Repository, branch/PR and commit. |
|
|
59
59
|
| Tests | `Não iniciados` (not started), `Em execução` (running), `Aprovados` (passing), `Falhando` (failing) | Run and date; coverage, if relevant. |
|
|
60
60
|
| Deploy | `Não implantado` (not deployed), `Dev`, `Staging`, `Produção` (production) | Pipeline, release and actual date. |
|
|
61
|
-
| Exposure | `Flag desligada` (flag off), `Piloto/
|
|
61
|
+
| Exposure | `Flag desligada` (flag off), `Piloto/Gradual` (pilot/gradual), `Parcial` (partial), `Geral` (general) | Configuration per environment/cohort and verification. |
|
|
62
62
|
| Enablement | `Pendente` (pending), `Em andamento` (in progress), `Concluída` (done) | Communication, training or published material. |
|
|
63
63
|
|
|
64
64
|
`Bloqueado` requires a reason, a dependency, an owner and a next review. `Concluído` requires met acceptance criteria, evidence of availability and a record of the initial measurement or a post-launch evaluation plan. Status must not be updated merely because time has passed.
|
|
@@ -4,6 +4,7 @@ import os
|
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
import re
|
|
6
6
|
import stat
|
|
7
|
+
import tempfile
|
|
7
8
|
import time
|
|
8
9
|
|
|
9
10
|
|
|
@@ -11,8 +12,10 @@ def receipt_file(filename):
|
|
|
11
12
|
try:
|
|
12
13
|
path = Path(filename)
|
|
13
14
|
root = path.parent
|
|
15
|
+
temp_root = Path(tempfile.gettempdir()).resolve()
|
|
14
16
|
if (not path.is_absolute() or not re.fullmatch(r'receipt(?:-[a-f0-9]+)?\.json', path.name)
|
|
15
|
-
or
|
|
17
|
+
or root.parent != temp_root
|
|
18
|
+
or not re.fullmatch(r'ork-prospective-fixture-[a-zA-Z0-9-]+', root.name)
|
|
16
19
|
or root.resolve() != root or root.is_symlink()):
|
|
17
20
|
raise ValueError()
|
|
18
21
|
st = root.stat()
|
|
@@ -33,7 +33,7 @@ flowchart LR
|
|
|
33
33
|
| 6 | The suite runs on the real HEAD, in the thread's working directory. A pass reported by an agent is not a pass. | `ork verify <thread>` re-runs the manifest commands and the claims, and stamps the real commit. |
|
|
34
34
|
| 7 | No test was disabled, marked to skip or loosened to close the delivery. Skipping a test is a recorded scope change, never a silent course correction. | Diff over the test files, looking for removed tests, `skip` and relaxed assertions. |
|
|
35
35
|
| 8 | No assertion was swapped for the value the code produces today without someone saying why the right value changed. Adjusting the expected to the observed is the most common way to turn a defect into a contract. | Diff of the assertions against the intent declared in the PLAN. |
|
|
36
|
-
| 9 | A test does not depend on the network, on a paid credential or on the wall clock. A deterministic fixture is the standard; whatever needs the outside world stays out of the gate and is declared. | Run the suite offline. In `ork`, the `ork eval`
|
|
36
|
+
| 9 | A test does not depend on the network, on a paid credential or on the wall clock. A deterministic fixture is the standard; whatever needs the outside world stays out of the gate and is declared. | Run the suite offline. In `ork`, the `ork eval` scenarios build a temporary git repository and do not touch the network. |
|
|
37
37
|
| 10 | A test does not depend on another test or on the execution order. State shared between cases is a defect, even when the suite is green today. | Run the suspect case in shuffled order or in isolation. |
|
|
38
38
|
|
|
39
39
|
## Count and coverage
|
|
@@ -21,7 +21,7 @@ Distinguish the context before acting:
|
|
|
21
21
|
- **Conductor session:** receives the owner's request, identifies or opens the thread, dispatches through `ork` and tracks the result; never writes product code in place of the dispatched session.
|
|
22
22
|
- **Already dispatched phase session:** has received the thread, phase, prompt and worktree from `ork`.
|
|
23
23
|
Work within that scope through the phase skill. Do not open another thread or redispatch your own phase to do the work already assigned to you.
|
|
24
|
-
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
24
|
+
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; prefer asynchronous `ork_verify` and query `ork_verify_status` every 30–60 s; without it, run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
25
25
|
|
|
26
26
|
## Start or resume
|
|
27
27
|
|
|
@@ -23,7 +23,7 @@ ork worktree audit <thread> # a worktree confere no proprio git
|
|
|
23
23
|
ork gate request <thread> # o pedido da pausa; o humano responde pelo canal autenticado
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
26
|
+
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; prefer asynchronous `ork_verify` and query `ork_verify_status` every 30–60 s; without it, run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
27
27
|
|
|
28
28
|
When the verdict is PRECISA DE MUDANCA, the GO-FIX / CHECK-REVERIFY sub-loop of block B3 is
|
|
29
29
|
what conducts the way back, and it does not depend on a human until the final verdict:
|
|
@@ -24,7 +24,7 @@ ork claims add <thread> <arquivo> --claim "<...>" --verificar "<comando>" --fase
|
|
|
24
24
|
ork verify <thread> # reexecuta no HEAD real
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
27
|
+
- Waits: never start verify, build or the suite with `&` inside the command, because the process gets lost and the session waits for a notice that never comes; prefer asynchronous `ork_verify` and query `ork_verify_status` every 30–60 s; without it, run `ork verify` in the foreground, with `timeout` (it waits its turn in the heavy-resource queue), or use the host's background execution, which tells you when it finishes; never wait with `pgrep -f` whose pattern shows up in the command itself, because the loop finds itself and never ends: wait for the output file with a deadline, or for the saved PID.
|
|
28
28
|
|
|
29
29
|
## What GO delivers
|
|
30
30
|
|
|
@@ -111,11 +111,13 @@ exports.CONSULTAS_MCP = [
|
|
|
111
111
|
'mcp__orkastery__ork_observe',
|
|
112
112
|
'mcp__orkastery__ork_artifact_read',
|
|
113
113
|
'mcp__orkastery__ork_claims_list',
|
|
114
|
+
'mcp__orkastery__ork_verify_status',
|
|
114
115
|
];
|
|
115
116
|
// RM-037 (defeito 1): a decisao autonoma pelo MCP tem o mesmo grant nos dois runtimes.
|
|
116
117
|
exports.MUTACOES_WORKTREE = [
|
|
117
118
|
'mcp__orkastery__ork_artifact_write', 'mcp__orkastery__ork_claim_add', 'mcp__orkastery__ork_decision_record',
|
|
118
|
-
'
|
|
119
|
+
'mcp__orkastery__ork_request_conduction', 'mcp__orkastery__ork_git_commit', 'mcp__orkastery__ork_verify',
|
|
120
|
+
'mcp__orkastery__ork_ship',
|
|
119
121
|
];
|
|
120
122
|
/**
|
|
121
123
|
* RM-031 KG5 (D7): as consultas do grafo, de leitura, so com a flag do manifesto da raiz; sem ela, nada muda.
|
|
@@ -37,6 +37,7 @@ exports.LIMITE_DE_RECUSAS_NO_LOG = exports.INTERVALO_DA_VIGIA_MS = exports.PRAZO
|
|
|
37
37
|
exports.validarPedidoServidorGrok = validarPedidoServidorGrok;
|
|
38
38
|
exports.recusaDaRequisicao = recusaDaRequisicao;
|
|
39
39
|
exports.conferirArvore = conferirArvore;
|
|
40
|
+
exports.motivoDeEncerramentoDoGrok = motivoDeEncerramentoDoGrok;
|
|
40
41
|
exports.servirGrok = servirGrok;
|
|
41
42
|
/**
|
|
42
43
|
* RM-067 (F4c, thread ork-rm067f4cmcpd): o servidor MCP do `ork` da sessão filha do `grok`, num processo do `ork`, fora do
|
|
@@ -311,6 +312,21 @@ function lerCorpo(req, limite) {
|
|
|
311
312
|
function existe(arquivo) {
|
|
312
313
|
return fs.lstatSync(arquivo, { throwIfNoEntry: false }) !== undefined;
|
|
313
314
|
}
|
|
315
|
+
/**
|
|
316
|
+
* O evento terminal que a vigia ja pode afirmar. O recibo do `close` sempre vence; a ausencia do filho so e terminal
|
|
317
|
+
* depois que o supervisor tambem saiu, pois ele grava esse recibo entre os dois acontecimentos.
|
|
318
|
+
*/
|
|
319
|
+
function motivoDeEncerramentoDoGrok(logPath, inicio, prazoDaPartida, agora = Date.now()) {
|
|
320
|
+
if (existe(`${logPath}.exit.json`))
|
|
321
|
+
return 'recibo';
|
|
322
|
+
const processo = (0, grok_mcp_1.lerJsonPequeno)(`${logPath}.process.json`);
|
|
323
|
+
if (!processo)
|
|
324
|
+
return agora - inicio > prazoDaPartida ? 'sem-partida' : null;
|
|
325
|
+
if ((!processo.filho || (0, codex_runner_1.estadoProcesso)(processo.filho) === 'ausente') &&
|
|
326
|
+
(0, codex_runner_1.estadoProcesso)(processo.supervisor) === 'ausente')
|
|
327
|
+
return 'grok-ausente';
|
|
328
|
+
return null;
|
|
329
|
+
}
|
|
314
330
|
/** Roda um passo do fecho sem deixar a exceção dele impedir os seguintes. */
|
|
315
331
|
function semFalhar(passo) {
|
|
316
332
|
try {
|
|
@@ -554,18 +570,12 @@ async function servirGrok(pedido, token) {
|
|
|
554
570
|
terminar();
|
|
555
571
|
};
|
|
556
572
|
const vigiar = () => {
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
if (Date.now() - inicio > prazoDaPartida)
|
|
564
|
-
fechar('sem-partida');
|
|
565
|
-
return;
|
|
566
|
-
}
|
|
567
|
-
if (!processo.filho || (0, codex_runner_1.estadoProcesso)(processo.filho) === 'ausente')
|
|
568
|
-
fechar('grok-ausente');
|
|
573
|
+
// O `close` real do filho ocorre depois que ele ja aparece ausente e, dentro dele, o supervisor grava o recibo
|
|
574
|
+
// atomicamente antes de sair. Enquanto o supervisor vive, a ausencia do filho e so essa janela: o evento certo ainda
|
|
575
|
+
// e o recibo. `grok-ausente` fica para a queda do supervisor sem recibo, comprovada pela ausencia dos dois processos.
|
|
576
|
+
const motivo = motivoDeEncerramentoDoGrok(pedido.logPath, inicio, prazoDaPartida);
|
|
577
|
+
if (motivo)
|
|
578
|
+
fechar(motivo);
|
|
569
579
|
};
|
|
570
580
|
const vigia = setInterval(vigiar, exports.INTERVALO_DA_VIGIA_MS);
|
|
571
581
|
return { porta, url, fechar, fechado };
|
package/dist/adapters/grok.js
CHANGED
|
@@ -132,7 +132,7 @@ const PREFIXO_DO_CLAUDE = 'mcp__orkastery__';
|
|
|
132
132
|
/**
|
|
133
133
|
* RM-067 (F4b, G2 e D1): as ferramentas do MCP do `ork` que um despacho do `grok` libera, as mesmas do `--allowedTools` do
|
|
134
134
|
* `claude-bg` no mesmo caso, sem o prefixo: no PLAN que fecha o bloco, as consultas, `ork_artifact_write` e
|
|
135
|
-
* `ork_decision_record`, em qualquer perfil; fora dele, as consultas e, no perfil `worktree`, `ork_git_status` e as
|
|
135
|
+
* `ork_decision_record`, em qualquer perfil; fora dele, as consultas e, no perfil `worktree`, `ork_git_status` e as sete
|
|
136
136
|
* mutações. As consultas do grafo entram com a flag do manifesto da raiz. Montada na chamada, como no `claude-bg`: no
|
|
137
137
|
* ciclo de imports, o valor importado pode ainda não existir quando este módulo carrega.
|
|
138
138
|
*/
|
package/dist/agendador-cpu.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JANELA_DA_SONDA_MS = exports.LIMIAR_STEAL_DO_AGENDADOR_PCT = exports.RESERVA_DO_GRUPO = exports.ENV_CPUS_DOCKER = exports.ENV_CPUS_DA_LANE = void 0;
|
|
3
|
+
exports.JANELA_DA_SONDA_MS = exports.LIMIAR_STEAL_DO_AGENDADOR_PCT = exports.RESERVA_DO_GRUPO = exports.ENV_CPUS_DOCKER = exports.ENV_SINAL_DA_RESERVA = exports.ENV_CPUS_DA_LANE_APOS_RESERVA = exports.ENV_CPUS_DA_LANE = void 0;
|
|
4
4
|
exports.cargaDoProcLoadavg = cargaDoProcLoadavg;
|
|
5
5
|
exports.medirCpuDoGrupo = medirCpuDoGrupo;
|
|
6
6
|
exports.planejarCpuDoGrupo = planejarCpuDoGrupo;
|
|
@@ -16,6 +16,8 @@ exports.paredeAgileSimulada = paredeAgileSimulada;
|
|
|
16
16
|
const node_fs_1 = require("node:fs");
|
|
17
17
|
const steal_1 = require("./steal");
|
|
18
18
|
exports.ENV_CPUS_DA_LANE = 'ORK_CHECK_CPUS_DA_LANE';
|
|
19
|
+
exports.ENV_CPUS_DA_LANE_APOS_RESERVA = 'ORK_CHECK_CPUS_DA_LANE_APOS_RESERVA';
|
|
20
|
+
exports.ENV_SINAL_DA_RESERVA = 'ORK_CHECK_RESERVA_DEVOLVIDA';
|
|
19
21
|
exports.ENV_CPUS_DOCKER = 'ORK_CHECK_CPUS_DOCKER';
|
|
20
22
|
exports.RESERVA_DO_GRUPO = 2;
|
|
21
23
|
exports.LIMIAR_STEAL_DO_AGENDADOR_PCT = 10;
|
|
@@ -72,6 +74,7 @@ function planejarCpuDoGrupo(cpusInformadas, medicao) {
|
|
|
72
74
|
saturado,
|
|
73
75
|
motivo: motivos.join('; ') || `carga e steal abaixo dos limiares; ${fatia} CPU(s) reservadas ao grupo`,
|
|
74
76
|
cpusHermetica: saturado ? classic : Math.max(1, cpus - fatia),
|
|
77
|
+
cpusHermeticaAposReserva: saturado ? classic : cpus,
|
|
75
78
|
cpusIntegracao: ferramentas,
|
|
76
79
|
cpusDaFatia: fatia,
|
|
77
80
|
ferramentasDaVarredura: ferramentas,
|
|
@@ -88,5 +91,10 @@ function paredeAgileSimulada(plano, trabalho) {
|
|
|
88
91
|
return trabalho.hermetica / plano.cpusHermetica + trabalho.varredura / plano.cpusDaFatia
|
|
89
92
|
+ trabalho.integracao / plano.cpusIntegracao;
|
|
90
93
|
}
|
|
91
|
-
|
|
94
|
+
const paredeDaReserva = trabalho.varredura / plano.cpusDaFatia + trabalho.integracao / plano.cpusIntegracao;
|
|
95
|
+
const feitoAntesDaDevolucao = Math.min(trabalho.hermetica, paredeDaReserva * plano.cpusHermetica);
|
|
96
|
+
const paredeDaHermetica = feitoAntesDaDevolucao === trabalho.hermetica
|
|
97
|
+
? trabalho.hermetica / plano.cpusHermetica
|
|
98
|
+
: paredeDaReserva + (trabalho.hermetica - feitoAntesDaDevolucao) / plano.cpusHermeticaAposReserva;
|
|
99
|
+
return Math.max(paredeDaHermetica, paredeDaReserva);
|
|
92
100
|
}
|
package/dist/catalogo.js
CHANGED
|
@@ -99,7 +99,7 @@ function real(p) {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
|
-
* RM-047 (P4): o catálogo que o `ork eval` executa. O eval roda os
|
|
102
|
+
* RM-047 (P4): o catálogo que o `ork eval` executa. O eval roda os cenários, os hooks e o `core/dist`
|
|
103
103
|
* do catálogo, então ele só vale o do pacote que está rodando. Um diretório com `skills/`,
|
|
104
104
|
* `references/` e `eval/` achado a partir do cwd (um clone qualquer) que não seja o próprio pacote é
|
|
105
105
|
* recusado com `eval.catalogo-alheio`, com o comando que roda o eval daquele checkout de propósito.
|
|
@@ -112,7 +112,7 @@ function exigirCatalogoDoPacote(inicial) {
|
|
|
112
112
|
const doCwd = subirProcurando(inicial);
|
|
113
113
|
if (doCwd && real(doCwd) !== real(pacote)) {
|
|
114
114
|
throw new Error(`eval.catalogo-alheio: ${doCwd} tem skills/, references/ e eval/, mas nao e o pacote deste ork ` +
|
|
115
|
-
`(${pacote}). O eval executa os
|
|
115
|
+
`(${pacote}). O eval executa os cenarios, os hooks e o core/dist do catalogo, e so roda o do proprio pacote. ` +
|
|
116
116
|
`Para avaliar aquele checkout de proposito, rode o ork dele: node ${path.join(doCwd, 'core', 'dist', 'index.js')} eval`);
|
|
117
117
|
}
|
|
118
118
|
return pacote;
|
|
@@ -127,7 +127,7 @@ exports.BUCKETS = [
|
|
|
127
127
|
];
|
|
128
128
|
/** Todas as skills do catalogo, varridas do disco (nunca de uma lista escrita a mao). */
|
|
129
129
|
/**
|
|
130
|
-
* O CLI que um
|
|
130
|
+
* O CLI que um cenario chama. No repositorio ele fica em `core/dist/`; no pacote npm o catalogo e
|
|
131
131
|
* a propria raiz do pacote e o CLI e o que esta rodando, ao lado deste arquivo compilado.
|
|
132
132
|
*/
|
|
133
133
|
function cliDoCatalogo(catalogo) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.CENARIOS_HITL = void 0;
|
|
4
4
|
const sandbox_1 = require("./sandbox");
|
|
5
5
|
const thread_1 = require("./thread");
|
|
6
6
|
const ledger_1 = require("./ledger");
|
|
@@ -11,7 +11,7 @@ const hitl_gates_2 = require("./hitl-gates");
|
|
|
11
11
|
const hitl_gates_3 = require("./hitl-gates");
|
|
12
12
|
const hitl_local_atestado_1 = require("./hitl-local-atestado");
|
|
13
13
|
const hitl_canais_1 = require("./hitl-canais");
|
|
14
|
-
exports.
|
|
14
|
+
exports.CENARIOS_HITL = [
|
|
15
15
|
{ id: 'fx-blanket-approve', sobre: 'SIMULADO: aprovação cega e envelope sem autenticação são recusados', precisaDeGit: true, rodar: () => {
|
|
16
16
|
const s = (0, sandbox_1.sandboxGit)('blanket-approve');
|
|
17
17
|
try {
|
|
@@ -72,16 +72,16 @@ exports.CANARIOS_HITL = [
|
|
|
72
72
|
// precisam responder e ficar distinguiveis depois, que e o que D12 exige.
|
|
73
73
|
{ id: 'fx-omnicanal', sobre: 'SIMULADO: os quatro canais respondem e ficam distinguiveis no recibo', precisaDeGit: true, rodar: () => {
|
|
74
74
|
const s = (0, sandbox_1.sandboxGit)('omnicanal');
|
|
75
|
-
// FX1: cada canal de telegram tem a SUA chave; o
|
|
75
|
+
// FX1: cada canal de telegram tem a SUA chave; o cenario nunca compartilha segredo.
|
|
76
76
|
const nomes = ['ORK_HITL_INGRESS_KEY_HERMES', 'ORK_HITL_INGRESS_KEY_OPENCLAW',
|
|
77
77
|
'ORK_HITL_OPENCLAW_ACCOUNT', 'ORK_HITL_TELEGRAM_USERS', 'ORK_HITL_TELEGRAM_CHATS',
|
|
78
78
|
'ORK_HITL_ROOT', 'ORK_HITL_TELEGRAM_BOT_ID'];
|
|
79
79
|
const antigos = nomes.map(n => process.env[n]);
|
|
80
|
-
const chaves = { hermes: 'chave-SIMULADA-do-
|
|
81
|
-
openclaw: 'chave-SIMULADA-do-
|
|
80
|
+
const chaves = { hermes: 'chave-SIMULADA-do-cenario-hermes-00000000',
|
|
81
|
+
openclaw: 'chave-SIMULADA-do-cenario-openclaw-000000' };
|
|
82
82
|
// FX5: so o OpenClaw tem conta homologada, e ela entra no corpo assinado.
|
|
83
|
-
const conta = 'conta-SIMULADA-do-
|
|
84
|
-
[chaves.hermes, chaves.openclaw, conta, '42', '-7', '/tmp/ork-hitl-
|
|
83
|
+
const conta = 'conta-SIMULADA-do-cenario-openclaw';
|
|
84
|
+
[chaves.hermes, chaves.openclaw, conta, '42', '-7', '/tmp/ork-hitl-cenario', '999']
|
|
85
85
|
.forEach((v, i) => { process.env[nomes[i]] = v; });
|
|
86
86
|
try {
|
|
87
87
|
const registro = (0, hitl_canais_1.conferirRegistro)();
|