robisie 0.5.34 → 0.5.36
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 +16 -0
- package/README.md +8 -2
- package/dist/cli.js +2 -2
- package/dist/commands.js +4 -2
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/done-evidence.d.ts +2 -0
- package/dist/done-evidence.js +25 -5
- package/dist/engine/build-id.json +1 -1
- package/dist/engine/bundle-report.json +7 -7
- package/dist/engine/tick.cjs +290 -51
- package/dist/planer-client.d.ts +1 -0
- package/dist/planer-client.js +1 -1
- package/dist/role-registry.d.ts +7 -4
- package/dist/role-registry.js +17 -4
- package/dist/roles.d.ts +1 -1
- package/docs/README.en.md +10 -4
- package/docs/README.md +10 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Historia zmian klienta / Client changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.36](https://github.com/chuppa12/robisie-app/compare/client-v0.5.35...client-v0.5.36) (2026-11-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Factory Cards
|
|
7
|
+
|
|
8
|
+
* praca workera task-mwh2olm6-zqnmup (auto-commit) ([7c9200a](https://github.com/chuppa12/robisie-app/commit/7c9200a6c3596539b1b66c4566bedd8ed05811af))
|
|
9
|
+
* praca workera task-mwh3l0ka-24d9jb (auto-commit) ([26fc154](https://github.com/chuppa12/robisie-app/commit/26fc1548329852b6dd9c36385626250006185814))
|
|
10
|
+
|
|
11
|
+
## [0.5.35](https://github.com/chuppa12/robisie-app/compare/client-v0.5.34...client-v0.5.35) (2026-11-14)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Factory Cards
|
|
15
|
+
|
|
16
|
+
* praca workera task-mwgsshwq-9kqk3r (auto-commit) ([8ee594d](https://github.com/chuppa12/robisie-app/commit/8ee594d11e102a04b0ecbda05968e870e14e1bdc))
|
|
17
|
+
* praca workera task-mwgvzhdg-608lcl (auto-commit) ([66896da](https://github.com/chuppa12/robisie-app/commit/66896da734e9877d1eb93b0138f69b81d4033392))
|
|
18
|
+
|
|
3
19
|
## [0.5.34](https://github.com/chuppa12/robisie-app/compare/client-v0.5.33...client-v0.5.34) (2026-11-14)
|
|
4
20
|
|
|
5
21
|
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ W katalogu projektu z konfiguracją silnika uruchom `npx robisie init`, potem `n
|
|
|
4
4
|
|
|
5
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 lub macOS. 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
|
-
Konto i klucz są potrzebne do init i pracy ról. `npx robisie doctor --engine-config ./robisie.config.json` przy jawnym `engine.mode:host` sprawdza offline strukturę konfiguracji i wejścia instalacji lokalnej, bez kontroli CLI. Przy `engine.mode:client` albo braku pola `engine.mode`, po walidacji wejść i przy dostępnym programie, sprawdza obecność CLI oraz logowanie: `codex login status` i `grok models` (`grok models` wymaga sieci; Grok potwierdza logowanie tylko prawdopodobnie), a `claude auth status`
|
|
7
|
+
Konto i klucz są potrzebne do init i pracy ról. `npx robisie doctor --engine-config ./robisie.config.json` przy jawnym `engine.mode:host` sprawdza offline strukturę konfiguracji i wejścia instalacji lokalnej, bez kontroli CLI. Przy `engine.mode:client` albo braku pola `engine.mode`, po walidacji wejść i przy dostępnym programie, sprawdza obecność CLI oraz logowanie: `codex login status` i `grok models` (`grok models` wymaga sieci; Grok potwierdza logowanie tylko prawdopodobnie), a `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, repo ani modeli. Lokalne przewodniki są w `node_modules/robisie/docs/`.
|
|
8
8
|
|
|
9
9
|
Zamiast przepisywać klucze możesz uruchomić `npx robisie login`: polecenie wypisuje kod i link, Ty albo Twój agent zatwierdzacie parę kluczy A i B w przeglądarce zalogowanej do robisie.app, a klucze trafiają prosto do plików instalacji — w wersji dla testerów agent i właściciel na tym komputerze to jedna strefa zaufania (agent ma technicznie dostęp także do klucza B).
|
|
10
10
|
|
|
@@ -30,6 +30,12 @@ Trzy role instalatora używają jednego dostawcy: CEO (`ceo`), Builder (`builder
|
|
|
30
30
|
|
|
31
31
|
Ustawienia instalatora `ceo`/`builder`/`quality` (CEO/Builder/Quality Officer) są odrębne od rejestru wykonania `roleRegistry`: `worker-client`, `lead-client`, `reviewer-client`, `tester-client`. Nazwy projektu `coordinator`/`owner`/`planner`/`advisor` to jeszcze inne ustawienie. Nie ma automatycznej konwersji między nimi; rejestr nie włącza mieszanego wykonywania ról instalatora.
|
|
32
32
|
|
|
33
|
+
Opcjonalny `roleRegistry.receiver-client` wybiera osobnego odbierającego: `provider: codex` (OpenAI), `claude` (Anthropic) albo `grok` (xAI), bez OpenCode. Brak wiersza zachowuje domyślny Grok / `grok-cli` / `low`, także dla historycznych odbiorów; nie dopisuj wiersza dla samych defaults. Wpis ma `name`, `provider`, `model`, `effort` (`low`, `medium`, `high`, `xhigh`); Grok używa `grok-cli` albo jawnego `grok-*`, a `none` dotyczy tylko archiwów. Brak `requireIndependentProvider` lub `true` wymaga innego dostawcy niż każdy autor. Wyłącznie zamrożone `false` odbiorcy pozwala na wspólnego dostawcę, np. Codex przy Workerze Codex; recenzencki partial sam nie daje tego wyjątku. Odbiór nadal wymaga osobnego procesu: nie wolno użyć tego samego agenta, jego rozmowy, sesji ani joba Workera lub recenzenta. Wybór zostaje zamrożony obok pary; zmiana wpisu lub obecności flagi w trakcie karty zatrzymuje odbiór także po restarcie. `false` odbiorcy albo recenzenta oznacza `acceptance.partial` (pole `independence_level: partial`) i widoczną notę „częściowa: bez niezależnego sprawdzenia”. Tylko `accept_review` zapisuje chroniony `review_receipt.receiverIndependenceWaived=true` dla wyjątku odbiorcy; luźne details ani sama nota go nie zastąpią. Wymagane są zalogowane CLI Codex, Grok (nadal wymagany) oraz Claude, jeśli recenzent lub odbiorca wybiera Claude. Aktualizuj serwer obok paczki npm: starszy serwer nie obsłuży chronionego wyjątku. Przykładowy dodatkowy wpis do `roleRegistry`:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{"receiver-client":{"name":"Odbiorca","provider":"codex","model":"gpt-6.1-sol","effort":"high","requireIndependentProvider":false}}
|
|
37
|
+
```
|
|
38
|
+
|
|
33
39
|
Przy ręcznej instalacji z Connect wymagane są dwa osobne klucze: A (`ROBISIE_KEY`, worker) i B (`ROBISIE_REVIEW_KEY`, owner_validator). W https://robisie.app/dashboard/connect wygeneruj NOWY klucz B z rolą `owner_validator` i etykietą inną niż A: powtórzenie etykiety A rotuje A. Etykieta nie ogranicza klucza do projektu. B podaj poza rozmową w osobnym ukrytym pytaniu init albo przez bezpiecznie przygotowane ENV; `--key-stdin` pobiera tylko A. ENV B ma pierwszeństwo przed zapisanym `review-key` i pytaniem; otaczające spacje są błędem. Reinstalacja używa zapisanego B, jeśli ENV jest puste. Niepusty wadliwy B wymaga naprawy, bez zastępowania innym źródłem.
|
|
34
40
|
|
|
35
41
|
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. Przy ręcznej instalacji 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.
|
|
@@ -241,7 +247,7 @@ Zapisz konfigurację projektu i osobny rejestr wykonania w `robisie.config.json`
|
|
|
241
247
|
|
|
242
248
|
Uruchom `npx robisie doctor --engine-config ./robisie.config.json` (także `--engine-config=./robisie.config.json`). Ścieżka pliku jest względem bieżącego katalogu, a `repo` i `stateDir` względem pliku konfiguracji. Role projektu `coordinator/owner/planner/advisor` zachowują domyślne nazwy; opcjonalne pole `roles` służy ich nazwom i odmianie, osobno od `roleRegistry`.
|
|
243
249
|
|
|
244
|
-
Kod 0 oznacza poprawną strukturę konfiguracji i
|
|
250
|
+
Kod 0 oznacza poprawną strukturę konfiguracji i cztery wymagane kompletne przypisania wykonania i opcjonalnego odbiorcę; raport pokazuje rolę → imię / dostawcę / model / wysiłek. Kod 1 wskazuje plik, błędne pole (jeśli dotyczy) i następny krok. Jawny `engine.mode:host` sprawdza strukturę i wejścia offline, bez kontroli CLI. `engine.mode:client` albo brak pola `engine.mode`, po walidacji wejść i przy dostępnym programie, sprawdza obecność CLI oraz logowanie: `codex login status` i `grok models` (`grok models` wymaga sieci; Grok potwierdza logowanie tylko prawdopodobnie), a `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, komend silnika ani zapisu plików i nie potwierdza UUID projektu, repo ani modeli. Raport nadal stwierdza: „sprawdzono konfigurację; nie sprawdzono uruchomienia dostawców” — to brak prawdziwego zadania AI, nie brak sond CLI klienta. Zwykły `doctor` zachowuje dotychczasową diagnozę instalacji. Tryb nie wymaga klucza.
|
|
245
251
|
|
|
246
252
|
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 lub macOS dla klienta (`local`) oraz jawnego hosta Robisie (`mode: "host"`, `pr|delivered`), 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.
|
|
247
253
|
|
package/dist/cli.js
CHANGED
|
@@ -52,7 +52,7 @@ Opcje doctor:
|
|
|
52
52
|
Jawny engine.mode:host: offline sprawdza strukturę konfiguracji i wejścia, bez kontroli CLI.
|
|
53
53
|
engine.mode:client albo brak pola engine.mode: obecność CLI i logowanie; sonda po walidacji wejść, tylko przy dostępnym programie.
|
|
54
54
|
Przykład: npx robisie doctor --engine-config ./robisie.config.json
|
|
55
|
-
Klient: codex login status i grok models (grok models wymaga sieci; Grok potwierdza logowanie tylko prawdopodobnie); claude auth status
|
|
55
|
+
Klient: codex login status i grok models (grok models wymaga sieci; Grok potwierdza logowanie tylko prawdopodobnie); claude auth status przy reviewer-client.provider: claude lub receiver-client.provider: claude. Brak programu nie pozwala sprawdzić logowania.
|
|
56
56
|
Żaden tryb nie wykonuje prawdziwego zadania AI ani komend silnika; nie sprawdza UUID projektu, repo ani dostępności modeli. Bez klucza.
|
|
57
57
|
Role wykonania w tym pliku są osobne od mapy ceo/builder/quality ustawianej przez init.
|
|
58
58
|
Przewodniki i przykłady: node_modules/robisie/docs/README.md oraz README.en.md w tym samym katalogu.
|
|
@@ -219,7 +219,7 @@ export async function run(argv, ctx) {
|
|
|
219
219
|
const configPath = resolve(ctx.cwd, selected);
|
|
220
220
|
if (loadEngineConfig(configPath).engine.mode !== "host") {
|
|
221
221
|
const { roleRegistry } = loadRoleRegistryConfig(configPath);
|
|
222
|
-
validateClientRoles(roleRegistry["worker-client"], roleRegistry["reviewer-client"]);
|
|
222
|
+
validateClientRoles(roleRegistry["worker-client"], roleRegistry["reviewer-client"], roleRegistry["receiver-client"]);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
}
|
package/dist/commands.js
CHANGED
|
@@ -323,7 +323,7 @@ function pairReadiness(ctx, fail, registry) {
|
|
|
323
323
|
failed = true;
|
|
324
324
|
fail(`Grok: nie potwierdzono zalogowania w środowisku silnika (HOME=${home}; \`grok models\` zakończył się błędem).`, `Zaloguj Grok: \`grok login --device-auth\`. ${retry}`);
|
|
325
325
|
}
|
|
326
|
-
if (registry?.["reviewer-client"].provider === "claude") {
|
|
326
|
+
if (registry?.["reviewer-client"].provider === "claude" || registry?.["receiver-client"]?.provider === "claude") {
|
|
327
327
|
const claude = findProgram(ctx.cwd, reviewEnv.PATH, "claude");
|
|
328
328
|
if (!claude) {
|
|
329
329
|
unchecked = true;
|
|
@@ -341,9 +341,11 @@ function pairReadiness(ctx, fail, registry) {
|
|
|
341
341
|
}
|
|
342
342
|
/** Uses the registry already read by doctorEngineConfig, without reopening configuration. */
|
|
343
343
|
export function doctorClientPair(ctx, registry) {
|
|
344
|
-
validateClientRoles(registry["worker-client"], registry["reviewer-client"]);
|
|
344
|
+
validateClientRoles(registry["worker-client"], registry["reviewer-client"], registry["receiver-client"]);
|
|
345
345
|
const reviewer = registry["reviewer-client"];
|
|
346
346
|
ctx.out(`Recenzent: ${reviewer.provider}/${reviewer.model}; niezależność: ${reviewer.requireIndependentProvider === false ? "częściowa: bez niezależnego sprawdzenia" : "wymagana"}.`);
|
|
347
|
+
const receiver = registry["receiver-client"];
|
|
348
|
+
ctx.out(`Odbiorca: ${receiver ? `${receiver.provider}/${receiver.model}` : "grok/grok-cli"}; niezależność: ${receiver?.requireIndependentProvider === false ? "częściowa: bez niezależnego sprawdzenia" : "wymagana"}.`);
|
|
347
349
|
const problems = [];
|
|
348
350
|
const readiness = pairReadiness(ctx, (line, next) => { ctx.out(`✗ ${line}`); problems.push(next); }, registry);
|
|
349
351
|
ctx.out(`Gotowość wykonawców: ${readiness}.`);
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Package identity and the server contract it speaks. */
|
|
2
2
|
export declare const PACKAGE_NAME = "robisie";
|
|
3
|
-
export declare const PACKAGE_VERSION = "0.5.
|
|
3
|
+
export declare const PACKAGE_VERSION = "0.5.36";
|
|
4
4
|
/**
|
|
5
5
|
* MAJOR of the agent-API contract this package understands.
|
|
6
6
|
* PARITY: src/lib/mcp/contract-version.ts (AGENT_API_CONTRACT_VERSION) on the server.
|
package/dist/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Package identity and the server contract it speaks. */
|
|
2
2
|
export const PACKAGE_NAME = "robisie";
|
|
3
|
-
export const PACKAGE_VERSION = "0.5.
|
|
3
|
+
export const PACKAGE_VERSION = "0.5.36"; // 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.
|
package/dist/done-evidence.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export declare function machineProcessTraces(details: Details): {
|
|
|
10
10
|
/** Only source fields belong to this tuple; missing/invalid text has one representation. */
|
|
11
11
|
export declare function doneRetrySnapshot(details: Record<string, unknown>): (string | (string | null)[] | null)[];
|
|
12
12
|
export declare function doneEvidenceFingerprint(details: Record<string, unknown>): string;
|
|
13
|
+
/** Only the persisted receiver selection can authorize the protected local exception. */
|
|
14
|
+
export declare function receiverIndependenceWaiverValid(details: Details, provider: unknown): boolean;
|
|
13
15
|
/** CR supplies the receipt; a role or model name is never provider evidence. */
|
|
14
16
|
export declare function acceptanceIndependenceValid(details: Details): boolean;
|
|
15
17
|
/** Card-level opt-in for client-run proof; never sufficient alone (see LocalDeliveryOptions). */
|
package/dist/done-evidence.js
CHANGED
|
@@ -62,15 +62,30 @@ export function doneRetrySnapshot(details) {
|
|
|
62
62
|
export function doneEvidenceFingerprint(details) {
|
|
63
63
|
return createHash("sha256").update(JSON.stringify(doneRetrySnapshot(details))).digest("hex");
|
|
64
64
|
}
|
|
65
|
+
/** Only the persisted receiver selection can authorize the protected local exception. */
|
|
66
|
+
export function receiverIndependenceWaiverValid(details, provider) {
|
|
67
|
+
const frozen = recordOrEmpty(recordOrEmpty(details?.maszynista).clientReceiver);
|
|
68
|
+
const a = recordOrEmpty(details?.acceptance), independence = recordOrEmpty(a.independence);
|
|
69
|
+
const expected = frozen.provider === "codex" ? "openai" : frozen.provider === "claude" ? "anthropic" : frozen.provider === "grok" ? "xai" : undefined;
|
|
70
|
+
return details?.card_class === "executable" && details.delivery_mode === "local"
|
|
71
|
+
&& Array.isArray(details.done_when) && details.done_when.length > 0 && details.done_when.every(nonEmptyText)
|
|
72
|
+
&& frozen.requireIndependentProvider === false && !!expected
|
|
73
|
+
&& [frozen.name, frozen.model, frozen.effort].every(nonEmptyText)
|
|
74
|
+
&& sameProvider(provider, expected) && sameProvider(independence.receiver_provider, provider)
|
|
75
|
+
&& typeof a.provider === "string" && a.provider.startsWith(`${expected}/`)
|
|
76
|
+
&& a.independence_level === "partial" && a.independence_note === "częściowa: bez niezależnego sprawdzenia";
|
|
77
|
+
}
|
|
65
78
|
/** CR supplies the receipt; a role or model name is never provider evidence. */
|
|
66
79
|
export function acceptanceIndependenceValid(details) {
|
|
67
80
|
const a = recordOrEmpty(details?.acceptance), i = recordOrEmpty(a.independence);
|
|
68
81
|
const authors = recordOrEmpty(i.authoring_providers), sha = recordOrEmpty(details?.landed).sha;
|
|
82
|
+
const receipt = recordOrEmpty(details?.review_receipt);
|
|
83
|
+
const waived = receipt.receiverIndependenceWaived === true && receiverIndependenceWaiverValid(details, receipt.providerDeclared);
|
|
69
84
|
return nonEmptyText(sha) && /^[a-f0-9]{7,40}$/i.test(sha) && a.sha === sha && i.sha === sha
|
|
70
85
|
&& nonEmptyText(i.ref) && nonEmptyText(i.receiver_provider)
|
|
71
86
|
&& a.evidence_fingerprint === doneEvidenceFingerprint(details ?? {})
|
|
72
87
|
&& ["by", "proposal_by", "packager_by", "worker"].every(k => nonEmptyText(authors[k])
|
|
73
|
-
&& String(authors[k]).trim().toLowerCase() !== String(i.receiver_provider).trim().toLowerCase());
|
|
88
|
+
&& (waived || String(authors[k]).trim().toLowerCase() !== String(i.receiver_provider).trim().toLowerCase()));
|
|
74
89
|
}
|
|
75
90
|
function isoTimestamp(value) {
|
|
76
91
|
return typeof value === "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/.test(value)
|
|
@@ -108,11 +123,16 @@ export function localProcessTraces(details) {
|
|
|
108
123
|
missing.push("local");
|
|
109
124
|
if (!valid || review.sha !== sha || review.verdict !== "PASS")
|
|
110
125
|
missing.push("review");
|
|
111
|
-
const
|
|
112
|
-
const
|
|
126
|
+
const acceptance = recordOrEmpty(details?.acceptance), declared = recordOrEmpty(acceptance.independence);
|
|
127
|
+
const receipt = recordOrEmpty(details?.review_receipt), protectedProvider = receipt.providerDeclared;
|
|
128
|
+
const waived = receipt.receiverIndependenceWaived === true && receiverIndependenceWaiverValid(details, protectedProvider);
|
|
113
129
|
const authors = recordOrEmpty(declared.authoring_providers);
|
|
114
|
-
|
|
115
|
-
|
|
130
|
+
const frozenFalse = recordOrEmpty(recordOrEmpty(details?.maszynista).clientReceiver).requireIndependentProvider === false;
|
|
131
|
+
const reviewer = recordOrEmpty(recordOrEmpty(recordOrEmpty(recordOrEmpty(details?.maszynista).clientPair).selection).reviewer);
|
|
132
|
+
const partialInvalid = (frozenFalse || reviewer.requireIndependentProvider === false)
|
|
133
|
+
&& (acceptance.independence_level !== "partial" || acceptance.independence_note !== "częściowa: bez niezależnego sprawdzenia");
|
|
134
|
+
if (!valid || partialInvalid || (frozenFalse || Object.hasOwn(receipt, "receiverIndependenceWaived")) && !waived || !acceptanceIndependenceValid(details) || !sameProvider(declared.receiver_provider, protectedProvider)
|
|
135
|
+
|| !waived && ["by", "proposal_by", "packager_by", "worker"].some(k => sameProvider(authors[k], protectedProvider)))
|
|
116
136
|
missing.push("independence");
|
|
117
137
|
return { ok: !missing.length, missing };
|
|
118
138
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schema":1,"sha":"
|
|
1
|
+
{"schema":1,"sha":"02529497b4adf8c31e80006be18b25302e122d89","dirty":false}
|
|
@@ -1673,20 +1673,20 @@
|
|
|
1673
1673
|
"staticOperations": {
|
|
1674
1674
|
"beforePreflight": {
|
|
1675
1675
|
"module": "maszynista/tick.ts",
|
|
1676
|
-
"startLine":
|
|
1677
|
-
"endLine":
|
|
1676
|
+
"startLine": 9846,
|
|
1677
|
+
"endLine": 9959,
|
|
1678
1678
|
"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();"
|
|
1679
1679
|
},
|
|
1680
1680
|
"finalization": {
|
|
1681
1681
|
"module": "maszynista/tick.ts",
|
|
1682
|
-
"startLine":
|
|
1683
|
-
"endLine":
|
|
1682
|
+
"startLine": 10250,
|
|
1683
|
+
"endLine": 10302,
|
|
1684
1684
|
"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] ?? \"\"))) {"
|
|
1685
1685
|
},
|
|
1686
1686
|
"refreshTickReport": {
|
|
1687
1687
|
"module": "maszynista/tick.ts",
|
|
1688
|
-
"startLine":
|
|
1689
|
-
"endLine":
|
|
1688
|
+
"startLine": 877,
|
|
1689
|
+
"endLine": 888,
|
|
1690
1690
|
"text": "export function refreshTickReport(observedLoaded = readLoadedSha(REPO)): void {\n loadedSha = observedLoaded;\n try { mainSha = git([\"rev-parse\", engineBranchRef()]); }\n catch (error) { mainSha = \"UNKNOWN\"; log(`Nie można odczytać main SHA: ${errorText(error)}`); }\n if (DRY) return;\n try {\n const content = readFileSync(LAST_TICK, \"utf8\");\n writeFileSync(LAST_TICK, `${content.replace(/^- (?:loaded|main):.*\\n?/gm, \"\")}- loaded: ${loadedSha}\\n- main: ${mainSha}\\n`);\n } catch (error) { if ((error as NodeJS.ErrnoException).code !== \"ENOENT\") throw error; }\n}\n\nfunction writeAtomic(file: string, content: string): void {"
|
|
1691
1691
|
},
|
|
1692
1692
|
"importTime": {
|
|
@@ -1706,6 +1706,6 @@
|
|
|
1706
1706
|
"status": 0,
|
|
1707
1707
|
"signal": null,
|
|
1708
1708
|
"stdout": "v24.3.0\n",
|
|
1709
|
-
"stderr": "(node:
|
|
1709
|
+
"stderr": "(node:19282) 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"
|
|
1710
1710
|
}
|
|
1711
1711
|
}
|