@astrosheep/keiyaku 4.5.19 → 4.5.21

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 (197) hide show
  1. package/README.md +4 -4
  2. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku/SKILL.md +14 -7
  3. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-akuma/SKILL.md +53 -20
  4. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-akuma/references/automation.md +237 -0
  5. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-bind/SKILL.md +6 -7
  6. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-task/SKILL.md +2 -4
  7. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-workflow/SKILL.md +3 -3
  8. package/build/src/akuma/akuma-handle.d.ts +5 -1
  9. package/build/src/akuma/akuma-handle.js +4 -1
  10. package/build/src/akuma/akuma-instance.d.ts +7 -2
  11. package/build/src/akuma/akuma-instance.js +14 -7
  12. package/build/src/akuma/akuma-observe.d.ts +11 -0
  13. package/build/src/akuma/akuma-observe.js +23 -0
  14. package/build/src/akuma/akuma-product.d.ts +2 -0
  15. package/build/src/akuma/akuma-product.js +6 -0
  16. package/build/src/akuma/akuma.d.ts +20 -1
  17. package/build/src/akuma/akuma.js +2 -0
  18. package/build/src/akuma/allowed.d.ts +20 -0
  19. package/build/src/akuma/allowed.js +11 -0
  20. package/build/src/akuma/archetype.js +3 -0
  21. package/build/src/akuma/body.d.ts +25 -5
  22. package/build/src/akuma/body.js +70 -31
  23. package/build/src/akuma/call-request.d.ts +5 -0
  24. package/build/src/akuma/call-request.js +14 -4
  25. package/build/src/akuma/fleet-execution.d.ts +28 -0
  26. package/build/src/akuma/fleet-execution.js +36 -4
  27. package/build/src/akuma/fleet-observation.d.ts +54 -0
  28. package/build/src/akuma/fleet-request.d.ts +10 -0
  29. package/build/src/akuma/fleet-request.js +13 -3
  30. package/build/src/akuma/heart/facts.d.ts +2 -0
  31. package/build/src/akuma/heart/index.d.ts +1 -0
  32. package/build/src/akuma/heart/index.js +4 -1
  33. package/build/src/akuma/heart/rows.d.ts +2 -0
  34. package/build/src/akuma/heart/rows.js +7 -5
  35. package/build/src/akuma/heart/schema.d.ts +1 -1
  36. package/build/src/akuma/heart/schema.js +3 -1
  37. package/build/src/akuma/heart/tells.js +6 -5
  38. package/build/src/akuma/heart/timeline.js +1 -1
  39. package/build/src/akuma/provider-recipe.d.ts +1 -0
  40. package/build/src/akuma/provider-recipe.js +5 -0
  41. package/build/src/akuma/provider.d.ts +1 -1
  42. package/build/src/akuma/provider.js +1 -1
  43. package/build/src/akuma/providers/acp/core.js +3 -6
  44. package/build/src/akuma/providers/acp/index.js +3 -0
  45. package/build/src/akuma/providers/claude/index.js +10 -10
  46. package/build/src/akuma/providers/codex-app-server/index.js +12 -11
  47. package/build/src/akuma/providers/execution-environment.d.ts +6 -0
  48. package/build/src/akuma/providers/execution-environment.js +24 -0
  49. package/build/src/akuma/providers/grok-build/index.js +3 -0
  50. package/build/src/akuma/providers/opencode-sdk/index.js +32 -23
  51. package/build/src/akuma/providers/opencode-sdk/session.d.ts +8 -1
  52. package/build/src/akuma/providers/opencode-sdk/session.js +6 -5
  53. package/build/src/akuma/providers/pi/events.js +7 -2
  54. package/build/src/akuma/providers/pi/index.js +5 -2
  55. package/build/src/akuma/request-observation.d.ts +45 -0
  56. package/build/src/akuma/request-observation.js +162 -0
  57. package/build/src/akuma/request-rendezvous.d.ts +6 -3
  58. package/build/src/akuma/request-rendezvous.js +80 -14
  59. package/build/src/akuma/request-serve.js +27 -4
  60. package/build/src/akuma/request-wire.d.ts +5 -0
  61. package/build/src/akuma/request-wire.js +2 -0
  62. package/build/src/akuma/turn-drive.d.ts +1 -0
  63. package/build/src/akuma/turn-drive.js +2 -0
  64. package/build/src/akuma-body.js +5 -0
  65. package/build/src/body/amend.js +6 -4
  66. package/build/src/body/decode.d.ts +3 -1
  67. package/build/src/body/decode.js +53 -17
  68. package/build/src/body/region.d.ts +9 -1
  69. package/build/src/body/region.js +87 -12
  70. package/build/src/body/render.js +1 -1
  71. package/build/src/body/verification.d.ts +3 -1
  72. package/build/src/body/verification.js +4 -1
  73. package/build/src/cli/accepted.js +19 -2
  74. package/build/src/cli/commands/akuma-invoke.d.ts +3 -1
  75. package/build/src/cli/commands/akuma-invoke.js +134 -14
  76. package/build/src/cli/commands/akuma.js +24 -12
  77. package/build/src/cli/commands/contract-help.d.ts +15 -15
  78. package/build/src/cli/commands/contract-help.js +45 -19
  79. package/build/src/cli/commands/contract-invoke.d.ts +3 -0
  80. package/build/src/cli/commands/contract-invoke.js +25 -11
  81. package/build/src/cli/commands/contract.js +6 -4
  82. package/build/src/cli/commands/install.d.ts +1 -1
  83. package/build/src/cli/commands/install.js +1 -1
  84. package/build/src/cli/commands/status-set.js +15 -24
  85. package/build/src/cli/commands/task.js +18 -18
  86. package/build/src/cli/invoke.d.ts +3 -0
  87. package/build/src/cli/invoke.js +58 -23
  88. package/build/src/cli/main.js +5 -0
  89. package/build/src/cli/parse.d.ts +3 -0
  90. package/build/src/cli/parse.js +26 -4
  91. package/build/src/cli/render/akuma-activity.d.ts +100 -2
  92. package/build/src/cli/render/akuma-activity.js +485 -40
  93. package/build/src/cli/render/akuma.d.ts +10 -0
  94. package/build/src/cli/render/akuma.js +31 -21
  95. package/build/src/cli/render/audit.js +1 -1
  96. package/build/src/cli/render/board.js +1 -1
  97. package/build/src/cli/render/catalog.js +16 -13
  98. package/build/src/cli/render/contract-history.js +39 -10
  99. package/build/src/cli/render/contract-observation.js +10 -6
  100. package/build/src/cli/render/contract.js +109 -106
  101. package/build/src/cli/render/execution-progress.d.ts +26 -0
  102. package/build/src/cli/render/execution-progress.js +178 -0
  103. package/build/src/cli/render/kanshi-akuma.js +27 -39
  104. package/build/src/cli/render/kanshi.js +33 -26
  105. package/build/src/cli/render/nuke.js +1 -1
  106. package/build/src/cli/render/receipt.d.ts +1 -1
  107. package/build/src/cli/render/receipt.js +6 -6
  108. package/build/src/cli/render/refusal.js +10 -7
  109. package/build/src/cli/render/region.js +1 -1
  110. package/build/src/cli/render/settings.js +12 -2
  111. package/build/src/cli/render/status-line.d.ts +30 -0
  112. package/build/src/cli/render/status-line.js +58 -0
  113. package/build/src/cli/render/status-set.js +1 -1
  114. package/build/src/cli/render/task.d.ts +2 -0
  115. package/build/src/cli/render/task.js +11 -7
  116. package/build/src/cli/render/terminal.d.ts +0 -1
  117. package/build/src/cli/render/terminal.js +47 -15
  118. package/build/src/cli/result.d.ts +1 -0
  119. package/build/src/cli/runtime.d.ts +2 -0
  120. package/build/src/cli/runtime.js +36 -4
  121. package/build/src/cli/usage.js +2 -2
  122. package/build/src/cli/version.d.ts +1 -0
  123. package/build/src/cli/version.js +25 -0
  124. package/build/src/git/hooks.d.ts +13 -1
  125. package/build/src/git/hooks.js +2 -1
  126. package/build/src/git/workspace.d.ts +1 -1
  127. package/build/src/git/workspace.js +1 -1
  128. package/build/src/identity/mint.d.ts +13 -0
  129. package/build/src/identity/mint.js +26 -0
  130. package/build/src/identity/normalize.d.ts +4 -0
  131. package/build/src/identity/normalize.js +30 -0
  132. package/build/src/index.d.ts +2 -0
  133. package/build/src/index.js +1 -0
  134. package/build/src/kanshi/read.js +17 -4
  135. package/build/src/kanshi/report.d.ts +1 -0
  136. package/build/src/library/akuma-creation.d.ts +2 -0
  137. package/build/src/library/akuma-creation.js +34 -18
  138. package/build/src/library/audit.d.ts +2 -0
  139. package/build/src/library/audit.js +1 -0
  140. package/build/src/library/bind.js +18 -16
  141. package/build/src/library/composition.d.ts +1 -0
  142. package/build/src/library/contract-bind.d.ts +3 -1
  143. package/build/src/library/contract-bind.js +5 -3
  144. package/build/src/library/contract-execution.d.ts +2 -0
  145. package/build/src/library/contract-execution.js +15 -1
  146. package/build/src/library/contract-forwarding.d.ts +4 -0
  147. package/build/src/library/contract-forwarding.js +3 -0
  148. package/build/src/library/contract-handle.d.ts +7 -0
  149. package/build/src/library/contract-handle.js +25 -0
  150. package/build/src/library/contract-operations.d.ts +7 -2
  151. package/build/src/library/contract-operations.js +21 -1
  152. package/build/src/library/contract-types.d.ts +1 -0
  153. package/build/src/library/execution-result.d.ts +2 -2
  154. package/build/src/library/execution.d.ts +8 -0
  155. package/build/src/library/execution.js +102 -0
  156. package/build/src/library/fleet.d.ts +4 -1
  157. package/build/src/library/fleet.js +32 -8
  158. package/build/src/library/keiyaku.d.ts +2 -0
  159. package/build/src/library/mutation.js +15 -7
  160. package/build/src/plugin/akuma-signals.d.ts +6 -0
  161. package/build/src/plugin/akuma-signals.js +9 -1
  162. package/build/src/plugin/public.d.ts +6 -2
  163. package/build/src/plugin/runtime.d.ts +1 -3
  164. package/build/src/plugin/runtime.js +95 -103
  165. package/build/src/protocol/amend.js +4 -3
  166. package/build/src/protocol/attempt.d.ts +2 -0
  167. package/build/src/protocol/bind.js +41 -14
  168. package/build/src/protocol/completion.d.ts +3 -0
  169. package/build/src/protocol/completion.js +35 -11
  170. package/build/src/protocol/deliver.js +165 -92
  171. package/build/src/protocol/execution-observation.d.ts +181 -0
  172. package/build/src/protocol/execution-observation.js +45 -0
  173. package/build/src/protocol/intent.d.ts +18 -22
  174. package/build/src/protocol/intent.js +63 -41
  175. package/build/src/protocol/operations.d.ts +2 -0
  176. package/build/src/protocol/placement.js +5 -1
  177. package/build/src/protocol/progress.d.ts +5 -1
  178. package/build/src/protocol/progress.js +10 -1
  179. package/build/src/protocol/read/status.d.ts +1 -0
  180. package/build/src/protocol/read/status.js +10 -2
  181. package/build/src/protocol/reintegrate.d.ts +1 -1
  182. package/build/src/protocol/reintegrate.js +70 -43
  183. package/build/src/protocol/result-codec.js +27 -11
  184. package/build/src/protocol/review.js +53 -30
  185. package/build/src/protocol/run.d.ts +83 -36
  186. package/build/src/protocol/run.js +90 -75
  187. package/build/src/runtime/proc/run.d.ts +16 -4
  188. package/build/src/runtime/proc/run.js +64 -22
  189. package/build/src/runtime/proc/windows-launch.exe +0 -0
  190. package/build/src/settings.js +5 -14
  191. package/build/src/task/document.d.ts +5 -1
  192. package/build/src/task/document.js +6 -1
  193. package/build/src/verification/execution.d.ts +10 -2
  194. package/build/src/verification/execution.js +143 -42
  195. package/build/src/verification/observation.d.ts +41 -0
  196. package/build/src/verification/observation.js +29 -0
  197. package/package.json +3 -1
