@astrosheep/keiyaku 4.5.26 → 4.5.28

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 (98) hide show
  1. package/build/integrations/marketplace/plugins/keiyaku/.claude-plugin/plugin.json +1 -1
  2. package/build/integrations/marketplace/plugins/keiyaku/.codex-plugin/plugin.json +1 -1
  3. package/build/integrations/marketplace/plugins/keiyaku/package.json +1 -1
  4. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku/SKILL.md +3 -3
  5. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-akuma/SKILL.md +82 -162
  6. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-bind/SKILL.md +153 -76
  7. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-task/SKILL.md +68 -64
  8. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-workflow/SKILL.md +115 -146
  9. package/build/src/akuma/akuma-errors.d.ts +6 -0
  10. package/build/src/akuma/akuma-errors.js +11 -0
  11. package/build/src/akuma/akuma-handle.d.ts +54 -1
  12. package/build/src/akuma/akuma-handle.js +79 -8
  13. package/build/src/akuma/akuma-instance.js +6 -22
  14. package/build/src/akuma/akuma-observe.d.ts +6 -0
  15. package/build/src/akuma/akuma-observe.js +3 -1
  16. package/build/src/akuma/akuma-probe.d.ts +20 -1
  17. package/build/src/akuma/akuma-probe.js +20 -3
  18. package/build/src/akuma/akuma.d.ts +13 -0
  19. package/build/src/akuma/akuma.js +1 -0
  20. package/build/src/akuma/allowed.d.ts +2 -1
  21. package/build/src/akuma/allowed.js +9 -4
  22. package/build/src/akuma/archetype.js +3 -3
  23. package/build/src/akuma/body.js +8 -3
  24. package/build/src/akuma/fleet-execution.d.ts +13 -2
  25. package/build/src/akuma/fleet-execution.js +45 -0
  26. package/build/src/akuma/fleet-observation.d.ts +241 -0
  27. package/build/src/akuma/fleet-observation.js +13 -0
  28. package/build/src/akuma/fleet-owner-port.d.ts +12 -0
  29. package/build/src/akuma/fleet-owner-port.js +46 -0
  30. package/build/src/akuma/fleet-request.d.ts +55 -4
  31. package/build/src/akuma/fleet-request.js +101 -6
  32. package/build/src/akuma/heart/index.d.ts +1 -0
  33. package/build/src/akuma/heart/index.js +4 -1
  34. package/build/src/akuma/heart/rows.d.ts +1 -0
  35. package/build/src/akuma/heart/rows.js +8 -0
  36. package/build/src/akuma/heart/soul.js +2 -2
  37. package/build/src/akuma/identity.js +11 -9
  38. package/build/src/akuma/projection.d.ts +36 -0
  39. package/build/src/akuma/projection.js +2 -1
  40. package/build/src/akuma/provider.d.ts +14 -0
  41. package/build/src/akuma/provider.js +66 -4
  42. package/build/src/akuma/providers/acp/events.js +16 -8
  43. package/build/src/akuma/providers/claude/events.js +5 -7
  44. package/build/src/akuma/providers/opencode-sdk/events.js +9 -5
  45. package/build/src/akuma/providers/pi/events.js +4 -3
  46. package/build/src/akuma/request-lifecycle.js +10 -1
  47. package/build/src/akuma-body.js +1 -33
  48. package/build/src/alias/index.js +3 -3
  49. package/build/src/cli/commands/akuma-invoke.d.ts +8 -0
  50. package/build/src/cli/commands/akuma-invoke.js +67 -6
  51. package/build/src/cli/commands/akuma.d.ts +1 -0
  52. package/build/src/cli/commands/akuma.js +19 -30
  53. package/build/src/cli/commands/contract-help.d.ts +1 -0
  54. package/build/src/cli/commands/contract-help.js +9 -5
  55. package/build/src/cli/invoke.js +1 -1
  56. package/build/src/cli/render/akuma-activity.d.ts +7 -1
  57. package/build/src/cli/render/akuma-activity.js +164 -50
  58. package/build/src/cli/render/akuma-tool.d.ts +5 -0
  59. package/build/src/cli/render/akuma-tool.js +118 -14
  60. package/build/src/cli/render/akuma.d.ts +12 -1
  61. package/build/src/cli/render/akuma.js +74 -2
  62. package/build/src/cli/render/catalog.js +2 -3
  63. package/build/src/cli/render/contract-observation.d.ts +1 -0
  64. package/build/src/cli/render/contract-observation.js +20 -1
  65. package/build/src/cli/render/contract.js +4 -4
  66. package/build/src/cli/render/execution-progress.d.ts +1 -0
  67. package/build/src/cli/render/execution-progress.js +77 -3
  68. package/build/src/cli/render/kanshi.js +5 -19
  69. package/build/src/cli/render/terminal.js +3 -1
  70. package/build/src/cli/runtime.d.ts +6 -0
  71. package/build/src/cli/runtime.js +35 -17
  72. package/build/src/core/facts/offer.d.ts +1 -2
  73. package/build/src/core/verbs/abandon.js +1 -1
  74. package/build/src/core/verbs/amend.js +1 -1
  75. package/build/src/core/verbs/arc.js +1 -1
  76. package/build/src/core/verbs/attestation.js +1 -1
  77. package/build/src/core/verbs/bind.js +1 -1
  78. package/build/src/core/verbs/deliver.js +1 -1
  79. package/build/src/core/verbs/placement.js +1 -1
  80. package/build/src/core/verbs/reintegrate.js +1 -1
  81. package/build/src/git/admission.js +18 -7
  82. package/build/src/identity/coordinates.js +1 -1
  83. package/build/src/identity/normalize.d.ts +3 -0
  84. package/build/src/identity/normalize.js +10 -0
  85. package/build/src/identity/selector.d.ts +1 -0
  86. package/build/src/identity/selector.js +15 -4
  87. package/build/src/library/address.d.ts +33 -3
  88. package/build/src/library/address.js +90 -29
  89. package/build/src/library/akuma-creation.d.ts +1 -1
  90. package/build/src/library/akuma-creation.js +10 -52
  91. package/build/src/library/composition.d.ts +14 -1
  92. package/build/src/library/fleet.d.ts +13 -2
  93. package/build/src/library/fleet.js +142 -48
  94. package/build/src/library/keiyaku.d.ts +14 -1
  95. package/build/src/plugin/public.d.ts +2 -0
  96. package/build/src/protocol/completion.js +9 -2
  97. package/build/src/runtime/proc/windows-launch.exe +0 -0
  98. package/package.json +1 -1
