@layernorm/overlay-agent-host 0.9.0 → 0.11.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/README.md +7 -4
- package/dist/browser-debug-sanitize.d.ts +10 -0
- package/dist/browser-debug-sanitize.d.ts.map +1 -0
- package/dist/browser-debug-sanitize.js +98 -0
- package/dist/browser-debug-sanitize.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/host-capabilities.d.ts +1 -1
- package/dist/host-capabilities.d.ts.map +1 -1
- package/dist/host-capabilities.js +1 -1
- package/dist/host-capabilities.js.map +1 -1
- package/dist/local-browser-debug.d.ts +48 -0
- package/dist/local-browser-debug.d.ts.map +1 -0
- package/dist/local-browser-debug.js +260 -0
- package/dist/local-browser-debug.js.map +1 -0
- package/dist/local-project-instructions.d.ts +3 -0
- package/dist/local-project-instructions.d.ts.map +1 -0
- package/dist/local-project-instructions.js +41 -0
- package/dist/local-project-instructions.js.map +1 -0
- package/dist/local-tools-browser.d.ts +11 -2
- package/dist/local-tools-browser.d.ts.map +1 -1
- package/dist/local-tools-browser.js +26 -2
- package/dist/local-tools-browser.js.map +1 -1
- package/dist/local-tools-desktop-ui.d.ts +59 -0
- package/dist/local-tools-desktop-ui.d.ts.map +1 -0
- package/dist/local-tools-desktop-ui.js +319 -0
- package/dist/local-tools-desktop-ui.js.map +1 -0
- package/dist/local-tools-exec.d.ts +2 -2
- package/dist/local-tools-exec.d.ts.map +1 -1
- package/dist/local-tools-exec.js +13 -29
- package/dist/local-tools-exec.js.map +1 -1
- package/dist/local-tools-output.d.ts +37 -0
- package/dist/local-tools-output.d.ts.map +1 -0
- package/dist/local-tools-output.js +172 -0
- package/dist/local-tools-output.js.map +1 -0
- package/dist/local-tools-terminal.d.ts +11 -1
- package/dist/local-tools-terminal.d.ts.map +1 -1
- package/dist/local-tools-terminal.js +47 -6
- package/dist/local-tools-terminal.js.map +1 -1
- package/dist/local-tools.d.ts +13 -0
- package/dist/local-tools.d.ts.map +1 -1
- package/dist/local-tools.js +40 -7
- package/dist/local-tools.js.map +1 -1
- package/dist/private-threads-access.d.ts +62 -0
- package/dist/private-threads-access.d.ts.map +1 -0
- package/dist/private-threads-access.js +141 -0
- package/dist/private-threads-access.js.map +1 -0
- package/dist/private-threads-context.d.ts +47 -10
- package/dist/private-threads-context.d.ts.map +1 -1
- package/dist/private-threads-context.js +118 -34
- package/dist/private-threads-context.js.map +1 -1
- package/dist/private-threads-control.d.ts +25 -0
- package/dist/private-threads-control.d.ts.map +1 -0
- package/dist/private-threads-control.js +84 -0
- package/dist/private-threads-control.js.map +1 -0
- package/dist/private-threads-images.d.ts +15 -0
- package/dist/private-threads-images.d.ts.map +1 -0
- package/dist/private-threads-images.js +38 -0
- package/dist/private-threads-images.js.map +1 -0
- package/dist/private-threads-ipc.d.ts +16 -0
- package/dist/private-threads-ipc.d.ts.map +1 -1
- package/dist/private-threads-ipc.js +73 -12
- package/dist/private-threads-ipc.js.map +1 -1
- package/dist/private-threads-limits.d.ts +51 -0
- package/dist/private-threads-limits.d.ts.map +1 -0
- package/dist/private-threads-limits.js +51 -0
- package/dist/private-threads-limits.js.map +1 -0
- package/dist/private-threads-messages.d.ts +77 -0
- package/dist/private-threads-messages.d.ts.map +1 -0
- package/dist/private-threads-messages.js +204 -0
- package/dist/private-threads-messages.js.map +1 -0
- package/dist/private-threads-models.d.ts +7 -1
- package/dist/private-threads-models.d.ts.map +1 -1
- package/dist/private-threads-models.js +43 -0
- package/dist/private-threads-models.js.map +1 -1
- package/dist/private-threads-overlay-model.d.ts +1 -0
- package/dist/private-threads-overlay-model.d.ts.map +1 -1
- package/dist/private-threads-overlay-tools.d.ts +2 -0
- package/dist/private-threads-overlay-tools.d.ts.map +1 -1
- package/dist/private-threads-overlay-tools.js +2 -1
- package/dist/private-threads-overlay-tools.js.map +1 -1
- package/dist/private-threads-pieces.d.ts +14 -0
- package/dist/private-threads-pieces.d.ts.map +1 -0
- package/dist/private-threads-pieces.js +85 -0
- package/dist/private-threads-pieces.js.map +1 -0
- package/dist/private-threads-progress.d.ts +36 -0
- package/dist/private-threads-progress.d.ts.map +1 -0
- package/dist/private-threads-progress.js +83 -0
- package/dist/private-threads-progress.js.map +1 -0
- package/dist/private-threads-protocol.d.ts +237 -4
- package/dist/private-threads-protocol.d.ts.map +1 -1
- package/dist/private-threads-protocol.js +71 -6
- package/dist/private-threads-protocol.js.map +1 -1
- package/dist/private-threads-recall.d.ts +10 -0
- package/dist/private-threads-recall.d.ts.map +1 -0
- package/dist/private-threads-recall.js +40 -0
- package/dist/private-threads-recall.js.map +1 -0
- package/dist/private-threads-schema.d.ts +8 -0
- package/dist/private-threads-schema.d.ts.map +1 -0
- package/dist/private-threads-schema.js +188 -0
- package/dist/private-threads-schema.js.map +1 -0
- package/dist/private-threads-store.d.ts +120 -10
- package/dist/private-threads-store.d.ts.map +1 -1
- package/dist/private-threads-store.js +485 -62
- package/dist/private-threads-store.js.map +1 -1
- package/dist/private-threads-tools.d.ts.map +1 -1
- package/dist/private-threads-tools.js +40 -7
- package/dist/private-threads-tools.js.map +1 -1
- package/dist/private-threads-turn-model.d.ts +7 -0
- package/dist/private-threads-turn-model.d.ts.map +1 -0
- package/dist/private-threads-turn-model.js +31 -0
- package/dist/private-threads-turn-model.js.map +1 -0
- package/dist/private-threads.d.ts +44 -19
- package/dist/private-threads.d.ts.map +1 -1
- package/dist/private-threads.js +362 -213
- package/dist/private-threads.js.map +1 -1
- package/dist/process-identity.d.ts +14 -0
- package/dist/process-identity.d.ts.map +1 -0
- package/dist/process-identity.js +39 -0
- package/dist/process-identity.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { LARGE_PART_BYTES, MESSAGE_PAGE_BYTES, PART_SLICE_CHARACTERS, TEXT_SLICE_CHARACTERS } from './private-threads-limits.js';
|
|
2
|
+
import { textPieces, toolPart } from './private-threads-messages.js';
|
|
3
|
+
function split(message) {
|
|
4
|
+
return message.parts.flatMap((part, index) => {
|
|
5
|
+
const bytes = Buffer.byteLength(JSON.stringify(part));
|
|
6
|
+
if (bytes <= LARGE_PART_BYTES)
|
|
7
|
+
return [{ at: `${index}:0`, part: index, bytes, value: part }];
|
|
8
|
+
if (part.type === 'text' || part.type === 'reasoning') {
|
|
9
|
+
// Model data kept with the text isn't shown.
|
|
10
|
+
const { type, state } = part;
|
|
11
|
+
return textPieces(part.text, TEXT_SLICE_CHARACTERS).map((text, slice) => ({
|
|
12
|
+
at: `${index}:${slice}`, part: index, slice, bytes: Buffer.byteLength(text), value: { type, text, ...(state ? { state } : {}) },
|
|
13
|
+
}));
|
|
14
|
+
}
|
|
15
|
+
return [{ at: `${index}:0`, part: index, large: true, bytes, value: placeholder(part) }];
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/** What a row shows of a large part before it's read: the call and, when it's small, its input. */
|
|
19
|
+
function placeholder(part) {
|
|
20
|
+
const call = toolPart(part);
|
|
21
|
+
if (!call)
|
|
22
|
+
return { type: 'text', text: '' };
|
|
23
|
+
const { type, toolName, toolCallId, state, input } = call;
|
|
24
|
+
const small = Buffer.byteLength(JSON.stringify(input) ?? '') <= LARGE_PART_BYTES / 16;
|
|
25
|
+
return { type, ...(toolName ? { toolName } : {}), toolCallId, state, ...(small ? { input } : {}) };
|
|
26
|
+
}
|
|
27
|
+
/** Pieces from `start` in one direction, at least one, up to a page. In thread order either way. */
|
|
28
|
+
function run(pieces, start, direction) {
|
|
29
|
+
const taken = [];
|
|
30
|
+
let bytes = 0;
|
|
31
|
+
for (let index = start; index >= 0 && index < pieces.length; index += direction) {
|
|
32
|
+
const piece = pieces[index];
|
|
33
|
+
bytes += Buffer.byteLength(JSON.stringify(piece.value));
|
|
34
|
+
if (taken.length > 0 && bytes > MESSAGE_PAGE_BYTES)
|
|
35
|
+
break;
|
|
36
|
+
taken.push(piece);
|
|
37
|
+
}
|
|
38
|
+
return direction === 1 ? taken : taken.reverse();
|
|
39
|
+
}
|
|
40
|
+
function ends(pieces, taken) {
|
|
41
|
+
const [first, last] = [taken[0], taken.at(-1)];
|
|
42
|
+
return {
|
|
43
|
+
older: first && first !== pieces[0] ? first.at : null,
|
|
44
|
+
newer: last && last !== pieces.at(-1) ? last.at : null,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const withoutPlace = ({ at: _at, ...piece }) => {
|
|
48
|
+
void _at;
|
|
49
|
+
return piece;
|
|
50
|
+
};
|
|
51
|
+
/** A large message as a page first shows it: the start of what the person wrote, or the end of a reply, with its answer. */
|
|
52
|
+
export function shortenMessage(message, revision) {
|
|
53
|
+
const pieces = split(message);
|
|
54
|
+
const taken = message.role === 'user' ? run(pieces, 0, 1) : run(pieces, pieces.length - 1, -1);
|
|
55
|
+
return {
|
|
56
|
+
message: { ...message, parts: taken.map(piece => piece.value) },
|
|
57
|
+
shortened: {
|
|
58
|
+
messageId: message.id, revision,
|
|
59
|
+
bytes: pieces.reduce((sum, piece) => sum + piece.bytes, 0),
|
|
60
|
+
pieces: taken.map(withoutPlace).map(({ value: _value, ...piece }) => { void _value; return piece; }),
|
|
61
|
+
...ends(pieces, taken),
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export function messagePieces(message, from) {
|
|
66
|
+
const pieces = split(message);
|
|
67
|
+
const at = 'before' in from ? from.before : from.after;
|
|
68
|
+
const index = pieces.findIndex(piece => piece.at === at);
|
|
69
|
+
if (index < 0)
|
|
70
|
+
throw new Error('That place is no longer valid. Open the thread again.');
|
|
71
|
+
const taken = 'before' in from ? run(pieces, index - 1, -1) : run(pieces, index + 1, 1);
|
|
72
|
+
return { pieces: taken.map(withoutPlace), ...ends(pieces, taken) };
|
|
73
|
+
}
|
|
74
|
+
/** Part of a large part's JSON. The page puts the slices together before it reads them. */
|
|
75
|
+
export function partSlice(message, part, from) {
|
|
76
|
+
const json = message.parts[part] === undefined ? null : JSON.stringify(message.parts[part]);
|
|
77
|
+
if (json === null || from >= json.length)
|
|
78
|
+
throw new Error('That place is no longer valid. Open the thread again.');
|
|
79
|
+
// Never between the halves of one character, which wouldn't survive being sent.
|
|
80
|
+
let end = Math.min(json.length, from + PART_SLICE_CHARACTERS);
|
|
81
|
+
if (end < json.length && /[\uD800-\uDBFF]/.test(json[end - 1]))
|
|
82
|
+
end--;
|
|
83
|
+
return { json: json.slice(from, end), next: end < json.length ? end : null };
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=private-threads-pieces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-threads-pieces.js","sourceRoot":"","sources":["../src/private-threads-pieces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAChI,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AAWpE,SAAS,KAAK,CAAC,OAAyB;IACtC,OAAO,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAW,EAAE;QACpD,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;QACrD,IAAI,KAAK,IAAI,gBAAgB;YAAE,OAAO,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;QAC7F,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;YACtD,6CAA6C;YAC7C,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;YAC5B,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAA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QAAE,GAAG,EAAE,CAAA;IACtE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;AAC9E,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notices when a run repeats itself without getting anywhere, so the number of steps needs no limit. A step is its tool
|
|
3
|
+
* calls and their results. A run is stuck when its last `STUCK_WINDOW_STEPS` steps are one short cycle of identical
|
|
4
|
+
* calls with identical results. Any new input or result is progress, including a poll that returns something new,
|
|
5
|
+
* however long the run is.
|
|
6
|
+
*
|
|
7
|
+
* - 24 steps: a stuck run costs less than half the 60 steps every run was once limited to.
|
|
8
|
+
* - 120 steps when the cycle checks a terminal command that is still running. Waiting for a silent build isn't being
|
|
9
|
+
* stuck, but a command that hangs must not be checked forever. With the longest wait (10 seconds each), that is 20 minutes.
|
|
10
|
+
* `harness_wait` counts the same way while its job runs, so short waits for a slow build aren't mistaken for being stuck.
|
|
11
|
+
* - Cycles of up to 6 steps: even the longest repeats four times, and chance or a retry doesn't look like that.
|
|
12
|
+
*
|
|
13
|
+
* Only short fingerprints of the last 120 steps are kept, in memory and for one turn. After a pause, the person's
|
|
14
|
+
* message starts a new turn and a new window.
|
|
15
|
+
*/
|
|
16
|
+
export declare const STUCK_WINDOW_STEPS = 24;
|
|
17
|
+
export declare const STUCK_WAITING_WINDOW_STEPS = 120;
|
|
18
|
+
export declare const STUCK_MAX_CYCLE_STEPS = 6;
|
|
19
|
+
type StepContent = readonly {
|
|
20
|
+
type: string;
|
|
21
|
+
toolCallId?: string;
|
|
22
|
+
toolName?: string;
|
|
23
|
+
input?: unknown;
|
|
24
|
+
output?: unknown;
|
|
25
|
+
error?: unknown;
|
|
26
|
+
}[];
|
|
27
|
+
export declare class ProgressCheck {
|
|
28
|
+
private readonly recent;
|
|
29
|
+
/** Adds a finished step. Returns how many steps the run keeps repeating, or null while it makes progress. */
|
|
30
|
+
add(content: StepContent): number | null;
|
|
31
|
+
private repeats;
|
|
32
|
+
}
|
|
33
|
+
/** The thread's question when a run pauses. Any reply starts a new turn. */
|
|
34
|
+
export declare function stuckMessage(cycle: number): string;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=private-threads-progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-threads-progress.d.ts","sourceRoot":"","sources":["../src/private-threads-progress.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAA;AACpC,eAAO,MAAM,0BAA0B,MAAM,CAAA;AAC7C,eAAO,MAAM,qBAAqB,IAAI,CAAA;AAOtC,KAAK,WAAW,GAAG,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,CAAA;AAE1I,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2C;IAElE,6GAA6G;IAC7G,GAAG,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI;IAUxC,OAAO,CAAC,OAAO;CAIhB;AAQD,4EAA4E;AAC5E,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIlD"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { RUN_WAIT_TOOL } from '@layernorm/overlay-agent-bridge-protocol';
|
|
3
|
+
/**
|
|
4
|
+
* Notices when a run repeats itself without getting anywhere, so the number of steps needs no limit. A step is its tool
|
|
5
|
+
* calls and their results. A run is stuck when its last `STUCK_WINDOW_STEPS` steps are one short cycle of identical
|
|
6
|
+
* calls with identical results. Any new input or result is progress, including a poll that returns something new,
|
|
7
|
+
* however long the run is.
|
|
8
|
+
*
|
|
9
|
+
* - 24 steps: a stuck run costs less than half the 60 steps every run was once limited to.
|
|
10
|
+
* - 120 steps when the cycle checks a terminal command that is still running. Waiting for a silent build isn't being
|
|
11
|
+
* stuck, but a command that hangs must not be checked forever. With the longest wait (10 seconds each), that is 20 minutes.
|
|
12
|
+
* `harness_wait` counts the same way while its job runs, so short waits for a slow build aren't mistaken for being stuck.
|
|
13
|
+
* - Cycles of up to 6 steps: even the longest repeats four times, and chance or a retry doesn't look like that.
|
|
14
|
+
*
|
|
15
|
+
* Only short fingerprints of the last 120 steps are kept, in memory and for one turn. After a pause, the person's
|
|
16
|
+
* message starts a new turn and a new window.
|
|
17
|
+
*/
|
|
18
|
+
export const STUCK_WINDOW_STEPS = 24;
|
|
19
|
+
export const STUCK_WAITING_WINDOW_STEPS = 120;
|
|
20
|
+
export const STUCK_MAX_CYCLE_STEPS = 6;
|
|
21
|
+
const HOST_FIELDS = {
|
|
22
|
+
computer_exec: ['startedAt', 'endedAt', 'outputPath'],
|
|
23
|
+
[RUN_WAIT_TOOL]: ['waitedSeconds'],
|
|
24
|
+
};
|
|
25
|
+
export class ProgressCheck {
|
|
26
|
+
recent = [];
|
|
27
|
+
/** Adds a finished step. Returns how many steps the run keeps repeating, or null while it makes progress. */
|
|
28
|
+
add(content) {
|
|
29
|
+
this.recent.push({ step: fingerprint(content), waiting: content.some(isRunningCommand) });
|
|
30
|
+
if (this.recent.length > STUCK_WAITING_WINDOW_STEPS)
|
|
31
|
+
this.recent.shift();
|
|
32
|
+
for (let cycle = 1; cycle <= STUCK_MAX_CYCLE_STEPS; cycle++) {
|
|
33
|
+
const waiting = this.recent.slice(-cycle).some(entry => entry.waiting);
|
|
34
|
+
if (this.repeats(cycle, waiting ? STUCK_WAITING_WINDOW_STEPS : STUCK_WINDOW_STEPS))
|
|
35
|
+
return cycle;
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
repeats(cycle, steps) {
|
|
40
|
+
const window = this.recent.slice(-steps);
|
|
41
|
+
return window.length === steps && window.every((entry, index) => index < cycle || entry.step === window[index - cycle].step);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/** A look at, or a wait for, a terminal command that hasn't ended. */
|
|
45
|
+
function isRunningCommand(part) {
|
|
46
|
+
if (part.type === 'tool-result' && part.toolName === RUN_WAIT_TOOL)
|
|
47
|
+
return part.output?.jobRunning === true;
|
|
48
|
+
return part.type === 'tool-result' && part.toolName === 'computer_terminal' && part.output?.running === true;
|
|
49
|
+
}
|
|
50
|
+
/** The thread's question when a run pauses. Any reply starts a new turn. */
|
|
51
|
+
export function stuckMessage(cycle) {
|
|
52
|
+
const repeated = cycle === 1 ? 'the same step' : `the same ${cycle} steps`;
|
|
53
|
+
return `I paused because I kept repeating ${repeated} and got the same results each time. Everything so far is saved. ` +
|
|
54
|
+
'Should I keep going? You can also tell me what to try instead.';
|
|
55
|
+
}
|
|
56
|
+
/** The same for the same calls and results, whatever order parallel calls or object keys come in. Call ids are new each time. */
|
|
57
|
+
function fingerprint(content) {
|
|
58
|
+
const results = new Map(content.flatMap(part => (part.type === 'tool-result' || part.type === 'tool-error') && part.toolCallId ? [[part.toolCallId, part]] : []));
|
|
59
|
+
const calls = content.filter(part => part.type === 'tool-call').map((call) => {
|
|
60
|
+
const result = results.get(call.toolCallId ?? '');
|
|
61
|
+
return stableJson([call.toolName, call.input, result?.type, result?.type === 'tool-error' ? errorText(result.error) : lasting(call.toolName, result?.output)]);
|
|
62
|
+
});
|
|
63
|
+
return createHash('sha256').update(stableJson(calls.sort())).digest('base64');
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* A command's result without its start and end times or the name of its saved log, and a wait's without its exact
|
|
67
|
+
* length. The host adds these itself, so they differ even when nothing else does. Nothing else is ignored: a time in a command's output or another tool's result can be the very change it waits for.
|
|
68
|
+
*/
|
|
69
|
+
function lasting(toolName, output) {
|
|
70
|
+
const added = HOST_FIELDS[toolName ?? ''];
|
|
71
|
+
if (!added || !output || typeof output !== 'object')
|
|
72
|
+
return output;
|
|
73
|
+
return Object.fromEntries(Object.entries(output).filter(([key]) => !added.includes(key)));
|
|
74
|
+
}
|
|
75
|
+
function errorText(error) {
|
|
76
|
+
return error instanceof Error ? error.message : String(error);
|
|
77
|
+
}
|
|
78
|
+
function stableJson(value) {
|
|
79
|
+
return JSON.stringify(value, (_key, entry) => entry && typeof entry === 'object' && !Array.isArray(entry)
|
|
80
|
+
? Object.fromEntries(Object.entries(entry).sort(([a], [b]) => a < b ? -1 : 1))
|
|
81
|
+
: entry) ?? '';
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=private-threads-progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-threads-progress.js","sourceRoot":"","sources":["../src/private-threads-progress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAA;AAExE;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAA;AACpC,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAA;AAC7C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAA;AAEtC,MAAM,WAAW,GAAkD;IACjE,aAAa,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,YAAY,CAAC;IACrD,CAAC,aAAa,CAAC,EAAE,CAAC,eAAe,CAAC;CACnC,CAAA;AAID,MAAM,OAAO,aAAa;IACP,MAAM,GAAyC,EAAE,CAAA;IAElE,6GAA6G;IAC7G,GAAG,CAAC,OAAoB;QACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC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C,KAAK,CAAC,IAAI,EAAE,CAAA;AAClB,CAAC"}
|
|
@@ -5,7 +5,12 @@ import { z } from 'zod';
|
|
|
5
5
|
* Node.js IPC channel of `overlay-agent-host private`. Nothing here goes to the network:
|
|
6
6
|
* the only outbound calls are to the model provider the person chose.
|
|
7
7
|
*/
|
|
8
|
-
export declare const PRIVATE_THREADS_PROTOCOL_VERSION:
|
|
8
|
+
export declare const PRIVATE_THREADS_PROTOCOL_VERSION: 2;
|
|
9
|
+
/**
|
|
10
|
+
* Marks a host that returns pages, takes only new messages and reports activity (protocol version 2). Overlay Desktop
|
|
11
|
+
* looks for it in the bundled host before it offers them to the page.
|
|
12
|
+
*/
|
|
13
|
+
export declare const THREAD_PAGES_FEATURE = "overlay-private-thread-pages";
|
|
9
14
|
export type PrivateUIMessage = UIMessage;
|
|
10
15
|
export type PrivateThreadOwner = {
|
|
11
16
|
userId: string;
|
|
@@ -47,7 +52,9 @@ declare const turnModel: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
47
52
|
relay: z.ZodObject<{
|
|
48
53
|
url: z.ZodString;
|
|
49
54
|
token: z.ZodString;
|
|
55
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
50
56
|
}, z.core.$strict>;
|
|
57
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
51
58
|
}, z.core.$strict>]>;
|
|
52
59
|
export type PrivateTurnModel = z.output<typeof turnModel>;
|
|
53
60
|
/**
|
|
@@ -63,12 +70,42 @@ export declare const localMcpServerSchema: z.ZodObject<{
|
|
|
63
70
|
cwd: z.ZodOptional<z.ZodString>;
|
|
64
71
|
}, z.core.$strict>;
|
|
65
72
|
export type LocalMcpServer = z.output<typeof localMcpServerSchema>;
|
|
73
|
+
declare const pageRequest: z.ZodUnion<readonly [z.ZodObject<{
|
|
74
|
+
before: z.ZodString;
|
|
75
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
76
|
+
after: z.ZodString;
|
|
77
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
78
|
+
around: z.ZodString;
|
|
79
|
+
}, z.core.$strict>]>;
|
|
80
|
+
export type PrivatePageRequest = z.output<typeof pageRequest> | Record<string, never>;
|
|
81
|
+
/**
|
|
82
|
+
* All a page may add to a thread: one new message from the person, or their answers to the actions the latest saved
|
|
83
|
+
* reply is waiting for. Everything else in the thread comes from this computer's database.
|
|
84
|
+
*/
|
|
85
|
+
declare const newInput: z.ZodUnion<readonly [z.ZodObject<{
|
|
86
|
+
message: z.ZodObject<{
|
|
87
|
+
id: z.ZodString;
|
|
88
|
+
text: z.ZodString;
|
|
89
|
+
}, z.core.$strict>;
|
|
90
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
91
|
+
approvals: z.ZodArray<z.ZodObject<{
|
|
92
|
+
id: z.ZodString;
|
|
93
|
+
approved: z.ZodBoolean;
|
|
94
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
95
|
+
}, z.core.$strict>>;
|
|
96
|
+
answers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
97
|
+
toolCallId: z.ZodString;
|
|
98
|
+
answer: z.ZodString;
|
|
99
|
+
}, z.core.$strict>>>;
|
|
100
|
+
}, z.core.$strict>]>;
|
|
101
|
+
export type PrivateTurnInput = z.output<typeof newInput>;
|
|
66
102
|
export declare const privateRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
67
103
|
method: z.ZodLiteral<"list">;
|
|
68
104
|
owner: z.ZodObject<{
|
|
69
105
|
userId: z.ZodString;
|
|
70
106
|
workspaceId: z.ZodString;
|
|
71
107
|
}, z.core.$strict>;
|
|
108
|
+
after: z.ZodOptional<z.ZodString>;
|
|
72
109
|
}, z.core.$strict>, z.ZodObject<{
|
|
73
110
|
method: z.ZodLiteral<"get">;
|
|
74
111
|
owner: z.ZodObject<{
|
|
@@ -76,6 +113,64 @@ export declare const privateRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
76
113
|
workspaceId: z.ZodString;
|
|
77
114
|
}, z.core.$strict>;
|
|
78
115
|
threadId: z.ZodString;
|
|
116
|
+
page: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
117
|
+
before: z.ZodString;
|
|
118
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
119
|
+
after: z.ZodString;
|
|
120
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
121
|
+
around: z.ZodString;
|
|
122
|
+
}, z.core.$strict>]>>;
|
|
123
|
+
whole: z.ZodOptional<z.ZodLiteral<true>>;
|
|
124
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
125
|
+
method: z.ZodLiteral<"pieces">;
|
|
126
|
+
owner: z.ZodObject<{
|
|
127
|
+
userId: z.ZodString;
|
|
128
|
+
workspaceId: z.ZodString;
|
|
129
|
+
}, z.core.$strict>;
|
|
130
|
+
threadId: z.ZodString;
|
|
131
|
+
messageId: z.ZodString;
|
|
132
|
+
revision: z.ZodNumber;
|
|
133
|
+
from: z.ZodUnion<readonly [z.ZodObject<{
|
|
134
|
+
before: z.ZodString;
|
|
135
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
136
|
+
after: z.ZodString;
|
|
137
|
+
}, z.core.$strict>]>;
|
|
138
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
139
|
+
method: z.ZodLiteral<"part">;
|
|
140
|
+
owner: z.ZodObject<{
|
|
141
|
+
userId: z.ZodString;
|
|
142
|
+
workspaceId: z.ZodString;
|
|
143
|
+
}, z.core.$strict>;
|
|
144
|
+
threadId: z.ZodString;
|
|
145
|
+
messageId: z.ZodString;
|
|
146
|
+
revision: z.ZodNumber;
|
|
147
|
+
part: z.ZodNumber;
|
|
148
|
+
from: z.ZodNumber;
|
|
149
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
150
|
+
method: z.ZodLiteral<"activity">;
|
|
151
|
+
owner: z.ZodObject<{
|
|
152
|
+
userId: z.ZodString;
|
|
153
|
+
workspaceId: z.ZodString;
|
|
154
|
+
}, z.core.$strict>;
|
|
155
|
+
threadId: z.ZodString;
|
|
156
|
+
before: z.ZodOptional<z.ZodString>;
|
|
157
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
158
|
+
method: z.ZodLiteral<"search">;
|
|
159
|
+
owner: z.ZodObject<{
|
|
160
|
+
userId: z.ZodString;
|
|
161
|
+
workspaceId: z.ZodString;
|
|
162
|
+
}, z.core.$strict>;
|
|
163
|
+
threadId: z.ZodString;
|
|
164
|
+
words: z.ZodString;
|
|
165
|
+
after: z.ZodOptional<z.ZodString>;
|
|
166
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
167
|
+
method: z.ZodLiteral<"edits">;
|
|
168
|
+
owner: z.ZodObject<{
|
|
169
|
+
userId: z.ZodString;
|
|
170
|
+
workspaceId: z.ZodString;
|
|
171
|
+
}, z.core.$strict>;
|
|
172
|
+
threadId: z.ZodString;
|
|
173
|
+
after: z.ZodOptional<z.ZodString>;
|
|
79
174
|
}, z.core.$strict>, z.ZodObject<{
|
|
80
175
|
method: z.ZodLiteral<"create">;
|
|
81
176
|
owner: z.ZodObject<{
|
|
@@ -95,7 +190,22 @@ export declare const privateRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
95
190
|
}, z.core.$strict>;
|
|
96
191
|
threadId: z.ZodString;
|
|
97
192
|
turnId: z.ZodString;
|
|
98
|
-
|
|
193
|
+
input: z.ZodUnion<readonly [z.ZodObject<{
|
|
194
|
+
message: z.ZodObject<{
|
|
195
|
+
id: z.ZodString;
|
|
196
|
+
text: z.ZodString;
|
|
197
|
+
}, z.core.$strict>;
|
|
198
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
199
|
+
approvals: z.ZodArray<z.ZodObject<{
|
|
200
|
+
id: z.ZodString;
|
|
201
|
+
approved: z.ZodBoolean;
|
|
202
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
203
|
+
}, z.core.$strict>>;
|
|
204
|
+
answers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
205
|
+
toolCallId: z.ZodString;
|
|
206
|
+
answer: z.ZodString;
|
|
207
|
+
}, z.core.$strict>>>;
|
|
208
|
+
}, z.core.$strict>]>;
|
|
99
209
|
model: z.ZodUnion<readonly [z.ZodObject<{
|
|
100
210
|
provider: z.ZodEnum<{
|
|
101
211
|
anthropic: "anthropic";
|
|
@@ -111,7 +221,9 @@ export declare const privateRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
111
221
|
relay: z.ZodObject<{
|
|
112
222
|
url: z.ZodString;
|
|
113
223
|
token: z.ZodString;
|
|
224
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
114
225
|
}, z.core.$strict>;
|
|
226
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
115
227
|
}, z.core.$strict>]>;
|
|
116
228
|
agent: z.ZodObject<{
|
|
117
229
|
name: z.ZodString;
|
|
@@ -122,9 +234,11 @@ export declare const privateRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
122
234
|
auto: "auto";
|
|
123
235
|
ask: "ask";
|
|
124
236
|
}>>;
|
|
237
|
+
questions: z.ZodOptional<z.ZodBoolean>;
|
|
125
238
|
overlay: z.ZodOptional<z.ZodObject<{
|
|
126
239
|
url: z.ZodString;
|
|
127
240
|
token: z.ZodString;
|
|
241
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
128
242
|
}, z.core.$strict>>;
|
|
129
243
|
localMcp: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
130
244
|
id: z.ZodString;
|
|
@@ -182,16 +296,110 @@ export declare const privateRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
182
296
|
}, z.core.$strict>], "method">;
|
|
183
297
|
export type PrivateRequest = z.input<typeof privateRequestSchema>;
|
|
184
298
|
export type ParsedPrivateRequest = z.output<typeof privateRequestSchema>;
|
|
299
|
+
/** Oldest message first. `older` and `newer` are the ids to ask for pages `before` and `after`, or null at that end. */
|
|
300
|
+
export type PrivateMessagePage = {
|
|
301
|
+
messages: PrivateUIMessage[];
|
|
302
|
+
older: string | null;
|
|
303
|
+
newer: string | null;
|
|
304
|
+
/** Messages in this page that were too large to send whole. Their `parts` are only the pieces listed here, in order. */
|
|
305
|
+
shortened: PrivateShortened[];
|
|
306
|
+
};
|
|
307
|
+
/** A whole part, a slice of a long text part (`slice` counts them), or a placeholder for another large part (`large`). */
|
|
308
|
+
export type PrivateMessagePiece = {
|
|
309
|
+
/** The part's place in the message. */
|
|
310
|
+
part: number;
|
|
311
|
+
slice?: number;
|
|
312
|
+
large?: true;
|
|
313
|
+
/** The size of what this piece stands for. */
|
|
314
|
+
bytes: number;
|
|
315
|
+
value: PrivateUIMessage['parts'][number];
|
|
316
|
+
};
|
|
317
|
+
/** Places to continue from, or null at that end of the message. */
|
|
318
|
+
export type PrivateMessagePieces = {
|
|
319
|
+
pieces: PrivateMessagePiece[];
|
|
320
|
+
older: string | null;
|
|
321
|
+
newer: string | null;
|
|
322
|
+
};
|
|
323
|
+
export type PrivateShortened = Omit<PrivateMessagePieces, 'pieces'> & {
|
|
324
|
+
messageId: string;
|
|
325
|
+
/** Send back with every request for more. It changes when the message does. */
|
|
326
|
+
revision: number;
|
|
327
|
+
/** The size of the whole message. */
|
|
328
|
+
bytes: number;
|
|
329
|
+
pieces: Omit<PrivateMessagePiece, 'value'>[];
|
|
330
|
+
};
|
|
331
|
+
/** Some of a large part's JSON. `next` is where to continue, or null at its end. */
|
|
332
|
+
export type PrivatePartSlice = {
|
|
333
|
+
json: string;
|
|
334
|
+
next: number | null;
|
|
335
|
+
};
|
|
336
|
+
export type PrivateToolCall = {
|
|
337
|
+
messageId: string;
|
|
338
|
+
toolCallId: string;
|
|
339
|
+
name: string;
|
|
340
|
+
/** The AI SDK's tool part state. */
|
|
341
|
+
state: string;
|
|
342
|
+
input?: unknown;
|
|
343
|
+
/** Without the images tools return. */
|
|
344
|
+
output?: unknown;
|
|
345
|
+
};
|
|
346
|
+
export type PrivateActivity = {
|
|
347
|
+
plan: {
|
|
348
|
+
steps: {
|
|
349
|
+
id: string;
|
|
350
|
+
title: string;
|
|
351
|
+
status: string;
|
|
352
|
+
}[];
|
|
353
|
+
phase: 'active' | 'waiting' | 'ended';
|
|
354
|
+
} | null;
|
|
355
|
+
/** For the whole thread, not just this page. */
|
|
356
|
+
totals: {
|
|
357
|
+
calls: number;
|
|
358
|
+
files: number;
|
|
359
|
+
added: number;
|
|
360
|
+
removed: number;
|
|
361
|
+
};
|
|
362
|
+
/** Oldest first. `older` continues before them. */
|
|
363
|
+
calls: PrivateToolCall[];
|
|
364
|
+
older: string | null;
|
|
365
|
+
};
|
|
366
|
+
export type PrivateEditPage = {
|
|
367
|
+
edits: {
|
|
368
|
+
path: string;
|
|
369
|
+
added: number;
|
|
370
|
+
removed: number;
|
|
371
|
+
}[];
|
|
372
|
+
next: string | null;
|
|
373
|
+
};
|
|
374
|
+
export type PrivateMessageSearch = {
|
|
375
|
+
/** Newest message first. `number` counts messages from 1. */
|
|
376
|
+
results: {
|
|
377
|
+
messageId: string;
|
|
378
|
+
number: number;
|
|
379
|
+
from: 'person' | 'agent';
|
|
380
|
+
excerpt: string;
|
|
381
|
+
}[];
|
|
382
|
+
/** Send back as `after` for older results. */
|
|
383
|
+
next: string | null;
|
|
384
|
+
/** False while older messages are still being indexed. `next` then continues with them, even after a page without results. */
|
|
385
|
+
complete: boolean;
|
|
386
|
+
};
|
|
185
387
|
export type PrivateResults = {
|
|
186
388
|
list: {
|
|
187
389
|
threads: PrivateThread[];
|
|
188
390
|
running: string[];
|
|
391
|
+
next: string | null;
|
|
189
392
|
};
|
|
190
393
|
get: {
|
|
191
394
|
thread: PrivateThread;
|
|
192
|
-
messages: PrivateUIMessage[];
|
|
193
395
|
running: boolean;
|
|
194
|
-
};
|
|
396
|
+
} & PrivateMessagePage;
|
|
397
|
+
/** Null when the message changed or is gone: read its page again. */
|
|
398
|
+
pieces: PrivateMessagePieces | null;
|
|
399
|
+
part: PrivatePartSlice | null;
|
|
400
|
+
activity: PrivateActivity;
|
|
401
|
+
edits: PrivateEditPage;
|
|
402
|
+
search: PrivateMessageSearch;
|
|
195
403
|
create: {
|
|
196
404
|
thread: PrivateThread;
|
|
197
405
|
};
|
|
@@ -238,11 +446,28 @@ export type PrivateEvent = {
|
|
|
238
446
|
} | {
|
|
239
447
|
kind: 'threads';
|
|
240
448
|
owner: PrivateThreadOwner;
|
|
449
|
+
deletedThreadId?: string;
|
|
241
450
|
};
|
|
451
|
+
/** Which of the turn's tokens the host asks Overlay Desktop to renew. The desktop app knows whom the turn belongs to. */
|
|
452
|
+
export type PrivateAccessKind = 'model' | 'tools';
|
|
242
453
|
export type PrivateIpcInbound = {
|
|
243
454
|
type: 'request';
|
|
244
455
|
id: number;
|
|
245
456
|
request: PrivateRequest;
|
|
457
|
+
} | {
|
|
458
|
+
type: 'renewed';
|
|
459
|
+
id: number;
|
|
460
|
+
ok: true;
|
|
461
|
+
token: string;
|
|
462
|
+
expiresAt: number;
|
|
463
|
+
}
|
|
464
|
+
/** `refused`: Overlay said no, which ends the turn. Otherwise it couldn't be asked. */
|
|
465
|
+
| {
|
|
466
|
+
type: 'renewed';
|
|
467
|
+
id: number;
|
|
468
|
+
ok: false;
|
|
469
|
+
refused: boolean;
|
|
470
|
+
error: string;
|
|
246
471
|
};
|
|
247
472
|
export type PrivateIpcOutbound = {
|
|
248
473
|
type: 'ready';
|
|
@@ -262,6 +487,14 @@ export type PrivateIpcOutbound = {
|
|
|
262
487
|
} | {
|
|
263
488
|
type: 'event';
|
|
264
489
|
event: PrivateEvent;
|
|
490
|
+
} | {
|
|
491
|
+
type: 'renew';
|
|
492
|
+
id: number;
|
|
493
|
+
turnId: string;
|
|
494
|
+
kind: PrivateAccessKind;
|
|
495
|
+
} | {
|
|
496
|
+
type: 'cancelRenew';
|
|
497
|
+
id: number;
|
|
265
498
|
};
|
|
266
499
|
export {};
|
|
267
500
|
//# sourceMappingURL=private-threads-protocol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-threads-protocol.d.ts","sourceRoot":"","sources":["../src/private-threads-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,IAAI,CAAA;AAEnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"private-threads-protocol.d.ts","sourceRoot":"","sources":["../src/private-threads-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,IAAI,CAAA;AAEnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,EAAG,CAAU,CAAA;AAE1D;;;GAGG;AACH,eAAO,MAAM,oBAAoB,iCAAiC,CAAA;AAElE,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAA;AACxC,MAAM,MAAM,kBAAkB,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAA;AACxE,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG;IAC/C,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,mEAAmE;IACnE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,sDAAsD;AACtD,eAAO,MAAM,qBAAqB,0DAA2D,CAAA;AAC7F,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAA;AACzE,uHAAuH;AACvH,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,GAAG,SAAS,CAAA;AAEjE,4FAA4F;AAC5F,eAAO,MAAM,qBAAqB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