@joe-broadhead/messaging 0.8.0 → 0.9.0

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 (50) hide show
  1. package/CHANGELOG.md +150 -0
  2. package/dist/bin/messaging-mcp.js +202 -31
  3. package/dist/bin/messaging-relay.js +291 -43
  4. package/dist/bin/messaging.js +290 -32
  5. package/dist/bin/messagingd.js +1158 -138
  6. package/dist/lib/modules/core/agent/present.js +5 -0
  7. package/dist/lib/modules/core/agent-tools.js +12 -0
  8. package/dist/lib/modules/core/consent.js +54 -14
  9. package/dist/lib/modules/core/contact-card.js +3 -3
  10. package/dist/lib/modules/core/index.js +1 -1
  11. package/dist/lib/modules/core/jelly-host.js +3 -0
  12. package/dist/lib/modules/core/schema/common.js +2 -0
  13. package/dist/lib/modules/core/schema/consent.js +20 -3
  14. package/dist/lib/modules/core/schema/conv-frames.js +10 -3
  15. package/dist/lib/modules/core/schema/directory-frames.js +8 -3
  16. package/dist/lib/modules/core/schema/errors.js +3 -2
  17. package/dist/lib/modules/core/schema/ipc/consent.js +85 -10
  18. package/dist/lib/modules/core/schema/ipc/conversation-views.js +8 -1
  19. package/dist/lib/modules/core/schema/ipc/conversations.js +5 -1
  20. package/dist/lib/modules/core/schema/ipc/device.js +7 -0
  21. package/dist/lib/modules/core/schema/ipc/jelly.js +14 -7
  22. package/dist/lib/modules/core/schema/ipc/shapes.js +60 -1
  23. package/dist/lib/modules/core/schema/ipc.js +51 -3
  24. package/dist/lib/modules/core/version.js +1 -1
  25. package/dist/spec/messaging-v1.md +321 -49
  26. package/dist/types/core/agent/present.d.ts +1 -1
  27. package/dist/types/core/agent-tools.d.ts +32 -0
  28. package/dist/types/core/consent.d.ts +30 -7
  29. package/dist/types/core/contact-card.d.ts +3 -3
  30. package/dist/types/core/conversation-agent-tools.d.ts +21 -0
  31. package/dist/types/core/index.d.ts +1 -1
  32. package/dist/types/core/schema/common.d.ts +2 -0
  33. package/dist/types/core/schema/consent.d.ts +23 -2
  34. package/dist/types/core/schema/conv-frames.d.ts +6 -2
  35. package/dist/types/core/schema/directory-frames.d.ts +8 -3
  36. package/dist/types/core/schema/envelope.d.ts +2 -0
  37. package/dist/types/core/schema/errors.d.ts +2 -0
  38. package/dist/types/core/schema/ipc/consent.d.ts +377 -15
  39. package/dist/types/core/schema/ipc/conversation-views.d.ts +176 -0
  40. package/dist/types/core/schema/ipc/conversations.d.ts +368 -0
  41. package/dist/types/core/schema/ipc/device.d.ts +6 -0
  42. package/dist/types/core/schema/ipc/jelly.d.ts +14 -6
  43. package/dist/types/core/schema/ipc/shapes.d.ts +198 -0
  44. package/dist/types/core/schema/ipc/surfaces.d.ts +1 -0
  45. package/dist/types/core/schema/ipc/tasks.d.ts +2 -0
  46. package/dist/types/core/schema/ipc.d.ts +826 -3
  47. package/dist/types/core/schema/relay.d.ts +4 -0
  48. package/dist/types/core/version.d.ts +1 -1
  49. package/dist/types/ipc/server.d.ts +6 -0
  50. package/package.json +1 -1
@@ -15,7 +15,9 @@ export declare const WaitingOnThemView: z.ZodObject<{
15
15
  agent: z.ZodOptional<z.ZodString>;
16
16
  state: z.ZodEnum<{
17
17
  held: "held";
18
+ resend: "resend";
18
19
  "pending-delivery": "pending-delivery";
20
+ outdated: "outdated";
19
21
  }>;
20
22
  }, z.core.$strip>;
21
23
  export type WaitingOnThemView = z.infer<typeof WaitingOnThemView>;