@@ -10,6 +10,7 @@ declare const akumaObservationSchema: z.ZodObject<{
10
10
  asleep: "asleep";
11
11
  stranded: "stranded";
12
12
  }>;
13
+ cwd: z.ZodOptional<z.ZodString>;
13
14
  allowed: z.ZodPipe<z.ZodArray<z.ZodEnum<{
14
15
  "task.add": "task.add";
15
16
  "task.addDocument": "task.addDocument";
@@ -185,6 +186,10 @@ declare const akumaObservationSchema: z.ZodObject<{
185
186
  }, z.core.$strict>, z.ZodObject<{
186
187
  kind: z.ZodLiteral<"other">;
187
188
  display: z.ZodString;
189
+ input: z.ZodOptional<z.ZodObject<{
190
+ json: z.ZodString;
191
+ truncated: z.ZodBoolean;
192
+ }, z.core.$strict>>;
188
193
  }, z.core.$strict>]>;
189
194
  state: z.ZodLiteral<"active">;
190
195
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
@@ -232,6 +237,10 @@ declare const akumaObservationSchema: z.ZodObject<{
232
237
  }, z.core.$strict>, z.ZodObject<{
233
238
  kind: z.ZodLiteral<"other">;
234
239
  display: z.ZodString;
240
+ input: z.ZodOptional<z.ZodObject<{
241
+ json: z.ZodString;
242
+ truncated: z.ZodBoolean;
243
+ }, z.core.$strict>>;
235
244
  }, z.core.$strict>]>;
