robisie 0.5.48 → 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 CHANGED
@@ -1,5 +1,16 @@
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
+
3
14
  ## [0.5.48](https://github.com/chuppa12/robisie-app/compare/client-v0.5.47...client-v0.5.48) (2026-11-16)
4
15
 
5
16
 
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` albo ręczną `wynik.txt`; granice muszą odpowiadać wybranemu przykładowi.
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
- Przykład pierwszej karty: w katalogu instalacji utwórz tylko `wynik.txt` z treścią „robisie działa” i końcowym znakiem nowej linii; sprawdź dokładną treść odczytem, bez zależności i publikacji.
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ć. Dotychczasowa ręczna karta wynik.txt pozostaje osobnym przykładem.
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 zgodzie człowieka CEO domyślnie wywołuje `spawn_builder` z ID karty potwierdzonej w `ready`.
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 zgłasza błąd i naprawia przyczynę przed ponowieniem; nie przełącza automatycznie na ręczny start.
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
- W Claude Code CEO uruchamia niezależnego Quality Officera przez `Agent(quality-officer-client)`. Quality Officer sprawdza wynik i zapisuje recenzję oraz dowody; Builder nie recenzuje własnej pracy. CEO weryfikuje potwierdzenie recenzji (verified receipt) i wykonuje świeże odczyty karty przed przejściem do `delivered`; następnie jawny odbiór operatora w panelu pozwala przejść do `done`. Worker nie ustawia `done`. Sam `init`/`doctor` nie daje `done`.
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
- 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 w przewodnikach drogi Claude Code.
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
- Codex: przejście do delivered wymaga niezależnej recenzji oraz zweryfikowanego potwierdzenia (verified receipt). Jeśli w sesji CEO brakuje narzędzia Agent, karta pozostaje w `in_review` i wymaga naprawy integracji przez osobę odpowiedzialną za integrację CEO.
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
 
@@ -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.48";
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.48"; // x-release-please-version
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":"b37151f111bcb95f35a005553bf7e88e8166a3e5","dirty":false}
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": 10153,
1696
- "endLine": 10266,
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": 10557,
1702
- "endLine": 10609,
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:22036) 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"
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
  }
@@ -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.48";
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
- if (!(0, import_node_util4.isDeepStrictEqual)(value, freezeClientPair(selection, config2, worker)))
77265
- throw new ClientPairHold("para, konfiguracja lub to\u017Csamo\u015B\u0107 Workera r\xF3\u017Cni si\u0119 od stampu");
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({
@@ -317718,24 +317739,43 @@ function addedConflictMarkers(worktree, baseRef, tree) {
317718
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))));
317719
317740
  }
317720
317741
  function prepareConflictWorktree(worktree, branch, base2, candidate, snapshot2) {
317721
- if (candidate.diff || candidate.staged) return null;
317722
- const untracked = () => git(["ls-files", "--others", "-z"], worktree).split("\0").filter(Boolean).map((file3) => {
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) => {
317723
317748
  const absolute2 = import_node_path52.default.join(worktree, file3);
317724
317749
  const stat = (0, import_node_fs48.lstatSync)(absolute2);
317725
- if (!stat.isSymbolicLink() && !stat.isFile()) throw new Error(`nie\u015Bledzony plik UNKNOWN: ${file3}`);
317726
- return [file3, stat.isSymbolicLink() ? "link:" + (0, import_node_fs48.readlinkSync)(absolute2) : "bytes:" + (0, import_node_fs48.readFileSync)(absolute2).toString("base64")];
317727
- });
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
+ }));
317728
317755
  const operations = ["MERGE_HEAD", "SQUASH_MSG", "CHERRY_PICK_HEAD", "REVERT_HEAD", "rebase-merge", "rebase-apply", "sequencer"];
317729
- const operationPaths = operations.map((operation) => import_node_path52.default.resolve(worktree, git(["rev-parse", "--git-path", operation], worktree)));
317730
- if (operationPaths.some((file3) => (0, import_node_fs48.existsSync)(file3))) return null;
317731
- const before = untracked();
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
+ }
317732
317769
  const ref = `refs/robisie/konflikt/${branch}-${candidate.head.slice(0, 8)}`;
317733
317770
  const mutate = (args, commit = false) => git(["-c", "core.hooksPath=/dev/null", ...args], worktree, 12e4, commit);
317734
317771
  const rollback = () => {
317735
317772
  mutate(["checkout", "-f", "-B", branch, ref]);
317736
317773
  const squash = operationPaths[1];
317737
317774
  if ((0, import_node_fs48.existsSync)(squash)) (0, import_node_fs48.unlinkSync)(squash);
317738
- if (!(0, import_node_util14.isDeepStrictEqual)(snapshot2(), candidate) || !(0, import_node_util14.isDeepStrictEqual)(untracked(), before) || 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");
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");
317739
317779
  };
317740
317780
  let checkoutStarted = false;
317741
317781
  try {
@@ -317744,7 +317784,7 @@ function prepareConflictWorktree(worktree, branch, base2, candidate, snapshot2)
317744
317784
  mutate(["checkout", "--no-overwrite-ignore", "-B", branch, base2]);
317745
317785
  let mergeError;
317746
317786
  try {
317747
- mutate(["merge", "--squash", candidate.head]);
317787
+ mutate(["merge", "--no-overwrite-ignore", "--squash", candidate.head]);
317748
317788
  } catch (error48) {
317749
317789
  mergeError = error48;
317750
317790
  }
@@ -321919,8 +321959,7 @@ function clientPairForWorker(card, active) {
321919
321959
  }
321920
321960
  return stamp2.clientPair;
321921
321961
  }
321922
- function validateClientReviewClaim(card, active, claim) {
321923
- const pair = clientPairForWorker(card, active);
321962
+ function validateClientReviewClaim(card, active, claim, pair = clientPairForWorker(card, active)) {
321924
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)))
321925
321964
  throw new ClientPairHold("claim nie odpowiada parze i kontraktowi karty");
321926
321965
  validateClientReviewInput(claim);
@@ -321941,8 +321980,8 @@ async function restartClientReview(s, uid, card, a, changed) {
321941
321980
  reviewResultDiagnostic(s, card.id, "review-hold", errorText5(error48));
321942
321981
  }
321943
321982
  }
321944
- function validateClientReviewResult(card, active, claim, result, deliveryBase) {
321945
- validateClientReviewClaim(card, active, claim);
321983
+ function validateClientReviewResult(card, active, claim, result, deliveryBase, frozenPair) {
321984
+ validateClientReviewClaim(card, active, claim, frozenPair);
321946
321985
  const selected = asRecord3(result.attempts?.[0]);
321947
321986
  const reviewer = claim.clientPair.selection.reviewer;
321948
321987
  const provider = { codex: "openai", claude: "anthropic", grok: "xai" }[reviewer.provider];
@@ -321958,12 +321997,17 @@ ${engineBaseRef()} SHA: `;
321958
321997
  const reviewedBase = baseAt < 0 ? "" : packet3.slice(baseAt + marker.length, baseAt + marker.length + 40);
