@namzu/sdk 60.2.1 → 61.0.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 (169) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +4 -4
  3. package/dist/account/registry.js +1 -1
  4. package/dist/account/registry.js.map +1 -1
  5. package/dist/config/registry.d.ts +2 -2
  6. package/dist/config/registry.d.ts.map +1 -1
  7. package/dist/config/runtime.d.ts +50 -644
  8. package/dist/config/runtime.d.ts.map +1 -1
  9. package/dist/config/runtime.js +1 -1
  10. package/dist/config/runtime.js.map +1 -1
  11. package/dist/connector/BaseConnector.d.ts +1 -1
  12. package/dist/connector/BaseConnector.d.ts.map +1 -1
  13. package/dist/connector/builtins/http.d.ts +2 -12
  14. package/dist/connector/builtins/http.d.ts.map +1 -1
  15. package/dist/connector/builtins/http.js +3 -3
  16. package/dist/connector/builtins/http.js.map +1 -1
  17. package/dist/connector/builtins/webhook.d.ts +2 -14
  18. package/dist/connector/builtins/webhook.d.ts.map +1 -1
  19. package/dist/connector/builtins/webhook.js +3 -3
  20. package/dist/connector/builtins/webhook.js.map +1 -1
  21. package/dist/connector/mcp/adapter.d.ts +2 -2
  22. package/dist/connector/mcp/adapter.d.ts.map +1 -1
  23. package/dist/connector/mcp/adapter.js +6 -4
  24. package/dist/connector/mcp/adapter.js.map +1 -1
  25. package/dist/connector/mcp/reconnect.d.ts +1 -11
  26. package/dist/connector/mcp/reconnect.d.ts.map +1 -1
  27. package/dist/connector/tools/adapter.d.ts +1 -11
  28. package/dist/connector/tools/adapter.d.ts.map +1 -1
  29. package/dist/connector/tools/adapter.js +1 -1
  30. package/dist/connector/tools/adapter.js.map +1 -1
  31. package/dist/connector/tools/definitions.js +1 -1
  32. package/dist/connector/tools/definitions.js.map +1 -1
  33. package/dist/contracts/a2a.d.ts +137 -1136
  34. package/dist/contracts/a2a.d.ts.map +1 -1
  35. package/dist/contracts/a2a.js +8 -8
  36. package/dist/contracts/a2a.js.map +1 -1
  37. package/dist/contracts/schemas.d.ts +7 -22
  38. package/dist/contracts/schemas.d.ts.map +1 -1
  39. package/dist/contracts/schemas.js +1 -1
  40. package/dist/contracts/schemas.js.map +1 -1
  41. package/dist/contracts/session/schemas.d.ts +35 -130
  42. package/dist/contracts/session/schemas.d.ts.map +1 -1
  43. package/dist/contracts/session/schemas.js +2 -2
  44. package/dist/contracts/session/schemas.js.map +1 -1
  45. package/dist/learning/cycle.d.ts +1 -12
  46. package/dist/learning/cycle.d.ts.map +1 -1
  47. package/dist/learning/experience.d.ts +15 -56
  48. package/dist/learning/experience.d.ts.map +1 -1
  49. package/dist/learning/observation.d.ts +13 -59
  50. package/dist/learning/observation.d.ts.map +1 -1
  51. package/dist/learning/skill.d.ts +41 -556
  52. package/dist/learning/skill.d.ts.map +1 -1
  53. package/dist/learning/store.js +1 -1
  54. package/dist/learning/store.js.map +1 -1
  55. package/dist/manager/resident/consumption.d.ts +12 -46
  56. package/dist/manager/resident/consumption.d.ts.map +1 -1
  57. package/dist/manager/resident/initiative.d.ts +3 -54
  58. package/dist/manager/resident/initiative.d.ts.map +1 -1
  59. package/dist/manager/resident/outbox.d.ts +14 -104
  60. package/dist/manager/resident/outbox.d.ts.map +1 -1
  61. package/dist/manager/resident/proposal.d.ts +6 -46
  62. package/dist/manager/resident/proposal.d.ts.map +1 -1
  63. package/dist/manager/resident/store.d.ts +14 -110
  64. package/dist/manager/resident/store.d.ts.map +1 -1
  65. package/dist/pals/activity/subscription-schema.d.ts +46 -295
  66. package/dist/pals/activity/subscription-schema.d.ts.map +1 -1
  67. package/dist/pals/channels/routing.d.ts +8 -8
  68. package/dist/pals/channels/schema.d.ts +38 -202
  69. package/dist/pals/channels/schema.d.ts.map +1 -1
  70. package/dist/pals/communication/ingress-schema.d.ts +721 -7198
  71. package/dist/pals/communication/ingress-schema.d.ts.map +1 -1
  72. package/dist/pals/communication/ingress-schema.js.map +1 -1
  73. package/dist/pals/communication/schema.d.ts +171 -1819
  74. package/dist/pals/communication/schema.d.ts.map +1 -1
  75. package/dist/peers/protocol.d.ts +136 -481
  76. package/dist/peers/protocol.d.ts.map +1 -1
  77. package/dist/peers/record.d.ts +24 -106
  78. package/dist/peers/record.d.ts.map +1 -1
  79. package/dist/registry/tool/dialect.d.ts +4 -4
  80. package/dist/registry/tool/dialect.js +4 -4
  81. package/dist/registry/tool/json-schema.d.ts +35 -0
  82. package/dist/registry/tool/json-schema.d.ts.map +1 -0
  83. package/dist/registry/tool/json-schema.js +40 -0
  84. package/dist/registry/tool/json-schema.js.map +1 -0
  85. package/dist/registry/tool/portable.js +2 -2
  86. package/dist/registry/tool/portable.js.map +1 -1
  87. package/dist/registry/tool/schema.d.ts.map +1 -1
  88. package/dist/registry/tool/schema.js +3 -6
  89. package/dist/registry/tool/schema.js.map +1 -1
  90. package/dist/store/evidence/index-page.d.ts +11 -42
  91. package/dist/store/evidence/index-page.d.ts.map +1 -1
  92. package/dist/store/evidence/search-input.d.ts +1 -1
  93. package/dist/store/evidence/search-input.d.ts.map +1 -1
  94. package/dist/store/evidence/selection.d.ts +1 -1
  95. package/dist/store/evidence/selection.d.ts.map +1 -1
  96. package/dist/store/evidence/source-text.d.ts +4 -25
  97. package/dist/store/evidence/source-text.d.ts.map +1 -1
  98. package/dist/tools/builtins/browser.d.ts +43 -267
  99. package/dist/tools/builtins/browser.d.ts.map +1 -1
  100. package/dist/tools/builtins/code-analysis.d.ts +7 -7
  101. package/dist/tools/builtins/computer-use.d.ts +138 -647
  102. package/dist/tools/builtins/computer-use.d.ts.map +1 -1
  103. package/dist/tools/builtins/edit.d.ts +5 -117
  104. package/dist/tools/builtins/edit.d.ts.map +1 -1
  105. package/dist/tools/builtins/grep.d.ts +4 -4
  106. package/dist/tools/builtins/lsp.d.ts +1 -1
  107. package/dist/tools/builtins/read-file.d.ts +2 -2
  108. package/dist/tools/builtins/skill.d.ts +2 -2
  109. package/dist/tools/builtins/view-image.d.ts +1 -5
  110. package/dist/tools/builtins/view-image.d.ts.map +1 -1
  111. package/dist/tools/builtins/wait-for-job.d.ts +2 -2
  112. package/dist/tools/builtins/web.d.ts +1 -1
  113. package/dist/tools/coordinator/index.d.ts.map +1 -1
  114. package/dist/tools/coordinator/index.js +1 -3
  115. package/dist/tools/coordinator/index.js.map +1 -1
  116. package/dist/tools/defineTool.js.map +1 -1
  117. package/dist/tools/memory/fields.d.ts +6 -1
  118. package/dist/tools/memory/fields.d.ts.map +1 -1
  119. package/dist/types/authorization/index.d.ts +82 -294
  120. package/dist/types/authorization/index.d.ts.map +1 -1
  121. package/dist/types/connector/core.d.ts +2 -2
  122. package/dist/types/connector/core.d.ts.map +1 -1
  123. package/dist/types/connector/definition.d.ts +1 -1
  124. package/dist/types/connector/definition.d.ts.map +1 -1
  125. package/dist/types/decision/index.d.ts +1 -9
  126. package/dist/types/decision/index.d.ts.map +1 -1
  127. package/dist/types/harness/schema.d.ts +121 -321
  128. package/dist/types/harness/schema.d.ts.map +1 -1
  129. package/dist/types/plugin/index.d.ts +14 -92
  130. package/dist/types/plugin/index.d.ts.map +1 -1
  131. package/dist/types/plugin/index.js +1 -1
  132. package/dist/types/plugin/index.js.map +1 -1
  133. package/dist/types/sandbox/index.d.ts +13 -47
  134. package/dist/types/sandbox/index.d.ts.map +1 -1
  135. package/dist/types/session/checkpoint.d.ts +22 -256
  136. package/dist/types/session/checkpoint.d.ts.map +1 -1
  137. package/dist/types/session/records.d.ts +889 -6072
  138. package/dist/types/session/records.d.ts.map +1 -1
  139. package/dist/types/session/records.js +2 -2
  140. package/dist/types/session/records.js.map +1 -1
  141. package/dist/types/tool/index.d.ts +1 -1
  142. package/dist/types/tool/index.d.ts.map +1 -1
  143. package/package.json +3 -5
  144. package/src/account/registry.ts +1 -1
  145. package/src/config/registry.ts +2 -2
  146. package/src/config/runtime.ts +1 -1
  147. package/src/connector/BaseConnector.ts +1 -1
  148. package/src/connector/builtins/http.ts +3 -3
  149. package/src/connector/builtins/webhook.ts +3 -3
  150. package/src/connector/mcp/adapter.ts +14 -9
  151. package/src/connector/tools/adapter.ts +1 -1
  152. package/src/connector/tools/definitions.ts +1 -1
  153. package/src/contracts/a2a.ts +8 -8
  154. package/src/contracts/schemas.ts +1 -1
  155. package/src/contracts/session/schemas.ts +2 -2
  156. package/src/learning/store.ts +1 -1
  157. package/src/pals/communication/ingress-schema.ts +1 -1
  158. package/src/registry/tool/dialect.ts +4 -4
  159. package/src/registry/tool/json-schema.ts +76 -0
  160. package/src/registry/tool/portable.ts +2 -2
  161. package/src/registry/tool/schema.ts +3 -6
  162. package/src/tools/coordinator/index.ts +2 -4
  163. package/src/tools/defineTool.ts +1 -1
  164. package/src/types/connector/core.ts +2 -2
  165. package/src/types/connector/definition.ts +1 -1
  166. package/src/types/plugin/index.ts +1 -1
  167. package/src/types/session/checkpoint.ts +1 -1
  168. package/src/types/session/records.ts +4 -8
  169. package/src/types/tool/index.ts +1 -1
