@astrosheep/keiyaku 4.6.32 → 4.6.33

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.
Files changed (199) hide show
  1. package/README.md +8 -6
  2. package/build/plugins/claude/skills/keiyaku-akuma/SKILL.md +13 -9
  3. package/build/plugins/claude/skills/keiyaku-babysit/SKILL.md +8 -6
  4. package/build/plugins/claude/skills/keiyaku-workflow/SKILL.md +2 -1
  5. package/build/plugins/codex/skills/keiyaku-akuma/SKILL.md +13 -9
  6. package/build/plugins/codex/skills/keiyaku-babysit/SKILL.md +8 -6
  7. package/build/plugins/codex/skills/keiyaku-workflow/SKILL.md +2 -1
  8. package/build/plugins/opencode/skills/keiyaku-akuma/SKILL.md +13 -9
  9. package/build/plugins/opencode/skills/keiyaku-babysit/SKILL.md +8 -6
  10. package/build/plugins/opencode/skills/keiyaku-workflow/SKILL.md +2 -1
  11. package/build/plugins/pi/README.md +55 -97
  12. package/build/plugins/pi/keiyaku.ts +2 -9
  13. package/build/skills/keiyaku-akuma/SKILL.md +13 -9
  14. package/build/skills/keiyaku-babysit/SKILL.md +8 -6
  15. package/build/skills/keiyaku-workflow/SKILL.md +2 -1
  16. package/build/src/akuma/akuma-instance.d.ts +11 -0
  17. package/build/src/akuma/akuma-instance.js +1 -2
  18. package/build/src/akuma/akuma-observe.js +73 -14
  19. package/build/src/akuma/akuma-selection-execution.d.ts +82 -7
  20. package/build/src/akuma/akuma-selection-execution.js +26 -27
  21. package/build/src/akuma/akuma-wait.d.ts +40 -1
  22. package/build/src/akuma/akuma-wait.js +58 -29
  23. package/build/src/akuma/akuma.d.ts +11 -0
  24. package/build/src/akuma/body.js +13 -18
  25. package/build/src/akuma/call-initial-tell.d.ts +0 -1
  26. package/build/src/akuma/call-initial-tell.js +0 -1
  27. package/build/src/akuma/heart/activity-schema.d.ts +16 -0
  28. package/build/src/akuma/heart/activity-schema.js +7 -0
  29. package/build/src/akuma/heart/index.d.ts +1 -1
  30. package/build/src/akuma/heart/index.js +9 -1
  31. package/build/src/akuma/heart/timeline.js +4 -4
  32. package/build/src/akuma/projection-read.d.ts +4 -2
  33. package/build/src/akuma/projection-read.js +21 -14
  34. package/build/src/akuma/projection.d.ts +94 -2
  35. package/build/src/akuma/projection.js +47 -47
  36. package/build/src/akuma/provider.d.ts +2 -2
  37. package/build/src/akuma/provider.js +27 -20
  38. package/build/src/akuma/providers/acp/core.js +2 -5
  39. package/build/src/akuma/providers/opencode-sdk/events.d.ts +2 -1
  40. package/build/src/akuma/providers/opencode-sdk/events.js +31 -1
  41. package/build/src/akuma/publication.js +3 -2
  42. package/build/src/akuma/selection-observation.d.ts +23 -0
  43. package/build/src/akuma/selection-observation.js +15 -4
  44. package/build/src/akuma/status-projection.d.ts +14 -1
  45. package/build/src/akuma/status-projection.js +40 -2
  46. package/build/src/akuma/turn-drive.js +21 -15
  47. package/build/src/body/amend.js +5 -17
  48. package/build/src/body/decode.js +11 -1
  49. package/build/src/body/envelope.d.ts +5 -1
  50. package/build/src/body/envelope.js +4 -2
  51. package/build/src/body/render.js +4 -6
  52. package/build/src/cli/commands/akuma-grammar.d.ts +3 -5
  53. package/build/src/cli/commands/akuma-grammar.js +22 -40
  54. package/build/src/cli/commands/akuma.d.ts +1 -2
  55. package/build/src/cli/commands/akuma.js +6 -58
  56. package/build/src/cli/commands/contract-grammar.d.ts +1 -0
  57. package/build/src/cli/commands/contract-grammar.js +7 -11
  58. package/build/src/cli/commands/contract-help.d.ts +3 -2
  59. package/build/src/cli/commands/contract-help.js +11 -5
  60. package/build/src/cli/commands/contract.js +3 -0
  61. package/build/src/cli/commands/debt-grammar.js +2 -4
  62. package/build/src/cli/parse.js +1 -4
  63. package/build/src/cli/render/akuma-activity.d.ts +3 -15
  64. package/build/src/cli/render/akuma-activity.js +19 -73
  65. package/build/src/cli/render/akuma.d.ts +5 -11
  66. package/build/src/cli/render/akuma.js +22 -30
  67. package/build/src/cli/render/catalog.js +1 -4
  68. package/build/src/cli/render/contract-history.js +2 -0
  69. package/build/src/cli/render/contract-observation.d.ts +2 -1
  70. package/build/src/cli/render/contract-observation.js +25 -1
  71. package/build/src/cli/render/contract-wait.d.ts +2 -2
  72. package/build/src/cli/render/contract-wait.js +13 -17
  73. package/build/src/cli/render/contract.js +12 -9
  74. package/build/src/cli/render/debt.js +1 -2
  75. package/build/src/cli/render/execution-progress.js +1 -3
  76. package/build/src/cli/render/kanshi-akuma.js +1 -2
  77. package/build/src/cli/render/kanshi.js +11 -17
  78. package/build/src/cli/render/receipt.d.ts +1 -1
  79. package/build/src/cli/render/receipt.js +33 -28
  80. package/build/src/cli/render/reconcile.js +2 -5
  81. package/build/src/cli/render/refusal.js +3 -6
  82. package/build/src/cli/render/terminal.d.ts +2 -4
  83. package/build/src/cli/render/terminal.js +10 -17
  84. package/build/src/cli/render/verbs.d.ts +1 -0
  85. package/build/src/cli/render/verbs.js +19 -17
  86. package/build/src/cli/runtime.js +3 -9
  87. package/build/src/core/facts/codec.js +7 -2
  88. package/build/src/core/facts/eligibility.d.ts +4 -4
  89. package/build/src/core/facts/eligibility.js +11 -0
  90. package/build/src/core/facts/fold.js +9 -5
  91. package/build/src/core/facts/gate.d.ts +5 -1
  92. package/build/src/core/facts/gate.js +14 -10
  93. package/build/src/core/facts/types.d.ts +5 -1
  94. package/build/src/core/facts/types.js +7 -0
  95. package/build/src/core/subject.d.ts +4 -1
  96. package/build/src/core/subject.js +10 -2
  97. package/build/src/core/verbs/amend.d.ts +15 -4
  98. package/build/src/core/verbs/amend.js +19 -9
  99. package/build/src/debt/index.d.ts +0 -1
  100. package/build/src/debt/index.js +6 -11
  101. package/build/src/debt/input.d.ts +2 -1
  102. package/build/src/debt/input.js +6 -4
  103. package/build/src/dispatch/index.d.ts +0 -17
  104. package/build/src/dispatch/index.js +1 -10
  105. package/build/src/git/identity.js +16 -45
  106. package/build/src/git/nuke.js +13 -23
  107. package/build/src/git/observe.d.ts +3 -0
  108. package/build/src/git/observe.js +25 -23
  109. package/build/src/git/process.js +11 -18
  110. package/build/src/git/read-observation.d.ts +5 -4
  111. package/build/src/git/repository.d.ts +2 -0
  112. package/build/src/git/repository.js +13 -1
  113. package/build/src/git/scratch.js +2 -14
  114. package/build/src/git/terminal-reconcile.js +1 -13
  115. package/build/src/index.d.ts +2 -0
  116. package/build/src/kanshi/index.d.ts +0 -1
  117. package/build/src/kanshi/index.js +0 -1
  118. package/build/src/kanshi/read.d.ts +21 -0
  119. package/build/src/kanshi/read.js +2 -1
  120. package/build/src/kanshi/report.d.ts +94 -0
  121. package/build/src/library/address.d.ts +12 -5
  122. package/build/src/library/address.js +18 -32
  123. package/build/src/library/akuma-creation.d.ts +39 -0
  124. package/build/src/library/akuma-creation.js +3 -9
  125. package/build/src/library/continuation.d.ts +10 -0
  126. package/build/src/library/contract-creation.js +10 -11
  127. package/build/src/library/contract-outcomes.d.ts +72 -1
  128. package/build/src/library/contract-outcomes.js +1 -0
  129. package/build/src/library/contract-types.d.ts +18 -0
  130. package/build/src/library/contract-types.js +2 -0
  131. package/build/src/library/contract-wait.d.ts +7 -0
  132. package/build/src/library/contract-wait.js +53 -49
  133. package/build/src/library/delivery.d.ts +25 -0
  134. package/build/src/library/input.d.ts +5 -23
  135. package/build/src/library/input.js +12 -7
  136. package/build/src/library/kei.js +39 -20
  137. package/build/src/library/keiyaku-classify.js +3 -3
  138. package/build/src/library/keiyaku-debt.js +1 -2
  139. package/build/src/library/keiyaku-identity.d.ts +3 -3
  140. package/build/src/library/keiyaku-identity.js +11 -6
  141. package/build/src/library/keiyaku-verbs.d.ts +456 -1362
  142. package/build/src/library/keiyaku-verbs.js +80 -92
  143. package/build/src/library/keiyaku-wait.d.ts +183 -0
  144. package/build/src/library/keiyaku-wait.js +213 -0
  145. package/build/src/library/keiyaku.d.ts +3 -1
  146. package/build/src/library/keiyaku.js +49 -73
  147. package/build/src/{mcp/output.d.ts → library/model-tools.d.ts} +227 -56
  148. package/build/src/library/model-tools.js +347 -0
  149. package/build/src/library/outcome.js +5 -6
  150. package/build/src/library/refusal.d.ts +25 -1
  151. package/build/src/library/refusal.js +4 -5
  152. package/build/src/library/selection.d.ts +12 -0
  153. package/build/src/library/selection.js +1 -2
  154. package/build/src/mcp/adapter.d.ts +0 -6
  155. package/build/src/mcp/adapter.js +10 -159
  156. package/build/src/mcp/description.d.ts +2 -0
  157. package/build/src/mcp/description.js +2 -0
  158. package/build/src/mcp/help.d.ts +1 -1
  159. package/build/src/mcp/help.js +6 -4
  160. package/build/src/pi/index.d.ts +3 -0
  161. package/build/src/pi/index.js +83 -0
  162. package/build/src/protocol/amend.d.ts +14 -3
  163. package/build/src/protocol/amend.js +113 -46
  164. package/build/src/protocol/bind.d.ts +1 -1
  165. package/build/src/protocol/bind.js +5 -16
  166. package/build/src/protocol/completion.d.ts +30 -0
  167. package/build/src/protocol/completion.js +8 -5
  168. package/build/src/protocol/deliver.js +7 -20
  169. package/build/src/protocol/delivery-preview.d.ts +5 -0
  170. package/build/src/protocol/execution-observation.d.ts +8 -0
  171. package/build/src/protocol/intent.d.ts +1 -0
  172. package/build/src/protocol/intent.js +4 -1
  173. package/build/src/protocol/operations.d.ts +54 -16
  174. package/build/src/protocol/operations.js +17 -31
  175. package/build/src/protocol/placement.js +7 -1
  176. package/build/src/protocol/progress.js +0 -6
  177. package/build/src/protocol/read/status.d.ts +40 -0
  178. package/build/src/protocol/read/status.js +7 -10
  179. package/build/src/protocol/reintegrate.js +2 -2
  180. package/build/src/protocol/result-leaves.d.ts +56 -8
  181. package/build/src/protocol/result-leaves.js +11 -2
  182. package/build/src/protocol/run.js +1 -4
  183. package/build/src/protocol/verify.d.ts +10 -0
  184. package/build/src/protocol/verify.js +1 -0
  185. package/build/src/runtime/proc/windows-launch.exe +0 -0
  186. package/build/src/settlement/settle.js +19 -68
  187. package/package.json +7 -3
  188. package/plugins/pi/README.md +55 -97
  189. package/plugins/pi/keiyaku.ts +2 -9
  190. package/skills/keiyaku-akuma/SKILL.md +13 -9
  191. package/skills/keiyaku-babysit/SKILL.md +8 -6
  192. package/skills/keiyaku-workflow/SKILL.md +2 -1
  193. package/build/plugins/pi/akuma-tools.ts +0 -283
  194. package/build/src/body/keys.d.ts +0 -4
  195. package/build/src/body/keys.js +0 -11
  196. package/build/src/kanshi/roster.d.ts +0 -2
  197. package/build/src/kanshi/roster.js +0 -2
  198. package/build/src/mcp/output.js +0 -193
  199. package/plugins/pi/akuma-tools.ts +0 -283
