robisie 0.6.14 → 0.7.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,35 @@
1
1
  # Historia zmian klienta / Client changelog
2
2
 
3
+ ## [0.7.0](https://github.com/chuppa12/robisie-app/compare/client-v0.6.15...client-v0.7.0) (2026-11-20)
4
+
5
+
6
+ ### Features
7
+
8
+ * **maszynista:** jeden kompilator intencji w repo na kanonie silnika (LUKI:947) ([b081481](https://github.com/chuppa12/robisie-app/commit/b08148109b73adced55834511f4d937aa63efe99))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **maszynista:** odmowa roli klucza (403) przy zapisie sprawy nie zatrzymuje ruchu karty u klienta (luka D) ([35b11f3](https://github.com/chuppa12/robisie-app/commit/35b11f349371a40c0a49efcfa94882b4aee657f7))
14
+ * **maszynista:** odmowa roli klucza (403) przy zapisie sprawy nie zatrzymuje ruchu karty u klienta (luka D) ([17e9aa2](https://github.com/chuppa12/robisie-app/commit/17e9aa2933a0c8bcba42f103554df32119c452a6))
15
+ * **release:** smoke ponawia 404 tarballa dokładnie tej wersji (LUKI:945) ([cfa6bd8](https://github.com/chuppa12/robisie-app/commit/cfa6bd89dea5e76da174d40f12b06eef03123503))
16
+
17
+
18
+ ### Factory Cards
19
+
20
+ * Aktualizacja paczki (u nas i u klienta) odracza kodem 0 i bez alarmu przez cały job Testera albo odbiorcy, którego proces rozpoznaje jako job tej instalacji, także dłuższy niż 10 minut; nierozpoznany żywy PID i stary claim dalej odmawiają z alarmem ([4e17af1](https://github.com/chuppa12/robisie-app/commit/4e17af1b51d34870abd00a4918d50deb24483b13))
21
+ * praca workera task-mwo88lbs-hc9kvq (auto-commit) ([560d9db](https://github.com/chuppa12/robisie-app/commit/560d9db7eae546cffd2d7c4f6b797d0758c31a84))
22
+ * praca workera task-mwo8vkxh-9cai5a (auto-commit) ([168ffe8](https://github.com/chuppa12/robisie-app/commit/168ffe8408725cccfc156f5aa49e5c1232403e82))
23
+ * praca workera task-mwo9t5d7-j47ti7 (auto-commit) ([98ebc5c](https://github.com/chuppa12/robisie-app/commit/98ebc5cb0a44df1ac0b394f9afcb80d51a18c7ca))
24
+ * praca workera task-mwoao298-s87f9k (auto-commit) ([aeeee27](https://github.com/chuppa12/robisie-app/commit/aeeee277c42b3b11984a7aa83260a23231901175))
25
+
26
+ ## [0.6.15](https://github.com/chuppa12/robisie-app/compare/client-v0.6.14...client-v0.6.15) (2026-11-19)
27
+
28
+
29
+ ### Factory Cards
30
+
31
+ * Karta, której skutek zachodzi w pracy fabryki, jest przyjmowana przez odbiorcę paczki na trzech użyciach ze śladu w dzienniku taktu, wskazanych przez nazwę rodziny zdarzenia w kontrakcie — bez programu, u nas i u klienta tą samą wersją ([cecda46](https://github.com/chuppa12/robisie-app/commit/cecda467deadb530c818c2490e6963b7e072cc1d))
32
+
3
33
  ## [0.6.14](https://github.com/chuppa12/robisie-app/compare/client-v0.6.13...client-v0.6.14) (2026-11-19)
4
34
 
5
35
 
@@ -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.6.14";
3
+ export declare const PACKAGE_VERSION = "0.7.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.6.14"; // x-release-please-version
3
+ export const PACKAGE_VERSION = "0.7.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":"099c017febcfb191a7cf402d46bcafcfb001b257","dirty":false}
1
+ {"schema":1,"sha":"bc8f008b17fdc5d0ced096b69b0984a91c8ff475","dirty":false}
@@ -272,6 +272,18 @@
272
272
  "kind": "import-statement",
273
273
  "category": "builtin"
274
274
  },
275
+ {
276
+ "module": "maszynista/trace-usage.ts",
277
+ "path": "node:crypto",
278
+ "kind": "import-statement",
279
+ "category": "builtin"
280
+ },
281
+ {
282
+ "module": "maszynista/trace-usage.ts",
283
+ "path": "node:fs",
284
+ "kind": "import-statement",
285
+ "category": "builtin"
286
+ },
275
287
  {
276
288
  "module": "maszynista/engine-standalone.ts",
277
289
  "path": "node:path",
@@ -1692,14 +1704,14 @@
1692
1704
  "staticOperations": {
1693
1705
  "beforePreflight": {
1694
1706
  "module": "maszynista/tick.ts",
1695
- "startLine": 10276,
1696
- "endLine": 10389,
1707
+ "startLine": 10285,
1708
+ "endLine": 10398,
1697
1709
  "text": "export async function main(): Promise<number> {\n const start = standaloneStartCheck({ filename: __filename, env: process.env });\n if (start.standalone && !start.ok) {\n console.error(start.message);\n process.exitCode = 78;\n return 78;\n }\n let installation: EngineContext;\n try { installation = createEngineContext(currentEngine(), {\n loadEnvironment: loadEnvFiles, preflight, baseRef: engineBaseRef, refreshBase: fetchMain,\n disk: defaultDiskPressureDependencies, workerContext: loadNorthStar,\n controlEnv: hostEnv, workerEnv: executionEnv, prepareWorktree: prepareHostWorktree, workerArtifacts: createWorkerTmpdir,\n notify: async (card, reason) => { decisionForReksio(card, reason, \"Rozstrzygnij na karcie\", \"\", \"\"); return { outcome: \"recorded\", ref: DECISIONS_REKSIO }; },\n hostOperations: hostOperationsPhase,\n activation: { confirmLoaded, finishHostActivation, readActivationState, recoverTickTimeout, runEnabledAuto },\n }, git, log); }\n catch (error) {\n if (!engineClient()) throw error;\n console.error(`HOLD kontekst klienta: ${clientTickFailure(error)}`);\n process.exitCode = 78;\n return 78;\n }\n const previousInstallation = tickInstallation;\n const hostErrorText = errorText;\n const client = engineClient();\n const result: { outcome: \"ok\" | \"retry\" | \"stop\"; reason: string; cleanup: boolean } = { outcome: \"ok\", reason: \"\", cleanup: false };\n const stopClient = (reason = clientTickFailure()): void => {\n if (client && result.outcome !== \"stop\") { result.outcome = \"stop\"; result.reason = reason; }\n };\n let code = 2;\n try { code = await q.withPlannerQueries(installation.planner, async () => {\n tickInstallation = installation;\n const seedGateSettings = installationSeedGateSettings();\n const errorText = client ? clientTickFailure : hostErrorText;\n const loadEnvFiles = installation.loadEnvironment;\n const preflight = () => {\n const actor = installation.preflight();\n return { uid: actor.kind === \"db\" ? actor.uid : API_ACTOR };\n };\n const { confirmLoaded, finishHostActivation, readActivationState, recoverTickTimeout, runEnabledAuto } = installation.activation;\n const smokeOnly = DRY && process.env.MASZYNISTA_SMOKE === \"1\";\n if (!DRY) {\n const acquire = (): boolean => tryCreateTickLock(LOCK);\n if (!acquire()) {\n const raw = readFileSync(LOCK, \"utf8\"), pid = Number(raw);\n if (!Number.isSafeInteger(pid) || pid <= 0) { console.log(\"tick lock bez poprawnego PID — HOLD\"); return 0; }\n try { process.kill(pid, 0); console.log(`tick już trwa (pid ${pid})`); return 0; }\n catch (error) { if ((error as NodeJS.ErrnoException).code !== \"ESRCH\") throw error; }\n if (readFileSync(LOCK, \"utf8\") === raw) unlinkSync(LOCK);\n if (!acquire()) { console.log(\"tick już trwa\"); return 0; }\n }\n }\n skippedCardEvents.clear();\n let s = parseState(null).state;\n // Internal smoke handoff: the child cannot outlive the parent's reserved budget.\n const smokeLimit = DRY ? Number(process.env.MASZYNISTA_SMOKE_TIMEOUT_MS) : NaN;\n let stateLoaded = false;\n let tickStarted: string | undefined;\n let outcome: \"ok\" | \"failed\" = \"ok\";\n let runtimeFailed = false;\n let observedLoaded = \"UNKNOWN\";\n let tickPhase = \"startup\";\n const deadlineAlarm = armTickDeadline(() => s, Number.isSafeInteger(smokeLimit) && smokeLimit > 0\n ? Math.min(TICK_LIMIT_MS, smokeLimit) : TICK_LIMIT_MS, () => ({ phase: tickPhase, observedLoaded }));\n let hostReady = false;\n let hostBoard: { uid: string; projectId: string } | undefined;\n let activationCards: CardLike[] = [];\n let activationCardsKnown = false;\n let blockedBefore = 0;\n const clientStopped = (): boolean => {\n if (client && (outcome === \"failed\" || (!DRY && s.blocked > blockedBefore))) stopClient();\n if (client && result.outcome === \"stop\") outcome = \"failed\";\n return client && result.outcome === \"stop\";\n };\n let hostPhaseStarted = false;\n const hostPhase = async (): Promise<boolean> => {\n if (smokeOnly || !hostReady || hostPhaseStarted) return false;\n hostPhaseStarted = true;\n tickPhase = \"host\";\n if (hostBoard) {\n const { uid: boardUid, projectId: boardProject } = hostBoard;\n try {\n await runEnabledAuto({ state: s, loadedSha: observedLoaded, repo: REPO, logPath: LOG, tick: s.tick, stateDir: hostStateDir(),\n now: new Date().toISOString(), activation: readActivationState(hostStateDir()), dryRun: DRY }, {\n listCards: async () => scanTasks(boardUid, boardProject, { full: true, statuses: [\"delivered\"],\n detailsKeys: ENABLED_SCAN_DETAILS_KEYS }),\n getTask: id => q.getTask(boardUid, id),\n appendDetail: async (id, patch) => { await appendBoundedDetail(boardUid, id, patch); },\n saveState: writeState,\n alarm: hostActivationAlarm,\n log,\n });\n } catch (error) { runtimeFailed = true; outcome = \"failed\"; log(`FAIL ENABLED auto: ${errorText(error)}`); }\n } else log(\"ENABLED auto: UNKNOWN — brak odczytu projektu; dowód karty czeka na dostęp do tablicy\");\n try {\n const result = await engineRunHostActivation({ repo: REPO, stateDir: hostStateDir(), cards: activationCards, cardsKnown: activationCardsKnown, tick: s.tick, dryRun: DRY }, {\n git, remainingTickMs, alarm: hostActivationAlarm, infrastructureChecks, infrastructurePullRequest, log: line => log(`host-activation: ${line}`),\n });\n log(`host-activation: code=${result.code} target=${result.target ?? \"UNKNOWN\"}${result.detail ? ` reason=${result.detail}` : \"\"}`);\n if (result.code === \"activate\" && result.target) {\n lastTick(s, \"activation\", `aktywacja ${result.target}; ogon odroczony`, outcome === \"ok\");\n return true;\n }\n } catch (error) { runtimeFailed = true; outcome = \"failed\"; log(`FAIL aktywacja: ${errorText(error)}`); }\n return false;\n };\n try {\n observedLoaded = loadedSha = readLoadedSha(REPO);\n s = readState((await engineFjConfig()).enabled);\n stateLoaded = true; blockedBefore = s.blocked;\n s.tick++; tickStarted = new Date().toISOString(); s.lastTickAt = tickStarted;\n log(`tick_started tick=${s.tick} at=${tickStarted} duration=UNKNOWN loaded=${loadedSha}`);\n loadEnvFiles();\n const { uid } = preflight();"
1698
1710
  },
1699
1711
  "finalization": {
1700
1712
  "module": "maszynista/tick.ts",
1701
- "startLine": 10680,
1702
- "endLine": 10732,
1713
+ "startLine": 10689,
1714
+ "endLine": 10741,
1703
1715
  "text": " } finally {\n // A persisted terminal FAIL is a card result; every unexpected exception above\n // remains a runtime failure, including DB errors inside card handling.\n if (!DRY && s.blocked > blockedBefore) {\n outcome = \"failed\";\n try { log(`FAIL: licznik blocked wzrósł ${blockedBefore} → ${s.blocked}; outcome=failed`); }\n catch (error) { console.error(`zapis licznika blocked: ${errorText(error)}`); }\n }\n clientStopped();\n // Early board failure still reaches the same host phase, at most once per tick.\n await hostPhase();\n tickPhase = \"finalizing\";\n try { if (!DRY) await finishHostActivation({ stateDir: hostStateDir(), outcome, tick: s.tick, runtimeFailed, observedLoaded }, { alarm: hostActivationAlarm, log }); }\n catch (error) { runtimeFailed = true; outcome = \"failed\"; log(`FAIL breaker aktywacji: ${errorText(error)}`); }\n clientStopped();\n try { if (stateLoaded) writeState(s); }\n catch (error) { runtimeFailed = true; outcome = \"failed\"; if (!client) throw error; stopClient(); result.cleanup = true; }\n finally {\n if (!DRY) {\n try { if (readFileSync(LOCK, \"utf8\") === String(process.pid)) unlinkSync(LOCK); }\n catch (error) { if ((error as NodeJS.ErrnoException).code !== \"ENOENT\") { if (!client) throw error; stopClient(); result.cleanup = true; } }\n }\n const at = new Date().toISOString();\n const duration = tickStarted ? `${(Date.parse(at) - Date.parse(tickStarted)) / 1000}s` : \"UNKNOWN\";\n try {\n const { total, ops } = drainEgressCounters();\n const sorted = Object.entries(ops).sort(([, a], [, b]) => b.bytes - a.bytes);\n const summary = sorted.filter(([op]) => !op.includes(\":\")).slice(0, 12)\n .map(([op, counter]) => `${op}:${counter.calls}:${counter.bytes}`).join(\",\");\n const variants = sorted.filter(([op]) => op.includes(\":\")).slice(0, 6)\n .map(([op, counter]) => `${op}:${counter.calls}:${counter.bytes}`).join(\",\");\n log(`egress tick=${s.tick} total=${total} ops=${summary} variants=${variants}`);\n } catch { /* Optional metrics must never interrupt tick cleanup. */ }\n try { refreshTickReport(observedLoaded); log(`tick_finished tick=${s.tick} at=${at} outcome=${client && result.outcome === \"retry\" ? \"retry\" : outcome} duration=${duration} loaded=${loadedSha}`); }\n finally { clearTimeout(deadlineAlarm); tickDeadline = Number.POSITIVE_INFINITY; }\n }\n }\n }); } catch (error) {\n if (!client) throw error;\n stopClient(); result.cleanup = true;\n } finally {\n tickInstallation = previousInstallation;\n try { await installation.close(); }\n catch (error) {\n if (client) { stopClient(); result.cleanup = true; }\n else safeLog(`Zamknięcie instalacji nieudane: ${String(error)}`);\n }\n }\n if (client && result.outcome !== \"ok\") console.error(`Fabryka ${result.outcome === \"stop\" ? \"zatrzymana\" : \"retry\"}: ${result.reason}${result.cleanup ? \"; finalizacja niepotwierdzona — sprawdź stan i blokadę\" : \"\"}`);\n return client && result.outcome === \"stop\" ? 2 : code;\n}\n\nif (require.main === module && !([\"--opencode-runner\", \"--grok-runner\"].includes(process.argv[2] ?? \"\"))) {"
1704
1716
  },
1705
1717
  "refreshTickReport": {
@@ -1725,6 +1737,6 @@
1725
1737
  "status": 0,
1726
1738
  "signal": null,
1727
1739
  "stdout": "v24.3.0\n",
1728
- "stderr": "(node:24522) 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"
1740
+ "stderr": "(node:24448) ExperimentalWarning: SQLite is an experimental feature and might change at any time\n(Use `node --trace-warnings ...` to show where the warning was created)\n"
1729
1741
  }
1730
1742
  }