@namzu/sdk 60.2.0 → 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.
- package/CHANGELOG.md +21 -0
- package/README.md +4 -4
- package/dist/account/registry.js +1 -1
- package/dist/account/registry.js.map +1 -1
- package/dist/config/registry.d.ts +2 -2
- package/dist/config/registry.d.ts.map +1 -1
- package/dist/config/runtime.d.ts +50 -644
- package/dist/config/runtime.d.ts.map +1 -1
- package/dist/config/runtime.js +1 -1
- package/dist/config/runtime.js.map +1 -1
- package/dist/connector/BaseConnector.d.ts +1 -1
- package/dist/connector/BaseConnector.d.ts.map +1 -1
- package/dist/connector/builtins/http.d.ts +2 -12
- package/dist/connector/builtins/http.d.ts.map +1 -1
- package/dist/connector/builtins/http.js +3 -3
- package/dist/connector/builtins/http.js.map +1 -1
- package/dist/connector/builtins/webhook.d.ts +2 -14
- package/dist/connector/builtins/webhook.d.ts.map +1 -1
- package/dist/connector/builtins/webhook.js +3 -3
- package/dist/connector/builtins/webhook.js.map +1 -1
- package/dist/connector/mcp/adapter.d.ts +2 -2
- package/dist/connector/mcp/adapter.d.ts.map +1 -1
- package/dist/connector/mcp/adapter.js +6 -4
- package/dist/connector/mcp/adapter.js.map +1 -1
- package/dist/connector/mcp/reconnect.d.ts +1 -11
- package/dist/connector/mcp/reconnect.d.ts.map +1 -1
- package/dist/connector/tools/adapter.d.ts +1 -11
- package/dist/connector/tools/adapter.d.ts.map +1 -1
- package/dist/connector/tools/adapter.js +1 -1
- package/dist/connector/tools/adapter.js.map +1 -1
- package/dist/connector/tools/definitions.js +1 -1
- package/dist/connector/tools/definitions.js.map +1 -1
- package/dist/contracts/a2a.d.ts +137 -1136
- package/dist/contracts/a2a.d.ts.map +1 -1
- package/dist/contracts/a2a.js +8 -8
- package/dist/contracts/a2a.js.map +1 -1
- package/dist/contracts/schemas.d.ts +7 -22
- package/dist/contracts/schemas.d.ts.map +1 -1
- package/dist/contracts/schemas.js +1 -1
- package/dist/contracts/schemas.js.map +1 -1
- package/dist/contracts/session/schemas.d.ts +35 -130
- package/dist/contracts/session/schemas.d.ts.map +1 -1
- package/dist/contracts/session/schemas.js +2 -2
- package/dist/contracts/session/schemas.js.map +1 -1
- package/dist/learning/cycle.d.ts +1 -12
- package/dist/learning/cycle.d.ts.map +1 -1
- package/dist/learning/experience.d.ts +15 -56
- package/dist/learning/experience.d.ts.map +1 -1
- package/dist/learning/observation.d.ts +13 -59
- package/dist/learning/observation.d.ts.map +1 -1
- package/dist/learning/skill.d.ts +41 -556
- package/dist/learning/skill.d.ts.map +1 -1
- package/dist/learning/store.js +1 -1
- package/dist/learning/store.js.map +1 -1
- package/dist/manager/resident/consumption.d.ts +12 -46
- package/dist/manager/resident/consumption.d.ts.map +1 -1
- package/dist/manager/resident/initiative.d.ts +3 -54
- package/dist/manager/resident/initiative.d.ts.map +1 -1
- package/dist/manager/resident/outbox.d.ts +14 -104
- package/dist/manager/resident/outbox.d.ts.map +1 -1
- package/dist/manager/resident/proposal.d.ts +6 -46
- package/dist/manager/resident/proposal.d.ts.map +1 -1
- package/dist/manager/resident/store.d.ts +14 -110
- package/dist/manager/resident/store.d.ts.map +1 -1
- package/dist/pals/activity/subscription-schema.d.ts +46 -295
- package/dist/pals/activity/subscription-schema.d.ts.map +1 -1
- package/dist/pals/channels/routing.d.ts +8 -8
- package/dist/pals/channels/schema.d.ts +38 -202
- package/dist/pals/channels/schema.d.ts.map +1 -1
- package/dist/pals/communication/ingress-schema.d.ts +721 -7198
- package/dist/pals/communication/ingress-schema.d.ts.map +1 -1
- package/dist/pals/communication/ingress-schema.js.map +1 -1
- package/dist/pals/communication/schema.d.ts +171 -1819
- package/dist/pals/communication/schema.d.ts.map +1 -1
- package/dist/peers/protocol.d.ts +136 -481
- package/dist/peers/protocol.d.ts.map +1 -1
- package/dist/peers/record.d.ts +24 -106
- package/dist/peers/record.d.ts.map +1 -1
- package/dist/registry/tool/dialect.d.ts +4 -4
- package/dist/registry/tool/dialect.js +4 -4
- package/dist/registry/tool/json-schema.d.ts +35 -0
- package/dist/registry/tool/json-schema.d.ts.map +1 -0
- package/dist/registry/tool/json-schema.js +40 -0
- package/dist/registry/tool/json-schema.js.map +1 -0
- package/dist/registry/tool/portable.js +2 -2
- package/dist/registry/tool/portable.js.map +1 -1
- package/dist/registry/tool/schema.d.ts.map +1 -1
- package/dist/registry/tool/schema.js +3 -6
- package/dist/registry/tool/schema.js.map +1 -1
- package/dist/runtime/query/iteration/index.d.ts.map +1 -1
- package/dist/runtime/query/iteration/index.js +3 -2
- package/dist/runtime/query/iteration/index.js.map +1 -1
- package/dist/runtime/query/request-void-turns.d.ts +19 -0
- package/dist/runtime/query/request-void-turns.d.ts.map +1 -0
- package/dist/runtime/query/request-void-turns.js +26 -0
- package/dist/runtime/query/request-void-turns.js.map +1 -0
- package/dist/store/evidence/index-page.d.ts +11 -42
- package/dist/store/evidence/index-page.d.ts.map +1 -1
- package/dist/store/evidence/search-input.d.ts +1 -1
- package/dist/store/evidence/search-input.d.ts.map +1 -1
- package/dist/store/evidence/selection.d.ts +1 -1
- package/dist/store/evidence/selection.d.ts.map +1 -1
- package/dist/store/evidence/source-text.d.ts +4 -25
- package/dist/store/evidence/source-text.d.ts.map +1 -1
- package/dist/tools/builtins/browser.d.ts +43 -267
- package/dist/tools/builtins/browser.d.ts.map +1 -1
- package/dist/tools/builtins/code-analysis.d.ts +7 -7
- package/dist/tools/builtins/computer-use.d.ts +138 -647
- package/dist/tools/builtins/computer-use.d.ts.map +1 -1
- package/dist/tools/builtins/edit.d.ts +5 -117
- package/dist/tools/builtins/edit.d.ts.map +1 -1
- package/dist/tools/builtins/grep.d.ts +4 -4
- package/dist/tools/builtins/lsp.d.ts +1 -1
- package/dist/tools/builtins/read-file.d.ts +2 -2
- package/dist/tools/builtins/skill.d.ts +2 -2
- package/dist/tools/builtins/view-image.d.ts +1 -5
- package/dist/tools/builtins/view-image.d.ts.map +1 -1
- package/dist/tools/builtins/wait-for-job.d.ts +2 -2
- package/dist/tools/builtins/web.d.ts +1 -1
- package/dist/tools/coordinator/index.d.ts.map +1 -1
- package/dist/tools/coordinator/index.js +1 -3
- package/dist/tools/coordinator/index.js.map +1 -1
- package/dist/tools/defineTool.js.map +1 -1
- package/dist/tools/memory/fields.d.ts +6 -1
- package/dist/tools/memory/fields.d.ts.map +1 -1
- package/dist/types/authorization/index.d.ts +82 -294
- package/dist/types/authorization/index.d.ts.map +1 -1
- package/dist/types/connector/core.d.ts +2 -2
- package/dist/types/connector/core.d.ts.map +1 -1
- package/dist/types/connector/definition.d.ts +1 -1
- package/dist/types/connector/definition.d.ts.map +1 -1
- package/dist/types/decision/index.d.ts +1 -9
- package/dist/types/decision/index.d.ts.map +1 -1
- package/dist/types/harness/schema.d.ts +121 -321
- package/dist/types/harness/schema.d.ts.map +1 -1
- package/dist/types/plugin/index.d.ts +14 -92
- package/dist/types/plugin/index.d.ts.map +1 -1
- package/dist/types/plugin/index.js +1 -1
- package/dist/types/plugin/index.js.map +1 -1
- package/dist/types/sandbox/index.d.ts +13 -47
- package/dist/types/sandbox/index.d.ts.map +1 -1
- package/dist/types/session/checkpoint.d.ts +22 -256
- package/dist/types/session/checkpoint.d.ts.map +1 -1
- package/dist/types/session/records.d.ts +889 -6072
- package/dist/types/session/records.d.ts.map +1 -1
- package/dist/types/session/records.js +2 -2
- package/dist/types/session/records.js.map +1 -1
- package/dist/types/tool/index.d.ts +1 -1
- package/dist/types/tool/index.d.ts.map +1 -1
- package/package.json +3 -5
- package/src/account/registry.ts +1 -1
- package/src/config/registry.ts +2 -2
- package/src/config/runtime.ts +1 -1
- package/src/connector/BaseConnector.ts +1 -1
- package/src/connector/builtins/http.ts +3 -3
- package/src/connector/builtins/webhook.ts +3 -3
- package/src/connector/mcp/adapter.ts +14 -9
- package/src/connector/tools/adapter.ts +1 -1
- package/src/connector/tools/definitions.ts +1 -1
- package/src/contracts/a2a.ts +8 -8
- package/src/contracts/schemas.ts +1 -1
- package/src/contracts/session/schemas.ts +2 -2
- package/src/learning/store.ts +1 -1
- package/src/pals/communication/ingress-schema.ts +1 -1
- package/src/registry/tool/dialect.ts +4 -4
- package/src/registry/tool/json-schema.ts +76 -0
- package/src/registry/tool/portable.ts +2 -2
- package/src/registry/tool/schema.ts +3 -6
- package/src/runtime/query/iteration/index.ts +3 -2
- package/src/runtime/query/request-void-turns.ts +28 -0
- package/src/tools/coordinator/index.ts +2 -4
- package/src/tools/defineTool.ts +1 -1
- package/src/types/connector/core.ts +2 -2
- package/src/types/connector/definition.ts +1 -1
- package/src/types/plugin/index.ts +1 -1
- package/src/types/session/checkpoint.ts +1 -1
- package/src/types/session/records.ts +4 -8
- package/src/types/tool/index.ts +1 -1
package/dist/peers/protocol.d.ts
CHANGED
|
@@ -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<
|
|
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<
|
|
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<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
},
|
|
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<
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
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<
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
-
},
|
|
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<
|
|
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<
|
|
109
|
+
status: z.ZodEnum<{
|
|
110
|
+
refused: "refused";
|
|
111
|
+
queued: "queued";
|
|
112
|
+
held: "held";
|
|
113
|
+
}>;
|
|
155
114
|
reason: z.ZodOptional<z.ZodString>;
|
|
156
|
-
},
|
|
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<
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
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<
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
|
|
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
|
-
},
|
|
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<
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
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
|
-
},
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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<
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
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<
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
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
|
-
},
|
|
381
|
-
|
|
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<
|
|
222
|
+
export declare const PeerRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
429
223
|
protocol: z.ZodLiteral<"namzu-peer/1">;
|
|
430
224
|
op: z.ZodLiteral<"ping">;
|
|
431
|
-
},
|
|
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<
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
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
|
-
},
|
|
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<
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
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<
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
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
|
-
},
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
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
|
-
},
|
|
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
|