@@ -32,9 +32,18 @@ export declare const MAX_PEER_MESSAGE_TEXT_BYTES: number;
32
32
  export declare const DEFAULT_PEER_READ_DEADLINE_MS = 2000;
33
33
  /** Concurrent connections a `createPeerEndpoint` server accepts before refusing new ones. */
34
34
  export declare const MAX_PEER_CONNECTIONS = 16;
35
- export declare const PeerSessionKindSchema: z.ZodEnum<["tui", "exec", "resident", "scheduled"]>;
35
+ export declare const PeerSessionKindSchema: z.ZodEnum<{
36
+ resident: "resident";
37
+ exec: "exec";
38
+ scheduled: "scheduled";
39
+ tui: "tui";
40
+ }>;
36
41
  export type PeerSessionKind = z.infer<typeof PeerSessionKindSchema>;
37
- export declare const PeerSessionStateSchema: z.ZodEnum<["busy", "idle", "awaiting-permission"]>;
42
+ export declare const PeerSessionStateSchema: z.ZodEnum<{
43
+ busy: "busy";
44
+ idle: "idle";
45
+ "awaiting-permission": "awaiting-permission";
46
+ }>;
38
47
  export type PeerSessionState = z.infer<typeof PeerSessionStateSchema>;
39
48
  /** First 6 hex characters of `sha256(sessionId)` — see `registry.ts` `derivePeerRef`. */
