@astrosheep/keiyaku 4.5.11 → 4.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.
Files changed (272) hide show
  1. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-workflow/SKILL.md +135 -377
  2. package/build/integrations/pi/keiyaku.ts +11 -116
  3. package/build/src/akuma/akuma-errors.d.ts +1 -0
  4. package/build/src/akuma/akuma-errors.js +1 -0
  5. package/build/src/akuma/akuma-handle.d.ts +1 -0
  6. package/build/src/akuma/akuma-handle.js +6 -7
  7. package/build/src/akuma/akuma-product.d.ts +6 -8
  8. package/build/src/akuma/akuma-product.js +141 -57
  9. package/build/src/akuma/akuma.d.ts +5 -7
  10. package/build/src/akuma/akuma.js +1 -22
  11. package/build/src/akuma/archetype.d.ts +6 -5
  12. package/build/src/akuma/archetype.js +137 -38
  13. package/build/src/akuma/body.d.ts +5 -5
  14. package/build/src/akuma/body.js +223 -63
  15. package/build/src/akuma/call-input.d.ts +4 -0
  16. package/build/src/akuma/call-input.js +21 -0
  17. package/build/src/akuma/call-request.d.ts +5 -8
  18. package/build/src/akuma/call-request.js +28 -73
  19. package/build/src/akuma/fleet-execution.d.ts +26 -0
  20. package/build/src/akuma/fleet-execution.js +109 -0
  21. package/build/src/{library/fleet-result.d.ts → akuma/fleet-observation.d.ts} +13 -57
  22. package/build/src/{library/fleet-result.js → akuma/fleet-observation.js} +4 -25
  23. package/build/src/akuma/fleet-request.d.ts +122 -0
  24. package/build/src/akuma/fleet-request.js +168 -0
  25. package/build/src/akuma/heart/facts.d.ts +23 -0
  26. package/build/src/akuma/heart/facts.js +7 -0
  27. package/build/src/akuma/heart/index.d.ts +43 -4
  28. package/build/src/akuma/heart/index.js +107 -7
  29. package/build/src/akuma/heart/request-authority.d.ts +2 -0
  30. package/build/src/akuma/heart/request-authority.js +28 -3
  31. package/build/src/akuma/heart/request-rows.d.ts +2 -0
  32. package/build/src/akuma/heart/request-rows.js +24 -5
  33. package/build/src/akuma/heart/rows.d.ts +4 -1
  34. package/build/src/akuma/heart/rows.js +46 -19
  35. package/build/src/akuma/heart/schema.d.ts +1 -1
  36. package/build/src/akuma/heart/schema.js +28 -6
  37. package/build/src/akuma/heart/storage.d.ts +1 -1
  38. package/build/src/akuma/heart/tells.d.ts +29 -0
  39. package/build/src/akuma/heart/tells.js +136 -5
  40. package/build/src/akuma/heart/timeline.js +9 -3
  41. package/build/src/akuma/projection-read.js +36 -3
  42. package/build/src/akuma/projection.js +3 -4
  43. package/build/src/akuma/provider.d.ts +4 -0
  44. package/build/src/akuma/provider.js +56 -3
  45. package/build/src/akuma/providers/claude/index.js +3 -0
  46. package/build/src/akuma/providers/codex-app-server/index.js +14 -12
  47. package/build/src/akuma/providers/pi/index.js +7 -1
  48. package/build/src/akuma/publication.js +65 -49
  49. package/build/src/akuma/request-lifecycle.d.ts +5 -4
  50. package/build/src/akuma/request-lifecycle.js +29 -16
  51. package/build/src/akuma/request-rendezvous.d.ts +15 -12
  52. package/build/src/akuma/request-rendezvous.js +80 -51
  53. package/build/src/akuma/request-serve.d.ts +1 -2
  54. package/build/src/akuma/request-serve.js +94 -39
  55. package/build/src/akuma/request-wire.d.ts +57 -26
  56. package/build/src/akuma/request-wire.js +64 -25
  57. package/build/src/akuma/turn-drive.d.ts +5 -4
  58. package/build/src/akuma/turn-drive.js +27 -11
  59. package/build/src/akuma-body.d.ts +4 -6
  60. package/build/src/akuma-body.js +19 -17
  61. package/build/src/bounded-list.d.ts +8 -0
  62. package/build/src/bounded-list.js +14 -0
  63. package/build/src/cli/accepted.d.ts +1 -1
  64. package/build/src/cli/accepted.js +1 -0
  65. package/build/src/cli/commands/akuma-invoke.js +1 -25
  66. package/build/src/cli/commands/contract-help.d.ts +5 -2
  67. package/build/src/cli/commands/contract-help.js +62 -12
  68. package/build/src/cli/commands/contract-invoke.d.ts +5 -0
  69. package/build/src/cli/commands/contract-invoke.js +26 -1
  70. package/build/src/cli/commands/contract.js +50 -18
  71. package/build/src/cli/commands/task-invoke.js +10 -2
  72. package/build/src/cli/commands/task-query.js +3 -4
  73. package/build/src/cli/coordinates.d.ts +13 -0
  74. package/build/src/cli/coordinates.js +38 -24
  75. package/build/src/cli/draft.d.ts +1 -1
  76. package/build/src/cli/invoke.js +14 -1
  77. package/build/src/cli/render/akuma-activity.d.ts +0 -1
  78. package/build/src/cli/render/akuma-activity.js +5 -38
  79. package/build/src/cli/render/akuma.js +4 -1
  80. package/build/src/cli/render/audit.js +4 -1
  81. package/build/src/cli/render/catalog.js +13 -39
  82. package/build/src/cli/render/contract.js +4 -14
  83. package/build/src/cli/render/kanshi-akuma.js +3 -8
  84. package/build/src/cli/render/kanshi.js +8 -34
  85. package/build/src/cli/render/nuke.js +7 -3
  86. package/build/src/cli/render/receipt.d.ts +1 -0
  87. package/build/src/cli/render/receipt.js +8 -0
  88. package/build/src/cli/render/refusal.js +4 -3
  89. package/build/src/cli/render/task.js +4 -37
  90. package/build/src/cli/render/terminal.d.ts +2 -6
  91. package/build/src/cli/render/terminal.js +4 -9
  92. package/build/src/cli/result.d.ts +2 -1
  93. package/build/src/contract-guidance.js +13 -3
  94. package/build/src/contract-worktree.d.ts +1 -0
  95. package/build/src/contract-worktree.js +26 -2
  96. package/build/src/core/facts/codec.d.ts +2 -1
  97. package/build/src/core/facts/codec.js +3 -0
  98. package/build/src/core/facts/gate.d.ts +2 -1
  99. package/build/src/core/facts/gate.js +63 -0
  100. package/build/src/core/verbs/abandon.d.ts +2 -1
  101. package/build/src/core/verbs/abandon.js +16 -0
  102. package/build/src/core/verbs/amend.d.ts +2 -1
  103. package/build/src/core/verbs/amend.js +20 -0
  104. package/build/src/core/verbs/arc.d.ts +2 -1
  105. package/build/src/core/verbs/arc.js +16 -0
  106. package/build/src/core/verbs/attestation.d.ts +2 -1
  107. package/build/src/core/verbs/attestation.js +16 -0
  108. package/build/src/core/verbs/bind.d.ts +2 -1
  109. package/build/src/core/verbs/bind.js +16 -0
  110. package/build/src/core/verbs/deliver.d.ts +2 -1
  111. package/build/src/core/verbs/deliver.js +16 -0
  112. package/build/src/core/verbs/placement.d.ts +2 -1
  113. package/build/src/core/verbs/placement.js +58 -1
  114. package/build/src/dispatch/association.d.ts +13 -0
  115. package/build/src/dispatch/association.js +20 -0
  116. package/build/src/dispatch/index.d.ts +6 -0
  117. package/build/src/dispatch/index.js +27 -3
  118. package/build/src/git/hooks.d.ts +9 -1
  119. package/build/src/git/hooks.js +79 -1
  120. package/build/src/git/nuke.d.ts +2 -1
  121. package/build/src/git/nuke.js +6 -11
  122. package/build/src/git/private-state-seat.d.ts +26 -1
  123. package/build/src/git/private-state-seat.js +78 -13
  124. package/build/src/git/process.d.ts +2 -0
  125. package/build/src/git/reconcile.d.ts +1 -2
  126. package/build/src/git/reconcile.js +0 -6
  127. package/build/src/git/repository.d.ts +0 -2
  128. package/build/src/git/repository.js +27 -25
  129. package/build/src/git/result-codec.d.ts +29 -0
  130. package/build/src/git/result-codec.js +306 -0
  131. package/build/src/git/target-placement.js +2 -8
  132. package/build/src/git/workspace.d.ts +2 -0
  133. package/build/src/git/workspace.js +4 -0
  134. package/build/src/index.d.ts +1 -0
  135. package/build/src/kanshi/fleet.js +1 -1
  136. package/build/src/kanshi/read.js +55 -28
  137. package/build/src/kanshi/report.d.ts +4 -3
  138. package/build/src/kanshi/select.js +14 -1
  139. package/build/src/library/address.d.ts +1 -0
  140. package/build/src/library/address.js +4 -7
  141. package/build/src/library/akuma-creation.d.ts +5 -3
  142. package/build/src/library/akuma-creation.js +90 -33
  143. package/build/src/library/audit.js +2 -1
  144. package/build/src/library/catalog.d.ts +10 -2
  145. package/build/src/library/catalog.js +65 -25
  146. package/build/src/library/composition.d.ts +1 -0
  147. package/build/src/library/composition.js +1 -0
  148. package/build/src/library/configuration.d.ts +4 -21
  149. package/build/src/library/configuration.js +2 -158
  150. package/build/src/library/continuation.d.ts +20 -1
  151. package/build/src/library/continuation.js +36 -0
  152. package/build/src/library/contract-bind.d.ts +1 -0
  153. package/build/src/library/contract-bind.js +16 -5
  154. package/build/src/library/contract-forwarding.d.ts +2 -2
  155. package/build/src/library/contract-forwarding.js +18 -4
  156. package/build/src/library/contract-handle.js +4 -3
  157. package/build/src/library/contract-operations.d.ts +5 -9
  158. package/build/src/library/contract-operations.js +34 -47
  159. package/build/src/library/contract.d.ts +11 -2
  160. package/build/src/library/contract.js +21 -1
  161. package/build/src/library/delivery.d.ts +4 -1
  162. package/build/src/library/delivery.js +47 -0
  163. package/build/src/library/fleet.d.ts +4 -136
  164. package/build/src/library/fleet.js +31 -315
  165. package/build/src/library/keiyaku.d.ts +7 -3
  166. package/build/src/library/keiyaku.js +1 -0
  167. package/build/src/library/mutation.d.ts +431 -3
  168. package/build/src/library/mutation.js +192 -19
  169. package/build/src/library/nuke.d.ts +7 -1
  170. package/build/src/library/nuke.js +18 -4
  171. package/build/src/library/reconcile.d.ts +14 -0
  172. package/build/src/library/reconcile.js +22 -8
  173. package/build/src/library/refusal.d.ts +9 -1
  174. package/build/src/library/refusal.js +76 -0
  175. package/build/src/library/region.d.ts +0 -8
  176. package/build/src/library/region.js +1 -29
  177. package/build/src/library/result-codec.d.ts +2 -0
  178. package/build/src/library/result-codec.js +12 -0
  179. package/build/src/markdown/lex.js +9 -2
  180. package/build/src/markdown/types.d.ts +2 -1
  181. package/build/src/markdown/types.js +3 -1
  182. package/build/src/plugin/akuma-signals.d.ts +12 -0
  183. package/build/src/plugin/akuma-signals.js +14 -0
  184. package/build/src/plugin/public.d.ts +51 -0
  185. package/build/src/plugin/public.js +1 -0
  186. package/build/src/plugin/runtime.d.ts +14 -0
  187. package/build/src/plugin/runtime.js +357 -0
  188. package/build/src/protocol/amend.js +3 -3
  189. package/build/src/protocol/attempt.d.ts +2 -1
  190. package/build/src/protocol/attempt.js +1 -1
  191. package/build/src/protocol/audit.d.ts +1 -1
  192. package/build/src/protocol/audit.js +1 -1
  193. package/build/src/protocol/bind.d.ts +3 -1
  194. package/build/src/protocol/bind.js +26 -0
  195. package/build/src/protocol/completion.js +0 -1
  196. package/build/src/protocol/deliver.d.ts +1 -1
  197. package/build/src/protocol/deliver.js +136 -57
  198. package/build/src/protocol/intent.d.ts +0 -1
  199. package/build/src/protocol/intent.js +0 -1
  200. package/build/src/protocol/operations.d.ts +9 -2
  201. package/build/src/protocol/operations.js +16 -1
  202. package/build/src/protocol/outcome.d.ts +3 -0
  203. package/build/src/protocol/outcome.js +17 -1
  204. package/build/src/protocol/placement.js +10 -3
  205. package/build/src/protocol/read/status.d.ts +8 -0
  206. package/build/src/protocol/read/status.js +49 -0
  207. package/build/src/protocol/reintegrate.js +10 -3
  208. package/build/src/protocol/result-codec.d.ts +22 -0
  209. package/build/src/protocol/result-codec.js +442 -0
  210. package/build/src/protocol/review.d.ts +1 -1
  211. package/build/src/protocol/review.js +81 -46
  212. package/build/src/protocol/run.d.ts +22 -2
  213. package/build/src/protocol/run.js +119 -29
  214. package/build/src/runtime/proc/lifecycle.js +1 -1
  215. package/build/src/runtime/proc/line-rpc.d.ts +7 -1
  216. package/build/src/runtime/proc/line-rpc.js +49 -9
  217. package/build/src/runtime/proc/run.d.ts +0 -1
  218. package/build/src/runtime/proc/run.js +1 -11
  219. package/build/src/runtime/proc/termination.d.ts +1 -0
  220. package/build/src/runtime/proc/termination.js +63 -18
  221. package/build/src/runtime/proc/windows-launch.exe +0 -0
  222. package/build/src/settings.d.ts +10 -0
  223. package/build/src/settings.js +88 -2
  224. package/build/src/settlement/result-codec.d.ts +2 -0
  225. package/build/src/settlement/result-codec.js +56 -0
  226. package/build/src/settlement/settle.d.ts +5 -12
  227. package/build/src/settlement/settle.js +60 -55
  228. package/build/src/task/board.d.ts +3 -0
  229. package/build/src/task/board.js +22 -4
  230. package/build/src/task/catalog.d.ts +13 -2
  231. package/build/src/task/catalog.js +59 -5
  232. package/build/src/task/compose.d.ts +4 -2
  233. package/build/src/task/compose.js +56 -30
  234. package/build/src/task/created-observation.d.ts +39 -0
  235. package/build/src/task/created-observation.js +26 -0
  236. package/build/src/task/identity.d.ts +6 -0
  237. package/build/src/task/identity.js +48 -7
  238. package/build/src/task/index.d.ts +4 -3
  239. package/build/src/task/index.js +19 -16
  240. package/build/src/task/input.d.ts +3 -1
  241. package/build/src/task/input.js +7 -4
  242. package/build/src/task/lifecycle-operations.d.ts +6 -0
  243. package/build/src/task/lifecycle-operations.js +116 -0
  244. package/build/src/task/mutation-result.d.ts +762 -20
  245. package/build/src/task/mutation-result.js +34 -9
  246. package/build/src/task/mutation.d.ts +4 -9
  247. package/build/src/task/mutation.js +17 -52
  248. package/build/src/task/operation-types.d.ts +114 -0
  249. package/build/src/task/operation-types.js +1 -0
  250. package/build/src/task/operations.d.ts +6 -113
  251. package/build/src/task/operations.js +75 -117
  252. package/build/src/task/query.d.ts +8 -11
  253. package/build/src/task/query.js +7 -14
  254. package/build/src/task/store.d.ts +11 -1
  255. package/build/src/task/store.js +169 -55
  256. package/build/src/task/view.d.ts +4 -0
  257. package/build/src/task/view.js +7 -0
  258. package/build/src/verification/declaration.d.ts +1 -0
  259. package/build/src/verification/declaration.js +18 -1
  260. package/build/src/verification/execution.d.ts +0 -1
  261. package/build/src/verification/execution.js +5 -5
  262. package/build/src/world.d.ts +0 -2
  263. package/build/src/world.js +3 -7
  264. package/package.json +17 -5
  265. package/build/src/cli/square-edge.d.ts +0 -7
  266. package/build/src/cli/square-edge.js +0 -159
  267. package/build/src/git/ref-migration.d.ts +0 -22
  268. package/build/src/git/ref-migration.js +0 -55
  269. package/build/src/library/contract-forwarding-reconciliation-result.d.ts +0 -102
  270. package/build/src/library/contract-forwarding-reconciliation-result.js +0 -92
  271. package/build/src/library/contract-forwarding-result.d.ts +0 -4270
  272. package/build/src/library/contract-forwarding-result.js +0 -521
