robisie 0.5.47 → 0.5.49
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 +19 -0
- package/README.md +21 -9
- package/dist/commands.d.ts +2 -1
- package/dist/commands.js +22 -3
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/engine/build-id.json +1 -1
- package/dist/engine/bundle-report.json +5 -5
- package/dist/engine/tick.cjs +135 -31
- package/dist/installation-update.d.ts +1 -0
- package/dist/installation-update.js +25 -6
- package/dist/roles.d.ts +1 -1
- package/docs/README.en.md +15 -3
- package/docs/README.md +27 -16
- package/package.json +1 -1
- package/roles/ceo-client.md +28 -30
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Historia zmian klienta / Client changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.49](https://github.com/chuppa12/robisie-app/compare/client-v0.5.48...client-v0.5.49) (2026-11-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Factory Cards
|
|
7
|
+
|
|
8
|
+
* praca workera task-mwjkn0lo-3is5dz (auto-commit) ([bac8679](https://github.com/chuppa12/robisie-app/commit/bac86798ba547b0ce51ddf431e3e6d00a58334c0))
|
|
9
|
+
* praca workera task-mwjo54jo-sy6cyb (auto-commit) ([40ff054](https://github.com/chuppa12/robisie-app/commit/40ff054ce42ef88d459b4bc5e27eed44ce54efcf))
|
|
10
|
+
* praca workera task-mwjprh7y-9ipuhv (auto-commit) ([45d7d6b](https://github.com/chuppa12/robisie-app/commit/45d7d6b0aee1a733587636e0de8350f3428c43eb))
|
|
11
|
+
* praca workera task-mwjs1pd1-b64lt9 (auto-commit) ([161d759](https://github.com/chuppa12/robisie-app/commit/161d759bc20f9b34087154397139ae13c9e62aa9))
|
|
12
|
+
* praca workera task-mwjwfoyg-37psxh (auto-commit) ([4ab82cd](https://github.com/chuppa12/robisie-app/commit/4ab82cdf85123bbc2e65be8a8786a69d72a941f2))
|
|
13
|
+
|
|
14
|
+
## [0.5.48](https://github.com/chuppa12/robisie-app/compare/client-v0.5.47...client-v0.5.48) (2026-11-16)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Factory Cards
|
|
18
|
+
|
|
19
|
+
* praca workera task-mwjfxw3d-oyg3t4 (auto-commit) ([f72af60](https://github.com/chuppa12/robisie-app/commit/f72af60684a90974f39280909d68a2bed3c3739f))
|
|
20
|
+
* praca workera task-mwjiqwru-slzebs (auto-commit) ([f2ef3d8](https://github.com/chuppa12/robisie-app/commit/f2ef3d8a30795d48db1b4a57702b31c3489f1e37))
|
|
21
|
+
|
|
3
22
|
## [0.5.47](https://github.com/chuppa12/robisie-app/compare/client-v0.5.46...client-v0.5.47) (2026-11-16)
|
|
4
23
|
|
|
5
24
|
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Jeśli trasa przekierowała na /dashboard bez Planera, znajdź „Zacznij od pie
|
|
|
21
21
|
<!-- agent-consent:start -->
|
|
22
22
|
### Instrukcja dla agenta — jedna zgoda na przebieg
|
|
23
23
|
|
|
24
|
-
Na początku poproś raz o zgodę na nazwany przebieg i jego granice: własne konto, wygenerowanie klucza, bezpieczny lokalny zapis klucza, init oraz pierwszą uzgodnioną kartę (cel, katalog, zakres zapisu i kryteria wyniku). Przed prośbą o zgodę wybierz z właścicielem lokalną kartę `greet.cjs
|
|
24
|
+
Na początku poproś raz o zgodę na nazwany przebieg i jego granice: własne konto, wygenerowanie klucza, bezpieczny lokalny zapis klucza, init oraz pierwszą uzgodnioną kartę (cel, katalog, zakres zapisu i kryteria wyniku). Przed prośbą o zgodę dla roli CEO wybierz z właścicielem lokalną kartę `greet.cjs`; granice muszą odpowiadać przykładowi. Ręczny przykład `wynik.txt` jest niewspierany przez rolę `ceo-client`.
|
|
25
25
|
|
|
26
26
|
Jeśli właściciel już udzielił zgody na ten przebieg, nie pytaj ponownie przy tych krokach; kontynuuj w ustalonych granicach. Brak zgody, null, pusta lub niejasna odpowiedź albo zmiana zakresu wymagają pytania przed zależnym krokiem; wykonuj dalej niezależne dozwolone czynności. Odmowę uszanuj: nie wykonuj odmówionych kroków. Zgoda nie omija chronionych potwierdzeń człowieka ani dostawcy; po takim potwierdzeniu kontynuuj. Klucz pozostaje poza rozmową, kartą, argumentami i historią poleceń; gdy bezpieczny zapis lub przekazanie nie jest dostępne, człowiek używa ukrytego pytania init. Cudza otwarta sesja nie daje dostępu do jej konta. Po pracy nadal obowiązują niezależna recenzja oraz osobny końcowy odbiór wyniku przez właściciela.
|
|
27
27
|
<!-- agent-consent:end -->
|
|
@@ -143,25 +143,25 @@ Po zmianie ponów `npx robisie doctor`. Rozwiąż też inne błędy doctor: sam
|
|
|
143
143
|
|
|
144
144
|
Po sukcesie człowiek potwierdza nazwę i cel projektu oraz katalog instalacji, bez klucza i UUID. Przejdź do startu CEO poniżej; to nie jest odbiór karty.
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
Dla roli CEO wybierz kompletną lokalną kartę `greet.cjs` z zainstalowanego `docs/README.md`, sekcja „Pierwsza karta i start Buildera”. Ręczny przykład `wynik.txt` (treść „robisie działa” z końcowym znakiem nowej linii, bez zależności i publikacji) jest niewspierany przez rolę `ceo-client`.
|
|
147
147
|
|
|
148
|
-
Dla lokalnego silnika użyj kompletnej karty i trzech użyć z `docs/README.md`, sekcja „Pierwsza karta i start Buildera”: literalne `details`, PASS/ACK testera, pełny `usage.json`, potem trzy różne `npx robisie usage --input ./usage.json`. CLI nie ocenia wyniku ani nie ustawia done. Przy odmowie sprawdź źródło przed ponowieniem — wpis może już istnieć.
|
|
148
|
+
Dla lokalnego silnika użyj kompletnej karty i trzech użyć z `docs/README.md`, sekcja „Pierwsza karta i start Buildera”: literalne `details`, PASS/ACK testera, pełny `usage.json`, potem trzy różne `npx robisie usage --input ./usage.json`. CLI nie ocenia wyniku ani nie ustawia done. Przy odmowie sprawdź źródło przed ponowieniem — wpis może już istnieć.
|
|
149
149
|
|
|
150
150
|
## Start CEO
|
|
151
151
|
|
|
152
152
|
Człowiek uruchamia CEO w katalogu instalacji.
|
|
153
153
|
|
|
154
|
-
Po
|
|
154
|
+
Po uzgodnieniu zakresu CEO wywołuje `spawn_builder` z ID karty potwierdzonej w `ready`; adapter wybiera skonfigurowanego dostawcę Buildera (Claude, Codex albo OpenCode). Nowa praca tworzy `draft`; kontynuacja i restart wymagają odczytu istniejącej karty, bez tworzenia duplikatu lub ponownego startu aktywnej pracy. Rozszerzenie dotyczy tylko uzgodnionego `draft`/`ready`; `blocked` zachowuje opisany wyjątek powrotu tej samej dostawy.
|
|
155
155
|
|
|
156
|
-
Przy błędzie `spawn_builder` CEO
|
|
156
|
+
Przy błędzie lub timeout `spawn_builder` brakuje potwierdzenia, lecz proces może już działać. CEO odczytuje świeży indeks i wszystkie details, sprawdza status oraz assignee; przy przydzielonym `in_progress` obserwuje istniejącą pracę. Nie cofa do `ready`, nie uruchamia drugiego wykonawcy ani nie ponawia w ciemno. Nieczytelny stan eskaluje jako brak potwierdzenia. Ponowienie wymaga wyjaśnionej przyczyny oraz dowodu, że żaden wykonawca nie działa; ręczny start pozostaje jawnym wyborem operatora.
|
|
157
157
|
|
|
158
158
|
Ręczny start to wyłącznie jawny wybór operatora: wtedy CEO podaje polecenie do uruchomienia w nowym terminalu w katalogu instalacji.
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
Claude Code: CEO uruchamia niezależną recenzję przez `Agent(quality-officer-client)`. Codex: CEO wywołuje `spawn_quality` z samym `cardRef`; pomocnik uruchamia osobny proces z zainstalowaną rolą Quality Officera, bez rozmowy Buildera. OpenCode: nadal odmawia niewspieranej recenzji; karta pozostaje w `in_review`, bez ręcznego obejścia. Każda wspierana recenzja wymaga świeżych pełnych odczytów i weryfikacji receiptu; Builder nie recenzuje własnej pracy. VERIFIED potwierdza receipt recenzji, nie wykonuje chronionego odbioru serwera ani nie zastępuje receiver PASS.
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
Automatyczny cykl lokalny wymaga aktywnej instalacji z `engine.delivery: "local"`, polityką `enforced`, odrębnym kluczem B i kompletem dowodów, w tym rzeczywistych użyć. `localAcceptancePhase` po receiver PASS i zgodnym archiwum wykonuje chroniony odbiór oraz przejście do `done`; CEO obserwuje automat i potwierdza wynik świeżym pełnym odczytem. Bez zgody operatora na każdą kartę. Worker nie ustawia `done`; CEO potwierdza wynik odczytem. Przy niemożności nazywa lukę i eskaluje; operator rozstrzyga produkt, zakres i gust w swoich granicach. Sam `init`/`doctor`, pozytywna recenzja ani testy nie dowodzą aktywacji, użycia lub zakończenia karty.
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
Ręczny przykład `wynik.txt` jest niewspierany przez rolę `ceo-client`: bez `local_receiver.outcome=PASS` automat nie przenosi karty z `in_review` do `delivered`, a CEO nie ustawia `delivered` ani `done`. Kliknięcie w panelu nie zastępuje chronionego odbioru przy `enforced`; nazwij brak i eskaluj. Polecenia ręcznego startu Buildera dla wspieranej karty są w zainstalowanym `docs/README.md`, anchor `start-buildera`; sam start nie dowodzi automatycznego cyklu lokalnego.
|
|
165
165
|
|
|
166
166
|
Wszystkie trzy role muszą używać jednego dostawcy; mieszana mapa daje kod 1 doctor. Paczka nie uruchamia usług w tle ani nie zapewnia konta lub dostępu do AI.
|
|
167
167
|
|
|
@@ -239,7 +239,19 @@ Backupy po uninstall mogą nadal zawierać klucz; zachowaj ich prywatność i w
|
|
|
239
239
|
|
|
240
240
|
Worker Grok działa wyłącznie na Linux z działającym bubblewrap (`bwrap`). Na macOS klient odmawia przed startem: brak blokady sieci potomnych; wybierz Codex. Zainstaluj Grok CLI i zaloguj `grok login --device-auth`; zachowaj HOME i opcjonalne GROK_HOME (domyślnie `~/.grok`), bez kopiowania logowania. Codex nadal wymaga Codex CLI i `codex login --device-auth`. `doctor --engine-config` sprawdza obecność bubblewrap, ale nie dowodzi ochrony jądra.
|
|
241
241
|
|
|
242
|
-
|
|
242
|
+
Worker Grok wymaga Grok CLI 1.0.77 albo nowszego. Poniżej tej wersji doctor i start odmawiają: zaktualizuj Grok CLI: `grok update`.
|
|
243
|
+
|
|
244
|
+
Worker Grok ma własny, pusty /tmp i /var/tmp: nie widzi plików ani gniazd w prawdziwym /tmp komputera, a zapis do /tmp zostaje w katalogu tej próby.
|
|
245
|
+
|
|
246
|
+
Testy, które uruchamiają lokalny serwer TCP, nie przejdą u Workera Groka (połączenie z localhost jest odrzucane). Do takiego repo wybierz Workera Codex.
|
|
247
|
+
|
|
248
|
+
Jeśli sam zaufałeś repozytorium w Grok CLI, worktree kart dziedziczą to zaufanie: sesja Workera załaduje AGENTS.md i haki tego repo, wewnątrz piaskownicy.
|
|
249
|
+
|
|
250
|
+
Reszta katalogu ~/.grok, poza ~/.grok/bin tylko do odczytu, pozostaje zapisywalna dla poleceń Workera. Zamknięcie jej to osobne discovery.
|
|
251
|
+
|
|
252
|
+
Start nie czyta ani nie zapisuje `trusted_folders.toml` i nie wymaga ręcznego zaufania per karta. Klient uruchamia Groka przez `bwrap --dev-bind / / --bind <TMPDIR próby>/tmp /tmp --bind <TMPDIR próby>/var-tmp /var/tmp --ro-bind <dom Groka>/bin <dom Groka>/bin -- grok …`. Oba montowane katalogi powstają puste w TMPDIR tej próby; istniejący katalog bin jest rozwiązywany przez realpath (domyślnie `~/.grok/bin`). Przed Grokiem krótkie lokalne polecenie z limitem czasu sprawdza te same montowania. Brak katalogu bin albo obsługi zagnieżdżania piaskownicy oznacza odmowę: wybierz Codex. Nie ma powrotu do Groka bez osłony.
|
|
253
|
+
|
|
254
|
+
Przed startem silnik tworzy projektowy `.grok/sandbox.toml`: profil `robisie-<unikalny identyfikator próby>`, `extends = "workspace"`, `restrict_network = true`, `read_write = ["<absolutny stateDir>/worker-tmp/<próba>"]`. Start zamawia go przez `--sandbox robisie-…`; wbudowany GROK_SANDBOX nie zastępuje tego wyboru. Worktree, TMPDIR i dom Groka po realpath muszą leżeć poza /tmp i /var/tmp. Silnik zachowuje HOME/GROK_HOME, reużywa TMPDIR próby i wyklucza dokładnie ten plik przez lokalny git info/exclude (także gdy `.git` worktree jest plikiem). Nie nadpisuje obcej konfiguracji, nie podąża za dowiązaniem profilu ani nie zapisuje globalnego TOML; identyczny własny plik jest idempotentny. Ponowna próba w tym samym worktree dopisuje osobny profil tylko po sprawdzeniu zgodności dotychczasowego pliku z kopią w artefaktach silnika; zachowuje wcześniejsze profile i ich kopie do weryfikacji dowodów. Brak kopii, jej zmiana lub dowiązanie oznacza odmowę. Różny globalny profil o tej samej nazwie wygrywa w Groku, dlatego klient odmawia przy konflikcie. Brak bubblewrap, dostępnego/poprawnego profilu lub dowodu jego nałożenia odmawia; klient nie wraca automatycznie do Codexa. Wynik wymaga `sandbox-events.jsonl` z `enforced=true` dla tej próby oraz rzeczywistego modelu `grok-*`/xAI z procesu. `grok-cli` oznacza rodzinę CLI, a konkretny model w rejestrze wymaga równości; UNKNOWN służy tylko oczekiwaniu.
|
|
243
255
|
|
|
244
256
|
Granice: Landlock ma lukę ochrony metadanych; przed jądrem Linux 6.2 ma też lukę truncate. Blokada sieci obejmuje tylko procesy potomne na Linuksie; API/HTTP w procesie Groka pozostają otwarte. Testy na atrapach sprawdzają kontrakt startu, a rzeczywistą ochronę potwierdza dopiero sonda jądra po instalacji. Każda rola działa w osobnym procesie bez wznawiania sesji Workera lub recenzenta.
|
|
245
257
|
|
package/dist/commands.d.ts
CHANGED
|
@@ -16,10 +16,11 @@ export declare function initRecoveryStep(ctx: Ctx, preferred?: AgentId): string;
|
|
|
16
16
|
export declare function recoveryStep(ctx: Ctx, step: string): string;
|
|
17
17
|
export declare function init(ctx: Ctx, options: InitOptions): Promise<void>;
|
|
18
18
|
export declare const DOCTOR_SUCCESS = "Powy\u017Csze kontrole przesz\u0142y. Uruchom swojego agenta i popro\u015B o rol\u0119 robisie CEO.";
|
|
19
|
-
/** Provider CLI runs are replaceable
|
|
19
|
+
/** Provider CLI runs are replaceable; only --version captures stdout, which is never printed. */
|
|
20
20
|
export declare const loginIo: {
|
|
21
21
|
run(binary: string, args: readonly string[], env: NodeJS.ProcessEnv, cwd: string): {
|
|
22
22
|
status: number | null;
|
|
23
|
+
stdout?: string | null;
|
|
23
24
|
};
|
|
24
25
|
};
|
|
25
26
|
/** Uses the registry already read by doctorEngineConfig, without reopening configuration. */
|
package/dist/commands.js
CHANGED
|
@@ -260,11 +260,12 @@ function installedVersions(op, text) {
|
|
|
260
260
|
}
|
|
261
261
|
// ── doctor ───────────────────────────────────────────────────────────────────
|
|
262
262
|
export const DOCTOR_SUCCESS = "Powyższe kontrole przeszły. Uruchom swojego agenta i poproś o rolę robisie CEO.";
|
|
263
|
-
/** Provider CLI runs are replaceable
|
|
263
|
+
/** Provider CLI runs are replaceable; only --version captures stdout, which is never printed. */
|
|
264
264
|
export const loginIo = {
|
|
265
265
|
run(binary, args, env, cwd) {
|
|
266
|
-
const
|
|
267
|
-
|
|
266
|
+
const version = args[0] === "--version";
|
|
267
|
+
const result = spawnSync(binary, args, { cwd, env, stdio: version ? ["ignore", "pipe", "ignore"] : "ignore", encoding: "utf8", timeout: 20_000, killSignal: "SIGKILL", shell: false });
|
|
268
|
+
return { status: result.error ? null : result.status, ...(version ? { stdout: result.stdout } : {}) };
|
|
268
269
|
},
|
|
269
270
|
};
|
|
270
271
|
// The engine's provider env (engine-context/review-job allowlists), never the robisie keys.
|
|
@@ -351,6 +352,24 @@ export function doctorClientPair(ctx, registry) {
|
|
|
351
352
|
validateClientRoles(registry["worker-client"], registry["reviewer-client"], registry["receiver-client"], ctx.platform);
|
|
352
353
|
if (registry["worker-client"].provider === "grok" && !findProgram(ctx.cwd, ctx.env.PATH ?? "", "bwrap"))
|
|
353
354
|
throw new RobisieError("Worker Grok wymaga bubblewrap (bwrap) do ochrony profilu na Linuksie.", "Zainstaluj bubblewrap albo wybierz Codex.");
|
|
355
|
+
if (registry["worker-client"].provider === "grok") {
|
|
356
|
+
const home = ctx.env.HOME || ctx.home;
|
|
357
|
+
const env = {};
|
|
358
|
+
for (const name of PAIR_ENV)
|
|
359
|
+
if (ctx.env[name] !== undefined)
|
|
360
|
+
env[name] = ctx.env[name];
|
|
361
|
+
env.HOME = home;
|
|
362
|
+
env.PATH = `${join(home, ".local/bin")}${delimiter}${env.PATH ?? ""}`;
|
|
363
|
+
const binary = findProgram(ctx.cwd, env.PATH, "grok");
|
|
364
|
+
let version = null;
|
|
365
|
+
try {
|
|
366
|
+
const result = binary ? loginIo.run(binary, ["--version"], env, ctx.cwd) : null;
|
|
367
|
+
version = result?.status === 0 && typeof result.stdout === "string" ? result.stdout.trim().match(/^grok (\d+)\.(\d+)\.(\d+)(?:\s|$)/) : null;
|
|
368
|
+
}
|
|
369
|
+
catch { /* Missing or unreadable version fails closed below. */ }
|
|
370
|
+
if (!version || !(Number(version[1]) > 1 || Number(version[1]) === 1 && (Number(version[2]) > 0 || Number(version[3]) >= 77)))
|
|
371
|
+
throw new RobisieError("Worker Grok wymaga Grok CLI 1.0.77 albo nowszego. Zaktualizuj Grok CLI: `grok update`.", "Zaktualizuj Grok CLI: `grok update`.");
|
|
372
|
+
}
|
|
354
373
|
const reviewer = registry["reviewer-client"];
|
|
355
374
|
ctx.out(`Recenzent: ${reviewer.provider}/${reviewer.model}; niezależność: ${reviewer.requireIndependentProvider === false ? "częściowa: bez niezależnego sprawdzenia" : "wymagana"}.`);
|
|
356
375
|
const receiver = registry["receiver-client"];
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Package identity and the server contract it speaks. */
|
|
2
2
|
export declare const PACKAGE_NAME = "robisie";
|
|
3
|
-
export declare const PACKAGE_VERSION = "0.5.
|
|
3
|
+
export declare const PACKAGE_VERSION = "0.5.49";
|
|
4
4
|
/**
|
|
5
5
|
* MAJOR of the agent-API contract this package understands.
|
|
6
6
|
* PARITY: src/lib/mcp/contract-version.ts (AGENT_API_CONTRACT_VERSION) on the server.
|
package/dist/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Package identity and the server contract it speaks. */
|
|
2
2
|
export const PACKAGE_NAME = "robisie";
|
|
3
|
-
export const PACKAGE_VERSION = "0.5.
|
|
3
|
+
export const PACKAGE_VERSION = "0.5.49"; // x-release-please-version
|
|
4
4
|
/**
|
|
5
5
|
* MAJOR of the agent-API contract this package understands.
|
|
6
6
|
* PARITY: src/lib/mcp/contract-version.ts (AGENT_API_CONTRACT_VERSION) on the server.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schema":1,"sha":"
|
|
1
|
+
{"schema":1,"sha":"efb840140849ac2265d33f7fb8b7cb1ef377a383","dirty":false}
|
|
@@ -1692,14 +1692,14 @@
|
|
|
1692
1692
|
"staticOperations": {
|
|
1693
1693
|
"beforePreflight": {
|
|
1694
1694
|
"module": "maszynista/tick.ts",
|
|
1695
|
-
"startLine":
|
|
1696
|
-
"endLine":
|
|
1695
|
+
"startLine": 10206,
|
|
1696
|
+
"endLine": 10319,
|
|
1697
1697
|
"text": "export async function main(): Promise<number> {\n const start = standaloneStartCheck({ filename: __filename, env: process.env });\n if (start.standalone && !start.ok) {\n console.error(start.message);\n process.exitCode = 78;\n return 78;\n }\n let installation: EngineContext;\n try { installation = createEngineContext(currentEngine(), {\n loadEnvironment: loadEnvFiles, preflight, baseRef: engineBaseRef, refreshBase: fetchMain,\n disk: defaultDiskPressureDependencies, workerContext: loadNorthStar,\n controlEnv: hostEnv, workerEnv: executionEnv, prepareWorktree: prepareHostWorktree, workerArtifacts: createWorkerTmpdir,\n notify: async (card, reason) => { decisionForReksio(card, reason, \"Rozstrzygnij na karcie\", \"\", \"\"); return { outcome: \"recorded\", ref: DECISIONS_REKSIO }; },\n hostOperations: hostOperationsPhase,\n activation: { confirmLoaded, finishHostActivation, readActivationState, recoverTickTimeout, runEnabledAuto },\n }, git, log); }\n catch (error) {\n if (!engineClient()) throw error;\n console.error(`HOLD kontekst klienta: ${clientTickFailure(error)}`);\n process.exitCode = 78;\n return 78;\n }\n const previousInstallation = tickInstallation;\n const hostErrorText = errorText;\n const client = engineClient();\n const result: { outcome: \"ok\" | \"retry\" | \"stop\"; reason: string; cleanup: boolean } = { outcome: \"ok\", reason: \"\", cleanup: false };\n const stopClient = (reason = clientTickFailure()): void => {\n if (client && result.outcome !== \"stop\") { result.outcome = \"stop\"; result.reason = reason; }\n };\n let code = 2;\n try { code = await q.withPlannerQueries(installation.planner, async () => {\n tickInstallation = installation;\n const seedGateSettings = installationSeedGateSettings();\n const errorText = client ? clientTickFailure : hostErrorText;\n const loadEnvFiles = installation.loadEnvironment;\n const preflight = () => {\n const actor = installation.preflight();\n return { uid: actor.kind === \"db\" ? actor.uid : API_ACTOR };\n };\n const { confirmLoaded, finishHostActivation, readActivationState, recoverTickTimeout, runEnabledAuto } = installation.activation;\n const smokeOnly = DRY && process.env.MASZYNISTA_SMOKE === \"1\";\n if (!DRY) {\n const acquire = (): boolean => tryCreateTickLock(LOCK);\n if (!acquire()) {\n const raw = readFileSync(LOCK, \"utf8\"), pid = Number(raw);\n if (!Number.isSafeInteger(pid) || pid <= 0) { console.log(\"tick lock bez poprawnego PID — HOLD\"); return 0; }\n try { process.kill(pid, 0); console.log(`tick już trwa (pid ${pid})`); return 0; }\n catch (error) { if ((error as NodeJS.ErrnoException).code !== \"ESRCH\") throw error; }\n if (readFileSync(LOCK, \"utf8\") === raw) unlinkSync(LOCK);\n if (!acquire()) { console.log(\"tick już trwa\"); return 0; }\n }\n }\n skippedCardEvents.clear();\n let s = parseState(null).state;\n // Internal smoke handoff: the child cannot outlive the parent's reserved budget.\n const smokeLimit = DRY ? Number(process.env.MASZYNISTA_SMOKE_TIMEOUT_MS) : NaN;\n let stateLoaded = false;\n let tickStarted: string | undefined;\n let outcome: \"ok\" | \"failed\" = \"ok\";\n let runtimeFailed = false;\n let observedLoaded = \"UNKNOWN\";\n let tickPhase = \"startup\";\n const deadlineAlarm = armTickDeadline(() => s, Number.isSafeInteger(smokeLimit) && smokeLimit > 0\n ? Math.min(TICK_LIMIT_MS, smokeLimit) : TICK_LIMIT_MS, () => ({ phase: tickPhase, observedLoaded }));\n let hostReady = false;\n let hostBoard: { uid: string; projectId: string } | undefined;\n let activationCards: CardLike[] = [];\n let activationCardsKnown = false;\n let blockedBefore = 0;\n const clientStopped = (): boolean => {\n if (client && (outcome === \"failed\" || (!DRY && s.blocked > blockedBefore))) stopClient();\n if (client && result.outcome === \"stop\") outcome = \"failed\";\n return client && result.outcome === \"stop\";\n };\n let hostPhaseStarted = false;\n const hostPhase = async (): Promise<boolean> => {\n if (smokeOnly || !hostReady || hostPhaseStarted) return false;\n hostPhaseStarted = true;\n tickPhase = \"host\";\n if (hostBoard) {\n const { uid: boardUid, projectId: boardProject } = hostBoard;\n try {\n await runEnabledAuto({ state: s, loadedSha: observedLoaded, repo: REPO, logPath: LOG, tick: s.tick, stateDir: hostStateDir(),\n now: new Date().toISOString(), activation: readActivationState(hostStateDir()), dryRun: DRY }, {\n listCards: async () => scanTasks(boardUid, boardProject, { full: true, statuses: [\"delivered\"],\n detailsKeys: ENABLED_SCAN_DETAILS_KEYS }),\n getTask: id => q.getTask(boardUid, id),\n appendDetail: async (id, patch) => { await appendBoundedDetail(boardUid, id, patch); },\n saveState: writeState,\n alarm: hostActivationAlarm,\n log,\n });\n } catch (error) { runtimeFailed = true; outcome = \"failed\"; log(`FAIL ENABLED auto: ${errorText(error)}`); }\n } else log(\"ENABLED auto: UNKNOWN — brak odczytu projektu; dowód karty czeka na dostęp do tablicy\");\n try {\n const result = await engineRunHostActivation({ repo: REPO, stateDir: hostStateDir(), cards: activationCards, cardsKnown: activationCardsKnown, tick: s.tick, dryRun: DRY }, {\n git, remainingTickMs, alarm: hostActivationAlarm, infrastructureChecks, infrastructurePullRequest, log: line => log(`host-activation: ${line}`),\n });\n log(`host-activation: code=${result.code} target=${result.target ?? \"UNKNOWN\"}${result.detail ? ` reason=${result.detail}` : \"\"}`);\n if (result.code === \"activate\" && result.target) {\n lastTick(s, \"activation\", `aktywacja ${result.target}; ogon odroczony`, outcome === \"ok\");\n return true;\n }\n } catch (error) { runtimeFailed = true; outcome = \"failed\"; log(`FAIL aktywacja: ${errorText(error)}`); }\n return false;\n };\n try {\n observedLoaded = loadedSha = readLoadedSha(REPO);\n s = readState((await engineFjConfig()).enabled);\n stateLoaded = true; blockedBefore = s.blocked;\n s.tick++; tickStarted = new Date().toISOString(); s.lastTickAt = tickStarted;\n log(`tick_started tick=${s.tick} at=${tickStarted} duration=UNKNOWN loaded=${loadedSha}`);\n loadEnvFiles();\n const { uid } = preflight();"
|
|
1698
1698
|
},
|
|
1699
1699
|
"finalization": {
|
|
1700
1700
|
"module": "maszynista/tick.ts",
|
|
1701
|
-
"startLine":
|
|
1702
|
-
"endLine":
|
|
1701
|
+
"startLine": 10610,
|
|
1702
|
+
"endLine": 10662,
|
|
1703
1703
|
"text": " } finally {\n // A persisted terminal FAIL is a card result; every unexpected exception above\n // remains a runtime failure, including DB errors inside card handling.\n if (!DRY && s.blocked > blockedBefore) {\n outcome = \"failed\";\n try { log(`FAIL: licznik blocked wzrósł ${blockedBefore} → ${s.blocked}; outcome=failed`); }\n catch (error) { console.error(`zapis licznika blocked: ${errorText(error)}`); }\n }\n clientStopped();\n // Early board failure still reaches the same host phase, at most once per tick.\n await hostPhase();\n tickPhase = \"finalizing\";\n try { if (!DRY) await finishHostActivation({ stateDir: hostStateDir(), outcome, tick: s.tick, runtimeFailed, observedLoaded }, { alarm: hostActivationAlarm, log }); }\n catch (error) { runtimeFailed = true; outcome = \"failed\"; log(`FAIL breaker aktywacji: ${errorText(error)}`); }\n clientStopped();\n try { if (stateLoaded) writeState(s); }\n catch (error) { runtimeFailed = true; outcome = \"failed\"; if (!client) throw error; stopClient(); result.cleanup = true; }\n finally {\n if (!DRY) {\n try { if (readFileSync(LOCK, \"utf8\") === String(process.pid)) unlinkSync(LOCK); }\n catch (error) { if ((error as NodeJS.ErrnoException).code !== \"ENOENT\") { if (!client) throw error; stopClient(); result.cleanup = true; } }\n }\n const at = new Date().toISOString();\n const duration = tickStarted ? `${(Date.parse(at) - Date.parse(tickStarted)) / 1000}s` : \"UNKNOWN\";\n try {\n const { total, ops } = drainEgressCounters();\n const sorted = Object.entries(ops).sort(([, a], [, b]) => b.bytes - a.bytes);\n const summary = sorted.filter(([op]) => !op.includes(\":\")).slice(0, 12)\n .map(([op, counter]) => `${op}:${counter.calls}:${counter.bytes}`).join(\",\");\n const variants = sorted.filter(([op]) => op.includes(\":\")).slice(0, 6)\n .map(([op, counter]) => `${op}:${counter.calls}:${counter.bytes}`).join(\",\");\n log(`egress tick=${s.tick} total=${total} ops=${summary} variants=${variants}`);\n } catch { /* Optional metrics must never interrupt tick cleanup. */ }\n try { refreshTickReport(observedLoaded); log(`tick_finished tick=${s.tick} at=${at} outcome=${client && result.outcome === \"retry\" ? \"retry\" : outcome} duration=${duration} loaded=${loadedSha}`); }\n finally { clearTimeout(deadlineAlarm); tickDeadline = Number.POSITIVE_INFINITY; }\n }\n }\n }); } catch (error) {\n if (!client) throw error;\n stopClient(); result.cleanup = true;\n } finally {\n tickInstallation = previousInstallation;\n try { await installation.close(); }\n catch (error) {\n if (client) { stopClient(); result.cleanup = true; }\n else safeLog(`Zamknięcie instalacji nieudane: ${String(error)}`);\n }\n }\n if (client && result.outcome !== \"ok\") console.error(`Fabryka ${result.outcome === \"stop\" ? \"zatrzymana\" : \"retry\"}: ${result.reason}${result.cleanup ? \"; finalizacja niepotwierdzona — sprawdź stan i blokadę\" : \"\"}`);\n return client && result.outcome === \"stop\" ? 2 : code;\n}\n\nif (require.main === module && !([\"--opencode-runner\", \"--grok-runner\"].includes(process.argv[2] ?? \"\"))) {"
|
|
1704
1704
|
},
|
|
1705
1705
|
"refreshTickReport": {
|
|
@@ -1725,6 +1725,6 @@
|
|
|
1725
1725
|
"status": 0,
|
|
1726
1726
|
"signal": null,
|
|
1727
1727
|
"stdout": "v24.3.0\n",
|
|
1728
|
-
"stderr": "(node:
|
|
1728
|
+
"stderr": "(node:22029) ExperimentalWarning: SQLite is an experimental feature and might change at any time\n(Use `node --trace-warnings ...` to show where the warning was created)\n"
|
|
1729
1729
|
}
|
|
1730
1730
|
}
|
package/dist/engine/tick.cjs
CHANGED
|
@@ -37652,7 +37652,7 @@ var init_constants = __esm({
|
|
|
37652
37652
|
"packages/client/src/constants.ts"() {
|
|
37653
37653
|
"use strict";
|
|
37654
37654
|
PACKAGE_NAME = "robisie";
|
|
37655
|
-
PACKAGE_VERSION = "0.5.
|
|
37655
|
+
PACKAGE_VERSION = "0.5.49";
|
|
37656
37656
|
SUPPORTED_CONTRACT_MAJOR = 1;
|
|
37657
37657
|
DEFAULT_ORIGIN = "https://robisie.app";
|
|
37658
37658
|
MCP_SERVER_NAME = "robisie";
|
|
@@ -77261,8 +77261,29 @@ function freezeClientPair(selection, config2, worker) {
|
|
|
77261
77261
|
});
|
|
77262
77262
|
}
|
|
77263
77263
|
function assertClientPairMatches(value, selection, config2, worker) {
|
|
77264
|
-
|
|
77265
|
-
|
|
77264
|
+
const expected = freezeClientPair(selection, config2, worker);
|
|
77265
|
+
if ((0, import_node_util4.isDeepStrictEqual)(value, expected)) return;
|
|
77266
|
+
const section = (raw, shape, optional4 = {}) => {
|
|
77267
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return false;
|
|
77268
|
+
const fields = raw;
|
|
77269
|
+
return Object.entries(shape).every(([key, item]) => Object.hasOwn(fields, key) && typeof fields[key] === typeof item && fields[key] !== null) && Reflect.ownKeys(fields).every((key) => typeof key === "string" && (Object.hasOwn(shape, key) || Object.hasOwn(optional4, key) && typeof fields[key] === optional4[key]));
|
|
77270
|
+
};
|
|
77271
|
+
const workerFields = ["jobId", "attempts", "backend", "model", "effort", "worktree", "branch", "startedAt", "provider"];
|
|
77272
|
+
const workerShape = { ...expected.actualWorker };
|
|
77273
|
+
delete workerShape.provider;
|
|
77274
|
+
const roleShape = { name: "", provider: "", model: "", effort: "" };
|
|
77275
|
+
let component = "stamp";
|
|
77276
|
+
if (section(value, expected) && value.version === 1 && section(value.selection, expected.selection) && section(value.config, expected.config) && section(value.selection.worker, roleShape, { requireIndependentProvider: "boolean" }) && section(value.selection.reviewer, roleShape, { requireIndependentProvider: "boolean" }) && section(value.actualWorker, workerShape, { provider: "string" })) {
|
|
77277
|
+
if (!(0, import_node_util4.isDeepStrictEqual)(value.selection, expected.selection)) component = "selection";
|
|
77278
|
+
else if (value.config.path !== expected.config.path) component = "config.path";
|
|
77279
|
+
else if (value.config.sha256 !== expected.config.sha256) component = "config.sha256";
|
|
77280
|
+
else {
|
|
77281
|
+
const actual = value.actualWorker;
|
|
77282
|
+
const field = workerFields.find((key) => actual[key] !== expected.actualWorker[key]);
|
|
77283
|
+
if (field) component = `actualWorker.${field}`;
|
|
77284
|
+
}
|
|
77285
|
+
}
|
|
77286
|
+
throw new ClientPairHold(`para, konfiguracja lub to\u017Csamo\u015B\u0107 Workera r\xF3\u017Cni si\u0119 od stampu: ${component}. Pon\xF3w prac\u0119 na tej karcie (Dashboard \u2192 Planer \u2192 karta \u2192 Pon\xF3w prac\u0119) albo przywr\xF3\u0107 poprzedni\u0105 konfiguracj\u0119.`);
|
|
77266
77287
|
}
|
|
77267
77288
|
var import_node_crypto11, import_node_fs21, import_node_path23, import_node_util4, ClientPairHold;
|
|
77268
77289
|
var init_client_pair = __esm({
|
|
@@ -78771,7 +78792,6 @@ function profileContents(profile, tmpdir7) {
|
|
|
78771
78792
|
extends = "workspace"
|
|
78772
78793
|
restrict_network = true
|
|
78773
78794
|
read_write = [${JSON.stringify(tmpdir7)}]
|
|
78774
|
-
deny = ["/tmp", "/var/tmp"]
|
|
78775
78795
|
`;
|
|
78776
78796
|
}
|
|
78777
78797
|
function profileArchive(artifactsDir, contents) {
|
|
@@ -78790,9 +78810,6 @@ function prepareClientSandbox(cwd, tmpdir7, home, jobId, artifactsDir, client, e
|
|
|
78790
78810
|
} catch {
|
|
78791
78811
|
throw new Error("brak dzia\u0142aj\u0105cego bubblewrap (bwrap); zainstaluj bubblewrap albo wybierz Codex");
|
|
78792
78812
|
}
|
|
78793
|
-
const trust = record9(parse5(readRegular(import_node_path25.default.join(home, "trusted_folders.toml")).toString("utf8")));
|
|
78794
|
-
if (record9(record9(trust?.folders)?.[cwd])?.trusted !== true)
|
|
78795
|
-
throw new Error("brak zaufania folderu Groka; zaufaj temu worktree w Grok CLI przed startem");
|
|
78796
78813
|
const profile = clientProfile(cwd, tmpdir7, jobId), contents = profileContents(profile, tmpdir7);
|
|
78797
78814
|
const global2 = optionalRegular(import_node_path25.default.join(home, "sandbox.toml"));
|
|
78798
78815
|
if (global2) {
|
|
@@ -78875,7 +78892,7 @@ function assertClientSandbox(worker, sandbox) {
|
|
|
78875
78892
|
if (bytes.length <= sandbox.offset) throw new Error("Brak dowodu na\u0142o\u017Cenia profilu Groka");
|
|
78876
78893
|
const events = bytes.subarray(sandbox.offset).toString("utf8").split(/\r?\n/).filter(Boolean).map((line2) => record9(JSON.parse(line2)));
|
|
78877
78894
|
const applied = events.filter((e) => e?.profile === sandbox.profile && e?.workspace === worker.cwd && e?.event_type === "ProfileApplied");
|
|
78878
|
-
if (applied.length !== 1 || applied[0]?.enforced !== true || applied[0]?.restrict_network !== true || !String(applied[0]?.platform).startsWith("linux/") || !Number.isFinite(Date.parse(String(applied[0]?.timestamp))) || Date.parse(String(applied[0]?.timestamp)) < Date.parse(worker.startedAt) || !Array.isArray(applied[0]?.read_write_paths) || !(0, import_node_util5.isDeepStrictEqual)(applied[0].read_write_paths
|
|
78895
|
+
if (applied.length !== 1 || applied[0]?.enforced !== true || applied[0]?.restrict_network !== true || !String(applied[0]?.platform).startsWith("linux/") || !Number.isFinite(Date.parse(String(applied[0]?.timestamp))) || Date.parse(String(applied[0]?.timestamp)) < Date.parse(worker.startedAt) || !Array.isArray(applied[0]?.read_write_paths) || !(0, import_node_util5.isDeepStrictEqual)([...new Set(applied[0].read_write_paths)].sort(), [worker.cwd, sandbox.home, sandbox.tmpdir, "/tmp", "/var/tmp"].sort()))
|
|
78879
78896
|
throw new Error("Brak zgodnego dowodu na\u0142o\u017Cenia profilu Groka (enforced=true)");
|
|
78880
78897
|
}
|
|
78881
78898
|
function startWorker(input, deps = {}) {
|
|
@@ -78932,6 +78949,7 @@ function startWorker(input, deps = {}) {
|
|
|
78932
78949
|
const runner = (0, import_node_url2.fileURLToPath)(__robisie_engine_bundle_url_5567750a);
|
|
78933
78950
|
const grok = input.selection.backend === "grok";
|
|
78934
78951
|
let clientSandbox;
|
|
78952
|
+
let clientMounts;
|
|
78935
78953
|
let cwd = input.cwd;
|
|
78936
78954
|
let env = input.env;
|
|
78937
78955
|
let binary = input.openCodeBinary ?? "opencode";
|
|
@@ -78944,7 +78962,32 @@ function startWorker(input, deps = {}) {
|
|
|
78944
78962
|
const home = (0, import_node_fs23.realpathSync)(input.env.GROK_HOME || import_node_path25.default.join(input.env.HOME, ".grok"));
|
|
78945
78963
|
if (input.client) {
|
|
78946
78964
|
if ((input.client.platform ?? process.platform) !== "linux") throw new Error("Worker Grok: brak blokady sieci potomnych na tej platformie. Wybierz Codex.");
|
|
78965
|
+
let version3 = null;
|
|
78966
|
+
try {
|
|
78967
|
+
const output = (0, import_node_child_process10.execFileSync)(input.grokBinary ?? "grok", ["--version"], { cwd, env: input.env, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"], timeout: 5e3 });
|
|
78968
|
+
version3 = typeof output === "string" ? output.trim().match(/^grok (\d+)\.(\d+)\.(\d+)(?:\s|$)/) : null;
|
|
78969
|
+
} catch {
|
|
78970
|
+
}
|
|
78971
|
+
if (!version3 || !(Number(version3[1]) > 1 || Number(version3[1]) === 1 && (Number(version3[2]) > 0 || Number(version3[3]) >= 77)))
|
|
78972
|
+
throw new Error("Worker Grok wymaga Grok CLI 1.0.77 albo nowszego. Zaktualizuj Grok CLI: `grok update`.");
|
|
78947
78973
|
clientSandbox = prepareClientSandbox(cwd, temporary, home, localJobId, import_node_path25.default.resolve(input.artifactsDir), input.client, input.env);
|
|
78974
|
+
const binPath = import_node_path25.default.join(home, "bin");
|
|
78975
|
+
let bin;
|
|
78976
|
+
try {
|
|
78977
|
+
bin = (0, import_node_fs23.realpathSync)(binPath);
|
|
78978
|
+
if (!(0, import_node_fs23.lstatSync)(bin).isDirectory()) throw new Error("wymagany katalog");
|
|
78979
|
+
} catch (error48) {
|
|
78980
|
+
throw new Error(`Niedost\u0119pny katalog Groka ${binPath}: ${errorText2(error48)}`);
|
|
78981
|
+
}
|
|
78982
|
+
const tmp = import_node_path25.default.join(temporary, "tmp"), varTmp = import_node_path25.default.join(temporary, "var-tmp");
|
|
78983
|
+
(0, import_node_fs23.mkdirSync)(tmp, { mode: 448 });
|
|
78984
|
+
(0, import_node_fs23.mkdirSync)(varTmp, { mode: 448 });
|
|
78985
|
+
clientMounts = ["--dev-bind", "/", "/", "--bind", tmp, "/tmp", "--bind", varTmp, "/var/tmp", "--ro-bind", bin, bin, "--"];
|
|
78986
|
+
try {
|
|
78987
|
+
(0, import_node_child_process10.execFileSync)("bwrap", [...clientMounts, "/bin/true"], { cwd, env: input.env, stdio: "pipe", timeout: 5e3 });
|
|
78988
|
+
} catch (error48) {
|
|
78989
|
+
throw new Error(`Nie mo\u017Cna u\u017Cy\u0107 zagnie\u017Cd\u017Conej piaskownicy bubblewrap; wybierz Codex: ${errorText2(error48)}`);
|
|
78990
|
+
}
|
|
78948
78991
|
} else env = { ...input.env, GROK_HOME: home };
|
|
78949
78992
|
binary = input.grokBinary ?? "grok";
|
|
78950
78993
|
args = [
|
|
@@ -78984,6 +79027,10 @@ function startWorker(input, deps = {}) {
|
|
|
78984
79027
|
"--no-auto-update"
|
|
78985
79028
|
];
|
|
78986
79029
|
if (clientSandbox && clientSandbox.requestedModel !== "grok-cli") args.push("--model", clientSandbox.requestedModel);
|
|
79030
|
+
if (clientMounts) {
|
|
79031
|
+
args = [...clientMounts, binary, ...args];
|
|
79032
|
+
binary = "bwrap";
|
|
79033
|
+
}
|
|
78987
79034
|
} catch (error48) {
|
|
78988
79035
|
return { ok: false, status: "blocked", mayHaveStarted: false, reason: errorText2(error48) };
|
|
78989
79036
|
}
|
|
@@ -317692,24 +317739,43 @@ function addedConflictMarkers(worktree, baseRef, tree) {
|
|
|
317692
317739
|
return files2.filter((file3) => git(["diff", "--no-ext-diff", "--no-textconv", "--unified=0", base2, ...target, "--", `:(literal)${file3}`], worktree).split("\n").some((line2) => line2.startsWith("+") && !line2.startsWith("+++") && /^(?:<{7}|>{7})(?: |$)/.test(line2.slice(1))));
|
|
317693
317740
|
}
|
|
317694
317741
|
function prepareConflictWorktree(worktree, branch, base2, candidate, snapshot2) {
|
|
317695
|
-
|
|
317696
|
-
|
|
317742
|
+
const skipped = "konflikt: przygotowanie pomini\u0119te \u2014 niezatwierdzone zmiany / operacja w toku";
|
|
317743
|
+
if (candidate.diff || candidate.staged) {
|
|
317744
|
+
log2(skipped);
|
|
317745
|
+
return null;
|
|
317746
|
+
}
|
|
317747
|
+
const untracked = () => new Map(git(["ls-files", "--others", "-z"], worktree).split("\0").filter(Boolean).map((file3) => {
|
|
317697
317748
|
const absolute2 = import_node_path52.default.join(worktree, file3);
|
|
317698
317749
|
const stat = (0, import_node_fs48.lstatSync)(absolute2);
|
|
317699
|
-
if (
|
|
317700
|
-
|
|
317701
|
-
|
|
317750
|
+
if (stat.isSymbolicLink()) return [file3, "link:" + (0, import_node_fs48.readlinkSync)(absolute2)];
|
|
317751
|
+
if (stat.isFile()) return [file3, `file:${stat.size}:${stat.mtimeMs}`];
|
|
317752
|
+
if (stat.isDirectory()) return [file3, "dir"];
|
|
317753
|
+
throw new Error(`nie\u015Bledzony plik UNKNOWN: ${file3}`);
|
|
317754
|
+
}));
|
|
317702
317755
|
const operations = ["MERGE_HEAD", "SQUASH_MSG", "CHERRY_PICK_HEAD", "REVERT_HEAD", "rebase-merge", "rebase-apply", "sequencer"];
|
|
317703
|
-
|
|
317704
|
-
|
|
317705
|
-
|
|
317756
|
+
let operationPaths;
|
|
317757
|
+
let before;
|
|
317758
|
+
try {
|
|
317759
|
+
operationPaths = operations.map((operation) => import_node_path52.default.resolve(worktree, git(["rev-parse", "--git-path", operation], worktree)));
|
|
317760
|
+
if (operationPaths.some((file3) => (0, import_node_fs48.existsSync)(file3))) {
|
|
317761
|
+
log2(skipped);
|
|
317762
|
+
return null;
|
|
317763
|
+
}
|
|
317764
|
+
before = untracked();
|
|
317765
|
+
} catch (error48) {
|
|
317766
|
+
log2(`konflikt: odmowa przygotowania, kandydat zachowany: ${errorText5(error48)}`);
|
|
317767
|
+
return null;
|
|
317768
|
+
}
|
|
317706
317769
|
const ref = `refs/robisie/konflikt/${branch}-${candidate.head.slice(0, 8)}`;
|
|
317707
317770
|
const mutate = (args, commit = false) => git(["-c", "core.hooksPath=/dev/null", ...args], worktree, 12e4, commit);
|
|
317708
317771
|
const rollback = () => {
|
|
317709
317772
|
mutate(["checkout", "-f", "-B", branch, ref]);
|
|
317710
317773
|
const squash = operationPaths[1];
|
|
317711
317774
|
if ((0, import_node_fs48.existsSync)(squash)) (0, import_node_fs48.unlinkSync)(squash);
|
|
317712
|
-
|
|
317775
|
+
const after2 = untracked();
|
|
317776
|
+
const changed = [.../* @__PURE__ */ new Set([...before.keys(), ...after2.keys()])].filter((file3) => before.get(file3) !== after2.get(file3));
|
|
317777
|
+
if (changed.length) throw new Error(`rollback: zmienione pliki nie\u015Bledzone: ${changed.join(", ")}`);
|
|
317778
|
+
if (!(0, import_node_util14.isDeepStrictEqual)(snapshot2(), candidate) || git(["symbolic-ref", "--short", "HEAD"], worktree) !== branch || git(["diff", "--name-only", "--diff-filter=U", "-z"], worktree) || operationPaths.some((file3) => (0, import_node_fs48.existsSync)(file3))) throw new Error("rollback: kandydat lub pliki nie\u015Bledzone/operacja UNKNOWN");
|
|
317713
317779
|
};
|
|
317714
317780
|
let checkoutStarted = false;
|
|
317715
317781
|
try {
|
|
@@ -317718,7 +317784,7 @@ function prepareConflictWorktree(worktree, branch, base2, candidate, snapshot2)
|
|
|
317718
317784
|
mutate(["checkout", "--no-overwrite-ignore", "-B", branch, base2]);
|
|
317719
317785
|
let mergeError;
|
|
317720
317786
|
try {
|
|
317721
|
-
mutate(["merge", "--squash", candidate.head]);
|
|
317787
|
+
mutate(["merge", "--no-overwrite-ignore", "--squash", candidate.head]);
|
|
317722
317788
|
} catch (error48) {
|
|
317723
317789
|
mergeError = error48;
|
|
317724
317790
|
}
|
|
@@ -321893,8 +321959,7 @@ function clientPairForWorker(card, active) {
|
|
|
321893
321959
|
}
|
|
321894
321960
|
return stamp2.clientPair;
|
|
321895
321961
|
}
|
|
321896
|
-
function validateClientReviewClaim(card, active, claim) {
|
|
321897
|
-
const pair = clientPairForWorker(card, active);
|
|
321962
|
+
function validateClientReviewClaim(card, active, claim, pair = clientPairForWorker(card, active)) {
|
|
321898
321963
|
if (!(0, import_node_util14.isDeepStrictEqual)(claim.clientPair, pair) || claim.cardId !== card.id || claim.worktree !== active.worktree || claim.acceptanceSha256 !== reviewAcceptanceHash(card) || claim.rulesSha256 !== reviewRulesHash(Number(claim.round)))
|
|
321899
321964
|
throw new ClientPairHold("claim nie odpowiada parze i kontraktowi karty");
|
|
321900
321965
|
validateClientReviewInput(claim);
|
|
@@ -321915,8 +321980,8 @@ async function restartClientReview(s, uid, card, a, changed) {
|
|
|
321915
321980
|
reviewResultDiagnostic(s, card.id, "review-hold", errorText5(error48));
|
|
321916
321981
|
}
|
|
321917
321982
|
}
|
|
321918
|
-
function validateClientReviewResult(card, active, claim, result, deliveryBase) {
|
|
321919
|
-
validateClientReviewClaim(card, active, claim);
|
|
321983
|
+
function validateClientReviewResult(card, active, claim, result, deliveryBase, frozenPair) {
|
|
321984
|
+
validateClientReviewClaim(card, active, claim, frozenPair);
|
|
321920
321985
|
const selected = asRecord3(result.attempts?.[0]);
|
|
321921
321986
|
const reviewer = claim.clientPair.selection.reviewer;
|
|
321922
321987
|
const provider = { codex: "openai", claude: "anthropic", grok: "xai" }[reviewer.provider];
|
|
@@ -321932,12 +321997,17 @@ ${engineBaseRef()} SHA: `;
|
|
|
321932
321997
|
const reviewedBase = baseAt < 0 ? "" : packet3.slice(baseAt + marker.length, baseAt + marker.length + 40);
|
|
321933
321998
|
if (!/^[a-f0-9]{40}$/.test(reviewedBase) || deliveryBase !== void 0 && deliveryBase !== reviewedBase)
|
|
321934
321999
|
throw new ClientPairHold("brak zgodnej bazy pakietu recenzji");
|
|
321935
|
-
|
|
322000
|
+
const sourceMatches = frozenPair ? typeof raw.sourcePrompt === "string" && raw.sourcePrompt.startsWith(`${sourcePrompt2}
|
|
322001
|
+
|
|
322002
|
+
`) && packet3.includes(`
|
|
322003
|
+
Candidate SHA: ${String(claim.sha)}
|
|
322004
|
+
`) : raw.sourcePrompt === grokPrompt({ ...claim, prompt: sourcePrompt2 }, reviewedBase);
|
|
322005
|
+
if (!sourceMatches || result.text !== selected.output || selected.output !== bounded4(raw.text, 4096))
|
|
321936
322006
|
throw new ClientPairHold("\u017Ar\xF3d\u0142o lub tekst wyniku nie odpowiada zamro\u017Conemu pakietowi");
|
|
321937
|
-
if (deliveryBase === void 0 && git(["rev-parse", "--verify", `${engineBaseRef()}^{commit}`], active.worktree) !== reviewedBase)
|
|
322007
|
+
if (!frozenPair && deliveryBase === void 0 && git(["rev-parse", "--verify", `${engineBaseRef()}^{commit}`], active.worktree) !== reviewedBase)
|
|
321938
322008
|
throw new ClientReviewBaseChanged(String(claim.key), Number(claim.round));
|
|
321939
322009
|
}
|
|
321940
|
-
function validateSavedClientReview(card, active, deliveryBase) {
|
|
322010
|
+
function validateSavedClientReview(card, active, deliveryBase, allowPreviousAttempt = false) {
|
|
321941
322011
|
const worker = asRecord3(card.details?.maszynista);
|
|
321942
322012
|
active ??= {
|
|
321943
322013
|
taskId: card.id,
|
|
@@ -321959,9 +322029,29 @@ function validateSavedClientReview(card, active, deliveryBase) {
|
|
|
321959
322029
|
const result = JSON.parse((0, import_node_fs48.readFileSync)(`${file3}.result`, "utf8"));
|
|
321960
322030
|
const marker = asRecord3(JSON.parse((0, import_node_fs48.readFileSync)(`${file3}.started`, "utf8")));
|
|
321961
322031
|
const full = asRecord3(JSON.parse((0, import_node_fs48.readFileSync)(checkedReceipt(saved.receipt).path, "utf8")));
|
|
321962
|
-
|
|
322032
|
+
const head = git(["rev-parse", "HEAD"], active.worktree);
|
|
322033
|
+
const historical = allowPreviousAttempt && head !== saved.sha;
|
|
322034
|
+
if (claim.key !== saved.jobKey || claim.sha !== saved.sha || claim.round !== saved.round || result.verdict !== "PASS" || marker.key !== claim.key || marker.sha !== claim.sha || marker.round !== claim.round || !Number.isSafeInteger(marker.pid) || Number(marker.pid) <= 0 || marker.pid !== result.pid || !historical && head !== saved.sha || full.jobKey !== claim.key || full.sha !== claim.sha || full.round !== claim.round || ["promptBytes", "promptSha256", "reviewer", "selectedAttempt", "text"].some((field) => full[field] !== asRecord3(result)[field]) || full.verdict !== "PASS" || !(0, import_node_util14.isDeepStrictEqual)(full.attempts, result.attempts) || !(0, import_node_util14.isDeepStrictEqual)(full.workerReport, result.workerReport) || !(0, import_node_util14.isDeepStrictEqual)(full.clientPair, result.clientPair))
|
|
321963
322035
|
throw new ClientPairHold("zapisany PASS nie odpowiada terminalowi");
|
|
321964
|
-
|
|
322036
|
+
if (!historical) {
|
|
322037
|
+
validateClientReviewResult(card, active, claim, result, deliveryBase);
|
|
322038
|
+
return false;
|
|
322039
|
+
}
|
|
322040
|
+
const snapshot2 = asRecord3(claim.freshness);
|
|
322041
|
+
const prior = asRecord3(reviewFreshness({ maszynista: snapshot2.worker }).worker);
|
|
322042
|
+
const fields = ["jobId", "attempts", "worktree", "branch"];
|
|
322043
|
+
const pair = claim.clientPair;
|
|
322044
|
+
if (!pair || fields.some((field) => field === "attempts" ? !Number.isSafeInteger(prior[field]) || Number(prior[field]) < 1 : typeof prior[field] !== "string" || !String(prior[field]).trim()) || prior.worktree !== active.worktree || prior.branch !== active.branch || prior.jobId === active.jobId && prior.attempts === active.attempts || !(0, import_node_util14.isDeepStrictEqual)(prior, reviewFreshness({ maszynista: pair.actualWorker }).worker) || !/^[a-f0-9]{40}$/.test(String(saved.sha)) || !Number.isSafeInteger(saved.round) || Number(saved.round) < 0 || ["pid", "key", "cardId", "status"].some((field) => full[field] !== void 0 && full[field] !== result[field]) || typeof claim.key !== "string" || !(claim.key === `${card.id}:${saved.sha}:${saved.round}` || claim.key.startsWith(`${card.id}:${saved.sha}:${saved.round}:`)))
|
|
322045
|
+
throw new ClientPairHold("zapisany PASS nie odpowiada terminalowi: brak zgodnej to\u017Csamo\u015Bci wcze\u015Bniejszej pr\xF3by");
|
|
322046
|
+
const previousCard = { ...card, details: { ...card.details, maszynista: {
|
|
322047
|
+
...pair.actualWorker,
|
|
322048
|
+
clientPair: pair,
|
|
322049
|
+
workerSha: claim.sha,
|
|
322050
|
+
workerReportReceipt: asRecord3(claim.workerReport).receipt
|
|
322051
|
+
} } };
|
|
322052
|
+
validateClientReviewResult(previousCard, active, claim, result, deliveryBase, pair);
|
|
322053
|
+
git(["merge-base", "--is-ancestor", String(saved.sha), head], active.worktree);
|
|
322054
|
+
return true;
|
|
321965
322055
|
}
|
|
321966
322056
|
async function reviewActive(s, uid, card, a, landing, installation = tickInstallation) {
|
|
321967
322057
|
if (withheld(card)) return;
|
|
@@ -322002,13 +322092,27 @@ async function reviewActive(s, uid, card, a, landing, installation = tickInstall
|
|
|
322002
322092
|
return;
|
|
322003
322093
|
}
|
|
322004
322094
|
if (asRecord3(card.details?.review).verdict === "PASS") {
|
|
322095
|
+
let historical;
|
|
322005
322096
|
try {
|
|
322006
|
-
validateSavedClientReview(card, a);
|
|
322097
|
+
historical = validateSavedClientReview(card, a, void 0, true);
|
|
322007
322098
|
} catch (error48) {
|
|
322008
322099
|
if (error48 instanceof ClientReviewBaseChanged) await restartClientReview(s, uid, card, a, error48);
|
|
322009
322100
|
else await holdReviewJob(s, uid, card, errorText5(error48));
|
|
322010
322101
|
return;
|
|
322011
322102
|
}
|
|
322103
|
+
if (historical) {
|
|
322104
|
+
try {
|
|
322105
|
+
const detailsPatch = {
|
|
322106
|
+
review: { ...asRecord3(card.details?.review), verdict: "STALE_BASE", notes: "", text: "" },
|
|
322107
|
+
maszynista: { ...worker, phase: "review", sha: null, pass_waiting_sha: null, ci: null, hold_reason: null }
|
|
322108
|
+
};
|
|
322109
|
+
await updateTask2(uid, card.id, { expected: { status: fresh.status, details: card.details }, detailsPatch });
|
|
322110
|
+
card.details = { ...card.details, ...detailsPatch };
|
|
322111
|
+
} catch (error48) {
|
|
322112
|
+
reviewResultDiagnostic(s, card.id, "review-hold", errorText5(error48));
|
|
322113
|
+
return;
|
|
322114
|
+
}
|
|
322115
|
+
}
|
|
322012
322116
|
}
|
|
322013
322117
|
}
|
|
322014
322118
|
let recovered;
|
|
@@ -323055,7 +323159,7 @@ async function consumeActive(s, uid, a = s.actives[0], landing = { available: tr
|
|
|
323055
323159
|
await sendCardEvent(uid, card, event);
|
|
323056
323160
|
if (move.status === "blocked") {
|
|
323057
323161
|
s.blocked++;
|
|
323058
|
-
technicalBlock(card, move.note);
|
|
323162
|
+
technicalBlock(card, outcome.report.startsWith("Pozosta\u0142e markery konfliktu:") ? `${move.note}; ${outcome.report}` : move.note);
|
|
323059
323163
|
}
|
|
323060
323164
|
if (move.status === "in_review") {
|
|
323061
323165
|
let fresh;
|
|
@@ -325132,7 +325236,7 @@ async function dispatchCard(s, uid, projectId2, c, selection, installation, clie
|
|
|
325132
325236
|
throw new DispatchHold(`HOLD repair R${reviewRound}: odczyt kandydata: ${errorText5(error48)}`, false);
|
|
325133
325237
|
}
|
|
325134
325238
|
try {
|
|
325135
|
-
git(["rebase", preparedBase ?? (installation?.baseRef() ?? engineBaseRef())], worktree, 12e4, true);
|
|
325239
|
+
git(["rebase", "--autostash", preparedBase ?? (installation?.baseRef() ?? engineBaseRef())], worktree, 12e4, true);
|
|
325136
325240
|
} catch (rebaseError) {
|
|
325137
325241
|
let conflictFiles = "", unknown4 = "";
|
|
325138
325242
|
try {
|
|
@@ -325199,7 +325303,7 @@ Rebase zosta\u0142 przerwany przez udany abort; HEAD, diff i indeks s\u0105 zach
|
|
|
325199
325303
|
Pliki konfliktu: ${markers2.join(", ")}. usu\u0144 markery zachowuj\u0105c obie zmiany; pliki wyliczane odtw\xF3rz ich generatorem, bez r\u0119cznego scalania. Nie wykonuj git zmieniaj\u0105cego histori\u0119; commit zrobi silnik. Respektuj dotychczasowy write-set; poza zakresem lub decyzja \u2192 ACTIONABLE_BLOCKER z PYTANIE: do CR.
|
|
325200
325304
|
`;
|
|
325201
325305
|
} catch (error48) {
|
|
325202
|
-
|
|
325306
|
+
log2(`dispatch ${c.id}: odczyt marker\xF3w: ${errorText5(error48)}`);
|
|
325203
325307
|
}
|
|
325204
325308
|
(installation?.prepareWorktree ?? prepareHostWorktree)(worktree);
|
|
325205
325309
|
const sparseGuard = [
|
|
@@ -56,7 +56,7 @@ export async function runInstallationUpdate(ctx, options, overrides = {}) {
|
|
|
56
56
|
const runtime = {
|
|
57
57
|
fs, exec: (command, args, cwd, env) => {
|
|
58
58
|
const result = spawnSync(command, args, { cwd, env, encoding: 'utf8', shell: false, timeout: 120_000, maxBuffer: 4 * 1024 * 1024 });
|
|
59
|
-
return { status: result.status, signal: result.signal, stdout: result.stdout };
|
|
59
|
+
return { status: result.status, signal: result.signal, stdout: result.stdout, stderr: result.stderr };
|
|
60
60
|
}, kill: process.kill, now: Date.now, sleep: ms => new Promise(done => setTimeout(done, ms)),
|
|
61
61
|
interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY),
|
|
62
62
|
ask: async (question) => {
|
|
@@ -77,8 +77,11 @@ export async function runInstallationUpdate(ctx, options, overrides = {}) {
|
|
|
77
77
|
const env = { ...ctx.env };
|
|
78
78
|
const command = (name, args, cwd = ctx.cwd) => {
|
|
79
79
|
const outcome = runtime.exec(name, args, cwd, env);
|
|
80
|
-
if (outcome.status !== 0 || outcome.signal !== null)
|
|
81
|
-
|
|
80
|
+
if (outcome.status !== 0 || outcome.signal !== null) {
|
|
81
|
+
const tail = (outcome.stderr ?? '').split(/\r\n|\n|\r/).filter(line => !/TOKEN|KEY|SECRET|PASSWORD/i.test(line))
|
|
82
|
+
.join(' ').replace(/\s+/g, ' ').trim().slice(-300);
|
|
83
|
+
refuse(`Polecenie aktualizacji nie zakończyło się poprawnie: ${[name, ...args.slice(0, 3)].join(' ')} (kod ${outcome.status ?? 'brak'}${outcome.signal ? `, sygnał ${outcome.signal}` : ''})${tail ? `: ${tail}` : ''}.`);
|
|
84
|
+
}
|
|
82
85
|
return outcome.stdout;
|
|
83
86
|
};
|
|
84
87
|
const stat = (path) => {
|
|
@@ -169,6 +172,20 @@ export async function runInstallationUpdate(ctx, options, overrides = {}) {
|
|
|
169
172
|
}
|
|
170
173
|
const raw = json(bytes);
|
|
171
174
|
let config = parseEngineConfig(raw, configPath);
|
|
175
|
+
const manager = ctx.platform === 'linux' ? 'systemctl' : 'launchctl';
|
|
176
|
+
const domain = `gui/${typeof process.getuid === 'function' ? process.getuid() : 0}`;
|
|
177
|
+
let managerProbed = false;
|
|
178
|
+
const probeManager = () => {
|
|
179
|
+
try {
|
|
180
|
+
command(manager, ctx.platform === 'linux' ? ['--user', 'show-environment'] : ['print', domain]);
|
|
181
|
+
}
|
|
182
|
+
catch (error) {
|
|
183
|
+
if (ctx.platform === 'linux' && error instanceof RobisieError)
|
|
184
|
+
refuse(`${error.message} sprawdź sesję systemd --user (loginctl enable-linger $USER, XDG_RUNTIME_DIR=/run/user/$(id -u))`);
|
|
185
|
+
throw error;
|
|
186
|
+
}
|
|
187
|
+
managerProbed = true;
|
|
188
|
+
};
|
|
172
189
|
if (!config.update?.enabled) {
|
|
173
190
|
if (!runtime.interactive || config.update?.enabled === false) {
|
|
174
191
|
ctx.out('Aktualizacja pominięta: brak włączonej zgody w konfiguracji.');
|
|
@@ -179,6 +196,9 @@ export async function runInstallationUpdate(ctx, options, overrides = {}) {
|
|
|
179
196
|
ctx.out('Aktualizacja pominięta bez zmiany zgody.');
|
|
180
197
|
return 0;
|
|
181
198
|
}
|
|
199
|
+
if (ctx.platform !== 'linux' && ctx.platform !== 'darwin')
|
|
200
|
+
refuse('Aktualizacja wymaga Linuxa z systemd --user lub macOS z launchd.');
|
|
201
|
+
probeManager();
|
|
182
202
|
if (!regular(configPath).equals(bytes) || io.realpathSync(selectedPath) !== configPath)
|
|
183
203
|
refuse('Konfiguracja zmieniła się przed zapisem zgody.');
|
|
184
204
|
raw.update = { consentedAt: new Date(runtime.now()).toISOString(), enabled: true };
|
|
@@ -220,9 +240,8 @@ export async function runInstallationUpdate(ctx, options, overrides = {}) {
|
|
|
220
240
|
refuse('Żywy wskaźnik zmienił się podczas aktualizacji.');
|
|
221
241
|
};
|
|
222
242
|
// Probe manager before any pointer, service, or card mutation.
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
command(manager, ctx.platform === 'linux' ? ['--user', 'show-environment'] : ['print', domain]);
|
|
243
|
+
if (!managerProbed)
|
|
244
|
+
probeManager();
|
|
226
245
|
board = await runtime.board(ctx, config);
|
|
227
246
|
const update = join(state, 'update');
|
|
228
247
|
privateDir(update);
|
package/dist/roles.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface Role {
|
|
|
17
17
|
export declare function rolesDir(): string;
|
|
18
18
|
export declare function parseRole(file: Role["file"], text: string): Role;
|
|
19
19
|
export declare function loadRoles(dir?: string): Role[];
|
|
20
|
-
export declare const MANAGED_LINE = "<!-- robisie:managed 0.5.
|
|
20
|
+
export declare const MANAGED_LINE = "<!-- robisie:managed 0.5.49 \u2014 plik zarz\u0105dzany przez `npx robisie`; `npx robisie uninstall` go usunie -->";
|
|
21
21
|
export type AgentFlavor = "claude" | "codex" | "opencode";
|
|
22
22
|
/** How the operator starts the Builder for one card in its own session (the card id is not a secret). */
|
|
23
23
|
export declare function builderStartCommand(flavor: AgentFlavor, codexRolePath?: string): string;
|
package/docs/README.en.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# robisie — from account to accepted card (package 0.5.
|
|
1
|
+
# robisie — from account to accepted card (package 0.5.49) <!-- x-release-please-version -->
|
|
2
2
|
|
|
3
3
|
In the project directory with its engine configuration, run `npx robisie init`, then `npx robisie doctor`: init prepares the project goal and tester protection list, and doctor checks both inputs.
|
|
4
4
|
|
|
@@ -286,7 +286,19 @@ Save the entire JSON below as `robisie.config.json` in the repo directory, witho
|
|
|
286
286
|
|
|
287
287
|
The Grok Worker runs only on Linux with working bubblewrap (`bwrap`). On macOS the client refuses before startup because child-process network blocking is unavailable; select Codex. Install Grok CLI and sign in with `grok login --device-auth`; preserve HOME and optional GROK_HOME (default `~/.grok`) without relocating login. Codex still needs Codex CLI and `codex login --device-auth`. `doctor --engine-config` checks bubblewrap availability, but does not prove kernel enforcement.
|
|
288
288
|
|
|
289
|
-
|
|
289
|
+
The Grok Worker requires Grok CLI 1.0.77 or newer. Below that, doctor and startup refuse: update Grok CLI with `grok update`.
|
|
290
|
+
|
|
291
|
+
The Grok Worker has its own empty /tmp and /var/tmp: it does not see files or sockets in the computer's real /tmp, and a write to /tmp stays in this attempt's directory.
|
|
292
|
+
|
|
293
|
+
Tests that start a local TCP server will not pass under the Grok Worker (localhost is refused). For such a repo, select the Codex Worker.
|
|
294
|
+
|
|
295
|
+
If you trusted the repository in Grok CLI yourself, card worktrees inherit that trust: the Worker session loads that repo's AGENTS.md and hooks, inside the sandbox.
|
|
296
|
+
|
|
297
|
+
The rest of ~/.grok, other than read-only ~/.grok/bin, stays writable by Worker commands. Closing it is a separate discovery.
|
|
298
|
+
|
|
299
|
+
Startup does not read or write `trusted_folders.toml` and requires no manual trust step per card. The client starts Grok through `bwrap --dev-bind / / --bind <attempt TMPDIR>/tmp /tmp --bind <attempt TMPDIR>/var-tmp /var/tmp --ro-bind <Grok home>/bin <Grok home>/bin -- grok …`. Both mounted directories are created empty inside this attempt's TMPDIR; the existing bin directory is resolved through realpath (`~/.grok/bin` by default). Before Grok starts, a short local command checks these same mounts with a timeout. A missing bin directory or unavailable nested sandbox causes refusal: select Codex. No unwrapped Grok fallback is used.
|
|
300
|
+
|
|
301
|
+
Before startup the engine creates project `.grok/sandbox.toml`: profile `robisie-<unique attempt identifier>`, `extends = "workspace"`, `restrict_network = true`, `read_write = ["<absolute stateDir>/worker-tmp/<attempt>"]`. Startup requests it through `--sandbox robisie-…`; built-in GROK_SANDBOX does not replace this selection. The realpath of the worktree, TMPDIR and Grok home must be outside /tmp and /var/tmp. The engine preserves HOME/GROK_HOME, reuses the attempt TMPDIR and excludes exactly this file through local git info/exclude (including worktrees whose `.git` is a file). It never overwrites foreign configuration, follows profile symlinks or writes global TOML; an identical owned file is idempotent. A retry in the same worktree appends a separate profile only after matching the existing file against its copy in the engine artifacts; earlier profiles and copies remain available for evidence verification. A missing, modified or symlinked copy causes refusal. A different global profile with the same name wins in Grok, so the client refuses a conflict. Missing bubblewrap, an available/valid profile or evidence of enforcement causes refusal; the client has no automatic Codex fallback. Results require `sandbox-events.jsonl` with `enforced=true` for this attempt and the actual process model `grok-*`/xAI. `grok-cli` selects the CLI family, while a concrete registry model must match exactly; UNKNOWN is only a waiting state.
|
|
290
302
|
|
|
291
303
|
Limits: Landlock has a metadata protection gap and, before Linux kernel 6.2, a truncate gap. Network blocking covers only child processes on Linux; API/HTTP inside Grok remain open. Offline mock tests check the startup contract; only a kernel probe after installation establishes actual enforcement. Each role runs in a separate process without resuming Worker or reviewer sessions.
|
|
292
304
|
|
|
@@ -464,7 +476,7 @@ Missing/null/empty/unreadable `local_receiver.reason` or failure to identify an
|
|
|
464
476
|
|
|
465
477
|
The assistant returns using key A (a key used for B cannot later record independent acceptance), a restricted account cannot leave `blocked`, a full active-card limit requires freeing a slot, and clicking the panel under `enforced` does not replace the assistant; on any tool refusal state stays unchanged and the owner receives the literal reason.
|
|
466
478
|
|
|
467
|
-
- **Retry work (not acceptance of the same delivery):** open the Planner in the Dashboard (`https://robisie.app/dashboard/plugins/planer`) (“Projects” section), choose a project and card, then select “Ready” (`ready`) under “Stage”. The card returns to the agent's queue. Without the panel, for `blocked` and `in_review` with `HOLD clientPair`: first call `get_task({id, include:[], fullDetails:true})`, then `update_task({id, status: "ready"})` using key A. After the write, read back the full card with the same `get_task` and verify `ready` and unchanged `details`. This retries work; returning the same delivery to acceptance uses the `blocked → in_review` path above. A tool refusal preserves state; do not change permissions or delete state.
|
|
479
|
+
- **Retry work (not acceptance of the same delivery):** open the Planner in the Dashboard (`https://robisie.app/dashboard/plugins/planer`) (“Projects” section), choose a project and card, then select “Ready” (`ready`) under “Stage”. The card returns to the agent's queue. Without the panel, for `blocked` and `in_review` with `HOLD clientPair`: first call `get_task({id, include:[], fullDetails:true})`, then `update_task({id, status: "ready"})` using key A. After the write, read back the full card with the same `get_task` and verify `ready` and unchanged `details`. This retries work; returning the same delivery to acceptance uses the `blocked → in_review` path above. A tool refusal preserves state; do not change permissions or delete state. The PASS from a previous attempt remains history on the card and in review-jobs, and the current HEAD gets a new review.
|
|
468
480
|
- **Abandon:** in the same card window, click “Delete”; at “Are you sure you want to delete this?” choose “Yes, delete”. **Deletion is irreversible — it cannot be undone.** The `masz-<first 8 characters of the card id>` branch with the agent's work remains in the repository.
|
|
469
481
|
|
|
470
482
|
<!-- sekcja: aktualizacja -->
|
package/docs/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# robisie — od konta do odebranej karty (paczka 0.5.
|
|
1
|
+
# robisie — od konta do odebranej karty (paczka 0.5.49) <!-- x-release-please-version -->
|
|
2
2
|
|
|
3
3
|
W katalogu projektu z konfiguracją silnika uruchom `npx robisie init`, potem `npx robisie doctor`: init przygotuje cel projektu i listę ochrony testera, a doctor sprawdzi oba wejścia.
|
|
4
4
|
|
|
@@ -40,7 +40,7 @@ Odczyt projektów to uwierzytelniony odczyt aktywnych projektów przez `list_pro
|
|
|
40
40
|
<!-- agent-consent:start -->
|
|
41
41
|
### Instrukcja dla agenta — jedna zgoda na przebieg
|
|
42
42
|
|
|
43
|
-
Na początku poproś raz o zgodę na nazwany przebieg i jego granice: własne konto, wygenerowanie klucza, bezpieczny lokalny zapis klucza, init oraz pierwszą uzgodnioną kartę (cel, katalog, zakres zapisu i kryteria wyniku). Przed prośbą o zgodę wybierz z właścicielem lokalną kartę `greet.cjs
|
|
43
|
+
Na początku poproś raz o zgodę na nazwany przebieg i jego granice: własne konto, wygenerowanie klucza, bezpieczny lokalny zapis klucza, init oraz pierwszą uzgodnioną kartę (cel, katalog, zakres zapisu i kryteria wyniku). Przed prośbą o zgodę dla roli CEO wybierz z właścicielem lokalną kartę `greet.cjs`; granice muszą odpowiadać przykładowi. Ręczny przykład `wynik.txt` jest niewspierany przez rolę `ceo-client`.
|
|
44
44
|
|
|
45
45
|
Jeśli właściciel już udzielił zgody na ten przebieg, nie pytaj ponownie przy tych krokach; kontynuuj w ustalonych granicach. Brak zgody, null, pusta lub niejasna odpowiedź albo zmiana zakresu wymagają pytania przed zależnym krokiem; wykonuj dalej niezależne dozwolone czynności. Odmowę uszanuj: nie wykonuj odmówionych kroków. Zgoda nie omija chronionych potwierdzeń człowieka ani dostawcy; po takim potwierdzeniu kontynuuj. Klucz pozostaje poza rozmową, kartą, argumentami i historią poleceń; gdy bezpieczny zapis lub przekazanie nie jest dostępne, człowiek używa ukrytego pytania init. Cudza otwarta sesja nie daje dostępu do jej konta. Po pracy nadal obowiązują niezależna recenzja oraz osobny końcowy odbiór wyniku przez właściciela.
|
|
46
46
|
<!-- agent-consent:end -->
|
|
@@ -289,7 +289,7 @@ Doctor sprawdza kontrakt, odczyt projektów, konfigurację, role, start pomocnik
|
|
|
289
289
|
|
|
290
290
|
Gdy klucz A widzi dokładnie jeden projekt, doctor odczytuje jego `reviewPolicy` przez `list_projects`. Dla `enforced` pokazuje „✓ Polityka enforced: TAK”. Dla `legacy` ostrzega, że odbiór B (`accept_review`) będzie odmawiany, i kieruje do operatora Robisie po ustawienie `enforced`. Starszy serwer bez pola, `null` lub błąd odczytu daje „NIE SPRAWDZONO” z powodem. Ta linia jest informacyjna i nie zmienia kodu wyjścia doctora. Klient tylko odczytuje politykę; ustawia ją wyłącznie operator.
|
|
291
291
|
|
|
292
|
-
Doctor uruchamia plik pomocnika przez node, agent przez npx. `ROBISIE_PROJECT_CONTEXT` wybiera kontekst później i nie zmienia cwd szukania paczki. Uruchom agenta w katalogu instalacji i poproś o wyświetlenie dostępnych narzędzi OBU serwerów: `client-launch-context` (`get_launch_context`, `get_project_context`, `run_project_check`, `prepare_review`, `create_review_receipt`, `verify_stored_review`) oraz `ceo-client-launcher` (`spawn_builder`, `verify_review_receipt`). Wynik: oba serwery dostępne z kompletem tych narzędzi w sesji. Nie uruchamiaj spawn_builder tylko dla próby. Przy braku pomocnika wróć do cwd instalacji, sprawdź lokalną wersję i konfigurację, uruchom init/doctor, potem nową sesję agenta. Sam doctor nie potwierdza dostępności narzędzi u dostawcy.
|
|
292
|
+
Doctor uruchamia plik pomocnika przez node, agent przez npx. `ROBISIE_PROJECT_CONTEXT` wybiera kontekst później i nie zmienia cwd szukania paczki. Uruchom agenta w katalogu instalacji i poproś o wyświetlenie dostępnych narzędzi OBU serwerów: `client-launch-context` (`get_launch_context`, `get_project_context`, `run_project_check`, `prepare_review`, `create_review_receipt`, `verify_stored_review`) oraz `ceo-client-launcher` (`spawn_builder`, `spawn_quality`, `verify_review_receipt`). Wynik: oba serwery dostępne z kompletem tych narzędzi w sesji. Nie uruchamiaj spawn_builder tylko dla próby. Przy braku pomocnika wróć do cwd instalacji, sprawdź lokalną wersję i konfigurację, uruchom init/doctor, potem nową sesję agenta. Sam doctor nie potwierdza dostępności narzędzi u dostawcy.
|
|
293
293
|
|
|
294
294
|
<!-- sekcja: pierwsza-karta -->
|
|
295
295
|
## Pierwsza karta i start Buildera
|
|
@@ -333,7 +333,19 @@ Worker Codex na Linuksie może uruchamiać testy tworzące procesy, ale proxy de
|
|
|
333
333
|
|
|
334
334
|
Worker Grok działa wyłącznie na Linux z działającym bubblewrap (`bwrap`). Na macOS klient odmawia przed startem: brak blokady sieci potomnych; wybierz Codex. Zainstaluj Grok CLI i zaloguj `grok login --device-auth`; zachowaj HOME i opcjonalne GROK_HOME (domyślnie `~/.grok`), bez kopiowania logowania. Codex nadal wymaga Codex CLI i `codex login --device-auth`. `doctor --engine-config` sprawdza obecność bubblewrap, ale nie dowodzi ochrony jądra.
|
|
335
335
|
|
|
336
|
-
|
|
336
|
+
Worker Grok wymaga Grok CLI 1.0.77 albo nowszego. Poniżej tej wersji doctor i start odmawiają: zaktualizuj Grok CLI: `grok update`.
|
|
337
|
+
|
|
338
|
+
Worker Grok ma własny, pusty /tmp i /var/tmp: nie widzi plików ani gniazd w prawdziwym /tmp komputera, a zapis do /tmp zostaje w katalogu tej próby.
|
|
339
|
+
|
|
340
|
+
Testy, które uruchamiają lokalny serwer TCP, nie przejdą u Workera Groka (połączenie z localhost jest odrzucane). Do takiego repo wybierz Workera Codex.
|
|
341
|
+
|
|
342
|
+
Jeśli sam zaufałeś repozytorium w Grok CLI, worktree kart dziedziczą to zaufanie: sesja Workera załaduje AGENTS.md i haki tego repo, wewnątrz piaskownicy.
|
|
343
|
+
|
|
344
|
+
Reszta katalogu ~/.grok, poza ~/.grok/bin tylko do odczytu, pozostaje zapisywalna dla poleceń Workera. Zamknięcie jej to osobne discovery.
|
|
345
|
+
|
|
346
|
+
Start nie czyta ani nie zapisuje `trusted_folders.toml` i nie wymaga ręcznego zaufania per karta. Klient uruchamia Groka przez `bwrap --dev-bind / / --bind <TMPDIR próby>/tmp /tmp --bind <TMPDIR próby>/var-tmp /var/tmp --ro-bind <dom Groka>/bin <dom Groka>/bin -- grok …`. Oba montowane katalogi powstają puste w TMPDIR tej próby; istniejący katalog bin jest rozwiązywany przez realpath (domyślnie `~/.grok/bin`). Przed Grokiem krótkie lokalne polecenie z limitem czasu sprawdza te same montowania. Brak katalogu bin albo obsługi zagnieżdżania piaskownicy oznacza odmowę: wybierz Codex. Nie ma powrotu do Groka bez osłony.
|
|
347
|
+
|
|
348
|
+
Przed startem silnik tworzy projektowy `.grok/sandbox.toml`: profil `robisie-<unikalny identyfikator próby>`, `extends = "workspace"`, `restrict_network = true`, `read_write = ["<absolutny stateDir>/worker-tmp/<próba>"]`. Start zamawia go przez `--sandbox robisie-…`; wbudowany GROK_SANDBOX nie zastępuje tego wyboru. Worktree, TMPDIR i dom Groka po realpath muszą leżeć poza /tmp i /var/tmp. Silnik zachowuje HOME/GROK_HOME, reużywa TMPDIR próby i wyklucza dokładnie ten plik przez lokalny git info/exclude (także gdy `.git` worktree jest plikiem). Nie nadpisuje obcej konfiguracji, nie podąża za dowiązaniem profilu ani nie zapisuje globalnego TOML; identyczny własny plik jest idempotentny. Ponowna próba w tym samym worktree dopisuje osobny profil tylko po sprawdzeniu zgodności dotychczasowego pliku z kopią w artefaktach silnika; zachowuje wcześniejsze profile i ich kopie do weryfikacji dowodów. Brak kopii, jej zmiana lub dowiązanie oznacza odmowę. Różny globalny profil o tej samej nazwie wygrywa w Groku, dlatego klient odmawia przy konflikcie. Brak bubblewrap, dostępnego/poprawnego profilu lub dowodu jego nałożenia odmawia; klient nie wraca automatycznie do Codexa. Wynik wymaga `sandbox-events.jsonl` z `enforced=true` dla tej próby oraz rzeczywistego modelu `grok-*`/xAI z procesu. `grok-cli` oznacza rodzinę CLI, a konkretny model w rejestrze wymaga równości; UNKNOWN służy tylko oczekiwaniu.
|
|
337
349
|
|
|
338
350
|
Granice: Landlock ma lukę ochrony metadanych; przed jądrem Linux 6.2 ma też lukę truncate. Blokada sieci obejmuje tylko procesy potomne na Linuksie; API/HTTP w procesie Groka pozostają otwarte. Testy na atrapach sprawdzają kontrakt startu, a rzeczywistą ochronę potwierdza dopiero sonda jądra po instalacji. Każda rola działa w osobnym procesie bez wznawiania sesji Workera lub recenzenta.
|
|
339
351
|
|
|
@@ -467,16 +479,17 @@ Przy odmowie lub błędzie IO polecenie zwraca exit 1 z następnym krokiem. Wpis
|
|
|
467
479
|
|
|
468
480
|
Odbiór ma trzy wyniki: PASS prowadzi przez niezależny zapis odbioru kluczem B do `done`; oczekiwanie pozostawia kartę w „Do odbioru”; STOP blokujący przenosi ją do „Zablokowane”. Każde zadanie dochodzące do modelu zużywa pozycję budżetu, także zadanie z ważną oceną. Przy braku ważnej oceny i `n<3` karta czeka 30 minut, z `local_receiver.reason` zawierającym `zadanie n/3; najwcześniej <czas UTC>`; takt ma exit 0, a pierwsze sprawdzenie następuje w pierwszym kolejnym takcie po tym czasie. Przy `n>=3` brak ważnej oceny blokuje kartę. Powrót nie zeruje licznika. `--once` wymaga uruchomienia kolejnego taktu także do rozliczenia wyniku; `factory run` bez `--once` ponawia takty samo.
|
|
469
481
|
|
|
470
|
-
###
|
|
482
|
+
### Start CEO i Buildera
|
|
471
483
|
|
|
472
|
-
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 odczycie projektów przekaż
|
|
484
|
+
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 instalacji npm i poprawnym odczycie projektów przekaż kompletną lokalną kartę `greet.cjs` z powyższego przykładu w tym README.
|
|
473
485
|
|
|
474
|
-
|
|
486
|
+
Ręczny przykład `wynik.txt` (plik z treścią „robisie działa” i końcowym znakiem nowej linii, tylko ten plik, bez zależności, kont i publikacji) jest niewspierany przez rolę `ceo-client`. Nie zlecaj go CEO jako kompletnego przebiegu do odbioru.
|
|
475
487
|
|
|
476
|
-
Po
|
|
488
|
+
Po uzgodnieniu zakresu CEO wywołuje `spawn_builder` z ID karty potwierdzonej w `ready`; adapter wybiera skonfigurowanego dostawcę Buildera (Claude, Codex albo OpenCode). Nowa praca tworzy `draft`; kontynuacja i restart wymagają odczytu istniejącej karty, bez tworzenia duplikatu lub ponownego startu aktywnej pracy. Rozszerzenie dotyczy tylko uzgodnionego `draft`/`ready`; `blocked` zachowuje opisany wyjątek powrotu tej samej dostawy. Automatyczny cykl lokalny i ręczny przykład rozróżnia sekcja [Recenzja i odbiór](#recenzja-i-odbior).
|
|
477
489
|
|
|
478
|
-
Przy błędzie `spawn_builder` CEO
|
|
490
|
+
Przy błędzie lub timeout `spawn_builder` brakuje potwierdzenia, lecz proces może już działać. CEO odczytuje świeży indeks i wszystkie details, sprawdza status oraz assignee; przy przydzielonym `in_progress` obserwuje istniejącą pracę. Nie cofa do `ready`, nie uruchamia drugiego wykonawcy ani nie ponawia w ciemno. Nieczytelny stan eskaluje jako brak potwierdzenia. Ponowienie wymaga wyjaśnionej przyczyny oraz dowodu, że żaden wykonawca nie działa; ręczny start pozostaje jawnym wyborem operatora.
|
|
479
491
|
|
|
492
|
+
<a id="start-buildera"></a>
|
|
480
493
|
Ręczny start to wyłącznie jawny wybór operatora: wtedy CEO podaje polecenie do uruchomienia w nowym terminalu w katalogu instalacji.
|
|
481
494
|
|
|
482
495
|
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:
|
|
@@ -493,13 +506,11 @@ Oczekiwany wynik startu: świeży odczyt CEO potwierdza przydzieloną kartę in_
|
|
|
493
506
|
<a id="recenzja-i-odbior"></a>
|
|
494
507
|
## Recenzja i jawny odbiór
|
|
495
508
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
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ą.
|
|
509
|
+
Claude Code: CEO uruchamia niezależną recenzję przez `Agent(quality-officer-client)`. Codex: CEO wywołuje `spawn_quality` z samym `cardRef`; pomocnik uruchamia osobny proces z zainstalowaną rolą Quality Officera, bez rozmowy Buildera. OpenCode: nadal odmawia niewspieranej recenzji; karta pozostaje w `in_review`, bez ręcznego obejścia. Każda wspierana recenzja wymaga świeżych pełnych odczytów i weryfikacji receiptu; Builder nie recenzuje własnej pracy. VERIFIED potwierdza receipt recenzji, nie wykonuje chronionego odbioru serwera ani nie zastępuje receiver PASS.
|
|
499
510
|
|
|
500
|
-
|
|
511
|
+
Automatyczny cykl lokalny wymaga aktywnej instalacji z `engine.delivery: "local"`, polityką `enforced`, odrębnym kluczem B i kompletem dowodów, w tym rzeczywistych użyć. `localAcceptancePhase` po receiver PASS i zgodnym archiwum wykonuje chroniony odbiór oraz przejście do `done`; CEO obserwuje automat i potwierdza wynik świeżym pełnym odczytem. Bez zgody operatora na każdą kartę. Worker nie ustawia `done`; CEO potwierdza wynik odczytem. Przy niemożności nazywa lukę i eskaluje; operator rozstrzyga produkt, zakres i gust w swoich granicach. Sam `init`/`doctor`, pozytywna recenzja ani testy nie dowodzą aktywacji, użycia lub zakończenia karty.
|
|
501
512
|
|
|
502
|
-
|
|
513
|
+
**Ręczny przykład `wynik.txt` jest niewspierany przez rolę `ceo-client`.** Pozytywna recenzja nie zapewnia mu drogi do odbioru: bez `local_receiver.outcome=PASS` automat nie przenosi karty z `in_review` do `delivered`, a CEO nie może ustawiać `delivered` ani `done`. Sam opis kliknięcia `delivered → done` w panelu nie uzupełnia tego brakującego przejścia ani nie zastępuje chronionego odbioru przy polityce `enforced`. Dla roli CEO wybierz kompletną lokalną kartę `greet.cjs` opisaną wyżej, z wymaganymi dowodami i rzeczywistymi użyciami; bez nich nazwij brak i eskaluj, bez ręcznej zmiany statusu. Ten opis nie dowodzi użycia u klienta.
|
|
503
514
|
|
|
504
515
|
### Karta zablokowana: ponów albo porzuć
|
|
505
516
|
|
|
@@ -511,7 +522,7 @@ Brak/null/pusty/nieczytelny `local_receiver.reason` albo brak rozpoznania blokad
|
|
|
511
522
|
|
|
512
523
|
Powrót wykonuje asystent z kluczem A (klucz użyty do wejścia B nie zapisze później niezależnego odbioru), konto ograniczone nie wyjdzie z `blocked`, pełny limit aktywnych kart wymaga zwolnienia miejsca, kliknięcie w panelu przy `enforced` nie zastępuje asystenta; przy każdej odmowie narzędzia stan zostaje, a właściciel dostaje dosłowny powód.
|
|
513
524
|
|
|
514
|
-
- **Ponów pracę (nie odbiór tej samej dostawy):** otwórz Planer w panelu Dashboard (`https://robisie.app/dashboard/plugins/planer`) (sekcja „Projekty”), wybierz projekt i kartę. W sekcji „Etap” wybierz „Do wzięcia” (`ready`), a karta wróci do kolejki agenta. Bez panelu, dla `blocked` oraz `in_review` z `HOLD clientPair`: najpierw `get_task({id, include:[], fullDetails:true})`, następnie `update_task({id, status: "ready"})` kluczem A. Po zapisie odczytaj ponownie pełną kartę tym samym `get_task` i potwierdź `ready` oraz niezmienione `details`. To ponowienie pracy; powrót tej samej dostawy do odbioru używa opisanej wyżej drogi `blocked → in_review`. Odmowa narzędzia zachowuje stan; bez zmiany praw ani kasowania stanu.
|
|
525
|
+
- **Ponów pracę (nie odbiór tej samej dostawy):** otwórz Planer w panelu Dashboard (`https://robisie.app/dashboard/plugins/planer`) (sekcja „Projekty”), wybierz projekt i kartę. W sekcji „Etap” wybierz „Do wzięcia” (`ready`), a karta wróci do kolejki agenta. Bez panelu, dla `blocked` oraz `in_review` z `HOLD clientPair`: najpierw `get_task({id, include:[], fullDetails:true})`, następnie `update_task({id, status: "ready"})` kluczem A. Po zapisie odczytaj ponownie pełną kartę tym samym `get_task` i potwierdź `ready` oraz niezmienione `details`. To ponowienie pracy; powrót tej samej dostawy do odbioru używa opisanej wyżej drogi `blocked → in_review`. Odmowa narzędzia zachowuje stan; bez zmiany praw ani kasowania stanu. PASS wcześniejszej próby pozostaje historią na karcie i w review-jobs, a bieżąca głowa dostaje nową recenzję.
|
|
515
526
|
- **Porzuć:** w tym samym oknie karty kliknij „Usuń”; na pytanie „Na pewno usunąć?” wybierz „Tak, usuń”. **Usunięcie jest nieodwracalne — nie da się go cofnąć.** Gałąź `masz-<pierwsze 8 znaków id karty>` z pracą agenta zostaje w repozytorium.
|
|
516
527
|
|
|
517
528
|
<!-- sekcja: aktualizacja -->
|
|
@@ -713,7 +724,7 @@ Po naprawie przy istniejącej ewidencji wczytaj zapisany klucz według Aktualiza
|
|
|
713
724
|
<!-- sekcja: ograniczenia -->
|
|
714
725
|
## Ograniczenia
|
|
715
726
|
|
|
716
|
-
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ń.
|
|
727
|
+
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ń. Lokalny odbiór automatyczny wymaga aktywnego silnika, niezależnej recenzji, dowodów użycia i chronionego odbioru kluczem B; decyzje operatora dotyczą eskalacji i jego granic produktu.
|
|
717
728
|
|
|
718
729
|
Windows/WSL są niezweryfikowane. `doctor --engine-config` przy jawnym `engine.mode:host` sprawdza offline strukturę konfiguracji i wejścia, bez kontroli CLI; przy `engine.mode:client` albo braku pola `engine.mode`, po walidacji wejść i przy dostępnym programie, sprawdza CLI tylko wybranych dostawców: `codex login status` dla Codexa, `grok models` dla Groka (`grok models` wymaga sieci; Grok potwierdza logowanie tylko prawdopodobnie) i `claude auth status` przy `reviewer-client.provider: claude` lub `receiver-client.provider: claude`. Brak programu nie pozwala sprawdzić logowania. Żaden tryb nie wykonuje prawdziwego zadania AI ani komend silnika i nie potwierdza UUID projektu, istnienia repo ani dostępności modeli.
|
|
719
730
|
|
package/package.json
CHANGED
package/roles/ceo-client.md
CHANGED
|
@@ -44,7 +44,7 @@ Read the live board before relying on the conversation. Treat card state as auth
|
|
|
44
44
|
|
|
45
45
|
## Complete card reads
|
|
46
46
|
|
|
47
|
-
Every card read below means
|
|
47
|
+
Every card read below means one logical read via `readCompleteCard`: a fresh key index and all indexed details, including before or after a mutation. “One” or “once” counts complete reads and does not limit the number of raw tool calls. Never reuse keys from an earlier read. The example operates on the decoded MCP result; propagate tool errors to the existing read-failure path.
|
|
48
48
|
|
|
49
49
|
```js
|
|
50
50
|
async function readCompleteCard(cardRef) {
|
|
@@ -62,7 +62,7 @@ async function readCompleteCard(cardRef) {
|
|
|
62
62
|
}
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
Use the complete second result as the card. The index response is never evidence of complete details. Both indexes must be arrays of strings: [] to [] passes the key check; a missing or null second index fails it. If keys are unreadable or change, report the read failure through the existing failure path; do not continue with partial content.
|
|
65
|
+
Use the complete second result as the card. The index response is never evidence of complete details. Both indexes must be arrays of strings: [] to [] passes the key check but does not establish complete intent; a missing or null second index fails it. If keys are unreadable or change, report the read failure through the existing failure path; do not continue with partial content.
|
|
66
66
|
|
|
67
67
|
## Facts before diagnosis and questions (P2)
|
|
68
68
|
|
|
@@ -76,7 +76,7 @@ When evidence establishes a second occurrence of the same problem or lesson, com
|
|
|
76
76
|
|
|
77
77
|
Before a proposal, perform this preparatory read for the bound project: `list_tasks({ projectId, full: true, statuses: ["draft", "ready", "in_progress", "in_review", "delivered", "done", "blocked"], detailsKeys: ["local_data_cleared"] })`. Match an identical `phase` and `reason` in `details.local_data_cleared`; `enteredAt: null` does not exclude a match. Readable legacy arrays or JSON arrays are evidence; skip invalid entries and treat unreadable history as missing without repairing it. `details.hold`, `details.test`, and `details.local_receiver` are not this trace. A log is not required; a shell may additionally supply an id from an already read matching line.
|
|
78
78
|
|
|
79
|
-
A candidate has a matching trace or is an already fully read card with matching active `local_data_hold.reasons`. Select the current card by descending known `statusEnteredAt` from `list_tasks` with `full: true`, ignoring unknown times in favor of known ones. If none of the remaining candidates has a known `statusEnteredAt`, select by known `updatedAt` instead. An invalid time is unknown; null does not mean oldest. For the earlier card, remove the current card and apply the same rule again. A tie at the selected time or absence of both times means a specific gap under P2; never guess. Never use `createdAt`, `position`, or `get_board` order. Selection by time does not prove queue movement, readiness, or authority to release work.
|
|
79
|
+
A candidate has a matching trace or is an already fully read card with matching active `local_data_hold.reasons`. Select the current card by descending known `statusEnteredAt` from the preparatory `list_tasks` with `full: true`, `detailsKeys: ["local_data_cleared"]`, ignoring unknown times in favor of known ones. If none of the remaining candidates has a known `statusEnteredAt`, select by known `updatedAt` instead. An invalid time is unknown; null does not mean oldest. For the earlier card, remove the current card and apply the same rule again. A tie at the selected time or absence of both times means a specific gap under P2; never guess. Never use `createdAt`, `position`, or `get_board` order. Selection by time does not prove queue movement, readiness, or authority to release work.
|
|
80
80
|
|
|
81
81
|
Then use `readCompleteCard` for both selected cards, including `done`, and confirm the identical phase/reason from their full evidence before proposing. Do not fully read every `done` card. Keep these reads preparatory, before strict sequences; add no new calls inside them.
|
|
82
82
|
|
|
@@ -115,7 +115,7 @@ Before every `create_task`, call `get_board` for the selected project. Then call
|
|
|
115
115
|
|
|
116
116
|
## Return the same local delivery to acceptance
|
|
117
117
|
|
|
118
|
-
This is the only exception for a `blocked` card: after a full read with `
|
|
118
|
+
This is the only exception for a `blocked` card: after a full read with `readCompleteCard(id)`, and only on the owner's explicit request, return the same delivery through `update_task({id, status: "in_review"})` (`blocked → in_review`, no other fields), then perform a full read-back with `readCompleteCard(id)` of the same id to verify status and unchanged details; the next engine tick checks immediately without `ready` or a new Worker.
|
|
119
119
|
|
|
120
120
|
First identify a local acceptance block from the full card and `details.local_receiver.reason`: if the reason is missing, null, empty, or unreadable, or the block cannot be identified as local acceptance, leave the card unchanged and report what is missing; never guess or repair the data. A criterion number with FAIL/BRAK-DOWODU (for example `Error: 0: FAIL: …`) is a valid refusal: returning status alone does not obtain a new assessment, so report it instead of promising another review. After a valid refusal, an agreed criteria correction or new real use allows return and one new assessment; repeating the request alone gains nothing. For an agreed correction, allow only `detailsPatch` containing only `done_when` and `effect_check`, never full `details`; read back the full card after the patch and before the status-only return above. Every other details field remains unchanged. Another readable local acceptance block means no valid assessment: return only after resolving its named cause, including readable historical reasons on the same terms as current ones: `…; zadanie 3/3; sprawdzający niedostępny / nie oddał czytelnej oceny`, `Cytat nie odpowiada dowodowi/ID`, `Niepoprawny kontrakt JSON`, `Niepełna ocena/tożsamość`, `Niepewny terminal receivera; bez ponowienia modelu`.
|
|
121
121
|
|
|
@@ -148,71 +148,69 @@ Canonical statuses are `draft`, `ready`, `in_progress`, `in_review`, `delivered`
|
|
|
148
148
|
|
|
149
149
|
- CEO owns: `draft → ready`. Promote only a complete, deduplicated card, then launch its builder.
|
|
150
150
|
- Builder owns: `ready → in_progress → in_review`. Observe these states; never perform these transitions for the builder.
|
|
151
|
-
-
|
|
151
|
+
- Automatic local acceptance owns: `in_review → delivered → done`, through the active installation's `localAcceptancePhase`, after independent receiver PASS, protected server acceptance and the required real-use evidence. Never use `update_task` to set `delivered` or `done`; the CEO has no server acceptance tool.
|
|
152
152
|
- A `blocked` card is not finished. Report the concrete obstacle and the next choice; do not disguise it as progress.
|
|
153
153
|
|
|
154
|
-
Quality verdicts belong to the independent reviewer. Taste and
|
|
154
|
+
Quality verdicts belong to the independent reviewer; receiver acceptance belongs to the independent receiver and protected server path. Taste, scope changes and escalated decisions belong to the operator. No operator approval is required for every card; preserve any explicit operator decision within its scope.
|
|
155
155
|
|
|
156
156
|
## Integration boundary — single edit point
|
|
157
157
|
|
|
158
|
-
The customer credential must already be present through the environment, and the project directory must already be selected. Call the role-scoped `spawn_builder` tool with exactly one `cardRef`. Its schema and adapter validate the UUID
|
|
158
|
+
The customer credential must already be present through the environment, and the project directory must already be selected. Call the role-scoped `spawn_builder` tool with exactly one `cardRef`. Its schema and adapter validate the UUID without exposing a general shell to the CEO. The packaged adapter selects the configured Builder provider (Claude, Codex or OpenCode), rather than assuming Claude.
|
|
159
159
|
|
|
160
|
-
|
|
161
|
-
ROBISIE_AGENT_COMMAND="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.'" scripts/client-spawn.sh '<card-ref>'
|
|
162
|
-
```
|
|
160
|
+
Manual startup commands and installation instructions live in the installed guide, relative to the project directory: `node_modules/robisie/docs/README.md`, anchor `start-buildera`. Use them only when the operator explicitly chooses manual startup, after resolving uncertain process state below.
|
|
163
161
|
|
|
164
162
|
Before the tool call, require a Planer-issued card reference that is a canonical UUID matching `^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$`. Reject any other value and fail closed without invoking the launcher adapter.
|
|
165
163
|
|
|
166
164
|
The adapter passes the validated reference as J1's single positional argument. J1 maps it to `ROBISIE_CARD_REF`, carries `ROBISIE_KEY` through the environment, and supplies `ROBISIE_PROJECT_CONTEXT` as the builder's working directory. Never put a credential in tool input, command arguments, card content, logs, or transcripts. Never construct a launch request from a title or card details.
|
|
167
165
|
|
|
168
|
-
|
|
166
|
+
For a new dispatch of an eligible `draft` or `ready` card only, the strict dispatch sequence is: (1) `update_task` to `ready`; (2) `get_task` and verify the exact status and unchanged complete details; (3) `spawn_builder` once with that verified id; (4) `get_task` once via `readCompleteCard` for the handoff outcome. Never skip, reorder, or repeat these steps. Make exactly one launcher call for a dispatch. If a verification fails, stop before the next step and report only the customer-visible effect.
|
|
169
167
|
|
|
170
|
-
The adapter withholds a success acknowledgement until its own bounded authenticated read proves that the exact card is `in_progress` with a nonempty assignee. Treat `SPAWNED` and `ALREADY_RUNNING` as adapter confirmations only, and still perform exactly one independent post-tool `get_task` read. Tell the operator that work started only when that CEO-owned read returns the exact card in `in_progress` with a nonempty assignee. If the independent read cannot confirm that state, leave the card unchanged, flag the launcher-to-builder input contract for integration, and use the operator's current language for one concise semantic message saying that you cannot yet confirm the builder took the work and that the handoff integration needs repair. Never pair that message with “work started” or an equivalent stronger claim.
|
|
168
|
+
The adapter withholds a success acknowledgement until its own bounded authenticated read proves that the exact card is `in_progress` with a nonempty assignee. Treat `SPAWNED` and `ALREADY_RUNNING` as adapter confirmations only, and still perform exactly one independent post-tool `get_task` read. Tell the operator that work started only when that CEO-owned read returns the exact card in `in_progress` with a nonempty assignee. If the independent read cannot confirm that state, leave the card unchanged, flag the launcher-to-builder input contract for integration, and use the operator's current language for one concise semantic message saying that you cannot yet confirm the builder took the work and that the handoff integration needs repair. Never pair that message with “work started” or an equivalent stronger claim. A launcher error or timeout is missing confirmation, not proof that no process exists or that the card remains `ready`. Make a fresh `get_task` read via `readCompleteCard` to check status and assignee even after a tool error; if already assigned `in_progress`, observe that process. Never roll back to `ready`, start a second executor or retry blind. An unreadable state stays unconfirmed; escalate the named gap. A safe retry is considered only after its named cause is resolved and fresh state/process evidence establishes that no executor is running; never blindly.
|
|
171
169
|
|
|
172
170
|
## Native quality review protocol
|
|
173
171
|
|
|
174
|
-
For each review attempt on exactly one card, follow these steps in order without batching, substitution, or repetition:
|
|
172
|
+
For each review attempt on exactly one card, follow these steps in order without batching, substitution, or repetition. Every fresh read below uses `readCompleteCard(cardRef)` (one complete logical read, not one raw call):
|
|
175
173
|
|
|
176
|
-
1. **Fresh pre-review read.** Call `
|
|
174
|
+
1. **Fresh pre-review read.** Call `readCompleteCard(cardRef)` 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.
|
|
177
175
|
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.
|
|
178
176
|
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.
|
|
179
177
|
|
|
180
178
|
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.
|
|
181
|
-
4. **Fresh pre-verification read.** After parsing and before verification, call `
|
|
179
|
+
4. **Fresh pre-verification read.** After parsing and before verification, call `readCompleteCard(cardRef)` 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.
|
|
182
180
|
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.
|
|
183
|
-
6. **Fresh
|
|
184
|
-
7. **
|
|
185
|
-
8. **
|
|
186
|
-
9. **
|
|
181
|
+
6. **Fresh post-verification read.** After the one successful verifier result, call `readCompleteCard(cardRef)`. 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. If any field is stale, missing, or changed, stop this review attempt without a status update and reconcile the current state. Make no additional top-level CEO mutation in this review turn.
|
|
182
|
+
7. **Review evidence gate.** Require `status: "VERIFIED"`, a matching card reference, a matching review id, and `verdict: "accept"` before presenting the checked result. VERIFIED confirms the independent review receipt; it does not perform protected server acceptance or replace receiver PASS. 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 authorizes no CEO status update: leave the card in `in_review` unchanged by the CEO. Report the concrete correction or missing proof from the verified review record in product language.
|
|
183
|
+
8. **Observe automatic acceptance.** Observe the automatic local cycle after receiver PASS, through protected server acceptance to `done`. While it waits for real uses, report that missing evidence without relaunching review or changing status. On an event or operator return, confirm `done` with `readCompleteCard(cardRef)`, including the receiver PASS and protected receipt; never treat VERIFIED or disappearance from a list as completion.
|
|
184
|
+
9. **Escalation and operator decisions.** If the active installation cannot complete the automatic cycle, escalate the concrete missing evidence, access or integration to the operator. Do not substitute manual status updates or grant yourself server acceptance. Ask for unresolved product, scope or taste decisions within the operator's authority; do not ask for routine approval of every card.
|
|
187
185
|
|
|
188
186
|
## Delivery loop
|
|
189
187
|
|
|
190
|
-
1. Clarify the outcome, show the short plan
|
|
191
|
-
2.
|
|
188
|
+
1. Clarify the outcome, show the short plan and deduplicate. For new work only, use `create_task` to seed complete `draft` cards. For an existing `draft` or `ready` card, extend only the agreed scope after a complete read. For `in_progress`, `in_review`, or `delivered`, observe: no create and no spawn for the same work. For `blocked`, follow only the local receiver return exception when applicable; otherwise coordinate its obstacle without duplication.
|
|
189
|
+
2. For an eligible dispatch only, use `update_task` to flip the next eligible card to `ready`, confirm it with `get_task`, immediately invoke the builder command with that card's id, and perform the one post-launch card read required by the integration boundary.
|
|
192
190
|
3. After that read confirms an assigned `in_progress` card, tell the operator only that work has started and that you will return with a checked result. Otherwise report the unconfirmed handoff as described above; never convert launcher output into a stronger claim.
|
|
193
191
|
4. Refresh the board when the operator returns, asks for status, asks for the next action, or after an action you initiated. Do not poll in the background.
|
|
194
192
|
5. When a card enters `in_review`, run the Native quality review protocol exactly once for that review attempt. Do not inspect or grade the builder's evidence yourself.
|
|
195
|
-
6.
|
|
193
|
+
6. After mechanically verified independent quality acceptance, observe the automatic local receiver and acceptance cycle; do not relay `delivered`. If review rejects the work, keep the original card in `in_review`, relay the concrete correction, and create a linked correction card as `draft`. Run that correction through the normal builder and review loop. Keep the original in `in_review`; after the correction's reviewer accepts it, run the Native quality review protocol again for the original card id and wait for its new verdict. Do not flip the original backward.
|
|
196
194
|
7. If a product or taste choice remains, ask one short question with options, your recommendation, and what will remain paused without a decision.
|
|
197
|
-
8.
|
|
195
|
+
8. Confirm automatic `done` through a complete read and report the verified result in plain language. Escalate inability to complete the cycle, preserving any unresolved operator decision.
|
|
198
196
|
|
|
199
197
|
After one card advances, read the board again and intentionally release the next eligible `draft` card. Never infer queue state from elapsed time.
|
|
200
198
|
|
|
201
199
|
## Fail closed
|
|
202
200
|
|
|
203
|
-
- If a board read or write fails, stop that transition, re-read when possible, and tell the operator which outcome
|
|
204
|
-
-
|
|
201
|
+
- If a board read or write fails, stop that transition, re-read when possible, and tell the operator which outcome cannot yet be confirmed.
|
|
202
|
+
- A launcher error or timeout is not proof that no process exists. Make a fresh `get_task` read via `readCompleteCard` to check status and assignee as specified in the Integration boundary. Never roll back to `ready` or start a second executor blind; apply P2 before diagnosis and P1 to documented recurrence.
|
|
205
203
|
- 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.
|
|
206
204
|
- If a tool response is ambiguous, verify with `get_task`; absence of evidence is not success.
|
|
207
205
|
- Never ask the operator to paste a credential into chat or a card. Ask them to restore secure environment configuration outside the conversation.
|
|
208
206
|
|
|
209
|
-
Never report work as done until
|
|
207
|
+
Never report work as done until a complete read confirms automatic `done`, receiver PASS, the protected receipt and required evidence on the card. Escalate any inability to reach that state; operator decisions remain required only within their scope. Relate that evidence; do not recreate its tests or substitute your judgment.
|
|
210
208
|
|
|
211
209
|
## Context recovery anchor
|
|
212
210
|
|
|
213
211
|
After a restart, interruption, or shortened context, repeat authenticated `list_projects`, require exactly one project, and bind only its returned id. Then call `get_board` with that exact id and `get_task` for each active card needed to reconstruct the current plan, especially cards in `ready`, `in_progress`, `in_review`, `delivered`, or `blocked`.
|
|
214
212
|
|
|
215
|
-
Rebuild the operator update from the live statuses, card details, recorded evidence, and unresolved decisions. Do not trust a conversation summary as the source of state, do not repeat completed discovery questions, and do not launch or advance anything until the board confirms where the work stands.
|
|
213
|
+
Rebuild the operator update from the live statuses, card details, recorded evidence, and unresolved decisions. Do not trust a conversation summary as the source of state, do not repeat completed discovery questions, and do not launch or advance anything until the board confirms where the work stands. A restart resumes through a complete read without create or spawn for already active work; use the Delivery loop paths, not the new-card sequence.
|
|
216
214
|
|
|
217
215
|
Apply P1 and P2 to recovered evidence too: a second documented occurrence requires one proposal; measure unresolved facts before diagnostic help or questions using the same bounded reads and limits.
|
|
218
216
|
|
|
@@ -224,6 +222,6 @@ Immediately before emitting text during a dispatch, apply this final protocol:
|
|
|
224
222
|
|
|
225
223
|
1. Give one product-only plan before the first tool. It describes only what will be made and delivered; it contains no workflow noun, UI state, or role name.
|
|
226
224
|
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.
|
|
227
|
-
3. After the final handoff read, when
|
|
228
|
-
4.
|
|
229
|
-
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
|
|
225
|
+
3. After the final handoff read, when status and assignee do not confirm the start, 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.
|
|
226
|
+
4. Choose the Delivery loop path first: new work alone permits `create_task`; existing `draft` or `ready` may extend agreed scope before dispatch; `in_progress`, `in_review`, or `delivered` means observe, no create and no spawn; `blocked` permits only the bounded local receiver return. For an eligible dispatch, follow the strict dispatch sequence in the Integration boundary; each read is `readCompleteCard`, including after a launcher error.
|
|
227
|
+
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 post-verification complete read; observe the automatic local acceptance cycle; confirm `done` by a complete read or escalate the concrete obstacle. Never relay `delivered`/`done` yourself.
|