40
49
  export declare const PeerRefSchema: z.ZodString;
@@ -45,44 +54,27 @@ export declare const PeerFromSchema: z.ZodObject<{
45
54
  name: z.ZodString;
46
55
  address: z.ZodString;
47
56
  mode: z.ZodString;
48
- kind: z.ZodEnum<["tui", "exec", "resident", "scheduled"]>;
49
- }, "strict", z.ZodTypeAny, {
50
- name: string;
51
- kind: "resident" | "exec" | "scheduled" | "tui";
52
- sessionId: string;
53
- mode: string;
54
- address: string;
55
- ref: string;
56
- }, {
57
- name: string;
58
- kind: "resident" | "exec" | "scheduled" | "tui";
59
- sessionId: string;
60
- mode: string;
61
- address: string;
62
- ref: string;
63
- }>;
57
+ kind: z.ZodEnum<{
58
+ resident: "resident";
59
+ exec: "exec";
60
+ scheduled: "scheduled";
61
+ tui: "tui";
62
+ }>;
63
+ }, z.core.$strict>;
64
64
  export type PeerFrom = z.infer<typeof PeerFromSchema>;
65
65
  export declare const PingRequestSchema: z.ZodObject<{
66
66
  protocol: z.ZodLiteral<"namzu-peer/1">;
67
67
  op: z.ZodLiteral<"ping">;
68
- }, "strict", z.ZodTypeAny, {
69
- protocol: "namzu-peer/1";
70
- op: "ping";
71
- }, {
72
- protocol: "namzu-peer/1";
73
- op: "ping";
74
- }>;
68
+ }, z.core.$strict>;
75
69
  export type PingRequest = z.infer<typeof PingRequestSchema>;
76
70
  export declare const PingResponseSchema: z.ZodObject<{
77
71
  ok: z.ZodBoolean;
78
- state: z.ZodEnum<["busy", "idle", "awaiting-permission"]>;
79
- }, "strict", z.ZodTypeAny, {
80
- ok: boolean;
81
- state: "busy" | "idle" | "awaiting-permission";
82
- }, {
83
- ok: boolean;
84
- state: "busy" | "idle" | "awaiting-permission";
85
- }>;
72
+ state: z.ZodEnum<{
73
+ busy: "busy";
74
+ idle: "idle";
75
+ "awaiting-permission": "awaiting-permission";
76
+ }>;
77
+ }, z.core.$strict>;
86
78
  export type PingResponse = z.infer<typeof PingResponseSchema>;