@@ -1,11 +1,13 @@
1
1
  import { verbs, type VerbName, type VerbInput, type VerbOutput, type VerbRunFor } from "./keiyaku-verbs.js";
2
2
  import type { BindOutcome } from "./contract-outcomes.js";
3
+ import { type AkumaCaller } from "../akuma/caller.js";
3
4
  export { KeiyakuArcDocumentError, KeiyakuUsageError } from "./keiyaku-coordinates.js";
4
5
  export type KeiyakuAt = Readonly<{
5
6
  cwd: string;
6
7
  environment: Readonly<Record<string, string | undefined>>;
7
8
  home?: string;
8
9
  repo?: string;
10
+ caller?: AkumaCaller;
9
11
  }>;
10
12
  export declare class Keiyaku {
11
13
  #private;
@@ -14,7 +16,7 @@ export declare class Keiyaku {
14
16
  static at(input: KeiyakuAt): Keiyaku;
15
17
  run<K extends VerbName>(name: K, input: VerbInput<K>, run?: VerbRunFor<K>): Promise<VerbOutput<K>>;
16
18
  bind(input: VerbInput<"bind">, run?: VerbRunFor<"bind">): Promise<BindOutcome>;
17
- amend(input: VerbInput<"amend">, run?: VerbRunFor<"amend">): Promise<VerbOutput<"amend">>;
19
+ amend(input?: VerbInput<"amend">, run?: VerbRunFor<"amend">): Promise<VerbOutput<"amend">>;
18
20
  arc(input: VerbInput<"arc">, run?: VerbRunFor<"arc">): Promise<VerbOutput<"arc">>;
19
21
  deliver(input?: VerbInput<"deliver">, run?: VerbRunFor<"deliver">): Promise<VerbOutput<"deliver">>;
20
22
  verify(input?: VerbInput<"verify">, run?: VerbRunFor<"verify">): Promise<VerbOutput<"verify">>;
@@ -8,6 +8,7 @@ import { World, WorldError } from "../world.js";
8
8
  import { Akuma } from "../akuma/akuma-instance.js";
9
9
  import { Kanshi } from "../kanshi/index.js";
10
10
  import { Akumas } from "./akumas.js";
11
+ import { waitInvocation } from "./keiyaku-wait.js";
11
12
  import { deliveryOwner } from "./keiyaku-attribution.js";
12
13
  import { akumaCallerFromEnvironment } from "./keiyaku-identity.js";
13
14
  import { contractId } from "../core/facts/types.js";
@@ -18,6 +19,7 @@ import { errorCategory } from "../errors.js";
18
19
  import { invocationCoordinates, KeiyakuArcDocumentError, KeiyakuUsageError } from "./keiyaku-coordinates.js";
19
20
  import { whoami } from "./keiyaku-identity.js";
20
21
  import { nukeKeiyaku } from "./nuke.js";
22
+ import { decodeAkumaCaller } from "../akuma/caller.js";
21
23
  import * as debt from "./keiyaku-debt.js";
22
24
  import { validateAkumaName } from "../identity/normalize.js";
23
25
  export { KeiyakuArcDocumentError, KeiyakuUsageError } from "./keiyaku-coordinates.js";
@@ -31,7 +33,8 @@ export class Keiyaku {
31
33
  static verbs = verbs;
32
34
  #input;
33
35
  constructor(input) {
34
- this.#input = { ...input, environment: { ...input.environment } };
36
+ const caller = decodeAkumaCaller(input.caller);
37
+ this.#input = { ...input, environment: { ...input.environment }, ...(caller === undefined ? {} : { caller }) };
35
38
  }
36
39
  static at(input) {
37
40
  if (typeof input?.cwd !== "string" || !isAbsolute(input.cwd))
@@ -141,26 +144,14 @@ export class Keiyaku {
141
144
  const signal = run?.signal === undefined ? {} : { signal: run.signal };
142
145
  const observe = run?.observe;
143
146
  switch (request.name) {
144
- case "spawn": {
145
- return this.#spawn({
146
- ...request.input,
147
- ...signal,
148
- ...(observe === undefined
149
- ? {}
150
- : {
151
- observe: {
152
- admitted: (tell, id, head) => notify({ kind: "admitted", tell, id, head }),
153
- observe: (observation) => notify({ kind: "live", observation }),
154
- },
155
- }),
156
- });
157
- }
147
+ case "spawn":
148
+ return this.#spawn({ ...request.input, ...signal });
158
149
  case "fork":
159
150
  return this.#fork(request.input);
160
151
  case "tell":
152
+ return this.#tell(request, signal);
161
153
  case "ask":
162
- return this.#tell({
163
- ...request.input,
154
+ return this.#tell(request, {
164
155
  ...signal,
165
156
  ...(observe === undefined
166
157
  ? {}
@@ -197,7 +188,7 @@ export class Keiyaku {
197
188
  // Generic output describes the wire form; the same execution retains the native handle.
198
189
  return this.run("bind", input, run);
199
190
  }
200
- amend(input, run) {
191
+ amend(input = {}, run) {
201
192
  return this.run("amend", input, run);
202
193
  }
203
194
  arc(input, run) {
@@ -390,7 +381,7 @@ export class Keiyaku {
390
381
  const id = await this.#resolve(library, input.contract, cwd);
391
382
  return await library.reconcile({ ...input, contract: id });
392
383
  }
393
- async #spawn({ prompt, wait, contract, workdir, alias, observe, ...input }) {
384
+ async #spawn({ prompt, contract, workdir, alias, ...input }) {
394
385
  const at = await this.#coordinates(contract === undefined ? "none" : "required");
395
386
  const cwd = workdir === undefined
396
387
  ? at.cwd
@@ -406,7 +397,6 @@ export class Keiyaku {
406
397
  const selected = contract === undefined ? undefined : Keis.of(at.repo).kei({ id: this.#fullId(Keis.of(at.repo), contract) });
407
398
  return await Akumas.of(world).spawn({
408
399
  ...input,
409
- ...(wait === undefined ? {} : { mode: "wait", timeoutMs: waitTimeout(wait) }),
410
400
  cwd,
411
401
  settings: configuration,
412
402
  ...(alias === undefined ? {} : { alias: alias }),
@@ -415,22 +405,10 @@ export class Keiyaku {
415
405
  ...(selected === undefined ? {} : { contract: selected }),
416
406
  ...(caller === undefined ? {} : { caller }),
417
407
  ...(initiator === undefined ? {} : { initiator }),
418
- ...(observe === undefined
419
- ? {}
420
- : {
421
- observe: {
422
- ...(observe.observe === undefined ? {} : { observe: observe.observe }),
423
- ...(observe.admitted === undefined
424
- ? {}
425
- : {
426
- admitted: (tell, id, head) => observe.admitted(tell, id, { ...head, cwd }),
427
- }),
428
- },
429
- }),
430
408
  });
431
409
  }
432
410
  #caller() {
433
- return akumaCallerFromEnvironment(this.#input.environment);
411
+ return akumaCallerFromEnvironment(this.#input.environment, this.#input.caller);
434
412
  }
435
413
  async #akumas(use = "optional") {
436
414
  const at = await this.#coordinates(use);
@@ -449,34 +427,41 @@ export class Keiyaku {
449
427
  ...(initiator === undefined ? {} : { initiator }),
450
428
  });
451
429
  }
452
- async #tell({ prompt, ...input }) {
430
+ async #tell(request, controls) {
453
431
  const { at, akumas } = await this.#akumas();
454
432
  const initiator = deliveryOwner(this.#input.environment);
455
- const native = {
456
- ...input,
457
- body: prompt,
433
+ const common = {
434
+ ...controls,
435
+ body: request.input.prompt,
458
436
  ...(at.repo === undefined ? {} : { repo: at.repo }),
459
437
  ...(initiator === undefined ? {} : { initiator }),
460
438
  };
461
- if ("schema" in native)
462
- return akumas.ask(native);
463
- const { wait, ...tell } = native;
464
- return akumas.tell({ ...tell, ...(wait === undefined ? {} : { wait: true, timeoutMs: waitTimeout(wait) }) });
439
+ if (request.name === "ask") {
440
+ const { prompt: _prompt, ...input } = request.input;
441
+ return akumas.ask({ ...input, ...common });
442
+ }
443
+ const { prompt: _prompt, ...input } = request.input;
444
+ return akumas.tell({ ...input, ...common });
465
445
  }
466
446
  async #kill(input) {
467
447
  const { at, akumas } = await this.#akumas();
468
448
  return await akumas.kill({ ...input, ...(at.repo === undefined ? {} : { repo: at.repo }) });
469
449
  }
470
- async #wait({ selectors, ...input }) {
471
- const contracts = selectors.filter((selector) => selector.startsWith("kei/"));
472
- if (contracts.length > 0) {
473
- const at = await this.#coordinates("required", true);
474
- if (at.repo === undefined)
475
- throw new KeiyakuUsageError("Contract wait requires a repository");
476
- return await Keis.of(at.repo).wait({ contracts, ...input });
477
- }
478
- const { at, akumas } = await this.#akumas();
479
- return await akumas.wait({ akuma: selectors, ...input, ...(at.repo === undefined ? {} : { repo: at.repo }) });
450
+ async #wait({ selectors, timeout, ...input }) {
451
+ const hasContracts = selectors.some((selector) => selector.startsWith("kei/"));
452
+ const contractOnly = selectors.every((selector) => selector.startsWith("kei/"));
453
+ const at = await this.#coordinates(hasContracts ? "required" : "optional", contractOnly);
454
+ if (hasContracts && at.repo === undefined)
455
+ throw new KeiyakuUsageError("Contract wait requires a repository");
456
+ if (!contractOnly && at.world === null)
457
+ throw new KeiyakuUsageError("Akuma wait requires a World");
458
+ return await waitInvocation({
459
+ selectors,
460
+ ...input,
461
+ ...(at.repo === undefined ? {} : { repo: at.repo }),
462
+ ...(at.world === null ? {} : { world: at.world }),
463
+ ...(timeout === undefined ? {} : { timeoutMs: waitTimeout(timeout) }),
464
+ });
480
465
  }
481
466
  async #history({ selector, ...input }) {
482
467
  if (selector.startsWith("kei/")) {
@@ -493,12 +478,9 @@ export class Keiyaku {
493
478
  }
494
479
  async #report(input) {
495
480
  await this.#coordinates("none");
496
- const environment = this.#input.environment;
497
- if (environment.KEIYAKU_ACTOR_ID === undefined || environment.KEIYAKU_ACTOR_WORLD === undefined)
498
- throw new KeiyakuUsageError("report requires explicit KEIYAKU_ACTOR_ID and KEIYAKU_ACTOR_WORLD");
499
481
  let caller;
500
482
  try {
501
- caller = await akumaCallerFromEnvironment(environment);
483
+ caller = await this.#caller();
502
484
  }
503
485
  catch (error) {
504
486
  if (error instanceof WorldError)
@@ -506,7 +488,9 @@ export class Keiyaku {
506
488
  throw error;
507
489
  }
508
490
  if (caller?.kind !== "akuma")
509
- throw new KeiyakuUsageError("report requires explicit Akuma identity");
491
+ throw new KeiyakuUsageError(this.#input.caller === undefined
492
+ ? "report requires explicit KEIYAKU_ACTOR_ID and KEIYAKU_ACTOR_WORLD"
493
+ : "report requires explicit Akuma identity");
510
494
  return Akuma.select(caller.world, caller.akumaId).report(input.text, input.signal === undefined ? {} : { signal: input.signal });
511
495
  }
512
496
  async #resolveLsCaller(mine) {
@@ -514,7 +498,7 @@ export class Keiyaku {
514
498
  return undefined;
515
499
  let caller;
516
500
  try {
517
- caller = await akumaCallerFromEnvironment(this.#input.environment);
501
+ caller = await this.#caller();
518
502
  }
519
503
  catch (error) {
520
504
  throw new KeiyakuUsageError(error instanceof Error ? error.message : String(error));
@@ -533,7 +517,7 @@ export class Keiyaku {
533
517
  if (input.selector === "debt" || input.selector === "debt/")
534
518
  return debt.debtLs(this.#input, {
535
519
  ...bound,
536
- ...("selection" in input && input.selection !== undefined ? { selection: input.selection } : {}),
520
+ ...(input.selection === undefined ? {} : { selection: input.selection }),
537
521
  });
538
522
  if (input.selector === "aku" || input.selector === "aku/") {
539
523
  const at = await this.#coordinates("none");
@@ -546,7 +530,7 @@ export class Keiyaku {
546
530
  const name = input.selector.split("/")[1];
547
531
  const akumaName = name === "*" ? undefined : validateAkumaName(name);
548
532
  const { at, akumas } = await this.#akumas();
549
- const caller = await this.#resolveLsCaller("mine" in input ? input.mine : undefined);
533
+ const caller = await this.#resolveLsCaller(input.mine);
550
534
  return akumas.list({
551
535
  ...bound,
552
536
  ...(akumaName === undefined ? {} : { akumaName }),
@@ -559,26 +543,18 @@ export class Keiyaku {
559
543
  if (at.repo === undefined)
560
544
  throw new KeiyakuUsageError("this command requires a resolved Repo");
561
545
  const repo = at.repo;
562
- let selected;
563
- if (input.paths !== undefined) {
564
- const [first, ...rest] = input.paths;
565
- if (first === undefined)
566
- throw new KeiyakuUsageError("Region query requires one or more path patterns");
567
- selected = { kind: "path", patterns: [first, ...rest] };
568
- }
569
- else {
570
- selected =
571
- input.contract === undefined
572
- ? { kind: "declarations" }
573
- : { kind: "contract", contract: await this.#resolve(Keis.of(repo), input.contract, at.cwd) };
574
- }
546
+ const selected = input.paths !== undefined
547
+ ? { kind: "path", patterns: input.paths }
548
+ : input.contract === undefined
549
+ ? { kind: "declarations" }
550
+ : { kind: "contract", contract: await this.#resolve(Keis.of(repo), input.contract, at.cwd) };
575
551
  const result = await Kanshi.of({ world: at.world, repo }).region(selected);
576
552
  if (result.kind === "absent")
577
553
  throw new Error("Region observation with a Repo cannot be absent");
578
554
  return result;
579
555
  }
580
556
  async #whoami() {
581
- return await whoami(await this.#coordinates("optional"), this.#input.environment);
557
+ return await whoami(await this.#coordinates("optional"), this.#input.environment, this.#input.caller);
582
558
  }
583
559
  async #settings() {
584
560
  const at = await this.#coordinates("none");
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
- import { type VerbName, type VerbOutput } from "../library/keiyaku-verbs.js";
2
+ import { type VerbName, type VerbOutput } from "./keiyaku-verbs.js";
3
3
  /** Transport declarations describe routing facts, independently of complete native answers. */
4
- export declare const mcpOutputSchemas: {
4
+ export declare const modelOutputSchemas: {
5
5
  readonly bind: z.ZodObject<{
6
6
  kind: z.ZodLiteral<"accepted">;
7
7
  contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").ContractId, string>>;
@@ -67,6 +67,11 @@ export declare const mcpOutputSchemas: {
67
67
  stale: "stale";
68
68
  }>;
69
69
  summary: z.ZodExactOptional<z.ZodString>;
70
+ reason: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
71
+ kind: z.ZodLiteral<"snapshot-changed">;
72
+ previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SnapshotId, string>>;
73
+ currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SnapshotId, string>>;
74
+ }, z.core.$strict>>>;
70
75
  }, z.core.$strict>>;
71
76
  }, z.core.$strict>]>>;
72
77
  continuation: z.ZodExactOptional<z.ZodObject<{
@@ -96,6 +101,11 @@ export declare const mcpOutputSchemas: {
96
101
  stale: "stale";
97
102
  }>;
98
103
  summary: z.ZodExactOptional<z.ZodString>;
104
+ reason: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
105
+ kind: z.ZodLiteral<"snapshot-changed">;
106
+ previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SnapshotId, string>>;
107
+ currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SnapshotId, string>>;
108
+ }, z.core.$strict>>>;
99
109
  }, z.core.$strict>>;
100
110
  }, z.core.$strict>, z.ZodObject<{
101
111
  kind: z.ZodLiteral<"physical-lag">;
@@ -104,14 +114,6 @@ export declare const mcpOutputSchemas: {
104
114
  }, z.core.$strict>>;
105
115
  }, z.core.$strict>;
106
116
  readonly spawn: z.ZodObject<{
107
- input: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
108
- kind: z.ZodLiteral<"answered">;
109
- answer: z.ZodString;
110
- }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
111
- kind: z.ZodLiteral<"unanswered">;
112
- }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
113
- kind: z.ZodLiteral<"deadline">;
114
- }, z.core.$strict>>]>>;
115
117
  kind: z.ZodLiteral<"spawned">;
116
118
  tellId: z.ZodExactOptional<z.ZodString>;
117
119
  akumaId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").AkumaId, string>>;
@@ -135,55 +137,56 @@ export declare const mcpOutputSchemas: {
135
137
  tellId: z.ZodString;
136
138
  akumaId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").AkumaId, string>>;
137
139
  }, z.core.$strict>]>;
138
- readonly wait: z.ZodUnion<readonly [z.ZodObject<{
139
- kind: z.ZodLiteral<"contract">;
140
- reason: z.ZodEnum<{
141
- deadline: "deadline";
142
- terminal: "terminal";
143
- changed: "changed";
144
- }>;
145
- contracts: z.ZodArray<z.ZodObject<{
146
- id: z.ZodString;
147
- changed: z.ZodExactOptional<z.ZodLiteral<true>>;
148
- terminal: z.ZodExactOptional<z.ZodEnum<{
149
- claimed: "claimed";
150
- abandoned: "abandoned";
151
- }>>;
152
- presence: z.ZodExactOptional<z.ZodLiteral<"unknown">>;
153
- }, z.core.$strict>>;
154
- }, z.core.$strict>, z.ZodReadonly<z.ZodObject<{
155
- kind: z.ZodLiteral<"akuma">;
140
+ readonly wait: z.ZodReadonly<z.ZodObject<{
141
+ kind: z.ZodLiteral<"wait">;
156
142
  reason: z.ZodEnum<{
157
143
  deadline: "deadline";
158
144
  completed: "completed";
159
145
  }>;
160
- results: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
161
- kind: z.ZodLiteral<"observed">;
162
- id: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").AkumaId, string>>;
163
- life: z.ZodEnum<{
164
- hung: "hung";
165
- untidy: "untidy";
166
- killed: "killed";
167
- running: "running";
168
- asleep: "asleep";
169
- stranded: "stranded";
170
- }>;
171
- pending: z.ZodExactOptional<z.ZodLiteral<true>>;
172
- outcome: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
173
- kind: z.ZodLiteral<"answered">;
174
- historyId: z.ZodTemplateLiteral<`turn/${number}`>;
175
- answer: z.ZodString;
176
- }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
177
- kind: z.ZodLiteral<"failed">;
178
- historyId: z.ZodTemplateLiteral<`turn/${number}`>;
179
- diagnostic: z.ZodString;
146
+ members: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
147
+ kind: z.ZodLiteral<"contract">;
148
+ observation: z.ZodReadonly<z.ZodObject<{
149
+ id: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").ContractId, string>>;
150
+ changed: z.ZodExactOptional<z.ZodLiteral<true>>;
151
+ terminal: z.ZodExactOptional<z.ZodEnum<{
152
+ claimed: "claimed";
153
+ abandoned: "abandoned";
154
+ }>>;
155
+ presence: z.ZodExactOptional<z.ZodLiteral<"unknown">>;
156
+ }, z.core.$strict>>;
157
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
158
+ kind: z.ZodLiteral<"akuma">;
159
+ observation: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
160
+ kind: z.ZodLiteral<"observed">;
161
+ id: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").AkumaId, string>>;
162
+ life: z.ZodEnum<{
163
+ hung: "hung";
164
+ untidy: "untidy";
165
+ killed: "killed";
166
+ running: "running";
167
+ asleep: "asleep";
168
+ stranded: "stranded";
169
+ }>;
170
+ pending: z.ZodExactOptional<z.ZodLiteral<true>>;
171
+ outcome: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
172
+ kind: z.ZodLiteral<"answered">;
173
+ historyId: z.ZodTemplateLiteral<`turn/${number}`>;
174
+ answer: z.ZodString;
175
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
176
+ kind: z.ZodLiteral<"failed">;
177
+ historyId: z.ZodTemplateLiteral<`turn/${number}`>;
178
+ diagnostic: z.ZodString;
179
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
180
+ kind: z.ZodLiteral<"canceled">;
181
+ historyId: z.ZodTemplateLiteral<`turn/${number}`>;
182
+ }, z.core.$strict>>]>>;
183
+ strandedReason: z.ZodExactOptional<z.ZodLiteral<"resume-unsupported">>;
180
184
  }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
181
- kind: z.ZodLiteral<"canceled">;
182
- historyId: z.ZodTemplateLiteral<`turn/${number}`>;
183
- }, z.core.$strict>>]>>;
184
- strandedReason: z.ZodExactOptional<z.ZodLiteral<"resume-unsupported">>;
185
- }, z.core.$strict>>>>;
186
- }, z.core.$strict>>]>;
185
+ kind: z.ZodLiteral<"unknown">;
186
+ id: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").AkumaId, string>>;
187
+ }, z.core.$strict>>]>;
188
+ }, z.core.$strict>>]>>>;
189
+ }, z.core.$strict>>;
187
190
  readonly status: z.ZodUnion<readonly [z.ZodObject<{
188
191
  kind: z.ZodLiteral<"contract">;
189
192
  id: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").ContractId, string>>;
@@ -214,6 +217,16 @@ export declare const mcpOutputSchemas: {
214
217
  kind: z.ZodLiteral<"missing">;
215
218
  }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
216
219
  kind: z.ZodLiteral<"stale">;
220
+ reason: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
221
+ kind: z.ZodLiteral<"candidate-content-changed">;
222
+ target: z.ZodExactOptional<z.ZodString>;
223
+ previousChange: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").ChangeId, string>>;
224
+ currentChange: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").ChangeId, string>>;
225
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
226
+ kind: z.ZodLiteral<"snapshot-changed">;
227
+ previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SnapshotId, string>>;
228
+ currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../index.js").SnapshotId, string>>;
229
+ }, z.core.$strict>>]>>;
217
230
  }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
