@astrosheep/keiyaku 4.5.26 → 4.5.27

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 (78) hide show
  1. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-akuma/SKILL.md +5 -4
  2. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-bind/SKILL.md +16 -14
  3. package/build/src/akuma/akuma-errors.d.ts +6 -0
  4. package/build/src/akuma/akuma-errors.js +11 -0
  5. package/build/src/akuma/akuma-handle.d.ts +53 -1
  6. package/build/src/akuma/akuma-handle.js +75 -7
  7. package/build/src/akuma/akuma-instance.js +6 -22
  8. package/build/src/akuma/akuma-probe.d.ts +20 -1
  9. package/build/src/akuma/akuma-probe.js +20 -3
  10. package/build/src/akuma/akuma.d.ts +12 -0
  11. package/build/src/akuma/allowed.d.ts +2 -1
  12. package/build/src/akuma/allowed.js +9 -4
  13. package/build/src/akuma/archetype.js +3 -3
  14. package/build/src/akuma/body.js +8 -3
  15. package/build/src/akuma/fleet-execution.d.ts +6 -1
  16. package/build/src/akuma/fleet-execution.js +44 -0
  17. package/build/src/akuma/fleet-observation.d.ts +238 -0
  18. package/build/src/akuma/fleet-observation.js +13 -0
  19. package/build/src/akuma/fleet-owner-port.d.ts +12 -0
  20. package/build/src/akuma/fleet-owner-port.js +46 -0
  21. package/build/src/akuma/fleet-request.d.ts +55 -4
  22. package/build/src/akuma/fleet-request.js +101 -6
  23. package/build/src/akuma/heart/index.d.ts +1 -0
  24. package/build/src/akuma/heart/index.js +4 -1
  25. package/build/src/akuma/heart/rows.d.ts +1 -0
  26. package/build/src/akuma/heart/rows.js +8 -0
  27. package/build/src/akuma/heart/soul.js +2 -2
  28. package/build/src/akuma/projection.d.ts +36 -0
  29. package/build/src/akuma/projection.js +2 -1
  30. package/build/src/akuma/provider.d.ts +14 -0
  31. package/build/src/akuma/provider.js +66 -4
  32. package/build/src/akuma/providers/acp/events.js +16 -8
  33. package/build/src/akuma/providers/claude/events.js +5 -7
  34. package/build/src/akuma/providers/opencode-sdk/events.js +9 -5
  35. package/build/src/akuma/providers/pi/events.js +4 -3
  36. package/build/src/akuma/request-lifecycle.js +10 -1
  37. package/build/src/akuma-body.js +1 -33
  38. package/build/src/cli/commands/akuma-invoke.d.ts +8 -0
  39. package/build/src/cli/commands/akuma-invoke.js +58 -6
  40. package/build/src/cli/commands/akuma.d.ts +1 -0
  41. package/build/src/cli/commands/akuma.js +10 -15
  42. package/build/src/cli/commands/contract-help.js +8 -5
  43. package/build/src/cli/render/akuma-activity.d.ts +7 -1
  44. package/build/src/cli/render/akuma-activity.js +158 -49
  45. package/build/src/cli/render/akuma-tool.d.ts +5 -0
  46. package/build/src/cli/render/akuma-tool.js +118 -14
  47. package/build/src/cli/render/akuma.d.ts +3 -1
  48. package/build/src/cli/render/akuma.js +34 -2
  49. package/build/src/cli/render/catalog.js +2 -3
  50. package/build/src/cli/render/contract-observation.d.ts +1 -0
  51. package/build/src/cli/render/contract-observation.js +20 -1
  52. package/build/src/cli/render/contract.js +4 -4
  53. package/build/src/cli/render/execution-progress.d.ts +1 -0
  54. package/build/src/cli/render/execution-progress.js +77 -3
  55. package/build/src/cli/render/kanshi.js +5 -19
  56. package/build/src/cli/render/terminal.js +3 -1
  57. package/build/src/cli/runtime.d.ts +6 -0
  58. package/build/src/cli/runtime.js +35 -17
  59. package/build/src/core/facts/offer.d.ts +1 -2
  60. package/build/src/core/verbs/abandon.js +1 -1
  61. package/build/src/core/verbs/amend.js +1 -1
  62. package/build/src/core/verbs/arc.js +1 -1
  63. package/build/src/core/verbs/attestation.js +1 -1
  64. package/build/src/core/verbs/bind.js +1 -1
  65. package/build/src/core/verbs/deliver.js +1 -1
  66. package/build/src/core/verbs/placement.js +1 -1
  67. package/build/src/core/verbs/reintegrate.js +1 -1
  68. package/build/src/git/admission.js +18 -7
  69. package/build/src/identity/coordinates.js +1 -1
  70. package/build/src/library/address.d.ts +33 -3
  71. package/build/src/library/address.js +89 -28
  72. package/build/src/library/composition.d.ts +12 -0
  73. package/build/src/library/fleet.d.ts +11 -1
  74. package/build/src/library/fleet.js +138 -48
  75. package/build/src/library/keiyaku.d.ts +12 -0
  76. package/build/src/plugin/public.d.ts +2 -0
  77. package/build/src/runtime/proc/windows-launch.exe +0 -0
  78. package/package.json +1 -1