87
79
  export declare const DeliverRequestSchema: z.ZodObject<{
88
80
  protocol: z.ZodLiteral<"namzu-peer/1">;
@@ -95,71 +87,32 @@ export declare const DeliverRequestSchema: z.ZodObject<{
95
87
  name: z.ZodString;
96
88
  address: z.ZodString;
97
89
  mode: z.ZodString;
98
- kind: z.ZodEnum<["tui", "exec", "resident", "scheduled"]>;
99
- }, "strict", z.ZodTypeAny, {
100
- name: string;
101
- kind: "resident" | "exec" | "scheduled" | "tui";
102
- sessionId: string;
103
- mode: string;
104
- address: string;
105
- ref: string;
106
- }, {
107
- name: string;
108
- kind: "resident" | "exec" | "scheduled" | "tui";
109
- sessionId: string;
110
- mode: string;
111
- address: string;
112
- ref: string;
113
- }>;
114
- text: z.ZodEffects<z.ZodString, string, string>;
90
+ kind: z.ZodEnum<{
91
+ resident: "resident";
92
+ exec: "exec";
93
+ scheduled: "scheduled";
94
+ tui: "tui";
95
+ }>;
96
+ }, z.core.$strict>;
97
+ text: z.ZodString;
115
98
  inReplyTo: z.ZodOptional<z.ZodString>;
116
99
  subscribeIdle: z.ZodOptional<z.ZodBoolean>;
117
- }, "strict", z.ZodTypeAny, {
118
- text: string;
119
- id: string;
120
- from: {
121
- name: string;
122
- kind: "resident" | "exec" | "scheduled" | "tui";
123
- sessionId: string;
124
- mode: string;
125
- address: string;
126
- ref: string;
127
- };
128
- protocol: "namzu-peer/1";
129
- token: string;
130
- op: "deliver";
131
- inReplyTo?: string | undefined;
132
- subscribeIdle?: boolean | undefined;
133
- }, {
134
- text: string;
135
- id: string;
136
- from: {
137
- name: string;
138
- kind: "resident" | "exec" | "scheduled" | "tui";
139
- sessionId: string;
140
- mode: string;
141
- address: string;
142
- ref: string;
143
- };
144
- protocol: "namzu-peer/1";
145
- token: string;
146
- op: "deliver";
147
- inReplyTo?: string | undefined;
148
- subscribeIdle?: boolean | undefined;
149
- }>;
100
+ }, z.core.$strict>;
150
101
  export type DeliverRequest = z.infer<typeof DeliverRequestSchema>;
151
- export declare const DeliverStatusSchema: z.ZodEnum<["queued", "held", "refused"]>;
102
+ export declare const DeliverStatusSchema: z.ZodEnum<{
103
+ refused: "refused";
104
+ queued: "queued";
105
+ held: "held";
106
+ }>;
152
107
  export type DeliverStatus = z.infer<typeof DeliverStatusSchema>;
153
108
  export declare const DeliverResponseSchema: z.ZodObject<{
154
- status: z.ZodEnum<["queued", "held", "refused"]>;
109
+ status: z.ZodEnum<{
110
+ refused: "refused";
111
+ queued: "queued";
112
+ held: "held";
113
+ }>;
155
114
  reason: z.ZodOptional<z.ZodString>;
156
- }, "strict", z.ZodTypeAny, {
157
- status: "refused" | "queued" | "held";
158
- reason?: string | undefined;
159
- }, {
160
- status: "refused" | "queued" | "held";
161
- reason?: string | undefined;
162
- }>;
115
+ }, z.core.$strict>;
163
116
  export type DeliverResponse = z.infer<typeof DeliverResponseSchema>;
164
117
  export declare const SubscribeIdleRequestSchema: z.ZodObject<{
165
118
  protocol: z.ZodLiteral<"namzu-peer/1">;
@@ -172,269 +125,104 @@ export declare const SubscribeIdleRequestSchema: z.ZodObject<{
172
125
  name: z.ZodString;
173
126
  address: z.ZodString;
174
127
  mode: z.ZodString;
175
- kind: z.ZodEnum<["tui", "exec", "resident", "scheduled"]>;
176
- }, "strict", z.ZodTypeAny, {
177
- name: string;
178
- kind: "resident" | "exec" | "scheduled" | "tui";
179
- sessionId: string;
180
- mode: string;
181
- address: string;
182
- ref: string;
183
- }, {
184
- name: string;
185
- kind: "resident" | "exec" | "scheduled" | "tui";
186
- sessionId: string;
187
- mode: string;
188
- address: string;
189
- ref: string;
190
- }>;
191
- }, "strict", z.ZodTypeAny, {
192
- id: string;
193
- from: {
194
- name: string;
195
- kind: "resident" | "exec" | "scheduled" | "tui";
196
- sessionId: string;
197
- mode: string;
198
- address: string;
199
- ref: string;
200
- };
201
- protocol: "namzu-peer/1";
202
- token: string;
203
- op: "subscribe_idle";
204
- }, {
205
- id: string;
206
- from: {
207
- name: string;
208
- kind: "resident" | "exec" | "scheduled" | "tui";
209
- sessionId: string;
210
- mode: string;
211
- address: string;
212
- ref: string;
213
- };
214
- protocol: "namzu-peer/1";
215
- token: string;
216
- op: "subscribe_idle";
217
- }>;
128
+ kind: z.ZodEnum<{
129
+ resident: "resident";
130
+ exec: "exec";
131
+ scheduled: "scheduled";
132
+ tui: "tui";
133
+ }>;
134
+ }, z.core.$strict>;
135
+ }, z.core.$strict>;
218
136
  export type SubscribeIdleRequest = z.infer<typeof SubscribeIdleRequestSchema>;
