robisie 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +69 -0
- package/README.md +76 -12
- package/dist/active-recovery.d.ts +58 -0
- package/dist/active-recovery.js +143 -0
- package/dist/agents.d.ts +34 -0
- package/dist/agents.js +77 -16
- package/dist/attempt-identity.d.ts +21 -0
- package/dist/attempt-identity.js +39 -0
- package/dist/ci-failure-result.d.ts +23 -0
- package/dist/ci-failure-result.js +90 -0
- package/dist/claude-headless.d.ts +7 -0
- package/dist/claude-headless.js +28 -0
- package/dist/cli.d.ts +17 -0
- package/dist/cli.js +55 -15
- package/dist/commands.d.ts +18 -0
- package/dist/commands.js +190 -85
- package/dist/constants.d.ts +32 -0
- package/dist/constants.js +3 -3
- package/dist/context.d.ts +24 -0
- package/dist/context.js +22 -6
- package/dist/dependency-readiness.d.ts +13 -0
- package/dist/dependency-readiness.js +80 -0
- package/dist/dispatch-scope.d.ts +18 -0
- package/dist/dispatch-scope.js +46 -0
- package/dist/done-evidence.d.ts +31 -0
- package/dist/done-evidence.js +216 -0
- package/dist/engine-config.d.ts +65 -0
- package/dist/engine-config.js +139 -0
- package/dist/fsops.d.ts +87 -0
- package/dist/fsops.js +117 -24
- package/dist/helpers.d.ts +15 -0
- package/dist/helpers.js +262 -45
- package/dist/intent-rules/admission.d.ts +10 -0
- package/dist/intent-rules/admission.js +35 -0
- package/dist/intent-rules/done-when-roles.d.ts +21 -0
- package/dist/intent-rules/done-when-roles.js +101 -0
- package/dist/intent-rules/hooks.d.ts +29 -0
- package/dist/intent-rules/hooks.js +23 -0
- package/dist/k3-codex-role.d.ts +20 -0
- package/dist/k3-codex-role.js +68 -0
- package/dist/manifest.d.ts +41 -0
- package/dist/manifest.js +59 -14
- package/dist/mcp.d.ts +18 -0
- package/dist/mcp.js +89 -39
- package/dist/opencode-result.d.ts +19 -0
- package/dist/opencode-result.js +136 -0
- package/dist/opencode-review-guard.d.ts +1 -0
- package/dist/opencode-review-guard.js +19 -0
- package/dist/opencode-session-export.d.ts +5 -0
- package/dist/opencode-session-export.js +28 -0
- package/dist/outcome-moves.d.ts +15 -0
- package/dist/outcome-moves.js +39 -0
- package/dist/planer-client.d.ts +214 -0
- package/dist/planer-client.js +351 -0
- package/dist/restart-recovery.d.ts +47 -0
- package/dist/restart-recovery.js +70 -0
- package/dist/review-source-packet.d.ts +17 -0
- package/dist/review-source-packet.js +44 -0
- package/dist/role-registry.d.ts +19 -0
- package/dist/role-registry.js +83 -0
- package/dist/role-results.d.ts +15 -0
- package/dist/role-results.js +42 -0
- package/dist/roles.d.ts +30 -0
- package/dist/roles.js +20 -16
- package/dist/seed-validation.d.ts +28 -0
- package/dist/seed-validation.js +294 -0
- package/dist/selection-result.d.ts +44 -0
- package/dist/selection-result.js +144 -0
- package/dist/sparse-policy.d.ts +8 -0
- package/dist/sparse-policy.js +49 -0
- package/dist/tester-identity.d.ts +11 -0
- package/dist/tester-identity.js +53 -0
- package/dist/worker-env.d.ts +5 -0
- package/dist/worker-env.js +34 -0
- package/docs/ENGINE-API.md +78 -0
- package/docs/ENGINE-CONFIG.md +115 -0
- package/docs/README.en.md +24 -15
- package/docs/README.md +26 -15
- package/docs/RELEASE-0.1.0.md +81 -8
- package/docs/RELEASE-0.1.1.md +110 -0
- package/helpers/ceo-client-launcher-mcp.mjs +36 -8
- package/helpers/client-spawn-session.sh +181 -0
- package/helpers/client-spawn.sh +825 -0
- package/package.json +9 -4
- package/roles/ceo-client.md +3 -2
- package/roles/manager-builder-client.md +18 -4
- package/roles/quality-officer-client.md +20 -6
package/docs/README.md
CHANGED
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
English: [README.en.md](README.en.md).
|
|
4
4
|
|
|
5
|
+
[API silnika](ENGINE-API.md).
|
|
6
|
+
|
|
5
7
|
<!-- sekcja: dostepnosc -->
|
|
6
8
|
## Dostępność
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
Zainstaluj robisie z npm w przygotowanym katalogu; w nim uruchamiaj dalsze polecenia i sesje agentów. [Przygotowanie](#wymagania) → [konto](#konto) → [klucz](#klucz) → [instalacja](#instalacja) → [odbiór](#recenzja-i-odbior).
|
|
9
11
|
|
|
10
12
|
<!-- sekcja: wymagania -->
|
|
11
13
|
<a id="wymagania"></a>
|
|
@@ -13,7 +15,7 @@ Ten przewodnik dotyczy otrzymanego pliku `robisie-0.1.0.tgz`, bez pobierania ins
|
|
|
13
15
|
|
|
14
16
|
Człowiek przygotowuje Node.js 20+, 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. 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. Na Windows używaj WSL (ścieżki POSIX).
|
|
15
17
|
|
|
16
|
-
Przygotuj pusty katalog na dysku
|
|
18
|
+
Przygotuj pusty katalog na dysku. Nie potrzebujesz strony ani pliku `package.json`; instalacja npm utworzy pliki zależności. To katalog pracy agentów, niezależny od projektu w panelu.
|
|
17
19
|
|
|
18
20
|
<!-- sekcja: konto -->
|
|
19
21
|
<a id="konto"></a>
|
|
@@ -35,16 +37,19 @@ Paczka zapisuje **jeden klucz dla CEO, Buildera i Quality Officera** jako `ROBIS
|
|
|
35
37
|
|
|
36
38
|
<!-- sekcja: instalacja -->
|
|
37
39
|
<a id="instalacja"></a>
|
|
38
|
-
## Instalacja
|
|
40
|
+
## Instalacja z npm
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
Po przygotowaniu konta i klucza człowiek otwiera terminal w przygotowanym katalogu. Trzy kroki: instalacja, init z ukrytym pytaniem o klucz, doctor. W zsh/bash usuń stary ENV przed init i wczytaj zapisany klucz przed doctor — init nie ustawia środowiska rodzica:
|
|
41
43
|
|
|
42
44
|
```sh
|
|
43
|
-
npm i
|
|
44
|
-
|
|
45
|
+
npm i robisie
|
|
46
|
+
unset ROBISIE_KEY
|
|
47
|
+
npx robisie init --agent claude
|
|
48
|
+
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key" ] && export ROBISIE_KEY="$(cat "${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key")"
|
|
49
|
+
npx robisie doctor
|
|
45
50
|
```
|
|
46
51
|
|
|
47
|
-
Oczekiwany wynik: 0.
|
|
52
|
+
Dla Codex lub OpenCode zastąp `claude` przez `codex` lub `opencode`. Przy wcześniejszej konfiguracji użyj pełnej mapy z następnej sekcji; samo `--agent` jej nie kasuje. Oczekiwany wynik doctor: exit 0. Awaryjnie otrzymany plik zainstaluj przez `npm i ./robisie-0.1.0.tgz`. Pomocniki `client-launch-context` i `ceo-client-launcher` agent uruchamia przez `npx -y robisie@0.1.0 mcp <nazwa>`; lokalna paczka musi być dostępna z cwd sesji.
|
|
48
53
|
|
|
49
54
|
<!-- sekcja: init -->
|
|
50
55
|
## Połączenie agenta
|
|
@@ -108,11 +113,15 @@ Doctor uruchamia plik pomocnika przez node, agent przez npx. `ROBISIE_PROJECT_CO
|
|
|
108
113
|
<!-- sekcja: pierwsza-karta -->
|
|
109
114
|
## Pierwsza karta i start Buildera
|
|
110
115
|
|
|
111
|
-
Człowiek uruchamia CEO w katalogu instalacji: `claude --agent ceo-client`, albo `codex` i prosi o rolę robisie CEO (odczyt pełnego pliku wskazanego w AGENTS.md), albo `opencode` i wybiera `ceo-client`. Po poprawnym discovery przekaż prośbę, która działa
|
|
116
|
+
Człowiek uruchamia CEO w katalogu instalacji: `claude --agent ceo-client`, albo `codex` i prosi o rolę robisie CEO (odczyt pełnego pliku wskazanego w AGENTS.md), albo `opencode` i wybiera `ceo-client`. Po poprawnym discovery przekaż prośbę, która działa po instalacji npm z samym README:
|
|
112
117
|
|
|
113
118
|
> Utwórz w tym katalogu plik wynik.txt z dokładną treścią „robisie działa” i końcowym znakiem nowej linii. Sprawdź odczytem, że treść jest dokładnie taka. Granice: tylko ten plik, bez zależności, kont i publikacji. Przygotuj zakres i zaczekaj na moją zgodę; po pracy potrzebuję niezależnej recenzji i mojego odbioru.
|
|
114
119
|
|
|
115
|
-
|
|
120
|
+
Po zgodzie człowieka CEO domyślnie wywołuje `spawn_builder` z ID karty potwierdzonej w `ready`. Pełny przebieg w Claude Code: `draft` → `ready` → `in_progress` → `in_review` → niezależna recenzja i verified receipt → `delivered` → odbiór właściciela → `done`; granice odbioru dla pozostałych sesji opisuje sekcja [Recenzja i jawny odbiór](#recenzja-i-odbior).
|
|
121
|
+
|
|
122
|
+
Przy błędzie `spawn_builder` CEO zgłasza błąd i naprawia przyczynę przed ponowieniem; nie przełącza automatycznie na ręczny start.
|
|
123
|
+
|
|
124
|
+
Ręczny start to wyłącznie jawny wybór operatora: wtedy CEO podaje polecenie do uruchomienia w nowym terminalu w katalogu instalacji.
|
|
116
125
|
|
|
117
126
|
ID pochodzi z utworzonej lub odczytanej karty, nie z projektu ani sesji. Poniżej fikcyjny przykład małego kanonicznego UUID; zastąp go dokładnym ID karty. Przykład Codex zakłada XDG_CONFIG_HOME=/home/tester/Robisie config: zastąp całą ścieżkę rzeczywistą z instalacji (domyślnie $HOME/.config/robisie/roles/codex/manager-builder-client.md). Tylda wewnątrz cytowanego promptu nie rozwinie się. Wybierz jedno polecenie:
|
|
118
127
|
|
|
@@ -128,16 +137,18 @@ Oczekiwany wynik startu: świeży odczyt CEO potwierdza przydzieloną kartę in_
|
|
|
128
137
|
<a id="recenzja-i-odbior"></a>
|
|
129
138
|
## Recenzja i jawny odbiór
|
|
130
139
|
|
|
131
|
-
CEO uruchamia niezależnego Quality Officera przez `Agent(quality-officer-client)`, po świeżym odczycie in_review. Quality Officer niezależnie sprawdza wynik i zapisuje recenzję oraz dowody na karcie; Builder nie recenzuje własnej pracy. Sprawdzenie dowodów i jawna zgoda na odbiór to obowiązek operatora. Po zweryfikowanej recenzji i przejściu do delivered sprawdź kryteria odbioru; jeśli do odbioru brakuje dowodów lub Twojej zgody, pozostaw kartę w `delivered`.
|
|
140
|
+
W Claude Code CEO uruchamia niezależnego Quality Officera przez `Agent(quality-officer-client)`, po świeżym odczycie in_review. Quality Officer niezależnie sprawdza wynik i zapisuje recenzję oraz dowody na karcie; Builder nie recenzuje własnej pracy. CEO weryfikuje potwierdzenie recenzji (verified receipt) i wykonuje świeże odczyty karty wymagane przez protokół przed przejściem do `delivered`; następnie jawny odbiór operatora pozwala przejść do `done`. Sprawdzenie dowodów i jawna zgoda na odbiór to obowiązek operatora. Po zweryfikowanej recenzji i przejściu do delivered sprawdź kryteria odbioru; jeśli do odbioru brakuje dowodów lub Twojej zgody, pozostaw kartę w `delivered`.
|
|
141
|
+
|
|
142
|
+
OpenCode: karta pozostaje w `in_review` niezależnie od dostępności narzędzia Agent; brak wspieranego przejścia do `delivered`. Pełny odbiór wymaga opisanej wyżej ścieżki w Claude Code. Wynik task/VERIFIED, etykieta roli ani sam JSON receiptu nie otwierają tego przejścia; nie obchodź odmowy ręczną zmianą statusu ani samorecenzją.
|
|
132
143
|
|
|
133
|
-
|
|
144
|
+
W innych sesjach CEO, w tym Codex, przejście do delivered wymaga niezależnej recenzji oraz zweryfikowanego potwierdzenia (verified receipt). Jeśli w sesji CEO brakuje narzędzia Agent, karta pozostaje w `in_review`: to brak zdolności produktu wymagający naprawy CEO/CR. Nie zastępuj recenzji oceną Buildera ani ręczną zmianą etapu. Sama konfiguracja trzech ról nie zapewnia tej integracji.
|
|
134
145
|
|
|
135
146
|
Właściciel projektu może w panelu: Dashboard → Planer → karta → Etap wybrać „Zrobione” i przesunąć `delivered` do `done`, także przy kluczu agenta `worker`. Dla opisanej pierwszej karty serwer nie wymusza zapisanej akceptacji ani dowodów przed zmianą na `done`: panel pozwala właścicielowi wybrać „Zrobione” także bez nich. Zrób to dopiero po sprawdzeniu wyniku i jawnym odbiorze. Panel nie edytuje szczegółów `details`; recenzję i dowody zapisuje się przez obsługiwany przepływ narzędzi tablicy. Sama instrukcja nie dowodzi, że ten przebieg przeszedł już u klienta.
|
|
136
147
|
|
|
137
148
|
<!-- sekcja: aktualizacja -->
|
|
138
149
|
## Aktualizacja
|
|
139
150
|
|
|
140
|
-
|
|
151
|
+
W katalogu instalacji wykonaj `npm i robisie@latest` → `npx robisie init` → `npx robisie doctor`. Doctor sprawdza zgodność MAJOR kontraktu serwera; oczekiwany wynik to zgodna wersja, pełna konfiguracja i exit 0. Przy niezgodności wybierz zgodne wydanie zamiast ponawiać tę samą instalację. Przy uszkodzonych plikach przeinstaluj paczkę z npm; awaryjnie użyj otrzymanego zgodnego tgz przez `npm i ./robisie-0.1.0.tgz`. Do lokalnego powrotu zachowaj poprzedni zgodny tgz i kopię konfiguracji, zainstaluj go tą samą komendą, potem uruchom init i doctor.
|
|
141
152
|
|
|
142
153
|
<!-- sekcja: odinstalowanie -->
|
|
143
154
|
## Odinstalowanie
|
|
@@ -159,16 +170,16 @@ Komunikaty CLI pozostają po polsku. Dopasuj komunikat, a potem wykonaj wskazan
|
|
|
159
170
|
| brak-klucza | `Brak klucza robisie.` | Wygeneruj klucz w Connect i przekaż go do init. |
|
|
160
171
|
| odrzucony-klucz | `Serwer robisie odrzucił klucz (nieważny albo unieważniony).` | Wygeneruj nowy klucz worker; w zsh/bash wykonaj `unset ROBISIE_KEY`, potem init z ukrytym pytaniem. |
|
|
161
172
|
| brak-odczytu | `Ten klucz nie ma uprawnień do odczytu tablicy (np. rola seeder).` | Wybierz worker w Connect; `unset ROBISIE_KEY`, potem init z ukrytym pytaniem. |
|
|
162
|
-
| major | `Wersja kontraktu serwera (2.0.0) nie pasuje do paczki robisie 0.1.0 (obsługuje 1.x).` | Przykład niezgodnego MAJOR:
|
|
173
|
+
| major | `Wersja kontraktu serwera (2.0.0) nie pasuje do paczki robisie 0.1.0 (obsługuje 1.x).` | Przykład niezgodnego MAJOR: zainstaluj wydanie zgodne z kontraktem serwera. |
|
|
163
174
|
| brak-env | `Zmienna ROBISIE_KEY nie jest ustawiona — role i agenci jej potrzebują.` | Sprawdź obsługę profilu; przy --no-shell/innej powłoce wczytaj plik klucza do środowiska sesji jak w init, potem doctor. |
|
|
164
175
|
| brak-programu | `katalog jest, programu nie ma w PATH` | Zainstaluj program wskazanego dostawcy lub dodaj go do PATH; sam katalog konfiguracji nie wystarcza. |
|
|
165
176
|
| brak-programu-i-katalogu | `brak programu w PATH i katalogu dostawcy` | Zainstaluj wybrany program, ponów init z pełną wspólną mapą i doctor. |
|
|
166
177
|
| jsonc | `nie zmieniam automatycznie` | Zachowaj JSONC; przygotuj wspierany JSON albo wybierz innego dostawcę dla wszystkich ról. Sam zdalny MCP nie wystarcza. |
|
|
167
178
|
| niepelna-instalacja | `Claude Code: niepełna instalacja` | Przykład brakującej konfiguracji: ponów init dla swojego agenta. |
|
|
168
179
|
|
|
169
|
-
Po naprawie uruchom lokalne `npx robisie init` i `npx robisie doctor`; przy braku plików najpierw przeinstaluj
|
|
180
|
+
Po naprawie uruchom lokalne `npx robisie init` i `npx robisie doctor`; przy braku plików najpierw przeinstaluj paczkę z npm, przy MAJOR uzyskaj zgodne wydanie. Jeśli problem pozostaje, przekaż zespołowi komunikat, wersję i cwd bez klucza. Przy uninstall wynik to usunięte wpisy i exit 0; kod 1 wymaga wskazanej naprawy, nie oznacza pełnego usunięcia.
|
|
170
181
|
|
|
171
182
|
<!-- sekcja: ograniczenia -->
|
|
172
183
|
## Ograniczenia
|
|
173
184
|
|
|
174
|
-
|
|
185
|
+
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.
|
package/docs/RELEASE-0.1.0.md
CHANGED
|
@@ -4,13 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
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
6
|
|
|
7
|
-
Wymagania: Node.js >=20, npm i własny zainstalowany agent z dostępem do dostawcy AI; połączenie z robisie i klucz z Connect. Windows
|
|
7
|
+
Wymagania 0.1: macOS lub Linux, Node.js >=20, npm i 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
8
|
|
|
9
|
-
Dostępność:
|
|
9
|
+
Dostępność: instalacja z npm przez `npm i robisie` w katalogu pracy agenta; dalsze kroki opisuje [README](README.md).
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
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
12
|
|
|
13
|
-
|
|
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.
|
|
14
|
+
|
|
15
|
+
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
|
+
|
|
17
|
+
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.
|
|
14
18
|
|
|
15
19
|
Ten dokument nie potwierdza tagu, GitHub Release ani publikacji npm.
|
|
16
20
|
|
|
@@ -18,12 +22,81 @@ Ten dokument nie potwierdza tagu, GitHub Release ani publikacji npm.
|
|
|
18
22
|
|
|
19
23
|
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.
|
|
20
24
|
|
|
21
|
-
Requirements: Node.js >=20, npm, an installed agent with your own AI provider access, a robisie connection and a Connect key. Windows
|
|
25
|
+
Requirements for 0.1: macOS or Linux, Node.js >=20, 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
|
+
|
|
27
|
+
Availability: install from npm with `npm i robisie` in the agent working directory; follow [README](README.en.md) for the next steps.
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
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.
|
|
24
30
|
|
|
25
|
-
Limitations: all three roles currently need the same provider; `doctor` rejects mixed assignments.
|
|
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.
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+
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
|
+
|
|
35
|
+
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.
|
|
28
36
|
|
|
29
37
|
This document does not confirm a tag, GitHub Release or npm publication.
|
|
38
|
+
|
|
39
|
+
## Wspólny przykład PL/EN / Shared PL/EN example
|
|
40
|
+
|
|
41
|
+
Przykład zwraca konfigurację instancji bez uruchamiania silnika; `./state` jest liczone względem pliku konfiguracji. / The example returns instance configuration without starting the engine; `./state` is resolved relative to the configuration file.
|
|
42
|
+
|
|
43
|
+
<!-- release-surface:example:start -->
|
|
44
|
+
```js
|
|
45
|
+
import { parseConfig } from 'robisie/dist/engine-config.js';
|
|
46
|
+
|
|
47
|
+
export const config = parseConfig({
|
|
48
|
+
project: 'example-project',
|
|
49
|
+
tracks: [{ id: 'example-track', name: 'Praca' }],
|
|
50
|
+
stateDir: './state',
|
|
51
|
+
}, '/example/robisie.config.json');
|
|
52
|
+
```
|
|
53
|
+
<!-- release-surface:example:end -->
|
|
54
|
+
|
|
55
|
+
## Zawartość paczki / Package inventory
|
|
56
|
+
|
|
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.
|
|
58
|
+
|
|
59
|
+
<!-- release-surface:inventory:start -->
|
|
60
|
+
- `dist/active-recovery.js`
|
|
61
|
+
- `dist/agents.js`
|
|
62
|
+
- `dist/attempt-identity.js`
|
|
63
|
+
- `dist/ci-failure-result.js`
|
|
64
|
+
- `dist/claude-headless.js`
|
|
65
|
+
- `dist/cli.js`
|
|
66
|
+
- `dist/commands.js`
|
|
67
|
+
- `dist/constants.js`
|
|
68
|
+
- `dist/context.js`
|
|
69
|
+
- `dist/dependency-readiness.js`
|
|
70
|
+
- `dist/dispatch-scope.js`
|
|
71
|
+
- `dist/done-evidence.js`
|
|
72
|
+
- `dist/engine-config.js`
|
|
73
|
+
- `dist/fsops.js`
|
|
74
|
+
- `dist/helpers.js`
|
|
75
|
+
- `dist/intent-rules/admission.js`
|
|
76
|
+
- `dist/intent-rules/done-when-roles.js`
|
|
77
|
+
- `dist/intent-rules/hooks.js`
|
|
78
|
+
- `dist/k3-codex-role.js`
|
|
79
|
+
- `dist/manifest.js`
|
|
80
|
+
- `dist/mcp.js`
|
|
81
|
+
- `dist/opencode-result.js`
|
|
82
|
+
- `dist/opencode-review-guard.js`
|
|
83
|
+
- `dist/opencode-session-export.js`
|
|
84
|
+
- `dist/outcome-moves.js`
|
|
85
|
+
- `dist/planer-client.js`
|
|
86
|
+
- `dist/restart-recovery.js`
|
|
87
|
+
- `dist/review-source-packet.js`
|
|
88
|
+
- `dist/role-registry.js`
|
|
89
|
+
- `dist/role-results.js`
|
|
90
|
+
- `dist/roles.js`
|
|
91
|
+
- `dist/seed-validation.js`
|
|
92
|
+
- `dist/selection-result.js`
|
|
93
|
+
- `dist/sparse-policy.js`
|
|
94
|
+
- `dist/tester-identity.js`
|
|
95
|
+
- `dist/worker-env.js`
|
|
96
|
+
- `helpers/ceo-client-launcher-mcp.mjs` → `spawn_builder`
|
|
97
|
+
- `helpers/client-launch-context-mcp.mjs`
|
|
98
|
+
- `helpers/client-spawn-session.sh`
|
|
99
|
+
- `helpers/client-spawn.sh`
|
|
100
|
+
- `helpers/lib/client-review-receipt.mjs`
|
|
101
|
+
- `helpers/lib/client-spawn-failure.mjs`
|
|
102
|
+
<!-- release-surface:inventory:end -->
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# robisie 0.1.1 — wydanie utrzymaniowe / maintenance release
|
|
2
|
+
|
|
3
|
+
## Polski
|
|
4
|
+
|
|
5
|
+
0.1.1 zbiera poprawki instalacji, uprawnień prywatnych plików, kopii zapasowych, odmowy przekierowania MCP z poświadczeniem, bezpiecznej diagnostyki i odzyskiwania oraz bibliotek API klienta. [CHANGELOG](https://github.com/chuppa12/robisie-app/blob/main/packages/client/CHANGELOG.md) wymienia dokładnie 45 kart z lokalnym odbiorem TAK (E3: 26, E4: 4, E5: 3, E6: 12). Lokalny odbiór nie potwierdza publikacji ani działania wersji pobranej z npm.
|
|
6
|
+
|
|
7
|
+
Ograniczenia odbioru 0.1.1: `805aad70` — krok 5 z rolami i pomocnikami w prawdziwej sesji Claude Code nie został sprawdzony; pomocniki sprawdzono bezpośrednio przez `robisie mcp`. `80931e36` — profil Bash sprawdzono z symulacją macOS na Linuksie; rzeczywisty przebieg na Macu pozostaje otwarty. Dla `9d10bca2` i `13bafb12` lokalny odbiór dotyczy konsumenta paczki; integracja z usługą klienta to osobny odbiór. Odmowa `init` może pozostawić częściową instalację (`1bd3a86d`); rozwiąż zgłoszony problem i sprawdź stan, zanim ponowisz. Żadna z tych granic nie znika po instalacji.
|
|
8
|
+
|
|
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.
|
|
10
|
+
|
|
11
|
+
Wymagania 0.1: macOS lub Linux, Node.js >=20, npm i 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.
|
|
12
|
+
|
|
13
|
+
Instalacja kandydata: `npm i ./robisie-0.1.1.tgz`; po potwierdzonej publikacji: `npm i robisie@0.1.1` w katalogu pracy agenta; dalsze kroki opisuje [README](README.md).
|
|
14
|
+
|
|
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.
|
|
16
|
+
|
|
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.
|
|
18
|
+
|
|
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, politykę sparse (`sparse-policy`), 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.
|
|
20
|
+
|
|
21
|
+
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.
|
|
22
|
+
|
|
23
|
+
Ten dokument nie potwierdza tagu, GitHub Release ani publikacji npm.
|
|
24
|
+
|
|
25
|
+
## English
|
|
26
|
+
|
|
27
|
+
0.1.1 collects fixes for installation, private file permissions, backups, refusal of credential-bearing MCP redirects, safe diagnostics and recovery, plus client API libraries. [CHANGELOG](https://github.com/chuppa12/robisie-app/blob/main/packages/client/CHANGELOG.md) lists exactly 45 locally accepted cards (E3: 26, E4: 4, E5: 3, E6: 12). Local acceptance establishes neither publication nor behavior of the version installed from npm.
|
|
28
|
+
|
|
29
|
+
0.1.1 acceptance limits: step 5 of `805aad70`, covering roles and helpers in a real Claude Code session, remains unverified; helpers were checked directly through `robisie mcp`. The Bash profile for `80931e36` was checked with macOS simulated on Linux; the real Mac run remains open. Local acceptance for `9d10bca2` and `13bafb12` covers the package consumer; integration with the customer service requires separate acceptance. A refused `init` may leave a partial installation (`1bd3a86d`); resolve the reported problem and check its state before retrying. Installation does not remove these limits.
|
|
30
|
+
|
|
31
|
+
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.
|
|
32
|
+
|
|
33
|
+
Requirements for 0.1: macOS or Linux, Node.js >=20, 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.
|
|
34
|
+
|
|
35
|
+
Candidate installation: `npm i ./robisie-0.1.1.tgz`; after confirmed publication: `npm i robisie@0.1.1` in the agent working directory; follow [README](README.en.md) for the next steps.
|
|
36
|
+
|
|
37
|
+
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.
|
|
38
|
+
|
|
39
|
+
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.
|
|
40
|
+
|
|
41
|
+
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, sparse policy (`sparse-policy`), 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.
|
|
42
|
+
|
|
43
|
+
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.
|
|
44
|
+
|
|
45
|
+
This document does not confirm a tag, GitHub Release or npm publication.
|
|
46
|
+
|
|
47
|
+
## Wspólny przykład PL/EN / Shared PL/EN example
|
|
48
|
+
|
|
49
|
+
Przykład zwraca konfigurację instancji bez uruchamiania silnika; `./state` jest liczone względem pliku konfiguracji. / The example returns instance configuration without starting the engine; `./state` is resolved relative to the configuration file.
|
|
50
|
+
|
|
51
|
+
<!-- release-surface:example:start -->
|
|
52
|
+
```js
|
|
53
|
+
import { parseConfig } from 'robisie/dist/engine-config.js';
|
|
54
|
+
|
|
55
|
+
export const config = parseConfig({
|
|
56
|
+
project: 'example-project',
|
|
57
|
+
tracks: [{ id: 'example-track', name: 'Praca' }],
|
|
58
|
+
stateDir: './state',
|
|
59
|
+
}, '/example/robisie.config.json');
|
|
60
|
+
```
|
|
61
|
+
<!-- release-surface:example:end -->
|
|
62
|
+
|
|
63
|
+
## Zawartość paczki / Package inventory
|
|
64
|
+
|
|
65
|
+
Ś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.
|
|
66
|
+
|
|
67
|
+
<!-- release-surface:inventory:start -->
|
|
68
|
+
- `dist/active-recovery.js`
|
|
69
|
+
- `dist/agents.js`
|
|
70
|
+
- `dist/attempt-identity.js`
|
|
71
|
+
- `dist/ci-failure-result.js`
|
|
72
|
+
- `dist/claude-headless.js`
|
|
73
|
+
- `dist/cli.js`
|
|
74
|
+
- `dist/commands.js`
|
|
75
|
+
- `dist/constants.js`
|
|
76
|
+
- `dist/context.js`
|
|
77
|
+
- `dist/dependency-readiness.js`
|
|
78
|
+
- `dist/dispatch-scope.js`
|
|
79
|
+
- `dist/done-evidence.js`
|
|
80
|
+
- `dist/engine-config.js`
|
|
81
|
+
- `dist/fsops.js`
|
|
82
|
+
- `dist/helpers.js`
|
|
83
|
+
- `dist/intent-rules/admission.js`
|
|
84
|
+
- `dist/intent-rules/done-when-roles.js`
|
|
85
|
+
- `dist/intent-rules/hooks.js`
|
|
86
|
+
- `dist/k3-codex-role.js`
|
|
87
|
+
- `dist/manifest.js`
|
|
88
|
+
- `dist/mcp.js`
|
|
89
|
+
- `dist/opencode-result.js`
|
|
90
|
+
- `dist/opencode-review-guard.js`
|
|
91
|
+
- `dist/opencode-session-export.js`
|
|
92
|
+
- `dist/outcome-moves.js`
|
|
93
|
+
- `dist/planer-client.js`
|
|
94
|
+
- `dist/restart-recovery.js`
|
|
95
|
+
- `dist/review-source-packet.js`
|
|
96
|
+
- `dist/role-registry.js`
|
|
97
|
+
- `dist/role-results.js`
|
|
98
|
+
- `dist/roles.js`
|
|
99
|
+
- `dist/seed-validation.js`
|
|
100
|
+
- `dist/selection-result.js`
|
|
101
|
+
- `dist/sparse-policy.js`
|
|
102
|
+
- `dist/tester-identity.js`
|
|
103
|
+
- `dist/worker-env.js`
|
|
104
|
+
- `helpers/ceo-client-launcher-mcp.mjs` → `spawn_builder`
|
|
105
|
+
- `helpers/client-launch-context-mcp.mjs`
|
|
106
|
+
- `helpers/client-spawn-session.sh`
|
|
107
|
+
- `helpers/client-spawn.sh`
|
|
108
|
+
- `helpers/lib/client-review-receipt.mjs`
|
|
109
|
+
- `helpers/lib/client-spawn-failure.mjs`
|
|
110
|
+
<!-- release-surface:inventory:end -->
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { execFile } from "node:child_process";
|
|
4
|
-
import { accessSync, constants, lstatSync, realpathSync } from "node:fs";
|
|
5
|
-
import { resolve } from "node:path";
|
|
4
|
+
import { accessSync, constants, lstatSync, readFileSync, realpathSync } from "node:fs";
|
|
5
|
+
import { join, resolve } from "node:path";
|
|
6
6
|
import { promisify } from "node:util";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
|
|
@@ -16,6 +16,7 @@ import { verifyReviewReceipt } from "./lib/client-review-receipt.mjs";
|
|
|
16
16
|
import { createSpawnFailureRecord } from "./lib/client-spawn-failure.mjs";
|
|
17
17
|
|
|
18
18
|
const execFileAsync = promisify(execFile);
|
|
19
|
+
const CLIENT_SPAWN_PATH = fileURLToPath(new URL("./client-spawn.sh", import.meta.url));
|
|
19
20
|
const UUID_PATTERN = /^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/;
|
|
20
21
|
const HISTORY_KEY_PATTERN =
|
|
21
22
|
/^quality_review_[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/u;
|
|
@@ -23,12 +24,12 @@ const SHA_PATTERN = /^[0-9a-f]{64}$/u;
|
|
|
23
24
|
const PLANER_ENDPOINT = new URL("https://robisie.app/api/mcp");
|
|
24
25
|
const MCP_CALL_TIMEOUT_MS = 30_000;
|
|
25
26
|
const MCP_CLOSE_TIMEOUT_MS = 5_000;
|
|
26
|
-
const
|
|
27
|
-
"claude --print --agent manager-builder-client --permission-mode dontAsk 'Start the assigned client task now. Read launch context first and follow the role contract through review handoff.'";
|
|
27
|
+
const BUILDER_PROMPT = "Start the assigned client task now. Read launch context first and follow the role contract through review handoff.";
|
|
28
28
|
const RESERVATION_TIMEOUT_MS = 30_000;
|
|
29
29
|
const RESERVATION_POLL_MS = 500;
|
|
30
30
|
const BASE_ENV_NAMES = [
|
|
31
31
|
"HOME",
|
|
32
|
+
"CODEX_HOME",
|
|
32
33
|
"LANG",
|
|
33
34
|
"LC_ALL",
|
|
34
35
|
"LC_CTYPE",
|
|
@@ -40,6 +41,7 @@ const BASE_ENV_NAMES = [
|
|
|
40
41
|
"TMPDIR",
|
|
41
42
|
"USER",
|
|
42
43
|
"XDG_DATA_DIRS",
|
|
44
|
+
"XDG_CONFIG_HOME",
|
|
43
45
|
];
|
|
44
46
|
const LAUNCH_ENV_NAMES = [
|
|
45
47
|
...BASE_ENV_NAMES,
|
|
@@ -91,6 +93,32 @@ export function validateLauncherResult(value, cardRef) {
|
|
|
91
93
|
return result;
|
|
92
94
|
}
|
|
93
95
|
|
|
96
|
+
function builderCommand(environment) {
|
|
97
|
+
let configDir;
|
|
98
|
+
let provider;
|
|
99
|
+
try {
|
|
100
|
+
if (!environment.XDG_CONFIG_HOME && !environment.HOME) {
|
|
101
|
+
throw new Error("configuration directory is missing");
|
|
102
|
+
}
|
|
103
|
+
configDir = join(environment.XDG_CONFIG_HOME || join(environment.HOME, ".config"), "robisie");
|
|
104
|
+
const manifest = JSON.parse(readFileSync(join(configDir, "manifest.json"), "utf8"));
|
|
105
|
+
// Match init's migration of legacy single-provider installs; never guess an ambiguous assignment.
|
|
106
|
+
provider = Object.hasOwn(manifest, "roleProviders")
|
|
107
|
+
? manifest.roleProviders?.builder
|
|
108
|
+
: Array.isArray(manifest.agents) && manifest.agents.length === 1 ? manifest.agents[0] : undefined;
|
|
109
|
+
} catch {
|
|
110
|
+
throw new Error("Builder configuration could not be read; run npx robisie init");
|
|
111
|
+
}
|
|
112
|
+
if (!["claude", "codex", "opencode"].includes(provider)) {
|
|
113
|
+
throw new Error("Builder provider is missing or invalid; configure builder with npx robisie init --role");
|
|
114
|
+
}
|
|
115
|
+
if (provider === "claude") return `claude --print --agent manager-builder-client --permission-mode dontAsk '${BUILDER_PROMPT}'`;
|
|
116
|
+
if (provider === "opencode") return `opencode run --agent manager-builder-client '${BUILDER_PROMPT}'`;
|
|
117
|
+
const rolePath = join(configDir, "roles", "codex", "manager-builder-client.md");
|
|
118
|
+
const prompt = `Act as the robisie Builder: read ${rolePath} in full and follow it. ${BUILDER_PROMPT}`;
|
|
119
|
+
return `codex exec '${prompt.replace(/'/g, "'\\''")}'`;
|
|
120
|
+
}
|
|
121
|
+
|
|
94
122
|
export function buildLaunchContract(cardRef, projectContext, sourceEnvironment) {
|
|
95
123
|
const validatedCardRef = validateCardRef(cardRef);
|
|
96
124
|
if (
|
|
@@ -101,12 +129,12 @@ export function buildLaunchContract(cardRef, projectContext, sourceEnvironment)
|
|
|
101
129
|
throw new Error("project context must be one absolute directory path");
|
|
102
130
|
}
|
|
103
131
|
return {
|
|
104
|
-
file:
|
|
132
|
+
file: CLIENT_SPAWN_PATH,
|
|
105
133
|
args: [validatedCardRef],
|
|
106
134
|
cwd: projectContext,
|
|
107
135
|
env: {
|
|
108
136
|
...copyLaunchEnvironment(sourceEnvironment),
|
|
109
|
-
ROBISIE_AGENT_COMMAND:
|
|
137
|
+
ROBISIE_AGENT_COMMAND: builderCommand(sourceEnvironment),
|
|
110
138
|
ROBISIE_PROJECT_CONTEXT: projectContext,
|
|
111
139
|
},
|
|
112
140
|
};
|
|
@@ -380,10 +408,10 @@ function validateRuntimeContract(contract) {
|
|
|
380
408
|
if (!contextStat.isDirectory() || contextStat.isSymbolicLink()) {
|
|
381
409
|
throw new Error("project context must be a real directory");
|
|
382
410
|
}
|
|
383
|
-
const expectedLauncher =
|
|
411
|
+
const expectedLauncher = realpathSync(CLIENT_SPAWN_PATH);
|
|
384
412
|
const actualLauncher = realpathSync(contract.file);
|
|
385
413
|
if (actualLauncher !== expectedLauncher) {
|
|
386
|
-
throw new Error("launcher resolves outside the
|
|
414
|
+
throw new Error("launcher resolves outside the helper module location");
|
|
387
415
|
}
|
|
388
416
|
const launcherStat = lstatSync(actualLauncher);
|
|
389
417
|
if (!launcherStat.isFile() || launcherStat.isSymbolicLink()) {
|