@layernorm/overlay-agent-host 0.8.0 → 0.10.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/Dockerfile +0 -1
- package/LICENSE +176 -0
- package/README.md +7 -7
- 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/keyed-lock.d.ts +2 -0
- package/dist/keyed-lock.d.ts.map +1 -0
- package/dist/keyed-lock.js +18 -0
- package/dist/keyed-lock.js.map +1 -0
- package/dist/local-tools-exec.d.ts +14 -1
- package/dist/local-tools-exec.d.ts.map +1 -1
- package/dist/local-tools-exec.js +71 -12
- package/dist/local-tools-exec.js.map +1 -1
- package/dist/local-tools-paths.d.ts +8 -0
- package/dist/local-tools-paths.d.ts.map +1 -1
- package/dist/local-tools-paths.js +6 -2
- package/dist/local-tools-paths.js.map +1 -1
- package/dist/local-tools-terminal.d.ts +12 -3
- package/dist/local-tools-terminal.d.ts.map +1 -1
- package/dist/local-tools-terminal.js +113 -8
- package/dist/local-tools-terminal.js.map +1 -1
- package/dist/local-tools.d.ts.map +1 -1
- package/dist/local-tools.js +10 -4
- 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 +44 -9
- package/dist/private-threads-context.d.ts.map +1 -1
- package/dist/private-threads-context.js +115 -31
- package/dist/private-threads-context.js.map +1 -1
- 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 +72 -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 +62 -0
- package/dist/private-threads-messages.d.ts.map +1 -0
- package/dist/private-threads-messages.js +156 -0
- package/dist/private-threads-messages.js.map +1 -0
- package/dist/private-threads-models.d.ts +5 -7
- package/dist/private-threads-models.d.ts.map +1 -1
- package/dist/private-threads-models.js +40 -17
- 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 +35 -0
- package/dist/private-threads-progress.d.ts.map +1 -0
- package/dist/private-threads-progress.js +77 -0
- package/dist/private-threads-progress.js.map +1 -0
- package/dist/private-threads-protocol.d.ts +233 -38
- package/dist/private-threads-protocol.d.ts.map +1 -1
- package/dist/private-threads-protocol.js +73 -27
- 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 +186 -0
- package/dist/private-threads-schema.js.map +1 -0
- package/dist/private-threads-store.d.ts +112 -10
- package/dist/private-threads-store.d.ts.map +1 -1
- package/dist/private-threads-store.js +468 -62
- package/dist/private-threads-store.js.map +1 -1
- package/dist/private-threads-title.d.ts +12 -0
- package/dist/private-threads-title.d.ts.map +1 -0
- package/dist/private-threads-title.js +47 -0
- package/dist/private-threads-title.js.map +1 -0
- package/dist/private-threads-tools.d.ts +3 -0
- package/dist/private-threads-tools.d.ts.map +1 -1
- package/dist/private-threads-tools.js +73 -8
- 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 +54 -21
- package/dist/private-threads.d.ts.map +1 -1
- package/dist/private-threads.js +378 -200
- package/dist/private-threads.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
* - Cycles of up to 6 steps: even the longest repeats four times, and chance or a retry doesn't look like that.
|
|
11
|
+
*
|
|
12
|
+
* Only short fingerprints of the last 120 steps are kept, in memory and for one turn. After a pause, the person's
|
|
13
|
+
* message starts a new turn and a new window.
|
|
14
|
+
*/
|
|
15
|
+
export declare const STUCK_WINDOW_STEPS = 24;
|
|
16
|
+
export declare const STUCK_WAITING_WINDOW_STEPS = 120;
|
|
17
|
+
export declare const STUCK_MAX_CYCLE_STEPS = 6;
|
|
18
|
+
type StepContent = readonly {
|
|
19
|
+
type: string;
|
|
20
|
+
toolCallId?: string;
|
|
21
|
+
toolName?: string;
|
|
22
|
+
input?: unknown;
|
|
23
|
+
output?: unknown;
|
|
24
|
+
error?: unknown;
|
|
25
|
+
}[];
|
|
26
|
+
export declare class ProgressCheck {
|
|
27
|
+
private readonly recent;
|
|
28
|
+
/** Adds a finished step. Returns how many steps the run keeps repeating, or null while it makes progress. */
|
|
29
|
+
add(content: StepContent): number | null;
|
|
30
|
+
private repeats;
|
|
31
|
+
}
|
|
32
|
+
/** The thread's question when a run pauses. Any reply starts a new turn. */
|
|
33
|
+
export declare function stuckMessage(cycle: number): string;
|
|
34
|
+
export {};
|
|
35
|
+
//# 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":"AAEA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAA;AACpC,eAAO,MAAM,0BAA0B,MAAM,CAAA;AAC7C,eAAO,MAAM,qBAAqB,IAAI,CAAA;AAEtC,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;AAOD,4EAA4E;AAC5E,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIlD"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
/**
|
|
3
|
+
* Notices when a run repeats itself without getting anywhere, so the number of steps needs no limit. A step is its tool
|
|
4
|
+
* calls and their results. A run is stuck when its last `STUCK_WINDOW_STEPS` steps are one short cycle of identical
|
|
5
|
+
* calls with identical results. Any new input or result is progress, including a poll that returns something new,
|
|
6
|
+
* however long the run is.
|
|
7
|
+
*
|
|
8
|
+
* - 24 steps: a stuck run costs less than half the 60 steps every run was once limited to.
|
|
9
|
+
* - 120 steps when the cycle checks a terminal command that is still running. Waiting for a silent build isn't being
|
|
10
|
+
* stuck, but a command that hangs must not be checked forever. With the longest wait (10 seconds each), that is 20 minutes.
|
|
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 const STUCK_WINDOW_STEPS = 24;
|
|
17
|
+
export const STUCK_WAITING_WINDOW_STEPS = 120;
|
|
18
|
+
export const STUCK_MAX_CYCLE_STEPS = 6;
|
|
19
|
+
export class ProgressCheck {
|
|
20
|
+
recent = [];
|
|
21
|
+
/** Adds a finished step. Returns how many steps the run keeps repeating, or null while it makes progress. */
|
|
22
|
+
add(content) {
|
|
23
|
+
this.recent.push({ step: fingerprint(content), waiting: content.some(isRunningCommand) });
|
|
24
|
+
if (this.recent.length > STUCK_WAITING_WINDOW_STEPS)
|
|
25
|
+
this.recent.shift();
|
|
26
|
+
for (let cycle = 1; cycle <= STUCK_MAX_CYCLE_STEPS; cycle++) {
|
|
27
|
+
const waiting = this.recent.slice(-cycle).some(entry => entry.waiting);
|
|
28
|
+
if (this.repeats(cycle, waiting ? STUCK_WAITING_WINDOW_STEPS : STUCK_WINDOW_STEPS))
|
|
29
|
+
return cycle;
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
repeats(cycle, steps) {
|
|
34
|
+
const window = this.recent.slice(-steps);
|
|
35
|
+
return window.length === steps && window.every((entry, index) => index < cycle || entry.step === window[index - cycle].step);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** A look at a terminal command that hasn't ended. */
|
|
39
|
+
function isRunningCommand(part) {
|
|
40
|
+
return part.type === 'tool-result' && part.toolName === 'computer_terminal' && part.output?.running === true;
|
|
41
|
+
}
|
|
42
|
+
/** The thread's question when a run pauses. Any reply starts a new turn. */
|
|
43
|
+
export function stuckMessage(cycle) {
|
|
44
|
+
const repeated = cycle === 1 ? 'the same step' : `the same ${cycle} steps`;
|
|
45
|
+
return `I paused because I kept repeating ${repeated} and got the same results each time. Everything so far is saved. ` +
|
|
46
|
+
'Should I keep going? You can also tell me what to try instead.';
|
|
47
|
+
}
|
|
48
|
+
/** The same for the same calls and results, whatever order parallel calls or object keys come in. Call ids are new each time. */
|
|
49
|
+
function fingerprint(content) {
|
|
50
|
+
const results = new Map(content.flatMap(part => (part.type === 'tool-result' || part.type === 'tool-error') && part.toolCallId ? [[part.toolCallId, part]] : []));
|
|
51
|
+
const calls = content.filter(part => part.type === 'tool-call').map((call) => {
|
|
52
|
+
const result = results.get(call.toolCallId ?? '');
|
|
53
|
+
return stableJson([call.toolName, call.input, result?.type, result?.type === 'tool-error' ? errorText(result.error) : lasting(call.toolName, result?.output)]);
|
|
54
|
+
});
|
|
55
|
+
return createHash('sha256').update(stableJson(calls.sort())).digest('base64');
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A command's result without its start and end times. The host adds these itself, so they differ even when nothing else
|
|
59
|
+
* 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.
|
|
60
|
+
*/
|
|
61
|
+
function lasting(toolName, output) {
|
|
62
|
+
if (toolName !== 'computer_exec' || !output || typeof output !== 'object')
|
|
63
|
+
return output;
|
|
64
|
+
const { startedAt: _startedAt, endedAt: _endedAt, ...rest } = output;
|
|
65
|
+
void _startedAt;
|
|
66
|
+
void _endedAt;
|
|
67
|
+
return rest;
|
|
68
|
+
}
|
|
69
|
+
function errorText(error) {
|
|
70
|
+
return error instanceof Error ? error.message : String(error);
|
|
71
|
+
}
|
|
72
|
+
function stableJson(value) {
|
|
73
|
+
return JSON.stringify(value, (_key, entry) => entry && typeof entry === 'object' && !Array.isArray(entry)
|
|
74
|
+
? Object.fromEntries(Object.entries(entry).sort(([a], [b]) => a < b ? -1 : 1))
|
|
75
|
+
: entry) ?? '';
|
|
76
|
+
}
|
|
77
|
+
//# 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;AAExC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAA;AACpC,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAA;AAC7C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAA;AAItC,MAAM,OAAO,aAAa;IACP,MAAM,GAAyC,EAAE,CAAA;IAElE,6GAA6G;IAC7G,GAAG,CAAC,OAAoB;QACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAA;QACzF,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,0BAA0B;YAAE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACxE,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,qBAAqB,EAAE,KAAK,EAAE,EAAE,CAAC;YAC5D,MAAM,OAAO,G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,QAAQ,CAAA;IACb,OAAO,IAAI,CAAA;AACb,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC/D,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,KAAc,EAAE,EAAE,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAChH,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9E,CAAC,CAAC,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;
|
|
@@ -24,16 +29,13 @@ export type PrivateThread = PrivateThreadOwner & {
|
|
|
24
29
|
/** Providers called with the person's own API key. */
|
|
25
30
|
export declare const privateModelProviders: readonly ["anthropic", "openai", "google", "openrouter"];
|
|
26
31
|
export type PrivateModelProvider = (typeof privateModelProviders)[number];
|
|
27
|
-
/**
|
|
28
|
-
export
|
|
29
|
-
export type PrivatePlanProvider = (typeof privatePlanProviders)[number];
|
|
30
|
-
/** Every way a private thread can call a model: a key, a plan, or Overlay's metered models (`overlay`). */
|
|
31
|
-
export type PrivateModelSource = PrivateModelProvider | PrivatePlanProvider | 'overlay';
|
|
32
|
+
/** How a private thread calls a model: a key, or Overlay's relay (`overlay`): its models or the agent's connection. */
|
|
33
|
+
export type PrivateModelSource = PrivateModelProvider | 'overlay';
|
|
32
34
|
/** Model sources this host can run; Overlay Desktop reads them from the `ready` message. */
|
|
33
|
-
export declare const PRIVATE_MODEL_SOURCES: readonly ["key", "
|
|
35
|
+
export declare const PRIVATE_MODEL_SOURCES: readonly ["key", "overlay"];
|
|
34
36
|
/**
|
|
35
37
|
* How this turn calls its model. Secrets are read by Overlay Desktop for this run only and never stored by the host:
|
|
36
|
-
* a key from the Keychain,
|
|
38
|
+
* a key from the Keychain, or a short-lived token for Overlay's model relay.
|
|
37
39
|
*/
|
|
38
40
|
declare const turnModel: z.ZodUnion<readonly [z.ZodObject<{
|
|
39
41
|
provider: z.ZodEnum<{
|
|
@@ -44,23 +46,15 @@ declare const turnModel: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
44
46
|
}>;
|
|
45
47
|
modelId: z.ZodString;
|
|
46
48
|
apiKey: z.ZodString;
|
|
47
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
48
|
-
provider: z.ZodEnum<{
|
|
49
|
-
claude: "claude";
|
|
50
|
-
chatgpt: "chatgpt";
|
|
51
|
-
}>;
|
|
52
|
-
modelId: z.ZodString;
|
|
53
|
-
proxy: z.ZodObject<{
|
|
54
|
-
url: z.ZodString;
|
|
55
|
-
key: z.ZodString;
|
|
56
|
-
}, z.core.$strict>;
|
|
57
49
|
}, z.core.$strict>, z.ZodObject<{
|
|
58
50
|
provider: z.ZodLiteral<"overlay">;
|
|
59
51
|
modelId: z.ZodString;
|
|
60
52
|
relay: z.ZodObject<{
|
|
61
53
|
url: z.ZodString;
|
|
62
54
|
token: z.ZodString;
|
|
55
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
63
56
|
}, z.core.$strict>;
|
|
57
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
64
58
|
}, z.core.$strict>]>;
|
|
65
59
|
export type PrivateTurnModel = z.output<typeof turnModel>;
|
|
66
60
|
/**
|
|
@@ -76,12 +70,38 @@ export declare const localMcpServerSchema: z.ZodObject<{
|
|
|
76
70
|
cwd: z.ZodOptional<z.ZodString>;
|
|
77
71
|
}, z.core.$strict>;
|
|
78
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
|
+
}, z.core.$strict>]>;
|
|
97
|
+
export type PrivateTurnInput = z.output<typeof newInput>;
|
|
79
98
|
export declare const privateRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
80
99
|
method: z.ZodLiteral<"list">;
|
|
81
100
|
owner: z.ZodObject<{
|
|
82
101
|
userId: z.ZodString;
|
|
83
102
|
workspaceId: z.ZodString;
|
|
84
103
|
}, z.core.$strict>;
|
|
104
|
+
after: z.ZodOptional<z.ZodString>;
|
|
85
105
|
}, z.core.$strict>, z.ZodObject<{
|
|
86
106
|
method: z.ZodLiteral<"get">;
|
|
87
107
|
owner: z.ZodObject<{
|
|
@@ -89,6 +109,64 @@ export declare const privateRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
89
109
|
workspaceId: z.ZodString;
|
|
90
110
|
}, z.core.$strict>;
|
|
91
111
|
threadId: z.ZodString;
|
|
112
|
+
page: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
113
|
+
before: z.ZodString;
|
|
114
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
115
|
+
after: z.ZodString;
|
|
116
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
117
|
+
around: z.ZodString;
|
|
118
|
+
}, z.core.$strict>]>>;
|
|
119
|
+
whole: z.ZodOptional<z.ZodLiteral<true>>;
|
|
120
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
121
|
+
method: z.ZodLiteral<"pieces">;
|
|
122
|
+
owner: z.ZodObject<{
|
|
123
|
+
userId: z.ZodString;
|
|
124
|
+
workspaceId: z.ZodString;
|
|
125
|
+
}, z.core.$strict>;
|
|
126
|
+
threadId: z.ZodString;
|
|
127
|
+
messageId: z.ZodString;
|
|
128
|
+
revision: z.ZodNumber;
|
|
129
|
+
from: z.ZodUnion<readonly [z.ZodObject<{
|
|
130
|
+
before: z.ZodString;
|
|
131
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
132
|
+
after: z.ZodString;
|
|
133
|
+
}, z.core.$strict>]>;
|
|
134
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
135
|
+
method: z.ZodLiteral<"part">;
|
|
136
|
+
owner: z.ZodObject<{
|
|
137
|
+
userId: z.ZodString;
|
|
138
|
+
workspaceId: z.ZodString;
|
|
139
|
+
}, z.core.$strict>;
|
|
140
|
+
threadId: z.ZodString;
|
|
141
|
+
messageId: z.ZodString;
|
|
142
|
+
revision: z.ZodNumber;
|
|
143
|
+
part: z.ZodNumber;
|
|
144
|
+
from: z.ZodNumber;
|
|
145
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
146
|
+
method: z.ZodLiteral<"activity">;
|
|
147
|
+
owner: z.ZodObject<{
|
|
148
|
+
userId: z.ZodString;
|
|
149
|
+
workspaceId: z.ZodString;
|
|
150
|
+
}, z.core.$strict>;
|
|
151
|
+
threadId: z.ZodString;
|
|
152
|
+
before: z.ZodOptional<z.ZodString>;
|
|
153
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
154
|
+
method: z.ZodLiteral<"search">;
|
|
155
|
+
owner: z.ZodObject<{
|
|
156
|
+
userId: z.ZodString;
|
|
157
|
+
workspaceId: z.ZodString;
|
|
158
|
+
}, z.core.$strict>;
|
|
159
|
+
threadId: z.ZodString;
|
|
160
|
+
words: z.ZodString;
|
|
161
|
+
after: z.ZodOptional<z.ZodString>;
|
|
162
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
163
|
+
method: z.ZodLiteral<"edits">;
|
|
164
|
+
owner: z.ZodObject<{
|
|
165
|
+
userId: z.ZodString;
|
|
166
|
+
workspaceId: z.ZodString;
|
|
167
|
+
}, z.core.$strict>;
|
|
168
|
+
threadId: z.ZodString;
|
|
169
|
+
after: z.ZodOptional<z.ZodString>;
|
|
92
170
|
}, z.core.$strict>, z.ZodObject<{
|
|
93
171
|
method: z.ZodLiteral<"create">;
|
|
94
172
|
owner: z.ZodObject<{
|
|
@@ -108,7 +186,18 @@ export declare const privateRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
108
186
|
}, z.core.$strict>;
|
|
109
187
|
threadId: z.ZodString;
|
|
110
188
|
turnId: z.ZodString;
|
|
111
|
-
|
|
189
|
+
input: z.ZodUnion<readonly [z.ZodObject<{
|
|
190
|
+
message: z.ZodObject<{
|
|
191
|
+
id: z.ZodString;
|
|
192
|
+
text: z.ZodString;
|
|
193
|
+
}, z.core.$strict>;
|
|
194
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
195
|
+
approvals: z.ZodArray<z.ZodObject<{
|
|
196
|
+
id: z.ZodString;
|
|
197
|
+
approved: z.ZodBoolean;
|
|
198
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
199
|
+
}, z.core.$strict>>;
|
|
200
|
+
}, z.core.$strict>]>;
|
|
112
201
|
model: z.ZodUnion<readonly [z.ZodObject<{
|
|
113
202
|
provider: z.ZodEnum<{
|
|
114
203
|
anthropic: "anthropic";
|
|
@@ -118,23 +207,15 @@ export declare const privateRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
118
207
|
}>;
|
|
119
208
|
modelId: z.ZodString;
|
|
120
209
|
apiKey: z.ZodString;
|
|
121
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
122
|
-
provider: z.ZodEnum<{
|
|
123
|
-
claude: "claude";
|
|
124
|
-
chatgpt: "chatgpt";
|
|
125
|
-
}>;
|
|
126
|
-
modelId: z.ZodString;
|
|
127
|
-
proxy: z.ZodObject<{
|
|
128
|
-
url: z.ZodString;
|
|
129
|
-
key: z.ZodString;
|
|
130
|
-
}, z.core.$strict>;
|
|
131
210
|
}, z.core.$strict>, z.ZodObject<{
|
|
132
211
|
provider: z.ZodLiteral<"overlay">;
|
|
133
212
|
modelId: z.ZodString;
|
|
134
213
|
relay: z.ZodObject<{
|
|
135
214
|
url: z.ZodString;
|
|
136
215
|
token: z.ZodString;
|
|
216
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
137
217
|
}, z.core.$strict>;
|
|
218
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
138
219
|
}, z.core.$strict>]>;
|
|
139
220
|
agent: z.ZodObject<{
|
|
140
221
|
name: z.ZodString;
|
|
@@ -148,6 +229,7 @@ export declare const privateRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
148
229
|
overlay: z.ZodOptional<z.ZodObject<{
|
|
149
230
|
url: z.ZodString;
|
|
150
231
|
token: z.ZodString;
|
|
232
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
151
233
|
}, z.core.$strict>>;
|
|
152
234
|
localMcp: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
153
235
|
id: z.ZodString;
|
|
@@ -187,14 +269,8 @@ export declare const privateRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
187
269
|
openai: "openai";
|
|
188
270
|
google: "google";
|
|
189
271
|
openrouter: "openrouter";
|
|
190
|
-
claude: "claude";
|
|
191
|
-
chatgpt: "chatgpt";
|
|
192
272
|
}>;
|
|
193
|
-
apiKey: z.
|
|
194
|
-
proxy: z.ZodOptional<z.ZodObject<{
|
|
195
|
-
url: z.ZodString;
|
|
196
|
-
key: z.ZodString;
|
|
197
|
-
}, z.core.$strict>>;
|
|
273
|
+
apiKey: z.ZodString;
|
|
198
274
|
}, z.core.$strict>, z.ZodObject<{
|
|
199
275
|
method: z.ZodLiteral<"mcpCheck">;
|
|
200
276
|
server: z.ZodObject<{
|
|
@@ -211,16 +287,110 @@ export declare const privateRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
211
287
|
}, z.core.$strict>], "method">;
|
|
212
288
|
export type PrivateRequest = z.input<typeof privateRequestSchema>;
|
|
213
289
|
export type ParsedPrivateRequest = z.output<typeof privateRequestSchema>;
|
|
290
|
+
/** Oldest message first. `older` and `newer` are the ids to ask for pages `before` and `after`, or null at that end. */
|
|
291
|
+
export type PrivateMessagePage = {
|
|
292
|
+
messages: PrivateUIMessage[];
|
|
293
|
+
older: string | null;
|
|
294
|
+
newer: string | null;
|
|
295
|
+
/** Messages in this page that were too large to send whole. Their `parts` are only the pieces listed here, in order. */
|
|
296
|
+
shortened: PrivateShortened[];
|
|
297
|
+
};
|
|
298
|
+
/** A whole part, a slice of a long text part (`slice` counts them), or a placeholder for another large part (`large`). */
|
|
299
|
+
export type PrivateMessagePiece = {
|
|
300
|
+
/** The part's place in the message. */
|
|
301
|
+
part: number;
|
|
302
|
+
slice?: number;
|
|
303
|
+
large?: true;
|
|
304
|
+
/** The size of what this piece stands for. */
|
|
305
|
+
bytes: number;
|
|
306
|
+
value: PrivateUIMessage['parts'][number];
|
|
307
|
+
};
|
|
308
|
+
/** Places to continue from, or null at that end of the message. */
|
|
309
|
+
export type PrivateMessagePieces = {
|
|
310
|
+
pieces: PrivateMessagePiece[];
|
|
311
|
+
older: string | null;
|
|
312
|
+
newer: string | null;
|
|
313
|
+
};
|
|
314
|
+
export type PrivateShortened = Omit<PrivateMessagePieces, 'pieces'> & {
|
|
315
|
+
messageId: string;
|
|
316
|
+
/** Send back with every request for more. It changes when the message does. */
|
|
317
|
+
revision: number;
|
|
318
|
+
/** The size of the whole message. */
|
|
319
|
+
bytes: number;
|
|
320
|
+
pieces: Omit<PrivateMessagePiece, 'value'>[];
|
|
321
|
+
};
|
|
322
|
+
/** Some of a large part's JSON. `next` is where to continue, or null at its end. */
|
|
323
|
+
export type PrivatePartSlice = {
|
|
324
|
+
json: string;
|
|
325
|
+
next: number | null;
|
|
326
|
+
};
|
|
327
|
+
export type PrivateToolCall = {
|
|
328
|
+
messageId: string;
|
|
329
|
+
toolCallId: string;
|
|
330
|
+
name: string;
|
|
331
|
+
/** The AI SDK's tool part state. */
|
|
332
|
+
state: string;
|
|
333
|
+
input?: unknown;
|
|
334
|
+
/** Without the images tools return. */
|
|
335
|
+
output?: unknown;
|
|
336
|
+
};
|
|
337
|
+
export type PrivateActivity = {
|
|
338
|
+
plan: {
|
|
339
|
+
steps: {
|
|
340
|
+
id: string;
|
|
341
|
+
title: string;
|
|
342
|
+
status: string;
|
|
343
|
+
}[];
|
|
344
|
+
phase: 'active' | 'waiting' | 'ended';
|
|
345
|
+
} | null;
|
|
346
|
+
/** For the whole thread, not just this page. */
|
|
347
|
+
totals: {
|
|
348
|
+
calls: number;
|
|
349
|
+
files: number;
|
|
350
|
+
added: number;
|
|
351
|
+
removed: number;
|
|
352
|
+
};
|
|
353
|
+
/** Oldest first. `older` continues before them. */
|
|
354
|
+
calls: PrivateToolCall[];
|
|
355
|
+
older: string | null;
|
|
356
|
+
};
|
|
357
|
+
export type PrivateEditPage = {
|
|
358
|
+
edits: {
|
|
359
|
+
path: string;
|
|
360
|
+
added: number;
|
|
361
|
+
removed: number;
|
|
362
|
+
}[];
|
|
363
|
+
next: string | null;
|
|
364
|
+
};
|
|
365
|
+
export type PrivateMessageSearch = {
|
|
366
|
+
/** Newest message first. `number` counts messages from 1. */
|
|
367
|
+
results: {
|
|
368
|
+
messageId: string;
|
|
369
|
+
number: number;
|
|
370
|
+
from: 'person' | 'agent';
|
|
371
|
+
excerpt: string;
|
|
372
|
+
}[];
|
|
373
|
+
/** Send back as `after` for older results. */
|
|
374
|
+
next: string | null;
|
|
375
|
+
/** False while older messages are still being indexed. `next` then continues with them, even after a page without results. */
|
|
376
|
+
complete: boolean;
|
|
377
|
+
};
|
|
214
378
|
export type PrivateResults = {
|
|
215
379
|
list: {
|
|
216
380
|
threads: PrivateThread[];
|
|
217
381
|
running: string[];
|
|
382
|
+
next: string | null;
|
|
218
383
|
};
|
|
219
384
|
get: {
|
|
220
385
|
thread: PrivateThread;
|
|
221
|
-
messages: PrivateUIMessage[];
|
|
222
386
|
running: boolean;
|
|
223
|
-
};
|
|
387
|
+
} & PrivateMessagePage;
|
|
388
|
+
/** Null when the message changed or is gone: read its page again. */
|
|
389
|
+
pieces: PrivateMessagePieces | null;
|
|
390
|
+
part: PrivatePartSlice | null;
|
|
391
|
+
activity: PrivateActivity;
|
|
392
|
+
edits: PrivateEditPage;
|
|
393
|
+
search: PrivateMessageSearch;
|
|
224
394
|
create: {
|
|
225
395
|
thread: PrivateThread;
|
|
226
396
|
};
|
|
@@ -267,11 +437,28 @@ export type PrivateEvent = {
|
|
|
267
437
|
} | {
|
|
268
438
|
kind: 'threads';
|
|
269
439
|
owner: PrivateThreadOwner;
|
|
440
|
+
deletedThreadId?: string;
|
|
270
441
|
};
|
|
442
|
+
/** Which of the turn's tokens the host asks Overlay Desktop to renew. The desktop app knows whom the turn belongs to. */
|
|
443
|
+
export type PrivateAccessKind = 'model' | 'tools';
|
|
271
444
|
export type PrivateIpcInbound = {
|
|
272
445
|
type: 'request';
|
|
273
446
|
id: number;
|
|
274
447
|
request: PrivateRequest;
|
|
448
|
+
} | {
|
|
449
|
+
type: 'renewed';
|
|
450
|
+
id: number;
|
|
451
|
+
ok: true;
|
|
452
|
+
token: string;
|
|
453
|
+
expiresAt: number;
|
|
454
|
+
}
|
|
455
|
+
/** `refused`: Overlay said no, which ends the turn. Otherwise it couldn't be asked. */
|
|
456
|
+
| {
|
|
457
|
+
type: 'renewed';
|
|
458
|
+
id: number;
|
|
459
|
+
ok: false;
|
|
460
|
+
refused: boolean;
|
|
461
|
+
error: string;
|
|
275
462
|
};
|
|
276
463
|
export type PrivateIpcOutbound = {
|
|
277
464
|
type: 'ready';
|
|
@@ -291,6 +478,14 @@ export type PrivateIpcOutbound = {
|
|
|
291
478
|
} | {
|
|
292
479
|
type: 'event';
|
|
293
480
|
event: PrivateEvent;
|
|
481
|
+
} | {
|
|
482
|
+
type: 'renew';
|
|
483
|
+
id: number;
|
|
484
|
+
turnId: string;
|
|
485
|
+
kind: PrivateAccessKind;
|
|
486
|
+
} | {
|
|
487
|
+
type: 'cancelRenew';
|
|
488
|
+
id: number;
|
|
294
489
|
};
|
|
295
490
|
export {};
|
|
296
491
|
//# 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,G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