219
137
  export declare const SubscribeIdleResponseSchema: z.ZodObject<{
220
- status: z.ZodEnum<["subscribed", "refused"]>;
221
- }, "strict", z.ZodTypeAny, {
222
- status: "refused" | "subscribed";
223
- }, {
224
- status: "refused" | "subscribed";
225
- }>;
138
+ status: z.ZodEnum<{
139
+ refused: "refused";
140
+ subscribed: "subscribed";
141
+ }>;
142
+ }, z.core.$strict>;
226
143
  export type SubscribeIdleResponse = z.infer<typeof SubscribeIdleResponseSchema>;
227
144
  export declare const PeerNoticeAboutSchema: z.ZodObject<{
228
145
  sessionId: z.ZodString;
229
146
  name: z.ZodString;
230
147
  ref: z.ZodString;
231
- }, "strict", z.ZodTypeAny, {
232
- name: string;
233
- sessionId: string;
234
- ref: string;
235
- }, {
236
- name: string;
237
- sessionId: string;
238
- ref: string;
239
- }>;
148
+ }, z.core.$strict>;
240
149
  export type PeerNoticeAbout = z.infer<typeof PeerNoticeAboutSchema>;
241
150
  export declare const NoticeRequestSchema: z.ZodObject<{
242
151
  protocol: z.ZodLiteral<"namzu-peer/1">;
243
152
  op: z.ZodLiteral<"notice">;
244
153
  token: z.ZodString;
245
- /**
246
- * The sender's asserted identity, checked the same way `deliver` and
247
- * `subscribe_idle` check theirs (§1.3): the recipient's endpoint runs it
248
- * through `verifySender` before calling `onNotice`. A notice with no
249
- * `from` — the shape this protocol shipped with first — is not a
250
- * well-formed request at all, the same as a `deliver` with no `from`.
251
- */
252
154
  from: z.ZodObject<{
253
155
  sessionId: z.ZodString;
254
156
  ref: z.ZodString;
255
157
  name: z.ZodString;
256
158
  address: z.ZodString;
257
159
  mode: z.ZodString;
258
- kind: z.ZodEnum<["tui", "exec", "resident", "scheduled"]>;
259
- }, "strict", z.ZodTypeAny, {
260
- name: string;
261
- kind: "resident" | "exec" | "scheduled" | "tui";
262
- sessionId: string;
263
- mode: string;
264
- address: string;
265
- ref: string;
266
- }, {
267
- name: string;
268
- kind: "resident" | "exec" | "scheduled" | "tui";
269
- sessionId: string;
270
- mode: string;
271
- address: string;
272
- ref: string;
160
+ kind: z.ZodEnum<{
161
+ resident: "resident";
162
+ exec: "exec";
163
+ scheduled: "scheduled";
164
+ tui: "tui";
165
+ }>;
166
+ }, z.core.$strict>;
167
+ kind: z.ZodEnum<{
168
+ idle: "idle";
169
+ exited: "exited";
170
+ delivery: "delivery";
273
171
  }>;
274
- kind: z.ZodEnum<["idle", "exited", "delivery"]>;
275
172
  about: z.ZodObject<{
276
173
  sessionId: z.ZodString;
277
174
  name: z.ZodString;
278
175
  ref: z.ZodString;
279
- }, "strict", z.ZodTypeAny, {
280
- name: string;
281
- sessionId: string;
282
- ref: string;
283
- }, {
284
- name: string;
285
- sessionId: string;
286
- ref: string;
287
- }>;
288
- /** Only meaningful, and only ever set, when `kind === 'delivery'`. */
289
- outcome: z.ZodOptional<z.ZodEnum<["queued", "held", "refused"]>>;
176
+ }, z.core.$strict>;
177
+ outcome: z.ZodOptional<z.ZodEnum<{
178
+ refused: "refused";
179
+ queued: "queued";
180
+ held: "held";
181
+ }>>;
290
182
  detail: z.ZodOptional<z.ZodString>;
