robisie 0.4.6 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Historia zmian klienta / Client changelog
2
2
 
3
+ ## [0.5.0](https://github.com/chuppa12/robisie-app/compare/client-v0.4.7...client-v0.5.0) (2026-11-11)
4
+
5
+
6
+ ### Features
7
+
8
+ * **maszynista:** Z3 — host uruchamia takt z wydanej paczki (engine.hostPaths, instalator bez ambientu, pin E1) ([a44b862](https://github.com/chuppa12/robisie-app/commit/a44b8623adf91cb6e366b9f0bff98df86aa7c4e6))
9
+ * **maszynista:** Z3 — host uruchamia takt z wydanej paczki (engine.hostPaths, instalator launchd bez ambientu, pin E1) ([c5313be](https://github.com/chuppa12/robisie-app/commit/c5313beb590893c897c4419428c60270454bbd4c))
10
+
11
+ ## [0.4.7](https://github.com/chuppa12/robisie-app/compare/client-v0.4.6...client-v0.4.7) (2026-11-11)
12
+
13
+
14
+ ### Factory Cards
15
+
16
+ * praca workera task-mwb53tx1-k7ksqp (auto-commit) ([d335766](https://github.com/chuppa12/robisie-app/commit/d33576604d94c8a97d79587e23a0620aaa54fe3e))
17
+
3
18
  ## [0.4.6](https://github.com/chuppa12/robisie-app/compare/client-v0.4.5...client-v0.4.6) (2026-11-10)
4
19
 
5
20
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
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
 
5
- Przewodniki: [PL — konto → odbiór → odinstalowanie](docs/README.md) · [EN — account → acceptance → uninstall](docs/README.en.md). Przygotuj Node.js 24+ (wydanie użyte przy sprawdzeniach: 24.3.0), npm, program jednego dostawcy AI oraz pusty katalog; silnik w paczce (`dist/engine/tick.cjs`) wymaga systemu Linux. Nie potrzebujesz strony ani własnego pliku `package.json` — utworzy go poniższy krok Node.js przed instalacją. Zacznij od konta i projektu w panelu. Projekt w panelu i katalog na dysku to osobne rzeczy; CEO wymaga dokładnie jednego projektu z `list_projects`.
5
+ Przewodniki: [PL — konto → odbiór → odinstalowanie](docs/README.md) · [EN — account → acceptance → uninstall](docs/README.en.md). Przygotuj Node.js 24+ (wydanie użyte przy sprawdzeniach: 24.3.0), npm, program jednego dostawcy AI oraz pusty katalog; silnik w paczce (`dist/engine/tick.cjs`) dla klienta wymaga systemu Linux. Jawny host Robisie (`mode: "host"`, `pr|delivered`) obsługuje także macOS; konfigurację i granice opisuje ENGINE-CONFIG. Nie potrzebujesz strony ani własnego pliku `package.json` — utworzy go poniższy krok Node.js przed instalacją. Zacznij od konta i projektu w panelu. Projekt w panelu i katalog na dysku to osobne rzeczy; CEO wymaga dokładnie jednego projektu z `list_projects`.
6
6
 
7
7
  Konto i klucz są potrzebne do init i pracy ról. Osobne wejście to walidacja offline, gdy CLI jest dostępne: nie sprawdza instalacji, nie uruchamia dostawców i nie wymaga podawania UUID projektu. Osobno `npx robisie doctor --engine-config ./robisie.config.json` sprawdza offline strukturę konfiguracji i wejścia instalacji lokalnej: nie potwierdza UUID projektu, repo, modeli ani uruchomienia dostawców. Lokalne przewodniki są w `node_modules/robisie/docs/`.
8
8
 
@@ -34,7 +34,7 @@ Wymagane są dwa osobne klucze: A (`ROBISIE_KEY`, worker) i B (`ROBISIE_REVIEW_K
34
34
 
35
35
  A i B są zapisywane osobno w `${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key` i `review-key` (pliki 0600, katalog 0700). B nie trafia do konfiguracji agentów/modeli, manifestu, argumentów, claimów ani komunikatów. Załaduj oba ENV także przy `--no-shell`. Przed pierwszym zadaniem uruchom zwykły `npx robisie doctor`: tryb `--engine-config` nie sprawdza kluczy. Przy brakującym lub niepoprawnym A doctor diagnozuje A; sprawdzanie B zaczyna dopiero, gdy A jest obecny i ma poprawny format. Brak B, B=A, zły format i nieudany odczyt B dają exit 1. B sprawdzane jest przez `initialize` + `list_projects`, bez mutacji danych biznesowych; liczniki auth mogą wzrosnąć. Odczyt nie potwierdza roli, wspólnego konta A/B ani polityki projektu.
36
36
 
37
- Każdy wynik doctor zawiera `! Polityka enforced: NIE SPRAWDZONO — klient nie ma API jej odczytu.` Odmowa kontekstu projektu następuje przed doctor i ma własną poradę. Zielony doctor nie oznacza aktywacji enforced. Przy błędzie B sprawdź dostęp do Connect i wystawienie owner_validator; awaria sieci nie dowodzi unieważnienia. Ponów init z poprawnym B w ENV, potem doctor. Zmiana polityki wymaga osobnej uprawnionej czynności operatora.
37
+ Gdy klucz A widzi dokładnie jeden projekt, doctor odczytuje jego `reviewPolicy` przez `list_projects`: `enforced` daje „✓ Polityka enforced: TAK”, `legacy` ostrzega, że `accept_review` będzie odmawiane i wymaga ustawienia enforced przez operatora. Starszy serwer bez pola lub `null` daje „NIE SPRAWDZONO — serwer nie zwraca polityki”, błąd odczytu — „NIE SPRAWDZONO — odczyt nieudany”. Linia jest informacyjna i nie zmienia exit. Odmowa kontekstu projektu następuje przed doctor i ma własną poradę. Klient tylko odczytuje politykę, nie aktywuje enforced; zmienia ją uprawniony operator.
38
38
 
39
39
  Jawnie wybierz `worker` w Connect; kolejne klucze mają domyślnie `observer`, który tylko czyta. Człowiek generuje klucz worker z etykietą w https://robisie.app/dashboard/connect i podaje go poza rozmową do ukrytego pytania init, nigdy do czatu, argumentu polecenia ani historii powłoki. W zsh/bash usuń stary ENV, a po udanym init wczytaj zapisany klucz do bieżącej powłoki bez wyświetlania go — init nie ustawia jej środowiska. Dla nowej instalacji z Claude wejdź do wybranego pustego katalogu (zastąp przykładową ścieżkę poniżej). Poniższy krok Node.js tworzy lokalny `package.json` niezależnie od nazwy katalogu, także ze spacjami i polskimi znakami. Manifest ustala katalog instalacji także pod przodkiem z `node_modules`. Jeśli ścieżka `package.json` już istnieje (również jako link), krok odmawia zapisu; niczego nie nadpisuje. Błąd wejścia do katalogu lub utworzenia manifestu zatrzymuje dalszy blok:
40
40
 
@@ -131,6 +131,8 @@ Po sukcesie człowiek potwierdza nazwę i cel projektu oraz katalog instalacji,
131
131
 
132
132
  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.
133
133
 
134
+ 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.
135
+
134
136
  ## Start CEO
135
137
 
136
138
  Człowiek uruchamia CEO w katalogu instalacji.
@@ -231,7 +233,7 @@ Uruchom `npx robisie doctor --engine-config ./robisie.config.json` (także `--en
231
233
 
232
234
  Kod 0 oznacza poprawną strukturę konfiguracji i dokładnie cztery kompletne przypisania wykonania; raport pokazuje rolę → imię / dostawcę / model / wysiłek. Kod 1 wskazuje plik, błędne pole (jeśli dotyczy) i następny krok. Ten tryb działa offline, bez klucza, uruchamiania dostawców, wykonywania komend silnika ani zapisu plików. Raport jawnie stwierdza: „sprawdzono konfigurację; nie sprawdzono uruchomienia dostawców”. Zwykły `doctor` zachowuje dotychczasową diagnozę instalacji.
233
235
 
234
- Silnik paczki — `dist/engine/tick.cjs` — jest odrębny od instalatora: `init`/`doctor`/`uninstall` go nie uruchamiają. Uruchamia go `npx robisie factory run --engine-config ./robisie.config.json` (flaga `--once` wykonuje jeden takt) i tylko na Linuxie z Node.js 24+; starszy Node, np. 22, otrzymuje odmowę przed `init`, `doctor` i `factory run`, a na innym systemie niż Linux polecenie odmawia z kodem 2 i komunikatem. Pełny opis pól konfiguracji: `node_modules/robisie/docs/ENGINE-CONFIG.md`. Każdy niezerowy wynik taktu zatrzymuje nadzorcę („Fabryka zatrzymana: …”) z jedną linią diagnozy na stderr; kod 2 to eskalacja (np. brak klucza B po receiver PASS, odmowa testera, STOP odbioru) wymagająca rozstrzygnięcia przed ponowieniem, a kod 78 wskazuje konfigurację do poprawy.
236
+ Silnik paczki — `dist/engine/tick.cjs` — jest odrębny od instalatora: `init`/`doctor`/`uninstall` go nie uruchamiają. Uruchamia go `npx robisie factory run --engine-config ./robisie.config.json` (flaga `--once` wykonuje jeden takt) na Linuxie dla klienta oraz na Linuxie lub macOS dla jawnego hosta Robisie, z Node.js 24+; starszy Node, np. 22, otrzymuje odmowę przed `init`, `doctor` i `factory run`, a pozostałe systemy otrzymują kod 2 i komunikat. Pełny opis pól konfiguracji: `node_modules/robisie/docs/ENGINE-CONFIG.md`. Każdy niezerowy wynik taktu zatrzymuje nadzorcę („Fabryka zatrzymana: …”) z jedną linią diagnozy na stderr; kod 2 to eskalacja (np. brak klucza B po receiver PASS, odmowa testera, STOP odbioru) wymagająca rozstrzygnięcia przed ponowieniem, a kod 78 wskazuje konfigurację do poprawy.
235
237
 
236
238
  Modele i wysiłki to przykładowe, dosłowne etykiety, bez gwarancji dostępności lub obsługi przez CLI. `grok-cli`/`none` opisują obecny review-job; nie dowodzą sterowania modelem ani wysiłkiem Groka. Imię jest metadanymi rejestru; Execution v1 zachowuje `{contractVersion:1,provider,model,effort}`. Walidacja nie jest odbiorem wykonania karty, dostawców ani całego procesu pracy.
237
239
 
package/dist/cli.d.ts CHANGED
@@ -12,6 +12,7 @@ export interface ParsedArgs {
12
12
  shell: boolean;
13
13
  keyStdin: boolean;
14
14
  engineConfig: string | null;
15
+ input: string | null;
15
16
  interval: number;
16
17
  once: boolean;
17
18
  /** login: false = `--no-wait`. */
package/dist/cli.js CHANGED
@@ -2,6 +2,7 @@
2
2
  import { lstatSync, realpathSync } from "node:fs";
3
3
  import { resolve } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
+ import { z } from "zod";
5
6
  import { AGENT_IDS, isAgentId } from "./agents.js";
6
7
  import { doctor, init, recoveryStep, uninstall } from "./commands.js";
7
8
  import { HELPER_SERVERS, PACKAGE_VERSION } from "./constants.js";
@@ -13,23 +14,38 @@ import { isHelperServer, runHelper } from "./helpers.js";
13
14
  import { closeInstallation, initNeedsLogin, login, openInstallation } from "./login.js";
14
15
  import { ROLE_IDS, ROLE_STEP } from "./manifest.js";
15
16
  import { doctorEngineConfig } from "./role-registry.js";
17
+ import { bounded, runLocalUsage } from "./local-usage.js";
18
+ const usageText = z.string().trim().min(1);
19
+ const usageAt = z.iso.datetime({ offset: true });
20
+ const usageInput = z.strictObject({
21
+ repo: usageText, stateDir: usageText,
22
+ landed: z.strictObject({ sha: z.string().regex(/^[a-f0-9]{40}$/), at: usageAt }),
23
+ source: usageText, deadline: usageAt, operation: usageText,
24
+ program: z.strictObject({ entry: usageText, args: z.array(z.string()), artifact: usageText }),
25
+ });
16
26
  const HELP = `robisie ${PACKAGE_VERSION} — łączy Twojego agenta z tablicą robisie
17
27
 
18
28
  npx robisie login paruje instalację: kod i link zatwierdzasz w przeglądarce, klucze A i B trafiają prosto do plików
19
29
  npx robisie init klucze A (ROBISIE_KEY) i B (ROBISIE_REVIEW_KEY), osobne ukryte pytania + konfiguracja MCP + role klienta
20
30
  npx robisie doctor sprawdza A i B, wersję kontraktu, role i politykę enforced projektu
21
31
  npx robisie uninstall usuwa wpisy robisie i role; zachowuje kopie zapasowe
22
- npx robisie factory run nadzoruje kolejne takty silnika (Linux, Node.js >=24)
32
+ npx robisie factory run nadzoruje takty (Linux/local klienta; Linux lub macOS jawnego hosta; Node.js >=24)
33
+ npx robisie usage --input ./usage.json
34
+ wykonuje jedno lokalne użycie na landed SHA i zapisuje zdarzenie JSON; nie ustawia done
23
35
  npx robisie mcp <${HELPER_SERVERS.join("|")}>
24
36
  pomocnik ról (serwer MCP stdio) — uruchamia go agent, nie Ty
25
37
 
26
38
  Opcje factory run:
27
39
  --engine-config <path> plik konfiguracji; flaga wygrywa z ROBISIE_ENGINE_CONFIG
28
- --engine-config=<path> profil engine.delivery: local, stateDir poza repo
40
+ --engine-config=<path> klient: local i stan poza repo; host: mode:host, pr|delivered i istniejący stan
29
41
  --interval <sekundy> przerwa po zakończeniu taktu: 1–86400, domyślnie 120; także --interval=120
30
42
  --once jeden takt bez przerwy; wyklucza jawne --interval
31
43
  Ctrl+C zatrzymuje nadzorcę i grupę taktu; odłączone joby mogą działać dalej.
32
44
 
45
+ Opcje usage:
46
+ --input <plik.json> jeden niepusty plik JSON względem bieżącego katalogu, maksymalnie 256 KiB
47
+ --input=<plik.json> ta sama składnia; bez sieci i kluczy, --help nie czyta pliku
48
+
33
49
  Opcje doctor:
34
50
  --engine-config <path> offline sprawdza strukturę konfiguracji projektu i przypisania czterech ról wykonania oraz wejścia instalacji lokalnej
35
51
  --engine-config=<path> ta sama składnia; nie sprawdza uruchomienia dostawców
@@ -62,6 +78,7 @@ export function parseArgs(argv) {
62
78
  let shell = true;
63
79
  let keyStdin = false;
64
80
  let engineConfig = null;
81
+ let input = null;
65
82
  let target = null;
66
83
  let interval = 120;
67
84
  let intervalSet = false;
@@ -70,7 +87,7 @@ export function parseArgs(argv) {
70
87
  let timeout = null;
71
88
  // Help wins over everything else, so `init --help` never starts an install.
72
89
  if (argv.includes("--help") || argv.includes("-h"))
73
- return { command, help: true, target, agents: null, roles, shell, keyStdin, engineConfig, interval, once, wait, timeout };
90
+ return { command, help: true, target, agents: null, roles, shell, keyStdin, engineConfig, input, interval, once, wait, timeout };
74
91
  if (command === "factory") {
75
92
  target = args.shift() ?? null;
76
93
  if (target !== "run")
@@ -150,12 +167,23 @@ export function parseArgs(argv) {
150
167
  }
151
168
  timeout = Number(value);
152
169
  }
170
+ else if (arg === "--input" || arg.startsWith("--input=")) {
171
+ const step = "Użyj `npx robisie usage --input ./usage.json` z jedną niepustą ścieżką pliku.";
172
+ if (command !== "usage" || input !== null)
173
+ throw new RobisieError("Opcja --input jest dostępna tylko raz dla polecenia usage.", step);
174
+ const value = arg === "--input" ? args.shift() ?? "" : arg.slice("--input=".length);
175
+ if (!value.trim() || value.startsWith("-"))
176
+ throw new RobisieError("Opcja --input wymaga ścieżki pliku JSON.", step);
177
+ input = value;
178
+ }
153
179
  else
154
180
  throw new RobisieError("Nieznana opcja argumentów CLI.", "Zobacz `npx robisie help`.");
155
181
  }
156
182
  if (once && intervalSet)
157
183
  throw new RobisieError("Opcje --once i --interval wykluczają się.", "Zobacz `npx robisie help`.");
158
- return { command, help: false, target, agents: agents.length > 0 ? agents : null, roles, shell, keyStdin, engineConfig, interval, once, wait, timeout };
184
+ if (command === "usage" && input === null)
185
+ throw new RobisieError("Polecenie usage wymaga --input.", "Użyj `npx robisie usage --input ./usage.json`.");
186
+ return { command, help: false, target, agents: agents.length > 0 ? agents : null, roles, shell, keyStdin, engineConfig, input, interval, once, wait, timeout };
159
187
  }
160
188
  export async function run(argv, ctx) {
161
189
  let release = null;
@@ -189,6 +217,17 @@ export async function run(argv, ctx) {
189
217
  }
190
218
  }
191
219
  switch (args.command) {
220
+ case "usage": {
221
+ try {
222
+ const input = usageInput.parse(JSON.parse(bounded(resolve(ctx.cwd, args.input))));
223
+ const event = runLocalUsage({ ...input, repo: resolve(ctx.cwd, input.repo), stateDir: resolve(ctx.cwd, input.stateDir) });
224
+ ctx.out(JSON.stringify(event));
225
+ return 0;
226
+ }
227
+ catch (error) {
228
+ throw new RobisieError(`Odmowa użycia: ${error instanceof z.ZodError ? "Niepoprawny kontrakt JSON." : errorMessage(error)}`, "Sprawdź plik wejściowy oraz źródło stateDir/evidence/<source> przed ponowieniem; wpis może już istnieć. Popraw przyczynę odmowy, bez automatycznego retry.");
229
+ }
230
+ }
192
231
  case "init":
193
232
  await init(ctx, { agents: args.agents, roles: args.roles, shell: args.shell, keyStdin: args.keyStdin, ...(args.engineConfig === null ? {} : { engineConfig: args.engineConfig }) });
194
233
  return 0;
@@ -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.4.6";
3
+ export declare const PACKAGE_VERSION = "0.5.0";
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.4.6"; // x-release-please-version
3
+ export const PACKAGE_VERSION = "0.5.0"; // 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":"7aa6e1873263a6af709b503f9e3877ce20b6fdb4","dirty":false}
1
+ {"schema":1,"sha":"395c4b700b58bd361010fb1029d1c9490d752541","dirty":false}
@@ -1688,6 +1688,6 @@
1688
1688
  "status": 0,
1689
1689
  "signal": null,
1690
1690
  "stdout": "v24.3.0\n",
1691
- "stderr": "(node:15025) 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"
1691
+ "stderr": "(node:15512) 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"
1692
1692
  }
1693
1693
  }
@@ -37628,7 +37628,7 @@ var init_constants = __esm({
37628
37628
  "packages/client/src/constants.ts"() {
37629
37629
  "use strict";
37630
37630
  PACKAGE_NAME = "robisie";
37631
- PACKAGE_VERSION = "0.4.6";
37631
+ PACKAGE_VERSION = "0.5.0";
37632
37632
  SUPPORTED_CONTRACT_MAJOR = 1;
37633
37633
  DEFAULT_ORIGIN = "https://robisie.app";
37634
37634
  MCP_SERVER_NAME = "robisie";
@@ -37827,12 +37827,31 @@ function parseReceiver(raw, requiredChecks, label2) {
37827
37827
  if (!requiredChecks.includes(verifyCheck)) fail(label2, "engine.receiver.verifyCheck: musi nale\u017Ce\u0107 do engine.requiredChecks");
37828
37828
  return { githubRepo, verifyCheck, deployWorkflow };
37829
37829
  }
37830
+ function parseHostPaths(raw, mode, delivery, label2) {
37831
+ if (mode !== "host" || delivery !== "pr" && delivery !== "delivered") fail(label2, "engine.hostPaths: wymagany jawny mode:host i delivery:pr|delivered");
37832
+ function object7(raw2, field, keys2) {
37833
+ if (!raw2 || typeof raw2 !== "object" || Array.isArray(raw2)) fail(label2, `${field}: wymagany kompletny obiekt \u015Bcie\u017Cek`);
37834
+ const value2 = raw2;
37835
+ if (Object.keys(value2).some((key) => !keys2.includes(key))) fail(label2, `${field}: nieznane pole`);
37836
+ return value2;
37837
+ }
37838
+ const value = object7(raw, "engine.hostPaths", ["hostStateDir", "inputsDir", "fjConfigPath", "siewca"]);
37839
+ const siewca = object7(value.siewca, "engine.hostPaths.siewca", ["stateDir", "wsadyDir", "bellPath"]);
37840
+ const path34 = (value2, field) => (0, import_node_path2.resolve)((0, import_node_path2.dirname)(label2), text2(value2, `engine.hostPaths.${field}`, label2));
37841
+ return {
37842
+ hostStateDir: path34(value.hostStateDir, "hostStateDir"),
37843
+ inputsDir: path34(value.inputsDir, "inputsDir"),
37844
+ fjConfigPath: path34(value.fjConfigPath, "fjConfigPath"),
37845
+ siewca: { stateDir: path34(siewca.stateDir, "siewca.stateDir"), wsadyDir: path34(siewca.wsadyDir, "siewca.wsadyDir"), bellPath: path34(siewca.bellPath, "siewca.bellPath") }
37846
+ };
37847
+ }
37830
37848
  function parseEngineConfig(raw, configPath) {
37831
37849
  const config2 = parseConfig(raw, (0, import_node_path2.resolve)(configPath));
37832
37850
  const label2 = config2.configPath;
37833
37851
  const engine = raw.engine;
37834
37852
  if (!engine || typeof engine !== "object" || Array.isArray(engine)) fail(label2, "engine: wymagany obiekt");
37835
37853
  const value = engine;
37854
+ if (value.mode !== void 0 && value.mode !== "client" && value.mode !== "host") fail(label2, "engine.mode: gdy podane \u2014 client|host");
37836
37855
  const repo = (0, import_node_path2.resolve)((0, import_node_path2.dirname)(label2), text2(value.repo, "engine.repo", label2));
37837
37856
  const branch = text2(value.branch, "engine.branch", label2);
37838
37857
  if (!value.commands || typeof value.commands !== "object" || Array.isArray(value.commands)) fail(label2, "engine.commands: wymagany obiekt {test, lint, build}");
@@ -37848,6 +37867,8 @@ function parseEngineConfig(raw, configPath) {
37848
37867
  commands: { test, lint, build },
37849
37868
  requiredChecks,
37850
37869
  delivery: value.delivery,
37870
+ ...value.mode !== void 0 ? { mode: value.mode } : {},
37871
+ ...Object.hasOwn(value, "hostPaths") ? { hostPaths: parseHostPaths(value.hostPaths, value.mode, value.delivery, label2) } : {},
37851
37872
  ...Object.hasOwn(value, "receiver") ? { receiver: parseReceiver(value.receiver, requiredChecks, label2) } : {}
37852
37873
  } };
37853
37874
  }
@@ -53418,7 +53439,7 @@ function finishTickState(state, outcome, tick, at3, facts = {}) {
53418
53439
  function readLoadedSha(repo, git2 = quietGit) {
53419
53440
  try {
53420
53441
  if (isStandaloneFile(__filename)) {
53421
- const id2 = record6(JSON.parse((0, import_node_fs11.readFileSync)(import_node_path13.default.join(repo, "engine", "build-id.json"), "utf8")));
53442
+ const id2 = record6(JSON.parse((0, import_node_fs11.readFileSync)(import_node_path13.default.join(ENGINE_CODE_REPO, "engine", "build-id.json"), "utf8")));
53422
53443
  return id2.schema === 1 && typeof id2.sha === "string" && /^[a-f0-9]{40}$/.test(id2.sha) && typeof id2.dirty === "boolean" ? `${id2.sha}${id2.dirty ? "+dirty" : ""}` : "UNKNOWN";
53423
53444
  }
53424
53445
  const head = git2(["rev-parse", "HEAD"], repo);
@@ -53776,6 +53797,26 @@ function smokeCandidate(target, _head, repo, stateDir, timeoutMs) {
53776
53797
  if (!(0, import_node_fs11.existsSync)(modules)) (0, import_node_fs11.symlinkSync)(import_node_path13.default.join(repo, "node_modules"), modules);
53777
53798
  const scratch = import_node_path13.default.join(stateDir, "smoke", target.slice(0, 8));
53778
53799
  (0, import_node_fs11.mkdirSync)(scratch, { recursive: true });
53800
+ const smokeEnv = { ...process.env };
53801
+ delete smokeEnv.MASZYNISTA_ZASIEW_LIVE;
53802
+ smokeEnv.ZASIEW_AUTO_STATE = import_node_path13.default.join(scratch, "zasiew-auto");
53803
+ smokeEnv.ZASIEW_AUTO_WSADY = import_node_path13.default.join(scratch, "zasiew-wsady");
53804
+ smokeEnv.MASZYNISTA_ZASIEW_BELL = import_node_path13.default.join(scratch, "zasiew.bell");
53805
+ if (smokeEnv.ROBISIE_ENGINE_CONFIG) {
53806
+ const installation = currentEngine(), config2 = loadEngineConfig(smokeEnv.ROBISIE_ENGINE_CONFIG);
53807
+ const inputs = import_node_path13.default.join(scratch, "inputs");
53808
+ (0, import_node_fs11.mkdirSync)(inputs, { recursive: true });
53809
+ for (const file3 of ["NORTH-STAR.md", "AUTHORITY.md"])
53810
+ (0, import_node_fs11.writeFileSync)(import_node_path13.default.join(inputs, file3), (0, import_node_fs11.readFileSync)(import_node_path13.default.join(installation.inputsDir, file3)));
53811
+ const smokeConfig = import_node_path13.default.join(scratch, "robisie.config.json");
53812
+ (0, import_node_fs11.writeFileSync)(smokeConfig, JSON.stringify({
53813
+ ...config2,
53814
+ configPath: void 0,
53815
+ stateDir: scratch,
53816
+ engine: { ...config2.engine, repo: root, hostPaths: void 0 }
53817
+ }));
53818
+ smokeEnv.ROBISIE_ENGINE_CONFIG = smokeConfig;
53819
+ }
53779
53820
  if (Date.now() >= deadline) return { rc: 124, timedOut: true, output: "smoke timeout podczas przygotowania" };
53780
53821
  const childLimit = remaining();
53781
53822
  (0, import_node_fs11.writeFileSync)(claim, JSON.stringify({ pid: null }), { flag: "wx" });
@@ -53787,11 +53828,12 @@ function smokeCandidate(target, _head, repo, stateDir, timeoutMs) {
53787
53828
  timeout: childLimit,
53788
53829
  maxBuffer: 20 * 1024 * 1024,
53789
53830
  env: {
53790
- ...process.env,
53831
+ ...smokeEnv,
53791
53832
  MASZYNISTA_DIR: scratch,
53792
53833
  MASZYNISTA_HOST_STATE_DIR: scratch,
53793
53834
  MASZYNISTA_SMOKE: "1",
53794
53835
  MASZYNISTA_SMOKE_TIMEOUT_MS: String(childLimit),
53836
+ ROBISIE_EGRESS_COUNTER_FILE: import_node_path13.default.join(scratch, "egress-bytes.jsonl"),
53795
53837
  ZASIEW_CARDS_ROOT: process.env.ZASIEW_CARDS_ROOT ?? import_node_path13.default.resolve(repo, "../../Robisie Control Room/Notes/cards")
53796
53838
  }
53797
53839
  };
@@ -53925,6 +53967,12 @@ async function runHostActivation(input, deps = {}) {
53925
53967
  if (recovery !== "previous") return { code: recovery === "pending" ? "skip pending" : "hold recovery", target: intentTarget, detail: "owner=CEO; rozliczenie zamiaru przed nast\u0119pnym FF" };
53926
53968
  pinned = state.intent.target;
53927
53969
  }
53970
+ if (!pinned && isStandaloneFile(__filename)) {
53971
+ const loaded = readLoadedSha(ENGINE_CODE_REPO);
53972
+ if (!/^[a-f0-9]{40}$/.test(loaded))
53973
+ return { code: "hold package target", detail: "paczka bez czystego pe\u0142nego SHA; sprawd\u017A w\u0142asny build-id.json artefaktu" };
53974
+ pinned = loaded;
53975
+ }
53928
53976
  if (state.confirmed && input.tick >= state.confirmed.tick && input.tick - state.confirmed.tick < BREAKER_WINDOW_TICKS)
53929
53977
  return { code: "skip breaker window", target: state.confirmed.target };
53930
53978
  if (!deps.infrastructureChecks || !deps.infrastructurePullRequest) {
@@ -53942,6 +53990,14 @@ async function runHostActivation(input, deps = {}) {
53942
53990
  }
53943
53991
  }
53944
53992
  const commits = git2(["rev-list", "--first-parent", `${head}..origin/main`], input.repo).split("\n").filter(Boolean);
53993
+ if (pinned && !state.intent && isStandaloneFile(__filename)) {
53994
+ if (head === pinned) return endRefusal({ code: "skip package current", target: pinned, detail: "\u017Ar\xF3d\u0142a ju\u017C na SHA zainstalowanej paczki" });
53995
+ if (!commits.includes(pinned) || !isAncestor(git2, head, pinned, input.repo)) return {
53996
+ code: "hold package target",
53997
+ target: pinned,
53998
+ detail: "SHA paczki poza kandydatami zdalnej bazy lub HEAD nie jest jego przodkiem; owner=CEO; bez cofania lub zmiany historii \u017Ar\xF3de\u0142"
53999
+ };
54000
+ }
53945
54001
  let target;
53946
54002
  let refusal;
53947
54003
  for (const sha5 of commits) {
@@ -54172,6 +54228,8 @@ var init_host_activation = __esm({
54172
54228
  init_lib();
54173
54229
  init_service_reload();
54174
54230
  init_engine_standalone();
54231
+ init_engine_consumer();
54232
+ init_engine_config();
54175
54233
  STATE_FILE = "host-activation.json";
54176
54234
  MODE_FILE = "HOST-ACTIVATION.mode";
54177
54235
  BREAKER_WINDOW_TICKS = 3;
@@ -55128,6 +55186,7 @@ function defaults2(env) {
55128
55186
  source: "defaults",
55129
55187
  configPath: null,
55130
55188
  repo: import_node_path15.default.resolve(MASZYNISTA_DIR, ".."),
55189
+ resourcesRepo: import_node_path15.default.resolve(MASZYNISTA_DIR, ".."),
55131
55190
  remote: REMOTE,
55132
55191
  branch: BRANCH,
55133
55192
  baseRef: `${REMOTE}/${BRANCH}`,
@@ -55169,22 +55228,23 @@ function readJson(file3, origin) {
55169
55228
  function fromFile(file3, origin) {
55170
55229
  const { raw, configPath } = readJson(file3, origin);
55171
55230
  const config2 = parseEngineConfig(raw, configPath);
55172
- const mode = raw.engine.mode;
55173
- if (mode !== void 0 && mode !== "client" && mode !== "host") throw new Error(`${configPath}: engine.mode: gdy podane \u2014 client|host`);
55174
55231
  const { engine } = config2;
55232
+ const mode = engine.mode;
55233
+ const client = mode === "client" || engine.delivery === "local";
55175
55234
  if (engine.receiver) {
55176
55235
  if (mode !== "host" || engine.delivery === "local") throw new Error(`${configPath}: engine.receiver: wymagany jawny mode:host i delivery:pr|delivered`);
55177
55236
  if (engine.branch !== BRANCH || Object.keys(RECEIVER).some((key) => engine.receiver[key] !== RECEIVER[key]))
55178
55237
  throw new Error(`${configPath}: engine.receiver: nieobs\u0142ugiwany odbiorca lub ga\u0142\u0105\u017A hosta`);
55179
55238
  }
55180
- const hostStateDir2 = import_node_path15.default.join(config2.stateDir, "host");
55239
+ const hostStateDir2 = engine.hostPaths?.hostStateDir ?? import_node_path15.default.join(config2.stateDir, "host");
55181
55240
  return {
55182
55241
  source: "file",
55183
55242
  configPath,
55184
55243
  repo: engine.repo,
55244
+ resourcesRepo: mode === "host" && !client ? engine.repo : import_node_path15.default.resolve(MASZYNISTA_DIR, ".."),
55185
55245
  remote: REMOTE,
55186
55246
  branch: engine.branch,
55187
- baseRef: mode === "client" || engine.delivery === "local" ? `refs/heads/${engine.branch}` : `${REMOTE}/${engine.branch}`,
55247
+ baseRef: client ? `refs/heads/${engine.branch}` : `${REMOTE}/${engine.branch}`,
55188
55248
  project: { kind: "id", value: config2.project },
55189
55249
  tracks: config2.tracks.map((track) => ({ ...track })),
55190
55250
  defaultTrackLabel: DEFAULT_TRACK_LABEL,
@@ -55195,14 +55255,14 @@ function fromFile(file3, origin) {
55195
55255
  stateDir: config2.stateDir,
55196
55256
  hostStateDir: hostStateDir2,
55197
55257
  receiverHostStateDir: hostStateDir2,
55198
- siewca: {
55258
+ siewca: engine.hostPaths?.siewca ?? {
55199
55259
  stateDir: import_node_path15.default.join(config2.stateDir, "siewca"),
55200
55260
  wsadyDir: import_node_path15.default.join(config2.stateDir, "siewca", "wsady"),
55201
55261
  bellPath: import_node_path15.default.join(config2.stateDir, "siewca", "zasiew.bell")
55202
55262
  },
55203
- fjConfigPath: import_node_path15.default.join(config2.stateDir, "factory-judgment.json"),
55204
- inputsDir: import_node_path15.default.join(config2.stateDir, "inputs"),
55205
- client: mode === "client" || engine.delivery === "local"
55263
+ fjConfigPath: engine.hostPaths?.fjConfigPath ?? import_node_path15.default.join(config2.stateDir, "factory-judgment.json"),
55264
+ inputsDir: engine.hostPaths?.inputsDir ?? import_node_path15.default.join(config2.stateDir, "inputs"),
55265
+ client
55206
55266
  };
55207
55267
  }
55208
55268
  function resolveEngine(input) {
@@ -55294,6 +55354,7 @@ __export2(engine_consumer_exports, {
55294
55354
  engineRemote: () => engineRemote,
55295
55355
  engineRemoteBranchRef: () => engineRemoteBranchRef,
55296
55356
  engineRequiredChecks: () => engineRequiredChecks,
55357
+ engineResourcesRepo: () => engineResourcesRepo,
55297
55358
  engineShellLines: () => engineShellLines,
55298
55359
  engineSiewca: () => engineSiewca,
55299
55360
  engineStateDir: () => engineStateDir,
@@ -55317,7 +55378,7 @@ function engineShellLines(what, env = process.env) {
55317
55378
  if (lines2.some((line2) => !line2 || /[\r\n]/.test(line2))) throw new Error("engine-consumer: \u015Bcie\u017Cka Siewcy pusta albo z now\u0105 lini\u0105");
55318
55379
  return lines2;
55319
55380
  }
55320
- var import_node_path17, ENGINE_CODE_REPO, fileCache, engineRemote, engineBranch, engineBaseRef, engineBranchRef, engineRemoteBranchRef, engineRequiredChecks, engineReceiver, engineProject, engineTracks, engineDefaultTrackLabel, engineTaskRepo, engineStateDir, engineHostStateDir, engineReceiverHostStateDir, engineSiewca, engineFjConfigPath, engineInputsDir, engineClient;
55381
+ var import_node_path17, ENGINE_CODE_REPO, fileCache, engineRemote, engineBranch, engineBaseRef, engineBranchRef, engineRemoteBranchRef, engineRequiredChecks, engineReceiver, engineProject, engineTracks, engineDefaultTrackLabel, engineTaskRepo, engineResourcesRepo, engineStateDir, engineHostStateDir, engineReceiverHostStateDir, engineSiewca, engineFjConfigPath, engineInputsDir, engineClient;
55321
55382
  var init_engine_consumer = __esm({
55322
55383
  "maszynista/engine-consumer.ts"() {
55323
55384
  "use strict";
@@ -55344,6 +55405,7 @@ var init_engine_consumer = __esm({
55344
55405
  engineTracks = (env) => currentEngine(env).tracks;
55345
55406
  engineDefaultTrackLabel = (env) => currentEngine(env).defaultTrackLabel;
55346
55407
  engineTaskRepo = (env) => currentEngine(env).repo;
55408
+ engineResourcesRepo = (env) => currentEngine(env).resourcesRepo;
55347
55409
  engineStateDir = (env) => currentEngine(env).stateDir;
55348
55410
  engineHostStateDir = (env) => currentEngine(env).hostStateDir;
55349
55411
  engineReceiverHostStateDir = (env) => currentEngine(env).receiverHostStateDir;
@@ -55420,7 +55482,7 @@ var init_env = __esm({
55420
55482
  import_node_child_process6 = require("node:child_process");
55421
55483
  import_node_path18 = __toESM(require("node:path"));
55422
55484
  init_engine_consumer();
55423
- REPO = ENGINE_CODE_REPO;
55485
+ REPO = engineResourcesRepo();
55424
55486
  DIR = engineStateDir();
55425
55487
  }
55426
55488
  });
@@ -40,9 +40,22 @@ export interface InstanceConfig {
40
40
  /** Plik konfiguracji, z którego wczytano ustawienia (bezwzględny). */
41
41
  configPath: string;
42
42
  }
43
+ /** Istniejące miejsca jawnego hosta; parser nie sprawdza ich zawartości ani nie tworzy katalogów. */
44
+ export interface EngineHostPaths {
45
+ hostStateDir: string;
46
+ inputsDir: string;
47
+ fjConfigPath: string;
48
+ siewca: {
49
+ stateDir: string;
50
+ wsadyDir: string;
51
+ bellPath: string;
52
+ };
53
+ }
43
54
  /** K2: dane silnika w tym samym pliku co K4; parsowanie niczego nie uruchamia. */
44
55
  export interface EngineConfig extends InstanceConfig {
45
56
  engine: {
57
+ /** Jawny tryb instalacji; brak zachowuje dotychczasowe rozpoznanie przez delivery. */
58
+ mode?: 'host' | 'client';
46
59
  /** Repo docelowe (bezwzględne); ścieżka wejściowa względem pliku konfiguracji. */
47
60
  repo: string;
48
61
  /** Główna gałąź repo docelowego. */
@@ -63,6 +76,8 @@ export interface EngineConfig extends InstanceConfig {
63
76
  verifyCheck: string;
64
77
  deployWorkflow: string;
65
78
  };
79
+ /** Kompletny blok sześciu ścieżek, wyłącznie dla jawnego hosta z delivery pr|delivered. */
80
+ hostPaths?: EngineHostPaths;
66
81
  };
67
82
  }
68
83
  export declare const CONFIG_FILE = "robisie.config.json";
@@ -133,6 +133,27 @@ function parseReceiver(raw, requiredChecks, label) {
133
133
  fail(label, 'engine.receiver.verifyCheck: musi należeć do engine.requiredChecks');
134
134
  return { githubRepo, verifyCheck, deployWorkflow };
135
135
  }
136
+ function parseHostPaths(raw, mode, delivery, label) {
137
+ if (mode !== 'host' || (delivery !== 'pr' && delivery !== 'delivered'))
138
+ fail(label, 'engine.hostPaths: wymagany jawny mode:host i delivery:pr|delivered');
139
+ function object(raw, field, keys) {
140
+ if (!raw || typeof raw !== 'object' || Array.isArray(raw))
141
+ fail(label, `${field}: wymagany kompletny obiekt ścieżek`);
142
+ const value = raw;
143
+ if (Object.keys(value).some(key => !keys.includes(key)))
144
+ fail(label, `${field}: nieznane pole`);
145
+ return value;
146
+ }
147
+ const value = object(raw, 'engine.hostPaths', ['hostStateDir', 'inputsDir', 'fjConfigPath', 'siewca']);
148
+ const siewca = object(value.siewca, 'engine.hostPaths.siewca', ['stateDir', 'wsadyDir', 'bellPath']);
149
+ const path = (value, field) => resolve(dirname(label), text(value, `engine.hostPaths.${field}`, label));
150
+ return {
151
+ hostStateDir: path(value.hostStateDir, 'hostStateDir'),
152
+ inputsDir: path(value.inputsDir, 'inputsDir'),
153
+ fjConfigPath: path(value.fjConfigPath, 'fjConfigPath'),
154
+ siewca: { stateDir: path(siewca.stateDir, 'siewca.stateDir'), wsadyDir: path(siewca.wsadyDir, 'siewca.wsadyDir'), bellPath: path(siewca.bellPath, 'siewca.bellPath') },
155
+ };
156
+ }
136
157
  export function parseEngineConfig(raw, configPath) {
137
158
  const config = parseConfig(raw, resolve(configPath));
138
159
  const label = config.configPath;
@@ -140,6 +161,8 @@ export function parseEngineConfig(raw, configPath) {
140
161
  if (!engine || typeof engine !== 'object' || Array.isArray(engine))
141
162
  fail(label, 'engine: wymagany obiekt');
142
163
  const value = engine;
164
+ if (value.mode !== undefined && value.mode !== 'client' && value.mode !== 'host')
165
+ fail(label, 'engine.mode: gdy podane — client|host');
143
166
  const repo = resolve(dirname(label), text(value.repo, 'engine.repo', label));
144
167
  const branch = text(value.branch, 'engine.branch', label);
145
168
  if (!value.commands || typeof value.commands !== 'object' || Array.isArray(value.commands))
@@ -152,6 +175,8 @@ export function parseEngineConfig(raw, configPath) {
152
175
  if (value.delivery !== 'delivered' && value.delivery !== 'pr' && value.delivery !== 'local')
153
176
  fail(label, 'engine.delivery: wymagane delivered|pr|local');
154
177
  return { ...config, engine: { repo, branch, commands: { test, lint, build }, requiredChecks, delivery: value.delivery,
178
+ ...(value.mode !== undefined ? { mode: value.mode } : {}),
179
+ ...(Object.hasOwn(value, 'hostPaths') ? { hostPaths: parseHostPaths(value.hostPaths, value.mode, value.delivery, label) } : {}),
155
180
  ...(Object.hasOwn(value, 'receiver') ? { receiver: parseReceiver(value.receiver, requiredChecks, label) } : {}) } };
156
181
  }
157
182
  export function loadEngineConfig(path) {
@@ -105,8 +105,8 @@ export async function runFactory(ctx, options, overrides = {}) {
105
105
  runtime.signals.on("SIGINT", interrupt);
106
106
  runtime.signals.on("SIGTERM", terminate);
107
107
  try {
108
- if (ctx.platform !== "linux" || Number(runtime.nodeVersion.split(".")[0]) < 24) {
109
- fail(2, "Factory run wymaga systemu Linux i Node.js >=24.", "Uruchom polecenie na Linuxie z Node.js 24 lub nowszym.");
108
+ if (Number(runtime.nodeVersion.split(".")[0]) < 24) {
109
+ fail(2, "Factory run wymaga Node.js >=24.", "Uruchom polecenie z Node.js 24 lub nowszym.");
110
110
  }
111
111
  const selected = options.engineConfig ?? ctx.env.ROBISIE_ENGINE_CONFIG;
112
112
  const configStep = "Popraw konfigurację i sprawdź ją poleceniem `npx robisie doctor --engine-config <path>`, podstawiając ścieżkę pliku; następnie ponów factory run.";
@@ -122,8 +122,13 @@ export async function runFactory(ctx, options, overrides = {}) {
122
122
  catch {
123
123
  fail(78, "Nie można wczytać konfiguracji silnika.", configStep);
124
124
  }
125
- if (config.engine.delivery !== "local")
126
- fail(78, "Factory run wymaga engine.delivery: local.", configStep);
125
+ const host = config.engine.mode === "host";
126
+ if (ctx.platform !== "linux" && !(ctx.platform === "darwin" && host))
127
+ fail(2, "Factory run wymaga Linuxa; macOS jest dostępny dla jawnego hosta.", configStep);
128
+ if (host ? config.engine.delivery === "local" : config.engine.delivery !== "local")
129
+ fail(78, "Factory run wymaga delivery: pr|delivered dla hosta albo local dla klienta.", configStep);
130
+ if (host && ctx.env.MASZYNISTA_PLANNER_TRANSPORT !== undefined && ctx.env.MASZYNISTA_PLANNER_TRANSPORT !== "db")
131
+ fail(78, "Host factory run wymaga transportu db.", "Usuń jawny transport api lub ustaw MASZYNISTA_PLANNER_TRANSPORT=db i ponów polecenie.");
127
132
  let repo;
128
133
  let state;
129
134
  try {
@@ -131,23 +136,25 @@ export async function runFactory(ctx, options, overrides = {}) {
131
136
  if (!statSync(repo).isDirectory())
132
137
  throw new Error("repo is not a directory");
133
138
  state = physical(config.stateDir);
134
- if (within(repo, state))
135
- throw new Error("state inside repository");
139
+ if (host ? !statSync(state).isDirectory() : within(repo, state))
140
+ throw new Error("invalid state directory");
136
141
  }
137
142
  catch {
138
- fail(78, "Nie można potwierdzić repo i katalogu stanu poza repozytorium.", configStep);
143
+ fail(78, "Nie można potwierdzić repo i katalogu stanu (host: istniejący katalog; klient: poza repozytorium).", configStep);
139
144
  }
140
145
  const bundle = fileURLToPath(new URL("./engine/tick.cjs", runtime.moduleUrl));
141
146
  if (!optionalFile(bundle))
142
147
  fail(2, "Nie znaleziono silnika w zainstalowanej paczce.", "Zainstaluj kompletną paczkę robisie i ponów polecenie.");
143
- const env = {};
144
- for (const name of ENV_NAMES)
145
- if (ctx.env[name] !== undefined)
146
- env[name] = ctx.env[name];
148
+ const env = (host ? { ...ctx.env } : {});
149
+ if (!host)
150
+ for (const name of ENV_NAMES)
151
+ if (ctx.env[name] !== undefined)
152
+ env[name] = ctx.env[name];
147
153
  env.ROBISIE_ENGINE_CONFIG = config.configPath;
148
- env.MASZYNISTA_PLANNER_TRANSPORT = "api";
154
+ if (!host)
155
+ env.MASZYNISTA_PLANNER_TRANSPORT = "api";
149
156
  const helper = fileURLToPath(new URL("./k3-helper-cli.js", runtime.moduleUrl));
150
- if (env.ROBISIE_CODEX_HELPER === undefined && optionalFile(helper))
157
+ if (!host && env.ROBISIE_CODEX_HELPER === undefined && optionalFile(helper))
151
158
  env.ROBISIE_CODEX_HELPER = helper;
152
159
  const checkInstallation = () => {
153
160
  try {
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.4.6 \u2014 plik zarz\u0105dzany przez `npx robisie`; `npx robisie uninstall` go usunie -->";
20
+ export declare const MANAGED_LINE = "<!-- robisie:managed 0.5.0 \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;
@@ -35,6 +35,61 @@ Nie wpisuj sekretów do argv — argumenty mogą trafić do listy procesów lub
35
35
  narzędzi wykonujących komendy.
36
36
  `delivery: "pr"` opisuje sposób dostarczenia; sam odczyt nie tworzy PR.
37
37
 
38
+ `engine.mode` jest opcjonalne: `host` albo `client`; inne wartości są błędem.
39
+ `factory run` wymaga Node.js >=24. Klient korzysta z Linuxa, dostawy `local`,
40
+ stanu poza repo i filtrowanego środowiska z transportem API.
41
+ Jawny host Robisie (`mode: "host"`, `pr|delivered`) działa na Linuxie i macOS,
42
+ z istniejącym stanem (także w repo) i transportem DB. Jawne `api` lub nieznany
43
+ transport w środowisku hosta powoduje odmowę. Host zachowuje środowisko operatora,
44
+ odczyt `.env`/Keychain i pierwszeństwo własnego helpera; nie otrzymuje fallbacku
45
+ helpera klienta. Te ustawienia nie rozszerzają środowiska Workera ani recenzenta.
46
+
47
+ Dla jawnego hosta `engine.repo` jest także checkoutem zasobów i źródłowych dzieci:
48
+ selektora i FJ. Tożsamość wykonywanego bundla pochodzi z jego własnego
49
+ `engine/build-id.json`, niezależnie od HEAD i ewentualnego znaczka w checkoutcie.
50
+ Aktywator wybiera wyłącznie dokładny czysty SHA paczki (pierwszeństwo zachowuje
51
+ istniejący intent), po dotychczasowych bramkach PR/CI/smoke/FF. Cel poza kandydatami
52
+ `HEAD..origin/main` oznacza jawny HOLD; HEAD na celu oznacza pominięcie FF,
53
+ bez automatycznego wytwarzania confirmed. Bez konfiguracji host działa jak dotąd.
54
+
55
+ Opcjonalny `engine.hostPaths` zachowuje istniejące miejsca hosta. Blok jest
56
+ kompletny: `hostStateDir`, `inputsDir`, `fjConfigPath` oraz
57
+ `siewca.stateDir`, `siewca.wsadyDir`, `siewca.bellPath`. Jest dozwolony wyłącznie
58
+ przy jawnym `mode: "host"` i `delivery: "pr"` lub `"delivered"`. Brak pola,
59
+ obce pole na dowolnym poziomie bloku, pusty/niestringowy path lub niewłaściwy tryb
60
+ powodują błąd ze wskazaniem pola. Ścieżki względne liczone są od katalogu
61
+ kanonicznego (realpath) pliku konfiguracji, także przy wczytaniu przez dowiązanie.
62
+ Parser nie czyta zawartości tych miejsc, nie tworzy katalogów i nie migruje danych.
63
+ `hostStateDir` zasila oba miejsca resolvera: `hostStateDir` i `receiverHostStateDir`.
64
+
65
+ Bez bloku zachowany jest układ 0.4.6: host-state to `<stateDir>/host`, wejścia ról
66
+ `<stateDir>/inputs`, FJ `<stateDir>/factory-judgment.json`, a Siewca
67
+ `<stateDir>/siewca/{,wsady,zasiew.bell}`. Host bez pliku konfiguracji zachowuje
68
+ swoje dotychczasowe domyślne ścieżki i zmienne środowiska.
69
+ Przed przełączeniem porównaj wszystkie fizyczne ścieżki z działającym hostem;
70
+ samo `stateDir` ani poprawna składnia konfiguracji nie dowodzą zgodności.
71
+
72
+ Przykład **zmierzonych ścieżek hosta ROBISIE** (11.11.2026), bez sekretów.
73
+ W pełnym configu hosta ustaw `engine.repo` na
74
+ `/Users/admin/Documents/PersonalHQ/Projects/Robisie/app`, a główne `stateDir` na
75
+ `/Users/admin/Documents/PersonalHQ/Projects/Robisie/app/maszynista` i dodaj do `engine`:
76
+
77
+ ```json
78
+ "hostPaths": {
79
+ "hostStateDir": "/Users/admin/.robisie/maszynista",
80
+ "inputsDir": "/Users/admin/Documents/PersonalHQ/Projects/Robisie/app/maszynista",
81
+ "fjConfigPath": "/Users/admin/.robisie/maszynista/factory-judgment.json",
82
+ "siewca": {
83
+ "stateDir": "/Users/admin/Documents/PersonalHQ/Projects/Robisie/_reksio/notes/zasiew-auto",
84
+ "wsadyDir": "/Users/admin/Documents/PersonalHQ/Projects/Robisie/_reksio/notes/zasiew-wsady",
85
+ "bellPath": "/Users/admin/.robisie/zasiew.bell"
86
+ }
87
+ }
88
+ ```
89
+
90
+ Pełny wzorzec configu hosta i walidacja przed podmianą plista:
91
+ [runbook CTO](https://github.com/chuppa12/robisie-app/blob/main/docs/runbooks/host-package.md).
92
+
38
93
  Role silnika to `coordinator`, `owner`, `planner`, `advisor`.
39
94
  `forms` zawierają dosłowne formy z uwzględnieniem wielkości liter, a
40
95
  `owner.genitive` służy m.in. do zapisu „Efekt dla Ali”. To osobne ustawienia
package/docs/README.en.md CHANGED
@@ -1,4 +1,4 @@
1
- # robisie — from account to accepted card (package 0.4.6) <!-- x-release-please-version -->
1
+ # robisie — from account to accepted card (package 0.5.0) <!-- 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
 
@@ -17,7 +17,7 @@ If the registry README is empty, use the guides shipped locally at `node_modules
17
17
  <a id="wymagania"></a>
18
18
  ## Requirements
19
19
 
20
- The human prepares Node.js 24+ (release used for checks: 24.3.0), npm, internet for dependencies and robisie, and one provider program: Claude Code, Codex CLI or OpenCode with their own AI access. An older Node, such as 22, is refused before `init`, `doctor` and `factory run`. The engine bundled in the package (`dist/engine/tick.cjs`) requires Linux and is started by `npx robisie factory run`; the engine configuration is described in [ENGINE-CONFIG](ENGINE-CONFIG.md). Check `node --version`, `npm --version` and the chosen program's version (`claude --version`, `codex --version` or `opencode --version`). If absent from PATH, install it following its provider's instructions and check again; a configuration directory alone is insufficient. Windows/WSL are unverified; examples below use POSIX paths.
20
+ The human prepares Node.js 24+ (release used for checks: 24.3.0), npm, internet for dependencies and robisie, and one provider program: Claude Code, Codex CLI or OpenCode with their own AI access. An older Node, such as 22, is refused before `init`, `doctor` and `factory run`. The engine bundled in the package (`dist/engine/tick.cjs`) for the client requires Linux; an explicit Robisie host (`engine.mode: "host"`, delivery `pr|delivered`) also supports macOS. It is started by `npx robisie factory run`; the engine configuration is described in [ENGINE-CONFIG](ENGINE-CONFIG.md). Check `node --version`, `npm --version` and the chosen program's version (`claude --version`, `codex --version` or `opencode --version`). If absent from PATH, install it following its provider's instructions and check again; a configuration directory alone is insufficient. Windows/WSL are unverified; examples below use POSIX paths.
21
21
 
22
22
  Prepare an empty directory on disk. You do not need a website or your own `package.json`; the Node.js step below creates it before installation. This is the agents' working directory, separate from the dashboard project.
23
23
 
@@ -53,7 +53,7 @@ Two distinct keys are required: A (`ROBISIE_KEY`, worker) and B (`ROBISIE_REVIEW
53
53
 
54
54
  A and B are stored separately in `${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key` and `review-key` (0600 files, 0700 directory). B never enters agent/model configuration, the manifest, arguments, claims or output. Load both environment variables, including with `--no-shell`. Run ordinary `npx robisie doctor` before the first task: `--engine-config` does not check keys. If A is missing or malformed, doctor diagnoses A; B checks begin only when A is present and has a valid format. Missing B, B=A, invalid format or failed B reads produce exit 1. B uses only `initialize` + `list_projects`, with no business-data mutations; auth counters may increase. Successful reads do not confirm role, a shared A/B account or project policy.
55
55
 
56
- Every doctor result includes `! Polityka enforced: NIE SPRAWDZONO — klient nie ma API jej odczytu.`: enforced policy: NOT CHECKED — the client has no API to read it. Project-context refusal happens before doctor and has its own advice. Green doctor does not activate enforced. For a B failure check Connect access and issuance as owner_validator; a network failure does not prove revocation. Retry init with correct B ENV, then doctor. Policy changes require a separate authorized operator action.
56
+ When key A sees exactly one project, doctor reads `reviewPolicy` via `list_projects`: `enforced` prints “✓ Polityka enforced: TAK”; `legacy` warns that `accept_review` will be refused and directs you to the operator. A missing/null server field prints “NIE SPRAWDZONO — serwer nie zwraca polityki”; a read failure prints “NIE SPRAWDZONO — odczyt nieudany”. This informational line does not change the exit code. Project-context refusal happens before doctor and has separate advice. The client only reads the policy; an authorized operator changes it.
57
57
 
58
58
  Polish CLI messages: `Brak klucza odbioru ROBISIE_REVIEW_KEY.` — Missing acceptance key ROBISIE_REVIEW_KEY.; `Klucz odbioru B jest tym samym tokenem co klucz A.` — Acceptance key B is the same token as key A.; `ROBISIE_REVIEW_KEY ma niepoprawny format.` — ROBISIE_REVIEW_KEY has an invalid format.; `Nie potwierdzono dostępu B do tablicy.` — Board access with key B could not be confirmed.; `Klucz B uwierzytelnia odczyt projektów.` — Key B authenticates project reads.
59
59
 
@@ -235,6 +235,54 @@ Doctor runs the helper file via node, the agent via npx. `ROBISIE_PROJECT_CONTEX
235
235
  <!-- sekcja: pierwsza-karta -->
236
236
  ## First card and Builder startup
237
237
 
238
+ ### Card for the local engine
239
+
240
+ Choose a project with policy `enforced` and `engine.delivery: "local"` using the [engine configuration](ENGINE-CONFIG.md). The CEO creates a card through the board tools with the literal `details` object below; the dashboard cannot edit `details`. Goal: change the greeting in an existing tracked `greet.cjs`; without arguments print `Witaj z fabryki`, and with one argument Ala, Bartek or Celina create a new `greeting.txt` containing `Witaj z fabryki, <name>!` and a trailing newline. No dependencies, accounts or publication. The code write scope is only `greet.cjs`; `greeting.txt` is a usage artifact in a separate worktree.
241
+
242
+ <!-- local-card-details:start -->
243
+ ```json
244
+ {
245
+ "card_class": "executable",
246
+ "delivery_mode": "local",
247
+ "scope": ["greet.cjs"],
248
+ "authority": "auto",
249
+ "done_when": ["greet.cjs wypisuje Witaj z fabryki i dla argumentów Ala, Bartek, Celina tworzy greeting.txt z dokładną treścią Witaj z fabryki, <imię>! oraz końcowym znakiem nowej linii"],
250
+ "effect_check": "{\"v\":1,\"source\":\"produkt/usage.jsonl\",\"criteria\":[0],\"min\":3,\"deadline\":\"2099-12-31T23:59:59Z\"}",
251
+ "seed_provenance": {"authoring_providers": {"by": "anthropic","proposal_by": "openai","packager_by": "anthropic"}}
252
+ }
253
+ ```
254
+ <!-- local-card-details:end -->
255
+
256
+ Before creating the card, replace the example `deadline` with a future ISO 8601 timestamp including a timezone and enough time for execution, the tester and three uses. In `seed_provenance.authoring_providers`, record the actual providers of the seed author (`by`), proposal author (`proposal_by`) and package author (`packager_by`); copying example providers does not establish independence. The engine supplies transport, delivery and tester results; do not manufacture these records.
257
+
258
+ After authorization, the CEO prepares the card as `ready`. Run `npx robisie factory run --engine-config ./robisie.config.json --once` and observe the card until a real tester PASS on the landed SHA and settlement (ACK): no `.tester-job.lock`, `.tester-job.input.json` or `.tester-job.result.json` in `stateDir`. PASS without ACK is insufficient.
259
+
260
+ Save the complete input below as `usage.json` in the current directory. Take `repo` from `engine.repo` and `stateDir` from engine configuration (resolve relative configuration paths against its directory; use absolute paths here). Copy `landed.sha` and `landed.at` from a fresh read of this card's `details.landed`; the values below are fictitious. Copy `source` and `deadline` from the JSON text in `details.effect_check`; `source` is relative to `stateDir/evidence`.
261
+
262
+ <!-- local-usage-input:start -->
263
+ ```json
264
+ {
265
+ "repo": "/sciezka/do/repo",
266
+ "stateDir": "/sciezka/do/stanu",
267
+ "landed": {"sha": "0123456789abcdef0123456789abcdef01234567","at": "2026-11-10T12:00:00Z"},
268
+ "source": "produkt/usage.jsonl",
269
+ "deadline": "2099-12-31T23:59:59Z",
270
+ "operation": "powitanie:Ala",
271
+ "program": {"entry": "greet.cjs","args": ["Ala"],"artifact": "greeting.txt"}
272
+ }
273
+ ```
274
+ <!-- local-usage-input:end -->
275
+
276
+ ```sh
277
+ npx robisie usage --input ./usage.json
278
+ ```
279
+
280
+ Success prints one JSON `UsageEvent` with exit 0. Change `operation` to `powitanie:Bartek` and `program.args` to `["Bartek"]`, run the same command, then repeat with `powitanie:Celina` and `["Celina"]`. The equivalent `--input=./usage.json` form is supported. Three distinct operations and distinct artifact bytes are required; three identical operations do not count as three. Do not append events manually. The CLI executes the landed SHA in a separate worktree; it does not judge the result or set `done`.
281
+
282
+ Refusal or IO failure returns exit 1 and a next step. An entry may already exist: inspect `stateDir/evidence/<source>` and the referenced artifacts before retrying, preserve evidence and resolve the cause. Never retry the program automatically. After three accepted uses, another `factory run --once` tick starts/settles independent acceptance; only a fresh card read confirms `local_receiver.outcome=PASS` and `status=done`. The package fixture does not prove actual customer use.
283
+
284
+ ### Manual Builder card
285
+
238
286
  The human starts the CEO in the installation directory: `claude --agent ceo-client`, or `codex` and requests the robisie CEO role (reading the full file referenced by AGENTS.md), or `opencode` and selects `ceo-client`. After a successful project lookup use this request, which works after npm installation with just README:
239
287
 
240
288
  > Create wynik.txt in this directory with exactly “robisie działa” followed by a newline. Read it back and verify the exact contents. Boundaries: this file only, no dependencies, accounts or publication. Use my existing authorization if it covers this exact scope; otherwise ask before work. After the work I need independent review and separate final acceptance.
@@ -265,7 +313,7 @@ OpenCode: the card stays in `in_review` regardless of the availability of the Ag
265
313
 
266
314
  In other CEO sessions, including Codex, moving to delivered requires independent review and a verified receipt. If the CEO session lacks the Agent tool, the card stays in `in_review`: this is a product capability gap for the person responsible for the CEO integration to resolve. Do not substitute Builder self-review or a manual status change. Installing three roles does not provide that integration.
267
315
 
268
- The project owner can use Dashboard → Planer → card → Etap → “Zrobione” to move `delivered` to `done`, including when the agent uses a `worker` key. For the first card described here, the server does not enforce stored acceptance or evidence before a change to `done`: the dashboard lets the owner select “Zrobione” even without them. Do this only after checking and explicitly accepting the result. The dashboard cannot edit `details`; review and evidence are recorded through the supported board tool flow. This guide alone does not prove a customer has completed that flow.
316
+ The project owner can use Dashboard → Planer → card → Etap → “Zrobione” to move `delivered` to `done`, including when the agent uses a `worker` key. For the manual wynik.txt card, the server does not enforce stored acceptance or evidence before a change to `done`: the dashboard lets the owner select “Zrobione” even without them. Do this only after checking and explicitly accepting the result. The dashboard cannot edit `details`; review and evidence are recorded through the supported board tool flow. This guide alone does not prove a customer has completed that flow.
269
317
 
270
318
  ### Blocked card: retry or abandon
271
319
 
@@ -490,4 +538,4 @@ The installer does not start background services or the Builder on its own; afte
490
538
 
491
539
  Windows/WSL are unverified. Offline validation checks configuration structure, not project UUID, repo existence, model availability or provider execution.
492
540
 
493
- The package engine (`dist/engine/tick.cjs`) is separate from the installer: it is started by `npx robisie factory run --engine-config ./robisie.config.json` and only on Linux; on any other system the command refuses with code 2 and a message. The `--once` option runs one tick without a pause and excludes an explicit `--interval`. Every nonzero tick result stops the supervisor („Fabryka zatrzymana: …”) with one diagnostic line on stderr; code 2 means an escalation (e.g. missing B key after receiver PASS, tester refusal, acceptance STOP) that must be resolved before retrying, and code 78 points to configuration repair. Real customer use on Linux will be proven in the D9 acceptance; on other systems there is no native proof of the engine running. Automatic FJ plans for customers are announced (“soon”) but are not in this release; the selector returns the true result.
541
+ The package engine (`dist/engine/tick.cjs`) is separate from the installer: it is started by `npx robisie factory run --engine-config ./robisie.config.json` on Linux for the client (`local`), or on Linux and macOS for an explicit Robisie host (`mode: "host"`, `pr|delivered`). Other systems receive code 2 and a message. The `--once` option runs one tick without a pause and excludes an explicit `--interval`. Every nonzero tick result stops the supervisor („Fabryka zatrzymana: …”) with one diagnostic line on stderr; code 2 means an escalation (e.g. missing B key after receiver PASS, tester refusal, acceptance STOP) that must be resolved before retrying, and code 78 points to configuration repair. Real customer use on Linux will be proven in the D9 acceptance; a live macOS host switch and return require separate operator acceptance. Automatic FJ plans for customers are announced (“soon”) but are not in this release; the selector returns the true result.
package/docs/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # robisie — od konta do odebranej karty (paczka 0.4.6) <!-- x-release-please-version -->
1
+ # robisie — od konta do odebranej karty (paczka 0.5.0) <!-- 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
 
@@ -19,7 +19,7 @@ Jeśli README w rejestrze jest puste, użyj lokalnych przewodników w `node_modu
19
19
  <a id="wymagania"></a>
20
20
  ## Wymagania
21
21
 
22
- Człowiek przygotowuje Node.js 24+ (wydanie użyte przy sprawdzeniach: 24.3.0), npm, internet do zależności i robisie oraz program jednego dostawcy: Claude Code, Codex CLI albo OpenCode z własnym dostępem do AI. Starszy Node, np. 22, otrzymuje odmowę przed `init`, `doctor` i `factory run`. Silnik w paczce (`dist/engine/tick.cjs`) wymaga systemu Linux i jest uruchamiany przez `npx robisie factory run`; konfigurację silnika opisuje [ENGINE-CONFIG](ENGINE-CONFIG.md). Sprawdź `node --version`, `npm --version` i wersję wybranego programu (`claude --version`, `codex --version` lub `opencode --version`). Jeśli programu nie ma w PATH, zainstaluj go według instrukcji dostawcy i sprawdź ponownie; sam katalog konfiguracji nie wystarcza. Windows/WSL są niezweryfikowane; poniższe przykłady używają ścieżek POSIX.
22
+ Człowiek przygotowuje Node.js 24+ (wydanie użyte przy sprawdzeniach: 24.3.0), npm, internet do zależności i robisie oraz program jednego dostawcy: Claude Code, Codex CLI albo OpenCode z własnym dostępem do AI. Starszy Node, np. 22, otrzymuje odmowę przed `init`, `doctor` i `factory run`. Silnik w paczce (`dist/engine/tick.cjs`) dla klienta wymaga systemu Linux; jawny host Robisie (`engine.mode: "host"`, dostawa `pr|delivered`) może działać także na macOS. Uruchamia go `npx robisie factory run`; konfigurację silnika opisuje [ENGINE-CONFIG](ENGINE-CONFIG.md). Sprawdź `node --version`, `npm --version` i wersję wybranego programu (`claude --version`, `codex --version` lub `opencode --version`). Jeśli programu nie ma w PATH, zainstaluj go według instrukcji dostawcy i sprawdź ponownie; sam katalog konfiguracji nie wystarcza. Windows/WSL są niezweryfikowane; poniższe przykłady używają ścieżek POSIX.
23
23
 
24
24
  Przygotuj pusty katalog na dysku. Nie potrzebujesz strony ani własnego pliku `package.json`; przed instalacją utworzy go poniższy krok Node.js. To katalog pracy agentów, niezależny od projektu w panelu.
25
25
 
@@ -55,7 +55,7 @@ Wymagane są dwa osobne klucze: A (`ROBISIE_KEY`, worker) i B (`ROBISIE_REVIEW_K
55
55
 
56
56
  A i B są zapisywane osobno w `${XDG_CONFIG_HOME:-$HOME/.config}/robisie/key` i `review-key` (pliki 0600, katalog 0700). B nie trafia do konfiguracji agentów/modeli, manifestu, argumentów, claimów ani komunikatów. Załaduj oba ENV także przy `--no-shell`. Przed pierwszym zadaniem uruchom zwykły `npx robisie doctor`: tryb `--engine-config` nie sprawdza kluczy. Przy brakującym lub niepoprawnym A doctor diagnozuje A; sprawdzanie B zaczyna dopiero, gdy A jest obecny i ma poprawny format. Brak B, B=A, zły format i nieudany odczyt B dają exit 1. B sprawdzane jest przez `initialize` + `list_projects`, bez mutacji danych biznesowych; liczniki auth mogą wzrosnąć. Odczyt nie potwierdza roli, wspólnego konta A/B ani polityki projektu.
57
57
 
58
- Każdy wynik doctor zawiera `! Polityka enforced: NIE SPRAWDZONO — klient nie ma API jej odczytu.` Odmowa kontekstu projektu następuje przed doctor i ma własną poradę. Zielony doctor nie oznacza aktywacji enforced. Przy błędzie B sprawdź dostęp do Connect i wystawienie owner_validator; awaria sieci nie dowodzi unieważnienia. Ponów init z poprawnym B w ENV, potem doctor. Zmiana polityki wymaga osobnej uprawnionej czynności operatora.
58
+ Gdy klucz A widzi dokładnie jeden projekt, doctor odczytuje jego `reviewPolicy` przez `list_projects`: `enforced` daje „✓ Polityka enforced: TAK”, `legacy` ostrzega, że `accept_review` będzie odmawiane i wymaga ustawienia enforced przez operatora. Starszy serwer bez pola lub `null` daje „NIE SPRAWDZONO — serwer nie zwraca polityki”, błąd odczytu — „NIE SPRAWDZONO — odczyt nieudany”. Linia jest informacyjna i nie zmienia exit. Odmowa kontekstu projektu następuje przed doctor i ma własną poradę. Klient tylko odczytuje politykę, nie aktywuje enforced; zmienia ją uprawniony operator.
59
59
 
60
60
  ### Logowanie kodem: npx robisie login
61
61
 
@@ -280,6 +280,54 @@ Doctor uruchamia plik pomocnika przez node, agent przez npx. `ROBISIE_PROJECT_CO
280
280
  <!-- sekcja: pierwsza-karta -->
281
281
  ## Pierwsza karta i start Buildera
282
282
 
283
+ ### Karta dla lokalnego silnika
284
+
285
+ Wybierz projekt z polityką `enforced` i konfiguracją `engine.delivery: "local"` według [konfiguracji silnika](ENGINE-CONFIG.md). CEO tworzy kartę przez narzędzia tablicy, z poniższym literalnym obiektem `details`. Panel nie edytuje `details`. Cel: zmień powitanie w istniejącym, śledzonym `greet.cjs`; bez argumentu wypisz `Witaj z fabryki`, a dla jednego argumentu Ala, Bartek lub Celina zapisz nowe `greeting.txt` z `Witaj z fabryki, <imię>!` i końcowym znakiem nowej linii. Bez zależności, kont i publikacji. Zakres zapisu kodu obejmuje tylko `greet.cjs`; `greeting.txt` jest artefaktem użycia w osobnym worktree.
286
+
287
+ <!-- local-card-details:start -->
288
+ ```json
289
+ {
290
+ "card_class": "executable",
291
+ "delivery_mode": "local",
292
+ "scope": ["greet.cjs"],
293
+ "authority": "auto",
294
+ "done_when": ["greet.cjs wypisuje Witaj z fabryki i dla argumentów Ala, Bartek, Celina tworzy greeting.txt z dokładną treścią Witaj z fabryki, <imię>! oraz końcowym znakiem nowej linii"],
295
+ "effect_check": "{\"v\":1,\"source\":\"produkt/usage.jsonl\",\"criteria\":[0],\"min\":3,\"deadline\":\"2099-12-31T23:59:59Z\"}",
296
+ "seed_provenance": {"authoring_providers": {"by": "anthropic","proposal_by": "openai","packager_by": "anthropic"}}
297
+ }
298
+ ```
299
+ <!-- local-card-details:end -->
300
+
301
+ Przed utworzeniem karty zastąp przykładowy `deadline` przyszłym terminem ISO 8601 ze strefą czasową, obejmującym wykonanie, testera i trzy użycia. W `seed_provenance.authoring_providers` wpisz prawdziwych dostawców autorów: `by` autora zasiewu, `proposal_by` autora propozycji, `packager_by` autora pakietu; nie kopiuj przykładowych nazw dla pozorowania niezależności. Silnik dopisuje transport, dostawę i wynik testera — nie twórz tych dowodów ręcznie.
302
+
303
+ Po autoryzacji CEO przygotowuje kartę do `ready`. Uruchamiaj `npx robisie factory run --engine-config ./robisie.config.json --once` i obserwuj kartę aż do rzeczywistego PASS testera na landed SHA oraz jego rozliczenia (ACK): brak `.tester-job.lock`, `.tester-job.input.json` i `.tester-job.result.json` w `stateDir`. Sam PASS bez ACK nie wystarcza.
304
+
305
+ Zapisz poniższy pełny input jako `usage.json` w bieżącym katalogu. `repo` weź z `engine.repo`, a `stateDir` z konfiguracji silnika (ścieżki względne konfiguracji rozwiąż względem jej katalogu; tu użyj absolutnych). `landed.sha` i `landed.at` przepisz ze świeżego odczytu `details.landed` tej karty — poniższe wartości są fikcyjne. `source` i `deadline` przepisz z JSON w `details.effect_check`; `source` jest względem `stateDir/evidence`.
306
+
307
+ <!-- local-usage-input:start -->
308
+ ```json
309
+ {
310
+ "repo": "/sciezka/do/repo",
311
+ "stateDir": "/sciezka/do/stanu",
312
+ "landed": {"sha": "0123456789abcdef0123456789abcdef01234567","at": "2026-11-10T12:00:00Z"},
313
+ "source": "produkt/usage.jsonl",
314
+ "deadline": "2099-12-31T23:59:59Z",
315
+ "operation": "powitanie:Ala",
316
+ "program": {"entry": "greet.cjs","args": ["Ala"],"artifact": "greeting.txt"}
317
+ }
318
+ ```
319
+ <!-- local-usage-input:end -->
320
+
321
+ ```sh
322
+ npx robisie usage --input ./usage.json
323
+ ```
324
+
325
+ Po sukcesie otrzymasz jeden `UsageEvent` JSON i exit 0. Zmień `operation` na `powitanie:Bartek` oraz `program.args` na `["Bartek"]` i wykonaj to samo polecenie, potem analogicznie `powitanie:Celina` i `["Celina"]`. Możesz użyć równoważnego `--input=./usage.json`. Potrzebne są trzy różne operacje i różne bajty artefaktów; trzy identyczne operacje nie liczą się jako trzy. Nie dopisuj zdarzeń ręcznie. CLI wykonuje program na landed SHA w osobnym worktree, nie ocenia wyniku i nie ustawia `done`.
326
+
327
+ Przy odmowie lub błędzie IO polecenie zwraca exit 1 z następnym krokiem. Wpis może już istnieć: przed ponowieniem sprawdź `stateDir/evidence/<source>` oraz wskazane artefakty, zachowaj dowody i wyjaśnij przyczynę. Nie ponawiaj programu automatycznie. Po trzech przyjętych użyciach kolejny takt `factory run --once` uruchamia/rozlicza niezależny odbiór; dopiero świeży odczyt karty potwierdza `local_receiver.outcome=PASS` i `status=done`. Lokalny przykład w testach paczki nie dowodzi użycia u klienta.
328
+
329
+ ### Ręczna karta Buildera
330
+
283
331
  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:
284
332
 
285
333
  > 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.
@@ -310,7 +358,7 @@ OpenCode: karta pozostaje w `in_review` niezależnie od dostępności narzędzia
310
358
 
311
359
  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.
312
360
 
313
- Właściciel projektu może w panelu: Dashboard → Planer → karta → Etap wybrać „Zrobione” i przesunąć `delivered` do `done`, także przy kluczu agenta `worker`. Dla opisanej pierwszej karty serwer nie wymusza zapisanej akceptacji ani dowodów przed zmianą na `done`: panel pozwala właścicielowi wybrać „Zrobione” także bez nich. Zrób to dopiero po sprawdzeniu wyniku i jawnym odbiorze. Panel nie edytuje szczegółów `details`; recenzję i dowody zapisuje się przez obsługiwany przepływ narzędzi tablicy. Sama instrukcja nie dowodzi, że ten przebieg przeszedł już u klienta.
361
+ 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.
314
362
 
315
363
  ### Karta zablokowana: ponów albo porzuć
316
364
 
@@ -535,4 +583,4 @@ Instalator nie uruchamia sam usług w tle ani Buildera; po zgodzie operatora CEO
535
583
 
536
584
  Windows/WSL są niezweryfikowane. Walidacja offline sprawdza strukturę konfiguracji i wejścia instalacji lokalnej, nie UUID projektu, istnienie repo, dostępność modeli ani uruchomienie dostawców.
537
585
 
538
- Silnik paczki (`dist/engine/tick.cjs`) jest odrębny od instalatora: uruchamia go `npx robisie factory run --engine-config ./robisie.config.json` i tylko na Linuxie; na innym systemie polecenie odmawia z kodem 2 i komunikatem. Opcja `--once` uruchamia jeden takt bez przerwy i wyklucza jawne `--interval`. Każdy niezerowy wynik taktu zatrzymuje nadzorcę („Fabryka zatrzymana: …”) z jedną linią diagnozy na stderr; kod 2 to eskalacja (np. brak klucza B po receiver PASS, odmowa testera, STOP odbioru) wymagająca rozstrzygnięcia przed ponowieniem, a kod 78 wskazuje konfigurację do poprawy. Realne użycie u klienta na Linuxie zostanie udowodnione w odbiorze D9; na innych systemach nie ma natywnego dowodu uruchomienia silnika. Automatyczne plany FJ u klienta są zapowiedziane („wkrótce”), ale nie ma ich w tym wydaniu; selektor zwraca prawdziwy wynik.
586
+ Silnik paczki (`dist/engine/tick.cjs`) jest odrębny od instalatora: uruchamia go `npx robisie factory run --engine-config ./robisie.config.json` na Linuxie dla klienta (`local`) oraz na Linuxie lub macOS dla jawnego hosta Robisie (`mode: "host"`, `pr|delivered`). Pozostałe systemy otrzymują kod 2 i komunikat. Opcja `--once` uruchamia jeden takt bez przerwy i wyklucza jawne `--interval`. Każdy niezerowy wynik taktu zatrzymuje nadzorcę („Fabryka zatrzymana: …”) z jedną linią diagnozy na stderr; kod 2 to eskalacja (np. brak klucza B po receiver PASS, odmowa testera, STOP odbioru) wymagająca rozstrzygnięcia przed ponowieniem, a kod 78 wskazuje konfigurację do poprawy. Realne użycie u klienta na Linuxie zostanie udowodnione w odbiorze D9; próba żywego hosta na macOS i jego powrotu wymaga osobnego odbioru operatora. Automatyczne plany FJ u klienta są zapowiedziane („wkrótce”), ale nie ma ich w tym wydaniu; selektor zwraca prawdziwy wynik.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robisie",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
4
4
  "description": "Instalator klienta robisie: łączy agenta (Claude Code, Codex CLI, OpenCode) z tablicą robisie i instaluje role klienta.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",