@@ -185,6 +185,10 @@ declare const akumaObservationSchema: z.ZodObject<{
185
185
  }, z.core.$strict>, z.ZodObject<{
186
186
  kind: z.ZodLiteral<"other">;
187
187
  display: z.ZodString;
188
+ input: z.ZodOptional<z.ZodObject<{
189
+ json: z.ZodString;
190
+ truncated: z.ZodBoolean;
191
+ }, z.core.$strict>>;
188
192
  }, z.core.$strict>]>;
189
193
  state: z.ZodLiteral<"active">;
190
194
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
@@ -232,6 +236,10 @@ declare const akumaObservationSchema: z.ZodObject<{
232
236
  }, z.core.$strict>, z.ZodObject<{
233
237
  kind: z.ZodLiteral<"other">;
234
238
  display: z.ZodString;
239
+ input: z.ZodOptional<z.ZodObject<{
240
+ json: z.ZodString;
241
+ truncated: z.ZodBoolean;
242
+ }, z.core.$strict>>;
235
243
  }, z.core.$strict>]>;
236
244
  state: z.ZodObject<{
237
245
  status: z.ZodEnum<{
@@ -387,6 +395,10 @@ declare const akumaObservationSchema: z.ZodObject<{
387
395
  }, z.core.$strict>, z.ZodObject<{
388
396
  kind: z.ZodLiteral<"other">;
389
397
  display: z.ZodString;
398
+ input: z.ZodOptional<z.ZodObject<{
399
+ json: z.ZodString;
400
+ truncated: z.ZodBoolean;
401
+ }, z.core.$strict>>;
390
402
  }, z.core.$strict>]>;
391
403
  state: z.ZodObject<{
392
404
  status: z.ZodEnum<{
@@ -644,6 +656,10 @@ declare const akumaWaitResultSchema: z.ZodObject<{
644
656
  }, z.core.$strict>, z.ZodObject<{
645
657
  kind: z.ZodLiteral<"other">;
646
658
  display: z.ZodString;
659
+ input: z.ZodOptional<z.ZodObject<{
660
+ json: z.ZodString;
661
+ truncated: z.ZodBoolean;
662
+ }, z.core.$strict>>;
647
663
  }, z.core.$strict>]>;
648
664
  state: z.ZodLiteral<"active">;
649
665
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
@@ -691,6 +707,10 @@ declare const akumaWaitResultSchema: z.ZodObject<{
691
707
  }, z.core.$strict>, z.ZodObject<{
692
708
  kind: z.ZodLiteral<"other">;
693
709
  display: z.ZodString;
710
+ input: z.ZodOptional<z.ZodObject<{
711
+ json: z.ZodString;
712
+ truncated: z.ZodBoolean;
713
+ }, z.core.$strict>>;
694
714
  }, z.core.$strict>]>;
695
715
  state: z.ZodObject<{
696
716
  status: z.ZodEnum<{
@@ -846,6 +866,10 @@ declare const akumaWaitResultSchema: z.ZodObject<{
846
866
  }, z.core.$strict>, z.ZodObject<{
847
867
  kind: z.ZodLiteral<"other">;
848
868
  display: z.ZodString;
869
+ input: z.ZodOptional<z.ZodObject<{
870
+ json: z.ZodString;
871
+ truncated: z.ZodBoolean;
872
+ }, z.core.$strict>>;
849
873
  }, z.core.$strict>]>;
850
874
  state: z.ZodObject<{
851
875
  status: z.ZodEnum<{
@@ -1011,6 +1035,106 @@ declare const akumaTellResultSchema: z.ZodObject<{
1011
1035
  }>>]>;
1012
1036
  }, z.core.$strict>;
1013
1037
  }, z.core.$strict>;
1038
+ declare const akumaTellWaitResultSchema: z.ZodObject<{
1039
+ akuma: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
1040
+ tell: z.ZodObject<{
1041
+ admission: z.ZodObject<{
1042
+ fact: z.ZodLiteral<"recorded">;
1043
+ tellId: z.ZodString;
1044
+ }, z.core.$strict>;
1045
+ row: z.ZodObject<{
1046
+ kind: z.ZodLiteral<"tell">;
1047
+ sequence: z.ZodNumber;
1048
+ at: z.ZodString;
1049
+ tellId: z.ZodString;
1050
+ text: z.ZodString;
1051
+ state: z.ZodEnum<{
1052
+ pending: "pending";
1053
+ told: "told";
1054
+ }>;
1055
+ deliveries: z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodObject<{
1056
+ deliveredAt: z.ZodString;
1057
+ route: z.ZodEnum<{
1058
+ live: "live";
1059
+ launch: "launch";
1060
+ }>;
1061
+ turnSequence: z.ZodNumber;
1062
+ receipt: z.ZodOptional<z.ZodEnum<{
1063
+ required: "required";
1064
+ unavailable: "unavailable";
1065
+ }>>;
1066
+ }, z.core.$strict>, z.ZodTransform<Readonly<{
1067
+ turnSequence: number;
1068
+ route: "launch" | "live";
1069
+ receipt?: "unavailable" | "required";
1070
+ deliveredAt: string;
1071
+ }>, {
1072
+ deliveredAt: string;
1073
+ route: "live" | "launch";
1074
+ turnSequence: number;
1075
+ receipt?: "required" | "unavailable" | undefined;
1076
+ }>>>>;
1077
+ }, z.core.$strict>;
1078
+ wake: z.ZodUnion<readonly [z.ZodObject<{
1079
+ kind: z.ZodLiteral<"told">;
1080
+ }, z.core.$strict>, z.ZodObject<{
1081
+ kind: z.ZodLiteral<"held">;
1082
+ }, z.core.$strict>, z.ZodObject<{
1083
+ kind: z.ZodLiteral<"pursuing">;
1084
+ bodySequence: z.ZodNumber;
1085
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
1086
+ kind: z.ZodLiteral<"failed">;
1087
+ diagnostic: z.ZodString;
1088
+ child: z.ZodOptional<z.ZodObject<{
1089
+ code: z.ZodNullable<z.ZodNumber>;
1090
+ signal: z.ZodNullable<z.ZodString>;
1091
+ log: z.ZodObject<{
1092
+ path: z.ZodString;
1093
+ from: z.ZodNumber;
1094
+ to: z.ZodNumber;
1095
+ }, z.core.$strict>;
1096
+ }, z.core.$strict>>;
1097
+ }, z.core.$strict>, z.ZodTransform<{
1098
+ kind: "failed";
1099
+ diagnostic: string;
1100
+ } | {
1101
+ child: {
1102
+ code: number | null;
1103
+ signal: string | null;
1104
+ log: {
1105
+ path: string;
1106
+ from: number;
1107
+ to: number;
1108
+ };
1109
+ };
1110
+ kind: "failed";
1111
+ diagnostic: string;
1112
+ }, {
1113
+ kind: "failed";
1114
+ diagnostic: string;
1115
+ child?: {
1116
+ code: number | null;
1117
+ signal: string | null;
1118
+ log: {
1119
+ path: string;
1120
+ from: number;
1121
+ to: number;
1122
+ };
1123
+ } | undefined;
1124
+ }>>]>;
1125
+ }, z.core.$strict>;
1126
+ observation: z.ZodUnion<readonly [z.ZodObject<{
1127
+ reason: z.ZodLiteral<"answered">;
1128
+ answer: z.ZodUnknown;
1129
+ }, z.core.$strict>, z.ZodObject<{
1130
+ reason: z.ZodLiteral<"failed">;
1131
+ diagnostic: z.ZodString;
1132
+ }, z.core.$strict>, z.ZodObject<{
1133
+ reason: z.ZodLiteral<"unanswered">;
1134
+ }, z.core.$strict>, z.ZodObject<{
1135
+ reason: z.ZodLiteral<"deadline">;
1136
+ }, z.core.$strict>]>;
1137
+ }, z.core.$strict>;
1014
1138
  export type AkumaObservation = z.infer<typeof akumaObservationSchema>;
1015
1139
  export type AkumaObservationStage = (Readonly<{
1016
1140
  kind: "observed";
@@ -1022,10 +1146,12 @@ export type AkumaUnobserved = z.infer<typeof akumaUnobservedSchema>;
1022
1146
  export type AkumaWaitResult = z.infer<typeof akumaWaitResultSchema>;
1023
1147
  export type AkumaKillResult = z.infer<typeof akumaKillResultSchema>;
1024
1148
  export type AkumaTellResult = z.infer<typeof akumaTellResultSchema>;
1149
+ export type AkumaTellWaitResult = z.infer<typeof akumaTellWaitResultSchema>;
1025
1150
  export declare function parseAkumaObservation(value: unknown): AkumaObservation;
1026
1151
  export declare function isWaitResult(value: unknown): value is AkumaWaitResult;
1027
1152
  export declare function isKillResult(value: unknown): value is AkumaKillResult;
1028
1153
  export declare function isTellResult(value: unknown): value is AkumaTellResult;
1154
+ export declare function isTellWaitResult(value: unknown): value is AkumaTellWaitResult;
1029
1155
  export declare const fleetResultSchemas: {
1030
1156
  wait: z.ZodObject<{
1031
1157
  mode: z.ZodEnum<{
@@ -1222,6 +1348,10 @@ export declare const fleetResultSchemas: {
1222
1348
  }, z.core.$strict>, z.ZodObject<{
1223
1349
  kind: z.ZodLiteral<"other">;
1224
1350
  display: z.ZodString;
1351
+ input: z.ZodOptional<z.ZodObject<{
1352
+ json: z.ZodString;
1353
+ truncated: z.ZodBoolean;
1354
+ }, z.core.$strict>>;
1225
1355
  }, z.core.$strict>]>;
1226
1356
  state: z.ZodLiteral<"active">;
1227
1357
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
@@ -1269,6 +1399,10 @@ export declare const fleetResultSchemas: {
1269
1399
  }, z.core.$strict>, z.ZodObject<{
1270
1400
  kind: z.ZodLiteral<"other">;
1271
1401
  display: z.ZodString;
1402
+ input: z.ZodOptional<z.ZodObject<{
1403
+ json: z.ZodString;
1404
+ truncated: z.ZodBoolean;
1405
+ }, z.core.$strict>>;
1272
1406
  }, z.core.$strict>]>;
1273
1407
  state: z.ZodObject<{
1274
1408
  status: z.ZodEnum<{
@@ -1424,6 +1558,10 @@ export declare const fleetResultSchemas: {
1424
1558
  }, z.core.$strict>, z.ZodObject<{
1425
1559
  kind: z.ZodLiteral<"other">;
1426
1560
  display: z.ZodString;
1561
+ input: z.ZodOptional<z.ZodObject<{
1562
+ json: z.ZodString;
1563
+ truncated: z.ZodBoolean;
1564
+ }, z.core.$strict>>;
1427
1565
  }, z.core.$strict>]>;
1428
1566
  state: z.ZodObject<{
1429
1567
  status: z.ZodEnum<{
@@ -1576,6 +1714,106 @@ export declare const fleetResultSchemas: {
1576
1714
  }>>]>;
1577
1715
  }, z.core.$strict>;
1578
1716
  }, z.core.$strict>;
1717
+ tellWait: z.ZodObject<{
1718
+ akuma: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
1719
+ tell: z.ZodObject<{
1720
+ admission: z.ZodObject<{
1721
+ fact: z.ZodLiteral<"recorded">;
1722
+ tellId: z.ZodString;
1723
+ }, z.core.$strict>;
1724
+ row: z.ZodObject<{
1725
+ kind: z.ZodLiteral<"tell">;
1726
+ sequence: z.ZodNumber;
1727
+ at: z.ZodString;
1728
+ tellId: z.ZodString;
1729
+ text: z.ZodString;
1730
+ state: z.ZodEnum<{
1731
+ pending: "pending";
1732
+ told: "told";
1733
+ }>;
1734
+ deliveries: z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodObject<{
1735
+ deliveredAt: z.ZodString;
1736
+ route: z.ZodEnum<{
1737
+ live: "live";
1738
+ launch: "launch";
1739
+ }>;
1740
+ turnSequence: z.ZodNumber;
1741
+ receipt: z.ZodOptional<z.ZodEnum<{
1742
+ required: "required";
1743
+ unavailable: "unavailable";
1744
+ }>>;
1745
+ }, z.core.$strict>, z.ZodTransform<Readonly<{
1746
+ turnSequence: number;
1747
+ route: "launch" | "live";
1748
+ receipt?: "unavailable" | "required";
1749
+ deliveredAt: string;
1750
+ }>, {
1751
+ deliveredAt: string;
1752
+ route: "live" | "launch";
1753
+ turnSequence: number;
1754
+ receipt?: "required" | "unavailable" | undefined;
1755
+ }>>>>;
1756
+ }, z.core.$strict>;
1757
+ wake: z.ZodUnion<readonly [z.ZodObject<{
1758
+ kind: z.ZodLiteral<"told">;
1759
+ }, z.core.$strict>, z.ZodObject<{
1760
+ kind: z.ZodLiteral<"held">;
1761
+ }, z.core.$strict>, z.ZodObject<{
1762
+ kind: z.ZodLiteral<"pursuing">;
1763
+ bodySequence: z.ZodNumber;
1764
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
1765
+ kind: z.ZodLiteral<"failed">;
1766
+ diagnostic: z.ZodString;
1767
+ child: z.ZodOptional<z.ZodObject<{
1768
+ code: z.ZodNullable<z.ZodNumber>;
1769
+ signal: z.ZodNullable<z.ZodString>;
1770
+ log: z.ZodObject<{
1771
+ path: z.ZodString;
1772
+ from: z.ZodNumber;
1773
+ to: z.ZodNumber;
1774
+ }, z.core.$strict>;
1775
+ }, z.core.$strict>>;
1776
+ }, z.core.$strict>, z.ZodTransform<{
1777
+ kind: "failed";
1778
+ diagnostic: string;
1779
+ } | {
1780
+ child: {
1781
+ code: number | null;
1782
+ signal: string | null;
1783
+ log: {
1784
+ path: string;
1785
+ from: number;
1786
+ to: number;
1787
+ };
1788
+ };
1789
+ kind: "failed";
1790
+ diagnostic: string;
1791
+ }, {
1792
+ kind: "failed";
1793
+ diagnostic: string;
1794
+ child?: {
1795
+ code: number | null;
1796
+ signal: string | null;
1797
+ log: {
1798
+ path: string;
1799
+ from: number;
1800
+ to: number;
1801
+ };
1802
+ } | undefined;
1803
+ }>>]>;
1804
+ }, z.core.$strict>;
1805
+ observation: z.ZodUnion<readonly [z.ZodObject<{
1806
+ reason: z.ZodLiteral<"answered">;
1807
+ answer: z.ZodUnknown;
1808
+ }, z.core.$strict>, z.ZodObject<{
1809
+ reason: z.ZodLiteral<"failed">;
1810
+ diagnostic: z.ZodString;
1811
+ }, z.core.$strict>, z.ZodObject<{
1812
+ reason: z.ZodLiteral<"unanswered">;
1813
+ }, z.core.$strict>, z.ZodObject<{
1814
+ reason: z.ZodLiteral<"deadline">;
1815
+ }, z.core.$strict>]>;
1816
+ }, z.core.$strict>;
1579
1817
  kill: z.ZodObject<{
1580
1818
  results: z.ZodArray<z.ZodObject<{
1581
1819
  id: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
@@ -58,6 +58,15 @@ const akumaWaitResultSchema = z
58
58
  .strict();
59
59
  const akumaKillResultSchema = z.object({ results: z.array(akumaKillResultItemSchema) }).strict();
60
60
  const akumaTellResultSchema = z.object({ akuma: akumaIdSchema, tell: tellResultSchema }).strict();
61
+ const tellWaitObservationSchema = z.union([
62
+ z.object({ reason: z.literal("answered"), answer: z.unknown() }).strict(),
63
+ z.object({ reason: z.literal("failed"), diagnostic: z.string() }).strict(),
64
+ z.object({ reason: z.literal("unanswered") }).strict(),
65
+ z.object({ reason: z.literal("deadline") }).strict(),
66
+ ]);
67
+ const akumaTellWaitResultSchema = z
68
+ .object({ akuma: akumaIdSchema, tell: tellResultSchema, observation: tellWaitObservationSchema })
69
+ .strict();
61
70
  export function parseAkumaObservation(value) {
62
71
  return akumaObservationSchema.parse(value);
63
72
  }
@@ -70,9 +79,13 @@ export function isKillResult(value) {
70
79
  export function isTellResult(value) {
71
80
  return akumaTellResultSchema.safeParse(value).success;
72
81
  }
82
+ export function isTellWaitResult(value) {
83
+ return akumaTellWaitResultSchema.safeParse(value).success;
84
+ }
73
85
  export const fleetResultSchemas = {
74
86
  wait: akumaWaitResultSchema,
75
87
  tell: akumaTellResultSchema,
88
+ tellWait: akumaTellWaitResultSchema,
76
89
  kill: akumaKillResultSchema,
77
90
  killEvidence: killEvidenceSchema,
78
91
  };
@@ -0,0 +1,12 @@
1
+ import type { FleetRequestPort } from "./fleet-request.js";
2
+ import type { WorldRoot } from "../world.js";
3
+ /**
4
+ * The parent's Fleet owner boundary: one forwarded request arrives as complete
5
+ * identities the child resolved without reading a Heart, and this side answers
6
+ * for them. It proves every target through the one addressability
7
+ * normalization before the operation begins, so a refusal that reaches the wire
8
+ * truthfully claims no product effect and a plural operation with an
9
+ * unaddressable member never starts; the executor's own access to the target is
10
+ * then the product act, never a second addressing probe.
11
+ */
12
+ export declare function fleetRequestPort(world: WorldRoot): FleetRequestPort;
@@ -0,0 +1,46 @@
1
+ import { requireBornAkuma } from "./akuma-probe.js";
2
+ import { Akuma as PublicAkuma } from "./akuma-instance.js";
3
+ import { executeKillAkuma, executeTellAkuma, executeTellWaitAkuma, executeWaitAkuma } from "./fleet-execution.js";
4
+ import { Schema } from "./schema.js";
5
+ /**
6
+ * The parent's Fleet owner boundary: one forwarded request arrives as complete
7
+ * identities the child resolved without reading a Heart, and this side answers
8
+ * for them. It proves every target through the one addressability
9
+ * normalization before the operation begins, so a refusal that reaches the wire
10
+ * truthfully claims no product effect and a plural operation with an
11
+ * unaddressable member never starts; the executor's own access to the target is
12
+ * then the product act, never a second addressing probe.
13
+ */
14
+ export function fleetRequestPort(world) {
15
+ const prove = async (targets) => {
16
+ for (const id of targets)
17
+ await requireBornAkuma(world, id);
18
+ };
19
+ return {
20
+ wait: async ({ targets, ...request }) => {
21
+ await prove(targets);
22
+ return await executeWaitAkuma({ path: world, ids: targets, ...request });
23
+ },
24
+ tell: async ({ target, ...request }) => {
25
+ await prove([target]);
26
+ return await executeTellAkuma({ path: world, id: target, ...request });
27
+ },
28
+ tellWait: async ({ target, ...request }) => {
29
+ await prove([target]);
30
+ return await executeTellWaitAkuma({ path: world, id: target, ...request });
31
+ },
32
+ tellAnswer: async ({ target, ...request }) => {
33
+ await prove([target]);
34
+ return await PublicAkuma.select(world, target).tell(request.body, {
35
+ schema: Schema.json(JSON.parse(request.schemaJson), (value) => value),
36
+ ...(request.interrupt === undefined ? {} : { interrupt: request.interrupt }),
37
+ ...(request.initiator === undefined ? {} : { initiator: request.initiator }),
38
+ signal: request.signal,
39
+ });
40
+ },
41
+ kill: async ({ targets, ...request }) => {
42
+ await prove(targets);
43
+ return await executeKillAkuma({ path: world, ids: targets, ...request });
44
+ },
45
+ };
46
+ }
@@ -1,7 +1,7 @@
1
1
  import type { KillEvidence } from "./heart/index.js";
2
2
  import { type ErasedRequestCommand, type RequestProtocol, type ServiceRequestCommand } from "./request-wire.js";
3
3
  import type { AkumaStatus } from "./akuma.js";
4
- import { type AkumaKillResult, type AkumaTellResult, type AkumaWaitResult } from "./fleet-observation.js";
4
+ import { type AkumaKillResult, type AkumaTellResult, type AkumaTellWaitResult, type AkumaWaitResult } from "./fleet-observation.js";
5
5
  import { z } from "zod";
6
6
  import type { Schema } from "./schema.js";
7
7
  declare const waitRequestSchema: z.ZodPipe<z.ZodObject<{
@@ -55,6 +55,29 @@ declare const tellAnswerRequestSchema: z.ZodPipe<z.ZodObject<{
55
55
  initiator?: string | undefined;
56
56
  interrupt?: boolean | undefined;
57
57
  }>>;
58
+ declare const tellWaitRequestSchema: z.ZodPipe<z.ZodObject<{
59
+ target: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
60
+ body: z.ZodString;
61
+ timeoutMs: z.ZodNumber;
62
+ schemaJson: z.ZodOptional<z.ZodString>;
63
+ initiator: z.ZodOptional<z.ZodString>;
64
+ interrupt: z.ZodOptional<z.ZodBoolean>;
65
+ }, z.core.$strict>, z.ZodTransform<{
66
+ target: import("./identity.js").AkuId;
67
+ body: string;
68
+ timeoutMs: number;
69
+ schemaJson?: string | undefined;
70
+ initiator?: string | undefined;
71
+ interrupt?: boolean | undefined;
72
+ action: "akuma.tell-wait";
73
+ }, {
74
+ target: import("./identity.js").AkuId;
75
+ body: string;
76
+ timeoutMs: number;
77
+ schemaJson?: string | undefined;
78
+ initiator?: string | undefined;
79
+ interrupt?: boolean | undefined;
80
+ }>>;
58
81
  declare const killRequestSchema: z.ZodPipe<z.ZodObject<{
59
82
  targets: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>>;
60
83
  }, z.core.$strict>, z.ZodTransform<{
@@ -71,6 +94,11 @@ declare const tellServiceSchema: z.ZodObject<{
71
94
  target: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
72
95
  tellId: z.ZodString;
73
96
  }, z.core.$strict>;
97
+ declare const tellWaitServiceSchema: z.ZodObject<{
98
+ action: z.ZodLiteral<"akuma.tell-wait">;
99
+ target: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
100
+ tellId: z.ZodString;
101
+ }, z.core.$strict>;
74
102
  declare const killServiceSchema: z.ZodObject<{
75
103
  action: z.ZodLiteral<"akuma.kill">;
76
104
  results: z.ZodArray<z.ZodObject<{
@@ -85,12 +113,14 @@ declare const killServiceSchema: z.ZodObject<{
85
113
  }>;
86
114
  }, z.core.$strict>>;
87
115
  }, z.core.$strict>;
116
+ export declare function encodeFleetLiveFailure(error: unknown): unknown | null;
117
+ export declare function decodeFleetLiveFailure(value: unknown): Error | null;
88
118
  export type FleetRequest = (Omit<z.infer<typeof waitRequestSchema>, "targets"> & Readonly<{
89
119
  targets: readonly AkumaStatus["id"][];
90
- }>) | z.infer<typeof tellRequestSchema> | z.infer<typeof tellAnswerRequestSchema> | (Omit<z.infer<typeof killRequestSchema>, "targets"> & Readonly<{
120
+ }>) | z.infer<typeof tellRequestSchema> | z.infer<typeof tellAnswerRequestSchema> | z.infer<typeof tellWaitRequestSchema> | (Omit<z.infer<typeof killRequestSchema>, "targets"> & Readonly<{
91
121
  targets: readonly AkumaStatus["id"][];
92
122
  }>);
93
- export type FleetService = z.infer<typeof waitServiceSchema> | z.infer<typeof tellServiceSchema> | (Omit<z.infer<typeof killServiceSchema>, "results"> & Readonly<{
123
+ export type FleetService = z.infer<typeof waitServiceSchema> | z.infer<typeof tellServiceSchema> | z.infer<typeof tellWaitServiceSchema> | (Omit<z.infer<typeof killServiceSchema>, "results"> & Readonly<{
94
124
  results: readonly Readonly<{
95
125
  id: AkumaStatus["id"];
96
126
  evidence: KillEvidence;
@@ -119,6 +149,17 @@ export type FleetRequestPort = Readonly<{
119
149
  interrupt?: boolean;
120
150
  signal: AbortSignal;
121
151
  }>): Promise<unknown>;
152
+ tellWait?(input: Readonly<{
153
+ target: AkumaStatus["id"];
154
+ body: string;
155
+ tellId: string;
156
+ recordedAt: string;
157
+ timeoutMs: number;
158
+ schemaJson?: string;
159
+ initiator?: string;
160
+ interrupt?: boolean;
161
+ signal: AbortSignal;
162
+ }>): Promise<AkumaTellWaitResult>;
122
163
  kill(input: Readonly<{
123
164
  targets: readonly AkumaStatus["id"][];
124
165
  signal: AbortSignal;
@@ -133,7 +174,7 @@ export type FleetRequestPort = Readonly<{
133
174
  /** Akuma owns Body Request payload, live result, and durable service codecs for wait/tell/kill. */
134
175
  export declare function fleetRequestProtocol(action: FleetRequest["action"]): RequestProtocol<FleetRequest, unknown, FleetService>;
135
176
  export declare function fleetRequestCommand(action: FleetRequest["action"], port: FleetRequestPort): ServiceRequestCommand<FleetRequest, unknown, FleetService, FleetService>;
136
- export declare function fleetRequestCommands(port: FleetRequestPort): Readonly<Record<"akuma.wait" | "akuma.tell" | "akuma.tell-answer" | "akuma.kill", ErasedRequestCommand>>;
177
+ export declare function fleetRequestCommands(port: FleetRequestPort): Readonly<Record<"akuma.wait" | "akuma.tell" | "akuma.tell-answer" | "akuma.tell-wait" | "akuma.kill", ErasedRequestCommand>>;
137
178
  export declare function requestForwardedFleetTellAnswer(input: Readonly<{
138
179
  directory: string;
139
180
  target: AkumaStatus["id"];
@@ -157,6 +198,16 @@ export declare function requestForwardedFleetTell(input: Readonly<{
157
198
  initiator?: string;
158
199
  signal?: AbortSignal;
159
200
  }>): Promise<AkumaTellResult>;
201
+ export declare function requestForwardedFleetTellWait(input: Readonly<{
202
+ directory: string;
203
+ target: AkumaStatus["id"];
204
+ body: string;
205
+ timeoutMs: number;
206
+ schema?: Schema<unknown>;
207
+ initiator?: string;
208
+ interrupt?: boolean;
209
+ signal?: AbortSignal;
210
+ }>): Promise<AkumaTellWaitResult>;
160
211
  export declare function requestForwardedFleetKill(input: Readonly<{
161
212
  directory: string;
162
213
  targets: readonly AkumaStatus["id"][];