robisie 0.4.5 → 0.4.6

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,12 @@
1
1
  # Historia zmian klienta / Client changelog
2
2
 
3
+ ## [0.4.6](https://github.com/chuppa12/robisie-app/compare/client-v0.4.5...client-v0.4.6) (2026-11-10)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **client:** jawny opt-in engine.receiver dla hosta + odbiorca związany z repo zadań (Z2-B) ([1126dc8](https://github.com/chuppa12/robisie-app/commit/1126dc83b77055ffdb0d11be7ce9480f234d16a2))
9
+
3
10
  ## [0.4.5](https://github.com/chuppa12/robisie-app/compare/client-v0.4.4...client-v0.4.5) (2026-11-10)
4
11
 
5
12
 
@@ -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.5";
3
+ export declare const PACKAGE_VERSION = "0.4.6";
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.5"; // x-release-please-version
3
+ export const PACKAGE_VERSION = "0.4.6"; // 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":"87710b7f93b8f7f00169b876395bb0d375f2e801","dirty":false}
1
+ {"schema":1,"sha":"7aa6e1873263a6af709b503f9e3877ce20b6fdb4","dirty":false}
@@ -1688,6 +1688,6 @@
1688
1688
  "status": 0,
1689
1689
  "signal": null,
1690
1690
  "stdout": "v24.3.0\n",
1691
- "stderr": "(node:14895) 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: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"
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.5";
37631
+ PACKAGE_VERSION = "0.4.6";
37632
37632
  SUPPORTED_CONTRACT_MAJOR = 1;
37633
37633
  DEFAULT_ORIGIN = "https://robisie.app";
37634
37634
  MCP_SERVER_NAME = "robisie";
@@ -37813,6 +37813,20 @@ function textList(value, path34, label2) {
37813
37813
  if (!Array.isArray(value) || !value.length) fail(label2, `${path34}: wymagana niepusta tablica tekst\xF3w`);
37814
37814
  return value.map((item, index2) => text2(item, `${path34}[${index2}]`, label2));
37815
37815
  }
