@akshar5/cohall 0.12.6 → 0.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +1 -1
- package/bin/chunk-04a27ybz.js +460 -0
- package/bin/chunk-04a27ybz.js.map +10 -0
- package/bin/chunk-27xa296w.js +40 -0
- package/bin/chunk-27xa296w.js.map +9 -0
- package/bin/chunk-39by7csf.js +267 -0
- package/bin/chunk-39by7csf.js.map +11 -0
- package/bin/chunk-61m7z93m.js +256 -0
- package/bin/chunk-61m7z93m.js.map +10 -0
- package/bin/chunk-7dgeftrk.js +23 -0
- package/bin/chunk-7dgeftrk.js.map +10 -0
- package/bin/chunk-7ss2d5n4.js +50 -0
- package/bin/chunk-7ss2d5n4.js.map +10 -0
- package/bin/chunk-89ga9j8t.js +269 -0
- package/bin/chunk-89ga9j8t.js.map +10 -0
- package/bin/chunk-90k4bw6t.js +2801 -0
- package/bin/chunk-90k4bw6t.js.map +14 -0
- package/bin/chunk-akct7v1q.js +2160 -0
- package/bin/chunk-akct7v1q.js.map +15 -0
- package/bin/chunk-b3ba95j4.js +1867 -0
- package/bin/chunk-b3ba95j4.js.map +13 -0
- package/bin/chunk-d2sykjmx.js +665 -0
- package/bin/chunk-d2sykjmx.js.map +10 -0
- package/bin/chunk-g6b3zmtw.js +268 -0
- package/bin/chunk-g6b3zmtw.js.map +10 -0
- package/bin/chunk-p493vm5f.js +21 -0
- package/bin/chunk-p493vm5f.js.map +10 -0
- package/bin/chunk-zxrjgp9k.js +415 -0
- package/bin/chunk-zxrjgp9k.js.map +11 -0
- package/bin/cohall.js +18 -9100
- package/bin/cohall.js.map +5 -30
- package/deploy/windows/install-device.ps1 +2 -0
- package/docs/install.md +2 -1
- package/docs/integrations.md +6 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.12.7](https://github.com/AksharP5/cohall/compare/v0.12.6...v0.12.7) (2026-10-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **client:** recover device watch after interrupted responses ([#228](https://github.com/AksharP5/cohall/issues/228)) ([b6cf546](https://github.com/AksharP5/cohall/commit/b6cf5464633596fa202e086b383796c4505343a3))
|
|
9
|
+
* **device:** stop stalled gateway discovery during shutdown ([#233](https://github.com/AksharP5/cohall/issues/233)) ([c2b3edb](https://github.com/AksharP5/cohall/commit/c2b3edbfce6408e420762edd92f876e55741481a))
|
|
10
|
+
* **mcp:** stop polling when the host disconnects ([#235](https://github.com/AksharP5/cohall/issues/235)) ([d0fe22a](https://github.com/AksharP5/cohall/commit/d0fe22a7a6071c9a09e8f1863bf62c04a0898e63))
|
|
11
|
+
* **providers:** preserve relative config across workspaces ([#213](https://github.com/AksharP5/cohall/issues/213)) ([5119b62](https://github.com/AksharP5/cohall/commit/5119b62cb1efc31a77a19518c1d3790576b98532))
|
|
12
|
+
* **relay:** recover queued work after storage errors ([#224](https://github.com/AksharP5/cohall/issues/224)) ([582640b](https://github.com/AksharP5/cohall/commit/582640bac703ab9b321dfa8c168324e55de6e255))
|
|
13
|
+
* **service:** keep Windows workers available on battery ([#226](https://github.com/AksharP5/cohall/issues/226)) ([6c7ae16](https://github.com/AksharP5/cohall/commit/6c7ae16ec75f81d75a7afeb33a976fe5e28000b7))
|
|
14
|
+
* **service:** preserve working definitions after failed writes ([#222](https://github.com/AksharP5/cohall/issues/222)) ([ff83d57](https://github.com/AksharP5/cohall/commit/ff83d5799cdebb12ee82f5cfea18a5ac107b34c4))
|
|
15
|
+
* **upgrade:** keep pnpm lookups out of project settings ([#230](https://github.com/AksharP5/cohall/issues/230)) ([4c1b048](https://github.com/AksharP5/cohall/commit/4c1b048fa545f6bc9620ab8ef0de1013690a46bf))
|
|
16
|
+
* **upgrade:** restore latest upgrades with npm 12 ([#214](https://github.com/AksharP5/cohall/issues/214)) ([6378625](https://github.com/AksharP5/cohall/commit/6378625473d9cf8845f58e9feba83ebf00358612))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Performance Improvements
|
|
20
|
+
|
|
21
|
+
* **cli:** cut configuration startup by 26% ([#237](https://github.com/AksharP5/cohall/issues/237)) ([42d37eb](https://github.com/AksharP5/cohall/commit/42d37eb3d4b833b5fa7e0e23daee920a5107e785))
|
|
22
|
+
* **cli:** cut help and version startup by 94% ([#220](https://github.com/AksharP5/cohall/issues/220)) ([5b0a4ab](https://github.com/AksharP5/cohall/commit/5b0a4ab2e5e9c81f60f906e45475f0d4e2a8ba8b))
|
|
23
|
+
* **device:** skip inventory downloads for direct targets ([#239](https://github.com/AksharP5/cohall/issues/239)) ([832a357](https://github.com/AksharP5/cohall/commit/832a357d3949ba0d0dfd82b09cf3454d467f40b6))
|
|
24
|
+
* **relay:** cut completion persistence time by 88% ([#218](https://github.com/AksharP5/cohall/issues/218)) ([d5dea7d](https://github.com/AksharP5/cohall/commit/d5dea7d8cf9b80613286ac7ff24aa78af7b5d118))
|
|
25
|
+
* **relay:** cut inbox latency by 91% with 10k retained tasks ([#241](https://github.com/AksharP5/cohall/issues/241)) ([7fddc9a](https://github.com/AksharP5/cohall/commit/7fddc9a5e09c2390e929e7d17e35b9fc332c0eaa))
|
|
26
|
+
|
|
3
27
|
## [0.12.6](https://github.com/AksharP5/cohall/compare/v0.12.5...v0.12.6) (2026-10-17)
|
|
4
28
|
|
|
5
29
|
|
package/README.md
CHANGED
|
@@ -410,7 +410,7 @@ Describe what a worker is useful for so agents can choose the right device:
|
|
|
410
410
|
|
|
411
411
|
```bash
|
|
412
412
|
cohall configure --description 'iOS builds and simulator testing'
|
|
413
|
-
cohall service
|
|
413
|
+
cohall service install
|
|
414
414
|
```
|
|
415
415
|
|
|
416
416
|
Descriptions appear in `cohall devices`, `doctor --all`, and MCP `list_devices`.
|
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
// packages/protocol/src/index.ts
|
|
2
|
+
import { Effect, Schema } from "effect";
|
|
3
|
+
var maxSocketPayloadBytes = 1024 * 1024;
|
|
4
|
+
var maxAuthTokenBytes = 512;
|
|
5
|
+
var maxAttachmentBytes = 256 * 1024;
|
|
6
|
+
var maxTaskAttachments = 2;
|
|
7
|
+
var maxProgressNoteBytes = 1024;
|
|
8
|
+
var bounded = (maxLength) => Schema.String.check(Schema.isMinLength(1), Schema.isMaxLength(maxLength));
|
|
9
|
+
var optionalText = (maxLength) => Schema.String.check(Schema.isMaxLength(maxLength));
|
|
10
|
+
var boundedArray = (schema, maxLength) => Schema.Array(schema).check(Schema.isMaxLength(maxLength));
|
|
11
|
+
var count = Schema.Int.check(Schema.isBetween({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER }));
|
|
12
|
+
var assertOwnerToken = (token) => {
|
|
13
|
+
if (token.length < 32) {
|
|
14
|
+
throw new Error("The Cohall relay owner token must be at least 32 characters");
|
|
15
|
+
}
|
|
16
|
+
if (new TextEncoder().encode(token).byteLength > maxAuthTokenBytes) {
|
|
17
|
+
throw new Error(`The Cohall relay owner token must be at most ${maxAuthTokenBytes} UTF-8 bytes`);
|
|
18
|
+
}
|
|
19
|
+
if (token.trim() !== token || !/^[\t\x20-\x7e\x80-\xff]+$/.test(token)) {
|
|
20
|
+
throw new Error("The Cohall relay owner token must fit an HTTP header without leading or trailing whitespace");
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
var uuid = (name) => Schema.String.check(Schema.isUUID(4)).pipe(Schema.brand(name));
|
|
24
|
+
var isoTimestamp = (name) => Schema.String.check(Schema.isPattern(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,9})?Z$/, {
|
|
25
|
+
expected: "an ISO-8601 UTC timestamp"
|
|
26
|
+
})).pipe(Schema.brand(name));
|
|
27
|
+
var BotId = bounded(256).pipe(Schema.brand("BotId"));
|
|
28
|
+
var Bot = Schema.Struct({
|
|
29
|
+
id: BotId,
|
|
30
|
+
name: bounded(128),
|
|
31
|
+
description: Schema.optionalKey(optionalText(512))
|
|
32
|
+
});
|
|
33
|
+
var DeviceId = uuid("DeviceId");
|
|
34
|
+
var ThreadId = uuid("ThreadId");
|
|
35
|
+
var MessageId = uuid("MessageId");
|
|
36
|
+
var TaskId = uuid("TaskId");
|
|
37
|
+
var TaskRequestId = uuid("TaskRequestId");
|
|
38
|
+
var TaskRunId = uuid("TaskRunId");
|
|
39
|
+
var ClarificationId = uuid("ClarificationId");
|
|
40
|
+
var AuthSessionId = uuid("AuthSessionId");
|
|
41
|
+
var OperationId = uuid("OperationId");
|
|
42
|
+
var Timestamp = isoTimestamp("Timestamp");
|
|
43
|
+
var TaskDeadline = Timestamp.check(Schema.makeFilter((value) => {
|
|
44
|
+
const time = Date.parse(value);
|
|
45
|
+
return Number.isFinite(time) && new Date(time).toISOString().slice(0, 19) === value.slice(0, 19) ? undefined : "Expected a valid ISO-8601 UTC deadline";
|
|
46
|
+
}));
|
|
47
|
+
var taskDeadlineError = "Task deadline exceeded";
|
|
48
|
+
var taskDeadlinePassed = (task, time = Date.now()) => task.expiresAt !== undefined && Date.parse(task.expiresAt) <= time;
|
|
49
|
+
var Platform = Schema.Literals(["darwin", "linux", "windows", "unknown"]);
|
|
50
|
+
var Provider = Schema.Literals(["codex", "claude-code", "opencode", "grok-bot"]);
|
|
51
|
+
var DeviceStatus = Schema.Literals(["online", "busy", "offline"]);
|
|
52
|
+
var TaskStatus = Schema.Literals([
|
|
53
|
+
"queued",
|
|
54
|
+
"assigned",
|
|
55
|
+
"running",
|
|
56
|
+
"needs_input",
|
|
57
|
+
"cancelling",
|
|
58
|
+
"completed",
|
|
59
|
+
"failed",
|
|
60
|
+
"cancelled"
|
|
61
|
+
]);
|
|
62
|
+
var OperationStatus = Schema.Literals([
|
|
63
|
+
"queued",
|
|
64
|
+
"assigned",
|
|
65
|
+
"running",
|
|
66
|
+
"completed",
|
|
67
|
+
"failed"
|
|
68
|
+
]);
|
|
69
|
+
var TaskTraceEventKind = Schema.Literals([
|
|
70
|
+
...TaskStatus.literals,
|
|
71
|
+
"requeued",
|
|
72
|
+
"input_requested",
|
|
73
|
+
"input_answered"
|
|
74
|
+
]);
|
|
75
|
+
var MessageRole = Schema.Literals(["human", "agent", "system"]);
|
|
76
|
+
var ConnectionRole = Schema.Literals(["client", "device"]);
|
|
77
|
+
var AuthSession = Schema.Struct({
|
|
78
|
+
id: AuthSessionId,
|
|
79
|
+
label: bounded(128),
|
|
80
|
+
role: ConnectionRole,
|
|
81
|
+
createdAt: Timestamp,
|
|
82
|
+
expiresAt: Timestamp,
|
|
83
|
+
lastSeenAt: Timestamp,
|
|
84
|
+
deviceId: Schema.optionalKey(DeviceId),
|
|
85
|
+
revokedAt: Schema.optionalKey(Timestamp)
|
|
86
|
+
});
|
|
87
|
+
var CreatePairingInput = Schema.Struct({
|
|
88
|
+
label: bounded(128),
|
|
89
|
+
roles: boundedArray(ConnectionRole, 2)
|
|
90
|
+
});
|
|
91
|
+
var PairingCredential = Schema.Struct({
|
|
92
|
+
token: bounded(256),
|
|
93
|
+
expiresAt: Timestamp
|
|
94
|
+
});
|
|
95
|
+
var ExchangePairingInput = Schema.Struct({
|
|
96
|
+
token: bounded(256)
|
|
97
|
+
});
|
|
98
|
+
var SessionCredential = Schema.Struct({
|
|
99
|
+
token: bounded(256),
|
|
100
|
+
session: AuthSession
|
|
101
|
+
});
|
|
102
|
+
var PairingResult = Schema.Struct({
|
|
103
|
+
credentials: boundedArray(SessionCredential, 2)
|
|
104
|
+
});
|
|
105
|
+
var Capability = Schema.Struct({
|
|
106
|
+
id: bounded(64),
|
|
107
|
+
label: bounded(128),
|
|
108
|
+
detail: Schema.optionalKey(optionalText(512))
|
|
109
|
+
});
|
|
110
|
+
var Workspace = Schema.Struct({
|
|
111
|
+
path: bounded(4096),
|
|
112
|
+
label: bounded(256)
|
|
113
|
+
});
|
|
114
|
+
var Device = Schema.Struct({
|
|
115
|
+
id: DeviceId,
|
|
116
|
+
name: bounded(128),
|
|
117
|
+
description: Schema.optionalKey(optionalText(512)),
|
|
118
|
+
hostname: bounded(256),
|
|
119
|
+
platform: Platform,
|
|
120
|
+
architecture: bounded(64),
|
|
121
|
+
status: DeviceStatus,
|
|
122
|
+
providers: boundedArray(Provider, Provider.literals.length),
|
|
123
|
+
bots: Schema.optionalKey(boundedArray(Bot, 256)),
|
|
124
|
+
capabilities: boundedArray(Capability, 64),
|
|
125
|
+
workspaces: boundedArray(Workspace, 64),
|
|
126
|
+
version: bounded(32),
|
|
127
|
+
lastSeenAt: Timestamp,
|
|
128
|
+
connectedAt: Schema.optionalKey(Timestamp),
|
|
129
|
+
queue: Schema.optionalKey(Schema.Struct({
|
|
130
|
+
queued: count,
|
|
131
|
+
oldestQueuedAt: Schema.optionalKey(Timestamp)
|
|
132
|
+
}))
|
|
133
|
+
});
|
|
134
|
+
var DeviceOverview = Schema.Struct({
|
|
135
|
+
id: Device.fields.id,
|
|
136
|
+
name: Device.fields.name,
|
|
137
|
+
description: Device.fields.description,
|
|
138
|
+
status: Device.fields.status,
|
|
139
|
+
version: Device.fields.version,
|
|
140
|
+
lastSeenAt: Device.fields.lastSeenAt,
|
|
141
|
+
queued: count,
|
|
142
|
+
active: count,
|
|
143
|
+
needsInput: count,
|
|
144
|
+
cancelling: count,
|
|
145
|
+
oldestQueuedAt: Schema.optionalKey(Timestamp)
|
|
146
|
+
});
|
|
147
|
+
var maxDevicePageDevices = 16;
|
|
148
|
+
var maxDevicePageResponseBytes = 3 * 1024 * 1024;
|
|
149
|
+
var DevicePage = Schema.Struct({
|
|
150
|
+
devices: boundedArray(Device, maxDevicePageDevices),
|
|
151
|
+
nextCursor: Schema.optionalKey(DeviceId)
|
|
152
|
+
}).check(Schema.makeFilter((page) => {
|
|
153
|
+
let previous;
|
|
154
|
+
for (const device of page.devices) {
|
|
155
|
+
if (previous !== undefined && device.id <= previous)
|
|
156
|
+
return "Device pages must be ordered by ID";
|
|
157
|
+
previous = device.id;
|
|
158
|
+
}
|
|
159
|
+
return page.nextCursor === undefined || page.nextCursor === previous ? undefined : "The next cursor must be the last device ID";
|
|
160
|
+
}));
|
|
161
|
+
var minimumDeviceOperationVersion = "0.5.0";
|
|
162
|
+
var parsedVersion = (value) => {
|
|
163
|
+
const match = /^v?(\d+)\.(\d+)\.(\d+)(-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.exec(value);
|
|
164
|
+
if (match === null) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const core = match.slice(1, 4).map(Number);
|
|
168
|
+
if (core.length !== 3 || core.some((part) => !Number.isSafeInteger(part))) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
return [core[0] ?? 0, core[1] ?? 0, core[2] ?? 0, match[4] !== undefined];
|
|
172
|
+
};
|
|
173
|
+
var supportsDeviceOperations = (candidate) => {
|
|
174
|
+
if (candidate === "0.0.0-development") {
|
|
175
|
+
return true;
|
|
176
|
+
}
|
|
177
|
+
const current = parsedVersion(candidate);
|
|
178
|
+
const minimum = parsedVersion(minimumDeviceOperationVersion);
|
|
179
|
+
if (current === undefined || minimum === undefined) {
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
for (let index = 0;index < 3; index += 1) {
|
|
183
|
+
if (current[index] !== minimum[index]) {
|
|
184
|
+
return (current[index] ?? 0) > (minimum[index] ?? 0);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return !current[3];
|
|
188
|
+
};
|
|
189
|
+
var assertDeviceOperationSupport = (devices) => {
|
|
190
|
+
const unsupported = devices.filter((device) => !supportsDeviceOperations(device.version));
|
|
191
|
+
if (unsupported.length === 0) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
throw new Error(`All-device upgrades require Cohall ${minimumDeviceOperationVersion} or newer on every device. Upgrade individually first: ${unsupported.map((device) => `${device.name} (${device.version})`).join(", ")}`);
|
|
195
|
+
};
|
|
196
|
+
var Thread = Schema.Struct({
|
|
197
|
+
id: ThreadId,
|
|
198
|
+
title: bounded(256),
|
|
199
|
+
createdAt: Timestamp,
|
|
200
|
+
updatedAt: Timestamp,
|
|
201
|
+
defaultDeviceId: Schema.optionalKey(DeviceId)
|
|
202
|
+
});
|
|
203
|
+
var Message = Schema.Struct({
|
|
204
|
+
id: MessageId,
|
|
205
|
+
threadId: ThreadId,
|
|
206
|
+
role: MessageRole,
|
|
207
|
+
authorName: bounded(128),
|
|
208
|
+
content: optionalText(131072),
|
|
209
|
+
createdAt: Timestamp,
|
|
210
|
+
taskId: Schema.optionalKey(TaskId),
|
|
211
|
+
deviceId: Schema.optionalKey(DeviceId)
|
|
212
|
+
});
|
|
213
|
+
var AttachmentName = Schema.String.check(Schema.isMinLength(1), Schema.isMaxLength(128), Schema.makeFilter((name) => name !== "." && name !== ".." && !/[<>:"/\\|?*]/.test(name) && !/[. ]$/.test(name) && !/^(?:CON|PRN|AUX|NUL|CONIN\$|CONOUT\$|COM[1-9¹²³]|LPT[1-9¹²³])(?:\.|$)/i.test(name) && new TextEncoder().encode(name).byteLength <= 128 && [...name].every((character) => character.charCodeAt(0) >= 32 && character.charCodeAt(0) !== 127) ? undefined : "Use a file name without path separators or control characters"));
|
|
214
|
+
var AttachmentDirection = Schema.Literals(["input", "output"]);
|
|
215
|
+
var TaskAttachment = Schema.Struct({
|
|
216
|
+
name: AttachmentName,
|
|
217
|
+
direction: AttachmentDirection,
|
|
218
|
+
bytes: Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: maxAttachmentBytes }))
|
|
219
|
+
});
|
|
220
|
+
var InputAttachment = Schema.Struct({
|
|
221
|
+
name: AttachmentName,
|
|
222
|
+
data: Schema.String.check(Schema.isMaxLength(Math.ceil(maxAttachmentBytes / 3) * 4), Schema.makeFilter((value) => value.length > 0 && value.length % 4 === 0 && value.length / 4 * 3 - (value.endsWith("==") ? 2 : value.endsWith("=") ? 1 : 0) <= maxAttachmentBytes && /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(value) ? undefined : "Expected nonempty base64 data"))
|
|
223
|
+
});
|
|
224
|
+
var attachments = boundedArray(InputAttachment, maxTaskAttachments).check(Schema.makeFilter((files) => new Set(files.map((file) => file.name.normalize("NFC").toLocaleLowerCase("en-US"))).size === files.length ? undefined : "Attachment names must be unique"));
|
|
225
|
+
var validBotTarget = (input) => {
|
|
226
|
+
const provider = input.provider ?? (input.botId === undefined ? "codex" : "grok-bot");
|
|
227
|
+
if (provider === "grok-bot" && input.workspace !== undefined) {
|
|
228
|
+
return "Grok Bots use their own computer context; omit workspace";
|
|
229
|
+
}
|
|
230
|
+
return provider === "grok-bot" === (input.botId !== undefined) ? undefined : "The grok-bot provider requires botId; other providers cannot select a bot";
|
|
231
|
+
};
|
|
232
|
+
var TaskProgressInput = Schema.Struct({
|
|
233
|
+
note: bounded(maxProgressNoteBytes).check(Schema.makeFilter((value) => value.trim().length > 0 && new TextEncoder().encode(value).byteLength <= maxProgressNoteBytes ? undefined : `Expected a nonblank progress note of at most ${maxProgressNoteBytes} UTF-8 bytes`)).pipe(Schema.brand("TaskProgressNote"))
|
|
234
|
+
});
|
|
235
|
+
var TaskProgress = Schema.Struct({ ...TaskProgressInput.fields, at: Timestamp });
|
|
236
|
+
var maxClarificationBytes = 4096;
|
|
237
|
+
var maxTaskClarifications = 10;
|
|
238
|
+
var clarificationText = bounded(maxClarificationBytes).check(Schema.makeFilter((value) => value.trim().length > 0 && new TextEncoder().encode(value).byteLength <= maxClarificationBytes ? undefined : `Expected nonblank text of at most ${maxClarificationBytes} UTF-8 bytes`)).pipe(Schema.brand("ClarificationText"));
|
|
239
|
+
var RequestTaskInput = Schema.Struct({ runId: TaskRunId, question: clarificationText });
|
|
240
|
+
var AnswerTaskInput = Schema.Struct({
|
|
241
|
+
requestId: ClarificationId,
|
|
242
|
+
answer: clarificationText
|
|
243
|
+
});
|
|
244
|
+
var TaskClarification = Schema.Struct({
|
|
245
|
+
id: ClarificationId,
|
|
246
|
+
question: RequestTaskInput.fields.question,
|
|
247
|
+
at: Timestamp,
|
|
248
|
+
answer: Schema.optionalKey(Schema.Struct({ text: AnswerTaskInput.fields.answer, at: Timestamp }))
|
|
249
|
+
});
|
|
250
|
+
var clarifications = boundedArray(TaskClarification, maxTaskClarifications);
|
|
251
|
+
var validClarificationState = (task) => task.status !== "needs_input" || task.clarifications?.at(-1) !== undefined && task.clarifications.at(-1)?.answer === undefined ? undefined : "A task awaiting input must have an unanswered question";
|
|
252
|
+
var Task = Schema.Struct({
|
|
253
|
+
id: TaskId,
|
|
254
|
+
runId: Schema.optionalKey(TaskRunId),
|
|
255
|
+
threadId: ThreadId,
|
|
256
|
+
prompt: bounded(131072),
|
|
257
|
+
context: Schema.optionalKey(optionalText(131072)),
|
|
258
|
+
provider: Provider,
|
|
259
|
+
botId: Schema.optionalKey(BotId),
|
|
260
|
+
status: TaskStatus,
|
|
261
|
+
sourceDeviceId: Schema.optionalKey(DeviceId),
|
|
262
|
+
targetDeviceId: DeviceId,
|
|
263
|
+
parentTaskId: Schema.optionalKey(TaskId),
|
|
264
|
+
workspace: Schema.optionalKey(bounded(4096)),
|
|
265
|
+
providerSessionId: Schema.optionalKey(bounded(4096)),
|
|
266
|
+
result: Schema.optionalKey(optionalText(131072)),
|
|
267
|
+
inputAttachmentNames: Schema.optionalKey(boundedArray(AttachmentName, maxTaskAttachments)),
|
|
268
|
+
error: Schema.optionalKey(optionalText(16384)),
|
|
269
|
+
progress: Schema.optionalKey(TaskProgress),
|
|
270
|
+
clarifications: Schema.optionalKey(clarifications),
|
|
271
|
+
createdAt: Timestamp,
|
|
272
|
+
updatedAt: Timestamp,
|
|
273
|
+
startedAt: Schema.optionalKey(Timestamp),
|
|
274
|
+
completedAt: Schema.optionalKey(Timestamp),
|
|
275
|
+
expiresAt: Schema.optionalKey(TaskDeadline)
|
|
276
|
+
}).check(Schema.makeFilter(validBotTarget), Schema.makeFilter(validClarificationState));
|
|
277
|
+
var TaskInboxItem = Schema.Struct({
|
|
278
|
+
id: TaskId,
|
|
279
|
+
threadId: ThreadId,
|
|
280
|
+
targetDeviceId: DeviceId,
|
|
281
|
+
provider: Provider,
|
|
282
|
+
botId: Schema.optionalKey(BotId),
|
|
283
|
+
status: Schema.Literals(["needs_input", "completed", "failed", "cancelled"]),
|
|
284
|
+
promptPreview: optionalText(320),
|
|
285
|
+
resultPreview: Schema.optionalKey(optionalText(1024)),
|
|
286
|
+
errorPreview: Schema.optionalKey(optionalText(1024)),
|
|
287
|
+
completedAt: Schema.optionalKey(Timestamp),
|
|
288
|
+
inputRequest: Schema.optionalKey(TaskClarification)
|
|
289
|
+
}).check(Schema.makeFilter((item) => item.status === "needs_input" ? item.inputRequest !== undefined && item.inputRequest.answer === undefined && item.completedAt === undefined ? undefined : "An input request must have an unanswered question and no completion time" : item.completedAt !== undefined && item.inputRequest === undefined ? undefined : "A completion must have a completion time and no input request"));
|
|
290
|
+
var TaskInbox = Schema.Struct({
|
|
291
|
+
items: boundedArray(TaskInboxItem, 20),
|
|
292
|
+
hasMore: Schema.Boolean
|
|
293
|
+
});
|
|
294
|
+
var taskSlot = (task) => task.provider === "grok-bot" ? `grok-bot:${task.botId}` : "cli";
|
|
295
|
+
var upgradeVersion = Schema.String.check(Schema.isPattern(/^(?:latest|v?\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?)$/, {
|
|
296
|
+
expected: "latest or an exact semantic version"
|
|
297
|
+
}));
|
|
298
|
+
var CreateUpgradeOperationsInput = Schema.Struct({
|
|
299
|
+
target: upgradeVersion,
|
|
300
|
+
restart: Schema.Boolean
|
|
301
|
+
});
|
|
302
|
+
var DeviceOperation = Schema.Struct({
|
|
303
|
+
id: OperationId,
|
|
304
|
+
kind: Schema.Literal("upgrade"),
|
|
305
|
+
status: OperationStatus,
|
|
306
|
+
targetDeviceId: DeviceId,
|
|
307
|
+
requestedVersion: upgradeVersion,
|
|
308
|
+
restart: Schema.Boolean,
|
|
309
|
+
result: Schema.optionalKey(optionalText(16384)),
|
|
310
|
+
error: Schema.optionalKey(optionalText(16384)),
|
|
311
|
+
createdAt: Timestamp,
|
|
312
|
+
updatedAt: Timestamp,
|
|
313
|
+
completedAt: Schema.optionalKey(Timestamp)
|
|
314
|
+
});
|
|
315
|
+
var TaskStatusCounts = Schema.Struct({
|
|
316
|
+
queued: count,
|
|
317
|
+
assigned: count,
|
|
318
|
+
running: count,
|
|
319
|
+
needs_input: Schema.optionalKey(count),
|
|
320
|
+
cancelling: count,
|
|
321
|
+
completed: count,
|
|
322
|
+
failed: count,
|
|
323
|
+
cancelled: count
|
|
324
|
+
});
|
|
325
|
+
var ProviderUsage = Schema.Struct({
|
|
326
|
+
provider: Provider,
|
|
327
|
+
tasks: count
|
|
328
|
+
});
|
|
329
|
+
var DeviceUsage = Schema.Struct({
|
|
330
|
+
deviceId: DeviceId,
|
|
331
|
+
deviceName: bounded(128),
|
|
332
|
+
tasks: count,
|
|
333
|
+
byStatus: TaskStatusCounts,
|
|
334
|
+
byProvider: boundedArray(ProviderUsage, Provider.literals.length)
|
|
335
|
+
});
|
|
336
|
+
var UsageSummary = Schema.Struct({
|
|
337
|
+
retainedTasks: count,
|
|
338
|
+
byStatus: TaskStatusCounts,
|
|
339
|
+
byProvider: boundedArray(ProviderUsage, Provider.literals.length),
|
|
340
|
+
devices: Schema.Array(DeviceUsage)
|
|
341
|
+
});
|
|
342
|
+
var TaskTraceEvent = Schema.Struct({
|
|
343
|
+
kind: TaskTraceEventKind,
|
|
344
|
+
at: Timestamp,
|
|
345
|
+
detail: Schema.optionalKey(optionalText(512))
|
|
346
|
+
});
|
|
347
|
+
var TaskTrace = Schema.Struct({
|
|
348
|
+
taskId: TaskId,
|
|
349
|
+
threadId: ThreadId,
|
|
350
|
+
status: TaskStatus,
|
|
351
|
+
provider: Provider,
|
|
352
|
+
botId: Schema.optionalKey(BotId),
|
|
353
|
+
sourceDeviceId: Schema.optionalKey(DeviceId),
|
|
354
|
+
targetDevice: Device,
|
|
355
|
+
parentTaskId: Schema.optionalKey(TaskId),
|
|
356
|
+
workspace: Schema.optionalKey(bounded(4096)),
|
|
357
|
+
createdAt: Timestamp,
|
|
358
|
+
updatedAt: Timestamp,
|
|
359
|
+
startedAt: Schema.optionalKey(Timestamp),
|
|
360
|
+
completedAt: Schema.optionalKey(Timestamp),
|
|
361
|
+
expiresAt: Schema.optionalKey(TaskDeadline),
|
|
362
|
+
events: boundedArray(TaskTraceEvent, 100),
|
|
363
|
+
truncated: Schema.Boolean,
|
|
364
|
+
error: Schema.optionalKey(optionalText(16384)),
|
|
365
|
+
progress: Schema.optionalKey(TaskProgress),
|
|
366
|
+
clarifications: Schema.optionalKey(clarifications)
|
|
367
|
+
}).check(Schema.makeFilter(validBotTarget), Schema.makeFilter(validClarificationState));
|
|
368
|
+
var ThreadContext = Schema.Struct({
|
|
369
|
+
thread: Thread,
|
|
370
|
+
messages: boundedArray(Message, 20),
|
|
371
|
+
tasks: boundedArray(Task, 20),
|
|
372
|
+
truncated: Schema.Boolean
|
|
373
|
+
});
|
|
374
|
+
var CreateTaskInput = Schema.Struct({
|
|
375
|
+
requestId: Schema.optionalKey(TaskRequestId),
|
|
376
|
+
threadId: Schema.optionalKey(ThreadId),
|
|
377
|
+
title: Schema.optionalKey(bounded(256)),
|
|
378
|
+
prompt: bounded(131072),
|
|
379
|
+
context: Schema.optionalKey(optionalText(131072)),
|
|
380
|
+
provider: Schema.optionalKey(Provider),
|
|
381
|
+
botId: Schema.optionalKey(BotId),
|
|
382
|
+
targetDeviceId: Schema.optionalKey(DeviceId),
|
|
383
|
+
parentTaskId: Schema.optionalKey(TaskId),
|
|
384
|
+
expiresAt: Schema.optionalKey(TaskDeadline),
|
|
385
|
+
workspace: Schema.optionalKey(bounded(4096)),
|
|
386
|
+
attachments: Schema.optionalKey(attachments)
|
|
387
|
+
}).check(Schema.makeFilter(validBotTarget));
|
|
388
|
+
var SocketEvent = Schema.TaggedUnion({
|
|
389
|
+
Authenticate: {
|
|
390
|
+
token: bounded(maxAuthTokenBytes).check(Schema.makeFilter((token) => new TextEncoder().encode(token).byteLength <= maxAuthTokenBytes ? undefined : `Authentication token exceeds ${maxAuthTokenBytes} UTF-8 bytes`))
|
|
391
|
+
},
|
|
392
|
+
Connected: {
|
|
393
|
+
serverVersion: bounded(32),
|
|
394
|
+
connectedAt: Timestamp,
|
|
395
|
+
taskAttachments: Schema.optionalKey(Schema.Boolean),
|
|
396
|
+
taskClarification: Schema.optionalKey(Schema.Boolean),
|
|
397
|
+
taskDeadlines: Schema.optionalKey(Schema.Boolean)
|
|
398
|
+
},
|
|
399
|
+
DeviceHello: { device: Device },
|
|
400
|
+
DeviceHeartbeat: {
|
|
401
|
+
deviceId: DeviceId,
|
|
402
|
+
status: DeviceStatus,
|
|
403
|
+
bots: Schema.optionalKey(boundedArray(Bot, 256))
|
|
404
|
+
},
|
|
405
|
+
TaskAssigned: { task: Task },
|
|
406
|
+
TaskAccepted: { taskId: TaskId, runId: Schema.optionalKey(TaskRunId) },
|
|
407
|
+
TaskFinished: {
|
|
408
|
+
taskId: TaskId,
|
|
409
|
+
runId: Schema.optionalKey(TaskRunId),
|
|
410
|
+
result: optionalText(131072),
|
|
411
|
+
attachments: Schema.optionalKey(attachments),
|
|
412
|
+
providerSessionId: Schema.optionalKey(bounded(4096))
|
|
413
|
+
},
|
|
414
|
+
TaskInputRequested: {
|
|
415
|
+
taskId: TaskId,
|
|
416
|
+
...RequestTaskInput.fields
|
|
417
|
+
},
|
|
418
|
+
TaskFailed: { taskId: TaskId, runId: Schema.optionalKey(TaskRunId), error: bounded(16384) },
|
|
419
|
+
TaskCancelled: { taskId: TaskId, runId: Schema.optionalKey(TaskRunId) },
|
|
420
|
+
TaskSettled: { taskId: TaskId, runId: Schema.optionalKey(TaskRunId) },
|
|
421
|
+
CancelTask: { taskId: TaskId, runId: Schema.optionalKey(TaskRunId) },
|
|
422
|
+
OperationAssigned: { operation: DeviceOperation },
|
|
423
|
+
OperationAccepted: { operationId: OperationId },
|
|
424
|
+
OperationFinished: { operationId: OperationId, result: optionalText(16384) },
|
|
425
|
+
OperationFailed: { operationId: OperationId, error: bounded(16384) },
|
|
426
|
+
OperationSettled: { operationId: OperationId },
|
|
427
|
+
Error: { code: bounded(64), message: bounded(2048) }
|
|
428
|
+
});
|
|
429
|
+
var ErrorResponse = Schema.Struct({
|
|
430
|
+
error: bounded(2048)
|
|
431
|
+
});
|
|
432
|
+
var terminalTaskStatuses = new Set([
|
|
433
|
+
"completed",
|
|
434
|
+
"failed",
|
|
435
|
+
"cancelled"
|
|
436
|
+
]);
|
|
437
|
+
var isTerminalTask = (task) => terminalTaskStatuses.has(task.status);
|
|
438
|
+
var now = () => Timestamp.make(new Date().toISOString());
|
|
439
|
+
var makeDeviceId = () => DeviceId.make(crypto.randomUUID());
|
|
440
|
+
var makeThreadId = () => ThreadId.make(crypto.randomUUID());
|
|
441
|
+
var makeMessageId = () => MessageId.make(crypto.randomUUID());
|
|
442
|
+
var makeTaskId = () => TaskId.make(crypto.randomUUID());
|
|
443
|
+
var makeAuthSessionId = () => AuthSessionId.make(crypto.randomUUID());
|
|
444
|
+
var makeOperationId = () => OperationId.make(crypto.randomUUID());
|
|
445
|
+
var decodeCreatePairingInput = Schema.decodeUnknownEffect(CreatePairingInput);
|
|
446
|
+
var decodeTaskProgressInput = Schema.decodeUnknownEffect(TaskProgressInput);
|
|
447
|
+
var decodeRequestTaskInput = Schema.decodeUnknownEffect(RequestTaskInput);
|
|
448
|
+
var decodeAnswerTaskInput = Schema.decodeUnknownEffect(AnswerTaskInput);
|
|
449
|
+
var decodeExchangePairingInput = Schema.decodeUnknownEffect(ExchangePairingInput);
|
|
450
|
+
var decodeCreateTaskInput = (input) => Schema.decodeUnknownEffect(CreateTaskInput)(input).pipe(Effect.map((task) => ({
|
|
451
|
+
...task,
|
|
452
|
+
provider: task.provider ?? (task.botId === undefined ? "codex" : "grok-bot")
|
|
453
|
+
})));
|
|
454
|
+
var decodeCreateUpgradeOperationsInput = Schema.decodeUnknownEffect(CreateUpgradeOperationsInput);
|
|
455
|
+
var decodeDevice = Schema.decodeUnknownEffect(Device);
|
|
456
|
+
var decodeSocketEvent = Schema.decodeUnknownEffect(SocketEvent);
|
|
457
|
+
|
|
458
|
+
export { maxSocketPayloadBytes, maxAuthTokenBytes, maxAttachmentBytes, maxTaskAttachments, maxProgressNoteBytes, assertOwnerToken, BotId, Bot, DeviceId, ThreadId, TaskId, TaskRequestId, TaskRunId, ClarificationId, AuthSessionId, OperationId, Timestamp, TaskDeadline, taskDeadlineError, taskDeadlinePassed, Provider, TaskStatus, ConnectionRole, AuthSession, PairingCredential, PairingResult, Device, DeviceOverview, maxDevicePageDevices, maxDevicePageResponseBytes, DevicePage, assertDeviceOperationSupport, Thread, Message, AttachmentName, AttachmentDirection, TaskAttachment, TaskProgressInput, TaskProgress, maxClarificationBytes, maxTaskClarifications, RequestTaskInput, AnswerTaskInput, TaskClarification, Task, TaskInboxItem, TaskInbox, taskSlot, DeviceOperation, TaskStatusCounts, DeviceUsage, UsageSummary, TaskTraceEvent, TaskTrace, ThreadContext, SocketEvent, ErrorResponse, terminalTaskStatuses, isTerminalTask, now, makeDeviceId, makeThreadId, makeMessageId, makeTaskId, makeAuthSessionId, makeOperationId, decodeCreatePairingInput, decodeTaskProgressInput, decodeRequestTaskInput, decodeAnswerTaskInput, decodeExchangePairingInput, decodeCreateTaskInput, decodeCreateUpgradeOperationsInput, decodeSocketEvent };
|
|
459
|
+
|
|
460
|
+
//# debugId=31729187529FEFFE64756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../packages/protocol/src/index.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { Effect, Schema } from \"effect\"\n\nexport { version } from \"./version.ts\"\n\nexport const maxSocketPayloadBytes = 1024 * 1024\nexport const maxAuthTokenBytes = 512\nexport const maxAttachmentBytes = 256 * 1024\nexport const maxTaskAttachments = 2\nexport const maxProgressNoteBytes = 1024\n\nconst bounded = (maxLength: number) =>\n Schema.String.check(Schema.isMinLength(1), Schema.isMaxLength(maxLength))\nconst optionalText = (maxLength: number) => Schema.String.check(Schema.isMaxLength(maxLength))\nconst boundedArray = <S extends Schema.Top>(schema: S, maxLength: number) =>\n Schema.Array(schema).check(Schema.isMaxLength(maxLength))\nconst count = Schema.Int.check(Schema.isBetween({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER }))\n\nexport const assertOwnerToken = (token: string): void => {\n if (token.length < 32) {\n throw new Error(\"The Cohall relay owner token must be at least 32 characters\")\n }\n if (new TextEncoder().encode(token).byteLength > maxAuthTokenBytes) {\n throw new Error(`The Cohall relay owner token must be at most ${maxAuthTokenBytes} UTF-8 bytes`)\n }\n if (token.trim() !== token || !/^[\\t\\x20-\\x7e\\x80-\\xff]+$/.test(token)) {\n throw new Error(\n \"The Cohall relay owner token must fit an HTTP header without leading or trailing whitespace\",\n )\n }\n}\n\nconst uuid = <Name extends string>(name: Name) =>\n Schema.String.check(Schema.isUUID(4)).pipe(Schema.brand(name))\nconst isoTimestamp = <Name extends string>(name: Name) =>\n Schema.String.check(\n Schema.isPattern(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$/, {\n expected: \"an ISO-8601 UTC timestamp\",\n }),\n ).pipe(Schema.brand(name))\n\nexport const BotId = bounded(256).pipe(Schema.brand(\"BotId\"))\nexport type BotId = typeof BotId.Type\n\nexport const Bot = Schema.Struct({\n id: BotId,\n name: bounded(128),\n description: Schema.optionalKey(optionalText(512)),\n})\nexport interface Bot extends Schema.Schema.Type<typeof Bot> {}\n\nexport const DeviceId = uuid(\"DeviceId\")\nexport type DeviceId = typeof DeviceId.Type\nexport const ThreadId = uuid(\"ThreadId\")\nexport type ThreadId = typeof ThreadId.Type\nexport const MessageId = uuid(\"MessageId\")\nexport type MessageId = typeof MessageId.Type\nexport const TaskId = uuid(\"TaskId\")\nexport type TaskId = typeof TaskId.Type\nexport const TaskRequestId = uuid(\"TaskRequestId\")\nexport type TaskRequestId = typeof TaskRequestId.Type\nexport const TaskRunId = uuid(\"TaskRunId\")\nexport type TaskRunId = typeof TaskRunId.Type\nexport const ClarificationId = uuid(\"ClarificationId\")\nexport type ClarificationId = typeof ClarificationId.Type\nexport const AuthSessionId = uuid(\"AuthSessionId\")\nexport type AuthSessionId = typeof AuthSessionId.Type\nexport const OperationId = uuid(\"OperationId\")\nexport type OperationId = typeof OperationId.Type\nexport const Timestamp = isoTimestamp(\"Timestamp\")\nexport type Timestamp = typeof Timestamp.Type\n\nexport const TaskDeadline = Timestamp.check(\n Schema.makeFilter((value) => {\n const time = Date.parse(value)\n return Number.isFinite(time) && new Date(time).toISOString().slice(0, 19) === value.slice(0, 19)\n ? undefined\n : \"Expected a valid ISO-8601 UTC deadline\"\n }),\n)\nexport const taskDeadlineError = \"Task deadline exceeded\"\nexport const taskDeadlinePassed = (task: { readonly expiresAt?: Timestamp }, time = Date.now()) =>\n task.expiresAt !== undefined && Date.parse(task.expiresAt) <= time\n\nexport const Platform = Schema.Literals([\"darwin\", \"linux\", \"windows\", \"unknown\"])\nexport type Platform = typeof Platform.Type\nexport const Provider = Schema.Literals([\"codex\", \"claude-code\", \"opencode\", \"grok-bot\"])\nexport type Provider = typeof Provider.Type\nexport const DeviceStatus = Schema.Literals([\"online\", \"busy\", \"offline\"])\nexport type DeviceStatus = typeof DeviceStatus.Type\nexport const TaskStatus = Schema.Literals([\n \"queued\",\n \"assigned\",\n \"running\",\n \"needs_input\",\n \"cancelling\",\n \"completed\",\n \"failed\",\n \"cancelled\",\n])\nexport type TaskStatus = typeof TaskStatus.Type\nexport const OperationStatus = Schema.Literals([\n \"queued\",\n \"assigned\",\n \"running\",\n \"completed\",\n \"failed\",\n])\nexport type OperationStatus = typeof OperationStatus.Type\nexport const TaskTraceEventKind = Schema.Literals([\n ...TaskStatus.literals,\n \"requeued\",\n \"input_requested\",\n \"input_answered\",\n])\nexport type TaskTraceEventKind = typeof TaskTraceEventKind.Type\nexport const MessageRole = Schema.Literals([\"human\", \"agent\", \"system\"])\nexport type MessageRole = typeof MessageRole.Type\nexport const ConnectionRole = Schema.Literals([\"client\", \"device\"])\nexport type ConnectionRole = typeof ConnectionRole.Type\n\nexport const AuthSession = Schema.Struct({\n id: AuthSessionId,\n label: bounded(128),\n role: ConnectionRole,\n createdAt: Timestamp,\n expiresAt: Timestamp,\n lastSeenAt: Timestamp,\n deviceId: Schema.optionalKey(DeviceId),\n revokedAt: Schema.optionalKey(Timestamp),\n})\nexport interface AuthSession extends Schema.Schema.Type<typeof AuthSession> {}\n\nexport const CreatePairingInput = Schema.Struct({\n label: bounded(128),\n roles: boundedArray(ConnectionRole, 2),\n})\nexport interface CreatePairingInput extends Schema.Schema.Type<typeof CreatePairingInput> {}\n\nexport const PairingCredential = Schema.Struct({\n token: bounded(256),\n expiresAt: Timestamp,\n})\nexport interface PairingCredential extends Schema.Schema.Type<typeof PairingCredential> {}\n\nexport const ExchangePairingInput = Schema.Struct({\n token: bounded(256),\n})\nexport interface ExchangePairingInput extends Schema.Schema.Type<typeof ExchangePairingInput> {}\n\nexport const SessionCredential = Schema.Struct({\n token: bounded(256),\n session: AuthSession,\n})\nexport interface SessionCredential extends Schema.Schema.Type<typeof SessionCredential> {}\n\nexport const PairingResult = Schema.Struct({\n credentials: boundedArray(SessionCredential, 2),\n})\nexport interface PairingResult extends Schema.Schema.Type<typeof PairingResult> {}\n\nexport const Capability = Schema.Struct({\n id: bounded(64),\n label: bounded(128),\n detail: Schema.optionalKey(optionalText(512)),\n})\nexport interface Capability extends Schema.Schema.Type<typeof Capability> {}\n\nexport const Workspace = Schema.Struct({\n path: bounded(4096),\n label: bounded(256),\n})\nexport interface Workspace extends Schema.Schema.Type<typeof Workspace> {}\n\nexport const Device = Schema.Struct({\n id: DeviceId,\n name: bounded(128),\n description: Schema.optionalKey(optionalText(512)),\n hostname: bounded(256),\n platform: Platform,\n architecture: bounded(64),\n status: DeviceStatus,\n providers: boundedArray(Provider, Provider.literals.length),\n bots: Schema.optionalKey(boundedArray(Bot, 256)),\n capabilities: boundedArray(Capability, 64),\n workspaces: boundedArray(Workspace, 64),\n version: bounded(32),\n lastSeenAt: Timestamp,\n connectedAt: Schema.optionalKey(Timestamp),\n queue: Schema.optionalKey(\n Schema.Struct({\n queued: count,\n oldestQueuedAt: Schema.optionalKey(Timestamp),\n }),\n ),\n})\nexport interface Device extends Schema.Schema.Type<typeof Device> {}\n\nexport const DeviceOverview = Schema.Struct({\n id: Device.fields.id,\n name: Device.fields.name,\n description: Device.fields.description,\n status: Device.fields.status,\n version: Device.fields.version,\n lastSeenAt: Device.fields.lastSeenAt,\n queued: count,\n active: count,\n needsInput: count,\n cancelling: count,\n oldestQueuedAt: Schema.optionalKey(Timestamp),\n})\nexport interface DeviceOverview extends Schema.Schema.Type<typeof DeviceOverview> {}\n\nexport const maxDevicePageDevices = 16\nexport const maxDevicePageResponseBytes = 3 * 1024 * 1024\nexport const DevicePage = Schema.Struct({\n devices: boundedArray(Device, maxDevicePageDevices),\n nextCursor: Schema.optionalKey(DeviceId),\n}).check(\n Schema.makeFilter((page) => {\n let previous: DeviceId | undefined\n for (const device of page.devices) {\n if (previous !== undefined && device.id <= previous)\n return \"Device pages must be ordered by ID\"\n previous = device.id\n }\n return page.nextCursor === undefined || page.nextCursor === previous\n ? undefined\n : \"The next cursor must be the last device ID\"\n }),\n)\nexport interface DevicePage extends Schema.Schema.Type<typeof DevicePage> {}\n\nexport const minimumDeviceOperationVersion = \"0.5.0\"\n\nconst parsedVersion = (value: string): readonly [number, number, number, boolean] | undefined => {\n const match = /^v?(\\d+)\\.(\\d+)\\.(\\d+)(-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$/.exec(value)\n if (match === null) {\n return undefined\n }\n const core = match.slice(1, 4).map(Number)\n if (core.length !== 3 || core.some((part) => !Number.isSafeInteger(part))) {\n return undefined\n }\n return [core[0] ?? 0, core[1] ?? 0, core[2] ?? 0, match[4] !== undefined]\n}\n\nexport const supportsDeviceOperations = (candidate: string): boolean => {\n if (candidate === \"0.0.0-development\") {\n return true\n }\n const current = parsedVersion(candidate)\n const minimum = parsedVersion(minimumDeviceOperationVersion)\n if (current === undefined || minimum === undefined) {\n return false\n }\n for (let index = 0; index < 3; index += 1) {\n if (current[index] !== minimum[index]) {\n return (current[index] ?? 0) > (minimum[index] ?? 0)\n }\n }\n return !current[3]\n}\n\nexport const assertDeviceOperationSupport = (\n devices: ReadonlyArray<{ readonly name: string; readonly version: string }>,\n): void => {\n const unsupported = devices.filter((device) => !supportsDeviceOperations(device.version))\n if (unsupported.length === 0) {\n return\n }\n throw new Error(\n `All-device upgrades require Cohall ${minimumDeviceOperationVersion} or newer on every device. Upgrade individually first: ${unsupported.map((device) => `${device.name} (${device.version})`).join(\", \")}`,\n )\n}\n\nexport const Thread = Schema.Struct({\n id: ThreadId,\n title: bounded(256),\n createdAt: Timestamp,\n updatedAt: Timestamp,\n defaultDeviceId: Schema.optionalKey(DeviceId),\n})\nexport interface Thread extends Schema.Schema.Type<typeof Thread> {}\n\nexport const Message = Schema.Struct({\n id: MessageId,\n threadId: ThreadId,\n role: MessageRole,\n authorName: bounded(128),\n content: optionalText(131_072),\n createdAt: Timestamp,\n taskId: Schema.optionalKey(TaskId),\n deviceId: Schema.optionalKey(DeviceId),\n})\nexport interface Message extends Schema.Schema.Type<typeof Message> {}\n\nexport const AttachmentName = Schema.String.check(\n Schema.isMinLength(1),\n Schema.isMaxLength(128),\n Schema.makeFilter((name) =>\n name !== \".\" &&\n name !== \"..\" &&\n !/[<>:\"/\\\\|?*]/.test(name) &&\n !/[. ]$/.test(name) &&\n !/^(?:CON|PRN|AUX|NUL|CONIN\\$|CONOUT\\$|COM[1-9¹²³]|LPT[1-9¹²³])(?:\\.|$)/i.test(name) &&\n new TextEncoder().encode(name).byteLength <= 128 &&\n [...name].every((character) => character.charCodeAt(0) >= 32 && character.charCodeAt(0) !== 127)\n ? undefined\n : \"Use a file name without path separators or control characters\",\n ),\n)\nexport type AttachmentName = typeof AttachmentName.Type\n\nexport const AttachmentDirection = Schema.Literals([\"input\", \"output\"])\nexport type AttachmentDirection = typeof AttachmentDirection.Type\n\nexport const TaskAttachment = Schema.Struct({\n name: AttachmentName,\n direction: AttachmentDirection,\n bytes: Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: maxAttachmentBytes })),\n})\nexport interface TaskAttachment extends Schema.Schema.Type<typeof TaskAttachment> {}\n\nexport const InputAttachment = Schema.Struct({\n name: AttachmentName,\n data: Schema.String.check(\n Schema.isMaxLength(Math.ceil(maxAttachmentBytes / 3) * 4),\n Schema.makeFilter((value) =>\n value.length > 0 &&\n value.length % 4 === 0 &&\n (value.length / 4) * 3 - (value.endsWith(\"==\") ? 2 : value.endsWith(\"=\") ? 1 : 0) <=\n maxAttachmentBytes &&\n /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(value)\n ? undefined\n : \"Expected nonempty base64 data\",\n ),\n ),\n})\nexport interface InputAttachment extends Schema.Schema.Type<typeof InputAttachment> {}\n\nconst attachments = boundedArray(InputAttachment, maxTaskAttachments).check(\n Schema.makeFilter((files) =>\n new Set(files.map((file) => file.name.normalize(\"NFC\").toLocaleLowerCase(\"en-US\"))).size ===\n files.length\n ? undefined\n : \"Attachment names must be unique\",\n ),\n)\n\nconst validBotTarget = (input: {\n readonly provider?: Provider\n readonly botId?: BotId\n readonly workspace?: string\n}) => {\n const provider = input.provider ?? (input.botId === undefined ? \"codex\" : \"grok-bot\")\n if (provider === \"grok-bot\" && input.workspace !== undefined) {\n return \"Grok Bots use their own computer context; omit workspace\"\n }\n return (provider === \"grok-bot\") === (input.botId !== undefined)\n ? undefined\n : \"The grok-bot provider requires botId; other providers cannot select a bot\"\n}\n\nexport const TaskProgressInput = Schema.Struct({\n note: bounded(maxProgressNoteBytes)\n .check(\n Schema.makeFilter((value) =>\n value.trim().length > 0 &&\n new TextEncoder().encode(value).byteLength <= maxProgressNoteBytes\n ? undefined\n : `Expected a nonblank progress note of at most ${maxProgressNoteBytes} UTF-8 bytes`,\n ),\n )\n .pipe(Schema.brand(\"TaskProgressNote\")),\n})\nexport interface TaskProgressInput extends Schema.Schema.Type<typeof TaskProgressInput> {}\n\nexport const TaskProgress = Schema.Struct({ ...TaskProgressInput.fields, at: Timestamp })\nexport interface TaskProgress extends Schema.Schema.Type<typeof TaskProgress> {}\n\nexport const maxClarificationBytes = 4096\nexport const maxTaskClarifications = 10\nconst clarificationText = bounded(maxClarificationBytes)\n .check(\n Schema.makeFilter((value) =>\n value.trim().length > 0 && new TextEncoder().encode(value).byteLength <= maxClarificationBytes\n ? undefined\n : `Expected nonblank text of at most ${maxClarificationBytes} UTF-8 bytes`,\n ),\n )\n .pipe(Schema.brand(\"ClarificationText\"))\n\nexport const RequestTaskInput = Schema.Struct({ runId: TaskRunId, question: clarificationText })\nexport interface RequestTaskInput extends Schema.Schema.Type<typeof RequestTaskInput> {}\nexport const AnswerTaskInput = Schema.Struct({\n requestId: ClarificationId,\n answer: clarificationText,\n})\nexport interface AnswerTaskInput extends Schema.Schema.Type<typeof AnswerTaskInput> {}\nexport const TaskClarification = Schema.Struct({\n id: ClarificationId,\n question: RequestTaskInput.fields.question,\n at: Timestamp,\n answer: Schema.optionalKey(Schema.Struct({ text: AnswerTaskInput.fields.answer, at: Timestamp })),\n})\nexport interface TaskClarification extends Schema.Schema.Type<typeof TaskClarification> {}\nconst clarifications = boundedArray(TaskClarification, maxTaskClarifications)\n\nconst validClarificationState = (task: {\n readonly status: TaskStatus\n readonly clarifications?: ReadonlyArray<TaskClarification>\n}) =>\n task.status !== \"needs_input\" ||\n (task.clarifications?.at(-1) !== undefined && task.clarifications.at(-1)?.answer === undefined)\n ? undefined\n : \"A task awaiting input must have an unanswered question\"\n\nexport const Task = Schema.Struct({\n id: TaskId,\n runId: Schema.optionalKey(TaskRunId),\n threadId: ThreadId,\n prompt: bounded(131_072),\n context: Schema.optionalKey(optionalText(131_072)),\n provider: Provider,\n botId: Schema.optionalKey(BotId),\n status: TaskStatus,\n sourceDeviceId: Schema.optionalKey(DeviceId),\n targetDeviceId: DeviceId,\n parentTaskId: Schema.optionalKey(TaskId),\n workspace: Schema.optionalKey(bounded(4096)),\n providerSessionId: Schema.optionalKey(bounded(4096)),\n result: Schema.optionalKey(optionalText(131_072)),\n inputAttachmentNames: Schema.optionalKey(boundedArray(AttachmentName, maxTaskAttachments)),\n error: Schema.optionalKey(optionalText(16_384)),\n progress: Schema.optionalKey(TaskProgress),\n clarifications: Schema.optionalKey(clarifications),\n createdAt: Timestamp,\n updatedAt: Timestamp,\n startedAt: Schema.optionalKey(Timestamp),\n completedAt: Schema.optionalKey(Timestamp),\n expiresAt: Schema.optionalKey(TaskDeadline),\n}).check(Schema.makeFilter(validBotTarget), Schema.makeFilter(validClarificationState))\nexport interface Task extends Schema.Schema.Type<typeof Task> {}\n\nexport const TaskInboxItem = Schema.Struct({\n id: TaskId,\n threadId: ThreadId,\n targetDeviceId: DeviceId,\n provider: Provider,\n botId: Schema.optionalKey(BotId),\n status: Schema.Literals([\"needs_input\", \"completed\", \"failed\", \"cancelled\"]),\n promptPreview: optionalText(320),\n resultPreview: Schema.optionalKey(optionalText(1024)),\n errorPreview: Schema.optionalKey(optionalText(1024)),\n completedAt: Schema.optionalKey(Timestamp),\n inputRequest: Schema.optionalKey(TaskClarification),\n}).check(\n Schema.makeFilter((item) =>\n item.status === \"needs_input\"\n ? item.inputRequest !== undefined &&\n item.inputRequest.answer === undefined &&\n item.completedAt === undefined\n ? undefined\n : \"An input request must have an unanswered question and no completion time\"\n : item.completedAt !== undefined && item.inputRequest === undefined\n ? undefined\n : \"A completion must have a completion time and no input request\",\n ),\n)\nexport interface TaskInboxItem extends Schema.Schema.Type<typeof TaskInboxItem> {}\n\nexport const TaskInbox = Schema.Struct({\n items: boundedArray(TaskInboxItem, 20),\n hasMore: Schema.Boolean,\n})\nexport interface TaskInbox extends Schema.Schema.Type<typeof TaskInbox> {}\n\nexport const taskSlot = (task: Pick<Task, \"provider\" | \"botId\">): string =>\n task.provider === \"grok-bot\" ? `grok-bot:${task.botId}` : \"cli\"\n\nconst upgradeVersion = Schema.String.check(\n Schema.isPattern(/^(?:latest|v?\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?)$/, {\n expected: \"latest or an exact semantic version\",\n }),\n)\n\nexport const CreateUpgradeOperationsInput = Schema.Struct({\n target: upgradeVersion,\n restart: Schema.Boolean,\n})\nexport interface CreateUpgradeOperationsInput extends Schema.Schema.Type<\n typeof CreateUpgradeOperationsInput\n> {}\n\nexport const DeviceOperation = Schema.Struct({\n id: OperationId,\n kind: Schema.Literal(\"upgrade\"),\n status: OperationStatus,\n targetDeviceId: DeviceId,\n requestedVersion: upgradeVersion,\n restart: Schema.Boolean,\n result: Schema.optionalKey(optionalText(16_384)),\n error: Schema.optionalKey(optionalText(16_384)),\n createdAt: Timestamp,\n updatedAt: Timestamp,\n completedAt: Schema.optionalKey(Timestamp),\n})\nexport interface DeviceOperation extends Schema.Schema.Type<typeof DeviceOperation> {}\n\nexport const TaskStatusCounts = Schema.Struct({\n queued: count,\n assigned: count,\n running: count,\n needs_input: Schema.optionalKey(count),\n cancelling: count,\n completed: count,\n failed: count,\n cancelled: count,\n})\nexport interface TaskStatusCounts extends Schema.Schema.Type<typeof TaskStatusCounts> {}\n\nexport const ProviderUsage = Schema.Struct({\n provider: Provider,\n tasks: count,\n})\nexport interface ProviderUsage extends Schema.Schema.Type<typeof ProviderUsage> {}\n\nexport const DeviceUsage = Schema.Struct({\n deviceId: DeviceId,\n deviceName: bounded(128),\n tasks: count,\n byStatus: TaskStatusCounts,\n byProvider: boundedArray(ProviderUsage, Provider.literals.length),\n})\nexport interface DeviceUsage extends Schema.Schema.Type<typeof DeviceUsage> {}\n\nexport const UsageSummary = Schema.Struct({\n retainedTasks: count,\n byStatus: TaskStatusCounts,\n byProvider: boundedArray(ProviderUsage, Provider.literals.length),\n devices: Schema.Array(DeviceUsage),\n})\nexport interface UsageSummary extends Schema.Schema.Type<typeof UsageSummary> {}\n\nexport const TaskTraceEvent = Schema.Struct({\n kind: TaskTraceEventKind,\n at: Timestamp,\n detail: Schema.optionalKey(optionalText(512)),\n})\nexport interface TaskTraceEvent extends Schema.Schema.Type<typeof TaskTraceEvent> {}\n\nexport const TaskTrace = Schema.Struct({\n taskId: TaskId,\n threadId: ThreadId,\n status: TaskStatus,\n provider: Provider,\n botId: Schema.optionalKey(BotId),\n sourceDeviceId: Schema.optionalKey(DeviceId),\n targetDevice: Device,\n parentTaskId: Schema.optionalKey(TaskId),\n workspace: Schema.optionalKey(bounded(4096)),\n createdAt: Timestamp,\n updatedAt: Timestamp,\n startedAt: Schema.optionalKey(Timestamp),\n completedAt: Schema.optionalKey(Timestamp),\n expiresAt: Schema.optionalKey(TaskDeadline),\n events: boundedArray(TaskTraceEvent, 100),\n truncated: Schema.Boolean,\n error: Schema.optionalKey(optionalText(16_384)),\n progress: Schema.optionalKey(TaskProgress),\n clarifications: Schema.optionalKey(clarifications),\n}).check(Schema.makeFilter(validBotTarget), Schema.makeFilter(validClarificationState))\nexport interface TaskTrace extends Schema.Schema.Type<typeof TaskTrace> {}\n\nexport const ThreadContext = Schema.Struct({\n thread: Thread,\n messages: boundedArray(Message, 20),\n tasks: boundedArray(Task, 20),\n truncated: Schema.Boolean,\n})\nexport interface ThreadContext extends Schema.Schema.Type<typeof ThreadContext> {}\n\nexport const CreateTaskInput = Schema.Struct({\n requestId: Schema.optionalKey(TaskRequestId),\n threadId: Schema.optionalKey(ThreadId),\n title: Schema.optionalKey(bounded(256)),\n prompt: bounded(131_072),\n context: Schema.optionalKey(optionalText(131_072)),\n provider: Schema.optionalKey(Provider),\n botId: Schema.optionalKey(BotId),\n targetDeviceId: Schema.optionalKey(DeviceId),\n parentTaskId: Schema.optionalKey(TaskId),\n expiresAt: Schema.optionalKey(TaskDeadline),\n workspace: Schema.optionalKey(bounded(4096)),\n attachments: Schema.optionalKey(attachments),\n}).check(Schema.makeFilter(validBotTarget))\nexport interface CreateTaskInput extends Schema.Schema.Type<typeof CreateTaskInput> {}\n\nexport const SocketEvent = Schema.TaggedUnion({\n Authenticate: {\n token: bounded(maxAuthTokenBytes).check(\n Schema.makeFilter((token) =>\n new TextEncoder().encode(token).byteLength <= maxAuthTokenBytes\n ? undefined\n : `Authentication token exceeds ${maxAuthTokenBytes} UTF-8 bytes`,\n ),\n ),\n },\n Connected: {\n serverVersion: bounded(32),\n connectedAt: Timestamp,\n taskAttachments: Schema.optionalKey(Schema.Boolean),\n taskClarification: Schema.optionalKey(Schema.Boolean),\n taskDeadlines: Schema.optionalKey(Schema.Boolean),\n },\n DeviceHello: { device: Device },\n DeviceHeartbeat: {\n deviceId: DeviceId,\n status: DeviceStatus,\n bots: Schema.optionalKey(boundedArray(Bot, 256)),\n },\n TaskAssigned: { task: Task },\n TaskAccepted: { taskId: TaskId, runId: Schema.optionalKey(TaskRunId) },\n TaskFinished: {\n taskId: TaskId,\n runId: Schema.optionalKey(TaskRunId),\n result: optionalText(131_072),\n attachments: Schema.optionalKey(attachments),\n providerSessionId: Schema.optionalKey(bounded(4096)),\n },\n TaskInputRequested: {\n taskId: TaskId,\n ...RequestTaskInput.fields,\n },\n TaskFailed: { taskId: TaskId, runId: Schema.optionalKey(TaskRunId), error: bounded(16_384) },\n TaskCancelled: { taskId: TaskId, runId: Schema.optionalKey(TaskRunId) },\n TaskSettled: { taskId: TaskId, runId: Schema.optionalKey(TaskRunId) },\n CancelTask: { taskId: TaskId, runId: Schema.optionalKey(TaskRunId) },\n OperationAssigned: { operation: DeviceOperation },\n OperationAccepted: { operationId: OperationId },\n OperationFinished: { operationId: OperationId, result: optionalText(16_384) },\n OperationFailed: { operationId: OperationId, error: bounded(16_384) },\n OperationSettled: { operationId: OperationId },\n Error: { code: bounded(64), message: bounded(2048) },\n})\nexport type SocketEvent = typeof SocketEvent.Type\n\nexport const ErrorResponse = Schema.Struct({\n error: bounded(2048),\n})\nexport interface ErrorResponse extends Schema.Schema.Type<typeof ErrorResponse> {}\n\nexport const terminalTaskStatuses: ReadonlySet<TaskStatus> = new Set([\n \"completed\",\n \"failed\",\n \"cancelled\",\n])\nexport const isTerminalTask = (task: Task): boolean => terminalTaskStatuses.has(task.status)\nexport const now = (): Timestamp => Timestamp.make(new Date().toISOString())\nexport const makeDeviceId = (): DeviceId => DeviceId.make(crypto.randomUUID())\nexport const makeThreadId = (): ThreadId => ThreadId.make(crypto.randomUUID())\nexport const makeMessageId = (): MessageId => MessageId.make(crypto.randomUUID())\nexport const makeTaskId = (): TaskId => TaskId.make(crypto.randomUUID())\nexport const makeAuthSessionId = (): AuthSessionId => AuthSessionId.make(crypto.randomUUID())\nexport const makeOperationId = (): OperationId => OperationId.make(crypto.randomUUID())\n\nexport const decodeCreatePairingInput = Schema.decodeUnknownEffect(CreatePairingInput)\nexport const decodeTaskProgressInput = Schema.decodeUnknownEffect(TaskProgressInput)\nexport const decodeRequestTaskInput = Schema.decodeUnknownEffect(RequestTaskInput)\nexport const decodeAnswerTaskInput = Schema.decodeUnknownEffect(AnswerTaskInput)\nexport const decodeExchangePairingInput = Schema.decodeUnknownEffect(ExchangePairingInput)\nexport const decodeCreateTaskInput = (input: unknown) =>\n Schema.decodeUnknownEffect(CreateTaskInput)(input).pipe(\n Effect.map(\n (task): CreateTaskInput => ({\n ...task,\n provider: task.provider ?? (task.botId === undefined ? \"codex\" : \"grok-bot\"),\n }),\n ),\n )\nexport const decodeCreateUpgradeOperationsInput = Schema.decodeUnknownEffect(\n CreateUpgradeOperationsInput,\n)\nexport const decodeDevice = Schema.decodeUnknownEffect(Device)\nexport const decodeSocketEvent = Schema.decodeUnknownEffect(SocketEvent)\n"
|
|
6
|
+
],
|
|
7
|
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B;AAClF,IAAM,wBAAwB,CAAC,UACpC,OAAO,oBAAoB,eAAe,EAAE,KAAK,EAAE,KACjD,OAAO,IACL,CAAC,UAA2B;AAAA,KACvB;AAAA,EACH,UAAU,KAAK,aAAa,KAAK,UAAU,YAAY,UAAU;AACnE,EACF,CACF;AACK,IAAM,qCAAqC,OAAO,oBACvD,4BACF;AACO,IAAM,eAAe,OAAO,oBAAoB,MAAM;AACtD,IAAM,oBAAoB,OAAO,oBAAoB,WAAW;",
|
|
8
|
+
"debugId": "31729187529FEFFE64756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ClientConfiguration,
|
|
3
|
+
DeviceConfiguration,
|
|
4
|
+
StoredConfiguration,
|
|
5
|
+
configurationPath,
|
|
6
|
+
credentialsForRelay,
|
|
7
|
+
knownProviders,
|
|
8
|
+
loadClientConfiguration,
|
|
9
|
+
loadDeviceConfiguration,
|
|
10
|
+
loadOwnerConfiguration,
|
|
11
|
+
makeStoredConfiguration,
|
|
12
|
+
normalizeRelayUrl,
|
|
13
|
+
parseProviders,
|
|
14
|
+
parseWorkspaces,
|
|
15
|
+
readStoredConfiguration,
|
|
16
|
+
relayDataDirectory,
|
|
17
|
+
writeStoredConfiguration
|
|
18
|
+
} from "./chunk-g6b3zmtw.js";
|
|
19
|
+
import"./chunk-04a27ybz.js";
|
|
20
|
+
import"./chunk-7dgeftrk.js";
|
|
21
|
+
export {
|
|
22
|
+
writeStoredConfiguration,
|
|
23
|
+
relayDataDirectory,
|
|
24
|
+
readStoredConfiguration,
|
|
25
|
+
parseWorkspaces,
|
|
26
|
+
parseProviders,
|
|
27
|
+
normalizeRelayUrl,
|
|
28
|
+
makeStoredConfiguration,
|
|
29
|
+
loadOwnerConfiguration,
|
|
30
|
+
loadDeviceConfiguration,
|
|
31
|
+
loadClientConfiguration,
|
|
32
|
+
knownProviders,
|
|
33
|
+
credentialsForRelay,
|
|
34
|
+
configurationPath,
|
|
35
|
+
StoredConfiguration,
|
|
36
|
+
DeviceConfiguration,
|
|
37
|
+
ClientConfiguration
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
//# debugId=FB53C0CFC8CF5E9264756E2164756E21
|