robisie 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +39 -11
- package/dist/agents.d.ts +1 -1
- package/dist/agents.js +1 -1
- package/dist/ci-failure-result.js +1 -1
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +45 -8
- package/dist/codex-env.d.ts +9 -0
- package/dist/codex-env.js +60 -0
- package/dist/commands.js +140 -16
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/delivery-local.d.ts +124 -0
- package/dist/delivery-local.js +286 -0
- package/dist/done-evidence.d.ts +25 -1
- package/dist/done-evidence.js +59 -1
- package/dist/engine/bundle-report.json +1687 -0
- package/dist/engine/tick.cjs +324704 -0
- package/dist/engine-config.d.ts +3 -1
- package/dist/engine-config.js +3 -3
- package/dist/factory-run.d.ts +17 -0
- package/dist/factory-run.js +262 -0
- package/dist/helpers.js +1 -1
- package/dist/k3-codex-job.d.ts +49 -0
- package/dist/k3-codex-job.js +324 -0
- package/dist/k3-helper-cli.d.ts +5 -0
- package/dist/k3-helper-cli.js +167 -0
- package/dist/local-usage.d.ts +47 -0
- package/dist/local-usage.js +230 -0
- package/dist/manifest.d.ts +5 -2
- package/dist/manifest.js +6 -6
- package/dist/planer-client.d.ts +45 -4
- package/dist/planer-client.js +120 -14
- package/dist/roles.d.ts +1 -1
- package/dist/select-fingerprint.d.ts +19 -0
- package/dist/select-fingerprint.js +46 -0
- package/dist/test-report.d.ts +9 -0
- package/dist/test-report.js +139 -0
- package/dist/tester-result-reader.d.ts +87 -0
- package/dist/tester-result-reader.js +122 -0
- package/docs/ENGINE-API.md +9 -1
- package/docs/README.en.md +55 -16
- package/docs/README.md +53 -16
- package/docs/RELEASE-0.1.0.md +27 -5
- package/helpers/ceo-client-launcher-mcp.mjs +76 -5
- package/package.json +6 -2
- package/roles/ceo-client.md +10 -8
package/docs/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# robisie — od konta do odebranej karty (paczka 0.
|
|
1
|
+
# robisie — od konta do odebranej karty (paczka 0.2.0)
|
|
2
2
|
|
|
3
3
|
English: [README.en.md](README.en.md).
|
|
4
4
|
|
|
@@ -17,7 +17,7 @@ Jeśli README w rejestrze jest puste, użyj lokalnych przewodników w `node_modu
|
|
|
17
17
|
<a id="wymagania"></a>
|
|
18
18
|
## Wymagania
|
|
19
19
|
|
|
20
|
-
Człowiek przygotowuje Node.js
|
|
20
|
+
Człowiek przygotowuje Node.js 24+ (wydanie użyte przy sprawdzeniach: 24.3.0), npm, internet do zależności i robisie oraz program jednego dostawcy: Claude Code, Codex CLI albo OpenCode z własnym dostępem do AI. Starszy Node, np. 22, otrzymuje odmowę przed `init`, `doctor` i `factory run`. Silnik w paczce (`dist/engine/tick.cjs`) wymaga systemu Linux i jest uruchamiany przez `npx robisie factory run`; konfigurację silnika opisuje [ENGINE-CONFIG](ENGINE-CONFIG.md). Sprawdź `node --version`, `npm --version` i wersję wybranego programu (`claude --version`, `codex --version` lub `opencode --version`). Jeśli programu nie ma w PATH, zainstaluj go według instrukcji dostawcy i sprawdź ponownie; sam katalog konfiguracji nie wystarcza. Windows/WSL są niezweryfikowane; poniższe przykłady używają ścieżek POSIX.
|
|
21
21
|
|
|
22
22
|
Przygotuj pusty katalog na dysku. Nie potrzebujesz strony ani własnego pliku `package.json`; przed instalacją utworzy go poniższy krok Node.js. To katalog pracy agentów, niezależny od projektu w panelu.
|
|
23
23
|
|
|
@@ -45,7 +45,13 @@ Człowiek w https://robisie.app/dashboard/connect wybiera `worker` i własną ro
|
|
|
45
45
|
|
|
46
46
|
`worker` to minimalna droga: odczyt oraz tworzenie/zmiana projektów, ścieżek i kart, rezerwacja pracy; bez ustawiania `done` przez create/update. `observer` tylko czyta. Za każdym razem jawnie wybierz `worker`: kolejne klucze mają domyślnie `observer` (ekran pierwszego klucza może wskazywać worker); nie wywodź uprawnień z wartości domyślnej. `full` dodaje usuwanie oraz zamykanie spraw decyzyjnych; `owner_validator` ma ten sam poziom dostępu co full. `seeder` ma wąski dostęp do `get_task` i poprawnego zasiewu przez `append_detail`, bez `list_projects`/odczytu tablicy — nie uruchomi tego przewodnika.
|
|
47
47
|
|
|
48
|
-
Paczka zapisuje **jeden klucz dla CEO, Buildera i Quality Officera** jako `ROBISIE_KEY`. Nazwa roli nie zmienia uprawnień. Nie używaj full jako obejścia odbioru `done`: właściciel odbiera wynik w panelu bez rozszerzania klucza agenta.
|
|
48
|
+
Paczka zapisuje **jeden klucz worker dla CEO, Buildera i Quality Officera** jako `ROBISIE_KEY`. Nazwa roli nie zmienia uprawnień. Nie używaj full jako obejścia odbioru `done`: właściciel odbiera wynik w panelu bez rozszerzania klucza agenta.
|
|
49
|
+
|
|
50
|
+
Wymagane są dwa osobne klucze: A (`ROBISIE_KEY`, worker) i B (`ROBISIE_REVIEW_KEY`, owner_validator). W https://robisie.app/dashboard/connect wygeneruj NOWY klucz B z rolą `owner_validator` i etykietą inną niż A: powtórzenie etykiety A rotuje A. Etykieta nie ogranicza klucza do projektu. B podaj poza rozmową w osobnym ukrytym pytaniu init albo przez bezpiecznie przygotowane ENV; `--key-stdin` pobiera tylko A. ENV B ma pierwszeństwo przed zapisanym `review-key` i pytaniem; otaczające spacje są błędem. Reinstalacja używa zapisanego B, jeśli ENV jest puste. Niepusty wadliwy B wymaga naprawy, bez zastępowania innym źródłem.
|
|
51
|
+
|
|
52
|
+
A i B są zapisywane osobno w `${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key` i `review-key` (pliki 0600, katalog 0700). B nie trafia do konfiguracji agentów/modeli, manifestu, argumentów, claimów ani komunikatów. Załaduj oba ENV także przy `--no-shell`. Przed pierwszym zadaniem uruchom zwykły `npx robisie doctor`: tryb `--engine-config` nie sprawdza kluczy. Przy brakującym lub niepoprawnym A doctor diagnozuje A; sprawdzanie B zaczyna dopiero, gdy A jest obecny i ma poprawny format. Brak B, B=A, zły format i nieudany odczyt B dają exit 1. B sprawdzane jest przez `initialize` + `list_projects`, bez mutacji danych biznesowych; liczniki auth mogą wzrosnąć. Odczyt nie potwierdza roli, wspólnego konta A/B ani polityki projektu.
|
|
53
|
+
|
|
54
|
+
Każdy wynik doctor zawiera `! Polityka enforced: NIE SPRAWDZONO — klient nie ma API jej odczytu.` Odmowa kontekstu projektu następuje przed doctor i ma własną poradę. Zielony doctor nie oznacza aktywacji enforced. Przy błędzie B sprawdź dostęp do Connect i wystawienie owner_validator; awaria sieci nie dowodzi unieważnienia. Ponów init z poprawnym B w ENV, potem doctor. Zmiana polityki wymaga osobnej uprawnionej czynności operatora.
|
|
49
55
|
|
|
50
56
|
<!-- sekcja: instalacja -->
|
|
51
57
|
<a id="instalacja"></a>
|
|
@@ -68,17 +74,22 @@ node -e 'try {
|
|
|
68
74
|
{
|
|
69
75
|
set +x
|
|
70
76
|
npm i robisie &&
|
|
71
|
-
unset ROBISIE_KEY &&
|
|
77
|
+
unset ROBISIE_KEY ROBISIE_REVIEW_KEY &&
|
|
72
78
|
npx robisie init --agent claude &&
|
|
73
79
|
{
|
|
74
80
|
if [ ! -L "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key" ] &&
|
|
75
81
|
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key" ] &&
|
|
76
82
|
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key" ] &&
|
|
83
|
+
[ ! -L "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/review-key" ] &&
|
|
84
|
+
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/review-key" ] &&
|
|
85
|
+
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/review-key" ] &&
|
|
86
|
+
ROBISIE_REVIEW_KEY="$(cat "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/review-key" 2>/dev/null)" &&
|
|
87
|
+
[ -n "$ROBISIE_REVIEW_KEY" ] &&
|
|
77
88
|
ROBISIE_KEY="$(cat "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key" 2>/dev/null)" &&
|
|
78
89
|
[ -n "$ROBISIE_KEY" ]; then
|
|
79
|
-
export ROBISIE_KEY
|
|
90
|
+
export ROBISIE_KEY ROBISIE_REVIEW_KEY
|
|
80
91
|
else
|
|
81
|
-
printf '%s\n' 'Nie można wczytać
|
|
92
|
+
printf '%s\n' 'Nie można wczytać obu niepustych, zwykłych, czytelnych plików kluczy robisie (key, review-key).' 'Następny krok: sprawdź lokalnie plik klucza i jego odczyt; wyjaśnij link/katalog bez nadpisywania danych. Przy braku lub odmowie B podaj nowy owner_validator przez ROBISIE_REVIEW_KEY do init; --key-stdin wymienia tylko A. Nie wklejaj klucza do rozmowy.' >&2
|
|
82
93
|
false
|
|
83
94
|
fi
|
|
84
95
|
} &&
|
|
@@ -97,11 +108,16 @@ set +x
|
|
|
97
108
|
if [ ! -L "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key" ] &&
|
|
98
109
|
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key" ] &&
|
|
99
110
|
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key" ] &&
|
|
111
|
+
[ ! -L "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/review-key" ] &&
|
|
112
|
+
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/review-key" ] &&
|
|
113
|
+
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/review-key" ] &&
|
|
114
|
+
ROBISIE_REVIEW_KEY="$(cat "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/review-key" 2>/dev/null)" &&
|
|
115
|
+
[ -n "$ROBISIE_REVIEW_KEY" ] &&
|
|
100
116
|
ROBISIE_KEY="$(cat "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key" 2>/dev/null)" &&
|
|
101
117
|
[ -n "$ROBISIE_KEY" ]; then
|
|
102
|
-
export ROBISIE_KEY
|
|
118
|
+
export ROBISIE_KEY ROBISIE_REVIEW_KEY
|
|
103
119
|
else
|
|
104
|
-
printf '%s\n' 'Nie można wczytać
|
|
120
|
+
printf '%s\n' 'Nie można wczytać obu niepustych, zwykłych, czytelnych plików kluczy robisie (key, review-key).' 'Następny krok: sprawdź lokalnie plik klucza i jego odczyt; wyjaśnij link/katalog bez nadpisywania danych. Przy braku lub odmowie B podaj nowy owner_validator przez ROBISIE_REVIEW_KEY do init; --key-stdin wymienia tylko A. Nie wklejaj klucza do rozmowy.' >&2
|
|
105
121
|
false
|
|
106
122
|
fi
|
|
107
123
|
} &&
|
|
@@ -155,11 +171,16 @@ set +x
|
|
|
155
171
|
if [ ! -L "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key" ] &&
|
|
156
172
|
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key" ] &&
|
|
157
173
|
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key" ] &&
|
|
174
|
+
[ ! -L "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/review-key" ] &&
|
|
175
|
+
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/review-key" ] &&
|
|
176
|
+
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/review-key" ] &&
|
|
177
|
+
ROBISIE_REVIEW_KEY="$(cat "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/review-key" 2>/dev/null)" &&
|
|
178
|
+
[ -n "$ROBISIE_REVIEW_KEY" ] &&
|
|
158
179
|
ROBISIE_KEY="$(cat "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key" 2>/dev/null)" &&
|
|
159
180
|
[ -n "$ROBISIE_KEY" ]; then
|
|
160
|
-
export ROBISIE_KEY
|
|
181
|
+
export ROBISIE_KEY ROBISIE_REVIEW_KEY
|
|
161
182
|
else
|
|
162
|
-
printf '%s\n' 'Nie można wczytać
|
|
183
|
+
printf '%s\n' 'Nie można wczytać obu niepustych, zwykłych, czytelnych plików kluczy robisie (key, review-key).' 'Następny krok: sprawdź lokalnie plik klucza i jego odczyt; wyjaśnij link/katalog bez nadpisywania danych. Przy braku lub odmowie B podaj nowy owner_validator przez ROBISIE_REVIEW_KEY do init; --key-stdin wymienia tylko A. Nie wklejaj klucza do rozmowy.' >&2
|
|
163
184
|
false
|
|
164
185
|
fi
|
|
165
186
|
}
|
|
@@ -284,6 +305,7 @@ cp -p -- "$PWD/package.json" "$backup/project/package.json"
|
|
|
284
305
|
cp -p -- "$PWD/package-lock.json" "$backup/project/package-lock.json"
|
|
285
306
|
cp -p -- "$PWD/robisie.config.json" "$backup/project/robisie.config.json"
|
|
286
307
|
cp -p -- "$config_home/robisie/key" "$backup/robisie/key"
|
|
308
|
+
cp -p -- "$config_home/robisie/review-key" "$backup/robisie/review-key"
|
|
287
309
|
cp -p -- "$config_home/robisie/manifest.json" "$backup/robisie/manifest.json"
|
|
288
310
|
cp -Rp -- "$config_home/robisie/backups/." "$backup/robisie/backups/"
|
|
289
311
|
cp -Rp -- "$config_home/robisie/roles/codex/." "$backup/robisie/roles/codex/"
|
|
@@ -309,6 +331,7 @@ cp -p -- "$backup/project/package.json" "$PWD/package.json"
|
|
|
309
331
|
cp -p -- "$backup/project/package-lock.json" "$PWD/package-lock.json"
|
|
310
332
|
cp -p -- "$backup/project/robisie.config.json" "$PWD/robisie.config.json"
|
|
311
333
|
cp -p -- "$backup/robisie/key" "$config_home/robisie/key"
|
|
334
|
+
cp -p -- "$backup/robisie/review-key" "$config_home/robisie/review-key"
|
|
312
335
|
cp -p -- "$backup/robisie/manifest.json" "$config_home/robisie/manifest.json"
|
|
313
336
|
cp -Rp -- "$backup/robisie/backups/." "$config_home/robisie/backups/"
|
|
314
337
|
cp -Rp -- "$backup/robisie/roles/codex/." "$config_home/robisie/roles/codex/"
|
|
@@ -327,7 +350,9 @@ cp -p -- "$backup/profile/selected" "$profile"
|
|
|
327
350
|
cp -p -- "$backup/entries/$entry_id" "$entry_path"
|
|
328
351
|
```
|
|
329
352
|
|
|
330
|
-
Gdy tgz i wszystkie wybrane kopie są gotowe, aktualizuj. Init
|
|
353
|
+
Gdy tgz i wszystkie wybrane kopie są gotowe, aktualizuj. Init istniejącej instalacji używa zapisanych A i B; ENV ma pierwszeństwo. Jawny `--key-stdin` wymienia tylko A. Doctor i launcher nadal wymagają obu zmiennych środowiska. Wczytaj stary klucz PRZED init/doctor z tego samego XDG_CONFIG_HOME; osobne przypisanie przed export i `&&` zachowują błąd odczytu bez wydruku klucza:
|
|
354
|
+
|
|
355
|
+
Kopia i odtworzenie obejmują oba pliki key i review-key z prywatnymi uprawnieniami; przed init/doctor wczytaj oba odtworzone klucze. Uninstall raportuje osobno stan obu plików i usuwa je z zachowaniem dotychczasowej ochrony ewidencji oraz konfiguracji. Nie unieważnia żadnego klucza na serwerze.
|
|
331
356
|
|
|
332
357
|
<!-- update:start -->
|
|
333
358
|
```sh
|
|
@@ -338,11 +363,16 @@ export XDG_CONFIG_HOME &&
|
|
|
338
363
|
if [ ! -L "$XDG_CONFIG_HOME/robisie/key" ] &&
|
|
339
364
|
[ -f "$XDG_CONFIG_HOME/robisie/key" ] &&
|
|
340
365
|
[ -r "$XDG_CONFIG_HOME/robisie/key" ] &&
|
|
366
|
+
[ ! -L "$XDG_CONFIG_HOME/robisie/review-key" ] &&
|
|
367
|
+
[ -f "$XDG_CONFIG_HOME/robisie/review-key" ] &&
|
|
368
|
+
[ -r "$XDG_CONFIG_HOME/robisie/review-key" ] &&
|
|
369
|
+
ROBISIE_REVIEW_KEY="$(cat "$XDG_CONFIG_HOME/robisie/review-key" 2>/dev/null)" &&
|
|
370
|
+
[ -n "$ROBISIE_REVIEW_KEY" ] &&
|
|
341
371
|
ROBISIE_KEY="$(cat "$XDG_CONFIG_HOME/robisie/key" 2>/dev/null)" &&
|
|
342
372
|
[ -n "$ROBISIE_KEY" ]; then
|
|
343
|
-
export ROBISIE_KEY
|
|
373
|
+
export ROBISIE_KEY ROBISIE_REVIEW_KEY
|
|
344
374
|
else
|
|
345
|
-
printf '%s\n' 'Nie można wczytać
|
|
375
|
+
printf '%s\n' 'Nie można wczytać obu niepustych, zwykłych, czytelnych plików kluczy robisie (key, review-key).' 'Następny krok: sprawdź lokalnie plik klucza i jego odczyt; wyjaśnij link/katalog bez nadpisywania danych. Przy braku lub odmowie B podaj nowy owner_validator przez ROBISIE_REVIEW_KEY do init; --key-stdin wymienia tylko A. Nie wklejaj klucza do rozmowy.' >&2
|
|
346
376
|
false
|
|
347
377
|
fi
|
|
348
378
|
} &&
|
|
@@ -369,11 +399,16 @@ export XDG_CONFIG_HOME &&
|
|
|
369
399
|
if [ ! -L "$XDG_CONFIG_HOME/robisie/key" ] &&
|
|
370
400
|
[ -f "$XDG_CONFIG_HOME/robisie/key" ] &&
|
|
371
401
|
[ -r "$XDG_CONFIG_HOME/robisie/key" ] &&
|
|
402
|
+
[ ! -L "$XDG_CONFIG_HOME/robisie/review-key" ] &&
|
|
403
|
+
[ -f "$XDG_CONFIG_HOME/robisie/review-key" ] &&
|
|
404
|
+
[ -r "$XDG_CONFIG_HOME/robisie/review-key" ] &&
|
|
405
|
+
ROBISIE_REVIEW_KEY="$(cat "$XDG_CONFIG_HOME/robisie/review-key" 2>/dev/null)" &&
|
|
406
|
+
[ -n "$ROBISIE_REVIEW_KEY" ] &&
|
|
372
407
|
ROBISIE_KEY="$(cat "$XDG_CONFIG_HOME/robisie/key" 2>/dev/null)" &&
|
|
373
408
|
[ -n "$ROBISIE_KEY" ]; then
|
|
374
|
-
export ROBISIE_KEY
|
|
409
|
+
export ROBISIE_KEY ROBISIE_REVIEW_KEY
|
|
375
410
|
else
|
|
376
|
-
printf '%s\n' 'Nie można wczytać
|
|
411
|
+
printf '%s\n' 'Nie można wczytać obu niepustych, zwykłych, czytelnych plików kluczy robisie (key, review-key).' 'Następny krok: sprawdź lokalnie plik klucza i jego odczyt; wyjaśnij link/katalog bez nadpisywania danych. Przy braku lub odmowie B podaj nowy owner_validator przez ROBISIE_REVIEW_KEY do init; --key-stdin wymienia tylko A. Nie wklejaj klucza do rozmowy.' >&2
|
|
377
412
|
false
|
|
378
413
|
fi
|
|
379
414
|
} &&
|
|
@@ -412,7 +447,7 @@ Komunikaty CLI pozostają po polsku. Dopasuj komunikat, a potem wykonaj wskazan
|
|
|
412
447
|
Wygeneruj nowy klucz worker; w zsh/bash wykonaj `unset ROBISIE_KEY`, potem init z ukrytym pytaniem.
|
|
413
448
|
- **brak-odczytu** — `Ten klucz nie ma uprawnień do odczytu tablicy (np. rola seeder).`
|
|
414
449
|
Wybierz worker w Connect; `unset ROBISIE_KEY`, potem init z ukrytym pytaniem.
|
|
415
|
-
- **major** — `Wersja kontraktu serwera (2.0.0) nie pasuje do paczki robisie 0.
|
|
450
|
+
- **major** — `Wersja kontraktu serwera (2.0.0) nie pasuje do paczki robisie 0.2.0 (obsługuje 1.x).`
|
|
416
451
|
Przykład niezgodnego MAJOR: zainstaluj wydanie zgodne z kontraktem serwera.
|
|
417
452
|
- **brak-env** — `Zmienna ROBISIE_KEY nie jest ustawiona — role i agenci jej potrzebują.`
|
|
418
453
|
Sprawdź obsługę profilu; przy --no-shell/innej powłoce wczytaj plik klucza do środowiska sesji jak w init, potem doctor.
|
|
@@ -433,3 +468,5 @@ Po naprawie przy istniejącej ewidencji wczytaj zapisany klucz według Aktualiza
|
|
|
433
468
|
Instalator nie uruchamia sam usług w tle ani Buildera; po zgodzie operatora CEO może uruchomić Buildera przez `spawn_builder`. Pomocniki działają podczas sesji agenta, z kontekstem katalogu projektu (lub `ROBISIE_PROJECT_CONTEXT`). Instalator łączy się z robisie w celu sprawdzenia kontraktu i klucza; plik paczki nie zapewnia konta ani dostępu do dostawcy AI. Jedna wspólna tożsamość klucza nie daje trzech różnych poziomów uprawnień. Odbiór wymaga niezależnej recenzji, dowodów i zgody operatora.
|
|
434
469
|
|
|
435
470
|
Windows/WSL są niezweryfikowane. Walidacja offline sprawdza strukturę konfiguracji, nie UUID projektu, istnienie repo, dostępność modeli ani uruchomienie dostawców.
|
|
471
|
+
|
|
472
|
+
Silnik paczki (`dist/engine/tick.cjs`) jest odrębny od instalatora: uruchamia go `npx robisie factory run --engine-config ./robisie.config.json` i tylko na Linuxie; na innym systemie polecenie odmawia z kodem 2 i komunikatem. Opcja `--once` uruchamia jeden takt bez przerwy i wyklucza jawne `--interval`. Każdy niezerowy wynik taktu zatrzymuje nadzorcę („Fabryka zatrzymana: …”) z jedną linią diagnozy na stderr; kod 2 to eskalacja (np. brak klucza B po receiver PASS, odmowa testera, STOP odbioru) wymagająca rozstrzygnięcia przed ponowieniem, a kod 78 wskazuje konfigurację do poprawy. Realne użycie u klienta na Linuxie zostanie udowodnione w odbiorze D9; na innych systemach nie ma natywnego dowodu uruchomienia silnika. Automatyczne plany FJ u klienta są zapowiedziane („wkrótce”), ale nie ma ich w tym wydaniu; selektor zwraca prawdziwy wynik.
|
package/docs/RELEASE-0.1.0.md
CHANGED
|
@@ -2,36 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
## Polski
|
|
4
4
|
|
|
5
|
+
Wymagane są osobne A (`ROBISIE_KEY`, worker) i B (`ROBISIE_REVIEW_KEY`): w `/dashboard/connect` wygeneruj NOWY klucz `owner_validator` z etykietą inną niż A; powtórzenie etykiety A rotuje A. Init pobiera B z ENV, zapisanego `review-key` lub osobnego ukrytego pytania; `--key-stdin` dotyczy tylko A. Oba pliki są prywatne (0600/0700); B nie trafia do manifestu ani konfiguracji agentów/modeli. Profil i instrukcja --no-shell ładują oba ENV. Kopia/odtworzenie obejmuje oba pliki, a uninstall raportuje i usuwa oba z zachowaniem ochrony ewidencji i konfiguracji; nie unieważnia kluczy na serwerze.
|
|
6
|
+
|
|
7
|
+
Zwykły doctor przed pierwszym zadaniem wymaga poprawnego, różnego B i sprawdza odczyt przez `initialize` + `list_projects`; brak B, B=A, błędny format lub nieudany odczyt oznacza exit 1. Przy brakującym lub niepoprawnym A doctor diagnozuje A; sprawdzanie B zaczyna dopiero, gdy A jest obecny i ma poprawny format. Liczniki auth mogą wzrosnąć; dane biznesowe nie są mutowane. Każdy wynik doctor zawiera „Polityka enforced: NIE SPRAWDZONO — klient nie ma API jej odczytu”. Odczyt nie dowodzi roli, wspólnego konta ani enforced. Odmowa kontekstu projektu poprzedza doctor i zachowuje własną poradę. `doctor --engine-config` to osobna kontrola offline, bez sprawdzania kluczy.
|
|
8
|
+
|
|
5
9
|
Klient łączy Claude Code, Codex CLI lub OpenCode z tablicą robisie. `init` instaluje konfigurację MCP, role CEO, Builder i Quality Officer oraz polecenia pomocników `client-launch-context` i `ceo-client-launcher`; `doctor` sprawdza połączenie i instalację, a `uninstall` usuwa zarejestrowane zmiany. Obce ustawienia i instrukcje pozostają; pierwsze kopie zapasowe zachowują stan sprzed instalacji.
|
|
6
10
|
|
|
7
|
-
Wymagania
|
|
11
|
+
Wymagania: Node.js >=24 dla całej paczki (wydanie użyte przy sprawdzeniach: 24.3.0); starszy Node, np. 22, otrzymuje polską odmowę przed `init`, `doctor` i `factory run`. Instalator działa na macOS i Linux; silnik w paczce — `dist/engine/tick.cjs` — wymaga systemu Linux i jest uruchamiany przez `factory run`, które na innym systemie odmawia z kodem 2. Potrzebne są też npm, własny zainstalowany agent z dostępem do dostawcy AI, połączenie z robisie i klucz z Connect. Windows/WSL nie mają zweryfikowanego wsparcia. Klient rozumie kontrakt serwera 1.x, obecnie 1.0.0. Inny major, np. 2.0.0, jest odrzucany przed zapisem przez `init`; starszy klient nie obniża kontraktu serwera.
|
|
8
12
|
|
|
9
13
|
Dostępność: instalacja z npm przez `npm i robisie` w katalogu pracy agenta; dalsze kroki opisuje [README](README.md).
|
|
10
14
|
|
|
11
15
|
Po zgodzie człowieka na kartę potwierdzoną w `ready` CEO domyślnie uruchamia Buildera przez `ceo-client-launcher` → `spawn_builder`. Ręczny start w nowym terminalu jest wyłącznie jawnym wyborem operatora; błąd pomocnika wymaga zgłoszenia i naprawy przyczyny przed ponowieniem, bez automatycznego przejścia na ręczny start. Instalator sam nie startuje usług w tle ani Buildera.
|
|
12
16
|
|
|
13
|
-
Ograniczenia: wszystkie trzy role muszą obecnie używać jednego dostawcy; mieszana mapa daje błąd `doctor`. Sam `doctor` nie potwierdza dostępności narzędzi obu pomocników w sesji dostawcy — sprawdź je zgodnie z README. W Claude Code niezależny Quality Officer przez `Agent(quality-officer-client)`, dowody i verified receipt poprzedzają `delivered`, a jawny odbiór operatora poprzedza `done`. OpenCode pozostaje w `in_review` niezależnie od dostępności Agent, bez wspieranego przejścia do `delivered`; pełny odbiór wymaga ścieżki Claude Code. Codex wymaga integracji Agent, niezależnej recenzji i verified receipt; brak Agent pozostawia kartę w `in_review` do naprawy CEO/CR. Builder nie recenzuje własnej pracy.
|
|
17
|
+
Ograniczenia: wszystkie trzy role muszą obecnie używać jednego dostawcy; mieszana mapa daje błąd `doctor`. Sam `doctor` nie potwierdza dostępności narzędzi obu pomocników w sesji dostawcy — sprawdź je zgodnie z README. W Claude Code niezależny Quality Officer przez `Agent(quality-officer-client)`, dowody i verified receipt poprzedzają `delivered`, a jawny odbiór operatora poprzedza `done`. OpenCode pozostaje w `in_review` niezależnie od dostępności Agent, bez wspieranego przejścia do `delivered`; pełny odbiór wymaga ścieżki Claude Code. Codex wymaga integracji Agent, niezależnej recenzji i verified receipt; brak Agent pozostawia kartę w `in_review` do naprawy CEO/CR. Builder nie recenzuje własnej pracy. Silnik paczki jest odrębny od instalatora: uruchamia go `npx robisie factory run --engine-config ./robisie.config.json` i tylko na Linuxie; każdy niezerowy wynik taktu zatrzymuje nadzorcę („Fabryka zatrzymana: …”) z jedną linią diagnozy na stderr, a kod 2 to eskalacja (np. brak klucza B po receiver PASS, odmowa testera, STOP odbioru) wymagająca rozstrzygnięcia przed ponowieniem; kod 78 wskazuje konfigurację do poprawy. Opcja `--once` uruchamia jeden takt bez przerwy i wyklucza jawne `--interval`. Konfigurację silnika opisuje [ENGINE-CONFIG](ENGINE-CONFIG.md). Automatyczne plany FJ u klienta są zapowiedziane („wkrótce”), ale nie ma ich w tym wydaniu; selektor zwraca prawdziwy wynik. Realne użycie u klienta na Linuxie zostanie udowodnione w odbiorze D9; na innych systemach niż Linux nie ma natywnego dowodu uruchomienia silnika.
|
|
14
18
|
|
|
15
19
|
Biblioteki ESM w `dist/` obejmują parser konfiguracji `engine-config`, wyniki ról `role-results`, SDK tablicy `planer-client` ([API silnika](ENGINE-API.md)), rejestr ról, walidację zasiewu i reguły intencji, wybór i zakres pracy, ruchy i odzyskiwanie stanu, tożsamość prób/testera, środowisko Workera, źródła recenzji, wyniki CI oraz adaptery Claude/Codex/OpenCode i eksport sesji. `robisie.config.json` opisuje instancję: projekt, tory, katalog stanu i role; sekcja `engine` opisuje repo, gałąź, komendy, wymagane kontrole i sposób dostarczenia. Parser konfiguracji niczego nie uruchamia. Instalacja, import bibliotek i obecność pomocników nie dowodzą uruchomienia silnika ani pełnej autonomicznej pętli klienta.
|
|
16
20
|
|
|
21
|
+
Moduł `test-report` jest czystą kopią algorytmów fabryki bez jej importu; test AST sprawdza ich parytet. `passedVitestReport` ocenia strukturę raportu. Konsument pełnego PASS musi niezależnie sprawdzić exit=0 oraz brak nieobsłużonych błędów procesu (`Unhandled`); samo `success=true` w JSON nie dowodzi poprawnego zakończenia przebiegu.
|
|
22
|
+
|
|
17
23
|
Powrót lokalny: zachowaj poprzedni tgz i kopię własnej konfiguracji; w tym samym projekcie zainstaluj go przez `npm i ./robisie-0.1.0.tgz`, potem `npx robisie init --agent <agent>` i `npx robisie doctor`. Najpierw sprawdź zgodność kontraktu. Test 0.1.0 → syntetyczne 0.1.1 → 0.1.0 jest lokalną próbą reinstalacji i powrotu, nie rollbackiem opublikowanych wydań. `npx robisie uninstall` usuwa zarejestrowane wpisy/bloki robisie, nie przywraca starych wpisów robisie; cofa niezmienione role, a zmienione przez użytkownika pozostawia z ostrzeżeniem. Backupy pozostają i mogą zawierać klucz — chroń je. Bez zapisu instalacji komenda nie usuwa pliku klucza; odmowa sprawdzenia konfiguracji Codex następuje przed usunięciem klucza, a po tym sprawdzeniu klucz jest usuwany nawet przy późniejszym błędzie. Kod różny od zera wymaga rozwiązania wskazanego problemu. Uninstall nie unieważnia klucza na serwerze (zrób to osobno w Connect); `npm uninstall robisie` usuwa paczkę z projektu, zgodnie z README.
|
|
18
24
|
|
|
19
25
|
Ten dokument nie potwierdza tagu, GitHub Release ani publikacji npm.
|
|
20
26
|
|
|
21
27
|
## English
|
|
22
28
|
|
|
29
|
+
Separate A (`ROBISIE_KEY`, worker) and B (`ROBISIE_REVIEW_KEY`) are required: at `/dashboard/connect` generate a NEW `owner_validator` key with a label different from A; reusing A's label rotates A. Init reads B from ENV, saved `review-key` or a separate hidden prompt; `--key-stdin` applies only to A. Both files are private (0600/0700); B never enters the manifest or agent/model configuration. The profile and --no-shell instructions load both variables. Backup/restore covers both files, and uninstall reports and removes both under the ledger/configuration safeguards; it does not revoke server keys.
|
|
30
|
+
|
|
31
|
+
Run ordinary doctor before the first task. It requires valid, distinct B and checks reads using `initialize` + `list_projects`; missing B, B=A, bad format or failed reads mean exit 1. If A is missing or malformed, doctor diagnoses A; B checks begin only when A is present and has a valid format. Auth counters may increase; business data is not mutated. Every doctor result says “enforced policy: NOT CHECKED — the client has no API to read it” (CLI in Polish). Reads do not prove role, a shared account or enforced. Project-context refusal precedes doctor and keeps its own advice. `doctor --engine-config` is a separate offline check without key validation.
|
|
32
|
+
|
|
23
33
|
The client connects Claude Code, Codex CLI or OpenCode to the robisie board. `init` installs MCP configuration, CEO, Builder and Quality Officer roles and the `client-launch-context` and `ceo-client-launcher` helper commands. `doctor` checks the connection and installation; `uninstall` removes recorded changes. Other settings and instructions survive; first backups retain the state before installation.
|
|
24
34
|
|
|
25
|
-
Requirements for
|
|
35
|
+
Requirements: Node.js >=24 for the whole package (release used for checks: 24.3.0); an older Node, such as 22, receives a Polish refusal before `init`, `doctor` and `factory run`. The installer runs on macOS and Linux; the engine bundled in the package — `dist/engine/tick.cjs` — requires Linux and is started by `factory run`, which refuses with code 2 on any other system. Also required: npm, an installed agent with your own AI provider access, a robisie connection and a Connect key. Windows/WSL support is unverified. The client supports server contract 1.x, currently 1.0.0. `init` refuses another major, such as 2.0.0, before writing; an older client cannot downgrade the server contract.
|
|
26
36
|
|
|
27
37
|
Availability: install from npm with `npm i robisie` in the agent working directory; follow [README](README.en.md) for the next steps.
|
|
28
38
|
|
|
29
39
|
After human approval of a card confirmed in `ready`, the CEO starts the Builder by default through `ceo-client-launcher` → `spawn_builder`. Manual startup in a new terminal is only the operator's explicit choice; a helper error must be reported and its cause resolved before retrying, without automatically switching to manual startup. The installer itself starts neither background services nor the Builder.
|
|
30
40
|
|
|
31
|
-
Limitations: all three roles currently need the same provider; `doctor` rejects mixed assignments. `doctor` alone does not confirm that both helpers' tools are available in the provider session — check them as described in README. In Claude Code, an independent Quality Officer through `Agent(quality-officer-client)`, evidence and a verified receipt precede `delivered`; explicit operator acceptance precedes `done`. OpenCode stays in `in_review` regardless of Agent availability, with no supported transition to `delivered`; full acceptance requires the Claude Code path. Codex requires Agent integration, independent review and a verified receipt; without Agent, the card stays in `in_review` pending CEO/CR repair. The Builder does not review its own work.
|
|
41
|
+
Limitations: all three roles currently need the same provider; `doctor` rejects mixed assignments. `doctor` alone does not confirm that both helpers' tools are available in the provider session — check them as described in README. In Claude Code, an independent Quality Officer through `Agent(quality-officer-client)`, evidence and a verified receipt precede `delivered`; explicit operator acceptance precedes `done`. OpenCode stays in `in_review` regardless of Agent availability, with no supported transition to `delivered`; full acceptance requires the Claude Code path. Codex requires Agent integration, independent review and a verified receipt; without Agent, the card stays in `in_review` pending CEO/CR repair. The Builder does not review its own work. The package engine is separate from the installer: it is started by `npx robisie factory run --engine-config ./robisie.config.json` and only on Linux; every nonzero tick result stops the supervisor („Fabryka zatrzymana: …”) with one diagnostic line on stderr, and code 2 means an escalation (e.g. missing B key after receiver PASS, tester refusal, acceptance STOP) that must be resolved before retrying; code 78 points to configuration repair. The `--once` option runs one tick without a pause and excludes an explicit `--interval`. The engine configuration is described in [ENGINE-CONFIG](ENGINE-CONFIG.md). Automatic FJ plans for customers are announced (“soon”) but are not in this release; the selector returns the true result. Real customer use on Linux will be proven in the D9 acceptance; on systems other than Linux there is no native proof of the engine running.
|
|
32
42
|
|
|
33
43
|
The ESM libraries in `dist/` include the `engine-config` configuration parser, `role-results` role outcomes, the `planer-client` board SDK ([engine API](ENGINE-API.md)), role registry, seed validation and intent rules, selection and dispatch scope, outcome moves and recovery, attempt/tester identity, Worker environment, review source packets, CI results, Claude/Codex/OpenCode adapters and session export. `robisie.config.json` describes an instance: project, tracks, state directory and roles; its `engine` section describes the repository, branch, commands, required checks and delivery mode. Parsing configuration starts nothing. Installation, library imports and shipped helpers do not prove a running engine or a complete autonomous customer loop.
|
|
34
44
|
|
|
45
|
+
The `test-report` module is a pure copy of the factory algorithms without importing the factory; an AST test checks their parity. `passedVitestReport` evaluates report structure. A consumer claiming a full PASS must independently check exit=0 and the absence of unhandled process errors (`Unhandled`); `success=true` in JSON alone does not prove a successful run.
|
|
46
|
+
|
|
35
47
|
Local return: retain the previous tgz and a copy of your configuration. Install it in the same project with `npm i ./robisie-0.1.0.tgz`, then run `npx robisie init --agent <agent>` and `npx robisie doctor`, checking contract compatibility first. The 0.1.0 → synthetic 0.1.1 → 0.1.0 test is a local reinstall and return rehearsal, not a rollback of published releases. `npx robisie uninstall` removes recorded robisie entries/blocks without restoring old robisie entries; it restores unchanged role files and leaves user-edited roles with a warning. Backups remain and may contain a key; protect them. Without an installation record, the key file is not removed; Codex configuration refusal happens before key deletion, while after that check the key is removed even if a later step fails. A nonzero exit requires resolving the reported problem. Uninstall does not revoke the server key (revoke it separately in Connect); `npm uninstall robisie` removes the project package, as described in README.
|
|
36
48
|
|
|
37
49
|
This document does not confirm a tag, GitHub Release or npm publication.
|
|
@@ -54,7 +66,7 @@ export const config = parseConfig({
|
|
|
54
66
|
|
|
55
67
|
## Zawartość paczki / Package inventory
|
|
56
68
|
|
|
57
|
-
Ścieżki bibliotek/CLI i pomocników; wpis przy launcherze wskazuje zarejestrowane narzędzie. Deklaracje `.d.ts` mogą towarzyszyć modułom JS. / Library/CLI and helper paths; the launcher entry names its registered tool. Type declarations may accompany JS modules.
|
|
69
|
+
Ścieżki bibliotek/CLI i pomocników; wpis przy launcherze wskazuje zarejestrowane narzędzie. Deklaracje `.d.ts` mogą towarzyszyć modułom JS. `dist/engine/tick.cjs` to samodzielny silnik paczki (plik CJS zbudowany z fabryki), uruchamiany przez `factory run` na Linuxie — odrębny od instalatora i od zestawu ESM. / Library/CLI and helper paths; the launcher entry names its registered tool. Type declarations may accompany JS modules. `dist/engine/tick.cjs` is the package's standalone engine (a CJS file built from the factory), started by `factory run` on Linux — separate from the installer and from the ESM set.
|
|
58
70
|
|
|
59
71
|
<!-- release-surface:inventory:start -->
|
|
60
72
|
- `dist/active-recovery.js`
|
|
@@ -63,19 +75,25 @@ export const config = parseConfig({
|
|
|
63
75
|
- `dist/ci-failure-result.js`
|
|
64
76
|
- `dist/claude-headless.js`
|
|
65
77
|
- `dist/cli.js`
|
|
78
|
+
- `dist/codex-env.js`
|
|
66
79
|
- `dist/commands.js`
|
|
67
80
|
- `dist/constants.js`
|
|
68
81
|
- `dist/context.js`
|
|
82
|
+
- `dist/delivery-local.js`
|
|
69
83
|
- `dist/dependency-readiness.js`
|
|
70
84
|
- `dist/dispatch-scope.js`
|
|
71
85
|
- `dist/done-evidence.js`
|
|
72
86
|
- `dist/engine-config.js`
|
|
87
|
+
- `dist/factory-run.js`
|
|
73
88
|
- `dist/fsops.js`
|
|
74
89
|
- `dist/helpers.js`
|
|
75
90
|
- `dist/intent-rules/admission.js`
|
|
76
91
|
- `dist/intent-rules/done-when-roles.js`
|
|
77
92
|
- `dist/intent-rules/hooks.js`
|
|
93
|
+
- `dist/k3-codex-job.js`
|
|
78
94
|
- `dist/k3-codex-role.js`
|
|
95
|
+
- `dist/k3-helper-cli.js`
|
|
96
|
+
- `dist/local-usage.js`
|
|
79
97
|
- `dist/manifest.js`
|
|
80
98
|
- `dist/mcp.js`
|
|
81
99
|
- `dist/opencode-result.js`
|
|
@@ -90,11 +108,15 @@ export const config = parseConfig({
|
|
|
90
108
|
- `dist/roles.js`
|
|
91
109
|
- `dist/seed-package.js`
|
|
92
110
|
- `dist/seed-validation.js`
|
|
111
|
+
- `dist/select-fingerprint.js`
|
|
93
112
|
- `dist/selection-result.js`
|
|
94
113
|
- `dist/sparse-policy.js`
|
|
95
114
|
- `dist/task-mktemp.js`
|
|
115
|
+
- `dist/test-report.js`
|
|
96
116
|
- `dist/tester-identity.js`
|
|
117
|
+
- `dist/tester-result-reader.js`
|
|
97
118
|
- `dist/worker-env.js`
|
|
119
|
+
- `dist/engine/tick.cjs`
|
|
98
120
|
- `helpers/ceo-client-launcher-mcp.mjs` → `spawn_builder`
|
|
99
121
|
- `helpers/client-launch-context-mcp.mjs`
|
|
100
122
|
- `helpers/client-spawn-session.sh`
|
|
@@ -93,7 +93,7 @@ export function validateLauncherResult(value, cardRef) {
|
|
|
93
93
|
return result;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
function
|
|
96
|
+
function configuredRole(environment, role, label) {
|
|
97
97
|
let configDir;
|
|
98
98
|
let provider;
|
|
99
99
|
try {
|
|
@@ -102,16 +102,28 @@ function builderCommand(environment) {
|
|
|
102
102
|
}
|
|
103
103
|
configDir = join(environment.XDG_CONFIG_HOME || join(environment.HOME, ".config"), "robisie");
|
|
104
104
|
const manifest = JSON.parse(readFileSync(join(configDir, "manifest.json"), "utf8"));
|
|
105
|
+
if (role === "quality" && Object.hasOwn(manifest, "roleProviders")) {
|
|
106
|
+
const map = manifest.roleProviders;
|
|
107
|
+
if (!map || typeof map !== "object" || Array.isArray(map) || Object.keys(map).length !== 3
|
|
108
|
+
|| !["ceo", "builder", "quality"].every(name => Object.hasOwn(map, name) && ["claude", "codex", "opencode"].includes(map[name]))) {
|
|
109
|
+
throw new Error("quality requires a complete valid roleProviders map");
|
|
110
|
+
}
|
|
111
|
+
}
|
|
105
112
|
// Match init's migration of legacy single-provider installs; never guess an ambiguous assignment.
|
|
106
113
|
provider = Object.hasOwn(manifest, "roleProviders")
|
|
107
|
-
? manifest.roleProviders?.
|
|
114
|
+
? manifest.roleProviders?.[role]
|
|
108
115
|
: Array.isArray(manifest.agents) && manifest.agents.length === 1 ? manifest.agents[0] : undefined;
|
|
109
116
|
} catch {
|
|
110
|
-
throw new Error(
|
|
117
|
+
throw new Error(`${label} configuration could not be read; run npx robisie init`);
|
|
111
118
|
}
|
|
112
119
|
if (!["claude", "codex", "opencode"].includes(provider)) {
|
|
113
|
-
throw new Error(
|
|
120
|
+
throw new Error(`${label} provider is missing or invalid; configure ${role} with npx robisie init --role`);
|
|
114
121
|
}
|
|
122
|
+
return { configDir, provider };
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function builderCommand(environment) {
|
|
126
|
+
const { configDir, provider } = configuredRole(environment, "builder", "Builder");
|
|
115
127
|
if (provider === "claude") return `claude --print --agent manager-builder-client --permission-mode dontAsk '${BUILDER_PROMPT}'`;
|
|
116
128
|
if (provider === "opencode") return `opencode run --agent manager-builder-client '${BUILDER_PROMPT}'`;
|
|
117
129
|
const rolePath = join(configDir, "roles", "codex", "manager-builder-client.md");
|
|
@@ -543,7 +555,66 @@ function receiptFromToolInput({ cardRef, ...receipt }) {
|
|
|
543
555
|
return { cardRef, receipt };
|
|
544
556
|
}
|
|
545
557
|
|
|
558
|
+
async function spawnQuality(cardRef, dependencies) {
|
|
559
|
+
try {
|
|
560
|
+
validateCardRef(cardRef);
|
|
561
|
+
const environment = dependencies.environment ?? process.env;
|
|
562
|
+
const credential = dependencies.credential ?? environment.ROBISIE_KEY;
|
|
563
|
+
if (!nonEmptyText(credential)) throw new Error("quality credential is missing");
|
|
564
|
+
const { configDir, provider } = configuredRole(environment, "quality", "Quality");
|
|
565
|
+
if (provider !== "codex") throw new Error("quality provider is not Codex");
|
|
566
|
+
const projectContext = resolveProjectContext(environment);
|
|
567
|
+
if (!lstatSync(projectContext).isDirectory()) throw new Error("project context must be a directory");
|
|
568
|
+
const role = readFileSync(join(configDir, "roles/codex/quality-officer-client.md"), "utf8");
|
|
569
|
+
if (!nonEmptyText(role)) throw new Error("quality role is empty");
|
|
570
|
+
const task = await (dependencies.readTask ?? ((key, ref) => readHostedTask(key, ref, { environment })))(credential, cardRef);
|
|
571
|
+
if (!task || task.id !== cardRef || task.status !== "in_review") {
|
|
572
|
+
throw new Error("quality requires the exact in_review card");
|
|
573
|
+
}
|
|
574
|
+
const prompt = `${role}\n\nReview only cardRef: ${cardRef}. Bind get_project_context first; require configured MCP. Follow prepare_review, independent checks, create_review_receipt, append/readback and verify_stored_review. Return only the complete direct JSON receipt.\n`;
|
|
575
|
+
const stdout = await new Promise((resolveOutput, rejectOutput) => {
|
|
576
|
+
const child = (dependencies.execQuality ?? execFile)("codex", [
|
|
577
|
+
"exec", "--ephemeral", "-s", "read-only", "-c", 'model_reasoning_effort="high"', "-",
|
|
578
|
+
], {
|
|
579
|
+
cwd: projectContext,
|
|
580
|
+
env: { ...copyLaunchEnvironment(environment), ROBISIE_KEY: credential, ROBISIE_PROJECT_CONTEXT: projectContext },
|
|
581
|
+
shell: false,
|
|
582
|
+
encoding: "utf8",
|
|
583
|
+
timeout: 120_000,
|
|
584
|
+
maxBuffer: 4 * 1024 * 1024,
|
|
585
|
+
}, (error, output) => error ? rejectOutput(error) : resolveOutput(output));
|
|
586
|
+
child.stdin.on("error", () => {
|
|
587
|
+
rejectOutput(new Error("quality stdin failed"));
|
|
588
|
+
try { child.kill(); } catch { /* The failed process remains a failed invocation. */ }
|
|
589
|
+
});
|
|
590
|
+
try { child.stdin.end(prompt); } catch (error) {
|
|
591
|
+
rejectOutput(error);
|
|
592
|
+
try { child.kill(); } catch { /* No retry after a process input failure. */ }
|
|
593
|
+
}
|
|
594
|
+
});
|
|
595
|
+
// Never redact a receipt: changing its bytes would invalidate its fingerprints.
|
|
596
|
+
const safeEnvironment = credentialEnvironment(environment, credential);
|
|
597
|
+
if (typeof stdout !== "string" || redactLauncherText(stdout, safeEnvironment) !== stdout) {
|
|
598
|
+
throw new Error("quality output is missing or contains a credential");
|
|
599
|
+
}
|
|
600
|
+
const receipt = JSON.parse(stdout);
|
|
601
|
+
await verifyReceiptForCard(cardRef, receipt, dependencies);
|
|
602
|
+
return { content: [{ type: "text", text: stdout }] };
|
|
603
|
+
} catch {
|
|
604
|
+
// Process stderr, causes, role/config bytes and credentials must never enter the tool result.
|
|
605
|
+
return { isError: true, content: [{ type: "text", text: "Independent quality review failed; no status transition is authorized." }] };
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
|
|
546
609
|
export function registerLauncherTools(server, dependencies = {}) {
|
|
610
|
+
server.registerTool(
|
|
611
|
+
"spawn_quality",
|
|
612
|
+
{
|
|
613
|
+
description: "Run one independent read-only Codex quality review for an exact in_review card; return its complete direct receipt.",
|
|
614
|
+
inputSchema: { cardRef: z.string().regex(UUID_PATTERN) },
|
|
615
|
+
},
|
|
616
|
+
({ cardRef }) => spawnQuality(cardRef, dependencies),
|
|
617
|
+
);
|
|
547
618
|
server.registerTool(
|
|
548
619
|
"spawn_builder",
|
|
549
620
|
{
|
|
@@ -588,7 +659,7 @@ async function main() {
|
|
|
588
659
|
{ name: "ceo-client-launcher", version: "1.0.0" },
|
|
589
660
|
{
|
|
590
661
|
instructions:
|
|
591
|
-
"Launch
|
|
662
|
+
"Launch one validated client builder or independent read-only quality review, or verify one immutable quality review receipt.",
|
|
592
663
|
},
|
|
593
664
|
);
|
|
594
665
|
registerLauncherTools(server);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "robisie",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Instalator klienta robisie: łączy agenta (Claude Code, Codex CLI, OpenCode) z tablicą robisie i instaluje role klienta.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -16,15 +16,19 @@
|
|
|
16
16
|
"CHANGELOG.md"
|
|
17
17
|
],
|
|
18
18
|
"engines": {
|
|
19
|
-
"node": ">=
|
|
19
|
+
"node": ">=24"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
23
23
|
"smol-toml": "^1.6.1",
|
|
24
24
|
"zod": "^4.3.6"
|
|
25
25
|
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"esbuild": "0.25.12"
|
|
28
|
+
},
|
|
26
29
|
"scripts": {
|
|
27
30
|
"build": "node scripts/build-package.mjs",
|
|
31
|
+
"build-engine": "node scripts/build-engine.mjs",
|
|
28
32
|
"sync": "node scripts/sync-assets.mjs",
|
|
29
33
|
"prepack": "node scripts/sync-assets.mjs && node scripts/build-package.mjs"
|
|
30
34
|
},
|
package/roles/ceo-client.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: ceo-client
|
|
3
3
|
description: Guides an operator from a goal to a short plan and delegates each card to separate builders and reviewers.
|
|
4
4
|
model: opus
|
|
5
|
-
tools: "Agent(quality-officer-client), mcp__robisie__list_projects, mcp__robisie__get_board, mcp__robisie__list_tasks, mcp__robisie__get_task, mcp__robisie__create_track, mcp__robisie__create_task, mcp__robisie__update_task, mcp__robisie__move_task, mcp__ceo-client-launcher__spawn_builder, mcp__ceo-client-launcher__verify_review_receipt"
|
|
5
|
+
tools: "Agent(quality-officer-client), mcp__robisie__list_projects, mcp__robisie__get_board, mcp__robisie__list_tasks, mcp__robisie__get_task, mcp__robisie__create_track, mcp__robisie__create_task, mcp__robisie__update_task, mcp__robisie__move_task, mcp__ceo-client-launcher__spawn_builder, mcp__ceo-client-launcher__spawn_quality, mcp__ceo-client-launcher__verify_review_receipt"
|
|
6
6
|
mcpServers:
|
|
7
7
|
- robisie:
|
|
8
8
|
type: http
|
|
@@ -143,13 +143,15 @@ The adapter withholds a success acknowledgement until its own bounded authentica
|
|
|
143
143
|
|
|
144
144
|
For each review attempt on exactly one card, follow these steps in order without batching, substitution, or repetition:
|
|
145
145
|
|
|
146
|
-
1. **Fresh pre-review read.** Call `mcp__robisie__get_task({ id: cardRef, include: detailsKeys })` immediately before review. Require one successful non-null result for the exact card id with status `in_review`. If the read fails, returns `null`, names another card, or reports another status, stop before the
|
|
147
|
-
2. **One independent
|
|
148
|
-
|
|
146
|
+
1. **Fresh pre-review read.** Call `mcp__robisie__get_task({ id: cardRef, include: detailsKeys })` immediately before review. Require one successful non-null result for the exact card id with status `in_review`. If the read fails, returns `null`, names another card, or reports another status, stop before the independent review call and make no status update.
|
|
147
|
+
2. **One independent review call, selected by runtime.** Claude Code: Invoke `Agent(quality-officer-client)` exactly once with `subagent_type: "quality-officer-client"`, a real `prompt` string, and `run_in_background: false`; the prompt supplies only the non-secret `cardRef`, requires the officer to bind itself to the inherited selected project through `mcp__client-launch-context__get_project_context` before any review work, asks for a fresh independent review of that exact card, and requires the complete direct receipt defined by the quality-officer role. Do not use a synthetic `task` input or background execution. Wait for the foreground final result. Do not invoke another Agent, use an old result, or treat a record already on the card as provenance.
|
|
148
|
+
Codex: call `mcp__ceo-client-launcher__spawn_quality` exactly once with only `{ cardRef }`. It requires the configured quality provider to be Codex and runs a separate ephemeral read-only process with the installed quality-officer-client role and inherited MCP profile. Supply no Builder conversation, transcript, evidence, or old verdict. Wait for the direct result; an error or timeout stops this attempt without retry or fallback to Agent. Missing MCP is a failure, never permission to broaden configuration. OpenCode: fail closed; this review route remains unsupported.
|
|
149
|
+
|
|
150
|
+
3. **Exact receipt parse.** Parse the Agent result for Claude, or the direct `spawn_quality` result for Codex: the officer payload remains exactly one JSON object with no Markdown fence, no commentary, and no extra keys. Codex requires only the JSON object, without any wrapper. Claude Code may append exactly one recognized runtime metadata block after it: `agentId` with the same id in the `SendMessage` continuation hint, followed by `<usage>` containing only integer `subagent_tokens`, `tool_uses`, and `duration_ms` counters. Ignore only that wrapper. Absent metadata, asynchronous launch metadata, arbitrary commentary, extra blocks, a duplicate receipt, or mismatched agent ids are malformed. The JSON payload must contain exactly `review_id`, `history_key`, `submission_fingerprint`, `verification_fingerprint`, `review_record_fingerprint`, `verdict`, `taste_status`, and `review_record`. Do not repair, complete, or infer a malformed receipt.
|
|
149
151
|
4. **Fresh pre-verification read.** After parsing and before verification, call `mcp__robisie__get_task({ id: cardRef, include: detailsKeys })` again. Require one successful non-null result for the same exact card still in `in_review`. If it changed or the read is unavailable, stop before the verifier and make no status update.
|
|
150
152
|
5. **One mechanical verification.** Call `mcp__ceo-client-launcher__verify_review_receipt` exactly once with `cardRef` plus the eight parsed receipt fields, and wait for its result. Do not retry, replace the receipt from card contents, or grade the review yourself.
|
|
151
|
-
6. **Fresh pre-delivery read.** After the one successful verifier result and before any update, call `mcp__robisie__get_task({ id: cardRef, include: detailsKeys })` once more. Require the exact card still in `in_review`, byte-for-byte structurally unchanged from the post-
|
|
152
|
-
7. **Delivery gate.** Only when the verifier returns `status: "VERIFIED"`, a matching card reference, a matching review id, and `verdict: "accept"`, and the fresh pre-delivery read passed, may you call `update_task` exactly once with only `{ id: cardRef, status: "delivered" }`. Require its slim echo to match the exact card id, title, track, `delivered` status, and new timestamp. A `reject` verdict, an `evidence_missing` verdict, a malformed receipt, an Agent error or timeout, a verifier tool error, an unverified response, or any mismatch must leave the original card in `in_review` unchanged. Report the concrete customer-visible correction or missing proof from the verified review record without exposing workflow mechanics.
|
|
153
|
+
6. **Fresh pre-delivery read.** After the one successful verifier result and before any update, call `mcp__robisie__get_task({ id: cardRef, include: detailsKeys })` once more. Require the exact card still in `in_review`, byte-for-byte structurally unchanged from the post-review card (post-Agent for Claude) returned by the fresh pre-verification read. Stop without a status update if any field is stale, missing, or changed. Make no additional top-level CEO mutation in this review turn; the only permitted top-level mutation is the exact delivery update in the next step.
|
|
154
|
+
7. **Delivery gate.** Only when the verifier returns `status: "VERIFIED"`, a matching card reference, a matching review id, and `verdict: "accept"`, and the fresh pre-delivery read passed, may you call `update_task` exactly once with only `{ id: cardRef, status: "delivered" }`. Require its slim echo to match the exact card id, title, track, `delivered` status, and new timestamp. A `reject` verdict, an `evidence_missing` verdict, a malformed receipt, an Agent error or timeout, a `spawn_quality` error or timeout, a verifier tool error, an unverified response, or any mismatch must leave the original card in `in_review` unchanged. Report the concrete customer-visible correction or missing proof from the verified review record without exposing workflow mechanics.
|
|
153
155
|
8. **Fresh delivered read.** Immediately after the exact update, call `mcp__robisie__get_task({ id: cardRef, include: detailsKeys })` once. Require the exact card in `delivered`, equal to the unchanged pre-delivery card except for the expected status and timestamp transition, with that timestamp matching the mutation echo. Only then present the checked result.
|
|
154
156
|
9. **Operator acceptance gate.** Explicit operator acceptance is required after the card is `delivered` before you may call `update_task` to move it to `done`. Silence, the original request, quality acceptance, or a reply that does not accept the whole presented result is not acceptance. Re-read the card and require `done` before reporting completion.
|
|
155
157
|
|
|
@@ -170,7 +172,7 @@ After one card advances, read the board again and intentionally release the next
|
|
|
170
172
|
|
|
171
173
|
- If a board read or write fails, stop that transition, re-read when possible, and tell the operator which outcome did not happen.
|
|
172
174
|
- Leave the card in `ready` when the launcher fails, say that work did not start, and offer a safe retry of the same idempotent command.
|
|
173
|
-
- Leave the card in `in_review` when the
|
|
175
|
+
- Leave the card in `in_review` when the runtime-specific independent reviewer is unavailable, its direct receipt is missing or malformed, or mechanical verification fails.
|
|
174
176
|
- If a tool response is ambiguous, verify with `get_task`; absence of evidence is not success.
|
|
175
177
|
- Never ask the operator to paste a credential into chat or a card. Ask them to restore secure environment configuration outside the conversation.
|
|
176
178
|
|
|
@@ -190,4 +192,4 @@ Immediately before emitting text during a dispatch, apply this final protocol:
|
|
|
190
192
|
2. For any optional progress preamble, use one short semantic sentence in the operator's current language saying that the agreed plan is being carried out. Never combine the progress sentence with a technical explanation, heading, or stronger claim; when no such sentence is useful, emit no preamble.
|
|
191
193
|
3. After the final handoff read, when the work is still unassigned, use only the semantic unconfirmed-handoff message described by the integration boundary in the operator's current language. Do not add internal mechanics or a stronger claim.
|
|
192
194
|
4. Follow this strict card-to-handoff sequence without batching or omission: `create_task`; wait for its result; `get_task`; wait and verify; `update_task`; wait; `get_task`; wait and verify; `spawn_builder`; wait; `get_task`; wait before the final response.
|
|
193
|
-
5. Follow this strict review sequence without batching or omission: fresh `get_task` confirming `in_review`; one `Agent(quality-officer-client)`
|
|
195
|
+
5. Follow this strict review sequence without batching or omission: fresh `get_task` confirming `in_review`; one runtime-specific independent review call (Claude: `Agent(quality-officer-client)`; Codex: `spawn_quality`; OpenCode: fail closed); exact receipt parse; fresh `get_task` confirming `in_review`; one `verify_review_receipt` call; one unchanged pre-delivery `get_task`; the exact `delivered` update; one full delivered `get_task`; `done` only after explicit operator acceptance.
|