@agentshouse/kit-wire 0.1.0-ce39c80194ad4 → 0.1.0-ceea7707b3282
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 +7 -0
- package/dist/acts.d.ts +46 -2
- package/dist/acts.js +27 -3
- package/dist/arguments.d.ts +11 -0
- package/dist/arguments.js +11 -0
- package/dist/connection.d.ts +48 -19
- package/dist/connection.js +39 -6
- package/dist/enrollment.d.ts +0 -1
- package/dist/enrollment.js +0 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/wire.d.ts +58 -22
- package/dist/wire.js +4 -5
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -9,11 +9,18 @@ The Kit wire: every shape agents.house and the Kit exchange, declared once with
|
|
|
9
9
|
- Every `/kit/<act>` request and answer (`KIT_ACTS`), the names of the door acts the Kit calls
|
|
10
10
|
at `/kit/door/<act>` (`KIT_DOOR_ACTS`), and the sign-in at `/kit` and `/kit/token`
|
|
11
11
|
(`KIT_LOGIN_START`, `KIT_LOGIN_POLL` and their answers).
|
|
12
|
+
- The request-metadata key a `house` call names its Environment function run under
|
|
13
|
+
(`FUNCTION_RUN_META_KEY`).
|
|
12
14
|
- `KIT_WIRE` is computed from those shapes, so a change to any of them is a new wire. A Kit
|
|
13
15
|
names it in the `x-house-kit-wire` header (`KIT_WIRE_HEADER`) of every request and in its
|
|
14
16
|
connection's subprotocol, `KIT_CONNECTION_PROTOCOL_PREFIX` followed by the wire. House serves
|
|
15
17
|
its own wire alone and answers any other with `kit_update_required`, whose `release` and
|
|
16
18
|
`commands` (`BUILDING_KIT`) name the Kit release its Building serves.
|
|
19
|
+
- At `@agentshouse/kit-wire/arguments`, the arguments House takes for each door act
|
|
20
|
+
(`KIT_DOOR_ARGUMENTS`) and for each Tool the Kit calls itself over a conversation's House
|
|
21
|
+
connection (`KIT_TOOLS`, `KIT_TOOL_ARGUMENTS`), each a zod schema of the JSON Schema of the
|
|
22
|
+
shape House refuses a call with, so a rule House checks in its own code stays out. They are
|
|
23
|
+
no part of the wire: a changed argument is a new version of this package, not a new wire.
|
|
17
24
|
|
|
18
25
|
```ts
|
|
19
26
|
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;
|
|
@@ -74,6 +78,7 @@ export declare const REPORTED_AGENT_KIND: z.ZodObject<{
|
|
|
74
78
|
}, z.core.$strict>;
|
|
75
79
|
export type ReportedAgentKind = z.infer<typeof REPORTED_AGENT_KIND>;
|
|
76
80
|
export declare const ENVIRONMENT_FORMS: readonly ['laptop', 'desktop', 'server'];
|
|
81
|
+
export declare const KIT_REINSTALLS: readonly ['linux', 'windows'];
|
|
77
82
|
declare const TRANSCRIPTION_REPORT: z.ZodObject<{
|
|
78
83
|
installed: z.ZodBoolean;
|
|
79
84
|
failure: z.ZodNullable<z.ZodString>;
|
|
@@ -91,6 +96,14 @@ export declare const AGENT_CAPABILITY_DECLARATION: z.ZodObject<{
|
|
|
91
96
|
}>>;
|
|
92
97
|
ssh_host_key: z.ZodOptional<z.ZodString>;
|
|
93
98
|
agent_base: z.ZodOptional<z.ZodString>;
|
|
99
|
+
reinstall: z.ZodOptional<z.ZodEnum<{
|
|
100
|
+
linux: "linux";
|
|
101
|
+
windows: "windows";
|
|
102
|
+
}>>;
|
|
103
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
104
|
+
skills: z.ZodBoolean;
|
|
105
|
+
workspace: z.ZodString;
|
|
106
|
+
}, z.core.$strict>>;
|
|
94
107
|
agents: z.ZodArray<z.ZodObject<{
|
|
95
108
|
kind: z.ZodString;
|
|
96
109
|
release: z.ZodNullable<z.ZodString>;
|
|
@@ -99,6 +112,8 @@ export declare const AGENT_CAPABILITY_DECLARATION: z.ZodObject<{
|
|
|
99
112
|
failure: z.ZodNullable<z.ZodString>;
|
|
100
113
|
installing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
101
114
|
signed_in: z.ZodBoolean;
|
|
115
|
+
api_key: z.ZodOptional<z.ZodLiteral<true>>;
|
|
116
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
102
117
|
models: z.ZodArray<z.ZodObject<{
|
|
103
118
|
model: z.ZodString;
|
|
104
119
|
name: z.ZodString;
|
|
@@ -158,6 +173,13 @@ export declare const KIT_UPLOAD_FINISH: z.ZodObject<{
|
|
|
158
173
|
upload: z.ZodUUID;
|
|
159
174
|
part_sha256: z.ZodArray<z.ZodString>;
|
|
160
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>;
|
|
161
183
|
export declare const TRANSCRIPT: z.ZodObject<{
|
|
162
184
|
path: z.ZodString;
|
|
163
185
|
text: z.ZodString;
|
|
@@ -197,6 +219,7 @@ export declare const KIT_ACTS: {
|
|
|
197
219
|
label: z.ZodString;
|
|
198
220
|
name: z.ZodString;
|
|
199
221
|
description: z.ZodOptional<z.ZodString>;
|
|
222
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
200
223
|
}, z.core.$strict>], "kind">>;
|
|
201
224
|
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
202
225
|
outcome: z.ZodLiteral<"collected">;
|
|
@@ -220,6 +243,14 @@ export declare const KIT_ACTS: {
|
|
|
220
243
|
}>>;
|
|
221
244
|
ssh_host_key: z.ZodOptional<z.ZodString>;
|
|
222
245
|
agent_base: z.ZodOptional<z.ZodString>;
|
|
246
|
+
reinstall: z.ZodOptional<z.ZodEnum<{
|
|
247
|
+
linux: "linux";
|
|
248
|
+
windows: "windows";
|
|
249
|
+
}>>;
|
|
250
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
251
|
+
skills: z.ZodBoolean;
|
|
252
|
+
workspace: z.ZodString;
|
|
253
|
+
}, z.core.$strict>>;
|
|
223
254
|
agents: z.ZodArray<z.ZodObject<{
|
|
224
255
|
kind: z.ZodString;
|
|
225
256
|
release: z.ZodNullable<z.ZodString>;
|
|
@@ -228,6 +259,8 @@ export declare const KIT_ACTS: {
|
|
|
228
259
|
failure: z.ZodNullable<z.ZodString>;
|
|
229
260
|
installing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
230
261
|
signed_in: z.ZodBoolean;
|
|
262
|
+
api_key: z.ZodOptional<z.ZodLiteral<true>>;
|
|
263
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
231
264
|
models: z.ZodArray<z.ZodObject<{
|
|
232
265
|
model: z.ZodString;
|
|
233
266
|
name: z.ZodString;
|
|
@@ -277,6 +310,11 @@ export declare const KIT_ACTS: {
|
|
|
277
310
|
timed_out: z.ZodLiteral<true>;
|
|
278
311
|
}, z.core.$strict>, z.ZodObject<{
|
|
279
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>;
|
|
280
318
|
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>]>, z.ZodObject<{}, z.core.$strict>>;
|
|
281
319
|
'turns/start': KitActDeclaration<"conversation" | "turn", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
282
320
|
run: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -310,7 +348,9 @@ export declare const KIT_ACTS: {
|
|
|
310
348
|
secret: z.ZodBoolean;
|
|
311
349
|
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
312
350
|
'kits/report-idle': KitActDeclaration<never, z.ZodObject<{}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
313
|
-
'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>>;
|
|
314
354
|
'conversations/credentials/issue': KitActDeclaration<"conversation", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
315
355
|
credential: z.ZodString;
|
|
316
356
|
}, z.core.$strict>>;
|
|
@@ -326,7 +366,11 @@ export declare const KIT_ACTS: {
|
|
|
326
366
|
}, z.core.$strict>>;
|
|
327
367
|
}, z.core.$strict>;
|
|
328
368
|
}, z.core.$strict>>;
|
|
369
|
+
'function-runs/credentials/issue': KitActDeclaration<"run", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
370
|
+
credential: z.ZodString;
|
|
371
|
+
}, z.core.$strict>>;
|
|
329
372
|
};
|
|
373
|
+
export declare const FUNCTION_RUN_META_KEY = "agents.house/function-run";
|
|
330
374
|
export type KitActName = keyof typeof KIT_ACTS;
|
|
331
375
|
type Declared<Name extends KitActName> = (typeof KIT_ACTS)[Name];
|
|
332
376
|
type Fields<Body> = Body extends unknown ? (string extends keyof Body ? {} : Body) : never;
|
|
@@ -334,6 +378,6 @@ export type KitActRequest<Name extends KitActName> = {
|
|
|
334
378
|
readonly [Id in Declared<Name>['ids'][number]]: string;
|
|
335
379
|
} & Fields<z.input<Declared<Name>['body']>>;
|
|
336
380
|
export type KitActAnswer<Name extends KitActName> = Declared<Name>['answer'] extends z.ZodType ? z.output<Declared<Name>['answer']> : unknown;
|
|
337
|
-
export declare const KIT_DOOR_ACTS: readonly ['rooms/discover', 'room-chunks/list', 'changes/enumerate', 'files/revisions/list', '
|
|
381
|
+
export declare const KIT_DOOR_ACTS: readonly ['rooms/discover', 'room-chunks/list', 'changes/enumerate', 'files/revisions/list', 'update'];
|
|
338
382
|
export type KitDoorAct = (typeof KIT_DOOR_ACTS)[number];
|
|
339
383
|
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.',
|
|
@@ -99,6 +109,7 @@ export const REPORTED_AGENT_KIND = z.strictObject({
|
|
|
99
109
|
full_access: CHOICE.nullable(),
|
|
100
110
|
});
|
|
101
111
|
export const ENVIRONMENT_FORMS = ['laptop', 'desktop', 'server'];
|
|
112
|
+
export const KIT_REINSTALLS = ['linux', 'windows'];
|
|
102
113
|
const TRANSCRIPTION_REPORT = z.strictObject({
|
|
103
114
|
installed: z.boolean(),
|
|
104
115
|
failure: KIT_CAUSE.nullable(),
|
|
@@ -116,6 +127,10 @@ export const AGENT_CAPABILITY_DECLARATION = z.strictObject({
|
|
|
116
127
|
.regex(/^SHA256:[A-Za-z0-9+/]{43}$/)
|
|
117
128
|
.optional(),
|
|
118
129
|
agent_base: z.string().startsWith('/').optional(),
|
|
130
|
+
reinstall: z.enum(KIT_REINSTALLS).optional().meta({
|
|
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.',
|
|
132
|
+
}),
|
|
133
|
+
settings: KIT_SETTINGS.optional(),
|
|
119
134
|
agents: z
|
|
120
135
|
.array(REPORTED_AGENT_KIND)
|
|
121
136
|
.refine((agents) => new Set(agents.map((agent) => agent.kind)).size === agents.length),
|
|
@@ -143,6 +158,12 @@ export const KIT_TURN_IMAGE = z.strictObject({
|
|
|
143
158
|
media_type: MEDIA_TYPE,
|
|
144
159
|
});
|
|
145
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
|
+
});
|
|
146
167
|
export const TRANSCRIPT = z.strictObject({
|
|
147
168
|
path: z.string().regex(/^\/rooms\/[^/)\s]+\/[^)\s]+$/u),
|
|
148
169
|
text: z.string().min(1),
|
|
@@ -154,6 +175,7 @@ export const KIT_QUESTION = z.strictObject({
|
|
|
154
175
|
});
|
|
155
176
|
export const LOCAL_COPY_ROOM = z.strictObject({ room_ref: z.string(), room_handle: z.string() });
|
|
156
177
|
const NOTHING = z.strictObject({});
|
|
178
|
+
const KIT_RESTART = z.strictObject({ planned: z.literal(true).optional() });
|
|
157
179
|
function act(ids, body, answer) {
|
|
158
180
|
return { ids, body, answer };
|
|
159
181
|
}
|
|
@@ -171,15 +193,17 @@ export const KIT_ACTS = {
|
|
|
171
193
|
'uploads/finish': act([], KIT_UPLOAD_FINISH, { door: 'files/finish' }),
|
|
172
194
|
'conversations/interaction/ask': act(CONVERSATION_TURN, KIT_QUESTION, NOTHING),
|
|
173
195
|
'kits/report-idle': act([], NOTHING, NOTHING),
|
|
174
|
-
'kits/report-restart': act([],
|
|
196
|
+
'kits/report-restart': act([], KIT_RESTART, NOTHING),
|
|
175
197
|
'conversations/credentials/issue': act(['conversation'], NOTHING, z.strictObject({ credential: z.string().min(1) })),
|
|
176
198
|
'kits/log-out': act([], NOTHING, z.strictObject({ environment: z.uuid(), revoked: z.literal(true) })),
|
|
177
199
|
'local-copies/selection/read': act([], NOTHING, z.strictObject({ local_copy: z.strictObject({ rooms: z.array(LOCAL_COPY_ROOM) }) })),
|
|
200
|
+
'function-runs/credentials/issue': act(['run'], NOTHING, z.strictObject({ credential: z.string().min(1) })),
|
|
178
201
|
};
|
|
202
|
+
export const FUNCTION_RUN_META_KEY = 'agents.house/function-run';
|
|
179
203
|
export const KIT_DOOR_ACTS = [
|
|
180
204
|
'rooms/discover',
|
|
181
205
|
'room-chunks/list',
|
|
182
206
|
'changes/enumerate',
|
|
183
207
|
'files/revisions/list',
|
|
184
|
-
'
|
|
208
|
+
'update',
|
|
185
209
|
];
|
|
@@ -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":"write"},"path":{"type":"string","minLength":1},"content":{"type":"string"},"base":{"type":"string","minLength":1,"maxLength":64}},"required":["op","path","content"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"edit"},"path":{"type":"string","minLength":1},"find":{"type":"string","minLength":1},"replace":{"type":"string"},"base":{"type":"string","minLength":1,"maxLength":64}},"required":["op","path","find","replace"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"move"},"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":"delete"},"path":{"type":"string","minLength":1},"base":{"type":"string","minLength":1,"maxLength":64}},"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"],"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":"restore"},"path":{"type":"string","minLength":1},"ref":{"type":"string","minLength":1,"maxLength":200}},"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},{"type":"object","properties":{"op":{"type":"string","const":"trigger_create"},"room":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\r\\n\\u2028\\u2029]*$"},"condition":{"anyOf":[{"type":"object","properties":{"on":{"type":"string","const":"documents"},"query":{"type":"object","properties":{"types":{"type":"array","items":{"type":"string"}},"pathPrefix":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}},"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false},"new_documents":{"type":"boolean"},"changes":{"anyOf":[{"type":"string","const":"text"},{"type":"object","properties":{"field":{"type":"string"},"from":{"anyOf":[{"type":"array","items":{"type":["string","number","boolean","null"]}},{"type":"string","const":"new"}]},"to":{"anyOf":[{"type":"array","items":{"type":["string","number","boolean","null"]}},{"type":"string","const":"deleted"}]}},"required":["field"],"additionalProperties":false}]},"by":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"moved_between_rooms":{"type":"boolean"}},"required":["on"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"items"},"query":{"type":"object","properties":{"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}},"required":["on"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"notifications"},"query":{"type":"object","properties":{"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}},"required":["on"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"messages"},"query":{"type":"object","properties":{"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}},"required":["on"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"clock"},"cron":{"type":"string"},"time_zone":{"type":"string"}},"required":["on","cron"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"clock"},"query":{"type":"object","properties":{"types":{"type":"array","items":{"type":"string"}},"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["types"],"additionalProperties":false},"date":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"at":{"type":"string"},"time_zone":{"type":"string"}},"required":["on","query","date","days","at"],"additionalProperties":false}]},"actions":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"notify"},"title":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","minLength":1,"maxLength":4000},"to":{"type":"object","properties":{"users":{"default":[],"maxItems":64,"type":"array","items":{"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)$"}},"fields":{"default":[],"maxItems":16,"type":"array","items":{"type":"string"}},"roles":{"default":[],"maxItems":16,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},"additionalProperties":false},"in_group":{"default":false,"type":"boolean"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","title","text","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"agent_function"},"card":{"type":"string","pattern":"^[^/]+$"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","card"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"card":{"type":"string","pattern":"^[^/]+$"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","card"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"function"},"app":{"type":"string","pattern":"^a_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$"},"function":{"type":"string","pattern":"^[^\\p{Cc}]{1,64}$"},"attached_by":{"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)$"},"attach":{"default":false,"type":"boolean"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","app","function"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"function"},"function":{"type":"string","pattern":"^[^\\p{Cc}]{1,64}$"},"owner":{"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)$"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","function","owner"],"additionalProperties":false}]}},"enabled":{"type":"boolean"}},"required":["op","room","description","condition","actions"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"trigger_set"},"trigger":{"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)$"},"description":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\r\\n\\u2028\\u2029]*$"},"condition":{"anyOf":[{"type":"object","properties":{"on":{"type":"string","const":"documents"},"query":{"type":"object","properties":{"types":{"type":"array","items":{"type":"string"}},"pathPrefix":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}},"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false},"new_documents":{"type":"boolean"},"changes":{"anyOf":[{"type":"string","const":"text"},{"type":"object","properties":{"field":{"type":"string"},"from":{"anyOf":[{"type":"array","items":{"type":["string","number","boolean","null"]}},{"type":"string","const":"new"}]},"to":{"anyOf":[{"type":"array","items":{"type":["string","number","boolean","null"]}},{"type":"string","const":"deleted"}]}},"required":["field"],"additionalProperties":false}]},"by":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"moved_between_rooms":{"type":"boolean"}},"required":["on"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"items"},"query":{"type":"object","properties":{"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}},"required":["on"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"notifications"},"query":{"type":"object","properties":{"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}},"required":["on"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"messages"},"query":{"type":"object","properties":{"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}},"required":["on"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"clock"},"cron":{"type":"string"},"time_zone":{"type":"string"}},"required":["on","cron"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"clock"},"query":{"type":"object","properties":{"types":{"type":"array","items":{"type":"string"}},"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["types"],"additionalProperties":false},"date":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"at":{"type":"string"},"time_zone":{"type":"string"}},"required":["on","query","date","days","at"],"additionalProperties":false}]},"actions":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"notify"},"title":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","minLength":1,"maxLength":4000},"to":{"type":"object","properties":{"users":{"default":[],"maxItems":64,"type":"array","items":{"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)$"}},"fields":{"default":[],"maxItems":16,"type":"array","items":{"type":"string"}},"roles":{"default":[],"maxItems":16,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},"additionalProperties":false},"in_group":{"default":false,"type":"boolean"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","title","text","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"agent_function"},"card":{"type":"string","pattern":"^[^/]+$"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","card"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"card":{"type":"string","pattern":"^[^/]+$"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","card"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"function"},"app":{"type":"string","pattern":"^a_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$"},"function":{"type":"string","pattern":"^[^\\p{Cc}]{1,64}$"},"attached_by":{"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)$"},"attach":{"default":false,"type":"boolean"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","app","function"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"function"},"function":{"type":"string","pattern":"^[^\\p{Cc}]{1,64}$"},"owner":{"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)$"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","function","owner"],"additionalProperties":false}]}},"enabled":{"type":"boolean"},"action":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["op","trigger"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"trigger_delete"},"trigger":{"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)$"}},"required":["op","trigger"],"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}]}},"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":"write"},"path":{"type":"string","minLength":1},"content":{"type":"string"},"base":{"type":"string","minLength":1,"maxLength":64}},"required":["op","path","content"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"edit"},"path":{"type":"string","minLength":1},"find":{"type":"string","minLength":1},"replace":{"type":"string"},"base":{"type":"string","minLength":1,"maxLength":64}},"required":["op","path","find","replace"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"move"},"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":"delete"},"path":{"type":"string","minLength":1},"base":{"type":"string","minLength":1,"maxLength":64}},"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"],"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":"restore"},"path":{"type":"string","minLength":1},"ref":{"type":"string","minLength":1,"maxLength":200}},"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},{"type":"object","properties":{"op":{"type":"string","const":"trigger_create"},"room":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\r\\n\\u2028\\u2029]*$"},"condition":{"anyOf":[{"type":"object","properties":{"on":{"type":"string","const":"documents"},"query":{"type":"object","properties":{"types":{"type":"array","items":{"type":"string"}},"pathPrefix":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}},"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false},"new_documents":{"type":"boolean"},"changes":{"anyOf":[{"type":"string","const":"text"},{"type":"object","properties":{"field":{"type":"string"},"from":{"anyOf":[{"type":"array","items":{"type":["string","number","boolean","null"]}},{"type":"string","const":"new"}]},"to":{"anyOf":[{"type":"array","items":{"type":["string","number","boolean","null"]}},{"type":"string","const":"deleted"}]}},"required":["field"],"additionalProperties":false}]},"by":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"moved_between_rooms":{"type":"boolean"}},"required":["on"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"items"},"query":{"type":"object","properties":{"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}},"required":["on"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"notifications"},"query":{"type":"object","properties":{"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}},"required":["on"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"messages"},"query":{"type":"object","properties":{"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}},"required":["on"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"clock"},"cron":{"type":"string"},"time_zone":{"type":"string"}},"required":["on","cron"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"clock"},"query":{"type":"object","properties":{"types":{"type":"array","items":{"type":"string"}},"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["types"],"additionalProperties":false},"date":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"at":{"type":"string"},"time_zone":{"type":"string"}},"required":["on","query","date","days","at"],"additionalProperties":false}]},"actions":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"notify"},"title":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","minLength":1,"maxLength":4000},"to":{"type":"object","properties":{"users":{"default":[],"maxItems":64,"type":"array","items":{"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)$"}},"fields":{"default":[],"maxItems":16,"type":"array","items":{"type":"string"}},"roles":{"default":[],"maxItems":16,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},"additionalProperties":false},"in_group":{"default":false,"type":"boolean"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","title","text","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"agent_function"},"card":{"type":"string","pattern":"^[^/]+$"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","card"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"card":{"type":"string","pattern":"^[^/]+$"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","card"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"function"},"app":{"type":"string","pattern":"^a_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$"},"function":{"type":"string","pattern":"^[^\\p{Cc}]{1,64}$"},"attached_by":{"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)$"},"attach":{"default":false,"type":"boolean"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","app","function"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"function"},"function":{"type":"string","pattern":"^[^\\p{Cc}]{1,64}$"},"owner":{"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)$"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","function","owner"],"additionalProperties":false}]}},"enabled":{"type":"boolean"}},"required":["op","room","description","condition","actions"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"trigger_set"},"trigger":{"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)$"},"description":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^\\r\\n\\u2028\\u2029]*$"},"condition":{"anyOf":[{"type":"object","properties":{"on":{"type":"string","const":"documents"},"query":{"type":"object","properties":{"types":{"type":"array","items":{"type":"string"}},"pathPrefix":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}},"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false},"new_documents":{"type":"boolean"},"changes":{"anyOf":[{"type":"string","const":"text"},{"type":"object","properties":{"field":{"type":"string"},"from":{"anyOf":[{"type":"array","items":{"type":["string","number","boolean","null"]}},{"type":"string","const":"new"}]},"to":{"anyOf":[{"type":"array","items":{"type":["string","number","boolean","null"]}},{"type":"string","const":"deleted"}]}},"required":["field"],"additionalProperties":false}]},"by":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"moved_between_rooms":{"type":"boolean"}},"required":["on"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"items"},"query":{"type":"object","properties":{"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}},"required":["on"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"notifications"},"query":{"type":"object","properties":{"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}},"required":["on"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"messages"},"query":{"type":"object","properties":{"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}},"required":["on"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"clock"},"cron":{"type":"string"},"time_zone":{"type":"string"}},"required":["on","cron"],"additionalProperties":false},{"type":"object","properties":{"on":{"type":"string","const":"clock"},"query":{"type":"object","properties":{"types":{"type":"array","items":{"type":"string"}},"where":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["types"],"additionalProperties":false},"date":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"at":{"type":"string"},"time_zone":{"type":"string"}},"required":["on","query","date","days","at"],"additionalProperties":false}]},"actions":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"notify"},"title":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","minLength":1,"maxLength":4000},"to":{"type":"object","properties":{"users":{"default":[],"maxItems":64,"type":"array","items":{"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)$"}},"fields":{"default":[],"maxItems":16,"type":"array","items":{"type":"string"}},"roles":{"default":[],"maxItems":16,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},"additionalProperties":false},"in_group":{"default":false,"type":"boolean"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","title","text","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"agent_function"},"card":{"type":"string","pattern":"^[^/]+$"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","card"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"message"},"card":{"type":"string","pattern":"^[^/]+$"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","card"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"function"},"app":{"type":"string","pattern":"^a_([0123456789abcdefghjkmnpqrstvwxyz]+)\\.([0123456789abcdefghjkmnpqrstvwxyz])$"},"function":{"type":"string","pattern":"^[^\\p{Cc}]{1,64}$"},"attached_by":{"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)$"},"attach":{"default":false,"type":"boolean"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","app","function"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"function"},"function":{"type":"string","pattern":"^[^\\p{Cc}]{1,64}$"},"owner":{"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)$"},"enabled":{"default":true,"type":"boolean"}},"required":["kind","function","owner"],"additionalProperties":false}]}},"enabled":{"type":"boolean"},"action":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["op","trigger"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"trigger_delete"},"trigger":{"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)$"}},"required":["op","trigger"],"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},"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":{"type":"boolean"},"events":{"type":"boolean"},"errors":{"type":"boolean"},"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<{
|
|
@@ -39,14 +52,6 @@ export declare const KIT_CALLS: {
|
|
|
39
52
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
40
53
|
kind: z.ZodLiteral<"kill">;
|
|
41
54
|
}, z.core.$strict>;
|
|
42
|
-
done: z.ZodObject<{
|
|
43
|
-
type: z.ZodLiteral<"input">;
|
|
44
|
-
input_id: z.ZodUUID;
|
|
45
|
-
conversation_id: z.ZodUUID;
|
|
46
|
-
agent_id: z.ZodUUID;
|
|
47
|
-
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
48
|
-
kind: z.ZodLiteral<"done">;
|
|
49
|
-
}, z.core.$strict>;
|
|
50
55
|
message: z.ZodObject<{
|
|
51
56
|
type: z.ZodLiteral<"input">;
|
|
52
57
|
input_id: z.ZodUUID;
|
|
@@ -54,6 +59,8 @@ export declare const KIT_CALLS: {
|
|
|
54
59
|
agent_id: z.ZodUUID;
|
|
55
60
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
56
61
|
kind: z.ZodLiteral<"message">;
|
|
62
|
+
model: z.ZodOptional<z.ZodString>;
|
|
63
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
57
64
|
message_id: z.ZodUUID;
|
|
58
65
|
text: z.ZodString;
|
|
59
66
|
first: z.ZodBoolean;
|
|
@@ -86,6 +93,8 @@ export declare const KIT_CALLS: {
|
|
|
86
93
|
agent_id: z.ZodUUID;
|
|
87
94
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
88
95
|
kind: z.ZodLiteral<"answer">;
|
|
96
|
+
model: z.ZodOptional<z.ZodString>;
|
|
97
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
89
98
|
interaction_id: z.ZodUUID;
|
|
90
99
|
response: z.ZodUnknown;
|
|
91
100
|
request: z.ZodUnknown;
|
|
@@ -97,8 +106,8 @@ export declare const KIT_CALLS: {
|
|
|
97
106
|
agent_id: z.ZodUUID;
|
|
98
107
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
99
108
|
kind: z.ZodLiteral<"option">;
|
|
100
|
-
|
|
101
|
-
|
|
109
|
+
model: z.ZodOptional<z.ZodString>;
|
|
110
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
102
111
|
}, z.core.$strict>;
|
|
103
112
|
sign_in: z.ZodObject<{
|
|
104
113
|
type: z.ZodLiteral<"input">;
|
|
@@ -109,6 +118,7 @@ export declare const KIT_CALLS: {
|
|
|
109
118
|
kind: z.ZodLiteral<"sign_in">;
|
|
110
119
|
cli: z.ZodString;
|
|
111
120
|
ends_in: z.ZodInt;
|
|
121
|
+
api_key: z.ZodOptional<z.ZodLiteral<true>>;
|
|
112
122
|
}, z.core.$strict>;
|
|
113
123
|
update: z.ZodObject<{
|
|
114
124
|
type: z.ZodLiteral<"input">;
|
|
@@ -119,6 +129,16 @@ export declare const KIT_CALLS: {
|
|
|
119
129
|
kind: z.ZodLiteral<"update">;
|
|
120
130
|
release: z.ZodString;
|
|
121
131
|
}, z.core.$strict>;
|
|
132
|
+
settings: z.ZodObject<{
|
|
133
|
+
type: z.ZodLiteral<"input">;
|
|
134
|
+
input_id: z.ZodUUID;
|
|
135
|
+
conversation_id: z.ZodNull;
|
|
136
|
+
agent_id: z.ZodNull;
|
|
137
|
+
provider_session_id: z.ZodNull;
|
|
138
|
+
kind: z.ZodLiteral<"settings">;
|
|
139
|
+
skills: z.ZodOptional<z.ZodBoolean>;
|
|
140
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
141
|
+
}, z.core.$strict>;
|
|
122
142
|
run_wizard: z.ZodObject<{
|
|
123
143
|
type: z.ZodLiteral<"input">;
|
|
124
144
|
input_id: z.ZodUUID;
|
|
@@ -149,6 +169,8 @@ export declare const KIT_CALL: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
149
169
|
agent_id: z.ZodUUID;
|
|
150
170
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
151
171
|
kind: z.ZodLiteral<"open">;
|
|
172
|
+
model: z.ZodOptional<z.ZodString>;
|
|
173
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
152
174
|
afk: z.ZodOptional<z.ZodLiteral<true>>;
|
|
153
175
|
}, z.core.$strict>, z.ZodObject<{
|
|
154
176
|
type: z.ZodLiteral<"input">;
|
|
@@ -157,13 +179,6 @@ export declare const KIT_CALL: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
157
179
|
agent_id: z.ZodUUID;
|
|
158
180
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
159
181
|
kind: z.ZodLiteral<"kill">;
|
|
160
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
161
|
-
type: z.ZodLiteral<"input">;
|
|
162
|
-
input_id: z.ZodUUID;
|
|
163
|
-
conversation_id: z.ZodUUID;
|
|
164
|
-
agent_id: z.ZodUUID;
|
|
165
|
-
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
166
|
-
kind: z.ZodLiteral<"done">;
|
|
167
182
|
}, z.core.$strict>, z.ZodObject<{
|
|
168
183
|
type: z.ZodLiteral<"input">;
|
|
169
184
|
input_id: z.ZodUUID;
|
|
@@ -171,6 +186,8 @@ export declare const KIT_CALL: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
171
186
|
agent_id: z.ZodUUID;
|
|
172
187
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
173
188
|
kind: z.ZodLiteral<"message">;
|
|
189
|
+
model: z.ZodOptional<z.ZodString>;
|
|
190
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
174
191
|
message_id: z.ZodUUID;
|
|
175
192
|
text: z.ZodString;
|
|
176
193
|
first: z.ZodBoolean;
|
|
@@ -200,6 +217,8 @@ export declare const KIT_CALL: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
200
217
|
agent_id: z.ZodUUID;
|
|
201
218
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
202
219
|
kind: z.ZodLiteral<"answer">;
|
|
220
|
+
model: z.ZodOptional<z.ZodString>;
|
|
221
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
203
222
|
interaction_id: z.ZodUUID;
|
|
204
223
|
response: z.ZodUnknown;
|
|
205
224
|
request: z.ZodUnknown;
|
|
@@ -210,8 +229,8 @@ export declare const KIT_CALL: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
210
229
|
agent_id: z.ZodUUID;
|
|
211
230
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
212
231
|
kind: z.ZodLiteral<"option">;
|
|
213
|
-
|
|
214
|
-
|
|
232
|
+
model: z.ZodOptional<z.ZodString>;
|
|
233
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
215
234
|
}, z.core.$strict>, z.ZodObject<{
|
|
216
235
|
type: z.ZodLiteral<"input">;
|
|
217
236
|
input_id: z.ZodUUID;
|
|
@@ -221,6 +240,7 @@ export declare const KIT_CALL: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
221
240
|
kind: z.ZodLiteral<"sign_in">;
|
|
222
241
|
cli: z.ZodString;
|
|
223
242
|
ends_in: z.ZodInt;
|
|
243
|
+
api_key: z.ZodOptional<z.ZodLiteral<true>>;
|
|
224
244
|
}, z.core.$strict>, z.ZodObject<{
|
|
225
245
|
type: z.ZodLiteral<"input">;
|
|
226
246
|
input_id: z.ZodUUID;
|
|
@@ -229,6 +249,15 @@ export declare const KIT_CALL: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
229
249
|
provider_session_id: z.ZodNull;
|
|
230
250
|
kind: z.ZodLiteral<"update">;
|
|
231
251
|
release: z.ZodString;
|
|
252
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
253
|
+
type: z.ZodLiteral<"input">;
|
|
254
|
+
input_id: z.ZodUUID;
|
|
255
|
+
conversation_id: z.ZodNull;
|
|
256
|
+
agent_id: z.ZodNull;
|
|
257
|
+
provider_session_id: z.ZodNull;
|
|
258
|
+
kind: z.ZodLiteral<"settings">;
|
|
259
|
+
skills: z.ZodOptional<z.ZodBoolean>;
|
|
260
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
232
261
|
}, z.core.$strict>, z.ZodObject<{
|
|
233
262
|
type: z.ZodLiteral<"input">;
|
|
234
263
|
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,10 +42,22 @@ 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
|
-
done: conversationCall('done', {}),
|
|
44
61
|
message: conversationCall('message', {
|
|
45
62
|
message_id: z.uuid(),
|
|
46
63
|
text: z.string(),
|
|
@@ -48,6 +65,7 @@ export const KIT_CALLS = {
|
|
|
48
65
|
at_once: z.literal(true).optional(),
|
|
49
66
|
recent: z.string().optional(),
|
|
50
67
|
afk: AFK,
|
|
68
|
+
...STARTING_CHOICES,
|
|
51
69
|
}),
|
|
52
70
|
take_out: conversationCall('take_out', { message_id: z.uuid() }),
|
|
53
71
|
interrupt: conversationCall('interrupt', { turn_id: z.uuid() }),
|
|
@@ -55,13 +73,28 @@ export const KIT_CALLS = {
|
|
|
55
73
|
interaction_id: z.uuid(),
|
|
56
74
|
response: z.unknown(),
|
|
57
75
|
request: z.unknown(),
|
|
76
|
+
...STARTING_CHOICES,
|
|
58
77
|
}),
|
|
59
78
|
option: conversationCall('option', {
|
|
60
|
-
|
|
61
|
-
|
|
79
|
+
model: SESSION_CHOICE.optional().meta({
|
|
80
|
+
description: 'Present only for a change of the model: the model the running process takes.',
|
|
81
|
+
}),
|
|
82
|
+
effort: SESSION_CHOICE.optional().meta({
|
|
83
|
+
description: 'Present only for a change of the effort: the effort the running process takes.',
|
|
84
|
+
}),
|
|
85
|
+
}),
|
|
86
|
+
sign_in: environmentCall('sign_in', {
|
|
87
|
+
cli: z.string(),
|
|
88
|
+
ends_in: z.int().nonnegative(),
|
|
89
|
+
api_key: z.literal(true).optional().meta({
|
|
90
|
+
description: "Present only for a sign-in by API key in place of the CLI's own login.",
|
|
91
|
+
}),
|
|
62
92
|
}),
|
|
63
|
-
sign_in: environmentCall('sign_in', { cli: z.string(), ends_in: z.int().nonnegative() }),
|
|
64
93
|
update: environmentCall('update', { release: z.string() }),
|
|
94
|
+
settings: environmentCall('settings', {
|
|
95
|
+
skills: z.boolean().optional(),
|
|
96
|
+
workspace: z.string().optional(),
|
|
97
|
+
}),
|
|
65
98
|
run_wizard: environmentCall('run_wizard', { script: z.string() }),
|
|
66
99
|
run_function: environmentCall('run_function', {
|
|
67
100
|
script: z.string(),
|
|
@@ -74,7 +107,6 @@ export const KIT_CALLS = {
|
|
|
74
107
|
export const KIT_CALL = z.discriminatedUnion('kind', [
|
|
75
108
|
KIT_CALLS.open,
|
|
76
109
|
KIT_CALLS.kill,
|
|
77
|
-
KIT_CALLS.done,
|
|
78
110
|
KIT_CALLS.message,
|
|
79
111
|
KIT_CALLS.take_out,
|
|
80
112
|
KIT_CALLS.interrupt,
|
|
@@ -82,6 +114,7 @@ export const KIT_CALL = z.discriminatedUnion('kind', [
|
|
|
82
114
|
KIT_CALLS.option,
|
|
83
115
|
KIT_CALLS.sign_in,
|
|
84
116
|
KIT_CALLS.update,
|
|
117
|
+
KIT_CALLS.settings,
|
|
85
118
|
KIT_CALLS.run_wizard,
|
|
86
119
|
KIT_CALLS.run_function,
|
|
87
120
|
]);
|
package/dist/enrollment.d.ts
CHANGED
|
@@ -20,7 +20,6 @@ export declare const KIT_LOGIN_START: z.ZodObject<{
|
|
|
20
20
|
new_environment: "new_environment";
|
|
21
21
|
}>;
|
|
22
22
|
environment_id: z.ZodOptional<z.ZodUUID>;
|
|
23
|
-
replaces: z.ZodOptional<z.ZodUUID>;
|
|
24
23
|
headless: z.ZodOptional<z.ZodLiteral<true>>;
|
|
25
24
|
rooms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
26
25
|
reach: z.ZodLiteral<"all">;
|
package/dist/enrollment.js
CHANGED
|
@@ -17,7 +17,6 @@ export const KIT_ENROLLMENT_ACTS = ['new_environment', 'existing_environment'];
|
|
|
17
17
|
export const KIT_LOGIN_START = z.strictObject({
|
|
18
18
|
act: z.enum(KIT_ENROLLMENT_ACTS),
|
|
19
19
|
environment_id: z.uuid().optional(),
|
|
20
|
-
replaces: z.uuid().optional(),
|
|
21
20
|
headless: z.literal(true).optional(),
|
|
22
21
|
rooms: ENVIRONMENT_ROOMS.optional(),
|
|
23
22
|
code_challenge: z.string().regex(/^[A-Za-z0-9_-]{43}$/),
|
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_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, FUNCTION_RUN_META_KEY, 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_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, FUNCTION_RUN_META_KEY, 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
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const KIT_WIRE_HEADER = "x-house-kit-wire";
|
|
3
3
|
export declare const KIT_COMMANDS: z.ZodObject<{
|
|
4
|
-
macos: z.ZodString;
|
|
5
4
|
linux: z.ZodString;
|
|
6
|
-
container: z.ZodString;
|
|
7
|
-
server: z.ZodString;
|
|
8
5
|
windows: z.ZodString;
|
|
9
6
|
}, z.core.$strict>;
|
|
10
7
|
export type KitCommands = z.infer<typeof KIT_COMMANDS>;
|
|
11
8
|
export declare const BUILDING_KIT: z.ZodObject<{
|
|
12
9
|
release: z.ZodString;
|
|
13
10
|
commands: z.ZodObject<{
|
|
14
|
-
macos: z.ZodString;
|
|
15
11
|
linux: z.ZodString;
|
|
16
|
-
container: z.ZodString;
|
|
17
|
-
server: z.ZodString;
|
|
18
12
|
windows: z.ZodString;
|
|
19
13
|
}, z.core.$strict>;
|
|
20
14
|
}, z.core.$strict>;
|
|
@@ -32,6 +26,8 @@ export declare const KIT_DECLARATION: {
|
|
|
32
26
|
agent_id: z.ZodUUID;
|
|
33
27
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
34
28
|
kind: z.ZodLiteral<"open">;
|
|
29
|
+
model: z.ZodOptional<z.ZodString>;
|
|
30
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
35
31
|
afk: z.ZodOptional<z.ZodLiteral<true>>;
|
|
36
32
|
}, z.core.$strict>;
|
|
37
33
|
kill: z.ZodObject<{
|
|
@@ -42,14 +38,6 @@ export declare const KIT_DECLARATION: {
|
|
|
42
38
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
43
39
|
kind: z.ZodLiteral<"kill">;
|
|
44
40
|
}, z.core.$strict>;
|
|
45
|
-
done: z.ZodObject<{
|
|
46
|
-
type: z.ZodLiteral<"input">;
|
|
47
|
-
input_id: z.ZodUUID;
|
|
48
|
-
conversation_id: z.ZodUUID;
|
|
49
|
-
agent_id: z.ZodUUID;
|
|
50
|
-
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
51
|
-
kind: z.ZodLiteral<"done">;
|
|
52
|
-
}, z.core.$strict>;
|
|
53
41
|
message: z.ZodObject<{
|
|
54
42
|
type: z.ZodLiteral<"input">;
|
|
55
43
|
input_id: z.ZodUUID;
|
|
@@ -57,6 +45,8 @@ export declare const KIT_DECLARATION: {
|
|
|
57
45
|
agent_id: z.ZodUUID;
|
|
58
46
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
59
47
|
kind: z.ZodLiteral<"message">;
|
|
48
|
+
model: z.ZodOptional<z.ZodString>;
|
|
49
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
60
50
|
message_id: z.ZodUUID;
|
|
61
51
|
text: z.ZodString;
|
|
62
52
|
first: z.ZodBoolean;
|
|
@@ -89,6 +79,8 @@ export declare const KIT_DECLARATION: {
|
|
|
89
79
|
agent_id: z.ZodUUID;
|
|
90
80
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
91
81
|
kind: z.ZodLiteral<"answer">;
|
|
82
|
+
model: z.ZodOptional<z.ZodString>;
|
|
83
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
92
84
|
interaction_id: z.ZodUUID;
|
|
93
85
|
response: z.ZodUnknown;
|
|
94
86
|
request: z.ZodUnknown;
|
|
@@ -100,8 +92,8 @@ export declare const KIT_DECLARATION: {
|
|
|
100
92
|
agent_id: z.ZodUUID;
|
|
101
93
|
provider_session_id: z.ZodNullable<z.ZodString>;
|
|
102
94
|
kind: z.ZodLiteral<"option">;
|
|
103
|
-
|
|
104
|
-
|
|
95
|
+
model: z.ZodOptional<z.ZodString>;
|
|
96
|
+
effort: z.ZodOptional<z.ZodString>;
|
|
105
97
|
}, z.core.$strict>;
|
|
106
98
|
sign_in: z.ZodObject<{
|
|
107
99
|
type: z.ZodLiteral<"input">;
|
|
@@ -112,6 +104,7 @@ export declare const KIT_DECLARATION: {
|
|
|
112
104
|
kind: z.ZodLiteral<"sign_in">;
|
|
113
105
|
cli: z.ZodString;
|
|
114
106
|
ends_in: z.ZodInt;
|
|
107
|
+
api_key: z.ZodOptional<z.ZodLiteral<true>>;
|
|
115
108
|
}, z.core.$strict>;
|
|
116
109
|
update: z.ZodObject<{
|
|
117
110
|
type: z.ZodLiteral<"input">;
|
|
@@ -122,6 +115,16 @@ export declare const KIT_DECLARATION: {
|
|
|
122
115
|
kind: z.ZodLiteral<"update">;
|
|
123
116
|
release: z.ZodString;
|
|
124
117
|
}, z.core.$strict>;
|
|
118
|
+
settings: z.ZodObject<{
|
|
119
|
+
type: z.ZodLiteral<"input">;
|
|
120
|
+
input_id: z.ZodUUID;
|
|
121
|
+
conversation_id: z.ZodNull;
|
|
122
|
+
agent_id: z.ZodNull;
|
|
123
|
+
provider_session_id: z.ZodNull;
|
|
124
|
+
kind: z.ZodLiteral<"settings">;
|
|
125
|
+
skills: z.ZodOptional<z.ZodBoolean>;
|
|
126
|
+
workspace: z.ZodOptional<z.ZodString>;
|
|
127
|
+
}, z.core.$strict>;
|
|
125
128
|
run_wizard: z.ZodObject<{
|
|
126
129
|
type: z.ZodLiteral<"input">;
|
|
127
130
|
input_id: z.ZodUUID;
|
|
@@ -162,6 +165,11 @@ export declare const KIT_DECLARATION: {
|
|
|
162
165
|
timed_out: z.ZodLiteral<true>;
|
|
163
166
|
}, z.core.$strict>, z.ZodObject<{
|
|
164
167
|
started: z.ZodLiteral<true>;
|
|
168
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
169
|
+
settings: z.ZodObject<{
|
|
170
|
+
skills: z.ZodBoolean;
|
|
171
|
+
workspace: z.ZodString;
|
|
172
|
+
}, z.core.$strict>;
|
|
165
173
|
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>]>;
|
|
166
174
|
house: {
|
|
167
175
|
beat: z.ZodObject<{
|
|
@@ -285,6 +293,7 @@ export declare const KIT_DECLARATION: {
|
|
|
285
293
|
label: z.ZodString;
|
|
286
294
|
name: z.ZodString;
|
|
287
295
|
description: z.ZodOptional<z.ZodString>;
|
|
296
|
+
optional: z.ZodOptional<z.ZodLiteral<true>>;
|
|
288
297
|
}, z.core.$strict>], "kind">>;
|
|
289
298
|
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
290
299
|
outcome: z.ZodLiteral<"collected">;
|
|
@@ -308,6 +317,14 @@ export declare const KIT_DECLARATION: {
|
|
|
308
317
|
}>>;
|
|
309
318
|
ssh_host_key: z.ZodOptional<z.ZodString>;
|
|
310
319
|
agent_base: z.ZodOptional<z.ZodString>;
|
|
320
|
+
reinstall: z.ZodOptional<z.ZodEnum<{
|
|
321
|
+
linux: "linux";
|
|
322
|
+
windows: "windows";
|
|
323
|
+
}>>;
|
|
324
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
325
|
+
skills: z.ZodBoolean;
|
|
326
|
+
workspace: z.ZodString;
|
|
327
|
+
}, z.core.$strict>>;
|
|
311
328
|
agents: z.ZodArray<z.ZodObject<{
|
|
312
329
|
kind: z.ZodString;
|
|
313
330
|
release: z.ZodNullable<z.ZodString>;
|
|
@@ -316,6 +333,8 @@ export declare const KIT_DECLARATION: {
|
|
|
316
333
|
failure: z.ZodNullable<z.ZodString>;
|
|
317
334
|
installing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
318
335
|
signed_in: z.ZodBoolean;
|
|
336
|
+
api_key: z.ZodOptional<z.ZodLiteral<true>>;
|
|
337
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
319
338
|
models: z.ZodArray<z.ZodObject<{
|
|
320
339
|
model: z.ZodString;
|
|
321
340
|
name: z.ZodString;
|
|
@@ -365,6 +384,11 @@ export declare const KIT_DECLARATION: {
|
|
|
365
384
|
timed_out: z.ZodLiteral<true>;
|
|
366
385
|
}, z.core.$strict>, z.ZodObject<{
|
|
367
386
|
started: z.ZodLiteral<true>;
|
|
387
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
388
|
+
settings: z.ZodObject<{
|
|
389
|
+
skills: z.ZodBoolean;
|
|
390
|
+
workspace: z.ZodString;
|
|
391
|
+
}, z.core.$strict>;
|
|
368
392
|
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>]>, z.ZodObject<{}, z.core.$strict>>;
|
|
369
393
|
'turns/start': import("./acts.ts").KitActDeclaration<"conversation" | "turn", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
370
394
|
run: z.ZodOptional<z.ZodLiteral<true>>;
|
|
@@ -398,7 +422,9 @@ export declare const KIT_DECLARATION: {
|
|
|
398
422
|
secret: z.ZodBoolean;
|
|
399
423
|
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
400
424
|
'kits/report-idle': import("./acts.ts").KitActDeclaration<never, z.ZodObject<{}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
401
|
-
'kits/report-restart': import("./acts.ts").KitActDeclaration<never, z.ZodObject<{
|
|
425
|
+
'kits/report-restart': import("./acts.ts").KitActDeclaration<never, z.ZodObject<{
|
|
426
|
+
planned: z.ZodOptional<z.ZodLiteral<true>>;
|
|
427
|
+
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
402
428
|
'conversations/credentials/issue': import("./acts.ts").KitActDeclaration<"conversation", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
403
429
|
credential: z.ZodString;
|
|
404
430
|
}, z.core.$strict>>;
|
|
@@ -414,8 +440,22 @@ export declare const KIT_DECLARATION: {
|
|
|
414
440
|
}, z.core.$strict>>;
|
|
415
441
|
}, z.core.$strict>;
|
|
416
442
|
}, z.core.$strict>>;
|
|
443
|
+
'function-runs/credentials/issue': import("./acts.ts").KitActDeclaration<"run", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
444
|
+
credential: z.ZodString;
|
|
445
|
+
}, z.core.$strict>>;
|
|
446
|
+
};
|
|
447
|
+
door: readonly ["rooms/discover", "room-chunks/list", "changes/enumerate", "files/revisions/list", "update"];
|
|
448
|
+
changes: {
|
|
449
|
+
binary: z.ZodObject<{
|
|
450
|
+
path: z.ZodString;
|
|
451
|
+
revision: z.ZodString;
|
|
452
|
+
bytes: z.ZodInt;
|
|
453
|
+
sha256: z.ZodString;
|
|
454
|
+
}, z.core.$strip>;
|
|
455
|
+
};
|
|
456
|
+
meta: {
|
|
457
|
+
run: string;
|
|
417
458
|
};
|
|
418
|
-
door: readonly ["rooms/discover", "room-chunks/list", "changes/enumerate", "files/revisions/list", "files/batch"];
|
|
419
459
|
login: {
|
|
420
460
|
paths: {
|
|
421
461
|
readonly start: '/kit';
|
|
@@ -428,7 +468,6 @@ export declare const KIT_DECLARATION: {
|
|
|
428
468
|
new_environment: "new_environment";
|
|
429
469
|
}>;
|
|
430
470
|
environment_id: z.ZodOptional<z.ZodUUID>;
|
|
431
|
-
replaces: z.ZodOptional<z.ZodUUID>;
|
|
432
471
|
headless: z.ZodOptional<z.ZodLiteral<true>>;
|
|
433
472
|
rooms: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
434
473
|
reach: z.ZodLiteral<"all">;
|
|
@@ -463,10 +502,7 @@ export declare const KIT_DECLARATION: {
|
|
|
463
502
|
refusal: z.ZodObject<{
|
|
464
503
|
release: z.ZodString;
|
|
465
504
|
commands: z.ZodObject<{
|
|
466
|
-
macos: z.ZodString;
|
|
467
505
|
linux: z.ZodString;
|
|
468
|
-
container: z.ZodString;
|
|
469
|
-
server: z.ZodString;
|
|
470
506
|
windows: z.ZodString;
|
|
471
507
|
}, z.core.$strict>;
|
|
472
508
|
}, z.core.$strict>;
|
package/dist/wire.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
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 { FUNCTION_RUN_META_KEY, 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;
|
|
7
7
|
export const KIT_WIRE_HEADER = 'x-house-kit-wire';
|
|
8
8
|
export const KIT_COMMANDS = z.strictObject({
|
|
9
|
-
macos: z.string(),
|
|
10
9
|
linux: z.string(),
|
|
11
|
-
container: z.string(),
|
|
12
|
-
server: z.string(),
|
|
13
10
|
windows: z.string(),
|
|
14
11
|
});
|
|
15
12
|
export const BUILDING_KIT = z.strictObject({ release: z.string(), commands: KIT_COMMANDS });
|
|
@@ -25,6 +22,8 @@ export const KIT_DECLARATION = {
|
|
|
25
22
|
},
|
|
26
23
|
acts: KIT_ACTS,
|
|
27
24
|
door: KIT_DOOR_ACTS,
|
|
25
|
+
changes: { binary: KIT_BINARY_CHANGE },
|
|
26
|
+
meta: { run: FUNCTION_RUN_META_KEY },
|
|
28
27
|
login: {
|
|
29
28
|
paths: KIT_LOGIN_PATHS,
|
|
30
29
|
start: { request: KIT_LOGIN_START, answer: KIT_LOGIN_STARTED },
|
|
@@ -50,7 +49,7 @@ export function kitWire(declaration) {
|
|
|
50
49
|
.digest('hex')
|
|
51
50
|
.slice(0, WIRE_HEX_LENGTH);
|
|
52
51
|
}
|
|
53
|
-
export const KIT_WIRE = '
|
|
52
|
+
export const KIT_WIRE = '4fd16810492940d7';
|
|
54
53
|
export function kitWireRefusal(named) {
|
|
55
54
|
if (typeof named !== 'string')
|
|
56
55
|
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-ce39c80194ad4",
|
|
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-ceea7707b3282"
|
|
34
38
|
}
|