@@ -175,6 +177,10 @@ export declare const ConvListResult: z.ZodObject<{
175
177
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
176
178
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
177
179
  }>;
180
+ cancel: z.ZodOptional<z.ZodObject<{
181
+ name: z.ZodLiteral<"cancel">;
182
+ token: z.ZodString;
183
+ }, z.core.$strict>>;
178
184
  }, z.core.$strip>>;
179
185
  notice: z.ZodOptional<z.ZodObject<{
180
186
  op: z.ZodEnum<{
@@ -322,6 +328,10 @@ export declare const ConvReadResult: z.ZodUnion<readonly [z.ZodObject<{
322
328
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
323
329
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
324
330
  }>;
331
+ cancel: z.ZodOptional<z.ZodObject<{
332
+ name: z.ZodLiteral<"cancel">;
333
+ token: z.ZodString;
334
+ }, z.core.$strict>>;
325
335
  }, z.core.$strip>>;
326
336
  notice: z.ZodOptional<z.ZodObject<{
327
337
  op: z.ZodEnum<{
@@ -507,6 +517,10 @@ export declare const ConvSyncResult: z.ZodObject<{
507
517
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
508
518
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
509
519
  }>;
520
+ cancel: z.ZodOptional<z.ZodObject<{
521
+ name: z.ZodLiteral<"cancel">;
522
+ token: z.ZodString;
523
+ }, z.core.$strict>>;
510
524
  }, z.core.$strip>>;
511
525
  notice: z.ZodOptional<z.ZodObject<{
512
526
  op: z.ZodEnum<{
@@ -642,6 +656,10 @@ export declare const ConvSyncResult: z.ZodObject<{
642
656
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
643
657
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
644
658
  }>;
659
+ cancel: z.ZodOptional<z.ZodObject<{
660
+ name: z.ZodLiteral<"cancel">;
661
+ token: z.ZodString;
662
+ }, z.core.$strict>>;
645
663
  }, z.core.$strip>>;
646
664
  notice: z.ZodOptional<z.ZodObject<{
647
665
  op: z.ZodEnum<{
@@ -839,6 +857,10 @@ export declare const ConvSyncResult: z.ZodObject<{
839
857
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
840
858
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
841
859
  }>;
860
+ cancel: z.ZodOptional<z.ZodObject<{
861
+ name: z.ZodLiteral<"cancel">;
862
+ token: z.ZodString;
863
+ }, z.core.$strict>>;
842
864
  }, z.core.$strip>>;
843
865
  notice: z.ZodOptional<z.ZodObject<{
844
866
  op: z.ZodEnum<{
@@ -995,6 +1017,154 @@ export declare const ConvSyncResult: z.ZodObject<{
995
1017
  }, z.core.$strip>, z.ZodObject<{
996
1018
  type: z.ZodLiteral<"gap">;
997
1019
  pos: z.ZodNumber;
1020
+ }, z.core.$strip>, z.ZodObject<{
1021
+ type: z.ZodLiteral<"task">;
1022
+ pos: z.ZodNumber;
1023
+ task: z.ZodObject<{
1024
+ person: z.ZodOptional<z.ZodObject<{
1025
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1026
+ name: z.ZodString;
1027
+ }, z.core.$strip>>;
1028
+ role: z.ZodEnum<{
1029
+ requester: "requester";
1030
+ executor: "executor";
1031
+ }>;
1032
+ task: z.ZodObject<{
1033
+ contextId: z.ZodOptional<z.ZodString>;
1034
+ status: z.ZodObject<{
1035
+ state: z.ZodEnum<{
1036
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
1037
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
1038
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
1039
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
1040
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
1041
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
1042
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
1043
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
1044
+ }>;
1045
+ message: z.ZodOptional<z.ZodObject<{
1046
+ messageId: z.ZodString;
1047
+ contextId: z.ZodOptional<z.ZodString>;
1048
+ taskId: z.ZodOptional<z.ZodString>;
1049
+ role: z.ZodEnum<{
1050
+ ROLE_USER: "ROLE_USER";
1051
+ ROLE_AGENT: "ROLE_AGENT";
1052
+ }>;
1053
+ parts: z.ZodArray<z.ZodObject<{
1054
+ text: z.ZodOptional<z.ZodString>;
1055
+ raw: z.ZodOptional<z.ZodString>;
1056
+ url: z.ZodOptional<z.ZodString>;
1057
+ data: z.ZodOptional<z.ZodUnknown>;
1058
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1059
+ filename: z.ZodOptional<z.ZodString>;
1060
+ mediaType: z.ZodOptional<z.ZodString>;
1061
+ }, z.core.$strip>>;
1062
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1063
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1064
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1065
+ }, z.core.$strip>>;
1066
+ timestamp: z.ZodOptional<z.ZodString>;
1067
+ }, z.core.$strip>;
1068
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1069
+ artifactId: z.ZodString;
1070
+ name: z.ZodOptional<z.ZodString>;
1071
+ description: z.ZodOptional<z.ZodString>;
1072
+ parts: z.ZodArray<z.ZodObject<{
1073
+ text: z.ZodOptional<z.ZodString>;
1074
+ raw: z.ZodOptional<z.ZodString>;
1075
+ url: z.ZodOptional<z.ZodString>;
1076
+ data: z.ZodOptional<z.ZodUnknown>;
1077
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1078
+ filename: z.ZodOptional<z.ZodString>;
1079
+ mediaType: z.ZodOptional<z.ZodString>;
1080
+ }, z.core.$strip>>;
1081
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1082
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1083
+ }, z.core.$strip>>>;
1084
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
1085
+ messageId: z.ZodString;
1086
+ contextId: z.ZodOptional<z.ZodString>;
1087
+ taskId: z.ZodOptional<z.ZodString>;
1088
+ role: z.ZodEnum<{
1089
+ ROLE_USER: "ROLE_USER";
1090
+ ROLE_AGENT: "ROLE_AGENT";
1091
+ }>;
1092
+ parts: z.ZodArray<z.ZodObject<{
1093
+ text: z.ZodOptional<z.ZodString>;
1094
+ raw: z.ZodOptional<z.ZodString>;
1095
+ url: z.ZodOptional<z.ZodString>;
1096
+ data: z.ZodOptional<z.ZodUnknown>;
1097
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1098
+ filename: z.ZodOptional<z.ZodString>;
1099
+ mediaType: z.ZodOptional<z.ZodString>;
1100
+ }, z.core.$strip>>;
1101
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1102
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1103
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1104
+ }, z.core.$strip>>>;
1105
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1106
+ id: z.ZodString;
1107
+ }, z.core.$strip>;
1108
+ org: z.ZodOptional<z.ZodEnum<{
1109
+ other: "other";
1110
+ none: "none";
1111
+ same: "same";
1112
+ }>>;
1113
+ agent: z.ZodOptional<z.ZodString>;
1114
+ chain: z.ZodOptional<z.ZodObject<{
1115
+ addresses: z.ZodArray<z.ZodString>;
1116
+ depth: z.ZodNumber;
1117
+ maxDepth: z.ZodNumber;
1118
+ scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
1119
+ exp: z.ZodNumber;
1120
+ }, z.core.$strip>>;
1121
+ peer: z.ZodObject<{
1122
+ address: z.ZodString;
1123
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1124
+ agent: z.ZodOptional<z.ZodString>;
1125
+ device: z.ZodString;
1126
+ label: z.ZodString;
1127
+ }, z.core.$strip>;
1128
+ createdAt: z.ZodNumber;
1129
+ updatedAt: z.ZodNumber;
1130
+ followUps: z.ZodOptional<z.ZodArray<z.ZodObject<{
1131
+ envelopeId: z.ZodString;
1132
+ messageId: z.ZodString;
1133
+ sentAt: z.ZodNumber;
1134
+ stage: z.ZodEnum<{
1135
+ accepted: "accepted";
1136
+ relayed: "relayed";
1137
+ delivered: "delivered";
1138
+ held: "held";
1139
+ handed_to_agent: "handed_to_agent";
1140
+ read: "read";
1141
+ replied: "replied";
1142
+ rejected: "rejected";
1143
+ expired: "expired";
1144
+ }>;
1145
+ at: z.ZodNumber;
1146
+ }, z.core.$strip>>>;
1147
+ signIn: z.ZodOptional<z.ZodObject<{
1148
+ tool: z.ZodOptional<z.ZodString>;
1149
+ by: z.ZodEnum<{
1150
+ you: "you";
1151
+ them: "them";
1152
+ }>;
1153
+ }, z.core.$strip>>;
1154
+ refusal: z.ZodOptional<z.ZodObject<{
1155
+ reason: z.ZodString;
1156
+ }, z.core.$strip>>;
1157
+ question: z.ZodOptional<z.ZodObject<{
1158
+ sessionId: z.ZodString;
1159
+ approvalId: z.ZodString;
1160
+ }, z.core.$strict>>;
1161
+ key: z.ZodOptional<z.ZodNever>;
1162
+ session: z.ZodString;
1163
+ cancel: z.ZodOptional<z.ZodObject<{
1164
+ name: z.ZodLiteral<"cancel">;
1165
+ token: z.ZodString;
1166
+ }, z.core.$strict>>;
1167
+ }, z.core.$strip>;
998
1168
  }, z.core.$strip>], "type">>;
999
1169
  pos: z.ZodNumber;
1000
1170
  }, z.core.$strip>;
@@ -1225,6 +1395,10 @@ export declare const CONVERSATION_METHODS: {
1225
1395
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
1226
1396
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
1227
1397
  }>;
1398
+ cancel: z.ZodOptional<z.ZodObject<{
1399
+ name: z.ZodLiteral<"cancel">;
1400
+ token: z.ZodString;
1401
+ }, z.core.$strict>>;
1228
1402
  }, z.core.$strip>>;
1229
1403
  notice: z.ZodOptional<z.ZodObject<{
1230
1404
  op: z.ZodEnum<{
@@ -1441,6 +1615,10 @@ export declare const CONVERSATION_METHODS: {
1441
1615
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
1442
1616
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
1443
1617
  }>;
1618
+ cancel: z.ZodOptional<z.ZodObject<{
1619
+ name: z.ZodLiteral<"cancel">;
1620
+ token: z.ZodString;
1621
+ }, z.core.$strict>>;
1444
1622
  }, z.core.$strip>>;
1445
1623
  notice: z.ZodOptional<z.ZodObject<{
1446
1624
  op: z.ZodEnum<{
@@ -1640,6 +1818,10 @@ export declare const CONVERSATION_METHODS: {
1640
1818
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
1641
1819
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
1642
1820
  }>;
1821
+ cancel: z.ZodOptional<z.ZodObject<{
1822
+ name: z.ZodLiteral<"cancel">;
1823
+ token: z.ZodString;
1824
+ }, z.core.$strict>>;
1643
1825
  }, z.core.$strip>>;
1644
1826
  notice: z.ZodOptional<z.ZodObject<{
1645
1827
  op: z.ZodEnum<{
@@ -1785,6 +1967,10 @@ export declare const CONVERSATION_METHODS: {
1785
1967
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
1786
1968
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
1787
1969
  }>;
1970
+ cancel: z.ZodOptional<z.ZodObject<{
1971
+ name: z.ZodLiteral<"cancel">;
1972
+ token: z.ZodString;
1973
+ }, z.core.$strict>>;
1788
1974
  }, z.core.$strip>>;
1789
1975
  notice: z.ZodOptional<z.ZodObject<{
1790
1976
  op: z.ZodEnum<{
@@ -2294,6 +2480,10 @@ export declare const CONVERSATION_METHODS: {
2294
2480
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
2295
2481
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
2296
2482
  }>;
2483
+ cancel: z.ZodOptional<z.ZodObject<{
2484
+ name: z.ZodLiteral<"cancel">;
2485
+ token: z.ZodString;
2486
+ }, z.core.$strict>>;
2297
2487
  }, z.core.$strip>>;
2298
2488
  notice: z.ZodOptional<z.ZodObject<{
2299
2489
  op: z.ZodEnum<{
@@ -2518,6 +2708,10 @@ export declare const CONVERSATION_METHODS: {
2518
2708
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
2519
2709
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
2520
2710
  }>;
2711
+ cancel: z.ZodOptional<z.ZodObject<{
2712
+ name: z.ZodLiteral<"cancel">;
2713
+ token: z.ZodString;
2714
+ }, z.core.$strict>>;
2521
2715
  }, z.core.$strip>>;
2522
2716
  notice: z.ZodOptional<z.ZodObject<{
2523
2717
  op: z.ZodEnum<{
@@ -2660,6 +2854,10 @@ export declare const CONVERSATION_METHODS: {
2660
2854
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
2661
2855
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
2662
2856
  }>;
2857
+ cancel: z.ZodOptional<z.ZodObject<{
2858
+ name: z.ZodLiteral<"cancel">;
2859
+ token: z.ZodString;
2860
+ }, z.core.$strict>>;
2663
2861
  }, z.core.$strip>>;
2664
2862
  notice: z.ZodOptional<z.ZodObject<{
2665
2863
  op: z.ZodEnum<{
@@ -2781,6 +2979,10 @@ export declare const CONVERSATION_METHODS: {
2781
2979
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
2782
2980
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
2783
2981
  }>;
2982
+ cancel: z.ZodOptional<z.ZodObject<{
2983
+ name: z.ZodLiteral<"cancel">;
2984
+ token: z.ZodString;
2985
+ }, z.core.$strict>>;
2784
2986
  }, z.core.$strip>>;
2785
2987
  notice: z.ZodOptional<z.ZodObject<{
2786
2988
  op: z.ZodEnum<{
@@ -2994,6 +3196,10 @@ export declare const CONVERSATION_METHODS: {
2994
3196
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
2995
3197
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
2996
3198
  }>;
3199
+ cancel: z.ZodOptional<z.ZodObject<{
3200
+ name: z.ZodLiteral<"cancel">;
3201
+ token: z.ZodString;
3202
+ }, z.core.$strict>>;
2997
3203
  }, z.core.$strip>>;
2998
3204
  notice: z.ZodOptional<z.ZodObject<{
2999
3205
  op: z.ZodEnum<{
@@ -3364,6 +3570,10 @@ export declare const CONVERSATION_METHODS: {
3364
3570
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
3365
3571
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
3366
3572
  }>;
3573
+ cancel: z.ZodOptional<z.ZodObject<{
3574
+ name: z.ZodLiteral<"cancel">;
3575
+ token: z.ZodString;
3576
+ }, z.core.$strict>>;
3367
3577
  }, z.core.$strip>>;
3368
3578
  notice: z.ZodOptional<z.ZodObject<{
3369
3579
  op: z.ZodEnum<{
@@ -3499,6 +3709,10 @@ export declare const CONVERSATION_METHODS: {
3499
3709
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
3500
3710
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
3501
3711
  }>;
3712
+ cancel: z.ZodOptional<z.ZodObject<{
3713
+ name: z.ZodLiteral<"cancel">;
3714
+ token: z.ZodString;
3715
+ }, z.core.$strict>>;
3502
3716
  }, z.core.$strip>>;
3503
3717
  notice: z.ZodOptional<z.ZodObject<{
3504
3718
  op: z.ZodEnum<{
@@ -3696,6 +3910,10 @@ export declare const CONVERSATION_METHODS: {
3696
3910
  TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
3697
3911
  TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
3698
3912
  }>;
3913
+ cancel: z.ZodOptional<z.ZodObject<{
3914
+ name: z.ZodLiteral<"cancel">;
3915
+ token: z.ZodString;
3916
+ }, z.core.$strict>>;
3699
3917
  }, z.core.$strip>>;
3700
3918
  notice: z.ZodOptional<z.ZodObject<{
3701
3919
  op: z.ZodEnum<{
@@ -3852,6 +4070,154 @@ export declare const CONVERSATION_METHODS: {
3852
4070
  }, z.core.$strip>, z.ZodObject<{
3853
4071
  type: z.ZodLiteral<"gap">;
3854
4072
  pos: z.ZodNumber;
4073
+ }, z.core.$strip>, z.ZodObject<{
4074
+ type: z.ZodLiteral<"task">;
4075
+ pos: z.ZodNumber;
4076
+ task: z.ZodObject<{
4077
+ person: z.ZodOptional<z.ZodObject<{
4078
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
4079
+ name: z.ZodString;
4080
+ }, z.core.$strip>>;
4081
+ role: z.ZodEnum<{
4082
+ requester: "requester";
4083
+ executor: "executor";
4084
+ }>;
4085
+ task: z.ZodObject<{
4086
+ contextId: z.ZodOptional<z.ZodString>;
4087
+ status: z.ZodObject<{
4088
+ state: z.ZodEnum<{
4089
+ TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
4090
+ TASK_STATE_WORKING: "TASK_STATE_WORKING";
4091
+ TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
4092
+ TASK_STATE_FAILED: "TASK_STATE_FAILED";
4093
+ TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
4094
+ TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
4095
+ TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
4096
+ TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
4097
+ }>;
4098
+ message: z.ZodOptional<z.ZodObject<{
4099
+ messageId: z.ZodString;
4100
+ contextId: z.ZodOptional<z.ZodString>;
4101
+ taskId: z.ZodOptional<z.ZodString>;
4102
+ role: z.ZodEnum<{
4103
+ ROLE_USER: "ROLE_USER";
4104
+ ROLE_AGENT: "ROLE_AGENT";
4105
+ }>;
4106
+ parts: z.ZodArray<z.ZodObject<{
4107
+ text: z.ZodOptional<z.ZodString>;
4108
+ raw: z.ZodOptional<z.ZodString>;
4109
+ url: z.ZodOptional<z.ZodString>;
4110
+ data: z.ZodOptional<z.ZodUnknown>;
4111
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4112
+ filename: z.ZodOptional<z.ZodString>;
4113
+ mediaType: z.ZodOptional<z.ZodString>;
4114
+ }, z.core.$strip>>;
4115
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4116
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
4117
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
4118
+ }, z.core.$strip>>;
4119
+ timestamp: z.ZodOptional<z.ZodString>;
4120
+ }, z.core.$strip>;
4121
+ artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
4122
+ artifactId: z.ZodString;
4123
+ name: z.ZodOptional<z.ZodString>;
4124
+ description: z.ZodOptional<z.ZodString>;
4125
+ parts: z.ZodArray<z.ZodObject<{
4126
+ text: z.ZodOptional<z.ZodString>;
4127
+ raw: z.ZodOptional<z.ZodString>;
4128
+ url: z.ZodOptional<z.ZodString>;
4129
+ data: z.ZodOptional<z.ZodUnknown>;
4130
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4131
+ filename: z.ZodOptional<z.ZodString>;
4132
+ mediaType: z.ZodOptional<z.ZodString>;
4133
+ }, z.core.$strip>>;
4134
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4135
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
4136
+ }, z.core.$strip>>>;
4137
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
4138
+ messageId: z.ZodString;
4139
+ contextId: z.ZodOptional<z.ZodString>;
4140
+ taskId: z.ZodOptional<z.ZodString>;
4141
+ role: z.ZodEnum<{
4142
+ ROLE_USER: "ROLE_USER";
4143
+ ROLE_AGENT: "ROLE_AGENT";
4144
+ }>;
4145
+ parts: z.ZodArray<z.ZodObject<{
4146
+ text: z.ZodOptional<z.ZodString>;
4147
+ raw: z.ZodOptional<z.ZodString>;
4148
+ url: z.ZodOptional<z.ZodString>;
4149
+ data: z.ZodOptional<z.ZodUnknown>;
4150
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4151
+ filename: z.ZodOptional<z.ZodString>;
4152
+ mediaType: z.ZodOptional<z.ZodString>;
4153
+ }, z.core.$strip>>;
4154
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4155
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
4156
+ referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
4157
+ }, z.core.$strip>>>;
4158
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4159
+ id: z.ZodString;
4160
+ }, z.core.$strip>;
4161
+ org: z.ZodOptional<z.ZodEnum<{
4162
+ other: "other";
4163
+ none: "none";
4164
+ same: "same";
4165
+ }>>;
4166
+ agent: z.ZodOptional<z.ZodString>;
4167
+ chain: z.ZodOptional<z.ZodObject<{
4168
+ addresses: z.ZodArray<z.ZodString>;
4169
+ depth: z.ZodNumber;
4170
+ maxDepth: z.ZodNumber;
4171
+ scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
4172
+ exp: z.ZodNumber;
4173
+ }, z.core.$strip>>;
4174
+ peer: z.ZodObject<{
4175
+ address: z.ZodString;
4176
+ person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
4177
+ agent: z.ZodOptional<z.ZodString>;
4178
+ device: z.ZodString;
4179
+ label: z.ZodString;
4180
+ }, z.core.$strip>;
4181
+ createdAt: z.ZodNumber;
4182
+ updatedAt: z.ZodNumber;
4183
+ followUps: z.ZodOptional<z.ZodArray<z.ZodObject<{
4184
+ envelopeId: z.ZodString;
4185
+ messageId: z.ZodString;
4186
+ sentAt: z.ZodNumber;
4187
+ stage: z.ZodEnum<{
4188
+ accepted: "accepted";
4189
+ relayed: "relayed";
4190
+ delivered: "delivered";
4191
+ held: "held";
4192
+ handed_to_agent: "handed_to_agent";
4193
+ read: "read";
4194
+ replied: "replied";
4195
+ rejected: "rejected";
4196
+ expired: "expired";
4197
+ }>;
4198
+ at: z.ZodNumber;
4199
+ }, z.core.$strip>>>;
4200
+ signIn: z.ZodOptional<z.ZodObject<{
4201
+ tool: z.ZodOptional<z.ZodString>;
4202
+ by: z.ZodEnum<{
4203
+ you: "you";
4204
+ them: "them";
4205
+ }>;
4206
+ }, z.core.$strip>>;
4207
+ refusal: z.ZodOptional<z.ZodObject<{
4208
+ reason: z.ZodString;
4209
+ }, z.core.$strip>>;
4210
+ question: z.ZodOptional<z.ZodObject<{
4211
+ sessionId: z.ZodString;
4212
+ approvalId: z.ZodString;
4213
+ }, z.core.$strict>>;
4214
+ key: z.ZodOptional<z.ZodNever>;
4215
+ session: z.ZodString;
4216
+ cancel: z.ZodOptional<z.ZodObject<{
4217
+ name: z.ZodLiteral<"cancel">;
4218
+ token: z.ZodString;
4219
+ }, z.core.$strict>>;
4220
+ }, z.core.$strip>;
3855
4221
  }, z.core.$strip>], "type">>;
3856
4222
  pos: z.ZodNumber;
3857
4223
  }, z.core.$strip>;
@@ -3917,7 +4283,9 @@ export declare const CONVERSATION_METHODS: {
3917
4283
  agent: z.ZodOptional<z.ZodString>;
3918
4284
  state: z.ZodEnum<{
3919
4285
  held: "held";
4286
+ resend: "resend";
3920
4287
  "pending-delivery": "pending-delivery";
4288
+ outdated: "outdated";
3921
4289
  }>;
3922
4290
  }, z.core.$strip>>;
3923
4291
  cursor: z.ZodOptional<z.ZodString>;
@@ -95,6 +95,8 @@ export declare const DeviceChangeView: z.ZodObject<{
95
95
  at: z.ZodNumber;
96
96
  }, z.core.$strip>;
97
97
  export type DeviceChangeView = z.infer<typeof DeviceChangeView>;
98
+ /** A presence feature name, such as `tasks`, `conversations` or `reach`. */
99
+ export declare const PresenceFeature: z.ZodString;
98
100
  /** One device of this device's person. */
99
101
  export declare const DeviceListEntry: z.ZodObject<{
100
102
  device: z.ZodString;
@@ -129,6 +131,7 @@ export declare const DeviceListEntry: z.ZodObject<{
129
131
  }>;
130
132
  by: z.ZodString;
131
133
  }, z.core.$strip>>;
134
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
132
135
  }, z.core.$strip>;
133
136
  export type DeviceListEntry = z.infer<typeof DeviceListEntry>;
134
137
  /** What a link request asks for, and the code to compare. */
@@ -239,6 +242,7 @@ export declare const LoginState: z.ZodDiscriminatedUnion<[z.ZodObject<{
239
242
  jelly_unavailable: "jelly_unavailable";
240
243
  log_conflict: "log_conflict";
241
244
  conv_conflict: "conv_conflict";
245
+ conflict: "conflict";
242
246
  stale_epoch: "stale_epoch";
243
247
  device_limit: "device_limit";
244
248
  admission_required: "admission_required";
@@ -384,6 +388,7 @@ export declare const DEVICE_METHODS: {
384
388
  }>;
385
389
  by: z.ZodString;
386
390
  }, z.core.$strip>>;
391
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
387
392
  }, z.core.$strip>>;
388
393
  }, z.core.$strip>;
389
394
  };
@@ -531,6 +536,7 @@ export declare const DEVICE_METHODS: {
531
536
  jelly_unavailable: "jelly_unavailable";
532
537
  log_conflict: "log_conflict";
533
538
  conv_conflict: "conv_conflict";
539
+ conflict: "conflict";
534
540
  stale_epoch: "stale_epoch";
535
541
  device_limit: "device_limit";
536
542
  admission_required: "admission_required";
@@ -9,8 +9,9 @@
9
9
  */
10
10
  import { z } from "zod";
11
11
  /**
12
- * A notice's id, stable per source: `m_<line id>` (a line), `r_<request id>` (a held request), `a_<id>` (an alert).
13
- * A replay repeats the same ids, so a host rings once.
12
+ * A notice's id, stable per source: `m_<line id>` (a line), `m_task<task id>` (a task another person's agent asked of
13
+ * one of this person's agents), `r_<request id>` (a held request), `a_<id>` (an alert). A replay repeats the same ids, so
14
+ * a host rings once.
14
15
  */
15
16
  export declare const NoticeId: z.ZodString;
16
17
  export type NoticeId = z.infer<typeof NoticeId>;
@@ -63,9 +64,11 @@ export declare const NoticeDevice: z.ZodObject<{
63
64
  }, z.core.$strip>;
64
65
  export type NoticeDevice = z.infer<typeof NoticeDevice>;
65
66
  /**
66
- * One notice (design §13.11). `message`: a line in a DM or a channel from another person or their agent, or an
67
- * agent's line to its own person; `request`: a request held for the person; `alert`: an alarm of this device, a
68
- * change of the person's other devices (with `device`), or trust the person gave that ends within 7 days (with `from`).
67
+ * One notice (design §13.11). `message`: a line in a DM or a channel from another person or their agent, an
68
+ * agent's line to its own person, or a task another person's agent asked of one of this person's agents (with `key`
69
+ * `task:<task id>`, and `from` that person), never a request: it waits on the agent, not the person; `request`: a request
70
+ * held for the person (an ask held for consent stays one); `alert`: an alarm of this device, a change of the person's
71
+ * other devices (with `device`), or trust the person gave that ends within 7 days (with `from`).
69
72
  * `line` is the first line of a message, through `cleanPeerText`, only when the caller asked for lines; alerts carry
70
73
  * fixed text. `from.name` and `from.email` are untrusted text in a hosted realm.
71
74
  */
@@ -123,6 +126,7 @@ export declare const Notice: z.ZodObject<{
123
126
  team: "team";
124
127
  }>>;
125
128
  }, z.core.$strip>>;
129
+ key: z.ZodOptional<z.ZodString>;
126
130
  at: z.ZodNumber;
127
131
  }, z.core.$strip>;
128
132
  export type Notice = z.infer<typeof Notice>;
@@ -265,6 +269,7 @@ export declare const JELLY_METHODS: {
265
269
  team: "team";
266
270
  }>>;
267
271
  }, z.core.$strip>>;
272
+ key: z.ZodOptional<z.ZodString>;
268
273
  at: z.ZodNumber;
269
274
  }, z.core.$strip>>;
270
275
  counts: z.ZodObject<{
@@ -311,7 +316,9 @@ export declare const JELLY_METHODS: {
311
316
  * whose own person's mail may wake the host, and the tasks those sessions await (their unfinished requests). The relay
312
317
  * presents the ticket once, for such traffic only, while this device is offline (spec §7, "Wake tickets"). `relay`:
313
318
  * `armed` once the relay holds it, `pending` while it is not connected (it is sent at the next connection);
314
- * `awaiting`: how many task requests the relay may wake for. A directory realm only.
319
+ * `awaiting`: how many task requests the relay may wake for; `dms`: how many dms the relay may wake for, those whose
320
+ * other person shares a channel with this person and is not blocked or muted (spec §8.11, "Wake tickets"). A
321
+ * directory realm only.
315
322
  */
316
323
  readonly "wake.arm": {
317
324
  readonly params: z.ZodObject<{
@@ -325,6 +332,7 @@ export declare const JELLY_METHODS: {
325
332
  armed: "armed";
326
333
  }>;
327
334
  awaiting: z.ZodNumber;
335
+ dms: z.ZodNumber;
328
336
  }, z.core.$strip>;
329
337
  };
330
338
  /** Admin tier; host scope in `deployment: "jelly"`. The relay forgets this device's wake ticket (`pending` until connected). */