291
- }, "strict", z.ZodTypeAny, {
292
- kind: "idle" | "exited" | "delivery";
293
- from: {
294
- name: string;
295
- kind: "resident" | "exec" | "scheduled" | "tui";
296
- sessionId: string;
297
- mode: string;
298
- address: string;
299
- ref: string;
300
- };
301
- protocol: "namzu-peer/1";
302
- token: string;
303
- op: "notice";
304
- about: {
305
- name: string;
306
- sessionId: string;
307
- ref: string;
308
- };
309
- detail?: string | undefined;
310
- outcome?: "refused" | "queued" | "held" | undefined;
311
- }, {
312
- kind: "idle" | "exited" | "delivery";
313
- from: {
314
- name: string;
315
- kind: "resident" | "exec" | "scheduled" | "tui";
316
- sessionId: string;
317
- mode: string;
318
- address: string;
319
- ref: string;
320
- };
321
- protocol: "namzu-peer/1";
322
- token: string;
323
- op: "notice";
324
- about: {
325
- name: string;
326
- sessionId: string;
327
- ref: string;
328
- };
329
- detail?: string | undefined;
330
- outcome?: "refused" | "queued" | "held" | undefined;
331
- }>;
183
+ }, z.core.$strict>;
332
184
  export type NoticeRequest = z.infer<typeof NoticeRequestSchema>;
333
185
  export declare const NoticeResponseSchema: z.ZodObject<{
334
186
  ok: z.ZodBoolean;
335
- }, "strict", z.ZodTypeAny, {
336
- ok: boolean;
337
- }, {
338
- ok: boolean;
339
- }>;
187
+ }, z.core.$strict>;
340
188
  export type NoticeResponse = z.infer<typeof NoticeResponseSchema>;
341
189
  /** The notice payload alone, with no envelope — what a host builds and what `formatPeerNotice` renders. */
342
- export declare const PeerNoticePayloadSchema: z.ZodObject<Omit<{
343
- protocol: z.ZodLiteral<"namzu-peer/1">;
344
- op: z.ZodLiteral<"notice">;
345
- token: z.ZodString;
346
- /**
347
- * The sender's asserted identity, checked the same way `deliver` and
348
- * `subscribe_idle` check theirs (§1.3): the recipient's endpoint runs it
349
- * through `verifySender` before calling `onNotice`. A notice with no
350
- * `from` — the shape this protocol shipped with first — is not a
351
- * well-formed request at all, the same as a `deliver` with no `from`.
352
- */
190
+ export declare const PeerNoticePayloadSchema: z.ZodObject<{
191
+ kind: z.ZodEnum<{
192
+ idle: "idle";
193
+ exited: "exited";
194
+ delivery: "delivery";
195
+ }>;
196
+ detail: z.ZodOptional<z.ZodString>;
353
197
  from: z.ZodObject<{
354
198
  sessionId: z.ZodString;
355
199
  ref: z.ZodString;
356
200
  name: z.ZodString;
357
201
  address: z.ZodString;
358
202
  mode: z.ZodString;
359
- kind: z.ZodEnum<["tui", "exec", "resident", "scheduled"]>;
360
- }, "strict", z.ZodTypeAny, {
361
- name: string;
362
- kind: "resident" | "exec" | "scheduled" | "tui";
363
- sessionId: string;
364
- mode: string;
365
- address: string;
366
- ref: string;
367
- }, {
368
- name: string;
369
- kind: "resident" | "exec" | "scheduled" | "tui";
370
- sessionId: string;
371
- mode: string;
372
- address: string;
373
- ref: string;
374
- }>;
375
- kind: z.ZodEnum<["idle", "exited", "delivery"]>;
203
+ kind: z.ZodEnum<{
204
+ resident: "resident";
205
+ exec: "exec";
206
+ scheduled: "scheduled";
207
+ tui: "tui";
208
+ }>;
209
+ }, z.core.$strict>;
210
+ outcome: z.ZodOptional<z.ZodEnum<{
211
+ refused: "refused";
212
+ queued: "queued";
213
+ held: "held";
214
+ }>>;
376
215
  about: z.ZodObject<{
377
216
  sessionId: z.ZodString;
378
217
  name: z.ZodString;
379
218
  ref: z.ZodString;
380
- }, "strict", z.ZodTypeAny, {
381
- name: string;
382
- sessionId: string;
383
- ref: string;
384
- }, {
385
- name: string;
386
- sessionId: string;
387
- ref: string;
388
- }>;
389
- /** Only meaningful, and only ever set, when `kind === 'delivery'`. */
390
- outcome: z.ZodOptional<z.ZodEnum<["queued", "held", "refused"]>>;
391
- detail: z.ZodOptional<z.ZodString>;
392
- }, "protocol" | "token" | "op">, "strict", z.ZodTypeAny, {
393
- kind: "idle" | "exited" | "delivery";
394
- from: {
395
- name: string;
396
- kind: "resident" | "exec" | "scheduled" | "tui";
397
- sessionId: string;
398
- mode: string;
399
- address: string;
400
- ref: string;
401
- };
402
- about: {
403
- name: string;
404
- sessionId: string;
405
- ref: string;
406
- };
407
- detail?: string | undefined;
408
- outcome?: "refused" | "queued" | "held" | undefined;
409
- }, {
410
- kind: "idle" | "exited" | "delivery";
411
- from: {
412
- name: string;
413
- kind: "resident" | "exec" | "scheduled" | "tui";
414
- sessionId: string;
415
- mode: string;
416
- address: string;
417
- ref: string;
418
- };
419
- about: {
420
- name: string;
421
- sessionId: string;
422
- ref: string;
423
- };
424
- detail?: string | undefined;
425
- outcome?: "refused" | "queued" | "held" | undefined;
426
- }>;
219
+ }, z.core.$strict>;
220
+ }, z.core.$strict>;
427
221
  export type PeerNoticePayload = z.infer<typeof PeerNoticePayloadSchema>;
