@byok-sdk/protocol 0.27.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bot-turn-outcome.d.ts +252 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +280 -8
- package/dist/index.js.map +1 -1
- package/dist/result-schema.d.ts +7 -0
- package/dist/wire-additions.d.ts +3 -3
- package/package.json +2 -1
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { type ResultSchema } from './result-schema';
|
|
2
|
+
export declare const BOT_TURN_OUTCOME_CONTRACT = "bot-turn-outcome.v1";
|
|
3
|
+
/** Code-point and item caps for Bot turn outcomes. */
|
|
4
|
+
export declare const BOT_TURN_OUTCOME_LIMITS: Readonly<{
|
|
5
|
+
delegateMaxItems: 2;
|
|
6
|
+
delegateRequestMaxLength: 1000;
|
|
7
|
+
cancelDelegationMaxItems: 2;
|
|
8
|
+
askUserQuestionMaxLength: 400;
|
|
9
|
+
askUserOptionsMaxItems: 6;
|
|
10
|
+
askUserOptionIdMaxLength: 24;
|
|
11
|
+
askUserOptionLabelMaxLength: 80;
|
|
12
|
+
confirmableActionMaxItems: 1;
|
|
13
|
+
confirmableSummaryMaxLength: 300;
|
|
14
|
+
confirmableDraftMaxBytes: 16384;
|
|
15
|
+
createRoutineMaxItems: 1;
|
|
16
|
+
updateRoutineMaxItems: 1;
|
|
17
|
+
cancelRoutineMaxItems: 2;
|
|
18
|
+
routinePromptMaxLength: 500;
|
|
19
|
+
postTextMaxLength: 2730;
|
|
20
|
+
roomCallMembersMaxItems: 4;
|
|
21
|
+
createBotMaxItems: 3;
|
|
22
|
+
updateBotMaxItems: 1;
|
|
23
|
+
deleteBotMaxItems: 1;
|
|
24
|
+
botNameMaxLength: 40;
|
|
25
|
+
botRoleMaxLength: 80;
|
|
26
|
+
botPersonaMaxLength: 300;
|
|
27
|
+
createRoomMaxItems: 1;
|
|
28
|
+
updateRoomMaxItems: 1;
|
|
29
|
+
roomNameMaxLength: 40;
|
|
30
|
+
roomMembersMaxItems: 12;
|
|
31
|
+
roomAnnouncementMaxLength: 300;
|
|
32
|
+
teamNoteMaxLength: 300;
|
|
33
|
+
}>;
|
|
34
|
+
export type NonEmptyIds = readonly [string, ...string[]];
|
|
35
|
+
/** ISO 8601 order, Monday first. Equal to core's list. A server test checks parity. */
|
|
36
|
+
export declare const ROUTINE_DAYS_OF_WEEK: readonly ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
|
|
37
|
+
export type RoutineDayOfWeek = (typeof ROUTINE_DAYS_OF_WEEK)[number];
|
|
38
|
+
export type BotTurnOutcomeSchemaErrorCode = 'not-subset' | 'schema-over-budget' | 'over-budget' | 'draft-over-budget';
|
|
39
|
+
export declare class BotTurnOutcomeSchemaError extends Error {
|
|
40
|
+
readonly code: BotTurnOutcomeSchemaErrorCode;
|
|
41
|
+
constructor(code: BotTurnOutcomeSchemaErrorCode, message: string);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* `checked` (default): field types, ranges and enums sit once in the outer
|
|
45
|
+
* properties; each oneOf branch lists only its allowed names and required
|
|
46
|
+
* fields, with additionalProperties false. An instance matches exactly one
|
|
47
|
+
* branch: daysOfWeek and dayOfMonth never appear together; month needs
|
|
48
|
+
* dayOfMonth. `flat`: the same outer object without the oneOf; the Host then
|
|
49
|
+
* refuses those two combinations at apply time. Use `flat` only under the
|
|
50
|
+
* schema budget rule of composeBotTurnOutcomeSchema. Neither form sees
|
|
51
|
+
* duplicate days, a day the month never has (Apr 31), or Feb 29.
|
|
52
|
+
*/
|
|
53
|
+
export type RoutineScheduleShape = 'checked' | 'flat';
|
|
54
|
+
/**
|
|
55
|
+
* Every id is a Host-filled enum. New objects use Host-offered localId slots
|
|
56
|
+
* (e.g. "new_bot_1"), so a same-outcome reference is also an enum member.
|
|
57
|
+
*/
|
|
58
|
+
export declare const botTurnOutcomeFragments: {
|
|
59
|
+
/** `to` lists this Bot first: delegating to yourself is a continuation. */
|
|
60
|
+
delegate(o: {
|
|
61
|
+
to: NonEmptyIds;
|
|
62
|
+
}): ResultSchema;
|
|
63
|
+
/** Owner-authorized Main Bot turns only. The Host lists open delegations. */
|
|
64
|
+
cancelDelegation(o: {
|
|
65
|
+
delegationIds: NonEmptyIds;
|
|
66
|
+
}): ResultSchema;
|
|
67
|
+
askUser(): ResultSchema;
|
|
68
|
+
/** One branch per Host action; each draft needs a finite bound of at most confirmableDraftMaxBytes. */
|
|
69
|
+
confirmableAction(o: {
|
|
70
|
+
actions: readonly [{
|
|
71
|
+
action: string;
|
|
72
|
+
draft: ResultSchema;
|
|
73
|
+
}, ...{
|
|
74
|
+
action: string;
|
|
75
|
+
draft: ResultSchema;
|
|
76
|
+
}[]];
|
|
77
|
+
}): ResultSchema;
|
|
78
|
+
/** `targets` only for a Main Bot: the Bot itself first, then team Bots. Omitted means the Bot itself. */
|
|
79
|
+
createRoutine(o: {
|
|
80
|
+
localIds: NonEmptyIds;
|
|
81
|
+
timeZones: NonEmptyIds;
|
|
82
|
+
targets?: NonEmptyIds;
|
|
83
|
+
scheduleShape?: RoutineScheduleShape;
|
|
84
|
+
}): ResultSchema;
|
|
85
|
+
updateRoutine(o: {
|
|
86
|
+
routineIds: NonEmptyIds;
|
|
87
|
+
timeZones: NonEmptyIds;
|
|
88
|
+
scheduleShape?: RoutineScheduleShape;
|
|
89
|
+
}): ResultSchema;
|
|
90
|
+
cancelRoutine(o: {
|
|
91
|
+
routineIds: NonEmptyIds;
|
|
92
|
+
}): ResultSchema;
|
|
93
|
+
/** Room turns only. Exactly one of post or pass. */
|
|
94
|
+
speech(): ResultSchema;
|
|
95
|
+
roomCall(o: {
|
|
96
|
+
members: NonEmptyIds;
|
|
97
|
+
}): ResultSchema;
|
|
98
|
+
createBot(o: {
|
|
99
|
+
localIds: NonEmptyIds;
|
|
100
|
+
models: NonEmptyIds;
|
|
101
|
+
}): ResultSchema;
|
|
102
|
+
updateBot(o: {
|
|
103
|
+
botIds: NonEmptyIds;
|
|
104
|
+
models: NonEmptyIds;
|
|
105
|
+
}): ResultSchema;
|
|
106
|
+
deleteBot(o: {
|
|
107
|
+
botIds: NonEmptyIds;
|
|
108
|
+
}): ResultSchema;
|
|
109
|
+
/** `members`: team Bot ids plus the create_bot localId slots of this outcome. */
|
|
110
|
+
createRoom(o: {
|
|
111
|
+
localIds: NonEmptyIds;
|
|
112
|
+
members: NonEmptyIds;
|
|
113
|
+
}): ResultSchema;
|
|
114
|
+
updateRoom(o: {
|
|
115
|
+
roomIds: NonEmptyIds;
|
|
116
|
+
members: NonEmptyIds;
|
|
117
|
+
}): ResultSchema;
|
|
118
|
+
teamNote(): ResultSchema;
|
|
119
|
+
};
|
|
120
|
+
export type BotTurnOutcomeKind = 'delegate' | 'cancel_delegation' | 'ask_user' | 'confirmable_action' | 'create_routine' | 'update_routine' | 'cancel_routine' | 'speech' | 'room_call' | 'create_bot' | 'update_bot' | 'delete_bot' | 'create_room' | 'update_room' | 'team_note';
|
|
121
|
+
/**
|
|
122
|
+
* Host composition: pick fragments, freeze the result in the offer. Refuses a
|
|
123
|
+
* schema outside the K7 subset ('not-subset'), a schema above
|
|
124
|
+
* RESULT_SCHEMA_MAX_BYTES ('schema-over-budget'), or one whose largest
|
|
125
|
+
* instance could exceed RESULT_OUTCOME_MAX_BYTES ('over-budget').
|
|
126
|
+
*
|
|
127
|
+
* Schema budget rule, before the offer is frozen: only 'schema-over-budget'
|
|
128
|
+
* allows the Host to rebuild the routine fragments with scheduleShape 'flat'.
|
|
129
|
+
* If the schema is still over, the Host blocks the turn with a visible reason
|
|
130
|
+
* or runs its defined batch selection. It never drops authorized ids from an
|
|
131
|
+
* enum silently.
|
|
132
|
+
*/
|
|
133
|
+
export declare function composeBotTurnOutcomeSchema(fragments: BotTurnOutcomeFragments, required?: readonly BotTurnOutcomeKind[]): ResultSchema;
|
|
134
|
+
export type BotTurnOutcomeFragments = Partial<Readonly<Record<BotTurnOutcomeKind, ResultSchema>>>;
|
|
135
|
+
export interface DelegateAction {
|
|
136
|
+
readonly to: string;
|
|
137
|
+
readonly request: string;
|
|
138
|
+
}
|
|
139
|
+
export interface CancelDelegationAction {
|
|
140
|
+
readonly delegationId: string;
|
|
141
|
+
}
|
|
142
|
+
export type AskUserAction = {
|
|
143
|
+
readonly question: string;
|
|
144
|
+
readonly answerKind: 'text';
|
|
145
|
+
} | {
|
|
146
|
+
readonly question: string;
|
|
147
|
+
readonly answerKind: 'single_choice';
|
|
148
|
+
readonly options: readonly {
|
|
149
|
+
readonly id: string;
|
|
150
|
+
readonly label: string;
|
|
151
|
+
}[];
|
|
152
|
+
};
|
|
153
|
+
export interface ConfirmableAction<Draft = unknown> {
|
|
154
|
+
readonly action: string;
|
|
155
|
+
readonly summary: string;
|
|
156
|
+
readonly draft: Draft;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* No day field: every day. daysOfWeek and dayOfMonth never appear together;
|
|
160
|
+
* month needs dayOfMonth. Under the 'flat' shape the schema does not enforce
|
|
161
|
+
* this; the Host narrows to this type only after checkRoutineSchedule passes.
|
|
162
|
+
*/
|
|
163
|
+
export type RoutineScheduleFields = {
|
|
164
|
+
readonly minute: number;
|
|
165
|
+
readonly hour: number;
|
|
166
|
+
readonly tz: string;
|
|
167
|
+
} | {
|
|
168
|
+
readonly minute: number;
|
|
169
|
+
readonly hour: number;
|
|
170
|
+
readonly daysOfWeek: readonly RoutineDayOfWeek[];
|
|
171
|
+
readonly tz: string;
|
|
172
|
+
} | {
|
|
173
|
+
readonly minute: number;
|
|
174
|
+
readonly hour: number;
|
|
175
|
+
readonly dayOfMonth: number;
|
|
176
|
+
readonly month?: number;
|
|
177
|
+
readonly tz: string;
|
|
178
|
+
};
|
|
179
|
+
export interface CreateRoutineAction {
|
|
180
|
+
readonly localId: string;
|
|
181
|
+
readonly schedule: RoutineScheduleFields;
|
|
182
|
+
readonly prompt: string;
|
|
183
|
+
readonly target?: string;
|
|
184
|
+
}
|
|
185
|
+
export interface UpdateRoutineAction {
|
|
186
|
+
readonly routineId: string;
|
|
187
|
+
readonly schedule?: RoutineScheduleFields;
|
|
188
|
+
readonly prompt?: string;
|
|
189
|
+
}
|
|
190
|
+
export interface CancelRoutineAction {
|
|
191
|
+
readonly routineId: string;
|
|
192
|
+
}
|
|
193
|
+
export type RoomSpeech = {
|
|
194
|
+
readonly kind: 'post';
|
|
195
|
+
readonly text: string;
|
|
196
|
+
} | {
|
|
197
|
+
readonly kind: 'pass';
|
|
198
|
+
};
|
|
199
|
+
export interface RoomCallAction {
|
|
200
|
+
readonly members: readonly string[];
|
|
201
|
+
}
|
|
202
|
+
export interface CreateBotAction {
|
|
203
|
+
readonly localId: string;
|
|
204
|
+
readonly name: string;
|
|
205
|
+
readonly role: string;
|
|
206
|
+
readonly persona: string;
|
|
207
|
+
readonly model: string;
|
|
208
|
+
}
|
|
209
|
+
export interface UpdateBotAction {
|
|
210
|
+
readonly botId: string;
|
|
211
|
+
readonly name?: string;
|
|
212
|
+
readonly role?: string;
|
|
213
|
+
readonly persona?: string;
|
|
214
|
+
readonly model?: string;
|
|
215
|
+
}
|
|
216
|
+
export interface DeleteBotAction {
|
|
217
|
+
readonly botId: string;
|
|
218
|
+
}
|
|
219
|
+
export interface RoomFields {
|
|
220
|
+
readonly name: string;
|
|
221
|
+
readonly members: readonly string[];
|
|
222
|
+
readonly admin?: string;
|
|
223
|
+
readonly mode?: 'mention' | 'admin';
|
|
224
|
+
readonly announcement?: string;
|
|
225
|
+
}
|
|
226
|
+
export interface CreateRoomAction extends RoomFields {
|
|
227
|
+
readonly localId: string;
|
|
228
|
+
}
|
|
229
|
+
export interface UpdateRoomAction extends Partial<RoomFields> {
|
|
230
|
+
readonly roomId: string;
|
|
231
|
+
}
|
|
232
|
+
export interface TeamNoteAction {
|
|
233
|
+
readonly text: string;
|
|
234
|
+
}
|
|
235
|
+
/** Shape of a document that passed a schema composed from these fragments. */
|
|
236
|
+
export interface BotTurnOutcome {
|
|
237
|
+
readonly delegate?: readonly DelegateAction[];
|
|
238
|
+
readonly cancel_delegation?: readonly CancelDelegationAction[];
|
|
239
|
+
readonly ask_user?: AskUserAction;
|
|
240
|
+
readonly confirmable_action?: readonly ConfirmableAction[];
|
|
241
|
+
readonly create_routine?: readonly CreateRoutineAction[];
|
|
242
|
+
readonly update_routine?: readonly UpdateRoutineAction[];
|
|
243
|
+
readonly cancel_routine?: readonly CancelRoutineAction[];
|
|
244
|
+
readonly speech?: RoomSpeech;
|
|
245
|
+
readonly room_call?: RoomCallAction;
|
|
246
|
+
readonly create_bot?: readonly CreateBotAction[];
|
|
247
|
+
readonly update_bot?: readonly UpdateBotAction[];
|
|
248
|
+
readonly delete_bot?: readonly DeleteBotAction[];
|
|
249
|
+
readonly create_room?: readonly CreateRoomAction[];
|
|
250
|
+
readonly update_room?: readonly UpdateRoomAction[];
|
|
251
|
+
readonly team_note?: TeamNoteAction;
|
|
252
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -41,3 +41,5 @@ export type { TaskOfferType } from './messages';
|
|
|
41
41
|
export type { HarnessId, HarnessInfo } from './messages';
|
|
42
42
|
export { CUSTOM_HARNESS_CAPABILITY } from './version';
|
|
43
43
|
export { PreparedAgentMemoryModeSchema, type PreparedAgentMemoryMode } from './input-preparation';
|
|
44
|
+
export * from './bot-turn-outcome';
|
|
45
|
+
export { resultOutcomeMaxBytes } from './result-schema';
|
package/dist/index.js
CHANGED
|
@@ -421,13 +421,13 @@ var IssueSink = class {
|
|
|
421
421
|
// "[]"
|
|
422
422
|
add(pointer, keyword, message) {
|
|
423
423
|
const issue = { pointer: cut(pointer), keyword: cut(keyword), message: cut(message) };
|
|
424
|
-
const
|
|
425
|
-
if (this.issues.length >= RESULT_ISSUES_MAX_COUNT || this.bytes +
|
|
424
|
+
const size2 = encoder.encode(JSON.stringify(issue)).length + (this.issues.length === 0 ? 0 : 1);
|
|
425
|
+
if (this.issues.length >= RESULT_ISSUES_MAX_COUNT || this.bytes + size2 > RESULT_ISSUES_MAX_BYTES) {
|
|
426
426
|
this.truncated = true;
|
|
427
427
|
return;
|
|
428
428
|
}
|
|
429
429
|
this.issues.push(issue);
|
|
430
|
-
this.bytes +=
|
|
430
|
+
this.bytes += size2;
|
|
431
431
|
}
|
|
432
432
|
get empty() {
|
|
433
433
|
return this.issues.length === 0 && !this.truncated;
|
|
@@ -482,7 +482,7 @@ function documentFailure(check, what, maxBytes) {
|
|
|
482
482
|
return { ok: false, reason: check.reason, bytes: check.bytes, issues: sink.issues, truncated: false };
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
-
function checkSubschema(node, pointer, depth, sink) {
|
|
485
|
+
function checkSubschema(node, pointer, depth, sink, requireObjectRoot = true) {
|
|
486
486
|
if (!isObject(node)) {
|
|
487
487
|
sink.add(pointer, "schema", "a subschema must be a JSON object");
|
|
488
488
|
return;
|
|
@@ -494,7 +494,7 @@ function checkSubschema(node, pointer, depth, sink) {
|
|
|
494
494
|
for (const key of Object.keys(node)) {
|
|
495
495
|
if (!KEYWORDS.has(key)) sink.add(pointerTo(pointer, key), key, "keyword is outside the result schema subset");
|
|
496
496
|
}
|
|
497
|
-
if (depth === 0 && node.type !== "object") {
|
|
497
|
+
if (requireObjectRoot && depth === 0 && node.type !== "object") {
|
|
498
498
|
sink.add(pointerTo(pointer, "type"), "type", "the root schema must declare type: 'object'");
|
|
499
499
|
}
|
|
500
500
|
if (Object.hasOwn(node, "type")) {
|
|
@@ -578,6 +578,89 @@ function validateResultOutcome(schema, outcome) {
|
|
|
578
578
|
for (const unit of result.errors) sink.add(fragmentToPointer(unit.instanceLocation), unit.keyword, unit.error);
|
|
579
579
|
return { ok: false, reason: "schema-mismatch", bytes: document.bytes, issues: sink.issues, truncated: sink.truncated };
|
|
580
580
|
}
|
|
581
|
+
var MAX_BYTES_PER_CODE_POINT = 6;
|
|
582
|
+
var MAX_NUMBER_BYTES = 25;
|
|
583
|
+
var MAX_INTEGER_BYTES = 24;
|
|
584
|
+
var DECIMAL_LIMIT = 1e21;
|
|
585
|
+
var enc = new TextEncoder();
|
|
586
|
+
var size = (v) => enc.encode(JSON.stringify(v)).length;
|
|
587
|
+
function typeBound(node, type) {
|
|
588
|
+
switch (type) {
|
|
589
|
+
case "null":
|
|
590
|
+
return 4;
|
|
591
|
+
case "boolean":
|
|
592
|
+
return 5;
|
|
593
|
+
case "integer": {
|
|
594
|
+
const lo = typeof node.minimum === "number" ? Math.ceil(node.minimum) : void 0;
|
|
595
|
+
const hi = typeof node.maximum === "number" ? Math.floor(node.maximum) : void 0;
|
|
596
|
+
if (lo === void 0 || hi === void 0 || !(Math.abs(lo) < DECIMAL_LIMIT) || !(Math.abs(hi) < DECIMAL_LIMIT)) return MAX_INTEGER_BYTES;
|
|
597
|
+
return Math.min(MAX_INTEGER_BYTES, Math.max(String(lo).length, String(hi).length));
|
|
598
|
+
}
|
|
599
|
+
case "number":
|
|
600
|
+
return MAX_NUMBER_BYTES;
|
|
601
|
+
case "string":
|
|
602
|
+
return typeof node.maxLength === "number" ? 2 + MAX_BYTES_PER_CODE_POINT * node.maxLength : null;
|
|
603
|
+
case "array": {
|
|
604
|
+
if (node.maxItems === 0) return 2;
|
|
605
|
+
if (typeof node.maxItems !== "number" || node.items === void 0) return null;
|
|
606
|
+
const item = outcomeBound(node.items);
|
|
607
|
+
return item === null ? null : 2 + node.maxItems * item + Math.max(0, node.maxItems - 1);
|
|
608
|
+
}
|
|
609
|
+
case "object": {
|
|
610
|
+
if (node.additionalProperties !== false) return null;
|
|
611
|
+
const entries = Object.entries(node.properties ?? {});
|
|
612
|
+
let total = 2 + Math.max(0, entries.length - 1);
|
|
613
|
+
for (const [name, sub] of entries) {
|
|
614
|
+
const b = outcomeBound(sub);
|
|
615
|
+
if (b === null) return null;
|
|
616
|
+
total += size(name) + 1 + b;
|
|
617
|
+
}
|
|
618
|
+
return total;
|
|
619
|
+
}
|
|
620
|
+
default:
|
|
621
|
+
return null;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
function outcomeBound(schema) {
|
|
625
|
+
const node = schema;
|
|
626
|
+
const bounds = [];
|
|
627
|
+
if (Object.hasOwn(node, "const")) bounds.push(size(node.const));
|
|
628
|
+
if (Array.isArray(node.enum)) bounds.push(Math.max(...node.enum.map(size)));
|
|
629
|
+
if (Array.isArray(node.oneOf)) {
|
|
630
|
+
const branches = node.oneOf.map(outcomeBound);
|
|
631
|
+
if (branches.every((b) => b !== null)) bounds.push(Math.max(...branches));
|
|
632
|
+
}
|
|
633
|
+
if (node.type !== void 0) {
|
|
634
|
+
const types = Array.isArray(node.type) ? node.type : [node.type];
|
|
635
|
+
const each = types.map((t) => typeBound(node, t));
|
|
636
|
+
if (each.every((b) => b !== null)) bounds.push(Math.max(...each));
|
|
637
|
+
}
|
|
638
|
+
return bounds.length === 0 ? null : Math.min(...bounds);
|
|
639
|
+
}
|
|
640
|
+
function resultOutcomeMaxBytes(schema) {
|
|
641
|
+
const pending = [schema];
|
|
642
|
+
const seen = /* @__PURE__ */ new Set();
|
|
643
|
+
while (pending.length > 0) {
|
|
644
|
+
const value = pending.pop();
|
|
645
|
+
if (typeof value === "function") return null;
|
|
646
|
+
if (value === null || typeof value !== "object" || seen.has(value)) continue;
|
|
647
|
+
seen.add(value);
|
|
648
|
+
const prototype = Object.getPrototypeOf(value);
|
|
649
|
+
if (prototype !== null && prototype !== Object.prototype && prototype !== Array.prototype) return null;
|
|
650
|
+
for (const [name, descriptor] of Object.entries(Object.getOwnPropertyDescriptors(value))) {
|
|
651
|
+
if (name === "toJSON" && (!Object.hasOwn(descriptor, "value") || typeof descriptor.value === "function")) return null;
|
|
652
|
+
if (!descriptor.enumerable) continue;
|
|
653
|
+
if (!Object.hasOwn(descriptor, "value")) return null;
|
|
654
|
+
pending.push(descriptor.value);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
const document = canonicalDocument(schema, RESULT_SCHEMA_MAX_BYTES);
|
|
658
|
+
if (!document.ok) return null;
|
|
659
|
+
const sink = new IssueSink();
|
|
660
|
+
checkSubschema(document.canonical, "", 0, sink, false);
|
|
661
|
+
if (!sink.empty) return null;
|
|
662
|
+
return outcomeBound(document.canonical);
|
|
663
|
+
}
|
|
581
664
|
|
|
582
665
|
// src/terminal-projection.ts
|
|
583
666
|
var TerminalProjectionContractSchema = z.string().min(1).max(128).regex(/^[a-z0-9]+(?:[._-][a-z0-9]+)*$/u, "terminal projection contracts must be opaque lowercase ids");
|
|
@@ -1990,10 +2073,10 @@ function parseMessage(data) {
|
|
|
1990
2073
|
);
|
|
1991
2074
|
}
|
|
1992
2075
|
function decodeEnvelope(line) {
|
|
1993
|
-
const
|
|
2076
|
+
const text2 = decodeText(line).replace(/[\r\n]+$/, "");
|
|
1994
2077
|
let json;
|
|
1995
2078
|
try {
|
|
1996
|
-
json = JSON.parse(
|
|
2079
|
+
json = JSON.parse(text2);
|
|
1997
2080
|
} catch (cause) {
|
|
1998
2081
|
throw new EnvelopeParseError("Envelope line is not valid JSON", cause);
|
|
1999
2082
|
}
|
|
@@ -2268,6 +2351,195 @@ function byokBlobContentPath(blobId) {
|
|
|
2268
2351
|
return `/byok/blobs/${blobId}/content`;
|
|
2269
2352
|
}
|
|
2270
2353
|
|
|
2271
|
-
|
|
2354
|
+
// src/bot-turn-outcome.ts
|
|
2355
|
+
var BOT_TURN_OUTCOME_CONTRACT = "bot-turn-outcome.v1";
|
|
2356
|
+
var BOT_TURN_OUTCOME_LIMITS = Object.freeze({
|
|
2357
|
+
delegateMaxItems: 2,
|
|
2358
|
+
delegateRequestMaxLength: 1e3,
|
|
2359
|
+
cancelDelegationMaxItems: 2,
|
|
2360
|
+
askUserQuestionMaxLength: 400,
|
|
2361
|
+
askUserOptionsMaxItems: 6,
|
|
2362
|
+
askUserOptionIdMaxLength: 24,
|
|
2363
|
+
askUserOptionLabelMaxLength: 80,
|
|
2364
|
+
confirmableActionMaxItems: 1,
|
|
2365
|
+
confirmableSummaryMaxLength: 300,
|
|
2366
|
+
confirmableDraftMaxBytes: 16384,
|
|
2367
|
+
createRoutineMaxItems: 1,
|
|
2368
|
+
updateRoutineMaxItems: 1,
|
|
2369
|
+
cancelRoutineMaxItems: 2,
|
|
2370
|
+
routinePromptMaxLength: 500,
|
|
2371
|
+
postTextMaxLength: 2730,
|
|
2372
|
+
roomCallMembersMaxItems: 4,
|
|
2373
|
+
createBotMaxItems: 3,
|
|
2374
|
+
updateBotMaxItems: 1,
|
|
2375
|
+
deleteBotMaxItems: 1,
|
|
2376
|
+
botNameMaxLength: 40,
|
|
2377
|
+
botRoleMaxLength: 80,
|
|
2378
|
+
botPersonaMaxLength: 300,
|
|
2379
|
+
createRoomMaxItems: 1,
|
|
2380
|
+
updateRoomMaxItems: 1,
|
|
2381
|
+
roomNameMaxLength: 40,
|
|
2382
|
+
roomMembersMaxItems: 12,
|
|
2383
|
+
roomAnnouncementMaxLength: 300,
|
|
2384
|
+
teamNoteMaxLength: 300
|
|
2385
|
+
});
|
|
2386
|
+
var L = BOT_TURN_OUTCOME_LIMITS;
|
|
2387
|
+
var text = (maxLength) => ({ type: "string", minLength: 1, maxLength });
|
|
2388
|
+
var oneOfIds = (ids) => ({ enum: [...ids] });
|
|
2389
|
+
var closed = (properties, required) => ({ type: "object", additionalProperties: false, required, properties });
|
|
2390
|
+
var list = (items, maxItems) => ({ type: "array", minItems: 1, maxItems, items });
|
|
2391
|
+
var ROUTINE_DAYS_OF_WEEK = Object.freeze(["mon", "tue", "wed", "thu", "fri", "sat", "sun"]);
|
|
2392
|
+
var integer = (minimum, maximum) => ({ type: "integer", minimum, maximum });
|
|
2393
|
+
var BotTurnOutcomeSchemaError = class extends Error {
|
|
2394
|
+
constructor(code, message) {
|
|
2395
|
+
super(message);
|
|
2396
|
+
this.code = code;
|
|
2397
|
+
this.name = "BotTurnOutcomeSchemaError";
|
|
2398
|
+
}
|
|
2399
|
+
code;
|
|
2400
|
+
};
|
|
2401
|
+
function schedule(timeZones, shape) {
|
|
2402
|
+
const fields = {
|
|
2403
|
+
minute: integer(0, 59),
|
|
2404
|
+
hour: integer(0, 23),
|
|
2405
|
+
daysOfWeek: { type: "array", minItems: 1, maxItems: 7, items: { enum: [...ROUTINE_DAYS_OF_WEEK] } },
|
|
2406
|
+
dayOfMonth: integer(1, 31),
|
|
2407
|
+
month: integer(1, 12),
|
|
2408
|
+
tz: oneOfIds(timeZones)
|
|
2409
|
+
};
|
|
2410
|
+
const outer = {
|
|
2411
|
+
description: "Local time in tz. No day field: every day. daysOfWeek: those days only. dayOfMonth: that day of each month, or of month only.",
|
|
2412
|
+
...closed(fields, ["minute", "hour", "tz"])
|
|
2413
|
+
};
|
|
2414
|
+
if (shape === "flat") return outer;
|
|
2415
|
+
const only = (names, required) => ({ additionalProperties: false, ...required.length ? { required } : {}, properties: Object.fromEntries(names.map((n) => [n, {}])) });
|
|
2416
|
+
return { ...outer, oneOf: [
|
|
2417
|
+
only(["minute", "hour", "tz"], []),
|
|
2418
|
+
only(["minute", "hour", "daysOfWeek", "tz"], ["daysOfWeek"]),
|
|
2419
|
+
only(["minute", "hour", "dayOfMonth", "month", "tz"], ["dayOfMonth"])
|
|
2420
|
+
] };
|
|
2421
|
+
}
|
|
2422
|
+
function roomFields(members) {
|
|
2423
|
+
return {
|
|
2424
|
+
name: text(L.roomNameMaxLength),
|
|
2425
|
+
members: { type: "array", minItems: 1, maxItems: L.roomMembersMaxItems, items: oneOfIds(members) },
|
|
2426
|
+
admin: oneOfIds(members),
|
|
2427
|
+
mode: { enum: ["mention", "admin"] },
|
|
2428
|
+
announcement: text(L.roomAnnouncementMaxLength)
|
|
2429
|
+
};
|
|
2430
|
+
}
|
|
2431
|
+
var botTurnOutcomeFragments = {
|
|
2432
|
+
/** `to` lists this Bot first: delegating to yourself is a continuation. */
|
|
2433
|
+
delegate(o) {
|
|
2434
|
+
return list(closed({ to: oneOfIds(o.to), request: text(L.delegateRequestMaxLength) }, ["to", "request"]), L.delegateMaxItems);
|
|
2435
|
+
},
|
|
2436
|
+
/** Owner-authorized Main Bot turns only. The Host lists open delegations. */
|
|
2437
|
+
cancelDelegation(o) {
|
|
2438
|
+
return list(closed({ delegationId: oneOfIds(o.delegationIds) }, ["delegationId"]), L.cancelDelegationMaxItems);
|
|
2439
|
+
},
|
|
2440
|
+
askUser() {
|
|
2441
|
+
const question = text(L.askUserQuestionMaxLength);
|
|
2442
|
+
const option = closed({ id: text(L.askUserOptionIdMaxLength), label: text(L.askUserOptionLabelMaxLength) }, ["id", "label"]);
|
|
2443
|
+
return { oneOf: [
|
|
2444
|
+
closed({ question, answerKind: { const: "text" } }, ["question", "answerKind"]),
|
|
2445
|
+
closed({
|
|
2446
|
+
question,
|
|
2447
|
+
answerKind: { const: "single_choice" },
|
|
2448
|
+
options: { type: "array", minItems: 2, maxItems: L.askUserOptionsMaxItems, items: option }
|
|
2449
|
+
}, ["question", "answerKind", "options"])
|
|
2450
|
+
] };
|
|
2451
|
+
},
|
|
2452
|
+
/** One branch per Host action; each draft needs a finite bound of at most confirmableDraftMaxBytes. */
|
|
2453
|
+
confirmableAction(o) {
|
|
2454
|
+
for (const { action, draft } of o.actions) {
|
|
2455
|
+
const bound = resultOutcomeMaxBytes(draft);
|
|
2456
|
+
if (bound === null || bound > L.confirmableDraftMaxBytes) {
|
|
2457
|
+
throw new BotTurnOutcomeSchemaError("draft-over-budget", `draft for ${action} is ${bound ?? "unbounded"}; cap ${L.confirmableDraftMaxBytes}`);
|
|
2458
|
+
}
|
|
2459
|
+
}
|
|
2460
|
+
const branches = o.actions.map(({ action, draft }) => closed({ action: { const: action }, summary: text(L.confirmableSummaryMaxLength), draft }, ["action", "summary", "draft"]));
|
|
2461
|
+
return list(branches.length === 1 ? branches[0] : { oneOf: branches }, L.confirmableActionMaxItems);
|
|
2462
|
+
},
|
|
2463
|
+
/** `targets` only for a Main Bot: the Bot itself first, then team Bots. Omitted means the Bot itself. */
|
|
2464
|
+
createRoutine(o) {
|
|
2465
|
+
return list(closed({
|
|
2466
|
+
localId: oneOfIds(o.localIds),
|
|
2467
|
+
schedule: schedule(o.timeZones, o.scheduleShape ?? "checked"),
|
|
2468
|
+
prompt: text(L.routinePromptMaxLength),
|
|
2469
|
+
...o.targets ? { target: oneOfIds(o.targets) } : {}
|
|
2470
|
+
}, ["localId", "schedule", "prompt"]), L.createRoutineMaxItems);
|
|
2471
|
+
},
|
|
2472
|
+
updateRoutine(o) {
|
|
2473
|
+
return list(closed(
|
|
2474
|
+
{ routineId: oneOfIds(o.routineIds), schedule: schedule(o.timeZones, o.scheduleShape ?? "checked"), prompt: text(L.routinePromptMaxLength) },
|
|
2475
|
+
["routineId"]
|
|
2476
|
+
), L.updateRoutineMaxItems);
|
|
2477
|
+
},
|
|
2478
|
+
cancelRoutine(o) {
|
|
2479
|
+
return list(closed({ routineId: oneOfIds(o.routineIds) }, ["routineId"]), L.cancelRoutineMaxItems);
|
|
2480
|
+
},
|
|
2481
|
+
/** Room turns only. Exactly one of post or pass. */
|
|
2482
|
+
speech() {
|
|
2483
|
+
return { oneOf: [
|
|
2484
|
+
closed({ kind: { const: "post" }, text: text(L.postTextMaxLength) }, ["kind", "text"]),
|
|
2485
|
+
closed({ kind: { const: "pass" } }, ["kind"])
|
|
2486
|
+
] };
|
|
2487
|
+
},
|
|
2488
|
+
roomCall(o) {
|
|
2489
|
+
return closed({ members: { type: "array", minItems: 1, maxItems: L.roomCallMembersMaxItems, items: oneOfIds(o.members) } }, ["members"]);
|
|
2490
|
+
},
|
|
2491
|
+
createBot(o) {
|
|
2492
|
+
return list(closed({
|
|
2493
|
+
localId: oneOfIds(o.localIds),
|
|
2494
|
+
name: text(L.botNameMaxLength),
|
|
2495
|
+
role: text(L.botRoleMaxLength),
|
|
2496
|
+
persona: text(L.botPersonaMaxLength),
|
|
2497
|
+
model: oneOfIds(o.models)
|
|
2498
|
+
}, ["localId", "name", "role", "persona", "model"]), L.createBotMaxItems);
|
|
2499
|
+
},
|
|
2500
|
+
updateBot(o) {
|
|
2501
|
+
return list(closed({
|
|
2502
|
+
botId: oneOfIds(o.botIds),
|
|
2503
|
+
name: text(L.botNameMaxLength),
|
|
2504
|
+
role: text(L.botRoleMaxLength),
|
|
2505
|
+
persona: text(L.botPersonaMaxLength),
|
|
2506
|
+
model: oneOfIds(o.models)
|
|
2507
|
+
}, ["botId"]), L.updateBotMaxItems);
|
|
2508
|
+
},
|
|
2509
|
+
deleteBot(o) {
|
|
2510
|
+
return list(closed({ botId: oneOfIds(o.botIds) }, ["botId"]), L.deleteBotMaxItems);
|
|
2511
|
+
},
|
|
2512
|
+
/** `members`: team Bot ids plus the create_bot localId slots of this outcome. */
|
|
2513
|
+
createRoom(o) {
|
|
2514
|
+
return list(closed({ localId: oneOfIds(o.localIds), ...roomFields(o.members) }, ["localId", "name", "members"]), L.createRoomMaxItems);
|
|
2515
|
+
},
|
|
2516
|
+
updateRoom(o) {
|
|
2517
|
+
return list(closed({ roomId: oneOfIds(o.roomIds), ...roomFields(o.members) }, ["roomId"]), L.updateRoomMaxItems);
|
|
2518
|
+
},
|
|
2519
|
+
teamNote() {
|
|
2520
|
+
return closed({ text: text(L.teamNoteMaxLength) }, ["text"]);
|
|
2521
|
+
}
|
|
2522
|
+
};
|
|
2523
|
+
function composeBotTurnOutcomeSchema(fragments, required = []) {
|
|
2524
|
+
const schema = {
|
|
2525
|
+
type: "object",
|
|
2526
|
+
additionalProperties: false,
|
|
2527
|
+
description: `${BOT_TURN_OUTCOME_CONTRACT}: actions for the Host. Omit a field for no action of that kind; {} means no actions.`,
|
|
2528
|
+
...required.length ? { required: [...required] } : {},
|
|
2529
|
+
properties: fragments
|
|
2530
|
+
};
|
|
2531
|
+
const admitted = checkResultSchema(schema);
|
|
2532
|
+
if (!admitted.ok && admitted.reason === "over-cap") {
|
|
2533
|
+
throw new BotTurnOutcomeSchemaError("schema-over-budget", `schema is ${admitted.bytes} bytes; cap ${RESULT_SCHEMA_MAX_BYTES}`);
|
|
2534
|
+
}
|
|
2535
|
+
if (!admitted.ok) throw new BotTurnOutcomeSchemaError("not-subset", JSON.stringify(admitted.issues));
|
|
2536
|
+
const bound = resultOutcomeMaxBytes(admitted.canonical);
|
|
2537
|
+
if (bound === null || bound > RESULT_OUTCOME_MAX_BYTES) {
|
|
2538
|
+
throw new BotTurnOutcomeSchemaError("over-budget", `largest outcome is ${bound ?? "unbounded"} bytes; cap ${RESULT_OUTCOME_MAX_BYTES}`);
|
|
2539
|
+
}
|
|
2540
|
+
return admitted.canonical;
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
export { AGENT_CONTENT_ARTIFACT_READ_CAPABILITY, AGENT_CONTENT_TRANSCRIPT_READ_CAPABILITY, AGENT_CONTENT_WORKSPACE_READ_CAPABILITY, AGENT_EGRESS_FRESH_SESSION_CAPABILITY, AGENT_EGRESS_POLICY_CAPABILITY, AGENT_EGRESS_RELIABLE_ACK_CAPABILITY, AGENT_EVENT_SPILL_UNSTORED_REASON_MAX_LENGTH, AGENT_HOME_MEMORY_DIGEST_MAX_BYTES, AGENT_HOME_MEMORY_DIGEST_MAX_FILES, AGENT_HOME_MEMORY_PATH_MAX_LENGTH, AGENT_HOME_PROJECTION_CAPABILITY, AGENT_HOME_PROJECTION_MAX_BYTES, AGENT_HOME_PROJECTION_PROFILE_REVISION_MAXIMUM, AGENT_HOME_READERS_CAPABILITY, AGENT_INPUT_PREPARATION_CAPABILITY, AGENT_MEMORY_INTENT_APPROVAL_REF_MAX_BYTES, AGENT_MEMORY_INTENT_CAPABILITY, AGENT_MEMORY_INTENT_CONTENT_MAX_BYTES, AGENT_MEMORY_INTENT_FETCH_DISPOSITIONS, AGENT_MEMORY_INTENT_FETCH_DISPOSITIONS_BY_RESERVATION, AGENT_MEMORY_INTENT_HOST_TERMINAL_CODES, AGENT_MEMORY_INTENT_OPERATIONS, AGENT_MEMORY_INTENT_PATH_MAX_BYTES, AGENT_MEMORY_INTENT_READBACK_DISPOSITIONS, AGENT_MEMORY_INTENT_REJECTION_CODES, AGENT_MEMORY_INTENT_RESERVATIONS, AGENT_MEMORY_PROJECTION_CAPABILITY, AGENT_MEMORY_PROJECTION_MAX_ORDERING_VALUE, AGENT_MEMORY_PROJECTION_MAX_REDACTED_BYTES, AGENT_MESSAGE_DRAFT_FRAME_MAX_BYTES, AGENT_MESSAGE_EGRESS_CAPABILITY, AGENT_MESSAGE_MAX_BYTES, AGENT_REF_MAX_BYTES, ActivityIngressSchema, AgentContentActorKindSchema, AgentContentActorSchema, AgentContentDecodeAsSchema, AgentContentMimeTypeSchema, AgentContentReadDecisionSchema, AgentContentReadDenialReasonSchema, AgentContentReadPayloadSchema, AgentContentReadSurfaceSchema, AgentContentReceiptPayloadSchema, AgentEgressAckPayloadSchema, AgentEgressActivityPolicySchema, AgentEgressContentHashSchema, AgentEgressDropReasonSchema, AgentEgressLaneSchema, AgentEgressPolicyRevisionSchema, AgentEgressPolicySchema, AgentEgressReliablePayloadSchema, AgentEventOrUnknownSchema, AgentEventSchema, AgentEventSpillSchema, AgentHomeAccessSchema, AgentHomeProjectionAgentRefSchema, AgentHomeProjectionCompletionRequestSchema, AgentHomeProjectionHashSchema, AgentHomeProjectionOutcomeSchema, AgentHomeProjectionPayloadSchema, AgentHomeProjectionProfileRevisionSchema, AgentHomeProjectionReadbackSchema, AgentHomeProjectionStatusSchema, AgentHomeProjectionValueSchema, AgentInputPreparationPayloadSchema, AgentMemoryIntentApprovalRefSchema, AgentMemoryIntentAvailablePayloadSchema, AgentMemoryIntentCompletionSchema, AgentMemoryIntentContentSchema, AgentMemoryIntentFetchRequestSchema, AgentMemoryIntentFetchResponseSchema, AgentMemoryIntentFileObservationSchema, AgentMemoryIntentHostTerminalCodeSchema, AgentMemoryIntentOperationDigestSchema, AgentMemoryIntentOperationSchema, AgentMemoryIntentPathSchema, AgentMemoryIntentReadbackDispositionSchema, AgentMemoryIntentReadbackSchema, AgentMemoryIntentRejectionCodeSchema, AgentMemoryIntentReservationSchema, AgentMemoryIntentRevisionSchema, AgentMemoryIntentV1Schema, AgentMemoryProjectionCommitRequestSchema, AgentMemoryProjectionCommitResponseSchema, AgentMemoryProjectionEraseResultSchema, AgentMemoryProjectionGrantRefSchema, AgentMemoryProjectionMeteringReceiptSchema, AgentMemoryProjectionMutationSchema, AgentMemoryProjectionReceiptSchema, AgentMemoryProjectionSessionRefSchema, AgentMemoryProjectionSnapshotSchema, AgentMemoryProjectionSourceSeqSchema, AgentMemoryProjectionWriterEpochSchema, AgentMessageContentTypeSchema, AgentMessageContractSchema, AgentMessageDestinationBindingSchema, AgentMessageDispositionPayloadSchema, AgentMessageDraftPayloadSchema, AgentMessageEgressRequirementSchema, AgentMessageFreshnessCursorSchema, AgentMessagePublishPayloadSchema, AgentMessageServerContextSchema, AgentRefSchema, AgentReliableQuotaPolicySchema, BOT_TURN_OUTCOME_CONTRACT, BOT_TURN_OUTCOME_LIMITS, BYOK_ACTIVITY_PATH, BYOK_AGENT_HOME_PROJECTIONS_PATH, BYOK_AGENT_HOME_PROJECTION_COMPLETION_ROUTE, BYOK_AGENT_MEMORY_PROJECTIONS_PATH, BYOK_BLOBS_PATH, BYOK_BLOB_CONTENT_ROUTE, BYOK_BLOB_FINALIZE_ROUTE, BYOK_BLOB_URL_ROUTE, BYOK_BOARD_CLAIM_ROUTE, BYOK_BOARD_PATH, BYOK_BOARD_STATUS_ROUTE, BYOK_BOARD_STREAM_PATH, BYOK_BOARD_UNCLAIM_ROUTE, BYOK_CAPABILITIES_PATH, BYOK_CHALLENGE_PATH, BYOK_EVENTS_PATH, BYOK_INPUT_PREPARATIONS_PATH, BYOK_INPUT_PREPARATION_COMPLETION_ROUTE, BYOK_INPUT_PREPARATION_STATUS_ROUTE, BYOK_MESSAGES_PATH, BYOK_PAIR_PATH, BYOK_PRESENCE_PATH, BYOK_RECORDS_PATH, BYOK_RECORD_ROUTE, BYOK_SKILL_PACKS_PATH, BYOK_SKILL_PACK_FILE_ROUTE, BYOK_TOKEN_PATH, BlobDownloadUrlResponseSchema, BlobRefSchema, BotTurnOutcomeSchemaError, CAPABILITY_FLAGS, CONFIGURED_TOOLSETS_MAX_ITEMS, CONTENT_HASH_RE, CUSTOM_HARNESS_CAPABILITY, ChallengeRequestSchema, ChallengeResponseSchema, ConfiguredToolsetsSchema, ConnAckPayloadSchema, ConnHelloPayloadSchema, ContentReadPolicySchema, CreateBlobRequestSchema, CreateBlobResponseSchema, DAEMON_TO_SERVER_TYPES, DispatchSelectionSchema, EnvelopeParseError, EnvelopeSchema, EnvelopeValidationError, EventsPollQuerySchema, EventsPollResponseSchema, HOST_MCP_TASK_CONTEXT_CAPABILITY, HarnessIdSchema, HarnessInfoSchema, HarnessInventorySchema, INPUT_PREPARATION_WIRE_VERSION, InputPreparationAccountingPolicyRefSchema, InputPreparationArtifactSummarySchema, InputPreparationBindingSchema, InputPreparationCompletionRequestSchema, InputPreparationContentHashSchema, InputPreparationContextDocumentSchema, InputPreparationCounterEvidenceSchema, InputPreparationCounterProviderEvidenceSchema, InputPreparationCounterTargetSchema, InputPreparationHostCanonicalAssistantMessageSchema, InputPreparationMessageSchema, InputPreparationModelCostSchema, InputPreparationModelSchema, InputPreparationOfferBindingSchema, InputPreparationOptionsSchema, InputPreparationPolicyRevisionSchema, InputPreparationProfileIdSchema, InputPreparationProjectionSchema, InputPreparationPromptSnapshotSchema, InputPreparationReadbackSchema, InputPreparationReadinessReasonSchema, InputPreparationReceiptSummarySchema, InputPreparationReferenceSchema, InputPreparationRejectionReasonSchema, InputPreparationResidualKeySchema, InputPreparationResidualValueClassSchema, InputPreparationRuntimeIdentitySchema, InputPreparationSelectionSchema, InputPreparationSourceSchema, InputPreparationStateSchema, InputPreparationStatusQuerySchema, InputPreparationStatusSchema, InputPreparationUserMessageSchema, KNOWN_AGENT_EVENT_TYPES, MAILBOX_READ_AHEAD_CAPABILITY, MAILBOX_READ_AHEAD_MAX_SEQS, MAX_MESSAGES_PER_BATCH, MESSAGE_PAYLOAD_SCHEMAS, MESSAGE_TYPES, MessageSendOutcomeSchema, MessagesSendRequestSchema, MessagesSendResponseSchema, OUTBOUND_REFUSAL_REASONS, PAIR_RESPONSE_TENANT_ID_MAX_LENGTH, PREPARED_AGENT_MEMORY_MODES, PROTOCOL_VERSION, PROVIDER_MODEL_CAPABILITIES, PROVIDER_PROFILE_BINDING_CAPABILITY, PROVIDER_PROVISIONING_CAPABILITY, PROVIDER_PROVISIONING_DISPOSITIONS, PROVIDER_PROVISIONING_HOST_TERMINAL_CODES, PROVIDER_PROVISIONING_KEY_CHECK_RESULTS, PROVIDER_PROVISIONING_OPERATIONS, PROVIDER_PROVISIONING_OPERATION_GENERATION_MAXIMUM, PROVIDER_PROVISIONING_REJECTION_CODES, PROVIDER_SECRET_SEALING_KEY_REGISTER_OPERATION, PairRequestSchema, PairResponseSchema, PairResponseTenantIdSchema, PreparedAgentMemoryModeSchema, PresencePublishRequestSchema, ProtocolError, ProtocolVersionNumberSchema, ProviderModelCapabilitySchema, ProviderProfileBindingSchema, ProviderProfileHashSchema, ProviderProfileRefSchema, ProviderProfileRevisionSchema, ProviderProvisioningAvailablePayloadSchema, ProviderProvisioningCompletionSchema, ProviderProvisioningDispositionSchema, ProviderProvisioningKeyCheckResultSchema, ProviderProvisioningKeyCheckSchema, ProviderProvisioningOperationDigestSchema, ProviderProvisioningOperationGenerationSchema, ProviderProvisioningOperationSchema, ProviderProvisioningProviderStatusSchema, ProviderProvisioningReadbackSchema, ProviderProvisioningRejectionCodeSchema, RESULT_DOCUMENT_MAX_BYTES, RESULT_ISSUES_MAX_BYTES, RESULT_ISSUES_MAX_COUNT, RESULT_JSON_MAX_DEPTH, RESULT_OUTCOME_MAX_BYTES, RESULT_SCHEMA_INSTANCE_TYPES, RESULT_SCHEMA_KEYWORDS, RESULT_SCHEMA_MAX_BYTES, RESULT_SCHEMA_MAX_DEPTH, ROUTINE_DAYS_OF_WEEK, RequiredToolsetsSchema, ResultDocumentSchemaSchema, RuntimeCapabilitiesSchema, RuntimeIdSchema, RuntimeInfoSchema, SERVER_TO_DAEMON_TYPES, STRICT_AGENT_ONLY_CAPABILITY, TASK_OFFER_TYPES, TASK_STATES, TASK_TRANSITIONS, TERMINAL_INFERENCE_USAGE_CLIENT_VERSION_MAX_LENGTH, TERMINAL_INFERENCE_USAGE_MAX_DURATION_MS, TERMINAL_INFERENCE_USAGE_MAX_TOKENS, TERMINAL_INFERENCE_USAGE_MODEL_MAX_LENGTH, TERMINAL_INFERENCE_USAGE_PROVIDER_MAX_LENGTH, TERMINAL_PROJECTION_SELECTION_CAPABILITY, TaskApprovalResolvedPayloadSchema, TaskApprovePayloadSchema, TaskArtifactPayloadSchema, TaskAwaitApprovalPayloadSchema, TaskCancelPayloadSchema, TaskCancelledPayloadSchema, TaskClaimPayloadSchema, TaskCompletePayloadSchema, TaskDeclinePayloadSchema, TaskFailPayloadSchema, TaskOfferForAgentPayloadSchema, TaskOfferForAgentWithEgressFreshPayloadSchema, TaskOfferForAgentWithEgressPayloadSchema, TaskOfferPayloadSchema, TaskOfferPreparedPayloadSchema, TaskOfferWithToolsetsPayloadSchema, TaskProgressPayloadSchema, TaskRejectPayloadSchema, TaskStartedPayloadSchema, TaskSteerPayloadSchema, TerminalAgentHomeMemoryChangeSchema, TerminalAgentHomeProjectionSchema, TerminalInferenceUsageSchema, TerminalPreparedObservationSchema, TerminalProjectionContractSchema, TerminalProjectionSelectionSchema, TokenRequestSchema, TokenResponseSchema, ToolsetIdSchema, UnknownAgentEventSchema, UnknownMessageTypeError, WIRE_ADDITIONS, agentMemoryIntentFetchResponseSchemaFor, agentMemoryProjectionBase64UrlByteLength, botTurnOutcomeFragments, byokAgentHomeProjectionCompletionPath, byokBlobContentPath, byokBlobFinalizePath, byokBlobUrlPath, byokInputPreparationCompletionPath, byokInputPreparationStatusPath, byokRecordPath, byokSkillPackFilePath, canTransition, checkResultDocument, checkResultSchema, composeBotTurnOutcomeSchema, createEnvelope, decodeEnvelope, encodeEnvelope, isKnownAgentEvent, isPreparedAgentMemoryMode, isServerToDaemonType, isTaskOfferType, parseMessage, partitionAgentEvents, requiredReceiverCapabilities, resultOutcomeMaxBytes, validateResultOutcome };
|
|
2272
2544
|
//# sourceMappingURL=index.js.map
|
|
2273
2545
|
//# sourceMappingURL=index.js.map
|