@opengeni/runtime 3.2.2 → 3.4.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/agent-LJT5NPWT.js +9 -0
- package/dist/assets/codemode-client.json +1 -1
- package/dist/browser-current-tab.d.ts +46 -0
- package/dist/browser-model-text.d.ts +126 -0
- package/dist/{chunk-2AUDDDO2.js → chunk-3DFH3ZHU.js} +784 -121
- package/dist/chunk-3DFH3ZHU.js.map +1 -0
- package/dist/{chunk-HJSIPTFA.js → chunk-4XDJ4TJA.js} +2 -2
- package/dist/{chunk-XQ23VCZ4.js → chunk-6FQ6KEII.js} +3 -3
- package/dist/{chunk-7LJ7KDPI.js → chunk-ERD4ICVB.js} +4 -3
- package/dist/{chunk-462CH77G.js → chunk-ETTCGPBT.js} +400 -9
- package/dist/chunk-ETTCGPBT.js.map +1 -0
- package/dist/{chunk-7OUG7WBV.js → chunk-GWRBALGQ.js} +181 -13
- package/dist/chunk-GWRBALGQ.js.map +1 -0
- package/dist/{chunk-YG26XE7B.js → chunk-JYDG2A7H.js} +2 -2
- package/dist/{chunk-RSHQSLEJ.js → chunk-KIL4FGX5.js} +3 -3
- package/dist/{chunk-NWS4HPB7.js → chunk-MIAL5I4O.js} +2 -2
- package/dist/{chunk-Z5U6WE22.js → chunk-PRZPGRIK.js} +2 -2
- package/dist/{chunk-KCPW4K7L.js → chunk-PZQUUBEB.js} +2 -2
- package/dist/{chunk-5WJOPANS.js → chunk-Y5THZH5N.js} +7 -7
- package/dist/codex-tool-search.d.ts +9 -0
- package/dist/gmail-rest-mcp.js +8 -8
- package/dist/index.d.ts +3 -0
- package/dist/index.js +14 -12
- package/dist/interaction-tool-json-schema.d.ts +27 -0
- package/dist/{lazy-manifest-AJ6XPJ4F.js → lazy-manifest-BLZ3UZLX.js} +4 -4
- package/dist/lazy-tool-transport.d.ts +10 -0
- package/dist/{localSources-SSIEH5F5.js → localSources-I6SIQ6CX.js} +6 -6
- package/dist/model-call.js +3 -3
- package/dist/sandbox/browser-control-client.d.ts +87 -0
- package/dist/sandbox/browser-control-http.d.ts +33 -0
- package/dist/sandbox/index.d.ts +1 -1
- package/dist/sandbox/index.js +7 -7
- package/dist/sandbox/routing/backend-resolver.d.ts +1 -0
- package/dist/sandbox/selfhosted/session.d.ts +22 -0
- package/dist/slack-rest-mcp.js +8 -8
- package/dist/workspace-tool-gateway.js +12 -12
- package/package.json +14 -14
- package/src/browser-current-tab.ts +139 -0
- package/src/browser-model-text.ts +378 -0
- package/src/bundled_site_skills/opengeni-sites/SKILL.md +46 -12
- package/src/codex-tool-search.ts +53 -0
- package/src/index.ts +39 -1
- package/src/interaction-tool-json-schema.ts +281 -0
- package/src/interaction-tools.ts +425 -235
- package/src/lazy-tool-transport.ts +229 -10
- package/src/model-input.ts +12 -1
- package/src/sandbox/browser-control-client.ts +425 -0
- package/src/sandbox/browser-control-http.ts +32 -0
- package/src/sandbox/index.ts +4 -0
- package/src/sandbox/routing/backend-resolver.ts +2 -0
- package/src/sandbox/selfhosted/session.ts +154 -0
- package/dist/agent-CTPLA3HP.js +0 -9
- package/dist/browser-action-json-schema.d.ts +0 -4
- package/dist/chunk-2AUDDDO2.js.map +0 -1
- package/dist/chunk-462CH77G.js.map +0 -1
- package/dist/chunk-7OUG7WBV.js.map +0 -1
- package/src/browser-action-json-schema.ts +0 -10
- /package/dist/{agent-CTPLA3HP.js.map → agent-LJT5NPWT.js.map} +0 -0
- /package/dist/{chunk-HJSIPTFA.js.map → chunk-4XDJ4TJA.js.map} +0 -0
- /package/dist/{chunk-XQ23VCZ4.js.map → chunk-6FQ6KEII.js.map} +0 -0
- /package/dist/{chunk-7LJ7KDPI.js.map → chunk-ERD4ICVB.js.map} +0 -0
- /package/dist/{chunk-YG26XE7B.js.map → chunk-JYDG2A7H.js.map} +0 -0
- /package/dist/{chunk-RSHQSLEJ.js.map → chunk-KIL4FGX5.js.map} +0 -0
- /package/dist/{chunk-NWS4HPB7.js.map → chunk-MIAL5I4O.js.map} +0 -0
- /package/dist/{chunk-Z5U6WE22.js.map → chunk-PRZPGRIK.js.map} +0 -0
- /package/dist/{chunk-KCPW4K7L.js.map → chunk-PZQUUBEB.js.map} +0 -0
- /package/dist/{chunk-5WJOPANS.js.map → chunk-Y5THZH5N.js.map} +0 -0
- /package/dist/{lazy-manifest-AJ6XPJ4F.js.map → lazy-manifest-BLZ3UZLX.js.map} +0 -0
- /package/dist/{localSources-SSIEH5F5.js.map → localSources-I6SIQ6CX.js.map} +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare class BrowserTargetResolutionError extends Error {
|
|
2
|
+
readonly code: "browser_session_required" | "browser_target_required";
|
|
3
|
+
constructor(code: "browser_session_required" | "browser_target_required", message: string);
|
|
4
|
+
}
|
|
5
|
+
export type CurrentBrowserTabDeps = {
|
|
6
|
+
/** This agent session's live BrowserSessions. */
|
|
7
|
+
listLiveSessions: () => Promise<ReadonlyArray<{
|
|
8
|
+
id: string;
|
|
9
|
+
lastUsedAt: string;
|
|
10
|
+
}>>;
|
|
11
|
+
/** The tabs of one BrowserSession. */
|
|
12
|
+
listTargets: (browserSessionId: string) => Promise<ReadonlyArray<{
|
|
13
|
+
id: string;
|
|
14
|
+
kind: string;
|
|
15
|
+
selected: boolean;
|
|
16
|
+
}>>;
|
|
17
|
+
};
|
|
18
|
+
export type ResolvedBrowserSession = {
|
|
19
|
+
browserSessionId: string;
|
|
20
|
+
/** True when the identifier came from memory or lookup, not the caller. */
|
|
21
|
+
implicit: boolean;
|
|
22
|
+
};
|
|
23
|
+
export type ResolvedBrowserTarget = ResolvedBrowserSession & {
|
|
24
|
+
targetId: string;
|
|
25
|
+
implicitTarget: boolean;
|
|
26
|
+
};
|
|
27
|
+
export declare class CurrentBrowserTab {
|
|
28
|
+
private readonly deps;
|
|
29
|
+
private current;
|
|
30
|
+
constructor(deps: CurrentBrowserTabDeps);
|
|
31
|
+
/** Record the session and, when known, the tab a successful call used. */
|
|
32
|
+
use(browserSessionId: string, targetId?: string | null): void;
|
|
33
|
+
forgetTarget(browserSessionId: string, targetId: string): void;
|
|
34
|
+
forgetSession(browserSessionId: string): void;
|
|
35
|
+
/** A call that relied on remembered identifiers failed: resolve afresh next time. */
|
|
36
|
+
failed(resolved: ResolvedBrowserSession & {
|
|
37
|
+
implicitTarget?: boolean;
|
|
38
|
+
}): void;
|
|
39
|
+
session(browserSessionId: string | undefined): Promise<ResolvedBrowserSession>;
|
|
40
|
+
target(value: {
|
|
41
|
+
browserSessionId?: string | undefined;
|
|
42
|
+
targetId?: string | undefined;
|
|
43
|
+
}): Promise<ResolvedBrowserTarget>;
|
|
44
|
+
}
|
|
45
|
+
/** An element ref passed where a locator is expected, as a bare string. */
|
|
46
|
+
export declare function expandRefShorthand(action: unknown): unknown;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The model's text view of browser tool results.
|
|
3
|
+
*
|
|
4
|
+
* A browser tool result keeps its complete typed value in `structuredContent`
|
|
5
|
+
* for Code Mode, the API and the UI. What the model reads is this text: an
|
|
6
|
+
* outline with one line per page element, in the role/name vocabulary that
|
|
7
|
+
* locators use. It repeats no envelope keys, quoting or bookkeeping ids the
|
|
8
|
+
* model never sends back, which makes a page view about half the tokens of
|
|
9
|
+
* the same value as JSON.
|
|
10
|
+
*/
|
|
11
|
+
export type BrowserTextNode = {
|
|
12
|
+
ref: string;
|
|
13
|
+
role: string;
|
|
14
|
+
depth: number;
|
|
15
|
+
name?: string | undefined;
|
|
16
|
+
description?: string | undefined;
|
|
17
|
+
value?: string | {
|
|
18
|
+
redacted: true;
|
|
19
|
+
reason: string;
|
|
20
|
+
} | undefined;
|
|
21
|
+
states?: readonly string[] | undefined;
|
|
22
|
+
actions?: readonly string[] | undefined;
|
|
23
|
+
};
|
|
24
|
+
export type BrowserTextTarget = {
|
|
25
|
+
id: string;
|
|
26
|
+
kind: string;
|
|
27
|
+
title: string;
|
|
28
|
+
url: string;
|
|
29
|
+
selected?: boolean | undefined;
|
|
30
|
+
};
|
|
31
|
+
export type BrowserTextObservation = {
|
|
32
|
+
target: BrowserTextTarget;
|
|
33
|
+
viewport?: {
|
|
34
|
+
width: number;
|
|
35
|
+
height: number;
|
|
36
|
+
deviceScaleFactor?: number | undefined;
|
|
37
|
+
maxTouchPoints?: number | undefined;
|
|
38
|
+
} | null | undefined;
|
|
39
|
+
focusedRef?: string | null | undefined;
|
|
40
|
+
changedRegions?: readonly unknown[] | undefined;
|
|
41
|
+
diagnostics?: {
|
|
42
|
+
consoleErrorCount: number;
|
|
43
|
+
failedRequestCount: number;
|
|
44
|
+
downloadCount: number;
|
|
45
|
+
pageErrorCount: number;
|
|
46
|
+
} | null | undefined;
|
|
47
|
+
dialog?: {
|
|
48
|
+
type: string;
|
|
49
|
+
message: string;
|
|
50
|
+
defaultPrompt?: string | undefined;
|
|
51
|
+
} | null | undefined;
|
|
52
|
+
screenshot?: unknown;
|
|
53
|
+
agentView: {
|
|
54
|
+
sourceKind: string;
|
|
55
|
+
nodes: readonly BrowserTextNode[];
|
|
56
|
+
omittedNodeCount?: number | undefined;
|
|
57
|
+
removedRefCount?: number | undefined;
|
|
58
|
+
clippedFieldCount?: number | undefined;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export declare function browserNodeLine(node: BrowserTextNode, allRefs: boolean, baseDepth?: number): string;
|
|
62
|
+
export declare function browserTargetLine(target: BrowserTextTarget): string;
|
|
63
|
+
export declare function browserObservationText(observation: BrowserTextObservation, options?: {
|
|
64
|
+
allRefs?: boolean;
|
|
65
|
+
}): string;
|
|
66
|
+
export type BrowserTextResolvedTarget = {
|
|
67
|
+
actionIndex: number;
|
|
68
|
+
ref: string | null;
|
|
69
|
+
role: string;
|
|
70
|
+
name: string | null;
|
|
71
|
+
container: {
|
|
72
|
+
role: string;
|
|
73
|
+
name: string | null;
|
|
74
|
+
} | null;
|
|
75
|
+
};
|
|
76
|
+
export declare function browserActionText(receipt: {
|
|
77
|
+
targetId: string;
|
|
78
|
+
state: string;
|
|
79
|
+
error?: ({
|
|
80
|
+
code: string;
|
|
81
|
+
message: string;
|
|
82
|
+
retryable: boolean;
|
|
83
|
+
} & Record<string, unknown>) | null | undefined;
|
|
84
|
+
targets?: readonly BrowserTextResolvedTarget[] | undefined;
|
|
85
|
+
observation?: BrowserTextObservation | null | undefined;
|
|
86
|
+
allRefs?: boolean | undefined;
|
|
87
|
+
}): string;
|
|
88
|
+
export declare function browserSessionLine(session: {
|
|
89
|
+
id: string;
|
|
90
|
+
lifecycle: string;
|
|
91
|
+
placement: {
|
|
92
|
+
kind: string;
|
|
93
|
+
};
|
|
94
|
+
engine?: string | null | undefined;
|
|
95
|
+
headless?: boolean | null | undefined;
|
|
96
|
+
identityId?: string | null | undefined;
|
|
97
|
+
failureCode?: string | null | undefined;
|
|
98
|
+
}): string;
|
|
99
|
+
type AttachedProfileText = {
|
|
100
|
+
id: string;
|
|
101
|
+
name: string;
|
|
102
|
+
profileLabel?: string | undefined;
|
|
103
|
+
};
|
|
104
|
+
export declare function browserOpenText(output: {
|
|
105
|
+
session: Parameters<typeof browserSessionLine>[0];
|
|
106
|
+
targets: readonly BrowserTextTarget[];
|
|
107
|
+
otherTabCount?: number | undefined;
|
|
108
|
+
observation?: BrowserTextObservation | undefined;
|
|
109
|
+
attachedProfile?: AttachedProfileText | undefined;
|
|
110
|
+
otherAttachedProfiles?: readonly AttachedProfileText[] | undefined;
|
|
111
|
+
}): string;
|
|
112
|
+
export declare function browserTabsText(output: {
|
|
113
|
+
browserSessionId: string;
|
|
114
|
+
targets: readonly BrowserTextTarget[];
|
|
115
|
+
mutationObservation?: BrowserTextObservation | undefined;
|
|
116
|
+
}): string;
|
|
117
|
+
export declare function browserReadText(output: {
|
|
118
|
+
targetId: string;
|
|
119
|
+
mode: string;
|
|
120
|
+
scopeFound: boolean;
|
|
121
|
+
nodes: readonly BrowserTextNode[];
|
|
122
|
+
totalMatches: number;
|
|
123
|
+
omittedMatches: number;
|
|
124
|
+
clippedFieldCount: number;
|
|
125
|
+
}): string;
|
|
126
|
+
export {};
|