428
- export declare const PeerRequestSchema: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
222
+ export declare const PeerRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
429
223
  protocol: z.ZodLiteral<"namzu-peer/1">;
430
224
  op: z.ZodLiteral<"ping">;
431
- }, "strict", z.ZodTypeAny, {
432
- protocol: "namzu-peer/1";
433
- op: "ping";
434
- }, {
435
- protocol: "namzu-peer/1";
436
- op: "ping";
437
- }>, z.ZodObject<{
225
+ }, z.core.$strict>, z.ZodObject<{
438
226
  protocol: z.ZodLiteral<"namzu-peer/1">;
439
227
  op: z.ZodLiteral<"deliver">;
440
228
  token: z.ZodString;
@@ -445,58 +233,17 @@ export declare const PeerRequestSchema: z.ZodDiscriminatedUnion<"op", [z.ZodObje
445
233
  name: z.ZodString;
446
234
  address: z.ZodString;
447
235
  mode: z.ZodString;
448
- kind: z.ZodEnum<["tui", "exec", "resident", "scheduled"]>;
449
- }, "strict", z.ZodTypeAny, {
450
- name: string;
451
- kind: "resident" | "exec" | "scheduled" | "tui";
452
- sessionId: string;
453
- mode: string;
454
- address: string;
455
- ref: string;
456
- }, {
457
- name: string;
458
- kind: "resident" | "exec" | "scheduled" | "tui";
459
- sessionId: string;
460
- mode: string;
461
- address: string;
462
- ref: string;
463
- }>;
464
- text: z.ZodEffects<z.ZodString, string, string>;
236
+ kind: z.ZodEnum<{
237
+ resident: "resident";
238
+ exec: "exec";
239
+ scheduled: "scheduled";
240
+ tui: "tui";
241
+ }>;
242
+ }, z.core.$strict>;
243
+ text: z.ZodString;
465
244
  inReplyTo: z.ZodOptional<z.ZodString>;
466
245
  subscribeIdle: z.ZodOptional<z.ZodBoolean>;
