@runtypelabs/cli 2.32.0 → 2.32.1
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/index.js +132 -7
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -15395,7 +15395,7 @@ function renderDefaultModelStrengthsGuide() {
|
|
|
15395
15395
|
).join("\n");
|
|
15396
15396
|
}
|
|
15397
15397
|
|
|
15398
|
-
// ../shared/dist/chunk-
|
|
15398
|
+
// ../shared/dist/chunk-UB6BK3TZ.mjs
|
|
15399
15399
|
function getNestedValue(obj, path20) {
|
|
15400
15400
|
let normalizedPath = path20;
|
|
15401
15401
|
normalizedPath = normalizedPath.replace(/^\$\.?/, "");
|
|
@@ -17164,6 +17164,14 @@ var AGENT_CONTENT_CONFIG_KEYS = {
|
|
|
17164
17164
|
tenancyStrategy: true
|
|
17165
17165
|
};
|
|
17166
17166
|
var AGENT_CONTENT_CONFIG_KEY_LIST = Object.keys(AGENT_CONTENT_CONFIG_KEYS).sort();
|
|
17167
|
+
function stripTrailingChars(value, char) {
|
|
17168
|
+
const code = char.charCodeAt(0);
|
|
17169
|
+
let end = value.length;
|
|
17170
|
+
while (end > 0 && value.charCodeAt(end - 1) === code) {
|
|
17171
|
+
end--;
|
|
17172
|
+
}
|
|
17173
|
+
return end === value.length ? value : value.slice(0, end);
|
|
17174
|
+
}
|
|
17167
17175
|
var configurationStatusSchema = external_exports.enum(["configured", "needs_configuration", "invalid"]);
|
|
17168
17176
|
var secretDocsUrlSchema = external_exports.url({ protocol: /^https$/ }).max(2048);
|
|
17169
17177
|
var secretRequirementSourceSchema = external_exports.object({
|
|
@@ -22641,6 +22649,24 @@ var EMIT_ARTIFACT_MARKDOWN_TOOL_ID = "emit_artifact_markdown";
|
|
|
22641
22649
|
var EMIT_ARTIFACT_COMPONENT_TOOL_ID = "emit_artifact_component";
|
|
22642
22650
|
var EMIT_ARTIFACT_MARKDOWN_FULL_ID = `builtin:${EMIT_ARTIFACT_MARKDOWN_TOOL_ID}`;
|
|
22643
22651
|
var EMIT_ARTIFACT_COMPONENT_FULL_ID = `builtin:${EMIT_ARTIFACT_COMPONENT_TOOL_ID}`;
|
|
22652
|
+
var IMPLICIT_ARTIFACT_TOOLS = [
|
|
22653
|
+
{
|
|
22654
|
+
artifactType: "component",
|
|
22655
|
+
toolIds: [
|
|
22656
|
+
"browser:request_handoff",
|
|
22657
|
+
"builtin:browser:request_handoff",
|
|
22658
|
+
"browser-request-handoff",
|
|
22659
|
+
"builtin:browser-request-handoff",
|
|
22660
|
+
"browser:handoff",
|
|
22661
|
+
"builtin:browser:handoff"
|
|
22662
|
+
]
|
|
22663
|
+
}
|
|
22664
|
+
];
|
|
22665
|
+
var IMPLICIT_ARTIFACT_TYPE_BY_TOOL_ID = new Map(
|
|
22666
|
+
IMPLICIT_ARTIFACT_TOOLS.flatMap(
|
|
22667
|
+
({ artifactType, toolIds }) => toolIds.map((id) => [id, artifactType])
|
|
22668
|
+
)
|
|
22669
|
+
);
|
|
22644
22670
|
var ORTHOGONAL_PLATFORM_TOOLS = [
|
|
22645
22671
|
{
|
|
22646
22672
|
"id": "orthogonal:agentmail:create_draft",
|
|
@@ -34953,6 +34979,106 @@ var CORE_BUILTIN_TOOLS_REGISTRY = [
|
|
|
34953
34979
|
executionHint: "platform",
|
|
34954
34980
|
platformKeySupport: true
|
|
34955
34981
|
},
|
|
34982
|
+
// -----------------------------------------------------------------------
|
|
34983
|
+
// Live View + human-in-the-loop handoff.
|
|
34984
|
+
// A Live View URL lets a person watch and drive the same browser session the
|
|
34985
|
+
// agent is using; a handoff formally parks the agent until they are done.
|
|
34986
|
+
// -----------------------------------------------------------------------
|
|
34987
|
+
{
|
|
34988
|
+
id: "browser:get_live_view",
|
|
34989
|
+
aliases: ["browser-get-live-view", "browser:live-view"],
|
|
34990
|
+
name: "Browser Live View",
|
|
34991
|
+
description: 'Get a shareable Live View URL for a browser session: a link a person can open to watch the live page and interact with it directly. Use it to show someone what the browser is doing. Anyone holding the link can control the session, so share it only with the person you are helping. Defaults to "tab" mode, the only mode that supports handoff. If you need a human to actually DO something (sign in, solve a CAPTCHA, complete MFA), use browser:request_handoff instead \u2014 it returns the same kind of URL and also tracks when they finish.',
|
|
34992
|
+
category: BuiltInToolCategory.BROWSER,
|
|
34993
|
+
toolGroup: BuiltInToolGroup.BROWSER_USE,
|
|
34994
|
+
providers: [BuiltInToolProvider.MULTI],
|
|
34995
|
+
parametersSchema: {
|
|
34996
|
+
type: "object",
|
|
34997
|
+
properties: {
|
|
34998
|
+
sessionId: {
|
|
34999
|
+
type: "string",
|
|
35000
|
+
description: "The session ID returned by browser:open"
|
|
35001
|
+
},
|
|
35002
|
+
mode: {
|
|
35003
|
+
type: "string",
|
|
35004
|
+
description: 'Live View layout. "tab" shows just the page and is the only mode that supports handoff. "full" and "devtools" expose the DevTools frontend.',
|
|
35005
|
+
enum: ["tab", "full", "devtools"],
|
|
35006
|
+
default: "tab"
|
|
35007
|
+
},
|
|
35008
|
+
expiresInMs: {
|
|
35009
|
+
type: "number",
|
|
35010
|
+
description: "How long the URL stays valid, in milliseconds (min 60000, max 3600000). Defaults to 600000 (10 minutes).",
|
|
35011
|
+
minimum: 6e4,
|
|
35012
|
+
maximum: 36e5,
|
|
35013
|
+
default: 6e5
|
|
35014
|
+
}
|
|
35015
|
+
},
|
|
35016
|
+
required: ["sessionId"]
|
|
35017
|
+
},
|
|
35018
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
35019
|
+
requiresApiKey: false,
|
|
35020
|
+
executionHint: "platform",
|
|
35021
|
+
platformKeySupport: true
|
|
35022
|
+
},
|
|
35023
|
+
{
|
|
35024
|
+
id: "browser:request_handoff",
|
|
35025
|
+
aliases: ["browser-request-handoff", "browser:handoff"],
|
|
35026
|
+
name: "Browser Handoff to Human",
|
|
35027
|
+
description: 'Hand control of a browser session to a human, then continue once they are done. Use this the moment the page needs something you cannot or should not do yourself: a login form, an MFA or 2FA prompt, a CAPTCHA, a payment step, or any decision that needs a person. Never guess at credentials \u2014 hand off instead.\n\nWrite "instructions" as a specific, actionable request that names exactly what to do and what should be true when they finish, for example: "Sign in with the team Google account, approve the 2FA prompt on your phone, and stop once the billing dashboard is visible." The human reads this text next to the live page.\n\nThis tool returns IMMEDIATELY and does not wait for the human \u2014 a handoff can take many minutes while a single tool call is capped at 30 seconds. It normally returns "status": "active" plus a Live View URL the person opens to drive the page; they click "Done" or "Failed" in the Live View UI when finished. If the person happens to finish before this call returns it comes back with "status": "completed" and no URL: the work is already done, so do not poll and do not share a link, just carry on. After calling it: share the Live View URL with the user, then poll browser:get_handoff_state until its "status" is "completed" before doing anything else with the session. Only one handoff can be active per session, and a session allows a limited number of handoffs in total, so do not re-request one while polling.\n\nIf a client tool named "wait_for_human_handoff" is present in your tool list, call it immediately after this tool with { liveViewUrl, handoffId, instructions } from this result; it renders the live page inline for the person. Skip it if no such tool is listed.',
|
|
35028
|
+
category: BuiltInToolCategory.BROWSER,
|
|
35029
|
+
toolGroup: BuiltInToolGroup.BROWSER_USE,
|
|
35030
|
+
providers: [BuiltInToolProvider.MULTI],
|
|
35031
|
+
parametersSchema: {
|
|
35032
|
+
type: "object",
|
|
35033
|
+
properties: {
|
|
35034
|
+
sessionId: {
|
|
35035
|
+
type: "string",
|
|
35036
|
+
description: "The session ID returned by browser:open"
|
|
35037
|
+
},
|
|
35038
|
+
instructions: {
|
|
35039
|
+
type: "string",
|
|
35040
|
+
description: "What the human should do, in specific and actionable terms. Shown to them alongside the live page.",
|
|
35041
|
+
minLength: 1,
|
|
35042
|
+
maxLength: 4e3
|
|
35043
|
+
},
|
|
35044
|
+
timeoutMs: {
|
|
35045
|
+
type: "number",
|
|
35046
|
+
description: "How long to wait for the human, in milliseconds (min 30000, max 1800000). Defaults to 600000 (10 minutes). When it elapses the handoff completes with success=false.",
|
|
35047
|
+
minimum: 3e4,
|
|
35048
|
+
maximum: 18e5,
|
|
35049
|
+
default: 6e5
|
|
35050
|
+
}
|
|
35051
|
+
},
|
|
35052
|
+
required: ["sessionId", "instructions"]
|
|
35053
|
+
},
|
|
35054
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
35055
|
+
requiresApiKey: false,
|
|
35056
|
+
executionHint: "platform",
|
|
35057
|
+
platformKeySupport: true
|
|
35058
|
+
},
|
|
35059
|
+
{
|
|
35060
|
+
id: "browser:get_handoff_state",
|
|
35061
|
+
aliases: ["browser-get-handoff-state", "browser:handoff-state"],
|
|
35062
|
+
name: "Browser Handoff State",
|
|
35063
|
+
description: 'Check whether a browser session is still waiting on a human or the handoff has finished. Returns "status": "active" while the person is working, "completed" once they clicked Done or Failed (or the handoff timed out), and "none" if no handoff was ever requested. A completed result also carries the "success" verdict and any reason they gave. Poll this after browser:request_handoff rather than blocking; it returns fast. Keep polling while status is "active"; once it is "completed", resume the task. If "success" is false or absent, take a screenshot with browser:session-screenshot to confirm the real page state before you continue. A result with "reconciled": false means the browser could not be consulted and the status is a best guess, so poll again before acting on it.',
|
|
35064
|
+
category: BuiltInToolCategory.BROWSER,
|
|
35065
|
+
toolGroup: BuiltInToolGroup.BROWSER_USE,
|
|
35066
|
+
providers: [BuiltInToolProvider.MULTI],
|
|
35067
|
+
parametersSchema: {
|
|
35068
|
+
type: "object",
|
|
35069
|
+
properties: {
|
|
35070
|
+
sessionId: {
|
|
35071
|
+
type: "string",
|
|
35072
|
+
description: "The session ID returned by browser:open"
|
|
35073
|
+
}
|
|
35074
|
+
},
|
|
35075
|
+
required: ["sessionId"]
|
|
35076
|
+
},
|
|
35077
|
+
documentationUrl: BROWSER_SESSION_DOCUMENTATION_URL,
|
|
35078
|
+
requiresApiKey: false,
|
|
35079
|
+
executionHint: "platform",
|
|
35080
|
+
platformKeySupport: true
|
|
35081
|
+
},
|
|
34956
35082
|
{
|
|
34957
35083
|
id: "browser:agent",
|
|
34958
35084
|
aliases: ["browser-agent", "browser:task", "browser-task"],
|
|
@@ -41541,10 +41667,7 @@ function extractSecretReferencesFromAnyValue(value, maxDepth = 10) {
|
|
|
41541
41667
|
}
|
|
41542
41668
|
var ACCOUNT_QUERY_PARAM = "account";
|
|
41543
41669
|
function buildDashboardUrl(opts) {
|
|
41544
|
-
|
|
41545
|
-
while (base.endsWith("/")) {
|
|
41546
|
-
base = base.slice(0, -1);
|
|
41547
|
-
}
|
|
41670
|
+
const base = stripTrailingChars(opts.baseUrl, "/");
|
|
41548
41671
|
const path20 = opts.path.startsWith("/") ? opts.path : `/${opts.path}`;
|
|
41549
41672
|
const params = new URLSearchParams();
|
|
41550
41673
|
if (isValidAccountId(opts.account)) {
|
|
@@ -44372,6 +44495,7 @@ ${orthogonalLines.join("\n")}
|
|
|
44372
44495
|
- **Rendered web pages, screenshots, structured extraction, or link harvesting** \u2192 \`builtin:browser:markdown\`, \`builtin:browser:snapshot\`, \`builtin:browser:json\`, \`builtin:browser:scrape\`, \`builtin:browser:links\` (stateless, one-shot \u2014 cheap, no session overhead)
|
|
44373
44496
|
- **Autonomous browsing (just want the outcome \u2014 extract data, complete a form, find info on a page)** \u2192 \`builtin:browser:agent\` with a natural-language \`goal\` plus \`startUrl\` (fresh browser) or \`sessionId\` (continue an existing session). Stagehand handles observe/act/extract; you get back text or, with an \`outputSchema\`, structured JSON. Try this BEFORE reaching for the manual session tools below.
|
|
44374
44497
|
- **Interactive browsing (precise control over individual actions)** \u2192 \`builtin:browser:open\` to start a session, then \`builtin:browser:click\`, \`builtin:browser:type\`, \`builtin:browser:scroll\`, \`builtin:browser:session-screenshot\`, \`builtin:browser:evaluate\`, \`builtin:browser:navigate\`, and \`builtin:browser:close\` when done. Session tools maintain cookies and page state across calls but cost more than stateless tools \u2014 prefer stateless tools when a single page read suffices.
|
|
44498
|
+
- **A browser session hits a login, MFA, CAPTCHA, or payment wall** \u2192 \`builtin:browser:request_handoff\` hands the live page to a human via a shareable Live View URL and returns immediately; poll \`builtin:browser:get_handoff_state\` until they finish. \`builtin:browser:get_live_view\` alone just mints a watch/drive URL without parking the agent. Add these to any agent that browses sites requiring authentication.
|
|
44375
44499
|
- **Multi-page rendered crawling** \u2192 use the flow \`crawl\` step instead of repeated \`browser:*\` tool calls
|
|
44376
44500
|
- **Find people / company enrichment** \u2192 \`platform:orthogonal:apollo:people_match\`, \`platform:orthogonal:apollo:organization_enrich\`
|
|
44377
44501
|
- **Send Slack message** \u2192 \`builtin:slack:send_message\`
|
|
@@ -44438,6 +44562,7 @@ Tools are added to prompt steps via \`tools: { toolIds: ["<id>"] }\`. The AI mod
|
|
|
44438
44562
|
- **Rendered web pages, screenshots, structured extraction, or link harvesting** \u2192 \`builtin:browser:markdown\`, \`builtin:browser:snapshot\`, \`builtin:browser:json\`, \`builtin:browser:scrape\`, \`builtin:browser:links\` (stateless, one-shot)
|
|
44439
44563
|
- **Autonomous browsing (just want the outcome)** \u2192 \`builtin:browser:agent\` with a natural-language \`goal\` plus \`startUrl\` or \`sessionId\` \u2014 try this BEFORE the manual session tools
|
|
44440
44564
|
- **Interactive browsing (precise control)** \u2192 \`builtin:browser:open\`, then \`builtin:browser:click\` / \`type\` / \`scroll\` / \`session-screenshot\` / \`evaluate\` / \`navigate\`, and \`builtin:browser:close\` when done
|
|
44565
|
+
- **Login / MFA / CAPTCHA wall in a browser session** \u2192 \`builtin:browser:request_handoff\` (hands the live page to a human, returns immediately) + \`builtin:browser:get_handoff_state\` to poll for completion
|
|
44441
44566
|
- **Multi-page rendered crawling** \u2192 use the flow \`crawl\` step instead of repeated \`browser:*\` calls
|
|
44442
44567
|
- **Find people / company enrichment** \u2192 \`platform:orthogonal:apollo:people_match\`, \`platform:orthogonal:apollo:organization_enrich\`
|
|
44443
44568
|
- **Send Slack message** \u2192 \`builtin:slack:send_message\`
|
|
@@ -68362,8 +68487,8 @@ import { execFileSync } from "child_process";
|
|
|
68362
68487
|
// src/lib/persona-init.ts
|
|
68363
68488
|
init_credential_store();
|
|
68364
68489
|
|
|
68365
|
-
// ../../node_modules/.pnpm/@runtypelabs+persona@4.
|
|
68366
|
-
var w = "4.
|
|
68490
|
+
// ../../node_modules/.pnpm/@runtypelabs+persona@4.13.0/node_modules/@runtypelabs/persona/dist/codegen.js
|
|
68491
|
+
var w = "4.13.0";
|
|
68367
68492
|
var S = w;
|
|
68368
68493
|
function b(e) {
|
|
68369
68494
|
return e?.cdnBase?.trim().replace(/\/+$/, "").replace(/[\\'"<>`]/g, (r) => `%${r.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0")}`) || `https://cdn.jsdelivr.net/npm/@runtypelabs/persona@${S}/dist`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runtypelabs/cli",
|
|
3
|
-
"version": "2.32.
|
|
3
|
+
"version": "2.32.1",
|
|
4
4
|
"description": "Command-line interface for Runtype AI platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"rosie-skills": "0.8.1",
|
|
28
28
|
"yaml": "^2.9.0",
|
|
29
29
|
"@runtypelabs/ink-components": "0.3.5",
|
|
30
|
-
"@runtypelabs/sdk": "6.3.
|
|
30
|
+
"@runtypelabs/sdk": "6.3.5",
|
|
31
31
|
"@runtypelabs/terminal-animations": "0.2.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@modelcontextprotocol/server": "2.0.0",
|
|
35
|
-
"@runtypelabs/persona": "4.
|
|
35
|
+
"@runtypelabs/persona": "4.13.0",
|
|
36
36
|
"@types/express": "^5.0.6",
|
|
37
37
|
"@types/micromatch": "^4.0.9",
|
|
38
38
|
"@types/node": "^25.3.3",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"tsx": "^4.7.1",
|
|
44
44
|
"typescript": "^6.0.3",
|
|
45
45
|
"vitest": "^4.1.0",
|
|
46
|
-
"@runtypelabs/shared": "3.9.
|
|
46
|
+
"@runtypelabs/shared": "3.9.1"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
49
|
"node": ">=22.12.0"
|