@@ -1,7 +1,24 @@
1
- import { admitRequest, isRequestInputConflict, readRequest, serveRequest as serveChildRequest, serveUpstreamRequest, voidRequest, } from "./heart/index.js";
1
+ import { admitRequest, beginRequest, isRequestInputConflict, readHeart, readRequest, serveRequest as serveChildRequest, serveUpstreamRequest, voidRequest, unproveRequest, } from "./heart/index.js";
2
2
  import { atomicJson, receiptPath, } from "./request-wire.js";
3
- import { BodyRequestPump as LifecycleBodyRequestPump, } from "./request-lifecycle.js";
3
+ import { BodyRequestPump as LifecycleBodyRequestPump, settleReserved, } from "./request-lifecycle.js";
4
4
  export { clearBodyRequestTransport, settleBodyRequests } from "./request-lifecycle.js";
5
+ function replayReference(fact, command) {
6
+ if (fact.state !== "served") {
7
+ throw new Error(`request ${fact.id} completion corruption: cannot replay ${fact.state} request`);
8
+ }
9
+ switch (command.completion) {
10
+ case "child":
11
+ if (!("child" in fact)) {
12
+ throw new Error(`request ${fact.id} completion corruption: child command has a service settlement`);
13
+ }
14
+ return command.projectChild(fact.child);
15
+ case "service":
16
+ if (!("serviceJson" in fact)) {
17
+ throw new Error(`request ${fact.id} completion corruption: service command has a child settlement`);
18
+ }
19
+ return command.projectServiceJson(fact.serviceJson);
20
+ }
21
+ }
5
22
  async function projectCommandReceipt(input, fact, command, outcome, failure) {
6
23
  const receipt = fact.state === "refused"
7
24
  ? { id: fact.id, action: fact.action, state: "refused", diagnostic: fact.diagnostic }
@@ -13,25 +30,22 @@ async function projectCommandReceipt(input, fact, command, outcome, failure) {
13
30
  evidence: fact.evidence,
14
31
  ...(failure === undefined ? {} : { failure }),
15
32
  }
16
- : outcome === undefined
17
- ? "serviceJson" in fact
33
+ : fact.state === "unproven"
34
+ ? {
35
+ id: fact.id,
36
+ action: fact.action,
37
+ state: "unproven",
38
+ evidence: fact.evidence,
39
+ ...(failure === undefined ? {} : { failure }),
40
+ }
41
+ : outcome === undefined
18
42
  ? {
19
43
  id: fact.id,
20
44
  action: fact.action,
21
45
  state: "served",
22
- reference: command.projectServiceJson(fact.serviceJson),
46
+ reference: replayReference(fact, command),
23
47
  }
24
- : "child" in fact
25
- ? {
26
- id: fact.id,
27
- action: fact.action,
28
- state: "served",
29
- reference: command.projectChild(fact.child),
30
- }
31
- : null
32
- : { id: fact.id, action: fact.action, state: "served", outcome };
33
- if (receipt === null)
34
- return;
48
+ : { id: fact.id, action: fact.action, state: "served", outcome };
35
49
  try {
36
50
  await atomicJson(receiptPath(input.directory, input.transportId), receipt);
37
51
  }
@@ -40,57 +54,95 @@ async function projectCommandReceipt(input, fact, command, outcome, failure) {
40
54
  throw error;
41
55
  }
42
56
  }
