robisie 0.5.12 → 0.5.13
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 +7 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/engine/build-id.json +1 -1
- package/dist/engine/bundle-report.json +1 -1
- package/dist/engine/tick.cjs +68 -12
- package/dist/roles.d.ts +1 -1
- package/docs/README.en.md +1 -1
- package/docs/README.md +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Historia zmian klienta / Client changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.13](https://github.com/chuppa12/robisie-app/compare/client-v0.5.12...client-v0.5.13) (2026-11-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Factory Cards
|
|
7
|
+
|
|
8
|
+
* praca workera task-mwdpff5f-n4t36g (auto-commit) ([c83e7ac](https://github.com/chuppa12/robisie-app/commit/c83e7ac3a9c95b1d7633f2b81a5bfd95da39af5e))
|
|
9
|
+
|
|
3
10
|
## [0.5.12](https://github.com/chuppa12/robisie-app/compare/client-v0.5.11...client-v0.5.12) (2026-11-12)
|
|
4
11
|
|
|
5
12
|
|
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.13";
|
|
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.13"; // 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":"
|
|
1
|
+
{"schema":1,"sha":"ba6d0a6f7b9d6018513b87a67bc79181fe968d7a","dirty":false}
|
|
@@ -1688,6 +1688,6 @@
|
|
|
1688
1688
|
"status": 0,
|
|
1689
1689
|
"signal": null,
|
|
1690
1690
|
"stdout": "v24.3.0\n",
|
|
1691
|
-
"stderr": "(node:
|
|
1691
|
+
"stderr": "(node:16045) 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
|
}
|
package/dist/engine/tick.cjs
CHANGED
|
@@ -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.5.
|
|
37631
|
+
PACKAGE_VERSION = "0.5.13";
|
|
37632
37632
|
SUPPORTED_CONTRACT_MAJOR = 1;
|
|
37633
37633
|
DEFAULT_ORIGIN = "https://robisie.app";
|
|
37634
37634
|
MCP_SERVER_NAME = "robisie";
|
|
@@ -77492,7 +77492,9 @@ function localReceiverInput(ctx, card, readAt = (/* @__PURE__ */ new Date()).toI
|
|
|
77492
77492
|
...localUsageEvidence(ctx.evidenceDir, card, contract, readAt),
|
|
77493
77493
|
readAt
|
|
77494
77494
|
};
|
|
77495
|
-
|
|
77495
|
+
const budget = deliveryBudget(card, tester.delivery);
|
|
77496
|
+
const refusal = previousRefusal(import_node_path26.default.join(ctx.tester.delivery.stateDir, "receiver-jobs", "local"), card, tester.delivery);
|
|
77497
|
+
return structuredClone({ card, prepared: { ...prepared, budget, ...refusal ? { refusal } : {} } });
|
|
77496
77498
|
} catch (error48) {
|
|
77497
77499
|
return structuredClone({ card, reason: failure2(error48) });
|
|
77498
77500
|
}
|
|
@@ -77548,10 +77550,31 @@ function localReceiverInvocation(response) {
|
|
|
77548
77550
|
if (invocation.exit !== 0 || !(0, import_node_util6.isDeepStrictEqual)(Object.keys(record10(invocation.modelUsage)), [model]) || !at2.safeParse(invocation.startedAt).success || !at2.safeParse(invocation.finishedAt).success || !Array.isArray(invocation.command)) throw new Error("Brak rzeczywistego wywo\u0142ania Groka");
|
|
77549
77551
|
return invocation;
|
|
77550
77552
|
}
|
|
77553
|
+
function deliveryBudget(card, delivery) {
|
|
77554
|
+
const raw = record10(card.details?.local_receiver).budget;
|
|
77555
|
+
const empty = { delivery: hash6(delivery), count: 0, lastAt: null };
|
|
77556
|
+
if (raw === void 0 || raw === null || raw === "") return empty;
|
|
77557
|
+
const budget = budgetSchema.parse(raw);
|
|
77558
|
+
if (budget.count === 0 !== (budget.lastAt === null)) throw new Error("Nieczytelny bud\u017Cet receivera");
|
|
77559
|
+
return budget.delivery === empty.delivery ? budget : empty;
|
|
77560
|
+
}
|
|
77561
|
+
function previousRefusal(dir, card, delivery) {
|
|
77562
|
+
const previous = record10(card.details?.local_receiver), ref = previous.ref;
|
|
77563
|
+
if (previous.outcome !== "STOP" || typeof ref !== "string" || import_node_path26.default.dirname(ref) !== dir || !external_exports.uuid().safeParse(import_node_path26.default.basename(ref, ".json")).success) return;
|
|
77564
|
+
try {
|
|
77565
|
+
const c = readJson2(ref);
|
|
77566
|
+
if (!c || c.outcome !== "STOP" || c.id !== import_node_path26.default.basename(ref, ".json") || c.archive !== ref || c.input.card.id !== card.id || !("prepared" in c.input) || !(0, import_node_util6.isDeepStrictEqual)(c.input.prepared.tester.delivery, delivery) || c.packetHash !== hash6(c.input) || !(0, import_node_util6.isDeepStrictEqual)(c.patch.local_receiver, previous)) return;
|
|
77567
|
+
localReceiverInvocation(c.response);
|
|
77568
|
+
const results = validateLocalReceiver(record10(c.response).output, c.input);
|
|
77569
|
+
if (results.some((r) => r.verdict !== "PASS")) return failure2(new Error(results.map((r) => `${r.index}: ${r.verdict}: ${r.reason}`).join("; ")));
|
|
77570
|
+
} catch {
|
|
77571
|
+
}
|
|
77572
|
+
}
|
|
77551
77573
|
function completion(dir, claim, response, timestamp3, stop = "") {
|
|
77552
77574
|
const input = claim.input, p = "prepared" in input ? input.prepared : void 0;
|
|
77553
77575
|
const archive = import_node_path26.default.join(dir, `${claim.id}.json`);
|
|
77554
|
-
let
|
|
77576
|
+
let valid = false;
|
|
77577
|
+
let outcome = "STOP", reason = p?.refusal || stop || ("reason" in input ? input.reason : ""), patch = {};
|
|
77555
77578
|
try {
|
|
77556
77579
|
if (!reason && p) {
|
|
77557
77580
|
if (p.events.length < p.contract.min) {
|
|
@@ -77560,6 +77583,7 @@ function completion(dir, claim, response, timestamp3, stop = "") {
|
|
|
77560
77583
|
} else {
|
|
77561
77584
|
const raw = record10(response), invocation = localReceiverInvocation(response), model = text6.parse(invocation.actualModel);
|
|
77562
77585
|
const results = validateLocalReceiver(raw.output, input);
|
|
77586
|
+
valid = true;
|
|
77563
77587
|
if (results.some((r) => r.verdict !== "PASS")) throw new Error(results.map((r) => `${r.index}: ${r.verdict}: ${r.reason}`).join("; "));
|
|
77564
77588
|
const used = new Set(results.flatMap((r) => r.eventIds)), events = p.events.filter((e) => used.has(e.id));
|
|
77565
77589
|
const refs = events.map((e) => `${archive}#/input/prepared/events/${p.events.indexOf(e)}`).join(", ");
|
|
@@ -77600,14 +77624,28 @@ function completion(dir, claim, response, timestamp3, stop = "") {
|
|
|
77600
77624
|
} catch (error48) {
|
|
77601
77625
|
reason = failure2(error48);
|
|
77602
77626
|
}
|
|
77627
|
+
let state = {};
|
|
77628
|
+
const priorBudget = record10(input.card.details?.local_receiver).budget;
|
|
77629
|
+
if (!p && priorBudget !== void 0 && priorBudget !== null && priorBudget !== "") state = { budget: budgetSchema.parse(priorBudget), blocked: true };
|
|
77630
|
+
if (p?.budget) {
|
|
77631
|
+
const attempted = !p.refusal && !record10(response).preparationError && p.events.length >= p.contract.min;
|
|
77632
|
+
const budget = { ...p.budget, count: p.budget.count + Number(attempted), lastAt: attempted ? timestamp3 : p.budget.lastAt };
|
|
77633
|
+
const noVerdict = attempted && outcome === "STOP" && !valid;
|
|
77634
|
+
const blocked = outcome === "STOP" && (!noVerdict || budget.count >= 3);
|
|
77635
|
+
const nextAt = budget.lastAt && new Date(Date.parse(budget.lastAt) + 30 * 6e4).toISOString();
|
|
77636
|
+
if (noVerdict) reason = `${reason}; zadanie ${budget.count}/3; ${blocked ? "sprawdzaj\u0105cy niedost\u0119pny / nie odda\u0142 czytelnej oceny" : `najwcze\u015Bniej ${nextAt}`}`;
|
|
77637
|
+
state = { budget, blocked, ...nextAt ? { nextAt } : {} };
|
|
77638
|
+
}
|
|
77603
77639
|
patch.local_receiver = {
|
|
77604
77640
|
outcome,
|
|
77605
77641
|
reason,
|
|
77606
77642
|
at: timestamp3,
|
|
77607
77643
|
ref: archive,
|
|
77608
77644
|
packet_hash: claim.packetHash,
|
|
77645
|
+
...state,
|
|
77609
77646
|
...p && outcome === "WAIT" ? { count: p.events.length, deadline: p.contract.deadline, trigger: "new-event-or-deadline" } : {}
|
|
77610
77647
|
};
|
|
77648
|
+
if (p?.refusal) patch.local_receiver = input.card.details.local_receiver;
|
|
77611
77649
|
return {
|
|
77612
77650
|
version: 1,
|
|
77613
77651
|
id: claim.id,
|
|
@@ -77618,7 +77656,8 @@ function completion(dir, claim, response, timestamp3, stop = "") {
|
|
|
77618
77656
|
reason,
|
|
77619
77657
|
patch: external_exports.record(external_exports.string(), external_exports.json()).parse(patch),
|
|
77620
77658
|
response: json5(response),
|
|
77621
|
-
archive
|
|
77659
|
+
archive,
|
|
77660
|
+
...p?.budget ? { stop } : {}
|
|
77622
77661
|
};
|
|
77623
77662
|
}
|
|
77624
77663
|
function localReceiverPatch(c, fresh) {
|
|
@@ -77628,7 +77667,7 @@ function localReceiverPatch(c, fresh) {
|
|
|
77628
77667
|
delete d.bench_obligation;
|
|
77629
77668
|
return { ...card, details: d };
|
|
77630
77669
|
};
|
|
77631
|
-
const target = { ...c.input.card, status: c.outcome === "STOP" ? "blocked" : "in_review", details: { ...c.input.card.details, ...c.patch } };
|
|
77670
|
+
const target = { ...c.input.card, status: c.outcome === "STOP" && record10(c.patch.local_receiver).blocked !== false ? "blocked" : "in_review", details: { ...c.input.card.details, ...c.patch } };
|
|
77632
77671
|
const identity = (card, transition2 = false) => {
|
|
77633
77672
|
const v = { ...source(card) };
|
|
77634
77673
|
delete v.updatedAt;
|
|
@@ -77638,7 +77677,7 @@ function localReceiverPatch(c, fresh) {
|
|
|
77638
77677
|
}
|
|
77639
77678
|
return v;
|
|
77640
77679
|
};
|
|
77641
|
-
const transition = target.status
|
|
77680
|
+
const transition = c.outcome === "STOP" && target.status === fresh.status;
|
|
77642
77681
|
if (!(0, import_node_util6.isDeepStrictEqual)(identity(fresh), identity(c.input.card)) && !(0, import_node_util6.isDeepStrictEqual)(identity(fresh, transition), identity(target, transition))) throw new Error("Konflikt zamro\u017Conej karty receivera");
|
|
77643
77682
|
const patch = {
|
|
77644
77683
|
id: fresh.id,
|
|
@@ -77697,6 +77736,8 @@ function claimFor(dir) {
|
|
|
77697
77736
|
if ("prepared" in c.input) {
|
|
77698
77737
|
const p = c.input.prepared;
|
|
77699
77738
|
localTesterContract(c.input.card, p.tester);
|
|
77739
|
+
if (p.budget !== void 0 && !(0, import_node_util6.isDeepStrictEqual)(budgetSchema.parse(p.budget), deliveryBudget(c.input.card, p.tester.delivery)))
|
|
77740
|
+
throw new Error("Zmieniony bud\u017Cet receivera");
|
|
77700
77741
|
if (!(0, import_node_util6.isDeepStrictEqual)(p.contract, localEffectCheck(c.input.card)) || !(0, import_node_util6.isDeepStrictEqual)(p.authors, authors(c.input.card)) || !(0, import_node_util6.isDeepStrictEqual)(p.pair, record10(c.input.card.details?.maszynista).clientPair) || digest4(p.report) !== p.reportSha256 || [new Set(p.events.map((e) => e.id)), new Set(p.events.map((e) => e.operation)), new Set(p.events.map((e) => e.sha256))].some((s) => s.size !== p.events.length) || p.events.some((e) => digest4(e.bytes) !== e.sha256 || e.sha !== p.tester.delivery.sha || Date.parse(at2.parse(e.at)) <= Date.parse(String(record10(c.input.card.details?.landed).at)) || Date.parse(e.at) > Math.min(Date.parse(at2.parse(p.readAt)), Date.parse(p.contract.deadline)))) throw new Error("Zmieniony pakiet dowod\xF3w");
|
|
77701
77742
|
} else text6.parse(c.input.reason);
|
|
77702
77743
|
return c;
|
|
@@ -77733,7 +77774,7 @@ function readLocalReceiverJob(dir) {
|
|
|
77733
77774
|
}
|
|
77734
77775
|
if (raw !== void 0) {
|
|
77735
77776
|
const r = raw;
|
|
77736
|
-
const expected = completion(dir, claim, r.response, at2.parse(r.at), r.outcome === "STOP" ? r.reason : "");
|
|
77777
|
+
const expected = completion(dir, claim, r.response, at2.parse(r.at), r.stop ?? (r.outcome === "STOP" ? r.reason : ""));
|
|
77737
77778
|
if (!(0, import_node_util6.isDeepStrictEqual)(r, expected)) {
|
|
77738
77779
|
atomic2(import_node_path26.default.join(dir, `${claim.id}-invalid.json`), raw);
|
|
77739
77780
|
return failed(dir, "Zmieniony completion receivera");
|
|
@@ -77815,7 +77856,7 @@ async function startLocalReceiverJob(dir, input) {
|
|
|
77815
77856
|
throw error48;
|
|
77816
77857
|
}
|
|
77817
77858
|
try {
|
|
77818
|
-
if ("reason" in input || input.prepared.events.length < input.prepared.contract.min) save3(dir, completion(dir, claim, null, (/* @__PURE__ */ new Date()).toISOString()));
|
|
77859
|
+
if ("reason" in input || input.prepared.refusal || input.prepared.events.length < input.prepared.contract.min) save3(dir, completion(dir, claim, null, (/* @__PURE__ */ new Date()).toISOString()));
|
|
77819
77860
|
else {
|
|
77820
77861
|
const { launchLocalReceiver: launchLocalReceiver2 } = await Promise.resolve().then(() => (init_receiver_job(), receiver_job_exports));
|
|
77821
77862
|
await launchLocalReceiver2(dir);
|
|
@@ -77846,10 +77887,17 @@ function runLocalReceiverJob(dir, run) {
|
|
|
77846
77887
|
let response = null, stop = "";
|
|
77847
77888
|
try {
|
|
77848
77889
|
if ("prepared" in claim.input) {
|
|
77849
|
-
const p = claim.input.prepared
|
|
77850
|
-
|
|
77890
|
+
const p = claim.input.prepared;
|
|
77891
|
+
try {
|
|
77892
|
+
const loaded = loadClientPair(process.env.ROBISIE_ENGINE_CONFIG);
|
|
77893
|
+
if (!(0, import_node_util6.isDeepStrictEqual)(loaded, { selection: p.pair.selection, config: p.pair.config })) throw new Error("Zmieniona konfiguracja pary");
|
|
77894
|
+
} catch (error48) {
|
|
77895
|
+
response = { preparationError: failure2(error48) };
|
|
77896
|
+
throw error48;
|
|
77897
|
+
}
|
|
77851
77898
|
if (p.events.length >= p.contract.min) {
|
|
77852
|
-
|
|
77899
|
+
const slot = [p.tester.delivery, p.budget?.count ?? 0];
|
|
77900
|
+
exclusive(import_node_path26.default.join(dir, `${hash6(slot)}.job.json`), { id: claim.id, packetHash: claim.packetHash });
|
|
77853
77901
|
response = run(claim.input, dir);
|
|
77854
77902
|
localReceiverInvocation(response);
|
|
77855
77903
|
let repair;
|
|
@@ -77891,6 +77939,9 @@ function localUsageEvidence(root, card, c, readAt) {
|
|
|
77891
77939
|
}
|
|
77892
77940
|
function localReceiverWaitUnchanged(ctx, card, readAt = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
77893
77941
|
const previous = record10(card.details?.local_receiver);
|
|
77942
|
+
const tester = localTesterInput(ctx.tester, card), budget = deliveryBudget(card, tester.delivery);
|
|
77943
|
+
if (previous.budget && record10(previous.budget).delivery !== budget.delivery) return false;
|
|
77944
|
+
if (previous.budget && budget.delivery === hash6(tester.delivery) && previous.outcome === "STOP" && previous.blocked === false && budget.lastAt && Date.parse(at2.parse(readAt)) < Date.parse(budget.lastAt) + 30 * 6e4) return true;
|
|
77894
77945
|
if (previous.outcome !== "WAIT") return false;
|
|
77895
77946
|
try {
|
|
77896
77947
|
if (Date.parse(at2.parse(readAt)) >= Date.parse(at2.parse(previous.deadline))) return false;
|
|
@@ -77899,7 +77950,7 @@ function localReceiverWaitUnchanged(ctx, card, readAt = (/* @__PURE__ */ new Dat
|
|
|
77899
77950
|
return false;
|
|
77900
77951
|
}
|
|
77901
77952
|
}
|
|
77902
|
-
var import_node_crypto14, import_node_fs23, import_node_path26, import_node_util6, text6, at2, contractSchema, record10, digest4, json5, hash6, failure2, receiverPrograms, receiverEfforts, answerSchema, repairInstruction;
|
|
77953
|
+
var import_node_crypto14, import_node_fs23, import_node_path26, import_node_util6, text6, at2, contractSchema, budgetSchema, record10, digest4, json5, hash6, failure2, receiverPrograms, receiverEfforts, answerSchema, repairInstruction;
|
|
77903
77954
|
var init_local_receiver = __esm({
|
|
77904
77955
|
"maszynista/local-receiver.ts"() {
|
|
77905
77956
|
"use strict";
|
|
@@ -77920,6 +77971,11 @@ var init_local_receiver = __esm({
|
|
|
77920
77971
|
min: external_exports.number().int().min(3),
|
|
77921
77972
|
deadline: at2
|
|
77922
77973
|
});
|
|
77974
|
+
budgetSchema = external_exports.strictObject({
|
|
77975
|
+
delivery: external_exports.string().regex(/^[a-f0-9]{64}$/),
|
|
77976
|
+
count: external_exports.number().int().nonnegative(),
|
|
77977
|
+
lastAt: at2.nullable()
|
|
77978
|
+
});
|
|
77923
77979
|
record10 = (v) => v !== null && typeof v === "object" && !Array.isArray(v) ? v : {};
|
|
77924
77980
|
digest4 = (v) => (0, import_node_crypto14.createHash)("sha256").update(v).digest("hex");
|
|
77925
77981
|
json5 = (v) => external_exports.json().parse(v);
|
package/dist/roles.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface Role {
|
|
|
17
17
|
export declare function rolesDir(): string;
|
|
18
18
|
export declare function parseRole(file: Role["file"], text: string): Role;
|
|
19
19
|
export declare function loadRoles(dir?: string): Role[];
|
|
20
|
-
export declare const MANAGED_LINE = "<!-- robisie:managed 0.5.
|
|
20
|
+
export declare const MANAGED_LINE = "<!-- robisie:managed 0.5.13 \u2014 plik zarz\u0105dzany przez `npx robisie`; `npx robisie uninstall` go usunie -->";
|
|
21
21
|
export type AgentFlavor = "claude" | "codex" | "opencode";
|
|
22
22
|
/** How the operator starts the Builder for one card in its own session (the card id is not a secret). */
|
|
23
23
|
export declare function builderStartCommand(flavor: AgentFlavor, codexRolePath?: string): string;
|
package/docs/README.en.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# robisie — from account to accepted card (package 0.5.
|
|
1
|
+
# robisie — from account to accepted card (package 0.5.13) <!-- 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.5.
|
|
1
|
+
# robisie — od konta do odebranej karty (paczka 0.5.13) <!-- 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