321959
321998
  if (!/^[a-f0-9]{40}$/.test(reviewedBase) || deliveryBase !== void 0 && deliveryBase !== reviewedBase)
321960
321999
  throw new ClientPairHold("brak zgodnej bazy pakietu recenzji");
321961
- if (raw.sourcePrompt !== grokPrompt({ ...claim, prompt: sourcePrompt2 }, reviewedBase) || result.text !== selected.output || selected.output !== bounded4(raw.text, 4096))
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))
321962
322006
  throw new ClientPairHold("\u017Ar\xF3d\u0142o lub tekst wyniku nie odpowiada zamro\u017Conemu pakietowi");
321963
- 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)
321964
322008
  throw new ClientReviewBaseChanged(String(claim.key), Number(claim.round));
321965
322009
  }
321966
- function validateSavedClientReview(card, active, deliveryBase) {
322010
+ function validateSavedClientReview(card, active, deliveryBase, allowPreviousAttempt = false) {
321967
322011
  const worker = asRecord3(card.details?.maszynista);
321968
322012
  active ??= {
321969
322013
  taskId: card.id,
@@ -321985,9 +322029,29 @@ function validateSavedClientReview(card, active, deliveryBase) {
321985
322029
  const result = JSON.parse((0, import_node_fs48.readFileSync)(`${file3}.result`, "utf8"));
321986
322030
  const marker = asRecord3(JSON.parse((0, import_node_fs48.readFileSync)(`${file3}.started`, "utf8")));
321987
322031
  const full = asRecord3(JSON.parse((0, import_node_fs48.readFileSync)(checkedReceipt(saved.receipt).path, "utf8")));
321988
- 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 || git(["rev-parse", "HEAD"], active.worktree) !== 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))
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))
321989
322035
  throw new ClientPairHold("zapisany PASS nie odpowiada terminalowi");