@@ -1,11 +1,108 @@
1
- import type { KillEvidence } from "../../akuma/akuma.js";
1
+ import type { AkumaStatus, KillEvidence } from "../../akuma/akuma.js";
2
+ import type { CallObservation } from "../../library/akuma-creation.js";
2
3
  import type { AkumaObservation, AkumaObservationStage, CreatedTaskObservation, DispatchAssociation } from "../../index.js";
3
4
  import type { AkumaInvocationResult } from "../commands/akuma-invoke.js";
5
+ import type { WaitObservedAkuma } from "../../akuma/fleet-execution.js";
4
6
  import type { ParsedCommand } from "../parse.js";
5
7
  import { type TextRenderContext } from "./terminal.js";
6
8
  export declare const DEFAULT_CONTEXT: TextRenderContext;
7
- export declare function associatedIdentity(id: string, alias?: string, contract?: DispatchAssociation): string;
9
+ /**
10
+ * The one blessed ruler: a run of U+2500 exactly as wide as the frame head's
11
+ * widest line, marking the boundary between an observation frame and its content.
12
+ */
13
+ export declare function frameRule(headLines: readonly string[]): string;
14
+ type FleetTimeline = AkumaObservation["status"]["timeline"];
15
+ type RenderedSnapshot = FleetTimeline;
16
+ export declare function associatedIdentity(id: string, alias?: string, _contract?: DispatchAssociation): string;
8
17
  export declare function snapshotHeading(id: string, alias: string | undefined, contract: DispatchAssociation | undefined): readonly string[];