218
231
  kind: z.ZodLiteral<"attested">;
219
232
  verdict: z.ZodEnum<{
@@ -296,6 +309,17 @@ export declare const mcpOutputSchemas: {
296
309
  text: z.ZodString;
297
310
  clipped: z.ZodExactOptional<z.ZodLiteral<true>>;
298
311
  }, z.core.$strict>>>;
312
+ awaiting: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
313
+ kind: z.ZodLiteral<"permission">;
314
+ id: z.ZodNumber;
315
+ requests: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
316
+ id: z.ZodString;
317
+ action: z.ZodString;
318
+ resources: z.ZodReadonly<z.ZodArray<z.ZodString>>;
319
+ tool: z.ZodExactOptional<z.ZodString>;
320
+ }, z.core.$strict>>>>;
321
+ clipped: z.ZodExactOptional<z.ZodLiteral<true>>;
322
+ }, z.core.$strict>>>;
299
323
  }, z.core.$strict>;
300
324
  }, z.core.$strict>]>;
301
325
  readonly ls: z.ZodUnion<readonly [z.ZodObject<{
@@ -379,7 +403,154 @@ export declare const mcpOutputSchemas: {
379
403
  warning: z.ZodExactOptional<z.ZodString>;
380
404
  }, z.core.$strict>>;
381
405
  };
382
- type McpOutputName = keyof typeof mcpOutputSchemas;
406
+ type ModelOutputName = keyof typeof modelOutputSchemas;
383
407
  /** Called only after the invocation owner has classified a normal completion. No parsing or I/O. */
384
- export declare function projectMcpOutput(name: McpOutputName, value: VerbOutput<VerbName>): unknown;
408
+ export declare function projectModelOutput(name: ModelOutputName, value: VerbOutput<VerbName>): unknown;
409
+ export declare function hasOutputSchema(name: string): name is keyof typeof modelOutputSchemas;
410
+ export declare function modelCoordinates(name: VerbName): z.ZodObject<{
411
+ cwd: z.ZodExactOptional<z.ZodString>;
412
+ repo: z.ZodExactOptional<z.ZodString>;
413
+ } | {
414
+ cwd: z.ZodExactOptional<z.ZodString>;
415
+ }, z.core.$strict>;
416
+ /** Compose at the declaration boundary so every strict business alternative stays strict. */
417
+ export declare function modelInputSchema(input: z.core.$ZodType, worldOnly?: boolean): z.ZodType;
418
+ type JsonSchema = z.core.JSONSchema.BaseSchema;
419
+ /** Advertise shared structure; native verb validation owns cross-field admission. */
420
+ export declare function normalizeModelSchema(schema: JsonSchema, input?: boolean): JsonSchema;
421
+ export declare function describeModelTools(): {
422
+ annotations: {
423
+ readOnlyHint: boolean;
424
+ destructiveHint: boolean;
425
+ };
426
+ outputSchema?: {
427
+ type: string;
428
+ $schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
429
+ $id?: string;
430
+ $anchor?: string;
431
+ $ref?: string;
432
+ $dynamicRef?: string;
433
+ $dynamicAnchor?: string;
434
+ $vocabulary?: Record<string, boolean>;
435
+ $comment?: string;
436
+ $defs?: Record<string, z.core.JSONSchema.JSONSchema>;
437
+ additionalItems?: z.core.JSONSchema._JSONSchema;
438
+ unevaluatedItems?: z.core.JSONSchema._JSONSchema;
439
+ prefixItems?: z.core.JSONSchema._JSONSchema[];
440
+ items?: z.core.JSONSchema._JSONSchema | z.core.JSONSchema._JSONSchema[];
441
+ contains?: z.core.JSONSchema._JSONSchema;
442
+ additionalProperties?: z.core.JSONSchema._JSONSchema;
443
+ unevaluatedProperties?: z.core.JSONSchema._JSONSchema;
444
+ properties?: Record<string, z.core.JSONSchema._JSONSchema>;
445
+ patternProperties?: Record<string, z.core.JSONSchema._JSONSchema>;
446
+ dependentSchemas?: Record<string, z.core.JSONSchema._JSONSchema>;
447
+ propertyNames?: z.core.JSONSchema._JSONSchema;
448
+ if?: z.core.JSONSchema._JSONSchema;
449
+ then?: z.core.JSONSchema._JSONSchema;
450
+ else?: z.core.JSONSchema._JSONSchema;
451
+ allOf?: z.core.JSONSchema.JSONSchema[];
452
+ anyOf?: z.core.JSONSchema.JSONSchema[];
453
+ oneOf?: z.core.JSONSchema.JSONSchema[];
454
+ not?: z.core.JSONSchema._JSONSchema;
455
+ multipleOf?: number;
456
+ maximum?: number;
457
+ exclusiveMaximum?: number | boolean;
458
+ minimum?: number;
459
+ exclusiveMinimum?: number | boolean;
460
+ maxLength?: number;
461
+ minLength?: number;
462
+ pattern?: string;
463
+ maxItems?: number;
464
+ minItems?: number;
465
+ uniqueItems?: boolean;
466
+ maxContains?: number;
467
+ minContains?: number;
468
+ maxProperties?: number;
469
+ minProperties?: number;
470
+ required?: string[];
471
+ dependentRequired?: Record<string, string[]>;
472
+ enum?: Array<string | number | boolean | null>;
473
+ const?: string | number | boolean | null;
474
+ id?: string;
475
+ title?: string;
476
+ description?: string;
477
+ default?: unknown;
478
+ deprecated?: boolean;
479
+ readOnly?: boolean;
480
+ writeOnly?: boolean;
481
+ nullable?: boolean;
482
+ examples?: unknown[];
483
+ format?: string;
484
+ contentMediaType?: string;
485
+ contentEncoding?: string;
486
+ contentSchema?: z.core.JSONSchema.JSONSchema;
487
+ _prefault?: unknown;
488
+ };
489
+ verb: VerbName;
490
+ name: string;
491
+ description: "Bind a Contract: one tracked delivery with fixed terms. Complete Markdown terms in (or forkOf to copy another's); a kei/... id and its own worktree out. target is where the work lands once accepted; gates is what must pass first. Runs no checks." | "Rewrite an active Contract's terms, target, prerequisites (after), or gates; naming none reports the Contract unchanged and writes nothing. markdown is H2 edits such as ## Replace: Objective, not a new Contract. Returns only what changed." | "Open the next chapter of an active Contract: a # Title and optional notes telling its Akumas what is being done now. The terms stay as bound." | "Hand in the work from a Contract's worktree. It lands on the target once prerequisites are accepted and every gate passes (reviewed: a satisfied review; verified: passing verify results); until then it waits, delivered. Uncommitted changes need includeDirty. dryRun: true only looks. Runs no checks and records no review." | "Run the Contract's ## Verification checks now. A failed check is a verdict, not a tool error. Results are bound to the exact integration tree they ran on: any change to the work or the target makes them stale. They count only under the verified gate, and may land an already-delivered Contract." | "Record your verdict on a Contract's diff: satisfied or unsatisfied, with reasons. Valid before or after deliver. Bound to the diff content: a pure rebase keeps it, a changed diff makes it stale. Satisfied may land an already-delivered Contract." | "Break an active Contract. Its work never lands; its worktree is reclaimed. No undo." | "Read a Contract in full: terms, current chapter, and working instructions. Or read one Debt in full with its prerequisites. Omit id to read the Contract whose worktree you stand in." | "Finish what an interrupted or lagging call left half done: Git, worktree, and hook steps, for one Contract or all. Safe to repeat; never undoes a recorded result." | "Birth a new Akuma from akumaName (ls aku/), with an optional first order. Returns birth and admission, not an answer; observe separately with wait. contract only marks whose work it is; give it a workdir and the terms yourself. A failed result with an akumaId still left an Akuma alive." | "Birth a copy of an Akuma as it stood at an answered turn (turn/<n> from history), to try another path. The copy wakes idle; give it orders with tell. Needs provider support." | "Give an Akuma new orders: steers its current work or wakes it. Returns admission, not an answer. Observe work separately with wait, or use ask for a structured answer." | "Demand a structured answer from an Akuma: a prompt and a JSON Schema in, parsed JSON out. The answer is not checked against the schema; non-JSON is a failure. Not every provider honors schemas." | "Kill an Akuma's current execution. Nothing is erased: history and queued orders remain, and tell or ask wakes it." | "Wait for Contracts to change or close and Akumas to finish their current work, together or separately. Any/all applies to the whole selection. Already satisfied members count immediately. A timeout ends observation, never the work." | "Look back: a Contract's journal, or an Akuma's recent activity. For an Akuma, last returns its latest answer and id opens one item such as turn/<n> or report/<n>." | "From inside a running Akuma, leave a progress note for whoever holds it and keep working. Only works when this server runs inside that Akuma." | "Who this server acts as: caller or Akuma identity, its Contract link and turn initiator, and which Contract worktree cwd stands in. Read from the environment; not authentication." | "Observe resolved Settings." | "Reset the selected World with explicit confirmation." | "Watch everything at once: active Contracts, Debts, and Akumas. Use status, show, or history to look closer." | "Where one Contract stands (stage, gates, prerequisites, worktree) or what one Akuma is doing (state, current work, changed files). Exact kei/... or aku/<name>/<id> only; no aliases." | "List ids of one kind: active Contracts (kei/), open Debts (debt/), akumaName values you can birth (aku/), or existing Akumas (aku/*)." | "Before parallel work: which files active Contracts claim to change and where those claims overlap. Advisory only; no locks, no conflict prediction." | "Record open work still owed, with optional body, priority and prerequisite needs. Returns its debt/... id." | "Create a Debt from Markdown." | "Replace a Debt's text, priority or prerequisites, or set its disposition to open, done or drop. Any state may be reopened or changed; omitted fields are preserved and empty body, note or needs clears them." | "Diagnose Debt authority and prerequisites.";
492
+ inputSchema: {
493
+ type: string;
494
+ $schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
495
+ $id?: string;
496
+ $anchor?: string;
497
+ $ref?: string;
498
+ $dynamicRef?: string;
499
+ $dynamicAnchor?: string;
500
+ $vocabulary?: Record<string, boolean>;
501
+ $comment?: string;
502
+ $defs?: Record<string, z.core.JSONSchema.JSONSchema>;
503
+ additionalItems?: z.core.JSONSchema._JSONSchema;
504
+ unevaluatedItems?: z.core.JSONSchema._JSONSchema;
505
+ prefixItems?: z.core.JSONSchema._JSONSchema[];
506
+ items?: z.core.JSONSchema._JSONSchema | z.core.JSONSchema._JSONSchema[];
507
+ contains?: z.core.JSONSchema._JSONSchema;
508
+ additionalProperties?: z.core.JSONSchema._JSONSchema;
509
+ unevaluatedProperties?: z.core.JSONSchema._JSONSchema;
510
+ properties?: Record<string, z.core.JSONSchema._JSONSchema>;
511
+ patternProperties?: Record<string, z.core.JSONSchema._JSONSchema>;
512
+ dependentSchemas?: Record<string, z.core.JSONSchema._JSONSchema>;
513
+ propertyNames?: z.core.JSONSchema._JSONSchema;
514
+ if?: z.core.JSONSchema._JSONSchema;
515
+ then?: z.core.JSONSchema._JSONSchema;
516
+ else?: z.core.JSONSchema._JSONSchema;
517
+ allOf?: z.core.JSONSchema.JSONSchema[];
518
+ anyOf?: z.core.JSONSchema.JSONSchema[];
519
+ oneOf?: z.core.JSONSchema.JSONSchema[];
520
+ not?: z.core.JSONSchema._JSONSchema;
521
+ multipleOf?: number;
522
+ maximum?: number;
523
+ exclusiveMaximum?: number | boolean;
524
+ minimum?: number;
525
+ exclusiveMinimum?: number | boolean;
526
+ maxLength?: number;
527
+ minLength?: number;
528
+ pattern?: string;
529
+ maxItems?: number;
530
+ minItems?: number;
531
+ uniqueItems?: boolean;
532
+ maxContains?: number;
533
+ minContains?: number;
534
+ maxProperties?: number;
535
+ minProperties?: number;
536
+ required?: string[];
537
+ dependentRequired?: Record<string, string[]>;
538
+ enum?: Array<string | number | boolean | null>;
539
+ const?: string | number | boolean | null;
540
+ id?: string;
541
+ title?: string;
542
+ description?: string;
543
+ default?: unknown;
544
+ deprecated?: boolean;
545
+ readOnly?: boolean;
546
+ writeOnly?: boolean;
547
+ nullable?: boolean;
548
+ examples?: unknown[];
549
+ format?: string;
550
+ contentMediaType?: string;
551
+ contentEncoding?: string;
552
+ contentSchema?: z.core.JSONSchema.JSONSchema;
553
+ _prefault?: unknown;
554
+ };
555
+ }[];
385
556
  export {};