43
- async function serveCommand(input, command) {
44
- const request = command.resolve(input.claim.payload);
45
- if (request === null)
46
- throw new Error(`registered request action ${input.claim.action} rejected its payload`);
57
+ async function serveResolvedCommand(input, command, request, execute) {
47
58
  let fact = await admitRequest(input.paths, {
48
59
  id: input.claim.id,
49
60
  action: input.claim.action,
50
61
  payloadJson: request.payloadJson,
51
62
  admittedAt: input.now(),
52
- permitted: request.isPermitted(input.parent.allowed),
63
+ permitted: request.isPermitted(input.allowed),
53
64
  });
54
65
  if (fact.state !== "admitted") {
55
- await projectCommandReceipt(input, fact, request);
66
+ await projectCommandReceipt(input, fact, command);
56
67
  return true;
57
68
  }
58
69
  if (!input.admissionOpen()) {
59
70
  fact = await voidRequest(input.paths, fact.id, "body closed request admission");
60
- await projectCommandReceipt(input, fact, request);
71
+ await projectCommandReceipt(input, fact, command);
61
72
  return true;
62
73
  }
63
74
  try {
64
- const served = await request.execute({
75
+ const facts = {
65
76
  id: fact.id,
66
77
  admittedAt: fact.admittedAt,
67
78
  requester: fact.requester,
68
79
  signal: input.signal,
69
- upstream: input.upstream,
70
- paths: input.paths,
71
- parent: input.parent,
72
- spawn: input.spawn,
73
80
  admissionOpen: input.admissionOpen,
74
- });
75
- fact =
76
- "child" in served
77
- ? await serveChildRequest(input.paths, fact.id, served.child)
78
- : await serveUpstreamRequest(input.paths, fact.id, served.serviceJson);
79
- await projectCommandReceipt(input, fact, request, { kind: "returned", result: served.result });
81
+ };
82
+ const served = await execute(fact, facts);
83
+ fact = served.fact;
84
+ await projectCommandReceipt(input, fact, command, served.outcome);
80
85
  }
81
86
  catch (error) {
82
87
  const failure = encodedFailure(request, error);
83
88
  const current = await readRequest(input.paths, fact.id);
84
89
  if (current === null)
85
90
  throw error;
86
- fact =
87
- current.state === "admitted" || current.state === "reserved"
88
- ? await voidRequest(input.paths, fact.id, diagnostic(error))
89
- : current;
90
- await projectCommandReceipt(input, fact, request, undefined, failure);
91
+ if (current.state === "reserved") {
92
+ const parent = (await readHeart(input.paths)).soul;
93
+ if (parent === null)
94
+ throw new Error("reserved request settlement requires a born parent Soul");
95
+ if (!(await settleReserved(input.paths, parent, current, input.now, input.signal)))
96
+ return true;
97
+ fact = (await readRequest(input.paths, fact.id)) ?? current;
98
+ }
99
+ else {
100
+ fact =
101
+ current.state === "admitted"
102
+ ? await voidRequest(input.paths, fact.id, diagnostic(error))
103
+ : current.state === "begun"
104
+ ? provesNoProductEffect(failure)
105
+ ? await voidRequest(input.paths, fact.id, diagnostic(error))
106
+ : await unproveRequest(input.paths, fact.id, diagnostic(error))
107
+ : current;
108
+ }
109
+ await projectCommandReceipt(input, fact, command, undefined, failure);
91
110
  }
92
111
  return true;
93
112
  }
113
+ async function serveChildCommand(input, command) {
114
+ const request = command.resolve(input.claim.payload);
115
+ if (request === null)
116
+ throw new Error(`registered request action ${input.claim.action} rejected its payload`);
117
+ return await serveResolvedCommand(input, command, request, async (fact, facts) => {
118
+ const served = await request.execute(facts);
119
+ return {
120
+ fact: await serveChildRequest(input.paths, fact.id, served.child),
121
+ outcome: { kind: "returned", result: served.result },
122
+ };
123
+ });
124
+ }
125
+ async function serveServiceCommand(input, command) {
126
+ const request = command.resolve(input.claim.payload);
127
+ if (request === null)
128
+ throw new Error(`registered request action ${input.claim.action} rejected its payload`);
129
+ return await serveResolvedCommand(input, command, request, async (fact, facts) => {
130
+ await beginRequest(input.paths, fact.id);
131
+ const served = await request.execute(facts);
132
+ return {
133
+ fact: await serveUpstreamRequest(input.paths, fact.id, served.serviceJson),
134
+ outcome: { kind: "returned", result: served.result },
135
+ };
136
+ });
137
+ }
138
+ async function serveCommand(input, command) {
139
+ switch (command.completion) {
140
+ case "child":
141
+ return await serveChildCommand(input, command);
142
+ case "service":
143
+ return await serveServiceCommand(input, command);
144
+ }
145
+ }
94
146
  function diagnostic(error) {
95
147
  return error instanceof Error ? error.message : String(error);
96
148
  }
@@ -103,6 +155,9 @@ function encodedFailure(request, error) {
103
155
  return undefined;
104
156
  }
105
157
  }