18
+ /**
19
+ * The one place row prefixes live: time, optional source, mark, verb, content.
20
+ * A plain layout is the single-target grammar; a source layout adds the frozen
21
+ * source column a plural wait aligns across its selected set.
22
+ */
23
+ type RowLayout = Readonly<{
24
+ head: (time: string | undefined, glyph: string, verb: string) => string;
25
+ continuation: () => string;
26
+ marker: (count: number) => string;
27
+ }>;
28
+ /**
29
+ * Shared snapshot activity rendering. Full snapshots focus known tool evidence;
30
+ * `latest` preserves compact callers' established newest-entry selection.
31
+ */
32
+ export declare function snapshotActivityLines(snapshot: RenderedSnapshot, context: TextRenderContext, selection?: Readonly<{
33
+ latest?: boolean;
34
+ }>): readonly string[];
35
+ /** One command's append-only activity view, with a baseline and a final tail flush. */
36
+ export type ActivityStream = ((snapshot: RenderedSnapshot) => readonly string[]) & Readonly<{
37
+ /** Seed the sequence cursor without spending the command's live evidence budget. */
38
+ seed: (snapshot: RenderedSnapshot) => void;
39
+ /** Emit the deferred tail exactly once before the command's conclusion. */
40
+ flush: () => readonly string[];
41
+ }>;
42
+ /**
43
+ * Append-only live view over one command's successive settled snapshots. The
44
+ * first three tools stream immediately; later tools wait in a two-row tail
45
+ * until the command ends. As a newer tool displaces an older tail candidate,
46
+ * its body becomes an in-place omission count. Narrative waits only while a
47
+ * preceding tail tool still decides its position.
48
+ */
49
+ export declare function activityStream(context: TextRenderContext, layout?: RowLayout): ActivityStream;
50
+ /** What a wait conclusion renders over: its observed and unobserved members. */
51
+ export type WaitConclusionResult = Readonly<{
52
+ observations: readonly AkumaObservation[];
53
+ unobserved: readonly Readonly<{
54
+ id: string;
55
+ diagnostic: string;
56
+ }>[];
57
+ }>;
58
+ /** One selected Akuma's frozen identity, resolved before the first observation round. */
59
+ export type WaitSelectedIdentity = Readonly<{
60
+ id: string;
61
+ alias?: string;
62
+ }>;
63
+ export type WaitObservationStream = Readonly<{
64
+ /** Freeze the selected set's identities so the source column is stable before the first row. */
65
+ select: (selected: readonly WaitSelectedIdentity[]) => void;
66
+ /** One observation round; returns the head frames and newly settled rows to print. */
67
+ observe: (observed: readonly WaitObservedAkuma[]) => readonly string[];
68
+ /** The wait's closing scoreboard, or the empty string when there is nothing to print. */
69
+ conclude: (result: WaitConclusionResult) => string;
70
+ streamed: () => boolean;
71
+ }>;
72
+ /**
73
+ * Live view over a wait's successive observation rounds, one append-only
74
+ * stream per selected Akuma. Each Akuma's stream opens with its identity frame
75
+ * — the identity and Contract association the observed facts carry — before any
76
+ * row; an already settled Akuma prints that frame and never replays backlog
77
+ * rows. `conclude` renders the closing rows once the wait ends: one row per
78
+ * observed Akuma in `<clock> <mark> <verb> — <duration>` grammar, with a target
79
+ * named for a multi-target scoreboard and no activity replay.
80
+ */
81
+ export declare function waitObservationStream(context: TextRenderContext, options?: Readonly<{
82
+ now?: () => number;
83
+ }>): WaitObservationStream;
84
+ /** The identity a streamed observing call's head frame renders from its resolved birth. */
85
+ export type ObservedCallHead = Readonly<{
86
+ id: string;
87
+ alias?: string;
88
+ contract: DispatchAssociation;
89
+ facts: readonly string[];
90
+ }>;
91
+ export type CallObservationStream = Readonly<{
92
+ observe: (status: AkumaStatus) => readonly string[];
93
+ conclude: (observation: CallObservation) => string;
94
+ opened: () => boolean;
95
+ }>;
96
+ /**
97
+ * Live view over one observing call: its identity frame and birth diagnostics
98
+ * open the stream once, settled rows follow as they arrive, and the return
99
+ * appends one conclusion in single-target wait grammar. The stream never
100
+ * replays its own activity as a final snapshot, and it never carries the
101
+ * birth receipt's cwd row.
102
+ */
103
+ export declare function callObservationStream(context: TextRenderContext, head: ObservedCallHead, options?: Readonly<{
104
+ now?: () => number;
105
+ }>): CallObservationStream;
9
106
  type SnapshotView = Readonly<{
10
107
  status: AkumaObservation["status"];
11
108
  contract: DispatchAssociation;
@@ -14,6 +111,7 @@ type SnapshotView = Readonly<{
14
111
  type SnapshotCoreOptions = Readonly<{
15
112
  alias?: string;
16
113
  facts?: readonly string[];
114
+ showAllowed?: boolean;
17
115
  }>;
18
116
  export declare function snapshotText(view: SnapshotView, context: TextRenderContext, options?: SnapshotCoreOptions): string;
19
117
  export declare function killResultText(id: string, evidence: KillEvidence, alias?: string): string;