236
245
  state: z.ZodObject<{
237
246
  status: z.ZodEnum<{
@@ -387,6 +396,10 @@ declare const akumaObservationSchema: z.ZodObject<{
387
396
  }, z.core.$strict>, z.ZodObject<{
388
397
  kind: z.ZodLiteral<"other">;
389
398
  display: z.ZodString;
399
+ input: z.ZodOptional<z.ZodObject<{
400
+ json: z.ZodString;
401
+ truncated: z.ZodBoolean;
402
+ }, z.core.$strict>>;
390
403
  }, z.core.$strict>]>;
391
404
  state: z.ZodObject<{
392
405
  status: z.ZodEnum<{
@@ -469,6 +482,7 @@ declare const akumaWaitResultSchema: z.ZodObject<{
469
482
  asleep: "asleep";
470
483
  stranded: "stranded";
471
484
  }>;
485
+ cwd: z.ZodOptional<z.ZodString>;
472
486
  allowed: z.ZodPipe<z.ZodArray<z.ZodEnum<{
473
487
  "task.add": "task.add";
474
488
  "task.addDocument": "task.addDocument";
@@ -644,6 +658,10 @@ declare const akumaWaitResultSchema: z.ZodObject<{
644
658
  }, z.core.$strict>, z.ZodObject<{
645
659
  kind: z.ZodLiteral<"other">;
646
660
  display: z.ZodString;
661
+ input: z.ZodOptional<z.ZodObject<{
662
+ json: z.ZodString;
663
+ truncated: z.ZodBoolean;
664
+ }, z.core.$strict>>;
647
665
  }, z.core.$strict>]>;
648
666
  state: z.ZodLiteral<"active">;
649
667
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
@@ -691,6 +709,10 @@ declare const akumaWaitResultSchema: z.ZodObject<{
691
709
  }, z.core.$strict>, z.ZodObject<{
692
710
  kind: z.ZodLiteral<"other">;
693
711
  display: z.ZodString;
712
+ input: z.ZodOptional<z.ZodObject<{
713
+ json: z.ZodString;
714
+ truncated: z.ZodBoolean;
715
+ }, z.core.$strict>>;
694
716
  }, z.core.$strict>]>;
695
717
  state: z.ZodObject<{
696
718
  status: z.ZodEnum<{
@@ -846,6 +868,10 @@ declare const akumaWaitResultSchema: z.ZodObject<{
846
868
  }, z.core.$strict>, z.ZodObject<{
847
869
  kind: z.ZodLiteral<"other">;
848
870
  display: z.ZodString;
871
+ input: z.ZodOptional<z.ZodObject<{
872
+ json: z.ZodString;
873
+ truncated: z.ZodBoolean;
874
+ }, z.core.$strict>>;
849
875
  }, z.core.$strict>]>;
850
876
  state: z.ZodObject<{
851
877
  status: z.ZodEnum<{
@@ -1011,6 +1037,106 @@ declare const akumaTellResultSchema: z.ZodObject<{
1011
1037
  }>>]>;
1012
1038
  }, z.core.$strict>;
1013
1039
  }, z.core.$strict>;
1040
+ declare const akumaTellWaitResultSchema: z.ZodObject<{
1041
+ akuma: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
1042
+ tell: z.ZodObject<{
1043
+ admission: z.ZodObject<{
1044
+ fact: z.ZodLiteral<"recorded">;
1045
+ tellId: z.ZodString;
1046
+ }, z.core.$strict>;
1047
+ row: z.ZodObject<{
1048
+ kind: z.ZodLiteral<"tell">;
1049
+ sequence: z.ZodNumber;
1050
+ at: z.ZodString;
1051
+ tellId: z.ZodString;
1052
+ text: z.ZodString;
1053
+ state: z.ZodEnum<{
1054
+ pending: "pending";
1055
+ told: "told";
1056
+ }>;
1057
+ deliveries: z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodObject<{
1058
+ deliveredAt: z.ZodString;
1059
+ route: z.ZodEnum<{
1060
+ live: "live";
1061
+ launch: "launch";
1062
+ }>;
1063
+ turnSequence: z.ZodNumber;
1064
+ receipt: z.ZodOptional<z.ZodEnum<{
1065
+ required: "required";
1066
+ unavailable: "unavailable";
1067
+ }>>;
1068
+ }, z.core.$strict>, z.ZodTransform<Readonly<{
1069
+ turnSequence: number;
1070
+ route: "launch" | "live";
1071
+ receipt?: "unavailable" | "required";
1072
+ deliveredAt: string;
1073
+ }>, {
1074
+ deliveredAt: string;
1075
+ route: "live" | "launch";
1076
+ turnSequence: number;
1077
+ receipt?: "required" | "unavailable" | undefined;
1078
+ }>>>>;
1079
+ }, z.core.$strict>;
1080
+ wake: z.ZodUnion<readonly [z.ZodObject<{
1081
+ kind: z.ZodLiteral<"told">;
1082
+ }, z.core.$strict>, z.ZodObject<{
1083
+ kind: z.ZodLiteral<"held">;
1084
+ }, z.core.$strict>, z.ZodObject<{
1085
+ kind: z.ZodLiteral<"pursuing">;
1086
+ bodySequence: z.ZodNumber;
1087
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
1088
+ kind: z.ZodLiteral<"failed">;
1089
+ diagnostic: z.ZodString;
1090
+ child: z.ZodOptional<z.ZodObject<{
1091
+ code: z.ZodNullable<z.ZodNumber>;
1092
+ signal: z.ZodNullable<z.ZodString>;
1093
+ log: z.ZodObject<{
1094
+ path: z.ZodString;
1095
+ from: z.ZodNumber;
1096
+ to: z.ZodNumber;
1097
+ }, z.core.$strict>;
1098
+ }, z.core.$strict>>;
1099
+ }, z.core.$strict>, z.ZodTransform<{
1100
+ kind: "failed";
1101
+ diagnostic: string;
1102
+ } | {
1103
+ child: {
1104
+ code: number | null;
1105
+ signal: string | null;
1106
+ log: {
1107
+ path: string;
1108
+ from: number;
1109
+ to: number;
1110
+ };
1111
+ };
1112
+ kind: "failed";
1113
+ diagnostic: string;
1114
+ }, {
1115
+ kind: "failed";
1116
+ diagnostic: string;
1117
+ child?: {
1118
+ code: number | null;
1119
+ signal: string | null;
1120
+ log: {
1121
+ path: string;
1122
+ from: number;
1123
+ to: number;
1124
+ };
1125
+ } | undefined;
1126
+ }>>]>;
1127
+ }, z.core.$strict>;
1128
+ observation: z.ZodUnion<readonly [z.ZodObject<{
1129
+ reason: z.ZodLiteral<"answered">;
1130
+ answer: z.ZodUnknown;
1131
+ }, z.core.$strict>, z.ZodObject<{
1132
+ reason: z.ZodLiteral<"failed">;
1133
+ diagnostic: z.ZodString;
1134
+ }, z.core.$strict>, z.ZodObject<{
1135
+ reason: z.ZodLiteral<"unanswered">;
1136
+ }, z.core.$strict>, z.ZodObject<{
1137
+ reason: z.ZodLiteral<"deadline">;
1138
+ }, z.core.$strict>]>;
1139
+ }, z.core.$strict>;
1014
1140
  export type AkumaObservation = z.infer<typeof akumaObservationSchema>;
1015
1141
  export type AkumaObservationStage = (Readonly<{
1016
1142
  kind: "observed";
@@ -1022,10 +1148,12 @@ export type AkumaUnobserved = z.infer<typeof akumaUnobservedSchema>;
1022
1148
  export type AkumaWaitResult = z.infer<typeof akumaWaitResultSchema>;
1023
1149
  export type AkumaKillResult = z.infer<typeof akumaKillResultSchema>;
1024
1150
  export type AkumaTellResult = z.infer<typeof akumaTellResultSchema>;
1151
+ export type AkumaTellWaitResult = z.infer<typeof akumaTellWaitResultSchema>;
1025
1152
  export declare function parseAkumaObservation(value: unknown): AkumaObservation;
1026
1153
  export declare function isWaitResult(value: unknown): value is AkumaWaitResult;
1027
1154
  export declare function isKillResult(value: unknown): value is AkumaKillResult;
1028
1155
  export declare function isTellResult(value: unknown): value is AkumaTellResult;
1156
+ export declare function isTellWaitResult(value: unknown): value is AkumaTellWaitResult;
1029
1157
  export declare const fleetResultSchemas: {
1030
1158
  wait: z.ZodObject<{
1031
1159
  mode: z.ZodEnum<{
@@ -1047,6 +1175,7 @@ export declare const fleetResultSchemas: {
1047
1175
  asleep: "asleep";
1048
1176
  stranded: "stranded";
1049
1177
  }>;
1178
+ cwd: z.ZodOptional<z.ZodString>;
1050
1179
  allowed: z.ZodPipe<z.ZodArray<z.ZodEnum<{
1051
1180
  "task.add": "task.add";
1052
1181
  "task.addDocument": "task.addDocument";
@@ -1222,6 +1351,10 @@ export declare const fleetResultSchemas: {
1222
1351
  }, z.core.$strict>, z.ZodObject<{
1223
1352
  kind: z.ZodLiteral<"other">;
1224
1353
  display: z.ZodString;
1354
+ input: z.ZodOptional<z.ZodObject<{
1355
+ json: z.ZodString;
1356
+ truncated: z.ZodBoolean;
1357
+ }, z.core.$strict>>;
1225
1358
  }, z.core.$strict>]>;
1226
1359
  state: z.ZodLiteral<"active">;
1227
1360
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
@@ -1269,6 +1402,10 @@ export declare const fleetResultSchemas: {
1269
1402
  }, z.core.$strict>, z.ZodObject<{
1270
1403
  kind: z.ZodLiteral<"other">;
1271
1404
  display: z.ZodString;
1405
+ input: z.ZodOptional<z.ZodObject<{
1406
+ json: z.ZodString;
1407
+ truncated: z.ZodBoolean;
1408
+ }, z.core.$strict>>;
1272
1409
  }, z.core.$strict>]>;
1273
1410
  state: z.ZodObject<{
1274
1411
  status: z.ZodEnum<{
@@ -1424,6 +1561,10 @@ export declare const fleetResultSchemas: {
1424
1561
  }, z.core.$strict>, z.ZodObject<{
1425
1562
  kind: z.ZodLiteral<"other">;
1426
1563
  display: z.ZodString;
1564
+ input: z.ZodOptional<z.ZodObject<{
1565
+ json: z.ZodString;
1566
+ truncated: z.ZodBoolean;
1567
+ }, z.core.$strict>>;
1427
1568
  }, z.core.$strict>]>;
1428
1569
  state: z.ZodObject<{
1429
1570
  status: z.ZodEnum<{
@@ -1576,6 +1717,106 @@ export declare const fleetResultSchemas: {
1576
1717
  }>>]>;
1577
1718
  }, z.core.$strict>;
1578
1719
  }, z.core.$strict>;
1720
+ tellWait: z.ZodObject<{
1721
+ akuma: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
1722
+ tell: z.ZodObject<{
1723
+ admission: z.ZodObject<{
1724
+ fact: z.ZodLiteral<"recorded">;
1725
+ tellId: z.ZodString;
1726
+ }, z.core.$strict>;
1727
+ row: z.ZodObject<{
1728
+ kind: z.ZodLiteral<"tell">;
1729
+ sequence: z.ZodNumber;
1730
+ at: z.ZodString;
1731
+ tellId: z.ZodString;
1732
+ text: z.ZodString;
1733
+ state: z.ZodEnum<{
1734
+ pending: "pending";
1735
+ told: "told";
1736
+ }>;
1737
+ deliveries: z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodObject<{
1738
+ deliveredAt: z.ZodString;
1739
+ route: z.ZodEnum<{
1740
+ live: "live";
1741
+ launch: "launch";
1742
+ }>;
1743
+ turnSequence: z.ZodNumber;
1744
+ receipt: z.ZodOptional<z.ZodEnum<{
1745
+ required: "required";
1746
+ unavailable: "unavailable";
1747
+ }>>;
1748
+ }, z.core.$strict>, z.ZodTransform<Readonly<{
1749
+ turnSequence: number;
1750
+ route: "launch" | "live";
1751
+ receipt?: "unavailable" | "required";
1752
+ deliveredAt: string;
1753
+ }>, {
1754
+ deliveredAt: string;
1755
+ route: "live" | "launch";
1756
+ turnSequence: number;
1757
+ receipt?: "required" | "unavailable" | undefined;
1758
+ }>>>>;
1759
+ }, z.core.$strict>;
1760
+ wake: z.ZodUnion<readonly [z.ZodObject<{
1761
+ kind: z.ZodLiteral<"told">;
1762
+ }, z.core.$strict>, z.ZodObject<{
1763
+ kind: z.ZodLiteral<"held">;
1764
+ }, z.core.$strict>, z.ZodObject<{
1765
+ kind: z.ZodLiteral<"pursuing">;
1766
+ bodySequence: z.ZodNumber;
1767
+ }, z.core.$strict>, z.ZodPipe<z.ZodObject<{
1768
+ kind: z.ZodLiteral<"failed">;
1769
+ diagnostic: z.ZodString;
1770
+ child: z.ZodOptional<z.ZodObject<{
1771
+ code: z.ZodNullable<z.ZodNumber>;
1772
+ signal: z.ZodNullable<z.ZodString>;
1773
+ log: z.ZodObject<{
1774
+ path: z.ZodString;
1775
+ from: z.ZodNumber;
1776
+ to: z.ZodNumber;
1777
+ }, z.core.$strict>;
1778
+ }, z.core.$strict>>;
1779
+ }, z.core.$strict>, z.ZodTransform<{
1780
+ kind: "failed";
1781
+ diagnostic: string;
1782
+ } | {
1783
+ child: {
1784
+ code: number | null;
1785
+ signal: string | null;
1786
+ log: {
1787
+ path: string;
1788
+ from: number;
1789
+ to: number;
1790
+ };
1791
+ };
1792
+ kind: "failed";
1793
+ diagnostic: string;
1794
+ }, {
1795
+ kind: "failed";
1796
+ diagnostic: string;
1797
+ child?: {
1798
+ code: number | null;
1799
+ signal: string | null;
1800
+ log: {
1801
+ path: string;
1802
+ from: number;
1803
+ to: number;
1804
+ };
1805
+ } | undefined;
1806
+ }>>]>;
1807
+ }, z.core.$strict>;
1808
+ observation: z.ZodUnion<readonly [z.ZodObject<{
1809
+ reason: z.ZodLiteral<"answered">;
1810
+ answer: z.ZodUnknown;
1811
+ }, z.core.$strict>, z.ZodObject<{
1812
+ reason: z.ZodLiteral<"failed">;
1813
+ diagnostic: z.ZodString;
1814
+ }, z.core.$strict>, z.ZodObject<{
1815
+ reason: z.ZodLiteral<"unanswered">;
1816
+ }, z.core.$strict>, z.ZodObject<{
1817
+ reason: z.ZodLiteral<"deadline">;
1818
+ }, z.core.$strict>]>;
1819
+ }, z.core.$strict>;
1579
1820
  kill: z.ZodObject<{
1580
1821
  results: z.ZodArray<z.ZodObject<{
1581
1822
  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"][];