@agentshouse/kit-wire 0.1.0-c3e145f6aa97e → 0.1.0-c896a7802e5cf
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/README.md +5 -0
- package/dist/acts.d.ts +33 -2
- package/dist/acts.js +21 -3
- package/dist/arguments.d.ts +11 -0
- package/dist/arguments.js +11 -0
- package/dist/connection.d.ts +48 -4
- package/dist/connection.js +39 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/wire.d.ts +48 -4
- package/dist/wire.js +3 -2
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -14,6 +14,11 @@ The Kit wire: every shape agents.house and the Kit exchange, declared once with
|
|
|
14
14
|
connection's subprotocol, `KIT_CONNECTION_PROTOCOL_PREFIX` followed by the wire. House serves
|
|
15
15
|
its own wire alone and answers any other with `kit_update_required`, whose `release` and
|
|
16
16
|
`commands` (`BUILDING_KIT`) name the Kit release its Building serves.
|
|
17
|
+
- At `@agentshouse/kit-wire/arguments`, the arguments House takes for each door act
|
|
18
|
+
(`KIT_DOOR_ARGUMENTS`) and for each Tool the Kit calls itself over a conversation's House
|
|
19
|
+
connection (`KIT_TOOLS`, `KIT_TOOL_ARGUMENTS`), each a zod schema of the JSON Schema of the
|
|
20
|
+
shape House refuses a call with, so a rule House checks in its own code stays out. They are
|
|
21
|
+
no part of the wire: a changed argument is a new version of this package, not a new wire.
|
|
17
22
|
|
|
18
23
|
```ts
|
|
19
24
|
import { KIT_WIRE, KIT_WIRE_HEADER, KIT_CALL, type KitActRequest } from '@agentshouse/kit-wire';
|
package/dist/acts.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ declare const CEREMONY_STEP: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
19
19
|
label: z.ZodString;
|
|
20
20
|
name: z.ZodString;
|
|
21
21
|
description: z.ZodOptional<z.ZodString>;
|
|
22
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
22
23
|
}, z.core.$strict>], "kind">;
|
|
23
24
|
export type SecretCeremonyStep = z.infer<typeof CEREMONY_STEP>;
|
|
24
25
|
export declare const DECLARED_SECRET_CEREMONY: z.ZodObject<{
|
|
@@ -35,6 +36,7 @@ export declare const DECLARED_SECRET_CEREMONY: z.ZodObject<{
|
|
|
35
36
|
label: z.ZodString;
|
|
36
37
|
name: z.ZodString;
|
|
37
38
|
description: z.ZodOptional<z.ZodString>;
|
|
39
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
38
40
|
}, z.core.$strict>], "kind">>;
|
|
39
41
|
}, z.core.$strict>;
|
|
40
42
|
export type DeclaredSecretCeremony = z.infer<typeof DECLARED_SECRET_CEREMONY>;
|
|
@@ -59,6 +61,8 @@ export declare const REPORTED_AGENT_KIND: z.ZodObject<{
|
|
|
59
61
|
failure: z.ZodNullable<z.ZodString>;
|
|
60
62
|
installing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
61
63
|
signed_in: z.ZodBoolean;
|
|
64
|
+
api_key: z.ZodOptional<z.ZodLiteral<true>>;
|
|
65
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
62
66
|
models: z.ZodArray<z.ZodObject<{
|
|
63
67
|
model: z.ZodString;
|
|
64
68
|
name: z.ZodString;
|
|
@@ -96,6 +100,10 @@ export declare const AGENT_CAPABILITY_DECLARATION: z.ZodObject<{
|
|
|
96
100
|
linux: "linux";
|
|
97
101
|
windows: "windows";
|
|
98
102
|
}>>;
|
|
103
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
104
|
+
skills: z.ZodBoolean;
|
|
105
|
+
workspace: z.ZodString;
|
|
106
|
+
}, z.core.$strict>>;
|
|
99
107
|
agents: z.ZodArray<z.ZodObject<{
|
|
100
108
|
kind: z.ZodString;
|
|
101
109
|
release: z.ZodNullable<z.ZodString>;
|
|
@@ -104,6 +112,8 @@ export declare const AGENT_CAPABILITY_DECLARATION: z.ZodObject<{
|
|
|
104
112
|
failure: z.ZodNullable<z.ZodString>;
|
|
105
113
|
installing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
106
114
|
signed_in: z.ZodBoolean;
|
|
115
|
+
api_key: z.ZodOptional<z.ZodLiteral<true>>;
|
|
116
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
107
117
|
models: z.ZodArray<z.ZodObject<{
|
|
108
118
|
model: z.ZodString;
|
|
109
119
|
name: z.ZodString;
|
|
@@ -163,6 +173,13 @@ export declare const KIT_UPLOAD_FINISH: z.ZodObject<{
|
|
|
163
173
|
upload: z.ZodUUID;
|
|
164
174
|
part_sha256: z.ZodArray<z.ZodString>;
|
|
165
175
|
}, z.core.$strict>;
|
|
176
|
+
export declare const KIT_BINARY_CHANGE: z.ZodObject<{
|
|
177
|
+
path: z.ZodString;
|
|
178
|
+
revision: z.ZodString;
|
|
179
|
+
bytes: z.ZodInt;
|
|
180
|
+
sha256: z.ZodString;
|
|
181
|
+
}, z.core.$strip>;
|
|
182
|
+
export type KitBinaryChange = z.infer<typeof KIT_BINARY_CHANGE>;
|
|
166
183
|
export declare const TRANSCRIPT: z.ZodObject<{
|
|
167
184
|
path: z.ZodString;
|
|
168
185
|
text: z.ZodString;
|
|
@@ -202,6 +219,7 @@ export declare const KIT_ACTS: {
|
|
|
202
219
|
label: z.ZodString;
|
|
203
220
|
name: z.ZodString;
|
|
204
221
|
description: z.ZodOptional<z.ZodString>;
|
|
222
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
205
223
|
}, z.core.$strict>], "kind">>;
|
|
206
224
|
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
207
225
|
outcome: z.ZodLiteral<"collected">;
|
|
@@ -229,6 +247,10 @@ export declare const KIT_ACTS: {
|
|
|
229
247
|
linux: "linux";
|
|
230
248
|
windows: "windows";
|
|
231
249
|
}>>;
|
|
250
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
251
|
+
skills: z.ZodBoolean;
|
|
252
|
+
workspace: z.ZodString;
|
|
253
|
+
}, z.core.$strict>>;
|
|
232
254
|
agents: z.ZodArray<z.ZodObject<{
|
|
233
255
|
kind: z.ZodString;
|
|
234
256
|
release: z.ZodNullable<z.ZodString>;
|
|
@@ -237,6 +259,8 @@ export declare const KIT_ACTS: {
|
|
|
237
259
|
failure: z.ZodNullable<z.ZodString>;
|
|
238
260
|
installing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
239
261
|
signed_in: z.ZodBoolean;
|
|
262
|
+
api_key: z.ZodOptional<z.ZodLiteral<true>>;
|
|
263
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
240
264
|
models: z.ZodArray<z.ZodObject<{
|
|
241
265
|
model: z.ZodString;
|
|
242
266
|
name: z.ZodString;
|
|
@@ -286,6 +310,11 @@ export declare const KIT_ACTS: {
|
|
|
286
310
|
timed_out: z.ZodLiteral<true>;
|
|
287
311
|
}, z.core.$strict>, z.ZodObject<{
|
|
288
312
|
started: z.ZodLiteral<true>;
|
|
313
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
314
|
+
settings: z.ZodObject<{
|
|
315
|
+
skills: z.ZodBoolean;
|
|
316
|
+
workspace: z.ZodString;
|
|
317
|
+
}, z.core.$strict>;
|
|
289
318
|
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>]>, z.ZodObject<{}, z.core.$strict>>;
|
|
290
319
|
'turns/start': KitActDeclaration<"conversation" | "turn", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
291
320
|
run: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -319,7 +348,9 @@ export declare const KIT_ACTS: {
|
|
|
319
348
|
secret: z.ZodBoolean;
|
|
320
349
|
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
321
350
|
'kits/report-idle': KitActDeclaration<never, z.ZodObject<{}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
322
|
-
'kits/report-restart': KitActDeclaration<never, z.ZodObject<{
|
|
351
|
+
'kits/report-restart': KitActDeclaration<never, z.ZodObject<{
|
|
352
|
+
planned: z.ZodOptional<z.ZodLiteral<true>>;
|
|
353
|
+
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
323
354
|
'conversations/credentials/issue': KitActDeclaration<"conversation", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
324
355
|
credential: z.ZodString;
|
|
325
356
|
}, z.core.$strict>>;
|
|
@@ -343,6 +374,6 @@ export type KitActRequest<Name extends KitActName> = {
|
|
|
343
374
|
readonly [Id in Declared<Name>['ids'][number]]: string;
|
|
344
375
|
} & Fields<z.input<Declared<Name>['body']>>;
|
|
345
376
|
export type KitActAnswer<Name extends KitActName> = Declared<Name>['answer'] extends z.ZodType ? z.output<Declared<Name>['answer']> : unknown;
|
|
346
|
-
export declare const KIT_DOOR_ACTS: readonly ['rooms/discover', 'room-chunks/list', 'changes/enumerate', 'files/revisions/list', '
|
|
377
|
+
export declare const KIT_DOOR_ACTS: readonly ['rooms/discover', 'room-chunks/list', 'changes/enumerate', 'files/revisions/list', 'update'];
|
|
347
378
|
export type KitDoorAct = (typeof KIT_DOOR_ACTS)[number];
|
|
348
379
|
export {};
|
package/dist/acts.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { KIT_CALL_RESULT, KIT_CAUSE } from './connection.js';
|
|
2
|
+
import { KIT_CALL_RESULT, KIT_CAUSE, KIT_SETTINGS } from './connection.js';
|
|
3
3
|
export const SHA256 = z
|
|
4
4
|
.string()
|
|
5
5
|
.regex(/^[0-9a-f]{64}$/u, "must be the file's SHA-256 as 64 lowercase hex digits");
|
|
@@ -38,6 +38,9 @@ const CEREMONY_STEP = z.discriminatedUnion('kind', [
|
|
|
38
38
|
label: LABEL,
|
|
39
39
|
name: NAME.max(SECRET_STEP_NAME_MAX),
|
|
40
40
|
description: z.string().max(SECRET_STEP_TEXT_MAX).optional(),
|
|
41
|
+
optional: z.literal(true).optional().meta({
|
|
42
|
+
description: 'Present only for a step whose value may be empty.',
|
|
43
|
+
}),
|
|
41
44
|
}),
|
|
42
45
|
]);
|
|
43
46
|
export const DECLARED_SECRET_CEREMONY = z
|
|
@@ -56,6 +59,7 @@ export const SECRET_RELAY_OUTCOME = z.discriminatedUnion('outcome', [
|
|
|
56
59
|
const AGENT_KIND_MAX = 64;
|
|
57
60
|
const AGENT_RELEASE_MAX = 64;
|
|
58
61
|
const UPDATE_COMMAND_MAX = 256;
|
|
62
|
+
const PROVIDER_HOST_MAX = 255;
|
|
59
63
|
const OPERATING_SYSTEM_MAX = 256;
|
|
60
64
|
const KIT_RELEASE_MAX = 64;
|
|
61
65
|
const OFFERED_MODELS_MAX = 256;
|
|
@@ -88,6 +92,12 @@ export const REPORTED_AGENT_KIND = z.strictObject({
|
|
|
88
92
|
description: 'Present only while the Kit installs the CLI, whose release and failure are then null.',
|
|
89
93
|
}),
|
|
90
94
|
signed_in: z.boolean(),
|
|
95
|
+
api_key: z.literal(true).optional().meta({
|
|
96
|
+
description: 'Present only while the CLI runs on an API key it found in its own settings.',
|
|
97
|
+
}),
|
|
98
|
+
provider: z.string().min(1).max(PROVIDER_HOST_MAX).optional().meta({
|
|
99
|
+
description: "Present only while the CLI's endpoint is not its maker's: that endpoint's host.",
|
|
100
|
+
}),
|
|
91
101
|
models: OFFERED_MODELS,
|
|
92
102
|
default_model: CHOICE.optional().meta({
|
|
93
103
|
description: 'Present only where the Kit can name the model a fresh session of the CLI starts with: that model, as models lists it.',
|
|
@@ -120,6 +130,7 @@ export const AGENT_CAPABILITY_DECLARATION = z.strictObject({
|
|
|
120
130
|
reinstall: z.enum(KIT_REINSTALLS).optional().meta({
|
|
121
131
|
description: 'Present only while this Kit runs where an earlier install placed it and only the install command run again on its computer moves it: that command.',
|
|
122
132
|
}),
|
|
133
|
+
settings: KIT_SETTINGS.optional(),
|
|
123
134
|
agents: z
|
|
124
135
|
.array(REPORTED_AGENT_KIND)
|
|
125
136
|
.refine((agents) => new Set(agents.map((agent) => agent.kind)).size === agents.length),
|
|
@@ -147,6 +158,12 @@ export const KIT_TURN_IMAGE = z.strictObject({
|
|
|
147
158
|
media_type: MEDIA_TYPE,
|
|
148
159
|
});
|
|
149
160
|
export const KIT_UPLOAD_FINISH = z.strictObject({ upload: z.uuid(), part_sha256: PART_SHA256 });
|
|
161
|
+
export const KIT_BINARY_CHANGE = z.object({
|
|
162
|
+
path: z.string().min(1),
|
|
163
|
+
revision: z.string().min(1),
|
|
164
|
+
bytes: FILE_BYTES,
|
|
165
|
+
sha256: SHA256,
|
|
166
|
+
});
|
|
150
167
|
export const TRANSCRIPT = z.strictObject({
|
|
151
168
|
path: z.string().regex(/^\/rooms\/[^/)\s]+\/[^)\s]+$/u),
|
|
152
169
|
text: z.string().min(1),
|
|
@@ -158,6 +175,7 @@ export const KIT_QUESTION = z.strictObject({
|
|
|
158
175
|
});
|
|
159
176
|
export const LOCAL_COPY_ROOM = z.strictObject({ room_ref: z.string(), room_handle: z.string() });
|
|
160
177
|
const NOTHING = z.strictObject({});
|
|
178
|
+
const KIT_RESTART = z.strictObject({ planned: z.literal(true).optional() });
|
|
161
179
|
function act(ids, body, answer) {
|
|
162
180
|
return { ids, body, answer };
|
|
163
181
|
}
|
|
@@ -175,7 +193,7 @@ export const KIT_ACTS = {
|
|
|
175
193
|
'uploads/finish': act([], KIT_UPLOAD_FINISH, { door: 'files/finish' }),
|
|
176
194
|
'conversations/interaction/ask': act(CONVERSATION_TURN, KIT_QUESTION, NOTHING),
|
|
177
195
|
'kits/report-idle': act([], NOTHING, NOTHING),
|
|
178
|
-
'kits/report-restart': act([],
|
|
196
|
+
'kits/report-restart': act([], KIT_RESTART, NOTHING),
|
|
179
197
|
'conversations/credentials/issue': act(['conversation'], NOTHING, z.strictObject({ credential: z.string().min(1) })),
|
|
180
198
|
'kits/log-out': act([], NOTHING, z.strictObject({ environment: z.uuid(), revoked: z.literal(true) })),
|
|
181
199
|
'local-copies/selection/read': act([], NOTHING, z.strictObject({ local_copy: z.strictObject({ rooms: z.array(LOCAL_COPY_ROOM) }) })),
|
|
@@ -185,5 +203,5 @@ export const KIT_DOOR_ACTS = [
|
|
|
185
203
|
'room-chunks/list',
|
|
186
204
|
'changes/enumerate',
|
|
187
205
|
'files/revisions/list',
|
|
188
|
-
'
|
|
206
|
+
'update',
|
|
189
207
|
];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { KitDoorAct } from './acts.ts';
|
|
3
|
+
export declare const KIT_TOOLS: readonly ['upload', 'update', 'info'];
|
|
4
|
+
export type KitTool = (typeof KIT_TOOLS)[number];
|
|
5
|
+
export type KitArgumentShape = Readonly<Record<string, unknown>>;
|
|
6
|
+
export interface KitArgumentShapes {
|
|
7
|
+
readonly door: Readonly<Record<KitDoorAct, KitArgumentShape>>;
|
|
8
|
+
readonly tools: Readonly<Record<KitTool, KitArgumentShape>>;
|
|
9
|
+
}
|
|
10
|
+
export declare const KIT_DOOR_ARGUMENTS: Readonly<Partial<Record<"changes/enumerate" | "files/revisions/list" | "room-chunks/list" | "rooms/discover" | "update", z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>>;
|
|
11
|
+
export declare const KIT_TOOL_ARGUMENTS: Readonly<Partial<Record<"info" | "update" | "upload", z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const KIT_TOOLS = ['upload', 'update', 'info'];
|
|
3
|
+
const HOUSE_ARGUMENTS = {"door":{"rooms/discover":{"type":"object","properties":{"prefixes":{"maxItems":256,"type":"array","items":{"type":"string"}},"operation_id":{"type":"string"}},"required":["prefixes"],"additionalProperties":false},"room-chunks/list":{"type":"object","properties":{"prefixes":{"maxItems":256,"type":"array","items":{"type":"string"}},"operation_id":{"type":"string"}},"required":["prefixes"],"additionalProperties":false},"changes/enumerate":{"type":"object","properties":{"prefixes":{"maxItems":256,"type":"array","items":{"type":"string"}},"positions":{"maxItems":256,"type":"array","items":{"type":"object","properties":{"authority":{"type":"string","minLength":1,"maxLength":128},"position":{"type":"string"},"log_epoch":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"page":{"type":"object","properties":{"through":{"type":"string"},"read":{"type":"integer","minimum":0,"maximum":2147483647}},"required":["through","read"],"additionalProperties":false}},"required":["authority","position","log_epoch"],"additionalProperties":false}},"operation_id":{"type":"string"}},"required":["prefixes","positions"],"additionalProperties":false},"files/revisions/list":{"type":"object","properties":{"path":{"type":"string","minLength":1},"revision":{"type":"string"},"before":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"limit":{"type":"integer","minimum":1,"maximum":200},"operation_id":{"type":"string"}},"required":["path"],"additionalProperties":false},"update":{"anyOf":[{"type":"object","properties":{"mount":{"type":"string","minLength":1},"changes":{"minItems":1,"maxItems":10000,"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"set_field"},"path":{"type":"string","minLength":1},"field":{"type":"string","minLength":1,"maxLength":128},"base":{"$ref":"#/$defs/__schema0"},"value":{"$ref":"#/$defs/__schema1"}},"required":["op","path","field","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"replace_section"},"path":{"type":"string","minLength":1},"section":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[^\\r\\n]+$"},"base":{"type":["string","null"]},"content":{"type":"string"}},"required":["op","path","section","content"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"replace_preamble"},"path":{"type":"string","minLength":1},"base":{"type":"string"},"content":{"type":"string"}},"required":["op","path","base","content"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"create"},"path":{"type":"string","minLength":1},"content":{"type":"string"}},"required":["op","path","content"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"patch"},"path":{"type":"string","minLength":1},"base":{"type":"string","minLength":1,"maxLength":64},"find":{"type":"string","minLength":1},"replace":{"type":"string"}},"required":["op","path","find","replace"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"replace"},"path":{"type":"string","minLength":1},"base":{"type":"string","minLength":1,"maxLength":64},"content":{"type":"string"}},"required":["op","path","base","content"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"rename"},"path":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"base":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string","minLength":1,"maxLength":64}}]}},"required":["op","path","to"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"remove"},"path":{"type":"string","minLength":1},"base":{"type":"string","minLength":1,"maxLength":64}},"required":["op","path","base"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"create_folder"},"path":{"type":"string","minLength":1}},"required":["op","path"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"remove_folder"},"path":{"type":"string","minLength":1}},"required":["op","path"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"create_typed"},"path":{"type":"string","minLength":1},"type":{"type":"string","minLength":1,"maxLength":64},"fields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{"$ref":"#/$defs/__schema2"}}},"required":["op","path","type","fields"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"upload"},"path":{"type":"string","minLength":1},"base":{"type":"string","minLength":1,"maxLength":64},"local_id":{"type":"string","minLength":1,"maxLength":64},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"media_type":{"type":"string","minLength":1,"maxLength":255}},"required":["op","path","bytes","sha256","media_type"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"mkdir"},"path":{"type":"string","minLength":1},"name":{"type":"string","maxLength":200},"from":{"type":"string","minLength":1,"maxLength":200},"content":{"type":"boolean"},"readme":{"type":"string"},"space":{"type":"string","minLength":1,"maxLength":200}},"required":["op","path","name"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"move"},"path":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["op","path","to"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"set"},"path":{"type":"string","minLength":1},"name":{"type":"string","maxLength":200},"time_zone":{"type":"string","maxLength":64},"public":{"type":"boolean"},"space":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"required":["op","path"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"delete"},"path":{"type":"string","minLength":1}},"required":["op","path"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"restore"},"path":{"type":"string","minLength":1}},"required":["op","path"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"erase"},"path":{"type":"string","minLength":1},"ref":{"type":"string","minLength":1,"maxLength":200}},"required":["op","path"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"clear"},"room":{"type":"string","minLength":1,"maxLength":200}},"required":["op","room"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"trash_empty"},"room":{"type":"string","minLength":1,"maxLength":200}},"required":["op","room"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"versions_clear"},"room":{"type":"string","minLength":1,"maxLength":200}},"required":["op","room"],"additionalProperties":false}]}},"runtime":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"app_ref":{"type":"string"},"release":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"operation_id":{"type":"string"}},"required":["changes"],"additionalProperties":false},{"type":"object","properties":{"mount":{"type":"string","minLength":1},"paths":{"minItems":1,"maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"upload":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"operation":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bytes":{"type":"integer","minimum":3936001,"maximum":31999963},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["url","operation","bytes","sha256"],"additionalProperties":false},"runtime":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"app_ref":{"type":"string"},"release":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"operation_id":{"type":"string"}},"required":["paths","upload"],"additionalProperties":false}],"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema2"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema2"}}]}}}},"tools":{"upload":{"type":"object","properties":{"file":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"download_url":{"type":"string","format":"uri"},"file_id":{"type":"string","minLength":1},"mime_type":{"type":"string","minLength":1,"maxLength":255},"file_name":{"type":"string"}},"required":["download_url","file_id"],"additionalProperties":false}]},"path":{"type":"string","minLength":1},"base":{"type":"string","minLength":1},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"media_type":{"type":"string","minLength":1,"maxLength":255},"upload":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"part_sha256":{"minItems":1,"maxItems":10000,"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{64}$"}}},"additionalProperties":false},"update":{"type":"object","properties":{"changes":{"minItems":1,"maxItems":10000,"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"set_field"},"path":{"type":"string","minLength":1},"field":{"type":"string","minLength":1,"maxLength":128},"base":{"$ref":"#/$defs/__schema0"},"value":{"$ref":"#/$defs/__schema1"}},"required":["op","path","field","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"replace_section"},"path":{"type":"string","minLength":1},"section":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[^\\r\\n]+$"},"base":{"type":["string","null"]},"content":{"type":"string"}},"required":["op","path","section","content"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"replace_preamble"},"path":{"type":"string","minLength":1},"base":{"type":"string"},"content":{"type":"string"}},"required":["op","path","base","content"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"create"},"path":{"type":"string","minLength":1},"content":{"type":"string"}},"required":["op","path","content"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"patch"},"path":{"type":"string","minLength":1},"base":{"type":"string","minLength":1,"maxLength":64},"find":{"type":"string","minLength":1},"replace":{"type":"string"}},"required":["op","path","find","replace"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"replace"},"path":{"type":"string","minLength":1},"base":{"type":"string","minLength":1,"maxLength":64},"content":{"type":"string"}},"required":["op","path","base","content"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"rename"},"path":{"type":"string","minLength":1},"to":{"type":"string","minLength":1},"base":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string","minLength":1,"maxLength":64}}]}},"required":["op","path","to"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"remove"},"path":{"type":"string","minLength":1},"base":{"type":"string","minLength":1,"maxLength":64}},"required":["op","path","base"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"create_folder"},"path":{"type":"string","minLength":1}},"required":["op","path"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"remove_folder"},"path":{"type":"string","minLength":1}},"required":["op","path"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"upload"},"path":{"type":"string","minLength":1},"base":{"type":"string","minLength":1,"maxLength":64},"local_id":{"type":"string","minLength":1,"maxLength":64},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"media_type":{"type":"string","minLength":1,"maxLength":255}},"required":["op","path","bytes","sha256","media_type"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"mkdir"},"path":{"type":"string","minLength":1},"name":{"type":"string","maxLength":200},"from":{"type":"string","minLength":1,"maxLength":200},"content":{"type":"boolean"},"readme":{"type":"string"},"space":{"type":"string","minLength":1,"maxLength":200}},"required":["op","path","name"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"move"},"path":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["op","path","to"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"set"},"path":{"type":"string","minLength":1},"name":{"type":"string","maxLength":200},"time_zone":{"type":"string","maxLength":64},"public":{"type":"boolean"},"space":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"required":["op","path"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"delete"},"path":{"type":"string","minLength":1}},"required":["op","path"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"restore"},"path":{"type":"string","minLength":1}},"required":["op","path"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"erase"},"path":{"type":"string","minLength":1},"ref":{"type":"string","minLength":1,"maxLength":200}},"required":["op","path"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"clear"},"room":{"type":"string","minLength":1,"maxLength":200}},"required":["op","room"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"trash_empty"},"room":{"type":"string","minLength":1,"maxLength":200}},"required":["op","room"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"versions_clear"},"room":{"type":"string","minLength":1,"maxLength":200}},"required":["op","room"],"additionalProperties":false}]}},"paths":{"minItems":1,"maxItems":2000,"type":"array","items":{"type":"string","minLength":1}},"upload":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"operation":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bytes":{"type":"integer","minimum":3936001,"maximum":31999963},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["url","operation","bytes","sha256"],"additionalProperties":false},"mount":{"type":"string","minLength":1},"op":{"type":"string","const":"stage"},"bytes":{"type":"integer","minimum":3936001,"maximum":31999963},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}]}}},"info":{"type":"object","properties":{"path":{"type":"string","minLength":1},"ref":{"type":"string","minLength":1},"app":{"type":"string","minLength":1},"agent":{"type":"string","minLength":1},"environment":{"type":"string","minLength":1},"conversation":{"type":"string","minLength":1},"view":{"type":"string","enum":["sources","history"]},"query":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"cursor":{"type":"string","minLength":1}},"additionalProperties":false}}};
|
|
4
|
+
function declared(shapes) {
|
|
5
|
+
return Object.fromEntries(Object.entries(shapes ?? {}).map(([name, shape]) => [
|
|
6
|
+
name,
|
|
7
|
+
z.fromJSONSchema(shape),
|
|
8
|
+
]));
|
|
9
|
+
}
|
|
10
|
+
export const KIT_DOOR_ARGUMENTS = declared(HOUSE_ARGUMENTS.door);
|
|
11
|
+
export const KIT_TOOL_ARGUMENTS = declared(HOUSE_ARGUMENTS.tools);
|
package/dist/connection.d.ts
CHANGED
|
@@ -2,6 +2,11 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const KIT_CONNECTION_PATH = "/kit/stream";
|
|
3
3
|
export declare const KIT_CONNECTION_PROTOCOL_PREFIX = "house.kit.stream.";
|
|
4
4
|
export declare const KIT_CAUSE: z.ZodString;
|
|
5
|
+
export declare const KIT_SETTINGS: z.ZodObject<{
|
|
6
|
+
skills: z.ZodBoolean;
|
|
7
|
+
workspace: z.ZodString;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export type KitSettings = z.infer<typeof KIT_SETTINGS>;
|
|
5
10
|
export declare const KIT_CALL_RESULT: z.ZodUnion<readonly [z.ZodObject<{
|
|
6
11
|
provider_session_id: z.ZodString;
|
|
7
12
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -19,8 +24,14 @@ export declare const KIT_CALL_RESULT: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
19
24
|
timed_out: z.ZodLiteral<true>;
|
|
20
25
|
}, z.core.$strict>, z.ZodObject<{
|
|
21
26
|
started: z.ZodLiteral<true>;
|
|
27
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
28
|
+
settings: z.ZodObject<{
|
|
29
|
+
skills: z.ZodBoolean;
|
|
30
|
+
workspace: z.ZodString;
|
|
31
|
+
}, z.core.$strict>;
|
|
22
32
|
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>]>;
|
|
23
33
|
export type KitCallResult = z.infer<typeof KIT_CALL_RESULT>;
|
|
34
|
+
export declare const SESSION_CHOICE_BYTES_MAX = 128;
|
|
24
35
|
export declare const KIT_CALLS: {
|
|
25
36
|
open: z.ZodObject<{
|
|
26
37
|
type: z.ZodLiteral<"input">;
|
|
@@ -29,6 +40,8 @@ export declare const KIT_CALLS: {
|
|
|
29
40
|
agent_id: z.ZodUUID;
|
|
30
41
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
31
42
|
kind: z.ZodLiteral<"open">;
|
|
43
|
+
model: z.ZodOptional<z.ZodString>;
|
|
44
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
32
45
|
afk: z.ZodOptional<z.ZodLiteral<true>>;
|
|
33
46
|
}, z.core.$strict>;
|
|
34
47
|
kill: z.ZodObject<{
|
|
@@ -54,6 +67,8 @@ export declare const KIT_CALLS: {
|
|
|
54
67
|
agent_id: z.ZodUUID;
|
|
55
68
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
56
69
|
kind: z.ZodLiteral<"message">;
|
|
70
|
+
model: z.ZodOptional<z.ZodString>;
|
|
71
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
57
72
|
message_id: z.ZodUUID;
|
|
58
73
|
text: z.ZodString;
|
|
59
74
|
first: z.ZodBoolean;
|
|
@@ -86,6 +101,8 @@ export declare const KIT_CALLS: {
|
|
|
86
101
|
agent_id: z.ZodUUID;
|
|
87
102
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
88
103
|
kind: z.ZodLiteral<"answer">;
|
|
104
|
+
model: z.ZodOptional<z.ZodString>;
|
|
105
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
89
106
|
interaction_id: z.ZodUUID;
|
|
90
107
|
response: z.ZodUnknown;
|
|
91
108
|
request: z.ZodUnknown;
|
|
@@ -97,8 +114,8 @@ export declare const KIT_CALLS: {
|
|
|
97
114
|
agent_id: z.ZodUUID;
|
|
98
115
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
99
116
|
kind: z.ZodLiteral<"option">;
|
|
100
|
-
|
|
101
|
-
|
|
117
|
+
model: z.ZodOptional<z.ZodString>;
|
|
118
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
102
119
|
}, z.core.$strict>;
|
|
103
120
|
sign_in: z.ZodObject<{
|
|
104
121
|
type: z.ZodLiteral<"input">;
|
|
@@ -109,6 +126,7 @@ export declare const KIT_CALLS: {
|
|
|
109
126
|
kind: z.ZodLiteral<"sign_in">;
|
|
110
127
|
cli: z.ZodString;
|
|
111
128
|
ends_in: z.ZodInt;
|
|
129
|
+
api_key: z.ZodOptional<z.ZodLiteral<true>>;
|
|
112
130
|
}, z.core.$strict>;
|
|
113
131
|
update: z.ZodObject<{
|
|
114
132
|
type: z.ZodLiteral<"input">;
|
|
@@ -119,6 +137,16 @@ export declare const KIT_CALLS: {
|
|
|
119
137
|
kind: z.ZodLiteral<"update">;
|
|
120
138
|
release: z.ZodString;
|
|
121
139
|
}, z.core.$strict>;
|
|
140
|
+
settings: z.ZodObject<{
|
|
141
|
+
type: z.ZodLiteral<"input">;
|
|
142
|
+
input_id: z.ZodUUID;
|
|
143
|
+
conversation_id: z.ZodNull;
|
|
144
|
+
agent_id: z.ZodNull;
|
|
145
|
+
provider_session_id: z.ZodNull;
|
|
146
|
+
kind: z.ZodLiteral<"settings">;
|
|
147
|
+
skills: z.ZodOptional<z.ZodBoolean>;
|
|
148
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
149
|
+
}, z.core.$strict>;
|
|
122
150
|
run_wizard: z.ZodObject<{
|
|
123
151
|
type: z.ZodLiteral<"input">;
|
|
124
152
|
input_id: z.ZodUUID;
|
|
@@ -149,6 +177,8 @@ export declare const KIT_CALL: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
149
177
|
agent_id: z.ZodUUID;
|
|
150
178
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
151
179
|
kind: z.ZodLiteral<"open">;
|
|
180
|
+
model: z.ZodOptional<z.ZodString>;
|
|
181
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
152
182
|
afk: z.ZodOptional<z.ZodLiteral<true>>;
|
|
153
183
|
}, z.core.$strict>, z.ZodObject<{
|
|
154
184
|
type: z.ZodLiteral<"input">;
|
|
@@ -171,6 +201,8 @@ export declare const KIT_CALL: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
171
201
|
agent_id: z.ZodUUID;
|
|
172
202
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
173
203
|
kind: z.ZodLiteral<"message">;
|
|
204
|
+
model: z.ZodOptional<z.ZodString>;
|
|
205
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
174
206
|
message_id: z.ZodUUID;
|
|
175
207
|
text: z.ZodString;
|
|
176
208
|
first: z.ZodBoolean;
|
|
@@ -200,6 +232,8 @@ export declare const KIT_CALL: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
200
232
|
agent_id: z.ZodUUID;
|
|
201
233
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
202
234
|
kind: z.ZodLiteral<"answer">;
|
|
235
|
+
model: z.ZodOptional<z.ZodString>;
|
|
236
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
203
237
|
interaction_id: z.ZodUUID;
|
|
204
238
|
response: z.ZodUnknown;
|
|
205
239
|
request: z.ZodUnknown;
|
|
@@ -210,8 +244,8 @@ export declare const KIT_CALL: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
210
244
|
agent_id: z.ZodUUID;
|
|
211
245
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
212
246
|
kind: z.ZodLiteral<"option">;
|
|
213
|
-
|
|
214
|
-
|
|
247
|
+
model: z.ZodOptional<z.ZodString>;
|
|
248
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
215
249
|
}, z.core.$strict>, z.ZodObject<{
|
|
216
250
|
type: z.ZodLiteral<"input">;
|
|
217
251
|
input_id: z.ZodUUID;
|
|
@@ -221,6 +255,7 @@ export declare const KIT_CALL: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
221
255
|
kind: z.ZodLiteral<"sign_in">;
|
|
222
256
|
cli: z.ZodString;
|
|
223
257
|
ends_in: z.ZodInt;
|
|
258
|
+
api_key: z.ZodOptional<z.ZodLiteral<true>>;
|
|
224
259
|
}, z.core.$strict>, z.ZodObject<{
|
|
225
260
|
type: z.ZodLiteral<"input">;
|
|
226
261
|
input_id: z.ZodUUID;
|
|
@@ -229,6 +264,15 @@ export declare const KIT_CALL: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
229
264
|
provider_session_id: z.ZodNull;
|
|
230
265
|
kind: z.ZodLiteral<"update">;
|
|
231
266
|
release: z.ZodString;
|
|
267
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
268
|
+
type: z.ZodLiteral<"input">;
|
|
269
|
+
input_id: z.ZodUUID;
|
|
270
|
+
conversation_id: z.ZodNull;
|
|
271
|
+
agent_id: z.ZodNull;
|
|
272
|
+
provider_session_id: z.ZodNull;
|
|
273
|
+
kind: z.ZodLiteral<"settings">;
|
|
274
|
+
skills: z.ZodOptional<z.ZodBoolean>;
|
|
275
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
232
276
|
}, z.core.$strict>, z.ZodObject<{
|
|
233
277
|
type: z.ZodLiteral<"input">;
|
|
234
278
|
input_id: z.ZodUUID;
|
package/dist/connection.js
CHANGED
|
@@ -7,6 +7,10 @@ const TERMINAL_SIDE_MAX = 65_535;
|
|
|
7
7
|
export const KIT_CAUSE = z.string().min(1).max(4096);
|
|
8
8
|
const EXIT_CODE = z.int().min(0).max(EXIT_STATUS_MAX);
|
|
9
9
|
const KEPT_OUTPUT = { output: z.string(), cut: z.boolean() };
|
|
10
|
+
export const KIT_SETTINGS = z.strictObject({
|
|
11
|
+
skills: z.boolean(),
|
|
12
|
+
workspace: z.string().startsWith('/'),
|
|
13
|
+
});
|
|
10
14
|
export const KIT_CALL_RESULT = z.union([
|
|
11
15
|
z.strictObject({ provider_session_id: z.string().min(1).max(PROVIDER_SESSION_ID_MAX) }),
|
|
12
16
|
z.strictObject({ refused: KIT_CAUSE, resume_refused: z.literal(true).optional() }),
|
|
@@ -14,6 +18,7 @@ export const KIT_CALL_RESULT = z.union([
|
|
|
14
18
|
z.strictObject({ exit_code: EXIT_CODE, ...KEPT_OUTPUT }),
|
|
15
19
|
z.strictObject({ timed_out: z.literal(true), ...KEPT_OUTPUT }),
|
|
16
20
|
z.strictObject({ started: z.literal(true) }),
|
|
21
|
+
z.strictObject({ settings: KIT_SETTINGS }),
|
|
17
22
|
z.strictObject({}),
|
|
18
23
|
]);
|
|
19
24
|
const CONVERSATION_CALL = {
|
|
@@ -37,8 +42,21 @@ function environmentCall(kind, params) {
|
|
|
37
42
|
return z.strictObject({ ...ENVIRONMENT_CALL, kind: z.literal(kind), ...params });
|
|
38
43
|
}
|
|
39
44
|
const AFK = z.literal(true).optional();
|
|
45
|
+
export const SESSION_CHOICE_BYTES_MAX = 128;
|
|
46
|
+
const SESSION_CHOICE = z
|
|
47
|
+
.string()
|
|
48
|
+
.min(1)
|
|
49
|
+
.refine((value) => new TextEncoder().encode(value).length <= SESSION_CHOICE_BYTES_MAX);
|
|
50
|
+
const STARTING_CHOICES = {
|
|
51
|
+
model: SESSION_CHOICE.optional().meta({
|
|
52
|
+
description: "Present only for a conversation with its own model: the model a session this call starts or resumes runs, in the Agent's place.",
|
|
53
|
+
}),
|
|
54
|
+
effort: SESSION_CHOICE.optional().meta({
|
|
55
|
+
description: "Present only for a conversation with its own effort: the effort a session this call starts or resumes runs, in the Agent's place.",
|
|
56
|
+
}),
|
|
57
|
+
};
|
|
40
58
|
export const KIT_CALLS = {
|
|
41
|
-
open: conversationCall('open', { afk: AFK }),
|
|
59
|
+
open: conversationCall('open', { afk: AFK, ...STARTING_CHOICES }),
|
|
42
60
|
kill: conversationCall('kill', {}),
|
|
43
61
|
done: conversationCall('done', {}),
|
|
44
62
|
message: conversationCall('message', {
|
|
@@ -48,6 +66,7 @@ export const KIT_CALLS = {
|
|
|
48
66
|
at_once: z.literal(true).optional(),
|
|
49
67
|
recent: z.string().optional(),
|
|
50
68
|
afk: AFK,
|
|
69
|
+
...STARTING_CHOICES,
|
|
51
70
|
}),
|
|
52
71
|
take_out: conversationCall('take_out', { message_id: z.uuid() }),
|
|
53
72
|
interrupt: conversationCall('interrupt', { turn_id: z.uuid() }),
|
|
@@ -55,13 +74,28 @@ export const KIT_CALLS = {
|
|
|
55
74
|
interaction_id: z.uuid(),
|
|
56
75
|
response: z.unknown(),
|
|
57
76
|
request: z.unknown(),
|
|
77
|
+
...STARTING_CHOICES,
|
|
58
78
|
}),
|
|
59
79
|
option: conversationCall('option', {
|
|
60
|
-
|
|
61
|
-
|
|
80
|
+
model: SESSION_CHOICE.optional().meta({
|
|
81
|
+
description: 'Present only for a change of the model: the model the running process takes.',
|
|
82
|
+
}),
|
|
83
|
+
effort: SESSION_CHOICE.optional().meta({
|
|
84
|
+
description: 'Present only for a change of the effort: the effort the running process takes.',
|
|
85
|
+
}),
|
|
86
|
+
}),
|
|
87
|
+
sign_in: environmentCall('sign_in', {
|
|
88
|
+
cli: z.string(),
|
|
89
|
+
ends_in: z.int().nonnegative(),
|
|
90
|
+
api_key: z.literal(true).optional().meta({
|
|
91
|
+
description: "Present only for a sign-in by API key in place of the CLI's own login.",
|
|
92
|
+
}),
|
|
62
93
|
}),
|
|
63
|
-
sign_in: environmentCall('sign_in', { cli: z.string(), ends_in: z.int().nonnegative() }),
|
|
64
94
|
update: environmentCall('update', { release: z.string() }),
|
|
95
|
+
settings: environmentCall('settings', {
|
|
96
|
+
skills: z.boolean().optional(),
|
|
97
|
+
workspace: z.string().optional(),
|
|
98
|
+
}),
|
|
65
99
|
run_wizard: environmentCall('run_wizard', { script: z.string() }),
|
|
66
100
|
run_function: environmentCall('run_function', {
|
|
67
101
|
script: z.string(),
|
|
@@ -82,6 +116,7 @@ export const KIT_CALL = z.discriminatedUnion('kind', [
|
|
|
82
116
|
KIT_CALLS.option,
|
|
83
117
|
KIT_CALLS.sign_in,
|
|
84
118
|
KIT_CALLS.update,
|
|
119
|
+
KIT_CALLS.settings,
|
|
85
120
|
KIT_CALLS.run_wizard,
|
|
86
121
|
KIT_CALLS.run_function,
|
|
87
122
|
]);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { HOUSE_ONE_WAY_CALLS, KIT_CALL, KIT_CALL_RESULT, KIT_CALLS, KIT_CAUSE, KIT_CONNECTION_PATH, KIT_CONNECTION_PROTOCOL_PREFIX, KIT_ONE_WAY_CALLS, STARTING_STEPS, } from './connection.ts';
|
|
2
|
-
export type { HouseOneWayCall, HouseOneWayCallOf, KitCall, KitCallOf, KitCallResult, KitMethod, KitOneWayCall, KitOneWayCallOf, } from './connection.ts';
|
|
3
|
-
export { AGENT_CAPABILITY_DECLARATION, DECLARED_SECRET_CEREMONY, DESIRED_AGENT_ROUTE, DESIRED_AGENTS, ENVIRONMENT_FORMS, FILE_BYTES, FILE_NAME, FILE_NAME_MAX, KIT_ACTS, KIT_DOOR_ACTS, KIT_QUESTION, KIT_REINSTALLS, KIT_TURN_END, KIT_TURN_IMAGE, KIT_UPLOAD_FINISH, LOCAL_COPY_ROOM, MEDIA_TYPE, PART_SHA256, REPORTED_AGENT_KIND, SECRET_CEREMONY_STEPS_MAX, SECRET_RELAY_OUTCOME, SECRET_RELAY_RELEASES, SHA256, TRANSCRIPT, } from './acts.ts';
|
|
4
|
-
export type { AgentCapabilityDeclaration, DeclaredSecretCeremony, DesiredAgentRoute, KitActAnswer, KitActDeclaration, KitActName, KitActRequest, KitDoorAct, KitDoorAnswer, KitQuestion, KitTurnEnd, KitTurnImage, LocalCopyRoom, ReportedAgentKind, SecretCeremonyStep, SecretRelayOutcome, Transcript, TranscriptionReport, } from './acts.ts';
|
|
1
|
+
export { HOUSE_ONE_WAY_CALLS, KIT_CALL, KIT_CALL_RESULT, KIT_CALLS, KIT_CAUSE, KIT_CONNECTION_PATH, KIT_CONNECTION_PROTOCOL_PREFIX, KIT_ONE_WAY_CALLS, KIT_SETTINGS, SESSION_CHOICE_BYTES_MAX, STARTING_STEPS, } from './connection.ts';
|
|
2
|
+
export type { HouseOneWayCall, HouseOneWayCallOf, KitCall, KitCallOf, KitCallResult, KitMethod, KitOneWayCall, KitOneWayCallOf, KitSettings, } from './connection.ts';
|
|
3
|
+
export { AGENT_CAPABILITY_DECLARATION, DECLARED_SECRET_CEREMONY, DESIRED_AGENT_ROUTE, DESIRED_AGENTS, ENVIRONMENT_FORMS, FILE_BYTES, FILE_NAME, FILE_NAME_MAX, KIT_ACTS, KIT_BINARY_CHANGE, KIT_DOOR_ACTS, KIT_QUESTION, KIT_REINSTALLS, KIT_TURN_END, KIT_TURN_IMAGE, KIT_UPLOAD_FINISH, LOCAL_COPY_ROOM, MEDIA_TYPE, PART_SHA256, REPORTED_AGENT_KIND, SECRET_CEREMONY_STEPS_MAX, SECRET_RELAY_OUTCOME, SECRET_RELAY_RELEASES, SHA256, TRANSCRIPT, } from './acts.ts';
|
|
4
|
+
export type { AgentCapabilityDeclaration, DeclaredSecretCeremony, DesiredAgentRoute, KitActAnswer, KitActDeclaration, KitActName, KitActRequest, KitBinaryChange, KitDoorAct, KitDoorAnswer, KitQuestion, KitTurnEnd, KitTurnImage, LocalCopyRoom, ReportedAgentKind, SecretCeremonyStep, SecretRelayOutcome, Transcript, TranscriptionReport, } from './acts.ts';
|
|
5
5
|
export { ENVIRONMENT_REACHES, ENVIRONMENT_ROOM_LIMIT, ENVIRONMENT_ROOM_REFS, ENVIRONMENT_ROOMS, KIT_ENROLLMENT_ACTS, KIT_LOGIN_ISSUED, KIT_LOGIN_PATHS, KIT_LOGIN_POLL, KIT_LOGIN_START, KIT_LOGIN_STARTED, } from './enrollment.ts';
|
|
6
6
|
export type { EnvironmentReach, EnvironmentRooms, KitEnrollmentAct } from './enrollment.ts';
|
|
7
7
|
export { BUILDING_KIT, KIT_COMMANDS, KIT_DECLARATION, KIT_WIRE, KIT_WIRE_HEADER, kitWire, kitWireRefusal, } from './wire.ts';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { HOUSE_ONE_WAY_CALLS, KIT_CALL, KIT_CALL_RESULT, KIT_CALLS, KIT_CAUSE, KIT_CONNECTION_PATH, KIT_CONNECTION_PROTOCOL_PREFIX, KIT_ONE_WAY_CALLS, STARTING_STEPS, } from './connection.js';
|
|
2
|
-
export { AGENT_CAPABILITY_DECLARATION, DECLARED_SECRET_CEREMONY, DESIRED_AGENT_ROUTE, DESIRED_AGENTS, ENVIRONMENT_FORMS, FILE_BYTES, FILE_NAME, FILE_NAME_MAX, KIT_ACTS, KIT_DOOR_ACTS, KIT_QUESTION, KIT_REINSTALLS, KIT_TURN_END, KIT_TURN_IMAGE, KIT_UPLOAD_FINISH, LOCAL_COPY_ROOM, MEDIA_TYPE, PART_SHA256, REPORTED_AGENT_KIND, SECRET_CEREMONY_STEPS_MAX, SECRET_RELAY_OUTCOME, SECRET_RELAY_RELEASES, SHA256, TRANSCRIPT, } from './acts.js';
|
|
1
|
+
export { HOUSE_ONE_WAY_CALLS, KIT_CALL, KIT_CALL_RESULT, KIT_CALLS, KIT_CAUSE, KIT_CONNECTION_PATH, KIT_CONNECTION_PROTOCOL_PREFIX, KIT_ONE_WAY_CALLS, KIT_SETTINGS, SESSION_CHOICE_BYTES_MAX, STARTING_STEPS, } from './connection.js';
|
|
2
|
+
export { AGENT_CAPABILITY_DECLARATION, DECLARED_SECRET_CEREMONY, DESIRED_AGENT_ROUTE, DESIRED_AGENTS, ENVIRONMENT_FORMS, FILE_BYTES, FILE_NAME, FILE_NAME_MAX, KIT_ACTS, KIT_BINARY_CHANGE, KIT_DOOR_ACTS, KIT_QUESTION, KIT_REINSTALLS, KIT_TURN_END, KIT_TURN_IMAGE, KIT_UPLOAD_FINISH, LOCAL_COPY_ROOM, MEDIA_TYPE, PART_SHA256, REPORTED_AGENT_KIND, SECRET_CEREMONY_STEPS_MAX, SECRET_RELAY_OUTCOME, SECRET_RELAY_RELEASES, SHA256, TRANSCRIPT, } from './acts.js';
|
|
3
3
|
export { ENVIRONMENT_REACHES, ENVIRONMENT_ROOM_LIMIT, ENVIRONMENT_ROOM_REFS, ENVIRONMENT_ROOMS, KIT_ENROLLMENT_ACTS, KIT_LOGIN_ISSUED, KIT_LOGIN_PATHS, KIT_LOGIN_POLL, KIT_LOGIN_START, KIT_LOGIN_STARTED, } from './enrollment.js';
|
|
4
4
|
export { BUILDING_KIT, KIT_COMMANDS, KIT_DECLARATION, KIT_WIRE, KIT_WIRE_HEADER, kitWire, kitWireRefusal, } from './wire.js';
|
package/dist/wire.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export declare const KIT_DECLARATION: {
|
|
|
26
26
|
agent_id: z.ZodUUID;
|
|
27
27
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
28
28
|
kind: z.ZodLiteral<"open">;
|
|
29
|
+
model: z.ZodOptional<z.ZodString>;
|
|
30
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
29
31
|
afk: z.ZodOptional<z.ZodLiteral<true>>;
|
|
30
32
|
}, z.core.$strict>;
|
|
31
33
|
kill: z.ZodObject<{
|
|
@@ -51,6 +53,8 @@ export declare const KIT_DECLARATION: {
|
|
|
51
53
|
agent_id: z.ZodUUID;
|
|
52
54
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
53
55
|
kind: z.ZodLiteral<"message">;
|
|
56
|
+
model: z.ZodOptional<z.ZodString>;
|
|
57
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
54
58
|
message_id: z.ZodUUID;
|
|
55
59
|
text: z.ZodString;
|
|
56
60
|
first: z.ZodBoolean;
|
|
@@ -83,6 +87,8 @@ export declare const KIT_DECLARATION: {
|
|
|
83
87
|
agent_id: z.ZodUUID;
|
|
84
88
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
85
89
|
kind: z.ZodLiteral<"answer">;
|
|
90
|
+
model: z.ZodOptional<z.ZodString>;
|
|
91
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
86
92
|
interaction_id: z.ZodUUID;
|
|
87
93
|
response: z.ZodUnknown;
|
|
88
94
|
request: z.ZodUnknown;
|
|
@@ -94,8 +100,8 @@ export declare const KIT_DECLARATION: {
|
|
|
94
100
|
agent_id: z.ZodUUID;
|
|
95
101
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
96
102
|
kind: z.ZodLiteral<"option">;
|
|
97
|
-
|
|
98
|
-
|
|
103
|
+
model: z.ZodOptional<z.ZodString>;
|
|
104
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
99
105
|
}, z.core.$strict>;
|
|
100
106
|
sign_in: z.ZodObject<{
|
|
101
107
|
type: z.ZodLiteral<"input">;
|
|
@@ -106,6 +112,7 @@ export declare const KIT_DECLARATION: {
|
|
|
106
112
|
kind: z.ZodLiteral<"sign_in">;
|
|
107
113
|
cli: z.ZodString;
|
|
108
114
|
ends_in: z.ZodInt;
|
|
115
|
+
api_key: z.ZodOptional<z.ZodLiteral<true>>;
|
|
109
116
|
}, z.core.$strict>;
|
|
110
117
|
update: z.ZodObject<{
|
|
111
118
|
type: z.ZodLiteral<"input">;
|
|
@@ -116,6 +123,16 @@ export declare const KIT_DECLARATION: {
|
|
|
116
123
|
kind: z.ZodLiteral<"update">;
|
|
117
124
|
release: z.ZodString;
|
|
118
125
|
}, z.core.$strict>;
|
|
126
|
+
settings: z.ZodObject<{
|
|
127
|
+
type: z.ZodLiteral<"input">;
|
|
128
|
+
input_id: z.ZodUUID;
|
|
129
|
+
conversation_id: z.ZodNull;
|
|
130
|
+
agent_id: z.ZodNull;
|
|
131
|
+
provider_session_id: z.ZodNull;
|
|
132
|
+
kind: z.ZodLiteral<"settings">;
|
|
133
|
+
skills: z.ZodOptional<z.ZodBoolean>;
|
|
134
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
135
|
+
}, z.core.$strict>;
|
|
119
136
|
run_wizard: z.ZodObject<{
|
|
120
137
|
type: z.ZodLiteral<"input">;
|
|
121
138
|
input_id: z.ZodUUID;
|
|
@@ -156,6 +173,11 @@ export declare const KIT_DECLARATION: {
|
|
|
156
173
|
timed_out: z.ZodLiteral<true>;
|
|
157
174
|
}, z.core.$strict>, z.ZodObject<{
|
|
158
175
|
started: z.ZodLiteral<true>;
|
|
176
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
177
|
+
settings: z.ZodObject<{
|
|
178
|
+
skills: z.ZodBoolean;
|
|
179
|
+
workspace: z.ZodString;
|
|
180
|
+
}, z.core.$strict>;
|
|
159
181
|
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>]>;
|
|
160
182
|
house: {
|
|
161
183
|
beat: z.ZodObject<{
|
|
@@ -279,6 +301,7 @@ export declare const KIT_DECLARATION: {
|
|
|
279
301
|
label: z.ZodString;
|
|
280
302
|
name: z.ZodString;
|
|
281
303
|
description: z.ZodOptional<z.ZodString>;
|
|
304
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
282
305
|
}, z.core.$strict>], "kind">>;
|
|
283
306
|
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
284
307
|
outcome: z.ZodLiteral<"collected">;
|
|
@@ -306,6 +329,10 @@ export declare const KIT_DECLARATION: {
|
|
|
306
329
|
linux: "linux";
|
|
307
330
|
windows: "windows";
|
|
308
331
|
}>>;
|
|
332
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
333
|
+
skills: z.ZodBoolean;
|
|
334
|
+
workspace: z.ZodString;
|
|
335
|
+
}, z.core.$strict>>;
|
|
309
336
|
agents: z.ZodArray<z.ZodObject<{
|
|
310
337
|
kind: z.ZodString;
|
|
311
338
|
release: z.ZodNullable<z.ZodString>;
|
|
@@ -314,6 +341,8 @@ export declare const KIT_DECLARATION: {
|
|
|
314
341
|
failure: z.ZodNullable<z.ZodString>;
|
|
315
342
|
installing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
316
343
|
signed_in: z.ZodBoolean;
|
|
344
|
+
api_key: z.ZodOptional<z.ZodLiteral<true>>;
|
|
345
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
317
346
|
models: z.ZodArray<z.ZodObject<{
|
|
318
347
|
model: z.ZodString;
|
|
319
348
|
name: z.ZodString;
|
|
@@ -363,6 +392,11 @@ export declare const KIT_DECLARATION: {
|
|
|
363
392
|
timed_out: z.ZodLiteral<true>;
|
|
364
393
|
}, z.core.$strict>, z.ZodObject<{
|
|
365
394
|
started: z.ZodLiteral<true>;
|
|
395
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
396
|
+
settings: z.ZodObject<{
|
|
397
|
+
skills: z.ZodBoolean;
|
|
398
|
+
workspace: z.ZodString;
|
|
399
|
+
}, z.core.$strict>;
|
|
366
400
|
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>]>, z.ZodObject<{}, z.core.$strict>>;
|
|
367
401
|
'turns/start': import("./acts.ts").KitActDeclaration<"conversation" | "turn", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
368
402
|
run: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -396,7 +430,9 @@ export declare const KIT_DECLARATION: {
|
|
|
396
430
|
secret: z.ZodBoolean;
|
|
397
431
|
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
398
432
|
'kits/report-idle': import("./acts.ts").KitActDeclaration<never, z.ZodObject<{}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
399
|
-
'kits/report-restart': import("./acts.ts").KitActDeclaration<never, z.ZodObject<{
|
|
433
|
+
'kits/report-restart': import("./acts.ts").KitActDeclaration<never, z.ZodObject<{
|
|
434
|
+
planned: z.ZodOptional<z.ZodLiteral<true>>;
|
|
435
|
+
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
400
436
|
'conversations/credentials/issue': import("./acts.ts").KitActDeclaration<"conversation", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
401
437
|
credential: z.ZodString;
|
|
402
438
|
}, z.core.$strict>>;
|
|
@@ -413,7 +449,15 @@ export declare const KIT_DECLARATION: {
|
|
|
413
449
|
}, z.core.$strict>;
|
|
414
450
|
}, z.core.$strict>>;
|
|
415
451
|
};
|
|
416
|
-
door: readonly ["rooms/discover", "room-chunks/list", "changes/enumerate", "files/revisions/list", "
|
|
452
|
+
door: readonly ["rooms/discover", "room-chunks/list", "changes/enumerate", "files/revisions/list", "update"];
|
|
453
|
+
changes: {
|
|
454
|
+
binary: z.ZodObject<{
|
|
455
|
+
path: z.ZodString;
|
|
456
|
+
revision: z.ZodString;
|
|
457
|
+
bytes: z.ZodInt;
|
|
458
|
+
sha256: z.ZodString;
|
|
459
|
+
}, z.core.$strip>;
|
|
460
|
+
};
|
|
417
461
|
login: {
|
|
418
462
|
paths: {
|
|
419
463
|
readonly start: '/kit';
|
package/dist/wire.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { KIT_ACTS, KIT_DOOR_ACTS } from './acts.js';
|
|
3
|
+
import { KIT_ACTS, KIT_BINARY_CHANGE, KIT_DOOR_ACTS } from './acts.js';
|
|
4
4
|
import { HOUSE_ONE_WAY_CALLS, KIT_CALL_RESULT, KIT_CALLS, KIT_CONNECTION_PATH, KIT_CONNECTION_PROTOCOL_PREFIX, KIT_ONE_WAY_CALLS, } from './connection.js';
|
|
5
5
|
import { KIT_LOGIN_ISSUED, KIT_LOGIN_PATHS, KIT_LOGIN_POLL, KIT_LOGIN_START, KIT_LOGIN_STARTED, } from './enrollment.js';
|
|
6
6
|
const WIRE_HEX_LENGTH = 16;
|
|
@@ -22,6 +22,7 @@ export const KIT_DECLARATION = {
|
|
|
22
22
|
},
|
|
23
23
|
acts: KIT_ACTS,
|
|
24
24
|
door: KIT_DOOR_ACTS,
|
|
25
|
+
changes: { binary: KIT_BINARY_CHANGE },
|
|
25
26
|
login: {
|
|
26
27
|
paths: KIT_LOGIN_PATHS,
|
|
27
28
|
start: { request: KIT_LOGIN_START, answer: KIT_LOGIN_STARTED },
|
|
@@ -47,7 +48,7 @@ export function kitWire(declaration) {
|
|
|
47
48
|
.digest('hex')
|
|
48
49
|
.slice(0, WIRE_HEX_LENGTH);
|
|
49
50
|
}
|
|
50
|
-
export const KIT_WIRE = '
|
|
51
|
+
export const KIT_WIRE = '02392d1d009d74d4';
|
|
51
52
|
export function kitWireRefusal(named) {
|
|
52
53
|
if (typeof named !== 'string')
|
|
53
54
|
return 'kit_declaration_invalid';
|
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentshouse/kit-wire",
|
|
3
|
-
"version": "0.1.0-c3e145f6aa97e",
|
|
4
3
|
"description": "The Kit wire: every shape House and the Kit exchange, the Kit connection's frames and every /kit/ request and answer, and the wire computed from them",
|
|
5
4
|
"license": "MIT",
|
|
6
5
|
"type": "module",
|
|
@@ -16,6 +15,10 @@
|
|
|
16
15
|
"types": "./dist/index.d.ts",
|
|
17
16
|
"default": "./dist/index.js"
|
|
18
17
|
},
|
|
18
|
+
"./arguments": {
|
|
19
|
+
"types": "./dist/arguments.d.ts",
|
|
20
|
+
"default": "./dist/arguments.js"
|
|
21
|
+
},
|
|
19
22
|
"./package.json": "./package.json"
|
|
20
23
|
},
|
|
21
24
|
"files": [
|
|
@@ -30,5 +33,6 @@
|
|
|
30
33
|
"type": "git",
|
|
31
34
|
"url": "git+https://github.com/agentshouse/core.git",
|
|
32
35
|
"directory": "kit-wire"
|
|
33
|
-
}
|
|
36
|
+
},
|
|
37
|
+
"version": "0.1.0-c896a7802e5cf"
|
|
34
38
|
}
|