158
+ function provesNoProductEffect(failure) {
159
+ return failure !== null && typeof failure === "object" && failure.kind === "refused";
160
+ }
106
161
  export async function serveRequest(input) {
107
162
  const command = input.commands[input.claim.action];
108
163
  if (command === undefined) {
@@ -57,13 +57,19 @@ declare const receiptEnvelopeSchema: z.ZodUnion<readonly [z.ZodObject<{
57
57
  state: z.ZodLiteral<"voided">;
58
58
  evidence: z.ZodString;
59
59
  failure: z.ZodOptional<z.ZodUnknown>;
60
+ }, z.core.$strict>, z.ZodObject<{
61
+ id: z.ZodString;
62
+ action: z.ZodString;
63
+ state: z.ZodLiteral<"unproven">;
64
+ evidence: z.ZodString;
65
+ failure: z.ZodOptional<z.ZodUnknown>;
60
66
  }, z.core.$strict>]>;
61
67
  export type RequestEnvelope = z.infer<typeof requestEnvelopeSchema>;
62
68
  /**
63
69
  * A Body Request operation is owned by the verb that defines its public
64
70
  * values. Transport only carries the opaque values produced here.
65
71
  */
66
- export type RequestCommand<Input, Output, Service, Reference = Service, Context = unknown> = Readonly<{
72
+ export type RequestProtocol<Input, Output, Reference> = Readonly<{
67
73
  action: string;
68
74
  encodeRequest(input: Input): unknown;
69
75
  decodeRequest(payload: unknown): Input | null;
@@ -71,43 +77,68 @@ export type RequestCommand<Input, Output, Service, Reference = Service, Context
71
77
  decodeResult(result: unknown): Output;
72
78
  encodeFailure?(error: unknown): unknown | null;
73
79
  decodeFailure?(failure: unknown): Error | null;
74
- encodeService(service: Service): unknown;
75
- decodeService(service: unknown): Service;
76
- projectService(service: Service): Reference;
77
- projectChild?(child: string): Reference;
78
80
  decodeReference(reference: unknown): Reference;
79
- /** The operation owner proves the Body-owned execution capability before use. */
80
- decodeExecutionContext(value: unknown): Context;
81
81
  isPermitted(allowed: readonly string[]): boolean;
82
- execute(input: Input, context: Context): Promise<Readonly<{
82
+ }>;
83
+ export type ExecutionFacts = Readonly<{
84
+ id: string;
85
+ admittedAt: string;
86
+ requester: string;
87
+ signal: AbortSignal;
88
+ admissionOpen(): boolean;
89
+ }>;
90
+ export type ChildRequestCommand<Input, Output, Reference> = Readonly<{
91
+ completion: "child";
92
+ protocol: RequestProtocol<Input, Output, Reference>;
93
+ projectChild(child: string): Reference;
94
+ execute(input: Input, facts: ExecutionFacts): Promise<Readonly<{
83
95
  result: Output;
84
- }> & (Readonly<{
85
- service: Service;
86
- }> | Readonly<{
87
96
  child: string;
88
- }>)>;
97
+ }>>;
89
98
  }>;
90
- export type ErasedRequestCommand = Readonly<{
91
- action: string;
92
- resolve(payload: unknown): ErasedRequest | null;
99
+ export type ServiceRequestCommand<Input, Output, Service, Reference> = Readonly<{
100
+ completion: "service";
101
+ protocol: RequestProtocol<Input, Output, Reference>;
102
+ encodeService(service: Service): unknown;
103
+ decodeService(service: unknown): Service;
104
+ projectService(service: Service): Reference;
105
+ execute(input: Input, facts: ExecutionFacts): Promise<Readonly<{
106
+ result: Output;
107
+ service: Service;
108
+ }>>;
93
109
  }>;
94
- export type ErasedRequest = Readonly<{
110
+ type ErasedRequest = Readonly<{
95
111
  payloadJson: string;
96
112
  isPermitted(allowed: readonly string[]): boolean;
97
- execute(context: unknown): Promise<ErasedRequestExecution>;
98
113
  encodeFailure(error: unknown): unknown | null;
99
- projectServiceJson(serviceJson: string): unknown;
100
- projectChild(child: string): unknown;
101
114
  }>;
102
- export type ErasedRequestExecution = Readonly<{
103
- result: unknown;
104
- serviceJson: string;
115
+ type ErasedChildRequest = ErasedRequest & Readonly<{
116
+ execute(facts: ExecutionFacts): Promise<Readonly<{
117
+ result: unknown;
118
+ child: string;
119
+ }>>;
120
+ }>;
121
+ type ErasedServiceRequest = ErasedRequest & Readonly<{
122
+ execute(facts: ExecutionFacts): Promise<Readonly<{
123
+ result: unknown;
124
+ serviceJson: string;
125
+ }>>;
126
+ }>;
127
+ export type ErasedRequestCommand = Readonly<{
128
+ action: string;
129
+ completion: "child";
130
+ projectChild(child: string): unknown;
131
+ resolve(payload: unknown): ErasedChildRequest | null;
105
132
  }> | Readonly<{
106
- result: unknown;
107
- child: string;
133
+ action: string;
134
+ completion: "service";
135
+ projectServiceJson(serviceJson: string): unknown;
136
+ resolve(payload: unknown): ErasedServiceRequest | null;
108
137
  }>;
109
138
  /** Erases only static TypeScript parameters; each operation codec remains captured by its owner descriptor. */
110
- export declare function eraseRequestCommand<Input, Output, Service, Reference, Context>(command: RequestCommand<Input, Output, Service, Reference, Context>): ErasedRequestCommand;
139
+ export declare function eraseRequestCommand<Input, Output, Reference>(command: ChildRequestCommand<Input, Output, Reference>): ErasedRequestCommand;
140
+ export declare function eraseRequestCommand<Input, Output, Service, Reference>(command: ServiceRequestCommand<Input, Output, Service, Reference>): ErasedRequestCommand;
141
+ export declare function composeRequestCommands(...maps: readonly Readonly<Record<string, ErasedRequestCommand>>[]): Readonly<Record<string, ErasedRequestCommand>>;
111
142
  export type UpstreamRequestFailure = z.infer<typeof upstreamRequestFailureSchema>;
112
143
  export type ReturnedEnvelope = z.infer<typeof returnedEnvelopeSchema>;
113
144
  export type ReceiptEnvelope = z.infer<typeof receiptEnvelopeSchema>;
@@ -115,5 +146,5 @@ export declare function decodeEnvelope(bytes: string, fileId: string): RequestEn
115
146
  export declare function decodeReceiptEnvelope(bytes: string, id: string, action: string): ReceiptEnvelope | null;
116
147
  export declare function requestPath(directory: string, id: string): string;
117
148
  export declare function receiptPath(directory: string, id: string): string;
118
- export declare function atomicJson(path: string, value: unknown): Promise<void>;
149
+ export declare function atomicJson(path: string, value: unknown, signal?: AbortSignal, beforeRename?: () => void | Promise<void>): Promise<void>;
119
150
  export {};
@@ -29,37 +29,74 @@ const receiptEnvelopeSchema = z.union([
29
29
  failure: z.unknown().optional(),
30
30
  })
31
31
  .strict(),
32
+ z
33
+ .object({
34
+ id: requestIdSchema,
35
+ action: actionSchema,
36
+ state: z.literal("unproven"),
37
+ evidence: z.string(),
38
+ failure: z.unknown().optional(),
39
+ })
40
+ .strict(),
32
41
  ]);
33
- /** Erases only static TypeScript parameters; each operation codec remains captured by its owner descriptor. */
34
42
  export function eraseRequestCommand(command) {
35
- return {
36
- action: command.action,
37
- resolve: (payload) => {
38
- const input = command.decodeRequest(payload);
39
- if (input === null)
40
- return null;
43
+ const { protocol } = command;
44
+ switch (command.completion) {
45
+ case "child":
41
46
  return {
42
- payloadJson: JSON.stringify(command.encodeRequest(input)),
43
- isPermitted: (allowed) => command.isPermitted(allowed),
44
- execute: async (context) => {
45
- const served = await command.execute(input, command.decodeExecutionContext(context));
46
- return "child" in served
47
- ? { result: command.encodeResult(served.result), child: served.child }
48
- : {
49
- result: command.encodeResult(served.result),
50
- serviceJson: JSON.stringify(command.encodeService(served.service)),
51
- };
47
+ action: protocol.action,
48
+ completion: "child",
49
+ projectChild: command.projectChild,
50
+ resolve: (payload) => {
51
+ const input = protocol.decodeRequest(payload);
52
+ if (input === null)
53
+ return null;
54
+ return {
55
+ payloadJson: JSON.stringify(protocol.encodeRequest(input)),
56
+ isPermitted: (allowed) => protocol.isPermitted(allowed),
57
+ execute: async (facts) => {
58
+ const served = await command.execute(input, facts);
59
+ return { result: protocol.encodeResult(served.result), child: served.child };
60
+ },
61
+ encodeFailure: (error) => protocol.encodeFailure?.(error) ?? null,
62
+ };
52
63
  },
53
- encodeFailure: (error) => command.encodeFailure?.(error) ?? null,
64
+ };
65
+ case "service":
66
+ return {
67
+ action: protocol.action,
68
+ completion: "service",
54
69
  projectServiceJson: (serviceJson) => command.projectService(command.decodeService(JSON.parse(serviceJson))),
55
- projectChild: (child) => {
56
- if (command.projectChild === undefined)
57
- throw new Error(`request ${command.action} has no child reference codec`);
58
- return command.projectChild(child);
70
+ resolve: (payload) => {
71
+ const input = protocol.decodeRequest(payload);
72
+ if (input === null)
73
+ return null;
74
+ return {
75
+ payloadJson: JSON.stringify(protocol.encodeRequest(input)),
76
+ isPermitted: (allowed) => protocol.isPermitted(allowed),
77
+ execute: async (facts) => {
78
+ const served = await command.execute(input, facts);
79
+ return {
80
+ result: protocol.encodeResult(served.result),
81
+ serviceJson: JSON.stringify(command.encodeService(served.service)),
82
+ };
83
+ },
84
+ encodeFailure: (error) => protocol.encodeFailure?.(error) ?? null,
85
+ };
59
86
  },
60
87
  };
61
- },
62
- };
88
+ }
89
+ }
90
+ export function composeRequestCommands(...maps) {
91
+ const commands = Object.create(null);
92
+ for (const map of maps) {
93
+ for (const [action, command] of Object.entries(map)) {
94
+ if (Object.hasOwn(commands, action))
95
+ throw new Error(`duplicate request command action: ${action}`);
96
+ commands[action] = command;
97
+ }
98
+ }
99
+ return commands;
63
100
  }
64
101
  export function decodeEnvelope(bytes, fileId) {
65
102
  let decoded;
@@ -89,10 +126,12 @@ export function requestPath(directory, id) {
89
126
  export function receiptPath(directory, id) {
90
127
  return join(directory, `${id}.receipt.json`);
91
128
  }
92
- export async function atomicJson(path, value) {
129
+ export async function atomicJson(path, value, signal, beforeRename) {
93
130
  const temporary = `${path}.${randomUUID()}.tmp`;
94
131
  try {
95
132
  await writeFile(temporary, `${JSON.stringify(value)}\n`, { flag: "wx" });
133
+ await beforeRename?.();
134
+ signal?.throwIfAborted();
96
135
  await rename(temporary, path);
97
136
  }
98
137
  finally {
@@ -1,8 +1,8 @@
1
1
  import { type ResumeCoordinate, type Soul, type TellFact } from "./heart/index.js";
2
2
  import type { AkumaPaths } from "./identity.js";
3
3
  import { type ProviderAdapter, type TurnResult } from "./provider.js";
4
- import type { AkumaCallRequestChildLaunch } from "./call-request.js";
5
- import type { ErasedRequestCommand } from "./request-wire.js";
4
+ import { type AkumaCallRequestChildLaunch } from "./call-request.js";
5
+ import { type ErasedRequestCommand } from "./request-wire.js";
6
6
  import { BodySupervisor } from "./body-supervisor.js";
7
7
  import type { OwnedProcess } from "../runtime/proc/run.js";
8
8
  export declare function turnRecipe(paths: AkumaPaths, soul: Soul): Promise<Readonly<{
@@ -25,10 +25,11 @@ export type DriveTurnInput = Readonly<{
25
25
  body: string;
26
26
  call?: string;
27
27
  launchTells: readonly TellFact[];
28
+ schemaJson?: string;
28
29
  supervisor: BodySupervisor;
29
30
  runtimeSpawn(launch: AkumaCallRequestChildLaunch): Promise<OwnedProcess | void>;
30
- upstream?: unknown;
31
- commands: Readonly<Record<string, ErasedRequestCommand>>;
31
+ world: import("../world.js").WorldRoot;
32
+ externalCommands: Readonly<Record<string, ErasedRequestCommand>>;
32
33
  now(): string;
33
34
  }>;
34
35
  export declare function driveTurn(input: DriveTurnInput): Promise<(DrivenTurn & Readonly<{
@@ -1,8 +1,10 @@
1
1
  import { abortableDelay } from "./abort.js";
2
2
  /* eslint-disable max-lines-per-function -- Turn setup and consumption each preserve one ordered lifecycle transaction. */
3
- import { appendActivity, beginTurn, breakBody, heartExists, readHeart, recordSession, recordTellDeliveries, recordTellReceipt, } from "./heart/index.js";
3
+ import { appendActivity, beginTurn, bindTellsToTurn, breakBody, drainPendingTells, heartExists, readHeart, recordSession, recordTellDeliveries, recordTellReceipt, } from "./heart/index.js";
4
4
  import { encodeAgentEvent, } from "./provider.js";
5
+ import { akumaCallRequestCommands } from "./call-request.js";
5
6
  import { BodyRequestPump } from "./request-serve.js";
7
+ import { composeRequestCommands } from "./request-wire.js";
6
8
  import { CONTROL_RESPONSE_MS } from "./body-supervisor.js";
7
9
  function serializeEffects() {
8
10
  let tail = Promise.resolve();
@@ -68,19 +70,29 @@ async function startTurnDrive(input) {
68
70
  const { cwd, options, session } = await turnRecipe(input.paths, input.soul);
69
71
  if (session !== undefined && input.adapter.resume === undefined)
70
72
  return { kind: "resume-unsupported" };
73
+ const boundTells = drainPendingTells(input.launchTells);
74
+ const schemaJson = input.schemaJson ?? boundTells.find((tell) => tell.schemaJson !== undefined)?.schemaJson;
71
75
  const turn = await beginTurn(input.paths, {
72
76
  bodySequence: input.bodySequence,
73
77
  startedAt: input.now(),
74
78
  ...(input.call === undefined ? {} : { call: input.call }),
79
+ ...(schemaJson === undefined ? {} : { schemaJson }),
75
80
  });
81
+ if (boundTells.length > 0) {
82
+ await bindTellsToTurn(input.paths, {
83
+ turnSequence: turn.sequence,
84
+ tellIds: boundTells.map((tell) => tell.id),
85
+ boundAt: input.now(),
86
+ });
87
+ }
88
+ const { world, paths, soul: parent, runtimeSpawn: spawn, externalCommands } = input;
89
+ const commands = composeRequestCommands(akumaCallRequestCommands({ world, paths, parent, spawn }), externalCommands);
76
90
  const requests = await BodyRequestPump.open({
77
91
  paths: input.paths,
78
- parent: input.soul,
92
+ allowed: input.soul.allowed,
79
93
  bodySequence: input.bodySequence,
80
94
  now: input.now,
81
- spawn: input.runtimeSpawn,
82
- ...(input.upstream === undefined ? {} : { upstream: input.upstream }),
83
- commands: input.commands,
95
+ commands,
84
96
  signal: input.supervisor.signal,
85
97
  });
86
98
  const driveController = new AbortController();
@@ -97,11 +109,12 @@ async function startTurnDrive(input) {
97
109
  });
98
110
  const driveInput = {
99
111
  body: input.body,
100
- launchTells: input.launchTells.map((tell) => ({ id: tell.id, text: tell.body })),
112
+ launchTells: boundTells.map((tell) => ({ id: tell.id, text: tell.body })),
101
113
  cwd,
102
114
  options,
103
115
  signal: driveController.signal,
104
116
  requests: { dir: requests.directory },
117
+ ...(schemaJson === undefined ? {} : { schemaJson }),
105
118
  };
106
119
  const attempt = session === undefined
107
120
  ? input.adapter.start({ ...driveInput, session: { kind: "fresh" } })
@@ -121,8 +134,8 @@ async function startTurnDrive(input) {
121
134
  }
122
135
  return { kind: "stopped" };
123
136
  }
124
- if (input.launchTells.length > 0)
125
- await recordTellDeliveries(input.paths, input.launchTells.map((tell) => ({
137
+ if (boundTells.length > 0)
138
+ await recordTellDeliveries(input.paths, boundTells.map((tell) => ({
126
139
  tellId: tell.id,
127
140
  route: "launch",
128
141
  turnSequence: turn.sequence,
@@ -226,13 +239,14 @@ function observeCompletionFailure(drive) {
226
239
  async function submitPendingLiveTells(writers, pending, attempted, tellLive) {
227
240
  const { input, turnSequence, drive, writeWitness, mayWrite } = writers;
228
241
  for (const tell of pending) {
229
- if (attempted.has(tell.id))
242
+ if (attempted.has(tell.id) || tell.schemaJson !== undefined)
230
243
  continue;
231
244
  attempted.add(tell.id);
232
245
  const outcome = await writeWitness(async () => {
233
246
  const submission = await tellLive({ id: tell.id, text: tell.body });
234
247
  if (!mayWrite() || submission.kind === "turn-ended")
235
248
  return "turn-ended";
249
+ await bindTellsToTurn(input.paths, { turnSequence, tellIds: [tell.id], boundAt: input.now() });
236
250
  await recordTellDeliveries(input.paths, [
237
251
  {
238
252
  tellId: tell.id,
@@ -261,7 +275,9 @@ async function stopActiveDrive(input, active) {
261
275
  }
262
276
  }
263
277
  function hasUnattemptedTell(liveTells, tellPump, pending, attempted) {
264
- return liveTells && tellPump === null && pending.some((tell) => !attempted.has(tell.id));
278
+ return (liveTells &&
279
+ tellPump === null &&
280
+ pending.some((tell) => !attempted.has(tell.id) && tell.schemaJson === undefined));
265
281
  }
266
282
  async function settleCompletion(result, session, active) {
267
283
  try {
@@ -276,7 +292,7 @@ async function consumeTurnDrive(input, active) {
276
292
  const { turnSequence, drive, requests, resume } = active;
277
293
  let heart = input.supervisor.current();
278
294
  let turnSession = resume;
279
- const attempted = new Set(input.launchTells.map((tell) => tell.id));
295
+ const attempted = new Set(drainPendingTells(input.launchTells).map((tell) => tell.id));
280
296
  const writeWitness = serializeEffects();
281
297
  let writesOpen = true;
282
298
  const mayWrite = () => writesOpen && !input.supervisor.signal.aborted;
@@ -1,13 +1,11 @@
1
1
  import { type BodyLaunch } from "./akuma/body.js";
2
- import { type WorldRoot } from "./world.js";
3
- import { type FleetRequestPort } from "./library/fleet.js";
4
- import { type ContractRequestPort } from "./library/contract-operations.js";
5
- import { type TaskMutationRequestPort } from "./task/mutation.js";
2
+ import { World } from "./world.js";
6
3
  type BodyProcessConfiguration = Readonly<{
7
4
  home?: string;
8
5
  gitPath?: string;
9
6
  }>;
10
- export declare function upstreamFor(launch: BodyLaunch, processConfiguration: BodyProcessConfiguration): Promise<FleetRequestPort & ContractRequestPort & TaskMutationRequestPort & Readonly<{
11
- launchWorld(): WorldRoot;
7
+ export declare function externalRequestCommandsFor(launch: BodyLaunch, processConfiguration: BodyProcessConfiguration): Promise<Readonly<{
8
+ world: Awaited<ReturnType<typeof World.prove>>;
9
+ commands: Readonly<Record<string, import("./akuma/request-wire.js").ErasedRequestCommand>>;
12
10
  }>>;
13
11
  export {};
@@ -1,14 +1,14 @@
1
1
  import { LEASH_HELD_EXIT, runAkumaBody } from "./akuma/body.js";
2
- import { akumaCallRequestCommands } from "./akuma/call-request.js";
3
2
  import { worldRootForAkumaPaths } from "./akuma/identity.js";
4
3
  import { World } from "./world.js";
5
- import { executeKillAkuma, executeTellAkuma, executeWaitAkuma } from "./library/fleet.js";
6
- import { fleetRequestCommands } from "./library/fleet.js";
7
- import { requireBranchesToBeUpToDateFrom, worktreeHooksFrom } from "./library/configuration.js";
4
+ import { executeKillAkuma, executeTellAkuma, executeWaitAkuma } from "./akuma/fleet-execution.js";
5
+ import { fleetRequestCommands } from "./akuma/fleet-request.js";
6
+ import { worktreeHooksFrom } from "./git/hooks.js";
8
7
  import { contractRequestCommands, executeForwardedAudit, executeForwardedDeliver, executeForwardedReview, } from "./library/contract-operations.js";
9
8
  import { Repo } from "./library/repo.js";
10
- import { settings } from "./settings.js";
9
+ import { requireBranchesToBeUpToDateFrom, settings } from "./settings.js";
11
10
  import { executeTaskMutation, taskMutationRequestCommands } from "./task/mutation.js";
11
+ import { composeRequestCommands } from "./akuma/request-wire.js";
12
12
  async function contractDependencies(repoRoot, processConfiguration) {
13
13
  const repo = await Repo.at({
14
14
  path: repoRoot,
@@ -65,11 +65,8 @@ function contractUpstream(processConfiguration) {
65
65
  },
66
66
  };
67
67
  }
68
- export async function upstreamFor(launch, processConfiguration) {
69
- const world = await World.prove(worldRootForAkumaPaths(launch.paths));
68
+ function fleetRequestPort(world) {
70
69
  return {
71
- launchWorld: () => world,
72
- ...contractUpstream(processConfiguration),
73
70
  wait: async (input) => await executeWaitAkuma({
74
71
  path: world,
75
72
  ids: input.targets,
@@ -89,6 +86,10 @@ export async function upstreamFor(launch, processConfiguration) {
89
86
  const result = await executeKillAkuma({ path: world, ids: input.targets, signal: input.signal });
90
87
  return result;
91
88
  },
89
+ };
90
+ }
91
+ function taskMutationRequestPort() {
92
+ return {
92
93
  task: async (input) => await executeTaskMutation({
93
94
  world: input.world,
94
95
  request: input.request,
@@ -110,12 +111,13 @@ const configuration = {
110
111
  ...(mappedHome === undefined || mappedHome.length === 0 ? {} : { home: mappedHome }),
111
112
  ...(mappedGitPath === undefined ? {} : { gitPath: mappedGitPath }),
112
113
  };
113
- const upstream = await upstreamFor(launch, configuration);
114
- const commands = {
115
- ...akumaCallRequestCommands(),
116
- ...fleetRequestCommands(),
117
- ...contractRequestCommands(),
118
- ...taskMutationRequestCommands(),
119
- };
120
- if ((await runAkumaBody(launch, upstream, commands)) === "held")
114
+ export async function externalRequestCommandsFor(launch, processConfiguration) {
115
+ const world = await World.prove(worldRootForAkumaPaths(launch.paths));
116
+ return {
117
+ world,
118
+ commands: composeRequestCommands(fleetRequestCommands(fleetRequestPort(world)), contractRequestCommands(contractUpstream(processConfiguration)), taskMutationRequestCommands(taskMutationRequestPort())),
119
+ };
120
+ }
121
+ const { world, commands: externalCommands } = await externalRequestCommandsFor(launch, configuration);
122
+ if ((await runAkumaBody(launch, world, externalCommands)) === "held")
121
123
  process.exitCode = LEASH_HELD_EXIT;
@@ -0,0 +1,8 @@
1
+ export declare const DEFAULT_BOUNDED_LIST_LIMIT = 50;
2
+ export declare const MAX_BOUNDED_LIST_LIMIT = 500;
3
+ export type BoundedList<Row> = Readonly<{
4
+ rows: readonly Row[];
5
+ hasMore: boolean;
6
+ }>;
7
+ export declare function boundedListLimit(value?: unknown): number;
8
+ export declare function projectBoundedList<Row>(rows: readonly Row[], limit: number): BoundedList<Row>;