467
- }, "strict", z.ZodTypeAny, {
468
- text: string;
469
- id: string;
470
- from: {
471
- name: string;
472
- kind: "resident" | "exec" | "scheduled" | "tui";
473
- sessionId: string;
474
- mode: string;
475
- address: string;
476
- ref: string;
477
- };
478
- protocol: "namzu-peer/1";
479
- token: string;
480
- op: "deliver";
481
- inReplyTo?: string | undefined;
482
- subscribeIdle?: boolean | undefined;
483
- }, {
484
- text: string;
485
- id: string;
486
- from: {
487
- name: string;
488
- kind: "resident" | "exec" | "scheduled" | "tui";
489
- sessionId: string;
490
- mode: string;
491
- address: string;
492
- ref: string;
493
- };
494
- protocol: "namzu-peer/1";
495
- token: string;
496
- op: "deliver";
497
- inReplyTo?: string | undefined;
498
- subscribeIdle?: boolean | undefined;
499
- }>, z.ZodObject<{
246
+ }, z.core.$strict>, z.ZodObject<{
500
247
  protocol: z.ZodLiteral<"namzu-peer/1">;
501
248
  op: z.ZodLiteral<"subscribe_idle">;
502
249
  token: z.ZodString;
@@ -507,139 +254,47 @@ export declare const PeerRequestSchema: z.ZodDiscriminatedUnion<"op", [z.ZodObje
507
254
  name: z.ZodString;
508
255
  address: z.ZodString;
509
256
  mode: z.ZodString;
510
- kind: z.ZodEnum<["tui", "exec", "resident", "scheduled"]>;
511
- }, "strict", z.ZodTypeAny, {
512
- name: string;
513
- kind: "resident" | "exec" | "scheduled" | "tui";
514
- sessionId: string;
515
- mode: string;
516
- address: string;
517
- ref: string;
518
- }, {
519
- name: string;
520
- kind: "resident" | "exec" | "scheduled" | "tui";
521
- sessionId: string;
522
- mode: string;
523
- address: string;
524
- ref: string;
525
- }>;
526
- }, "strict", z.ZodTypeAny, {
527
- id: string;
528
- from: {
529
- name: string;
530
- kind: "resident" | "exec" | "scheduled" | "tui";
531
- sessionId: string;
532
- mode: string;
533
- address: string;
534
- ref: string;
535
- };
536
- protocol: "namzu-peer/1";
537
- token: string;
538
- op: "subscribe_idle";
539
- }, {
540
- id: string;
541
- from: {
542
- name: string;
543
- kind: "resident" | "exec" | "scheduled" | "tui";
544
- sessionId: string;
545
- mode: string;
546
- address: string;
547
- ref: string;
548
- };
549
- protocol: "namzu-peer/1";
550
- token: string;
551
- op: "subscribe_idle";
552
- }>, z.ZodObject<{
257
+ kind: z.ZodEnum<{
258
+ resident: "resident";
259
+ exec: "exec";
260
+ scheduled: "scheduled";
261
+ tui: "tui";
262
+ }>;
263
+ }, z.core.$strict>;
264
+ }, z.core.$strict>, z.ZodObject<{
553
265
  protocol: z.ZodLiteral<"namzu-peer/1">;
554
266
  op: z.ZodLiteral<"notice">;
555
267
  token: z.ZodString;
556
- /**
557
- * The sender's asserted identity, checked the same way `deliver` and
558
- * `subscribe_idle` check theirs (§1.3): the recipient's endpoint runs it
559
- * through `verifySender` before calling `onNotice`. A notice with no
560
- * `from` — the shape this protocol shipped with first — is not a
561
- * well-formed request at all, the same as a `deliver` with no `from`.
562
- */
563
268
  from: z.ZodObject<{
564
269
  sessionId: z.ZodString;
565
270
  ref: z.ZodString;
566
271
  name: z.ZodString;
567
272
  address: z.ZodString;
568
273
  mode: z.ZodString;
569
- kind: z.ZodEnum<["tui", "exec", "resident", "scheduled"]>;
570
- }, "strict", z.ZodTypeAny, {
571
- name: string;
572
- kind: "resident" | "exec" | "scheduled" | "tui";
573
- sessionId: string;
574
- mode: string;
575
- address: string;
576
- ref: string;
577
- }, {
578
- name: string;
579
- kind: "resident" | "exec" | "scheduled" | "tui";
580
- sessionId: string;
581
- mode: string;
582
- address: string;
583
- ref: string;
274
+ kind: z.ZodEnum<{
275
+ resident: "resident";
276
+ exec: "exec";
277
+ scheduled: "scheduled";
278
+ tui: "tui";
279
+ }>;
280
+ }, z.core.$strict>;
281
+ kind: z.ZodEnum<{
282
+ idle: "idle";
283
+ exited: "exited";
284
+ delivery: "delivery";
584
285
  }>;
585
- kind: z.ZodEnum<["idle", "exited", "delivery"]>;
586
286
  about: z.ZodObject<{
587
287
  sessionId: z.ZodString;
588
288
  name: z.ZodString;
589
289
  ref: z.ZodString;
590
- }, "strict", z.ZodTypeAny, {
591
- name: string;
592
- sessionId: string;
593
- ref: string;
594
- }, {
595
- name: string;
596
- sessionId: string;
597
- ref: string;
598
- }>;
599
- /** Only meaningful, and only ever set, when `kind === 'delivery'`. */
600
- outcome: z.ZodOptional<z.ZodEnum<["queued", "held", "refused"]>>;
290
+ }, z.core.$strict>;
291
+ outcome: z.ZodOptional<z.ZodEnum<{
292
+ refused: "refused";
293
+ queued: "queued";
294
+ held: "held";
295
+ }>>;
601
296
  detail: z.ZodOptional<z.ZodString>;
602
- }, "strict", z.ZodTypeAny, {
603
- kind: "idle" | "exited" | "delivery";
604
- from: {
605
- name: string;
606
- kind: "resident" | "exec" | "scheduled" | "tui";
607
- sessionId: string;
608
- mode: string;
609
- address: string;
610
- ref: string;
611
- };
612
- protocol: "namzu-peer/1";
613
- token: string;
614
- op: "notice";
615
- about: {
616
- name: string;
617
- sessionId: string;
618
- ref: string;
619
- };
620
- detail?: string | undefined;
621
- outcome?: "refused" | "queued" | "held" | undefined;
622
- }, {
623
- kind: "idle" | "exited" | "delivery";
624
- from: {
625
- name: string;
626
- kind: "resident" | "exec" | "scheduled" | "tui";
627
- sessionId: string;
628
- mode: string;
629
- address: string;
630
- ref: string;
631
- };
632
- protocol: "namzu-peer/1";
633
- token: string;
634
- op: "notice";
635
- about: {
636
- name: string;
637
- sessionId: string;
638
- ref: string;
639
- };
640
- detail?: string | undefined;
641
- outcome?: "refused" | "queued" | "held" | undefined;
642
- }>]>;
297
+ }, z.core.$strict>], "op">;
643
298
  export type PeerRequest = z.infer<typeof PeerRequestSchema>;
644
299
  export type PeerResponse = PingResponse | DeliverResponse | SubscribeIdleResponse | NoticeResponse;
645
300
  //# sourceMappingURL=protocol.d.ts.map