farai 0.2.6 → 0.2.7
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/cli/index.js +26 -12
- package/dist/cli/index.js.map +6 -6
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -7419,8 +7419,8 @@ var init_process_output = __esm(() => {
|
|
|
7419
7419
|
|
|
7420
7420
|
// src/version.ts
|
|
7421
7421
|
function resolveFaraiVersion() {
|
|
7422
|
-
if ("0.2.
|
|
7423
|
-
return "0.2.
|
|
7422
|
+
if ("0.2.7")
|
|
7423
|
+
return "0.2.7";
|
|
7424
7424
|
try {
|
|
7425
7425
|
const parsed = JSON.parse(readBoundedFileTextSync(new URL("../package.json", import.meta.url), 1024 * 1024, "package metadata"));
|
|
7426
7426
|
if (typeof parsed.version === "string" && parsed.version)
|
|
@@ -26107,6 +26107,9 @@ function emailMessageResult(action, emailId, address, message) {
|
|
|
26107
26107
|
}
|
|
26108
26108
|
};
|
|
26109
26109
|
}
|
|
26110
|
+
function formatWaitCriteria(match) {
|
|
26111
|
+
return [match.from ? `sender containing ${JSON.stringify(match.from)}` : undefined, match.subject ? `subject containing ${JSON.stringify(match.subject)}` : undefined, match.body ? `body containing ${JSON.stringify(match.body)}` : undefined].filter((value) => value !== undefined).join(" and ");
|
|
26112
|
+
}
|
|
26110
26113
|
function formatResource(resource) {
|
|
26111
26114
|
return [`${resource.label} \xB7 ${resource.address}`, `id: ${resource.id}`, [resource.type, resource.provider, resource.status, ...resource.roles].join(" \xB7 ")].join(`
|
|
26112
26115
|
`);
|
|
@@ -26323,7 +26326,7 @@ var init_email = __esm(() => {
|
|
|
26323
26326
|
};
|
|
26324
26327
|
emailWaitTool = {
|
|
26325
26328
|
name: "email_wait",
|
|
26326
|
-
description: "Wait for a matching message in one email resource using its exact Farai UUID. Use this for verification links, OTP codes, password resets, and asynchronous registrations.
|
|
26329
|
+
description: "Wait for a matching message in one email resource using its exact Farai UUID. Use this for verification links, OTP codes, password resets, and asynchronous registrations. Every supplied from, subject, and body filter is a strict case-insensitive substring condition and all supplied filters must match. Do not guess a subject or sender; omit filters when any message in an isolated temporary inbox is acceptable. The returned message UUID can be passed directly to email_read.",
|
|
26327
26330
|
inputSchema: {
|
|
26328
26331
|
type: "object",
|
|
26329
26332
|
required: ["emailId"],
|
|
@@ -26334,15 +26337,15 @@ var init_email = __esm(() => {
|
|
|
26334
26337
|
},
|
|
26335
26338
|
from: {
|
|
26336
26339
|
type: "string",
|
|
26337
|
-
description: "
|
|
26340
|
+
description: "Strict case-insensitive sender substring; omit when the sender is not known"
|
|
26338
26341
|
},
|
|
26339
26342
|
subject: {
|
|
26340
26343
|
type: "string",
|
|
26341
|
-
description: "
|
|
26344
|
+
description: "Strict case-insensitive subject substring; omit rather than guessing the subject"
|
|
26342
26345
|
},
|
|
26343
26346
|
body: {
|
|
26344
26347
|
type: "string",
|
|
26345
|
-
description: "
|
|
26348
|
+
description: "Strict case-insensitive message-body substring; use only when the expected body text is known"
|
|
26346
26349
|
},
|
|
26347
26350
|
unreadOnly: {
|
|
26348
26351
|
type: "boolean",
|
|
@@ -26390,16 +26393,20 @@ var init_email = __esm(() => {
|
|
|
26390
26393
|
} : {}
|
|
26391
26394
|
}, context.signal);
|
|
26392
26395
|
if (!providerMessage) {
|
|
26396
|
+
const criteria = formatWaitCriteria(match);
|
|
26393
26397
|
return {
|
|
26394
26398
|
ok: true,
|
|
26395
26399
|
summary: `no matching email arrived in ${source.address} within ${Math.round(timeoutMs / 1000)} seconds`,
|
|
26396
|
-
output: "no
|
|
26400
|
+
output: criteria ? `no message matched ${criteria} before the timeout` : "no email arrived before the timeout",
|
|
26397
26401
|
metadata: {
|
|
26398
26402
|
emailAction: "wait",
|
|
26399
26403
|
emailId,
|
|
26400
26404
|
address: source.address,
|
|
26401
26405
|
source: source.kind,
|
|
26402
|
-
timedOut: true
|
|
26406
|
+
timedOut: true,
|
|
26407
|
+
...criteria ? {
|
|
26408
|
+
criteria
|
|
26409
|
+
} : {}
|
|
26403
26410
|
}
|
|
26404
26411
|
};
|
|
26405
26412
|
}
|
|
@@ -47978,7 +47985,7 @@ function presentToolActivity(input) {
|
|
|
47978
47985
|
const text2 = active ? input.liveOutput ?? input.result ?? "" : input.result ?? input.fullResult ?? "";
|
|
47979
47986
|
const metadata = input.toolResult?.metadata ?? {};
|
|
47980
47987
|
const family = toolFamily(tool);
|
|
47981
|
-
const title = toolTitle(tool, args, input.status, 240);
|
|
47988
|
+
const title = tool === "email_wait" && !active && metadata.timedOut === true ? emailWaitTimeoutTitle(args) : toolTitle(tool, args, input.status, 240);
|
|
47982
47989
|
const warning = hasWarning(input.toolResult, text2);
|
|
47983
47990
|
const preview = toolPreview(tool, args, text2, metadata, active);
|
|
47984
47991
|
const outcome = toolOutcome(tool, args, text2, metadata, input.toolResult, active);
|
|
@@ -48137,6 +48144,10 @@ function compactActivityLabel(tool, args, title) {
|
|
|
48137
48144
|
return `flow ${stringValue2(args.flowId) ?? "request"}`;
|
|
48138
48145
|
return title;
|
|
48139
48146
|
}
|
|
48147
|
+
function emailWaitTimeoutTitle(args) {
|
|
48148
|
+
const filter = stringValue2(args.subject) ?? stringValue2(args.from);
|
|
48149
|
+
return truncateTerminal(`no matching email${filter ? ` \xB7 ${filter}` : ""}`, 240);
|
|
48150
|
+
}
|
|
48140
48151
|
function toolOutcome(tool, args, text2, metadata, result, active) {
|
|
48141
48152
|
if (active)
|
|
48142
48153
|
return liveOutcome(text2);
|
|
@@ -48408,6 +48419,8 @@ function proxyOutcome(metadata, summary2, text2) {
|
|
|
48408
48419
|
function hasWarning(result, text2) {
|
|
48409
48420
|
if (!result)
|
|
48410
48421
|
return false;
|
|
48422
|
+
if (result.metadata?.emailAction === "wait" && result.metadata.timedOut === true)
|
|
48423
|
+
return true;
|
|
48411
48424
|
if (result.metadata?.exactProtocolVerificationRequired === true || result.metadata?.snapshotError)
|
|
48412
48425
|
return true;
|
|
48413
48426
|
if (arrayValue2(result.metadata?.failures).length > 0)
|
|
@@ -48498,6 +48511,7 @@ function formatBytes(bytes) {
|
|
|
48498
48511
|
var BROWSER_TOOLS, WORKSPACE_TOOLS, RECON_TOOLS, HTTP_TOOLS;
|
|
48499
48512
|
var init_tool_activity = __esm(() => {
|
|
48500
48513
|
init_tool_names();
|
|
48514
|
+
init_terminal_text();
|
|
48501
48515
|
init_tool_presentation();
|
|
48502
48516
|
BROWSER_TOOLS = new Set(["browser_navigate", "browser_snapshot", "browser_find", "browser_click", "browser_fill_form", "browser_type", "browser_press_key", "browser_wait_for", "browser_tabs", "browser_network_requests", "browser_network_request"]);
|
|
48503
48517
|
WORKSPACE_TOOLS = new Set(["fs_read", "fs_list", "fs_grep", "fs_write", "fs_edit", "patch_apply", "notebook_edit", "git_status", "git_diff", "lsp_inspect", "tool_output_read", "code_write_script"]);
|
|
@@ -55418,7 +55432,7 @@ var init_theme = __esm(() => {
|
|
|
55418
55432
|
warning: "#d7af5f",
|
|
55419
55433
|
error: "#ff5f5f",
|
|
55420
55434
|
success: "#87d75f",
|
|
55421
|
-
bg: "
|
|
55435
|
+
bg: "transparent",
|
|
55422
55436
|
backdrop: "rgba(0,0,0,0.5)",
|
|
55423
55437
|
panel: "#101010",
|
|
55424
55438
|
userMessageBg: "#1f1f1f",
|
|
@@ -61524,7 +61538,7 @@ var init_composer2 = __esm(() => {
|
|
|
61524
61538
|
focusTintStart = [22, 33, 38];
|
|
61525
61539
|
focusTintEnd = [16, 16, 16];
|
|
61526
61540
|
inactiveComposerBackground = RGBA.fromInts(...focusTintEnd);
|
|
61527
|
-
composerPageBackground = RGBA.fromInts(0, 0, 0);
|
|
61541
|
+
composerPageBackground = RGBA.fromInts(0, 0, 0, 0);
|
|
61528
61542
|
focusTintPalettes = new Map;
|
|
61529
61543
|
composerEdgeRuns = new Map;
|
|
61530
61544
|
});
|
|
@@ -69650,5 +69664,5 @@ Examples:
|
|
|
69650
69664
|
`);
|
|
69651
69665
|
}
|
|
69652
69666
|
|
|
69653
|
-
//# debugId=
|
|
69667
|
+
//# debugId=C611ADC20CC5D27764756E2164756E21
|
|
69654
69668
|
//# sourceMappingURL=index.js.map
|