@vincemakes/kiso-core 0.13.0 → 0.14.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.
@@ -1036,7 +1036,7 @@ async function runLedgered(call, registry, hooks, ctx, signal, push) {
1036
1036
  // observes ctx.signal, but the gate itself must not invoke it after
1037
1037
  // a cancel.
1038
1038
  result = signal?.aborted
1039
- ? { content: "aborted before execution", isError: true, errorKind: "fatal" }
1039
+ ? { content: "aborted before execution", isError: true, errorKind: "precondition" }
1040
1040
  : await tool.execute(call.input, ctx);
1041
1041
  }
1042
1042
  catch (err) {
@@ -1054,8 +1054,10 @@ async function runLedgered(call, registry, hooks, ctx, signal, push) {
1054
1054
  // receipt below, losslessly — a crash-window repair of the tool_result
1055
1055
  // reproduces the normal path). Idempotent failures carry no note; the
1056
1056
  // MCP bridge maps tools without declaring idempotency, so unknown
1057
- // idempotency = the note applies (honest).
1058
- if (result.isError && tool.idempotent !== true) {
1057
+ // idempotency = the note applies (honest). WR-1-F1: a PRECONDITION
1058
+ // refusal is work refused BEFORE it starts — by the kind's own
1059
+ // contract nothing ran, so the note would be a false statement there.
1060
+ if (result.isError && result.errorKind !== "precondition" && tool.idempotent !== true) {
1059
1061
  result = {
1060
1062
  ...result,
1061
1063
  content: `${result.content}\n[non-idempotent tool failed — its side effects may have partially applied; verify before retrying]`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-core",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "kiso (foundation) core — protocol, event log, loop, hooks, modes, permissions, compaction, delivery truth. The 2,000-line kernel at the bottom of the kiso framework.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -33,7 +33,7 @@
33
33
  "openai"
34
34
  ],
35
35
  "devDependencies": {
36
- "@vincemakes/kiso-evals": "0.13.0",
36
+ "@vincemakes/kiso-evals": "0.14.0",
37
37
  "@types/node": "^26.1.2",
38
38
  "typescript": "^5.7.2",
39
39
  "vitest": "^3.0.0"