321990
- validateClientReviewResult(card, active, claim, result, deliveryBase);
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;
321991
322055
  }
321992
322056
  async function reviewActive(s, uid, card, a, landing, installation = tickInstallation) {
321993
322057
  if (withheld(card)) return;
@@ -322028,13 +322092,27 @@ async function reviewActive(s, uid, card, a, landing, installation = tickInstall
322028
322092
  return;
322029
322093
  }
322030
322094
  if (asRecord3(card.details?.review).verdict === "PASS") {
322095
+ let historical;
322031
322096
  try {
322032
- validateSavedClientReview(card, a);
322097
+ historical = validateSavedClientReview(card, a, void 0, true);
322033
322098
  } catch (error48) {
322034
322099
  if (error48 instanceof ClientReviewBaseChanged) await restartClientReview(s, uid, card, a, error48);
322035
322100
  else await holdReviewJob(s, uid, card, errorText5(error48));
322036
322101
  return;
322037
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
+ }
322038
322116
  }
322039
322117
  }
322040
322118
  let recovered;
@@ -323081,7 +323159,7 @@ async function consumeActive(s, uid, a = s.actives[0], landing = { available: tr
323081
323159
  await sendCardEvent(uid, card, event);
323082
323160
  if (move.status === "blocked") {
323083
323161
  s.blocked++;
323084
- technicalBlock(card, move.note);
323162
+ technicalBlock(card, outcome.report.startsWith("Pozosta\u0142e markery konfliktu:") ? `${move.note}; ${outcome.report}` : move.note);
323085
323163
  }
323086
323164
  if (move.status === "in_review") {
323087
323165
  let fresh;
@@ -325158,7 +325236,7 @@ async function dispatchCard(s, uid, projectId2, c, selection, installation, clie
325158
325236
  throw new DispatchHold(`HOLD repair R${reviewRound}: odczyt kandydata: ${errorText5(error48)}`, false);
325159
325237
  }
325160
325238
  try {
325161
- git(["rebase", preparedBase ?? (installation?.baseRef() ?? engineBaseRef())], worktree, 12e4, true);
325239
+ git(["rebase", "--autostash", preparedBase ?? (installation?.baseRef() ?? engineBaseRef())], worktree, 12e4, true);
325162
325240
  } catch (rebaseError) {
325163
325241
  let conflictFiles = "", unknown4 = "";
325164
325242
  try {
@@ -325225,7 +325303,7 @@ Rebase zosta\u0142 przerwany przez udany abort; HEAD, diff i indeks s\u0105 zach
325225
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.
325226
325304
  `;
325227
325305
  } catch (error48) {
325228
- throw new DispatchHold(`HOLD dispatch: odczyt marker\xF3w UNKNOWN: ${errorText5(error48)}`, false);
325306
+ log2(`dispatch ${c.id}: odczyt marker\xF3w: ${errorText5(error48)}`);
325229
325307
  }
325230
325308
  (installation?.prepareWorktree ?? prepareHostWorktree)(worktree);
325231
325309
  const sparseGuard = [
@@ -10,6 +10,7 @@ export interface UpdateRuntime {
10
10
  status: number | null;
11
11
  signal: string | null;
12
12
  stdout: string;
13
+ stderr: string;
13
14
  };
14
15
  kill: typeof process.kill;
15
16
  now: () => number;
@@ -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
- refuse('Polecenie aktualizacji nie zakończyło się poprawnie.');
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
- const manager = ctx.platform === 'linux' ? 'systemctl' : 'launchctl';
224
- const domain = `gui/${typeof process.getuid === 'function' ? process.getuid() : 0}`;
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.48 \u2014 plik zarz\u0105dzany przez `npx robisie`; `npx robisie uninstall` go usunie -->";
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.48) <!-- x-release-please-version -->
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
 
@@ -476,7 +476,7 @@ Missing/null/empty/unreadable `local_receiver.reason` or failure to identify an
476
476
 
477
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.
478
478
 
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.
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.
480
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.
481
481
 
482
482
  <!-- sekcja: aktualizacja -->
package/docs/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # robisie — od konta do odebranej karty (paczka 0.5.48) <!-- x-release-please-version -->
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` albo ręczną `wynik.txt`; granice muszą odpowiadać wybranemu przykładowi.
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
@@ -479,16 +479,17 @@ Przy odmowie lub błędzie IO polecenie zwraca exit 1 z następnym krokiem. Wpis
479
479
 
480
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.
481
481
 
482
- ### Ręczna karta Buildera
482
+ ### Start CEO i Buildera
483
483
 
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 poprawnym odczycie projektów przekaż prośbę, która działa po instalacji npm z samym README:
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.
485
485
 
486
- > Utwórz w tym katalogu plik wynik.txt z dokładną treścią „robisie działa” i końcowym znakiem nowej linii. Sprawdź odczytem, że treść jest dokładnie taka. Granice: tylko ten plik, bez zależności, kont i publikacji. Korzystaj z mojej wcześniejszej zgody, jeśli obejmuje dokładnie ten zakres; w przeciwnym razie zapytaj przed pracą. Po pracy potrzebuję niezależnej recenzji i osobnego końcowego odbioru.
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.
487
487
 
488
- Po zgodzie człowieka CEO domyślnie wywołuje `spawn_builder` z ID karty potwierdzonej w `ready`. Pełny przebieg w Claude Code: `draft` → `ready` → `in_progress` → `in_review` → niezależna recenzja i verified receipt → `delivered` → odbiór właściciela → `done`; granice odbioru dla pozostałych sesji opisuje sekcja [Recenzja i jawny odbiór](#recenzja-i-odbior).
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).
489
489
 
490
- Przy błędzie `spawn_builder` CEO zgłasza błąd i naprawia przyczynę przed ponowieniem; nie przełącza automatycznie na ręczny start.
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.
491
491
 
492
+ <a id="start-buildera"></a>
492
493
  Ręczny start to wyłącznie jawny wybór operatora: wtedy CEO podaje polecenie do uruchomienia w nowym terminalu w katalogu instalacji.
493
494
 
494
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:
@@ -505,13 +506,11 @@ Oczekiwany wynik startu: świeży odczyt CEO potwierdza przydzieloną kartę in_
505
506
  <a id="recenzja-i-odbior"></a>
506
507
  ## Recenzja i jawny odbiór
507
508
 
508
- W Claude Code CEO uruchamia niezależnego Quality Officera przez `Agent(quality-officer-client)`, po świeżym odczycie in_review. Quality Officer niezależnie sprawdza wynik i zapisuje recenzję oraz dowody na karcie; Builder nie recenzuje własnej pracy. CEO weryfikuje potwierdzenie recenzji (verified receipt) i wykonuje świeże odczyty karty wymagane przez protokół przed przejściem do `delivered`; następnie jawny odbiór operatora pozwala przejść do `done`. Sprawdzenie dowodów i jawna zgoda na odbiór to obowiązek operatora. Po zweryfikowanej recenzji i przejściu do delivered sprawdź kryteria odbioru; jeśli do odbioru brakuje dowodów lub Twojej zgody, pozostaw kartę w `delivered`.
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.
509
510
 
510
- 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ą.
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.
511
512
 
512
- W innych sesjach CEO, w tym Codex, przejście do delivered wymaga niezależnej recenzji oraz zweryfikowanego potwierdzenia (verified receipt). Jeśli w sesji CEO brakuje narzędzia Agent, karta pozostaje w `in_review`: to brak zdolności produktu wymagający naprawy przez osobę odpowiedzialną za integrację CEO. Nie zastępuj recenzji oceną Buildera ani ręczną zmianą etapu. Sama konfiguracja trzech ról nie zapewnia tej integracji.
513
-
514
- Właściciel projektu może w panelu: Dashboard → Planer → karta → Etap wybrać „Zrobione” i przesunąć `delivered` do `done`, także przy kluczu agenta `worker`. Dla ręcznej karty wynik.txt serwer nie wymusza zapisanej akceptacji ani dowodów przed zmianą na `done`: panel pozwala właścicielowi wybrać „Zrobione” także bez nich. Zrób to dopiero po sprawdzeniu wyniku i jawnym odbiorze. Panel nie edytuje szczegółów `details`; recenzję i dowody zapisuje się przez obsługiwany przepływ narzędzi tablicy. Sama instrukcja nie dowodzi, że ten przebieg przeszedł już u klienta.
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.
515
514
 
516
515
  ### Karta zablokowana: ponów albo porzuć
517
516
 
@@ -523,7 +522,7 @@ Brak/null/pusty/nieczytelny `local_receiver.reason` albo brak rozpoznania blokad
523
522
 
524
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.
525
524
 
526
- - **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ę.
527
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.
528
527
 
529
528
  <!-- sekcja: aktualizacja -->
@@ -725,7 +724,7 @@ Po naprawie przy istniejącej ewidencji wczytaj zapisany klucz według Aktualiza
725
724
  <!-- sekcja: ograniczenia -->
726
725
  ## Ograniczenia
727
726
 
728
- Instalator nie uruchamia sam usług w tle ani Buildera; po zgodzie operatora CEO może uruchomić Buildera przez `spawn_builder`. Pomocniki działają podczas sesji agenta, z kontekstem katalogu projektu (lub `ROBISIE_PROJECT_CONTEXT`). Instalator łączy się z robisie w celu sprawdzenia kontraktu i klucza; plik paczki nie zapewnia konta ani dostępu do dostawcy AI. Jedna wspólna tożsamość klucza nie daje trzech różnych poziomów uprawnień. Odbiór wymaga niezależnej recenzji, dowodów i zgody operatora.
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.
729
728
 
730
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.
731
730
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robisie",
3
- "version": "0.5.48",
3
+ "version": "0.5.49",
4
4
  "description": "Instalator klienta robisie: łączy agenta (Claude Code, Codex CLI, OpenCode) z tablicą robisie i instaluje role klienta.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -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 this two-call procedure, including each fresh read before or after a mutation. Start with a new key index each time; never reuse keys from an earlier read. The example operates on the decoded MCP result; propagate tool errors to the existing read-failure path.
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 `get_task({id, include:[], fullDetails:true})`, 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 of the same id to verify status and unchanged details; the next engine tick checks immediately without `ready` or a new Worker.
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
- - Verdict relay only: `in_review → delivered → done`. You execute these updates only as a messenger for the required external verdicts.
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 product acceptance belong to the operator. Do not advance while either required verdict is missing.
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 and execute this direct, idempotent J1 command without exposing a general shell to the CEO:
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
- ```sh
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
- The strict dispatch sequence for one card 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 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.
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. Any nonzero launcher result is a failed launch.
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 `mcp__robisie__get_task({ id: cardRef, include: detailsKeys })` immediately before review. Require one successful non-null result for the exact card id with status `in_review`. If the read fails, returns `null`, names another card, or reports another status, stop before the independent review call and make no status update.
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 `mcp__robisie__get_task({ id: cardRef, include: detailsKeys })` again. Require one successful non-null result for the same exact card still in `in_review`. If it changed or the read is unavailable, stop before the verifier and make no status update.
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 pre-delivery read.** After the one successful verifier result and before any update, call `mcp__robisie__get_task({ id: cardRef, include: detailsKeys })` once more. Require the exact card still in `in_review`, byte-for-byte structurally unchanged from the post-review card (post-Agent for Claude) returned by the fresh pre-verification read. Stop without a status update if any field is stale, missing, or changed. Make no additional top-level CEO mutation in this review turn; the only permitted top-level mutation is the exact delivery update in the next step.
184
- 7. **Delivery gate.** Only when the verifier returns `status: "VERIFIED"`, a matching card reference, a matching review id, and `verdict: "accept"`, and the fresh pre-delivery read passed, may you call `update_task` exactly once with only `{ id: cardRef, status: "delivered" }`. Require its slim echo to match the exact card id, title, track, `delivered` status, and new timestamp. A `reject` verdict, an `evidence_missing` verdict, a malformed receipt, an Agent error or timeout, a `spawn_quality` error or timeout, a verifier tool error, an unverified response, or any mismatch must leave the original card in `in_review` unchanged. Report the concrete customer-visible correction or missing proof from the verified review record without exposing workflow mechanics.
185
- 8. **Fresh delivered read.** Immediately after the exact update, call `mcp__robisie__get_task({ id: cardRef, include: detailsKeys })` once. Require the exact card in `delivered`, equal to the unchanged pre-delivery card except for the expected status and timestamp transition, with that timestamp matching the mutation echo. Only then present the checked result.
186
- 9. **Operator acceptance gate.** Explicit operator acceptance is required after the card is `delivered` before you may call `update_task` to move it to `done`. Silence, the original request, quality acceptance, or a reply that does not accept the whole presented result is not acceptance. Re-read the card and require `done` before reporting completion.
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, deduplicate, and seed complete `draft` cards.
191
- 2. 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.
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. Only after the mechanically verified independent reviewer accepts quality may you use `update_task` to 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.
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. Only after the operator accepts the result and any taste decision may you use `update_task` to relay `done`. Re-read the card and report the verified result in plain language.
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 did not happen.
204
- - Leave the card in `ready` when the launcher fails, say that work did not start, and offer a safe retry of the same idempotent command only after its named cause has been resolved, never blindly; apply P2 before diagnosis and P1 to documented recurrence.
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 evidence is present on the card, the independent reviewer has accepted quality, and the operator has accepted the result. Relate that evidence; do not recreate its tests or substitute your judgment.
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 the work is still unassigned, use only the semantic unconfirmed-handoff message described by the integration boundary in the operator's current language. Do not add internal mechanics or a stronger claim.
228
- 4. Follow this strict card-to-handoff sequence without batching or omission: `create_task`; wait for its result; `get_task`; wait and verify; `update_task`; wait; `get_task`; wait and verify; `spawn_builder`; wait; `get_task`; wait before the final response.
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 pre-delivery `get_task`; the exact `delivered` update; one full delivered `get_task`; `done` only after explicit operator acceptance.
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.