lua-cli 3.47.0 → 3.49.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/api-exports.d.ts +968 -106
- package/dist/api-exports.js +3696 -1525
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +7949 -3800
- package/dist/index.js.map +1 -1
- package/dist/voice/test/index.d.ts +94 -94
- package/dist/voice-exports.d.ts +1 -1
- package/dist/voice-exports.js.map +1 -1
- package/dist/workflow-builder.d.ts +8 -1
- package/dist/workflow-builder.js +3181 -1479
- package/dist/workflow-builder.js.map +1 -1
- package/docs/CLI_REFERENCE.md +80 -1
- package/docs/README.md +3 -3
- package/docs/api/Decisions.md +276 -0
- package/docs/api/Jobs.md +16 -0
- package/docs/api/LuaDecision.md +127 -0
- package/docs/api/LuaWorkflow.md +1 -1
- package/docs/api/User.md +1 -1
- package/docs/api/Workflows.md +12 -0
- package/docs/workflows/schedules.md +1 -1
- package/package.json +4 -4
- package/template/package.json +1 -1
package/dist/api-exports.d.ts
CHANGED
|
@@ -199,6 +199,9 @@ declare interface AgentInvocationEffects {
|
|
|
199
199
|
/** Set once per run when the agent reported it could not finish. Trusted
|
|
200
200
|
* side channel: the run's own account of why, not a regex over its prose. */
|
|
201
201
|
blocker?: TaskRunBlocker;
|
|
202
|
+
/** BAC-1974: set when an unattended task run reported it had nothing to tell
|
|
203
|
+
* the user. Same vocabulary as a workflow's declared `neutral` outcome (BAC-1949). */
|
|
204
|
+
declaredOutcome?: 'neutral';
|
|
202
205
|
}
|
|
203
206
|
|
|
204
207
|
export declare interface AgentInvocationInput {
|
|
@@ -374,6 +377,8 @@ declare interface AgentInvocationMeter {
|
|
|
374
377
|
* to force the heavy tier (`hasDocProcessingTool`), so the workflow price must see them too.
|
|
375
378
|
*/
|
|
376
379
|
toolNames?: string[];
|
|
380
|
+
/** The per-step prompt components the usage event's `contextSteps` carries — the prompt-size tier reads them. */
|
|
381
|
+
contextSteps?: LlmContextStep[];
|
|
377
382
|
byok?: boolean;
|
|
378
383
|
chargedCredits?: boolean;
|
|
379
384
|
/**
|
|
@@ -386,6 +391,11 @@ declare interface AgentInvocationMeter {
|
|
|
386
391
|
* that advertises no reasoning) — a non-effort turn's meter is byte-identical to today's.
|
|
387
392
|
*/
|
|
388
393
|
effortApplied?: ReasoningEffort;
|
|
394
|
+
/**
|
|
395
|
+
* BAC-1976 — how many model steps the turn ran (`fullOutput.steps.length`), so the workflow worker can tell a
|
|
396
|
+
* step that hit the agent step cap from a clean finish. Server-owned like `effortApplied`; absent when unknown.
|
|
397
|
+
*/
|
|
398
|
+
modelSteps?: number;
|
|
389
399
|
}
|
|
390
400
|
|
|
391
401
|
declare interface AgentInvocationOutput {
|
|
@@ -1933,23 +1943,542 @@ export declare interface BatchingConfig {
|
|
|
1933
1943
|
serializeProcessing?: boolean;
|
|
1934
1944
|
}
|
|
1935
1945
|
|
|
1946
|
+
export declare const Browser: BrowserApi;
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* The full command surface (mirrors the desktop bridge's registry). Grouped the
|
|
1950
|
+
* way the agent-browser CLI groups them so the surface is complete without
|
|
1951
|
+
* 50+ near-duplicate names.
|
|
1952
|
+
*/
|
|
1953
|
+
declare const BROWSER_COMMANDS: readonly [{
|
|
1954
|
+
readonly name: "health";
|
|
1955
|
+
readonly description: "Check the local browser engine is installed and responsive.";
|
|
1956
|
+
}, {
|
|
1957
|
+
readonly name: "session_open";
|
|
1958
|
+
readonly description: "Open/attach a browser session (its own cookies/auth). Args: url?, headed?, profile?, confirmActions?. Only use the browser when the user explicitly asked for it, or said yes when you asked.";
|
|
1959
|
+
}, {
|
|
1960
|
+
readonly name: "navigate";
|
|
1961
|
+
readonly description: "Navigate the session to a URL. Args: url, waitUntil?. Only use the browser when the user explicitly asked for it, or said yes when you asked.";
|
|
1962
|
+
}, {
|
|
1963
|
+
readonly name: "back";
|
|
1964
|
+
readonly description: "Go back in history.";
|
|
1965
|
+
}, {
|
|
1966
|
+
readonly name: "forward";
|
|
1967
|
+
readonly description: "Go forward in history.";
|
|
1968
|
+
}, {
|
|
1969
|
+
readonly name: "reload";
|
|
1970
|
+
readonly description: "Reload the current page.";
|
|
1971
|
+
}, {
|
|
1972
|
+
readonly name: "pushstate";
|
|
1973
|
+
readonly description: "SPA client-side navigation. Args: url.";
|
|
1974
|
+
}, {
|
|
1975
|
+
readonly name: "close";
|
|
1976
|
+
readonly description: "Close the session’s browser.";
|
|
1977
|
+
}, {
|
|
1978
|
+
readonly name: "read";
|
|
1979
|
+
readonly description: "Read one page in a fresh session that is closed afterwards: open the URL, wait, return its title and content. Args: url, waitFor?(load|networkidle|selector), selector?, format?(text|html|markdown), timeoutMs?.";
|
|
1980
|
+
}, {
|
|
1981
|
+
readonly name: "snapshot";
|
|
1982
|
+
readonly description: "Accessibility-tree snapshot with element refs (@e1…) — see what to click/fill. Args: interactiveOnly?, selector?, urls?, compact?, depth?.";
|
|
1983
|
+
}, {
|
|
1984
|
+
readonly name: "get";
|
|
1985
|
+
readonly description: "Read from the page. Args: what(text|html|value|attr|title|url|count|box|styles), selector?, attr?.";
|
|
1986
|
+
}, {
|
|
1987
|
+
readonly name: "is";
|
|
1988
|
+
readonly description: "Check element state. Args: check(visible|enabled|checked), selector.";
|
|
1989
|
+
}, {
|
|
1990
|
+
readonly name: "click";
|
|
1991
|
+
readonly description: "Click an element. Args: selector(@eN or CSS), newTab?.";
|
|
1992
|
+
}, {
|
|
1993
|
+
readonly name: "dblclick";
|
|
1994
|
+
readonly description: "Double-click an element. Args: selector.";
|
|
1995
|
+
}, {
|
|
1996
|
+
readonly name: "fill";
|
|
1997
|
+
readonly description: "Clear and fill a field. Args: selector, text.";
|
|
1998
|
+
}, {
|
|
1999
|
+
readonly name: "type";
|
|
2000
|
+
readonly description: "Type into an element. Args: selector, text.";
|
|
2001
|
+
}, {
|
|
2002
|
+
readonly name: "press";
|
|
2003
|
+
readonly description: "Press a key/chord (Enter, Control+a). Args: key.";
|
|
2004
|
+
}, {
|
|
2005
|
+
readonly name: "hover";
|
|
2006
|
+
readonly description: "Hover an element. Args: selector.";
|
|
2007
|
+
}, {
|
|
2008
|
+
readonly name: "focus";
|
|
2009
|
+
readonly description: "Focus an element. Args: selector.";
|
|
2010
|
+
}, {
|
|
2011
|
+
readonly name: "select";
|
|
2012
|
+
readonly description: "Select a dropdown option. Args: selector, value.";
|
|
2013
|
+
}, {
|
|
2014
|
+
readonly name: "check";
|
|
2015
|
+
readonly description: "Check a checkbox. Args: selector.";
|
|
2016
|
+
}, {
|
|
2017
|
+
readonly name: "uncheck";
|
|
2018
|
+
readonly description: "Uncheck a checkbox. Args: selector.";
|
|
2019
|
+
}, {
|
|
2020
|
+
readonly name: "scroll";
|
|
2021
|
+
readonly description: "Scroll. Args: direction(up|down|left|right), px?, selector?.";
|
|
2022
|
+
}, {
|
|
2023
|
+
readonly name: "scrollintoview";
|
|
2024
|
+
readonly description: "Scroll an element into view. Args: selector.";
|
|
2025
|
+
}, {
|
|
2026
|
+
readonly name: "drag";
|
|
2027
|
+
readonly description: "Drag and drop. Args: source, target.";
|
|
2028
|
+
}, {
|
|
2029
|
+
readonly name: "upload";
|
|
2030
|
+
readonly description: "Upload local file(s) to a file input. Args: selector, files[].";
|
|
2031
|
+
}, {
|
|
2032
|
+
readonly name: "find";
|
|
2033
|
+
readonly description: "Act by semantic locator. Args: by(role|text|label|placeholder|alt|title|testid), query, action(click|fill|type|hover|focus|check|uncheck|text), value?, name?, exact?.";
|
|
2034
|
+
}, {
|
|
2035
|
+
readonly name: "act";
|
|
2036
|
+
readonly description: "Act on the page: ref+action (deterministic) or natural-language instruction (engine AI). Args: ref?, action?, value?, instruction?.";
|
|
2037
|
+
}, {
|
|
2038
|
+
readonly name: "extract";
|
|
2039
|
+
readonly description: "Extract data by natural-language instruction (engine AI). Args: instruction.";
|
|
2040
|
+
}, {
|
|
2041
|
+
readonly name: "wait";
|
|
2042
|
+
readonly description: "Wait for a condition. Provide one of: selector(+state), ms, text, url, load, fn.";
|
|
2043
|
+
}, {
|
|
2044
|
+
readonly name: "tab";
|
|
2045
|
+
readonly description: "Manage tabs. Args: action(list|new|switch|close), target?, url?, label?.";
|
|
2046
|
+
}, {
|
|
2047
|
+
readonly name: "window_new";
|
|
2048
|
+
readonly description: "Open a new browser window. Args: url?.";
|
|
2049
|
+
}, {
|
|
2050
|
+
readonly name: "frame";
|
|
2051
|
+
readonly description: "Switch frame context. Args: target(@eN | CSS | \"main\").";
|
|
2052
|
+
}, {
|
|
2053
|
+
readonly name: "screenshot";
|
|
2054
|
+
readonly description: "Screenshot the page. Args: fullPage?, path?.";
|
|
2055
|
+
}, {
|
|
2056
|
+
readonly name: "pdf";
|
|
2057
|
+
readonly description: "Save the page as PDF. Args: path.";
|
|
2058
|
+
}, {
|
|
2059
|
+
readonly name: "cookies";
|
|
2060
|
+
readonly description: "Manage cookies. Args: action(get|set|clear), name?, value?.";
|
|
2061
|
+
}, {
|
|
2062
|
+
readonly name: "storage";
|
|
2063
|
+
readonly description: "Manage web storage. Args: area(local|session), action(get|set|clear), key?, value?.";
|
|
2064
|
+
}, {
|
|
2065
|
+
readonly name: "set";
|
|
2066
|
+
readonly description: "Configure the browser. Args: setting(viewport|device|geo|headers|credentials|media), args[].";
|
|
2067
|
+
}, {
|
|
2068
|
+
readonly name: "download";
|
|
2069
|
+
readonly description: "Download a file (click a selector to trigger, or wait for one). Args: selector?, path?.";
|
|
2070
|
+
}, {
|
|
2071
|
+
readonly name: "clipboard";
|
|
2072
|
+
readonly description: "Clipboard. Args: action(read|write|copy|paste), text?.";
|
|
2073
|
+
}, {
|
|
2074
|
+
readonly name: "auth";
|
|
2075
|
+
readonly description: "Use a saved login profile. Args: action(login|list|show), name?. (Credentials are saved via the desktop, never the agent.)";
|
|
2076
|
+
}, {
|
|
2077
|
+
readonly name: "confirm";
|
|
2078
|
+
readonly description: "Approve a pending confirmation_required action. Args: id.";
|
|
2079
|
+
}, {
|
|
2080
|
+
readonly name: "deny";
|
|
2081
|
+
readonly description: "Reject a pending confirmation_required action. Args: id.";
|
|
2082
|
+
}, {
|
|
2083
|
+
readonly name: "network";
|
|
2084
|
+
readonly description: "Inspect/control network. Args: action(route|unroute|requests|har) + relevant fields.";
|
|
2085
|
+
}, {
|
|
2086
|
+
readonly name: "console";
|
|
2087
|
+
readonly description: "View browser console messages. Args: clear?.";
|
|
2088
|
+
}, {
|
|
2089
|
+
readonly name: "errors";
|
|
2090
|
+
readonly description: "View uncaught page JS errors. Args: clear?.";
|
|
2091
|
+
}, {
|
|
2092
|
+
readonly name: "mouse";
|
|
2093
|
+
readonly description: "Low-level mouse. Args: action(move|down|up|wheel), x?, y?, button?, dy?, dx?.";
|
|
2094
|
+
}, {
|
|
2095
|
+
readonly name: "keyboard";
|
|
2096
|
+
readonly description: "Low-level keyboard at focus. Args: action(type|inserttext|keydown|keyup), text?, key?.";
|
|
2097
|
+
}, {
|
|
2098
|
+
readonly name: "state";
|
|
2099
|
+
readonly description: "Persist/restore storage+auth state to a file. Args: action(save|load|list|clear), path?.";
|
|
2100
|
+
}];
|
|
2101
|
+
|
|
2102
|
+
declare const BROWSER_ERROR_NAME = "BrowserError";
|
|
2103
|
+
|
|
2104
|
+
declare const BROWSER_EXECUTE_STATUSES: readonly ["completed", "failed", "stopped"];
|
|
2105
|
+
|
|
2106
|
+
declare const BROWSER_EXECUTE_STOP_REASONS: readonly ["done", "model_failed", "max_steps", "cost_cap", "timeout", "confirmation_required", "invalid_action", "repeated_action", "schema_mismatch", "browser_error", "cancelled", "error"];
|
|
2107
|
+
|
|
2108
|
+
declare const BROWSER_FALLBACKS: readonly ["browser-use", "none"];
|
|
2109
|
+
|
|
2110
|
+
declare const BROWSER_LOG_CONTENT_MODES: readonly ["summary", "full", "none"];
|
|
2111
|
+
|
|
2112
|
+
declare const BROWSER_READ_FORMATS: readonly ["text", "html", "markdown"];
|
|
2113
|
+
|
|
2114
|
+
declare const BROWSER_READ_LOAD_STATES: readonly ["load", "networkidle"];
|
|
2115
|
+
|
|
2116
|
+
declare const BROWSER_READ_LOGIN_BLOCKER = "login_required";
|
|
2117
|
+
|
|
2118
|
+
declare const BROWSER_SCREENSHOT_POLICIES: readonly ["always", "onError", "never"];
|
|
2119
|
+
|
|
2120
|
+
export declare interface BrowserApi extends BrowserStepwiseApi {
|
|
2121
|
+
read(url: string, options?: BrowserApiReadOptions): Promise<BrowserReadResult>;
|
|
2122
|
+
execute(input: BrowserExecuteInput): Promise<BrowserExecuteResult>;
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
export declare type BrowserApiReadOptions = BrowserReadOptions & BrowserProfileOption;
|
|
2126
|
+
|
|
2127
|
+
export declare interface BrowserCommandInputs {
|
|
2128
|
+
health: BrowserSessionInput;
|
|
2129
|
+
session_open: BrowserSessionInput & {
|
|
2130
|
+
url?: string;
|
|
2131
|
+
headed?: boolean;
|
|
2132
|
+
profile?: string;
|
|
2133
|
+
confirmActions?: string[];
|
|
2134
|
+
};
|
|
2135
|
+
navigate: UrlInput & {
|
|
2136
|
+
waitUntil?: LoadState;
|
|
2137
|
+
};
|
|
2138
|
+
back: BrowserSessionInput;
|
|
2139
|
+
forward: BrowserSessionInput;
|
|
2140
|
+
reload: BrowserSessionInput;
|
|
2141
|
+
pushstate: UrlInput;
|
|
2142
|
+
close: BrowserSessionInput;
|
|
2143
|
+
snapshot: BrowserSessionInput & {
|
|
2144
|
+
interactiveOnly?: boolean;
|
|
2145
|
+
selector?: string;
|
|
2146
|
+
urls?: boolean;
|
|
2147
|
+
compact?: boolean;
|
|
2148
|
+
depth?: number;
|
|
2149
|
+
};
|
|
2150
|
+
get: BrowserSessionInput & {
|
|
2151
|
+
what: 'text' | 'html' | 'value' | 'attr' | 'title' | 'url' | 'count' | 'box' | 'styles';
|
|
2152
|
+
selector?: string;
|
|
2153
|
+
attr?: string;
|
|
2154
|
+
};
|
|
2155
|
+
is: SelectorInput & {
|
|
2156
|
+
check: 'visible' | 'enabled' | 'checked';
|
|
2157
|
+
};
|
|
2158
|
+
click: SelectorInput & {
|
|
2159
|
+
newTab?: boolean;
|
|
2160
|
+
};
|
|
2161
|
+
dblclick: SelectorInput;
|
|
2162
|
+
fill: SelectorTextInput;
|
|
2163
|
+
type: SelectorTextInput;
|
|
2164
|
+
press: BrowserSessionInput & {
|
|
2165
|
+
key: string;
|
|
2166
|
+
};
|
|
2167
|
+
hover: SelectorInput;
|
|
2168
|
+
focus: SelectorInput;
|
|
2169
|
+
select: SelectorInput & {
|
|
2170
|
+
value: string;
|
|
2171
|
+
};
|
|
2172
|
+
check: SelectorInput;
|
|
2173
|
+
uncheck: SelectorInput;
|
|
2174
|
+
scroll: BrowserSessionInput & {
|
|
2175
|
+
direction: 'up' | 'down' | 'left' | 'right';
|
|
2176
|
+
px?: number;
|
|
2177
|
+
selector?: string;
|
|
2178
|
+
};
|
|
2179
|
+
scrollintoview: SelectorInput;
|
|
2180
|
+
drag: BrowserSessionInput & {
|
|
2181
|
+
source: string;
|
|
2182
|
+
target: string;
|
|
2183
|
+
};
|
|
2184
|
+
upload: SelectorInput & {
|
|
2185
|
+
files: string[];
|
|
2186
|
+
};
|
|
2187
|
+
find: BrowserSessionInput & {
|
|
2188
|
+
by: 'role' | 'text' | 'label' | 'placeholder' | 'alt' | 'title' | 'testid';
|
|
2189
|
+
query: string;
|
|
2190
|
+
action: 'click' | 'fill' | 'type' | 'hover' | 'focus' | 'check' | 'uncheck' | 'text';
|
|
2191
|
+
value?: string;
|
|
2192
|
+
name?: string;
|
|
2193
|
+
exact?: boolean;
|
|
2194
|
+
};
|
|
2195
|
+
act: BrowserSessionInput & {
|
|
2196
|
+
ref?: string;
|
|
2197
|
+
action?: string;
|
|
2198
|
+
value?: string;
|
|
2199
|
+
instruction?: string;
|
|
2200
|
+
};
|
|
2201
|
+
extract: BrowserSessionInput & {
|
|
2202
|
+
instruction: string;
|
|
2203
|
+
};
|
|
2204
|
+
wait: BrowserSessionInput & {
|
|
2205
|
+
selector?: string;
|
|
2206
|
+
state?: 'visible' | 'hidden';
|
|
2207
|
+
ms?: number;
|
|
2208
|
+
text?: string;
|
|
2209
|
+
url?: string;
|
|
2210
|
+
load?: LoadState;
|
|
2211
|
+
fn?: string;
|
|
2212
|
+
};
|
|
2213
|
+
tab: BrowserSessionInput & {
|
|
2214
|
+
action: 'list' | 'new' | 'switch' | 'close';
|
|
2215
|
+
target?: string;
|
|
2216
|
+
url?: string;
|
|
2217
|
+
label?: string;
|
|
2218
|
+
};
|
|
2219
|
+
window_new: BrowserSessionInput & {
|
|
2220
|
+
url?: string;
|
|
2221
|
+
};
|
|
2222
|
+
frame: BrowserSessionInput & {
|
|
2223
|
+
target: string;
|
|
2224
|
+
};
|
|
2225
|
+
screenshot: BrowserSessionInput & {
|
|
2226
|
+
fullPage?: boolean;
|
|
2227
|
+
path?: string;
|
|
2228
|
+
};
|
|
2229
|
+
pdf: BrowserSessionInput & {
|
|
2230
|
+
path: string;
|
|
2231
|
+
};
|
|
2232
|
+
cookies: BrowserSessionInput & {
|
|
2233
|
+
action: 'get' | 'set' | 'clear';
|
|
2234
|
+
name?: string;
|
|
2235
|
+
value?: string;
|
|
2236
|
+
};
|
|
2237
|
+
storage: BrowserSessionInput & {
|
|
2238
|
+
area: 'local' | 'session';
|
|
2239
|
+
action: 'get' | 'set' | 'clear';
|
|
2240
|
+
key?: string;
|
|
2241
|
+
value?: string;
|
|
2242
|
+
};
|
|
2243
|
+
set: BrowserSessionInput & {
|
|
2244
|
+
setting: 'viewport' | 'device' | 'geo' | 'headers' | 'credentials' | 'media' | 'offline';
|
|
2245
|
+
args: Array<string | number>;
|
|
2246
|
+
};
|
|
2247
|
+
download: BrowserSessionInput & {
|
|
2248
|
+
selector?: string;
|
|
2249
|
+
path?: string;
|
|
2250
|
+
};
|
|
2251
|
+
clipboard: BrowserSessionInput & {
|
|
2252
|
+
action: 'read' | 'write' | 'copy' | 'paste';
|
|
2253
|
+
text?: string;
|
|
2254
|
+
};
|
|
2255
|
+
auth: BrowserSessionInput & {
|
|
2256
|
+
action: 'login' | 'list' | 'show';
|
|
2257
|
+
name?: string;
|
|
2258
|
+
};
|
|
2259
|
+
confirm: IdInput;
|
|
2260
|
+
deny: IdInput;
|
|
2261
|
+
network: BrowserSessionInput & {
|
|
2262
|
+
action: 'route' | 'unroute' | 'requests' | 'har';
|
|
2263
|
+
url?: string;
|
|
2264
|
+
abort?: boolean;
|
|
2265
|
+
body?: string;
|
|
2266
|
+
resourceType?: string;
|
|
2267
|
+
filter?: string;
|
|
2268
|
+
type?: string;
|
|
2269
|
+
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
|
|
2270
|
+
status?: string;
|
|
2271
|
+
requestId?: string;
|
|
2272
|
+
};
|
|
2273
|
+
console: ClearInput;
|
|
2274
|
+
errors: ClearInput;
|
|
2275
|
+
mouse: BrowserSessionInput & {
|
|
2276
|
+
action: 'move' | 'down' | 'up' | 'wheel';
|
|
2277
|
+
x?: number;
|
|
2278
|
+
y?: number;
|
|
2279
|
+
button?: 'left' | 'right' | 'middle';
|
|
2280
|
+
dy?: number;
|
|
2281
|
+
dx?: number;
|
|
2282
|
+
};
|
|
2283
|
+
keyboard: BrowserSessionInput & {
|
|
2284
|
+
action: 'type' | 'inserttext' | 'keydown' | 'keyup';
|
|
2285
|
+
text?: string;
|
|
2286
|
+
key?: string;
|
|
2287
|
+
};
|
|
2288
|
+
state: BrowserSessionInput & {
|
|
2289
|
+
action: 'save' | 'load' | 'list' | 'clear';
|
|
2290
|
+
path?: string;
|
|
2291
|
+
};
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2294
|
+
declare type BrowserCommandMethod<I> = {} extends I ? (input?: I) => Promise<BrowserCommandResult> : (input: I) => Promise<BrowserCommandResult>;
|
|
2295
|
+
|
|
2296
|
+
/** Union of every command name. */
|
|
2297
|
+
declare type BrowserCommandName = (typeof BROWSER_COMMANDS)[number]['name'];
|
|
2298
|
+
|
|
2299
|
+
declare interface BrowserCommandOutput {
|
|
2300
|
+
/**
|
|
2301
|
+
* Which engine served the command. `none` = a precondition failed before any
|
|
2302
|
+
* engine ran (e.g. missing agentId, or a local-only policy with no device) —
|
|
2303
|
+
* so callers don't mistake it for a failed cloud attempt.
|
|
2304
|
+
*/
|
|
2305
|
+
engine: 'local' | 'cloud-agent-browser' | 'cloud' | 'none';
|
|
2306
|
+
data?: unknown;
|
|
2307
|
+
error?: string;
|
|
2308
|
+
code?: string;
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2311
|
+
export declare interface BrowserCommandResult extends BrowserCommandOutput {
|
|
2312
|
+
code?: BrowserErrorCode | (string & {});
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
/**
|
|
2316
|
+
* Which engine a browser command may run on. `auto` (default) prefers the local
|
|
2317
|
+
* desktop Device and falls back to the cloud; `agent-browser` is local-only (no
|
|
2318
|
+
* paid cloud fallback); `browser-use` is cloud-only. Mirrors
|
|
2319
|
+
* `BrowserSwitchConfig.engine` on the dev-facing switch.
|
|
2320
|
+
*/
|
|
2321
|
+
declare type BrowserEngine = 'auto' | 'agent-browser' | 'browser-use';
|
|
2322
|
+
|
|
2323
|
+
export declare type BrowserErrorCode = 'BROWSER_DISABLED' | 'BROWSER_UNAVAILABLE' | 'BROWSER_RUN_SCOPE_MISSING' | 'BROWSER_WORKER_NOT_CONFIGURED' | 'BROWSER_DOMAIN_NOT_ALLOWED' | 'BROWSER_PROFILE_NOT_FOUND' | 'session_lost' | 'unreachable' | BrowserWorkerErrorCode;
|
|
2324
|
+
|
|
2325
|
+
export declare interface BrowserErrorFields {
|
|
2326
|
+
name: typeof BROWSER_ERROR_NAME;
|
|
2327
|
+
/** `'http_error'`: the page answered an HTTP error status with nothing to read; see `status`. */
|
|
2328
|
+
code: BrowserErrorCode;
|
|
2329
|
+
/** HTTP status of the page's main document, when the error is an `'http_error'` and the status is known. */
|
|
2330
|
+
status?: number;
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
export declare interface BrowserExecuteInput {
|
|
2334
|
+
task: string;
|
|
2335
|
+
sessionKey?: string;
|
|
2336
|
+
url?: string;
|
|
2337
|
+
startUrl?: string;
|
|
2338
|
+
schema?: Record<string, unknown>;
|
|
2339
|
+
maxSteps?: number;
|
|
2340
|
+
maxCostUsd?: number;
|
|
2341
|
+
model?: string;
|
|
2342
|
+
timeoutMs?: number;
|
|
2343
|
+
allowAnyDomain?: boolean;
|
|
2344
|
+
allowedDomains?: string[];
|
|
2345
|
+
browser?: string;
|
|
2346
|
+
}
|
|
2347
|
+
|
|
2348
|
+
export declare interface BrowserExecutePendingAction {
|
|
2349
|
+
category: string;
|
|
2350
|
+
action: string;
|
|
2351
|
+
url?: string;
|
|
2352
|
+
confirmationId?: string;
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
export declare interface BrowserExecuteResult {
|
|
2356
|
+
status: BrowserExecuteStatus;
|
|
2357
|
+
output: unknown;
|
|
2358
|
+
steps: number;
|
|
2359
|
+
stopReason?: BrowserExecuteStopReason;
|
|
2360
|
+
costUsd?: number;
|
|
2361
|
+
finalUrl?: string;
|
|
2362
|
+
engine: BrowserCommandOutput['engine'];
|
|
2363
|
+
error?: string;
|
|
2364
|
+
code?: string;
|
|
2365
|
+
pendingAction?: BrowserExecutePendingAction;
|
|
2366
|
+
history?: BrowserExecuteStep[];
|
|
2367
|
+
liveUrl?: string;
|
|
2368
|
+
sessionKey?: string;
|
|
2369
|
+
detail?: string;
|
|
2370
|
+
navigationScope?: string[];
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
export declare type BrowserExecuteStatus = (typeof BROWSER_EXECUTE_STATUSES)[number];
|
|
2374
|
+
|
|
2375
|
+
export declare interface BrowserExecuteStep {
|
|
2376
|
+
step: number;
|
|
2377
|
+
intent: string;
|
|
2378
|
+
action: string;
|
|
2379
|
+
url?: string;
|
|
2380
|
+
ok: boolean;
|
|
2381
|
+
error?: string;
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
export declare type BrowserExecuteStopReason = (typeof BROWSER_EXECUTE_STOP_REASONS)[number];
|
|
2385
|
+
|
|
2386
|
+
declare type BrowserFallback = (typeof BROWSER_FALLBACKS)[number];
|
|
2387
|
+
|
|
2388
|
+
declare type BrowserLogContent = (typeof BROWSER_LOG_CONTENT_MODES)[number];
|
|
2389
|
+
|
|
2390
|
+
export declare interface BrowserProfileOption {
|
|
2391
|
+
browser?: string;
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
export declare type BrowserReadFormat = (typeof BROWSER_READ_FORMATS)[number];
|
|
2395
|
+
|
|
2396
|
+
export declare type BrowserReadLoadState = (typeof BROWSER_READ_LOAD_STATES)[number];
|
|
2397
|
+
|
|
2398
|
+
export declare interface BrowserReadOptions {
|
|
2399
|
+
/** Wait before reading: `'load'`, `'networkidle'`, or a CSS selector that must appear. */
|
|
2400
|
+
waitFor?: BrowserReadLoadState | (string & {});
|
|
2401
|
+
/**
|
|
2402
|
+
* CSS selector to read (default `'body'`). Every match is read, in document order, with matches joined by a
|
|
2403
|
+
* blank line and empty matches skipped, up to the content cap. On the Lua cloud browser this holds for
|
|
2404
|
+
* `'text'` and `'markdown'`; `'html'` returns the inner HTML of the first match. On the desktop browser every
|
|
2405
|
+
* format reads the first match. `matches` on the result says how many elements matched.
|
|
2406
|
+
*/
|
|
2407
|
+
selector?: string;
|
|
2408
|
+
/**
|
|
2409
|
+
* `'text'` (default) or `'html'`. `'markdown'` is accepted but returns plain text for now, and the result
|
|
2410
|
+
* says `format: 'text'`.
|
|
2411
|
+
*/
|
|
2412
|
+
format?: BrowserReadFormat;
|
|
2413
|
+
/** Budget for the whole read in ms (1000 to 100000, default 60000). */
|
|
2414
|
+
timeoutMs?: number;
|
|
2415
|
+
sessionKey?: string;
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
export declare interface BrowserReadResult {
|
|
2419
|
+
/** The URL you asked for. */
|
|
2420
|
+
url: string;
|
|
2421
|
+
/** The URL the page ended on after redirects. */
|
|
2422
|
+
finalUrl: string;
|
|
2423
|
+
title: string;
|
|
2424
|
+
content: string;
|
|
2425
|
+
format: 'text' | 'html';
|
|
2426
|
+
/** True when `content` hit the content cap or not every match was read. */
|
|
2427
|
+
truncated: boolean;
|
|
2428
|
+
/**
|
|
2429
|
+
* HTTP status of the page's main document, e.g. `200` or `404`. A 404 page that has a body is still read, so
|
|
2430
|
+
* check this before trusting `content`. Absent when the browser could not observe the response.
|
|
2431
|
+
*/
|
|
2432
|
+
status?: number;
|
|
2433
|
+
/** How many elements matched `selector`, when a selector other than `'body'` was given. */
|
|
2434
|
+
matches?: number;
|
|
2435
|
+
/** Set when the page is a wall rather than the content you asked for. */
|
|
2436
|
+
blocked?: true;
|
|
2437
|
+
/** `'login_required'`: the URL redirected to a sign-in page, so the content needs a signed-in session. */
|
|
2438
|
+
blocker?: typeof BROWSER_READ_LOGIN_BLOCKER;
|
|
2439
|
+
blockerKind?: 'login';
|
|
2440
|
+
/** What to do about the wall. */
|
|
2441
|
+
blockerGuidance?: string;
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
declare type BrowserScreenshotPolicy = (typeof BROWSER_SCREENSHOT_POLICIES)[number];
|
|
2445
|
+
|
|
2446
|
+
export declare interface BrowserSessionInput extends BrowserProfileOption {
|
|
2447
|
+
sessionKey?: string;
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
export declare type BrowserStepwiseApi = {
|
|
2451
|
+
[K in BrowserStepwiseCommandName]: BrowserCommandMethod<BrowserCommandInputs[K]>;
|
|
2452
|
+
};
|
|
2453
|
+
|
|
2454
|
+
export declare type BrowserStepwiseCommandName = Exclude<BrowserCommandName, 'read'>;
|
|
2455
|
+
|
|
1936
2456
|
/**
|
|
1937
2457
|
* Browser switch config (LuaBrowser). `browser: true` is the zero-code form —
|
|
1938
|
-
* the agent gets browser tools
|
|
1939
|
-
*
|
|
1940
|
-
* adds optional policy.
|
|
2458
|
+
* the agent gets browser tools and the `Browser` global, routed to the user's
|
|
2459
|
+
* desktop browser when it is online, else the Lua cloud browser. The object
|
|
2460
|
+
* form adds optional policy.
|
|
1941
2461
|
*/
|
|
1942
2462
|
export declare interface BrowserSwitchConfig {
|
|
1943
|
-
/**
|
|
2463
|
+
/** 'auto' (default): desktop when online, else the Lua cloud browser. 'agent-browser': desktop or Lua cloud, never Browser-Use. 'browser-use': Browser-Use only. */
|
|
1944
2464
|
engine?: 'auto' | 'browser-use' | 'agent-browser';
|
|
1945
|
-
|
|
2465
|
+
fallback?: 'browser-use' | 'none';
|
|
2466
|
+
proxyCountry?: string;
|
|
2467
|
+
/** Hosts the browser may open; checked before every command that opens a URL. On the Lua cloud browser it also applies to redirects and everything a page loads. */
|
|
1946
2468
|
allowedDomains?: string[];
|
|
1947
|
-
|
|
2469
|
+
confirmActions?: string[];
|
|
2470
|
+
logContent?: BrowserLogContent;
|
|
2471
|
+
screenshots?: BrowserScreenshotPolicy;
|
|
2472
|
+
/** Accepted but not enforced yet. */
|
|
1948
2473
|
credentials?: string[];
|
|
1949
|
-
/**
|
|
2474
|
+
/** Lua cloud browser session length in minutes: default 10, at most 60 (a larger value is cut to 60). */
|
|
1950
2475
|
maxSessionMinutes?: number;
|
|
2476
|
+
/** Lua cloud browser idle timeout in seconds: default 120, at most 900 (a larger value is cut to 900). */
|
|
2477
|
+
idleTimeoutSeconds?: number;
|
|
1951
2478
|
}
|
|
1952
2479
|
|
|
2480
|
+
declare type BrowserWorkerErrorCode = 'unauthorized' | 'invalid_request' | 'invalid_argument' | 'policy_mismatch' | 'unsupported' | 'blocked_scheme' | 'blocked_private_host' | 'blocked_domain' | 'session_cap' | 'session_not_on_this_pod' | 'no_page' | 'draining' | 'timeout' | 'engine_unavailable' | 'engine_error' | 'http_error';
|
|
2481
|
+
|
|
1953
2482
|
/** What `.commit()` hands to `LuaWorkflow` — internal; never `new LuaWorkflow({...})` by users. */
|
|
1954
2483
|
declare interface BuiltWorkflow {
|
|
1955
2484
|
config: LuaWorkflowConfig;
|
|
@@ -2398,6 +2927,8 @@ export declare interface ChatHistoryMessage {
|
|
|
2398
2927
|
agentId: string;
|
|
2399
2928
|
name?: string;
|
|
2400
2929
|
};
|
|
2930
|
+
/** On a user message: the id the client gave the turn when it sent it, so it can tell which of its sends arrived. */
|
|
2931
|
+
clientTurnId?: string;
|
|
2401
2932
|
/**
|
|
2402
2933
|
* Permanent recording for a voice-note turn (Lua Desktop). Populated by the
|
|
2403
2934
|
* admin threads history endpoint from the row's `content.metadata.audio` — a
|
|
@@ -2419,6 +2950,24 @@ export declare type ChatMessage = TextMessage | ImageMessage | FileMessage;
|
|
|
2419
2950
|
/** wave 2 U33 — the typed refusal `Integrations.checkAsUser` raises outside a live chat turn. */
|
|
2420
2951
|
export declare function checkAsUserRequiresUser(): Error;
|
|
2421
2952
|
|
|
2953
|
+
export declare interface ChoiceAnswer<L extends string = string> {
|
|
2954
|
+
type: 'choice';
|
|
2955
|
+
choice: L;
|
|
2956
|
+
confidence: number;
|
|
2957
|
+
probabilities: Record<L, number>;
|
|
2958
|
+
uncertain: boolean;
|
|
2959
|
+
}
|
|
2960
|
+
|
|
2961
|
+
export declare interface ChoiceQuestion<L extends string = string> {
|
|
2962
|
+
type: 'choice';
|
|
2963
|
+
instructions: string;
|
|
2964
|
+
options: Record<L, string>;
|
|
2965
|
+
}
|
|
2966
|
+
|
|
2967
|
+
declare interface ClearInput extends BrowserSessionInput {
|
|
2968
|
+
clear?: boolean;
|
|
2969
|
+
}
|
|
2970
|
+
|
|
2422
2971
|
/**
|
|
2423
2972
|
* U6 (wave 2) — connection inspection, account pinning and capability checks; U33 — the same checks run
|
|
2424
2973
|
* with the CONVERSATION USER's principal. Owner: U6 (catalogue, list, pin, check, cleanup); U33 owns only
|
|
@@ -3013,6 +3562,143 @@ export declare class DataEntryInstance {
|
|
|
3013
3562
|
|
|
3014
3563
|
export { DatasetRef }
|
|
3015
3564
|
|
|
3565
|
+
declare const DECISION_ERROR_CODES: {
|
|
3566
|
+
readonly INVALID: "decision_invalid";
|
|
3567
|
+
readonly TIMEOUT: "decision_timeout";
|
|
3568
|
+
readonly REJECTED: "decision_rejected";
|
|
3569
|
+
readonly UNAVAILABLE: "decision_unavailable";
|
|
3570
|
+
readonly DISABLED: "decision_disabled";
|
|
3571
|
+
readonly INSUFFICIENT_CREDITS: "decision_insufficient_credits";
|
|
3572
|
+
readonly NOT_FOUND: "decision_not_found";
|
|
3573
|
+
};
|
|
3574
|
+
|
|
3575
|
+
declare const DECISION_PROVIDERS: readonly ["jev", "openai"];
|
|
3576
|
+
|
|
3577
|
+
declare const DECISION_ROUTING_RULES: readonly ["pinned", "images", "region", "zero_retention", "default", "fallback"];
|
|
3578
|
+
|
|
3579
|
+
export declare type DecisionAnswer = OddsAnswer | ChoiceAnswer | ScoreAnswer | RefusedAnswer;
|
|
3580
|
+
|
|
3581
|
+
export declare type DecisionAnswerFor<Q extends DecisionQuestion> = Q extends ChoiceQuestion<infer L> ? ChoiceAnswer<L> | RefusedAnswer : Q extends ScoreQuestion ? ScoreAnswer | RefusedAnswer : OddsAnswer | RefusedAnswer;
|
|
3582
|
+
|
|
3583
|
+
export declare type DecisionAnswers<Q extends DecisionQuestions> = {
|
|
3584
|
+
[K in keyof Q]: DecisionAnswerFor<Q[K]>;
|
|
3585
|
+
};
|
|
3586
|
+
|
|
3587
|
+
export declare interface DecisionDefinition<Q extends DecisionQuestions = DecisionQuestions> extends DecisionOptions {
|
|
3588
|
+
name: string;
|
|
3589
|
+
description?: string;
|
|
3590
|
+
questions: Q;
|
|
3591
|
+
}
|
|
3592
|
+
|
|
3593
|
+
export declare interface DecisionError extends Error {
|
|
3594
|
+
readonly code: DecisionErrorFields['code'];
|
|
3595
|
+
readonly provider?: DecisionProvider;
|
|
3596
|
+
readonly upstreamStatus?: number;
|
|
3597
|
+
readonly decisionId?: string;
|
|
3598
|
+
}
|
|
3599
|
+
|
|
3600
|
+
export declare const DecisionError: new (message: string, fields: DecisionErrorFields) => DecisionError;
|
|
3601
|
+
|
|
3602
|
+
export declare type DecisionErrorCode = (typeof DECISION_ERROR_CODES)[keyof typeof DECISION_ERROR_CODES];
|
|
3603
|
+
|
|
3604
|
+
export declare interface DecisionErrorFields {
|
|
3605
|
+
code: DecisionErrorCode | (string & {});
|
|
3606
|
+
provider?: DecisionProvider;
|
|
3607
|
+
upstreamStatus?: number;
|
|
3608
|
+
decisionId?: string;
|
|
3609
|
+
}
|
|
3610
|
+
|
|
3611
|
+
declare type DecisionFallback = DecisionProvider | 'none';
|
|
3612
|
+
|
|
3613
|
+
declare interface DecisionFallbackInfo {
|
|
3614
|
+
from: DecisionProvider;
|
|
3615
|
+
reason: string;
|
|
3616
|
+
}
|
|
3617
|
+
|
|
3618
|
+
declare interface DecisionImage {
|
|
3619
|
+
data: string;
|
|
3620
|
+
mimeType: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';
|
|
3621
|
+
}
|
|
3622
|
+
|
|
3623
|
+
declare type DecisionLogState = 'summary' | 'full' | 'none';
|
|
3624
|
+
|
|
3625
|
+
export declare interface DecisionOptions {
|
|
3626
|
+
provider?: DecisionProviderChoice;
|
|
3627
|
+
model?: string;
|
|
3628
|
+
fallback?: DecisionFallback;
|
|
3629
|
+
region?: DecisionRegion;
|
|
3630
|
+
zeroRetention?: boolean;
|
|
3631
|
+
minConfidence?: number;
|
|
3632
|
+
timeoutMs?: number;
|
|
3633
|
+
cache?: {
|
|
3634
|
+
ttlSeconds: number;
|
|
3635
|
+
};
|
|
3636
|
+
logState?: DecisionLogState;
|
|
3637
|
+
}
|
|
3638
|
+
|
|
3639
|
+
export declare type DecisionProvider = (typeof DECISION_PROVIDERS)[number];
|
|
3640
|
+
|
|
3641
|
+
declare type DecisionProviderChoice = DecisionProvider | 'auto';
|
|
3642
|
+
|
|
3643
|
+
export declare type DecisionQuestion = OddsQuestion | ChoiceQuestion | ScoreQuestion;
|
|
3644
|
+
|
|
3645
|
+
export declare type DecisionQuestions = Record<string, DecisionQuestion>;
|
|
3646
|
+
|
|
3647
|
+
declare type DecisionRegion = 'eu';
|
|
3648
|
+
|
|
3649
|
+
export declare interface DecisionRequest<Q extends DecisionQuestions = DecisionQuestions> extends DecisionOptions {
|
|
3650
|
+
state: DecisionState;
|
|
3651
|
+
images?: DecisionImage[];
|
|
3652
|
+
questions: Q;
|
|
3653
|
+
}
|
|
3654
|
+
|
|
3655
|
+
export declare interface DecisionResult<Q extends DecisionQuestions = DecisionQuestions> {
|
|
3656
|
+
decisionId: string;
|
|
3657
|
+
answers: DecisionAnswers<Q>;
|
|
3658
|
+
provider: DecisionProvider;
|
|
3659
|
+
model: string;
|
|
3660
|
+
rule: DecisionRoutingRule;
|
|
3661
|
+
usage: DecisionUsage;
|
|
3662
|
+
durationMs: number;
|
|
3663
|
+
cached: boolean;
|
|
3664
|
+
fallback?: DecisionFallbackInfo;
|
|
3665
|
+
decisionName?: string;
|
|
3666
|
+
decisionVersion?: string;
|
|
3667
|
+
}
|
|
3668
|
+
|
|
3669
|
+
declare type DecisionRoutingRule = (typeof DECISION_ROUTING_RULES)[number];
|
|
3670
|
+
|
|
3671
|
+
export declare type DecisionRunOptions = Omit<DecisionRunRequest, 'name' | 'state'>;
|
|
3672
|
+
|
|
3673
|
+
declare interface DecisionRunRequest extends DecisionOptions {
|
|
3674
|
+
name: string;
|
|
3675
|
+
state: DecisionState;
|
|
3676
|
+
images?: DecisionImage[];
|
|
3677
|
+
}
|
|
3678
|
+
|
|
3679
|
+
export declare const Decisions: DecisionsApi;
|
|
3680
|
+
|
|
3681
|
+
export declare interface DecisionsApi {
|
|
3682
|
+
ask<Q extends DecisionQuestions>(request: DecisionRequest<Q>): Promise<DecisionResult<Q>>;
|
|
3683
|
+
ask<Q extends DecisionQuestion>(state: DecisionState, question: Q, options?: DecisionOptions): Promise<DecisionAnswerFor<Q>>;
|
|
3684
|
+
run<Q extends DecisionQuestions = DecisionQuestions>(name: string, state: DecisionState, options?: DecisionRunOptions): Promise<DecisionResult<Q>>;
|
|
3685
|
+
odds(instructions: string, criteria?: OddsQuestion['criteria']): OddsQuestion;
|
|
3686
|
+
choice<L extends string>(instructions: string, options: Record<L, string>): ChoiceQuestion<L>;
|
|
3687
|
+
score(instructions: string, levels: ReadonlyArray<string | ScoreLevel>): ScoreQuestion;
|
|
3688
|
+
}
|
|
3689
|
+
|
|
3690
|
+
export declare type DecisionState = string | string[] | {
|
|
3691
|
+
[key: string]: unknown;
|
|
3692
|
+
};
|
|
3693
|
+
|
|
3694
|
+
declare interface DecisionUsage {
|
|
3695
|
+
inputTokens: number | null;
|
|
3696
|
+
}
|
|
3697
|
+
|
|
3698
|
+
export declare function defineBrowser(config: LuaBrowserConfig): LuaBrowser;
|
|
3699
|
+
|
|
3700
|
+
export declare function defineDecision<Q extends DecisionQuestions>(config: LuaDecisionConfig<Q>): LuaDecision<Q>;
|
|
3701
|
+
|
|
3016
3702
|
/**
|
|
3017
3703
|
* Define a device that an agent can communicate with.
|
|
3018
3704
|
*
|
|
@@ -3941,6 +4627,11 @@ declare abstract class HttpClient {
|
|
|
3941
4627
|
* @protected
|
|
3942
4628
|
*/
|
|
3943
4629
|
protected httpDelete<T>(url: string, headers?: Record<string, string>, overrides?: RequestOverrides): Promise<ApiResponse<T>>;
|
|
4630
|
+
/**
|
|
4631
|
+
* A DELETE with a JSON body, sent once (no retries): for a destructive call that carries a
|
|
4632
|
+
* single-use secret (a confirmation code), where a blind retry could only spend it again.
|
|
4633
|
+
*/
|
|
4634
|
+
protected httpDeleteOnce<T>(url: string, data?: any, headers?: Record<string, string>, overrides?: RequestOverrides): Promise<ApiResponse<T>>;
|
|
3944
4635
|
/**
|
|
3945
4636
|
* Performs an HTTP PATCH request
|
|
3946
4637
|
* @param url - The relative URL path to request (will be appended to baseUrl)
|
|
@@ -3989,6 +4680,10 @@ declare interface IdentifiedEntity {
|
|
|
3989
4680
|
_id?: string;
|
|
3990
4681
|
}
|
|
3991
4682
|
|
|
4683
|
+
declare interface IdInput extends BrowserSessionInput {
|
|
4684
|
+
id: string;
|
|
4685
|
+
}
|
|
4686
|
+
|
|
3992
4687
|
export declare interface ImageMessage {
|
|
3993
4688
|
type: 'image';
|
|
3994
4689
|
image: string;
|
|
@@ -4379,6 +5074,8 @@ declare interface Job {
|
|
|
4379
5074
|
updatedAt: string;
|
|
4380
5075
|
dynamic?: boolean;
|
|
4381
5076
|
userId?: string;
|
|
5077
|
+
/** The full chat thread id (base[:suffix]) the job was created in, set by the platform when Jobs.create ran inside a chat turn. Read-only; absent for jobs created outside a chat turn and for every earlier job. */
|
|
5078
|
+
originThreadId?: string;
|
|
4382
5079
|
metadata?: Record<string, any>;
|
|
4383
5080
|
versions: JobVersion[];
|
|
4384
5081
|
lastExecution?: JobExecution;
|
|
@@ -4866,6 +5563,50 @@ export declare const lit: <const V extends string | number | boolean | null>(v:
|
|
|
4866
5563
|
|
|
4867
5564
|
export { Literal }
|
|
4868
5565
|
|
|
5566
|
+
/**
|
|
5567
|
+
* LUA-724 (PR 7) — the billed turn's pricing inputs, exactly as chat's settlement event carries
|
|
5568
|
+
* them (`chat.service.trackLlmInferenceUsage`): the model that ACTUALLY served the turn (the
|
|
5569
|
+
* resolver's code, not the caller's pin), the de-paged `contextInputTokens` (largest single
|
|
5570
|
+
* step's prompt — never the whole-turn sum), the tool-call COUNT, and whether the turn ran on
|
|
5571
|
+
* the org's own key. `chargedCredits` echoes the gate's answer (true ⇒ the legacy pool deducted
|
|
5572
|
+
* in real time; false ⇒ seat org / free turn — settlement meters it).
|
|
5573
|
+
*
|
|
5574
|
+
* Stamped by the serving pod ONLY on internal-auth turns that carry a billing `operationId`
|
|
5575
|
+
* (the workflow agent-step loopback), as the enumerable `luaMeter` top-level field of the
|
|
5576
|
+
* generate envelope — never on a Bearer turn, so the public wire is byte-identical. The
|
|
5577
|
+
* workflow executor prices the step's `run.budget.spent` from it with `priceModelCall`.
|
|
5578
|
+
*/
|
|
5579
|
+
/**
|
|
5580
|
+
* WJB-B1 (BAC-668, decision D1) — one ReAct step's prompt components, as the provider reported them:
|
|
5581
|
+
* `inputTokens` the step's UNCACHED prompt, `cacheReadTokens` the tokens served from cache,
|
|
5582
|
+
* `cacheCreationTokens` the flat write total with `cacheCreationTokens5m` / `cacheCreationTokens1h` its TTL
|
|
5583
|
+
* split when the provider exposed one (the streaming chat path usually does not — a weighted chat step then
|
|
5584
|
+
* weights READS alone). Names mirror `LlmUsageData`'s turn-level members, so one vocabulary describes the
|
|
5585
|
+
* turn and its steps.
|
|
5586
|
+
*
|
|
5587
|
+
* DECLARED HERE, not in `@lua/shared-schemas`, deliberately. The chat hot-path util that builds these
|
|
5588
|
+
* (`lua-core/src/utils/turn-signals.util.ts`) must not take a Nest-bearing runtime import: shared-schemas'
|
|
5589
|
+
* dist requires `@nestjs/mongoose` at load, and nine `chat.controller.*.spec.ts` suites partially mock
|
|
5590
|
+
* `@nestjs/common`, so importing the VALUE below from there turned them into
|
|
5591
|
+
* `common_1.Module is not a function`. `@lua/shared-types` requires no Nest at all; shared-schemas
|
|
5592
|
+
* re-exports both members, so `LlmUsageData.contextSteps` still reads as a member of that file.
|
|
5593
|
+
*/
|
|
5594
|
+
declare interface LlmContextStep {
|
|
5595
|
+
inputTokens: number;
|
|
5596
|
+
cacheReadTokens?: number;
|
|
5597
|
+
cacheCreationTokens?: number;
|
|
5598
|
+
cacheCreationTokens5m?: number;
|
|
5599
|
+
cacheCreationTokens1h?: number;
|
|
5600
|
+
/** The step's output tokens. Cost only: settlement never reads it. */
|
|
5601
|
+
outputTokens?: number;
|
|
5602
|
+
/** As the provider reported them: outside `outputTokens` on Gemini, a subset of it on OpenAI. Cost only. */
|
|
5603
|
+
reasoningTokens?: number;
|
|
5604
|
+
/** The model id the provider says served the step (a fallback leg names itself here). Cost only. */
|
|
5605
|
+
model?: string;
|
|
5606
|
+
}
|
|
5607
|
+
|
|
5608
|
+
declare type LoadState = 'load' | 'domcontentloaded' | 'networkidle';
|
|
5609
|
+
|
|
4869
5610
|
/**
|
|
4870
5611
|
* Structured logging: `log.debug/info/warn/error(message, fields?)`.
|
|
4871
5612
|
*
|
|
@@ -4993,9 +5734,11 @@ export declare class LuaAgent {
|
|
|
4993
5734
|
private readonly devices;
|
|
4994
5735
|
private readonly deviceTriggers;
|
|
4995
5736
|
private readonly voices?;
|
|
5737
|
+
private readonly decisions;
|
|
4996
5738
|
private readonly batching?;
|
|
4997
5739
|
private readonly governance?;
|
|
4998
5740
|
private readonly browser?;
|
|
5741
|
+
private readonly browsers?;
|
|
4999
5742
|
/**
|
|
5000
5743
|
* Creates a new LuaAgent instance.
|
|
5001
5744
|
*
|
|
@@ -5033,6 +5776,8 @@ export declare class LuaAgent {
|
|
|
5033
5776
|
getBatching(): BatchingConfig | undefined;
|
|
5034
5777
|
getDevices(): LuaDevice[];
|
|
5035
5778
|
getVoices(): LuaVoice[] | undefined;
|
|
5779
|
+
getBrowsers(): LuaBrowser[] | undefined;
|
|
5780
|
+
getDecisions(): LuaDecision[];
|
|
5036
5781
|
}
|
|
5037
5782
|
|
|
5038
5783
|
export declare interface LuaAgentConfig {
|
|
@@ -5090,17 +5835,19 @@ export declare interface LuaAgentConfig {
|
|
|
5090
5835
|
* single-element array — `voices: [supportVoice]`.
|
|
5091
5836
|
*/
|
|
5092
5837
|
voices?: LuaVoice[];
|
|
5838
|
+
decisions?: LuaDecision[];
|
|
5093
5839
|
/** Per-agent message batching/debounce configuration. Overrides platform env var defaults. */
|
|
5094
5840
|
batching?: BatchingConfig;
|
|
5095
5841
|
/** Governance policy configuration. When set, tool calls, preprocessors, and postprocessors are governed. */
|
|
5096
5842
|
governance?: GovernanceConfig;
|
|
5097
5843
|
/**
|
|
5098
|
-
* Browser switch (LuaBrowser). `true` turns on browser tools
|
|
5099
|
-
* defaults; an object adds policy (
|
|
5100
|
-
*
|
|
5844
|
+
* Browser switch (LuaBrowser). `true` turns on browser tools and the
|
|
5845
|
+
* `Browser` global with platform defaults; an object adds policy (see
|
|
5846
|
+
* `BrowserSwitchConfig`). Off by default — a browser session costs money and
|
|
5101
5847
|
* carries risk, so it's opt-in (unlike always-on searchWeb).
|
|
5102
5848
|
*/
|
|
5103
5849
|
browser?: boolean | BrowserSwitchConfig;
|
|
5850
|
+
browsers?: LuaBrowser[];
|
|
5104
5851
|
}
|
|
5105
5852
|
|
|
5106
5853
|
/**
|
|
@@ -5128,6 +5875,64 @@ export declare type LuaAgentModel = string | ((request: LuaRequest) => string |
|
|
|
5128
5875
|
/** The signed-in person a route runs for (never an API key, never anonymous). */
|
|
5129
5876
|
export declare type LuaAuth = WebRouteAuth;
|
|
5130
5877
|
|
|
5878
|
+
export declare class LuaBrowser {
|
|
5879
|
+
readonly name: string;
|
|
5880
|
+
readonly description?: string;
|
|
5881
|
+
readonly engine: LuaBrowserSettings['engine'];
|
|
5882
|
+
readonly fallback: LuaBrowserSettings['fallback'];
|
|
5883
|
+
readonly proxyCountry: LuaBrowserSettings['proxyCountry'];
|
|
5884
|
+
readonly allowedDomains: LuaBrowserSettings['allowedDomains'];
|
|
5885
|
+
readonly confirmActions: LuaBrowserSettings['confirmActions'];
|
|
5886
|
+
readonly maxSessionMinutes: LuaBrowserSettings['maxSessionMinutes'];
|
|
5887
|
+
readonly idleTimeoutSeconds: LuaBrowserSettings['idleTimeoutSeconds'];
|
|
5888
|
+
readonly maxConcurrentSessions: LuaBrowserSettings['maxConcurrentSessions'];
|
|
5889
|
+
readonly screenshots: LuaBrowserSettings['screenshots'];
|
|
5890
|
+
readonly logContent: LuaBrowserSettings['logContent'];
|
|
5891
|
+
readonly persist: LuaBrowserSettings['persist'];
|
|
5892
|
+
readonly credentials: LuaBrowserSettings['credentials'];
|
|
5893
|
+
constructor(config: LuaBrowserConfig);
|
|
5894
|
+
}
|
|
5895
|
+
|
|
5896
|
+
export declare interface LuaBrowserConfig extends LuaBrowserSettings {
|
|
5897
|
+
name: string;
|
|
5898
|
+
description?: string;
|
|
5899
|
+
}
|
|
5900
|
+
|
|
5901
|
+
export declare interface LuaBrowserSettings {
|
|
5902
|
+
engine?: BrowserEngine;
|
|
5903
|
+
fallback?: BrowserFallback;
|
|
5904
|
+
proxyCountry?: string;
|
|
5905
|
+
allowedDomains?: string[];
|
|
5906
|
+
confirmActions?: string[];
|
|
5907
|
+
maxSessionMinutes?: number;
|
|
5908
|
+
idleTimeoutSeconds?: number;
|
|
5909
|
+
maxConcurrentSessions?: number;
|
|
5910
|
+
screenshots?: BrowserScreenshotPolicy;
|
|
5911
|
+
logContent?: BrowserLogContent;
|
|
5912
|
+
persist?: boolean;
|
|
5913
|
+
credentials?: string[];
|
|
5914
|
+
}
|
|
5915
|
+
|
|
5916
|
+
export declare class LuaDecision<Q extends DecisionQuestions = DecisionQuestions> {
|
|
5917
|
+
readonly name: string;
|
|
5918
|
+
readonly description?: string;
|
|
5919
|
+
readonly questions: Q;
|
|
5920
|
+
readonly provider?: DecisionProviderChoice;
|
|
5921
|
+
readonly model?: string;
|
|
5922
|
+
readonly fallback?: DecisionFallback;
|
|
5923
|
+
readonly region?: DecisionRegion;
|
|
5924
|
+
readonly zeroRetention?: boolean;
|
|
5925
|
+
readonly minConfidence?: number;
|
|
5926
|
+
readonly timeoutMs?: number;
|
|
5927
|
+
readonly cache?: {
|
|
5928
|
+
ttlSeconds: number;
|
|
5929
|
+
};
|
|
5930
|
+
readonly logState?: DecisionLogState;
|
|
5931
|
+
constructor(config: LuaDecisionConfig<Q>);
|
|
5932
|
+
}
|
|
5933
|
+
|
|
5934
|
+
export declare type LuaDecisionConfig<Q extends DecisionQuestions = DecisionQuestions> = DecisionDefinition<Q>;
|
|
5935
|
+
|
|
5131
5936
|
/**
|
|
5132
5937
|
* LuaDevice class — represents an external device that an agent can communicate with.
|
|
5133
5938
|
*
|
|
@@ -5855,7 +6660,7 @@ export declare interface LuaTriggerConfig<T = any> {
|
|
|
5855
6660
|
*
|
|
5856
6661
|
* export default new LuaVoice({
|
|
5857
6662
|
* name: 'support-line',
|
|
5858
|
-
* llm: 'openai/
|
|
6663
|
+
* llm: 'openai/chat-latest',
|
|
5859
6664
|
* stt: 'deepgram/nova-3',
|
|
5860
6665
|
* tts: { model: 'cartesia/sonic-3', voice: '9626c31c-bec5-4cca-baa8-f8ba9e84c8bc' },
|
|
5861
6666
|
* vad: 'silero',
|
|
@@ -5955,7 +6760,7 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
5955
6760
|
name: z.ZodOptional<z.ZodString>;
|
|
5956
6761
|
llm: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
5957
6762
|
kind: z.ZodLiteral<"inference">;
|
|
5958
|
-
/** Provider-prefixed model id (e.g. `'openai/
|
|
6763
|
+
/** Provider-prefixed model id (e.g. `'openai/chat-latest'`). */
|
|
5959
6764
|
model: z.ZodString;
|
|
5960
6765
|
/**
|
|
5961
6766
|
* TTS-only — provider voice id. Inference's TTS API takes voice
|
|
@@ -5970,13 +6775,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
5970
6775
|
*/
|
|
5971
6776
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
5972
6777
|
}, "strip", z.ZodTypeAny, {
|
|
5973
|
-
kind: "inference";
|
|
5974
6778
|
model: string;
|
|
6779
|
+
kind: "inference";
|
|
5975
6780
|
voice?: string | undefined;
|
|
5976
6781
|
options?: Record<string, unknown> | undefined;
|
|
5977
6782
|
}, {
|
|
5978
|
-
kind: "inference";
|
|
5979
6783
|
model: string;
|
|
6784
|
+
kind: "inference";
|
|
5980
6785
|
voice?: string | undefined;
|
|
5981
6786
|
options?: Record<string, unknown> | undefined;
|
|
5982
6787
|
}>, z.ZodObject<{
|
|
@@ -5991,15 +6796,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
5991
6796
|
*/
|
|
5992
6797
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
5993
6798
|
}, "strip", z.ZodTypeAny, {
|
|
5994
|
-
|
|
6799
|
+
options: Record<string, unknown>;
|
|
5995
6800
|
provider: "deepgram" | "elevenlabs";
|
|
6801
|
+
kind: "plugin";
|
|
5996
6802
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
5997
|
-
options: Record<string, unknown>;
|
|
5998
6803
|
}, {
|
|
5999
|
-
|
|
6804
|
+
options: Record<string, unknown>;
|
|
6000
6805
|
provider: "deepgram" | "elevenlabs";
|
|
6806
|
+
kind: "plugin";
|
|
6001
6807
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6002
|
-
options: Record<string, unknown>;
|
|
6003
6808
|
}>, z.ZodObject<{
|
|
6004
6809
|
kind: z.ZodLiteral<"realtime">;
|
|
6005
6810
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -6011,17 +6816,17 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
6011
6816
|
*/
|
|
6012
6817
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6013
6818
|
}, "strip", z.ZodTypeAny, {
|
|
6014
|
-
kind: "realtime";
|
|
6015
|
-
provider: "openai" | "google" | "xai";
|
|
6016
6819
|
options: Record<string, unknown>;
|
|
6017
|
-
}, {
|
|
6018
|
-
kind: "realtime";
|
|
6019
6820
|
provider: "openai" | "google" | "xai";
|
|
6821
|
+
kind: "realtime";
|
|
6822
|
+
}, {
|
|
6020
6823
|
options: Record<string, unknown>;
|
|
6824
|
+
provider: "openai" | "google" | "xai";
|
|
6825
|
+
kind: "realtime";
|
|
6021
6826
|
}>]>;
|
|
6022
6827
|
stt: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
6023
6828
|
kind: z.ZodLiteral<"inference">;
|
|
6024
|
-
/** Provider-prefixed model id (e.g. `'openai/
|
|
6829
|
+
/** Provider-prefixed model id (e.g. `'openai/chat-latest'`). */
|
|
6025
6830
|
model: z.ZodString;
|
|
6026
6831
|
/**
|
|
6027
6832
|
* TTS-only — provider voice id. Inference's TTS API takes voice
|
|
@@ -6036,13 +6841,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
6036
6841
|
*/
|
|
6037
6842
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
6038
6843
|
}, "strip", z.ZodTypeAny, {
|
|
6039
|
-
kind: "inference";
|
|
6040
6844
|
model: string;
|
|
6845
|
+
kind: "inference";
|
|
6041
6846
|
voice?: string | undefined;
|
|
6042
6847
|
options?: Record<string, unknown> | undefined;
|
|
6043
6848
|
}, {
|
|
6044
|
-
kind: "inference";
|
|
6045
6849
|
model: string;
|
|
6850
|
+
kind: "inference";
|
|
6046
6851
|
voice?: string | undefined;
|
|
6047
6852
|
options?: Record<string, unknown> | undefined;
|
|
6048
6853
|
}>, z.ZodObject<{
|
|
@@ -6057,15 +6862,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
6057
6862
|
*/
|
|
6058
6863
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6059
6864
|
}, "strip", z.ZodTypeAny, {
|
|
6060
|
-
|
|
6865
|
+
options: Record<string, unknown>;
|
|
6061
6866
|
provider: "deepgram" | "elevenlabs";
|
|
6867
|
+
kind: "plugin";
|
|
6062
6868
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6063
|
-
options: Record<string, unknown>;
|
|
6064
6869
|
}, {
|
|
6065
|
-
|
|
6870
|
+
options: Record<string, unknown>;
|
|
6066
6871
|
provider: "deepgram" | "elevenlabs";
|
|
6872
|
+
kind: "plugin";
|
|
6067
6873
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6068
|
-
options: Record<string, unknown>;
|
|
6069
6874
|
}>, z.ZodObject<{
|
|
6070
6875
|
kind: z.ZodLiteral<"realtime">;
|
|
6071
6876
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -6077,17 +6882,17 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
6077
6882
|
*/
|
|
6078
6883
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6079
6884
|
}, "strip", z.ZodTypeAny, {
|
|
6080
|
-
kind: "realtime";
|
|
6081
|
-
provider: "openai" | "google" | "xai";
|
|
6082
6885
|
options: Record<string, unknown>;
|
|
6083
|
-
}, {
|
|
6084
|
-
kind: "realtime";
|
|
6085
6886
|
provider: "openai" | "google" | "xai";
|
|
6887
|
+
kind: "realtime";
|
|
6888
|
+
}, {
|
|
6086
6889
|
options: Record<string, unknown>;
|
|
6890
|
+
provider: "openai" | "google" | "xai";
|
|
6891
|
+
kind: "realtime";
|
|
6087
6892
|
}>]>>;
|
|
6088
6893
|
tts: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
6089
6894
|
kind: z.ZodLiteral<"inference">;
|
|
6090
|
-
/** Provider-prefixed model id (e.g. `'openai/
|
|
6895
|
+
/** Provider-prefixed model id (e.g. `'openai/chat-latest'`). */
|
|
6091
6896
|
model: z.ZodString;
|
|
6092
6897
|
/**
|
|
6093
6898
|
* TTS-only — provider voice id. Inference's TTS API takes voice
|
|
@@ -6102,13 +6907,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
6102
6907
|
*/
|
|
6103
6908
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
6104
6909
|
}, "strip", z.ZodTypeAny, {
|
|
6105
|
-
kind: "inference";
|
|
6106
6910
|
model: string;
|
|
6911
|
+
kind: "inference";
|
|
6107
6912
|
voice?: string | undefined;
|
|
6108
6913
|
options?: Record<string, unknown> | undefined;
|
|
6109
6914
|
}, {
|
|
6110
|
-
kind: "inference";
|
|
6111
6915
|
model: string;
|
|
6916
|
+
kind: "inference";
|
|
6112
6917
|
voice?: string | undefined;
|
|
6113
6918
|
options?: Record<string, unknown> | undefined;
|
|
6114
6919
|
}>, z.ZodObject<{
|
|
@@ -6123,15 +6928,15 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
6123
6928
|
*/
|
|
6124
6929
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6125
6930
|
}, "strip", z.ZodTypeAny, {
|
|
6126
|
-
|
|
6931
|
+
options: Record<string, unknown>;
|
|
6127
6932
|
provider: "deepgram" | "elevenlabs";
|
|
6933
|
+
kind: "plugin";
|
|
6128
6934
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6129
|
-
options: Record<string, unknown>;
|
|
6130
6935
|
}, {
|
|
6131
|
-
|
|
6936
|
+
options: Record<string, unknown>;
|
|
6132
6937
|
provider: "deepgram" | "elevenlabs";
|
|
6938
|
+
kind: "plugin";
|
|
6133
6939
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6134
|
-
options: Record<string, unknown>;
|
|
6135
6940
|
}>, z.ZodObject<{
|
|
6136
6941
|
kind: z.ZodLiteral<"realtime">;
|
|
6137
6942
|
provider: z.ZodEnum<["openai", "google", "xai"]>;
|
|
@@ -6143,13 +6948,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
6143
6948
|
*/
|
|
6144
6949
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6145
6950
|
}, "strip", z.ZodTypeAny, {
|
|
6146
|
-
kind: "realtime";
|
|
6147
|
-
provider: "openai" | "google" | "xai";
|
|
6148
6951
|
options: Record<string, unknown>;
|
|
6149
|
-
}, {
|
|
6150
|
-
kind: "realtime";
|
|
6151
6952
|
provider: "openai" | "google" | "xai";
|
|
6953
|
+
kind: "realtime";
|
|
6954
|
+
}, {
|
|
6152
6955
|
options: Record<string, unknown>;
|
|
6956
|
+
provider: "openai" | "google" | "xai";
|
|
6957
|
+
kind: "realtime";
|
|
6153
6958
|
}>]>>;
|
|
6154
6959
|
vad: z.ZodOptional<z.ZodString>;
|
|
6155
6960
|
vadOptions: z.ZodOptional<z.ZodObject<{
|
|
@@ -6308,52 +7113,52 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
6308
7113
|
excludeTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6309
7114
|
}, "strip", z.ZodTypeAny, {
|
|
6310
7115
|
llm: {
|
|
6311
|
-
kind: "inference";
|
|
6312
7116
|
model: string;
|
|
7117
|
+
kind: "inference";
|
|
6313
7118
|
voice?: string | undefined;
|
|
6314
7119
|
options?: Record<string, unknown> | undefined;
|
|
6315
7120
|
} | {
|
|
6316
|
-
|
|
7121
|
+
options: Record<string, unknown>;
|
|
6317
7122
|
provider: "deepgram" | "elevenlabs";
|
|
7123
|
+
kind: "plugin";
|
|
6318
7124
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6319
|
-
options: Record<string, unknown>;
|
|
6320
7125
|
} | {
|
|
6321
|
-
kind: "realtime";
|
|
6322
|
-
provider: "openai" | "google" | "xai";
|
|
6323
7126
|
options: Record<string, unknown>;
|
|
7127
|
+
provider: "openai" | "google" | "xai";
|
|
7128
|
+
kind: "realtime";
|
|
6324
7129
|
};
|
|
6325
7130
|
name?: string | undefined;
|
|
6326
7131
|
vad?: string | undefined;
|
|
6327
7132
|
stt?: {
|
|
6328
|
-
kind: "inference";
|
|
6329
7133
|
model: string;
|
|
7134
|
+
kind: "inference";
|
|
6330
7135
|
voice?: string | undefined;
|
|
6331
7136
|
options?: Record<string, unknown> | undefined;
|
|
6332
7137
|
} | {
|
|
6333
|
-
|
|
7138
|
+
options: Record<string, unknown>;
|
|
6334
7139
|
provider: "deepgram" | "elevenlabs";
|
|
7140
|
+
kind: "plugin";
|
|
6335
7141
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6336
|
-
options: Record<string, unknown>;
|
|
6337
7142
|
} | {
|
|
6338
|
-
kind: "realtime";
|
|
6339
|
-
provider: "openai" | "google" | "xai";
|
|
6340
7143
|
options: Record<string, unknown>;
|
|
7144
|
+
provider: "openai" | "google" | "xai";
|
|
7145
|
+
kind: "realtime";
|
|
6341
7146
|
} | undefined;
|
|
6342
7147
|
volume?: number | undefined;
|
|
6343
7148
|
tts?: {
|
|
6344
|
-
kind: "inference";
|
|
6345
7149
|
model: string;
|
|
7150
|
+
kind: "inference";
|
|
6346
7151
|
voice?: string | undefined;
|
|
6347
7152
|
options?: Record<string, unknown> | undefined;
|
|
6348
7153
|
} | {
|
|
6349
|
-
|
|
7154
|
+
options: Record<string, unknown>;
|
|
6350
7155
|
provider: "deepgram" | "elevenlabs";
|
|
7156
|
+
kind: "plugin";
|
|
6351
7157
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6352
|
-
options: Record<string, unknown>;
|
|
6353
7158
|
} | {
|
|
6354
|
-
kind: "realtime";
|
|
6355
|
-
provider: "openai" | "google" | "xai";
|
|
6356
7159
|
options: Record<string, unknown>;
|
|
7160
|
+
provider: "openai" | "google" | "xai";
|
|
7161
|
+
kind: "realtime";
|
|
6357
7162
|
} | undefined;
|
|
6358
7163
|
vadOptions?: {
|
|
6359
7164
|
minSpeechDuration?: number | undefined;
|
|
@@ -6402,52 +7207,52 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
6402
7207
|
excludeTools?: string[] | undefined;
|
|
6403
7208
|
}, {
|
|
6404
7209
|
llm: {
|
|
6405
|
-
kind: "inference";
|
|
6406
7210
|
model: string;
|
|
7211
|
+
kind: "inference";
|
|
6407
7212
|
voice?: string | undefined;
|
|
6408
7213
|
options?: Record<string, unknown> | undefined;
|
|
6409
7214
|
} | {
|
|
6410
|
-
|
|
7215
|
+
options: Record<string, unknown>;
|
|
6411
7216
|
provider: "deepgram" | "elevenlabs";
|
|
7217
|
+
kind: "plugin";
|
|
6412
7218
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6413
|
-
options: Record<string, unknown>;
|
|
6414
7219
|
} | {
|
|
6415
|
-
kind: "realtime";
|
|
6416
|
-
provider: "openai" | "google" | "xai";
|
|
6417
7220
|
options: Record<string, unknown>;
|
|
7221
|
+
provider: "openai" | "google" | "xai";
|
|
7222
|
+
kind: "realtime";
|
|
6418
7223
|
};
|
|
6419
7224
|
name?: string | undefined;
|
|
6420
7225
|
vad?: string | undefined;
|
|
6421
7226
|
stt?: {
|
|
6422
|
-
kind: "inference";
|
|
6423
7227
|
model: string;
|
|
7228
|
+
kind: "inference";
|
|
6424
7229
|
voice?: string | undefined;
|
|
6425
7230
|
options?: Record<string, unknown> | undefined;
|
|
6426
7231
|
} | {
|
|
6427
|
-
|
|
7232
|
+
options: Record<string, unknown>;
|
|
6428
7233
|
provider: "deepgram" | "elevenlabs";
|
|
7234
|
+
kind: "plugin";
|
|
6429
7235
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6430
|
-
options: Record<string, unknown>;
|
|
6431
7236
|
} | {
|
|
6432
|
-
kind: "realtime";
|
|
6433
|
-
provider: "openai" | "google" | "xai";
|
|
6434
7237
|
options: Record<string, unknown>;
|
|
7238
|
+
provider: "openai" | "google" | "xai";
|
|
7239
|
+
kind: "realtime";
|
|
6435
7240
|
} | undefined;
|
|
6436
7241
|
volume?: number | undefined;
|
|
6437
7242
|
tts?: {
|
|
6438
|
-
kind: "inference";
|
|
6439
7243
|
model: string;
|
|
7244
|
+
kind: "inference";
|
|
6440
7245
|
voice?: string | undefined;
|
|
6441
7246
|
options?: Record<string, unknown> | undefined;
|
|
6442
7247
|
} | {
|
|
6443
|
-
|
|
7248
|
+
options: Record<string, unknown>;
|
|
6444
7249
|
provider: "deepgram" | "elevenlabs";
|
|
7250
|
+
kind: "plugin";
|
|
6445
7251
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6446
|
-
options: Record<string, unknown>;
|
|
6447
7252
|
} | {
|
|
6448
|
-
kind: "realtime";
|
|
6449
|
-
provider: "openai" | "google" | "xai";
|
|
6450
7253
|
options: Record<string, unknown>;
|
|
7254
|
+
provider: "openai" | "google" | "xai";
|
|
7255
|
+
kind: "realtime";
|
|
6451
7256
|
} | undefined;
|
|
6452
7257
|
vadOptions?: {
|
|
6453
7258
|
minSpeechDuration?: number | undefined;
|
|
@@ -6496,52 +7301,52 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
6496
7301
|
excludeTools?: string[] | undefined;
|
|
6497
7302
|
}>, {
|
|
6498
7303
|
llm: {
|
|
6499
|
-
kind: "inference";
|
|
6500
7304
|
model: string;
|
|
7305
|
+
kind: "inference";
|
|
6501
7306
|
voice?: string | undefined;
|
|
6502
7307
|
options?: Record<string, unknown> | undefined;
|
|
6503
7308
|
} | {
|
|
6504
|
-
|
|
7309
|
+
options: Record<string, unknown>;
|
|
6505
7310
|
provider: "deepgram" | "elevenlabs";
|
|
7311
|
+
kind: "plugin";
|
|
6506
7312
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6507
|
-
options: Record<string, unknown>;
|
|
6508
7313
|
} | {
|
|
6509
|
-
kind: "realtime";
|
|
6510
|
-
provider: "openai" | "google" | "xai";
|
|
6511
7314
|
options: Record<string, unknown>;
|
|
7315
|
+
provider: "openai" | "google" | "xai";
|
|
7316
|
+
kind: "realtime";
|
|
6512
7317
|
};
|
|
6513
7318
|
name?: string | undefined;
|
|
6514
7319
|
vad?: string | undefined;
|
|
6515
7320
|
stt?: {
|
|
6516
|
-
kind: "inference";
|
|
6517
7321
|
model: string;
|
|
7322
|
+
kind: "inference";
|
|
6518
7323
|
voice?: string | undefined;
|
|
6519
7324
|
options?: Record<string, unknown> | undefined;
|
|
6520
7325
|
} | {
|
|
6521
|
-
|
|
7326
|
+
options: Record<string, unknown>;
|
|
6522
7327
|
provider: "deepgram" | "elevenlabs";
|
|
7328
|
+
kind: "plugin";
|
|
6523
7329
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6524
|
-
options: Record<string, unknown>;
|
|
6525
7330
|
} | {
|
|
6526
|
-
kind: "realtime";
|
|
6527
|
-
provider: "openai" | "google" | "xai";
|
|
6528
7331
|
options: Record<string, unknown>;
|
|
7332
|
+
provider: "openai" | "google" | "xai";
|
|
7333
|
+
kind: "realtime";
|
|
6529
7334
|
} | undefined;
|
|
6530
7335
|
volume?: number | undefined;
|
|
6531
7336
|
tts?: {
|
|
6532
|
-
kind: "inference";
|
|
6533
7337
|
model: string;
|
|
7338
|
+
kind: "inference";
|
|
6534
7339
|
voice?: string | undefined;
|
|
6535
7340
|
options?: Record<string, unknown> | undefined;
|
|
6536
7341
|
} | {
|
|
6537
|
-
|
|
7342
|
+
options: Record<string, unknown>;
|
|
6538
7343
|
provider: "deepgram" | "elevenlabs";
|
|
7344
|
+
kind: "plugin";
|
|
6539
7345
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6540
|
-
options: Record<string, unknown>;
|
|
6541
7346
|
} | {
|
|
6542
|
-
kind: "realtime";
|
|
6543
|
-
provider: "openai" | "google" | "xai";
|
|
6544
7347
|
options: Record<string, unknown>;
|
|
7348
|
+
provider: "openai" | "google" | "xai";
|
|
7349
|
+
kind: "realtime";
|
|
6545
7350
|
} | undefined;
|
|
6546
7351
|
vadOptions?: {
|
|
6547
7352
|
minSpeechDuration?: number | undefined;
|
|
@@ -6590,52 +7395,52 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
6590
7395
|
excludeTools?: string[] | undefined;
|
|
6591
7396
|
}, {
|
|
6592
7397
|
llm: {
|
|
6593
|
-
kind: "inference";
|
|
6594
7398
|
model: string;
|
|
7399
|
+
kind: "inference";
|
|
6595
7400
|
voice?: string | undefined;
|
|
6596
7401
|
options?: Record<string, unknown> | undefined;
|
|
6597
7402
|
} | {
|
|
6598
|
-
|
|
7403
|
+
options: Record<string, unknown>;
|
|
6599
7404
|
provider: "deepgram" | "elevenlabs";
|
|
7405
|
+
kind: "plugin";
|
|
6600
7406
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6601
|
-
options: Record<string, unknown>;
|
|
6602
7407
|
} | {
|
|
6603
|
-
kind: "realtime";
|
|
6604
|
-
provider: "openai" | "google" | "xai";
|
|
6605
7408
|
options: Record<string, unknown>;
|
|
7409
|
+
provider: "openai" | "google" | "xai";
|
|
7410
|
+
kind: "realtime";
|
|
6606
7411
|
};
|
|
6607
7412
|
name?: string | undefined;
|
|
6608
7413
|
vad?: string | undefined;
|
|
6609
7414
|
stt?: {
|
|
6610
|
-
kind: "inference";
|
|
6611
7415
|
model: string;
|
|
7416
|
+
kind: "inference";
|
|
6612
7417
|
voice?: string | undefined;
|
|
6613
7418
|
options?: Record<string, unknown> | undefined;
|
|
6614
7419
|
} | {
|
|
6615
|
-
|
|
7420
|
+
options: Record<string, unknown>;
|
|
6616
7421
|
provider: "deepgram" | "elevenlabs";
|
|
7422
|
+
kind: "plugin";
|
|
6617
7423
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6618
|
-
options: Record<string, unknown>;
|
|
6619
7424
|
} | {
|
|
6620
|
-
kind: "realtime";
|
|
6621
|
-
provider: "openai" | "google" | "xai";
|
|
6622
7425
|
options: Record<string, unknown>;
|
|
7426
|
+
provider: "openai" | "google" | "xai";
|
|
7427
|
+
kind: "realtime";
|
|
6623
7428
|
} | undefined;
|
|
6624
7429
|
volume?: number | undefined;
|
|
6625
7430
|
tts?: {
|
|
6626
|
-
kind: "inference";
|
|
6627
7431
|
model: string;
|
|
7432
|
+
kind: "inference";
|
|
6628
7433
|
voice?: string | undefined;
|
|
6629
7434
|
options?: Record<string, unknown> | undefined;
|
|
6630
7435
|
} | {
|
|
6631
|
-
|
|
7436
|
+
options: Record<string, unknown>;
|
|
6632
7437
|
provider: "deepgram" | "elevenlabs";
|
|
7438
|
+
kind: "plugin";
|
|
6633
7439
|
class: "LLM" | "STT" | "STTv2" | "TTS";
|
|
6634
|
-
options: Record<string, unknown>;
|
|
6635
7440
|
} | {
|
|
6636
|
-
kind: "realtime";
|
|
6637
|
-
provider: "openai" | "google" | "xai";
|
|
6638
7441
|
options: Record<string, unknown>;
|
|
7442
|
+
provider: "openai" | "google" | "xai";
|
|
7443
|
+
kind: "realtime";
|
|
6639
7444
|
} | undefined;
|
|
6640
7445
|
vadOptions?: {
|
|
6641
7446
|
minSpeechDuration?: number | undefined;
|
|
@@ -7090,7 +7895,9 @@ export declare type LuaWorkflowBuildCode = 'duplicate-step-id' | 'unknown-step-r
|
|
|
7090
7895
|
/** BAC-2062: the builder mirror of the BAC-619 validator codes: a `waitForSignal` name a delivery refuses. */
|
|
7091
7896
|
| 'signal-name-invalid'
|
|
7092
7897
|
/** BAC-2062: a numeric approval / waitForSignal `timeoutHours` outside 1..720. */
|
|
7093
|
-
| 'timeout-hours-out-of-range' | 'editable-path-invalid' | 'env-template-secret-key' | 'invalid-envelope'
|
|
7898
|
+
| 'timeout-hours-out-of-range' | 'editable-path-invalid' | 'env-template-secret-key' | 'invalid-envelope'
|
|
7899
|
+
/** BAC-2341: a `concurrencyKey` declared without `concurrencyPolicy:'forbid'` (the server's 400 twin). */
|
|
7900
|
+
| 'concurrency-key-requires-forbid' | 'invalid-step' | 'invalid-step-id' | 'invalid-workflow-name' | 'schedule-input-required' | 'schedule-input-invalid' | 'hitl-duration-defaulted' | 'WORKFLOW_UNPLACED_STEP';
|
|
7094
7901
|
|
|
7095
7902
|
export declare interface LuaWorkflowBuilder {
|
|
7096
7903
|
then(step: StepRef): this;
|
|
@@ -7157,6 +7964,11 @@ export declare interface LuaWorkflowConfig {
|
|
|
7157
7964
|
stateSchema?: ZodType;
|
|
7158
7965
|
/** 'forbid' = jobs-style overlap guard per workflow (D21-r1) — every start path gets 409 `RUNS_IN_FLIGHT`. */
|
|
7159
7966
|
concurrencyPolicy?: 'allow' | 'forbid';
|
|
7967
|
+
/**
|
|
7968
|
+
* Scope the `forbid` overlap guard per correlation key instead of workflow-wide. Requires `concurrencyPolicy:'forbid'`;
|
|
7969
|
+
* absent means workflow-wide. Rides the manifest and the push body, not the graph envelope or `graphHash`.
|
|
7970
|
+
*/
|
|
7971
|
+
concurrencyKey?: 'correlationKey';
|
|
7160
7972
|
/** Who may READ this workflow's run outputs beyond `workflows:read-outputs` holders (B44). Envelope member outside `graphHash`. */
|
|
7161
7973
|
outputVisibility?: WorkflowOutputVisibility;
|
|
7162
7974
|
/**
|
|
@@ -7463,6 +8275,20 @@ export declare const notExists: (ref: TypedRef<unknown>) => LuaPredicate;
|
|
|
7463
8275
|
|
|
7464
8276
|
export declare const notIn: <T extends string | number | boolean | null>(v: TypedRef<T>, set: T[]) => LuaPredicate;
|
|
7465
8277
|
|
|
8278
|
+
export declare interface OddsAnswer {
|
|
8279
|
+
type: 'odds';
|
|
8280
|
+
odds: number;
|
|
8281
|
+
}
|
|
8282
|
+
|
|
8283
|
+
export declare interface OddsQuestion {
|
|
8284
|
+
type: 'odds';
|
|
8285
|
+
instructions: string;
|
|
8286
|
+
criteria?: {
|
|
8287
|
+
yes?: string;
|
|
8288
|
+
no?: string;
|
|
8289
|
+
};
|
|
8290
|
+
}
|
|
8291
|
+
|
|
7466
8292
|
export declare const or: (...args: LuaPredicate[]) => LuaPredicate;
|
|
7467
8293
|
|
|
7468
8294
|
/**
|
|
@@ -8447,6 +9273,10 @@ declare const REASONING_EFFORT_VALUES: readonly ["off", "minimal", "low", "mediu
|
|
|
8447
9273
|
|
|
8448
9274
|
declare type ReasoningEffort = (typeof REASONING_EFFORT_VALUES)[number];
|
|
8449
9275
|
|
|
9276
|
+
export declare interface RefusedAnswer {
|
|
9277
|
+
type: 'refused';
|
|
9278
|
+
}
|
|
9279
|
+
|
|
8450
9280
|
export declare type ReplyChannel = 'whatsapp' | 'sms' | 'email' | 'webchat' | 'slack';
|
|
8451
9281
|
|
|
8452
9282
|
declare interface RequestCredential {
|
|
@@ -8580,6 +9410,26 @@ declare interface ScopedPromoteFields {
|
|
|
8580
9410
|
agentVersion?: number;
|
|
8581
9411
|
}
|
|
8582
9412
|
|
|
9413
|
+
export declare interface ScoreAnswer {
|
|
9414
|
+
type: 'score';
|
|
9415
|
+
score: number;
|
|
9416
|
+
level: string;
|
|
9417
|
+
confidence: number;
|
|
9418
|
+
probabilities: Record<string, number>;
|
|
9419
|
+
uncertain: boolean;
|
|
9420
|
+
}
|
|
9421
|
+
|
|
9422
|
+
export declare interface ScoreLevel {
|
|
9423
|
+
label: string;
|
|
9424
|
+
description: string;
|
|
9425
|
+
}
|
|
9426
|
+
|
|
9427
|
+
export declare interface ScoreQuestion {
|
|
9428
|
+
type: 'score';
|
|
9429
|
+
instructions: string;
|
|
9430
|
+
levels: ReadonlyArray<string | ScoreLevel>;
|
|
9431
|
+
}
|
|
9432
|
+
|
|
8583
9433
|
/**
|
|
8584
9434
|
* Response from product search.
|
|
8585
9435
|
*/
|
|
@@ -8776,6 +9626,14 @@ export declare interface SecretTestOutcome {
|
|
|
8776
9626
|
|
|
8777
9627
|
export declare type SecretTestResult = (typeof SECRET_TEST_RESULTS)[number];
|
|
8778
9628
|
|
|
9629
|
+
declare interface SelectorInput extends BrowserSessionInput {
|
|
9630
|
+
selector: string;
|
|
9631
|
+
}
|
|
9632
|
+
|
|
9633
|
+
declare interface SelectorTextInput extends SelectorInput {
|
|
9634
|
+
text: string;
|
|
9635
|
+
}
|
|
9636
|
+
|
|
8779
9637
|
declare interface SendTemplateButtonValue {
|
|
8780
9638
|
sub_type: WhatsAppTemplateButtonType;
|
|
8781
9639
|
index: string;
|
|
@@ -9393,7 +10251,7 @@ export declare const Templates: {
|
|
|
9393
10251
|
};
|
|
9394
10252
|
|
|
9395
10253
|
/** Recorded effect kinds (DOC2 §7 seam table; `fetch` is sandbox egress record mode, §9.1). */
|
|
9396
|
-
declare const TEST_EFFECT_KINDS: readonly ["channel.send", "whatsapp.template", "whatsapp.reaction", "whatsapp.phone_request", "email.send", "inbox.push", "voice.call", "passthrough", "mcp.tool", "supervision.write", "user.update_name", "browser.action", "jobs.create", "fetch", "refused", "metrics.record", "threads.open", "threads.follow_up", "secrets.request", "connection_request.create", "connection_request.reconnect", "connection_request.cancel", "ai.generate"];
|
|
10254
|
+
declare const TEST_EFFECT_KINDS: readonly ["channel.send", "whatsapp.template", "whatsapp.reaction", "whatsapp.phone_request", "email.send", "inbox.push", "voice.call", "passthrough", "mcp.tool", "supervision.write", "user.update_name", "browser.action", "jobs.create", "fetch", "refused", "metrics.record", "threads.open", "threads.follow_up", "secrets.request", "connection_request.create", "connection_request.reconnect", "connection_request.cancel", "ai.generate", "decisions.ask"];
|
|
9397
10255
|
|
|
9398
10256
|
declare type TestEffectKind = (typeof TEST_EFFECT_KINDS)[number];
|
|
9399
10257
|
|
|
@@ -9747,6 +10605,10 @@ declare interface UpdateJobVersionDTO {
|
|
|
9747
10605
|
metadata?: Record<string, any>;
|
|
9748
10606
|
}
|
|
9749
10607
|
|
|
10608
|
+
declare interface UrlInput extends BrowserSessionInput {
|
|
10609
|
+
url: string;
|
|
10610
|
+
}
|
|
10611
|
+
|
|
9750
10612
|
/**
|
|
9751
10613
|
* Function type for resolving URL at runtime.
|
|
9752
10614
|
* Use env() inside to access agent environment variables.
|