37816
+ function parseReceiver(raw, requiredChecks, label2) {
37817
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) fail(label2, "engine.receiver: wymagany kompletny obiekt {githubRepo, verifyCheck, deployWorkflow}");
37818
+ const value = raw;
37819
+ const keys2 = ["githubRepo", "verifyCheck", "deployWorkflow"];
37820
+ if (Object.keys(value).some((key) => !keys2.includes(key))) fail(label2, "engine.receiver: nieznane pole");
37821
+ const githubRepo = text2(value.githubRepo, "engine.receiver.githubRepo", label2);
37822
+ const verifyCheck = text2(value.verifyCheck, "engine.receiver.verifyCheck", label2);
37823
+ const deployWorkflow = text2(value.deployWorkflow, "engine.receiver.deployWorkflow", label2);
37824
+ if (!/^[\w-]+\/[\w.-]+$/.test(githubRepo) || githubRepo.split("/").some((part) => part === "." || part === "..")) fail(label2, "engine.receiver.githubRepo: wymagane owner/repo bez URL i credentials");
37825
+ if (!/^\.github\/workflows\/[\w.-]+\.ya?ml$/.test(deployWorkflow) || deployWorkflow.includes("..")) fail(label2, "engine.receiver.deployWorkflow: wymagana \u015Bcie\u017Cka .github/workflows/*.yml|yaml bez ..");
37826
+ if (/[\x00-\x1f\x7f-\x9f]/.test(verifyCheck)) fail(label2, "engine.receiver.verifyCheck: znaki steruj\u0105ce niedozwolone");
37827
+ if (!requiredChecks.includes(verifyCheck)) fail(label2, "engine.receiver.verifyCheck: musi nale\u017Ce\u0107 do engine.requiredChecks");
37828
+ return { githubRepo, verifyCheck, deployWorkflow };
37829
+ }
37816
37830
  function parseEngineConfig(raw, configPath) {
37817
37831
  const config2 = parseConfig(raw, (0, import_node_path2.resolve)(configPath));
37818
37832
  const label2 = config2.configPath;
@@ -37828,7 +37842,14 @@ function parseEngineConfig(raw, configPath) {
37828
37842
  const build = textList(commands.build, "engine.commands.build", label2);
37829
37843
  const requiredChecks = value.delivery === "local" && Array.isArray(value.requiredChecks) && !value.requiredChecks.length ? [] : textList(value.requiredChecks, "engine.requiredChecks", label2);
37830
37844
  if (value.delivery !== "delivered" && value.delivery !== "pr" && value.delivery !== "local") fail(label2, "engine.delivery: wymagane delivered|pr|local");
37831
- return { ...config2, engine: { repo, branch, commands: { test, lint, build }, requiredChecks, delivery: value.delivery } };
37845
+ return { ...config2, engine: {
37846
+ repo,
37847
+ branch,
37848
+ commands: { test, lint, build },
37849
+ requiredChecks,
37850
+ delivery: value.delivery,
37851
+ ...Object.hasOwn(value, "receiver") ? { receiver: parseReceiver(value.receiver, requiredChecks, label2) } : {}
37852
+ } };
37832
37853
  }
37833
37854
  function loadEngineConfig(path34) {
37834
37855
  const { raw, configPath } = readConfig(path34);
@@ -55151,6 +55172,11 @@ function fromFile(file3, origin) {
55151
55172
  const mode = raw.engine.mode;
55152
55173
  if (mode !== void 0 && mode !== "client" && mode !== "host") throw new Error(`${configPath}: engine.mode: gdy podane \u2014 client|host`);
55153
55174
  const { engine } = config2;
55175
+ if (engine.receiver) {
55176
+ if (mode !== "host" || engine.delivery === "local") throw new Error(`${configPath}: engine.receiver: wymagany jawny mode:host i delivery:pr|delivered`);
55177
+ if (engine.branch !== BRANCH || Object.keys(RECEIVER).some((key) => engine.receiver[key] !== RECEIVER[key]))
55178
+ throw new Error(`${configPath}: engine.receiver: nieobs\u0142ugiwany odbiorca lub ga\u0142\u0105\u017A hosta`);
55179
+ }
55154
55180
  const hostStateDir2 = import_node_path15.default.join(config2.stateDir, "host");
55155
55181
  return {
55156
55182
  source: "file",
@@ -55163,7 +55189,7 @@ function fromFile(file3, origin) {
55163
55189
  tracks: config2.tracks.map((track) => ({ ...track })),
55164
55190
  defaultTrackLabel: DEFAULT_TRACK_LABEL,
55165
55191
  requiredChecks: [...engine.requiredChecks],
55166
- receiver: null,
55192
+ receiver: engine.receiver ? { ...engine.receiver } : null,
55167
55193
  delivery: engine.delivery,
55168
55194
  commands: { test: [...engine.commands.test], lint: [...engine.commands.lint], build: [...engine.commands.build] },
55169
55195
  stateDir: config2.stateDir,
@@ -75627,6 +75653,12 @@ function fetchCi(sha5, repo) {
75627
75653
  try {
75628
75654
  if (!shaValid(sha5)) throw new Error("niepoprawny SHA");
75629
75655
  const gh = receiverGithub(), target = gh.branch;
75656
+ if (currentEngine().source === "file") {
75657
+ const remote = (0, import_node_child_process7.execFileSync)("git", ["remote", "get-url", engineRemote()], { cwd: repo, encoding: "utf8", timeout: 1e4, stdio: "pipe" }).trim();
75658
+ const match = remote.match(/^(?:git@github\.com:|https:\/\/github\.com\/|ssh:\/\/git@github\.com\/)([\w.-]+)\/([\w.-]+?)(?:\.git)?\/?$/);
75659
+ if (!match || [match[1], match[2]].join("/").toLowerCase() !== gh.githubRepo.toLowerCase())
75660
+ throw new Error("repozytorium GitHub remote nie zgadza si\u0119 z engine.receiver.githubRepo");
75661
+ }
75630
75662
  const api = (endpoint) => {
75631
75663
  const pages2 = JSON.parse((0, import_node_child_process7.execFileSync)(
75632
75664
  "gh",
@@ -76220,7 +76252,7 @@ async function activePhase(o) {
76220
76252
  if (!policy.enabled || o.dry) return;
76221
76253
  const stopped = (0, import_node_fs18.existsSync)(import_node_path21.default.join(hostStateDir2, "receiver-stop"));
76222
76254
  if (stopped) o.log("odbiorca: STOP (receiver-stop)");
76223
- const loaded = readLoadedSha(o.repo);
76255
+ const loaded = readLoadedSha(ENGINE_CODE_REPO);
76224
76256
  if (!/^[a-f0-9]{40}$/i.test(loaded)) return;
76225
76257
  const q = await Promise.resolve().then(() => (init_q_planner(), q_planner_exports));
76226
76258
  const cards = await q.listTasks(o.uid, o.projectId, {
@@ -324319,7 +324351,7 @@ async function main2() {
324319
324351
  if (clientStopped()) return 2;
324320
324352
  await localAcceptancePhase(s, uid, DRY2, processCards.get(s), installation);
324321
324353
  } else {
324322
- await receiverPhase({ uid, projectId: projectId2, repo: REPO, dir: DIR, dry: DRY2, log: log2, snapshot: processCards.get(s) });
324354
+ await receiverPhase({ uid, projectId: projectId2, repo: TASK_REPO, dir: DIR, dry: DRY2, log: log2, snapshot: processCards.get(s) });
324323
324355
  await testerPhase(s, uid, projectId2, DRY2, loadedSha, processCards.get(s));
324324
324356
  }
324325
324357
  if (decisionCards) {
@@ -57,6 +57,12 @@ export interface EngineConfig extends InstanceConfig {
57
57
  requiredChecks: string[];
58
58
  /** `local` = wynik zostaje w repo docelowym (bez PR i bez dostarczenia); sam odczyt nic nie uruchamia. */
59
59
  delivery: 'delivered' | 'pr' | 'local';
60
+ /** Jawny opt-in odbiorcy hosta; brak zachowuje dotychczasową odmowę. */
61
+ receiver?: {
62
+ githubRepo: string;
63
+ verifyCheck: string;
64
+ deployWorkflow: string;
65
+ };
60
66
  };
61
67
  }
62
68
  export declare const CONFIG_FILE = "robisie.config.json";
@@ -113,6 +113,26 @@ function textList(value, path, label) {
113
113
  fail(label, `${path}: wymagana niepusta tablica tekstów`);
114
114
  return value.map((item, index) => text(item, `${path}[${index}]`, label));
115
115
  }
116
+ function parseReceiver(raw, requiredChecks, label) {
117
+ if (!raw || typeof raw !== 'object' || Array.isArray(raw))
118
+ fail(label, 'engine.receiver: wymagany kompletny obiekt {githubRepo, verifyCheck, deployWorkflow}');
119
+ const value = raw;
120
+ const keys = ['githubRepo', 'verifyCheck', 'deployWorkflow'];
121
+ if (Object.keys(value).some(key => !keys.includes(key)))
122
+ fail(label, 'engine.receiver: nieznane pole');
123
+ const githubRepo = text(value.githubRepo, 'engine.receiver.githubRepo', label);
124
+ const verifyCheck = text(value.verifyCheck, 'engine.receiver.verifyCheck', label);
125
+ const deployWorkflow = text(value.deployWorkflow, 'engine.receiver.deployWorkflow', label);
126
+ if (!/^[\w-]+\/[\w.-]+$/.test(githubRepo) || githubRepo.split('/').some(part => part === '.' || part === '..'))
127
+ fail(label, 'engine.receiver.githubRepo: wymagane owner/repo bez URL i credentials');
128
+ if (!/^\.github\/workflows\/[\w.-]+\.ya?ml$/.test(deployWorkflow) || deployWorkflow.includes('..'))
129
+ fail(label, 'engine.receiver.deployWorkflow: wymagana ścieżka .github/workflows/*.yml|yaml bez ..');
130
+ if (/[\x00-\x1f\x7f-\x9f]/.test(verifyCheck))
131
+ fail(label, 'engine.receiver.verifyCheck: znaki sterujące niedozwolone');
132
+ if (!requiredChecks.includes(verifyCheck))
133
+ fail(label, 'engine.receiver.verifyCheck: musi należeć do engine.requiredChecks');
134
+ return { githubRepo, verifyCheck, deployWorkflow };
135
+ }
116
136
  export function parseEngineConfig(raw, configPath) {
117
137
  const config = parseConfig(raw, resolve(configPath));
118
138
  const label = config.configPath;
@@ -131,7 +151,8 @@ export function parseEngineConfig(raw, configPath) {
131
151
  const requiredChecks = value.delivery === 'local' && Array.isArray(value.requiredChecks) && !value.requiredChecks.length ? [] : textList(value.requiredChecks, 'engine.requiredChecks', label);
132
152
  if (value.delivery !== 'delivered' && value.delivery !== 'pr' && value.delivery !== 'local')
133
153
  fail(label, 'engine.delivery: wymagane delivered|pr|local');
134
- return { ...config, engine: { repo, branch, commands: { test, lint, build }, requiredChecks, delivery: value.delivery } };
154
+ return { ...config, engine: { repo, branch, commands: { test, lint, build }, requiredChecks, delivery: value.delivery,
155
+ ...(Object.hasOwn(value, 'receiver') ? { receiver: parseReceiver(value.receiver, requiredChecks, label) } : {}) } };
135
156
  }
136
157
  export function loadEngineConfig(path) {
137
158
  const { raw, configPath } = readConfig(path);
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.5 \u2014 plik zarz\u0105dzany przez `npx robisie`; `npx robisie uninstall` go usunie -->";
20
+ export declare const MANAGED_LINE = "<!-- robisie:managed 0.4.6 \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;
@@ -55,6 +55,7 @@ od `roleProviders` instalatora dla ról `ceo`, `builder`, `quality`.
55
55
  "advisor": { "name": "Latarnia", "forms": ["Latarnia", "Latarni"] }
56
56
  },
57
57
  "engine": {
58
+ "mode": "host",
58
59
  "repo": "../repo with spaces",
59
60
  "branch": "main",
60
61
  "commands": {
@@ -62,13 +63,38 @@ od `roleProviders` instalatora dla ról `ceo`, `builder`, `quality`.
62
63
  "lint": ["npm", "run", "lint"],
63
64
  "build": ["npm", "run", "build:check"]
64
65
  },
65
- "requiredChecks": ["Test", "Lint", "Build"],
66
- "delivery": "pr"
66
+ "requiredChecks": ["Verify (lint + build:check)", "Lint", "Build"],
67
+ "delivery": "pr",
68
+ "receiver": {
69
+ "githubRepo": "chuppa12/robisie-app",
70
+ "verifyCheck": "Verify (lint + build:check)",
71
+ "deployWorkflow": ".github/workflows/deploy.yml"
72
+ }
67
73
  }
68
74
  }
69
75
  ```
70
76
  <!-- engine-config:json:end -->
71
77
 
78
+ ## Jawny odbiorca hosta
79
+
80
+ Przykład powyżej zawiera opcjonalny `engine.receiver` dla hosta Robisie.
81
+ Dla zwykłej instalacji usuń ten blok; jego brak zachowuje `receiver: null`.
82
+ Host bez pliku konfiguracji nadal korzysta z dotychczasowych ustawień.
83
+ Blok wymaga jawnego `engine.mode: "host"` i `delivery: "pr"` lub `"delivered"`.
84
+ Tryb `client` i dostawa `local` z tym blokiem kończą się błędem resolvera.
85
+ Obsługiwany jest wyłącznie pokazany odbiorca Robisie oraz gałąź `main`;
86
+ inne repo, check, workflow lub gałąź są jawnie nieobsługiwane.
87
+ Parser wymaga wszystkich trzech niepustych pól i odrzuca nieznane klucze.
88
+ `githubRepo` to samo `owner/repo`, bez URL i danych uwierzytelniających.
89
+ `deployWorkflow` to `.github/workflows/*.yml|yaml`, bez `..` i podkatalogów.
90
+ `verifyCheck` nie może zawierać znaków sterujących i musi być w `requiredChecks`.
91
+ Przed odczytem CI odbiorca sprawdza GitHub remote repozytorium `engine.repo`;
92
+ rozjazd, brak dostępu lub remote poza GitHub daje BRAK-DOWODU przed `gh`.
93
+ Ancestry i GitHub korzystają z repo zadań, a loaded z tożsamości kodu silnika
94
+ (w paczce: `engine/build-id.json`); HEAD repo zadań nie zastępuje loaded.
95
+ Ten blok wybiera źródło dowodu CI. Model, dostawca i niezależność odbiorcy
96
+ nadal podlegają osobnej polityce hosta. Odczyt konfiguracji niczego nie wdraża.
97
+
72
98
  ## Odczytaj plik
73
99
 
74
100
  W katalogu, w którym dostępna jest paczka `robisie` w `node_modules`, zapisz
package/docs/README.en.md CHANGED
@@ -1,4 +1,4 @@
1
- # robisie — from account to accepted card (package 0.4.5) <!-- x-release-please-version -->
1
+ # robisie — from account to accepted card (package 0.4.6) <!-- 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
 
package/docs/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # robisie — od konta do odebranej karty (paczka 0.4.5) <!-- x-release-please-version -->
1
+ # robisie — od konta do odebranej karty (paczka 0.4.6) <!-- 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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robisie",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
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",