unbrowse 6.11.0 → 6.12.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/cli.js +3 -19
- package/dist/mcp.js +4 -10
- package/dist/server.js +7 -125
- package/package.json +1 -1
- package/vendor/kuri/darwin-arm64/kuri +0 -0
- package/vendor/kuri/manifest.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ var __promiseAll = (args) => Promise.all(args);
|
|
|
20
20
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
21
21
|
|
|
22
22
|
// ../../src/build-info.generated.ts
|
|
23
|
-
var BUILD_RELEASE_VERSION = "6.
|
|
23
|
+
var BUILD_RELEASE_VERSION = "6.12.0", BUILD_GIT_SHA = "cbea913e06cf", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiNi4xMi4wIiwiZ2l0X3NoYSI6ImNiZWE5MTNlMDZjZiIsImNvZGVfaGFzaCI6IjVkOWViZjYxOWM2MSIsInRyYWNlX3ZlcnNpb24iOiI1ZDllYmY2MTljNjFAY2JlYTkxM2UwNmNmIiwiaXNzdWVkX2F0IjoiMjAyNi0wNS0xMVQyMDo1MzoyNC4xOTBaIn0", BUILD_RELEASE_MANIFEST_SIGNATURE = "mNh0iIBPQusrleK1qHzy32E9JY3RBhGJuNzOJiQ0_GU", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai", BUILD_DEFAULT_PROFILE = "";
|
|
24
24
|
|
|
25
25
|
// ../../src/version.ts
|
|
26
26
|
import { createHash } from "crypto";
|
|
@@ -1802,13 +1802,6 @@ var init_payments = __esm(() => {
|
|
|
1802
1802
|
PRICING_API_URL = process.env.UNBROWSE_BACKEND_URL ?? DEFAULT_BACKEND_URL;
|
|
1803
1803
|
});
|
|
1804
1804
|
|
|
1805
|
-
// ../../src/execution/robots.ts
|
|
1806
|
-
var TTL_MS2, cache;
|
|
1807
|
-
var init_robots = __esm(() => {
|
|
1808
|
-
TTL_MS2 = 24 * 60 * 60 * 1000;
|
|
1809
|
-
cache = new Map;
|
|
1810
|
-
});
|
|
1811
|
-
|
|
1812
1805
|
// ../../src/site-policy.ts
|
|
1813
1806
|
var MUTATION_METHODS, KNOWN_SESSION_BOUND_PARAMS;
|
|
1814
1807
|
var init_site_policy = __esm(() => {
|
|
@@ -1887,7 +1880,6 @@ var init_execution = __esm(async () => {
|
|
|
1887
1880
|
init_version();
|
|
1888
1881
|
init_search_forms();
|
|
1889
1882
|
init_payments();
|
|
1890
|
-
init_robots();
|
|
1891
1883
|
init_site_policy();
|
|
1892
1884
|
init_artifact();
|
|
1893
1885
|
init_compile();
|
|
@@ -5723,8 +5715,7 @@ async function cmdResolve(flags) {
|
|
|
5723
5715
|
params: { endpoint_id: endpointId, ...extraParams },
|
|
5724
5716
|
intent,
|
|
5725
5717
|
projection: { raw: true },
|
|
5726
|
-
...flags["confirm-third-party-terms"] ? { confirm_third_party_terms: true } : {}
|
|
5727
|
-
...flags["skip-robots"] ? { skip_robots_check: true } : {}
|
|
5718
|
+
...flags["confirm-third-party-terms"] ? { confirm_third_party_terms: true } : {}
|
|
5728
5719
|
};
|
|
5729
5720
|
}, endpointNeedsThirdPartyTermsConfirmation = function(endpoint) {
|
|
5730
5721
|
return endpoint.requires_third_party_terms_confirmation === true;
|
|
@@ -5787,8 +5778,6 @@ async function cmdResolve(flags) {
|
|
|
5787
5778
|
body.confirm_third_party_terms = true;
|
|
5788
5779
|
if (flags["force-capture"])
|
|
5789
5780
|
body.force_capture = true;
|
|
5790
|
-
if (flags["skip-robots"])
|
|
5791
|
-
body.skip_robots_check = true;
|
|
5792
5781
|
if (flags["require-proof"])
|
|
5793
5782
|
body.require_proof = true;
|
|
5794
5783
|
const budgetFlag = flags.budget;
|
|
@@ -5959,8 +5948,6 @@ async function cmdRun(args, flags) {
|
|
|
5959
5948
|
body.dry_run = true;
|
|
5960
5949
|
if (flags["confirm-third-party-terms"])
|
|
5961
5950
|
body.confirm_third_party_terms = true;
|
|
5962
|
-
if (flags["skip-robots"])
|
|
5963
|
-
body.skip_robots_check = true;
|
|
5964
5951
|
const budgetFlag = flags.budget;
|
|
5965
5952
|
if (typeof budgetFlag === "string") {
|
|
5966
5953
|
const parsed = parseInt(budgetFlag, 10);
|
|
@@ -5976,8 +5963,7 @@ async function cmdRun(args, flags) {
|
|
|
5976
5963
|
params: { endpoint_id: endpointId, url, ...extraParams },
|
|
5977
5964
|
intent,
|
|
5978
5965
|
projection: { raw: true },
|
|
5979
|
-
...flags["confirm-third-party-terms"] ? { confirm_third_party_terms: true } : {}
|
|
5980
|
-
...flags["skip-robots"] ? { skip_robots_check: true } : {}
|
|
5966
|
+
...flags["confirm-third-party-terms"] ? { confirm_third_party_terms: true } : {}
|
|
5981
5967
|
};
|
|
5982
5968
|
}
|
|
5983
5969
|
function resolveSkillIdFrom(result) {
|
|
@@ -6386,8 +6372,6 @@ async function cmdExecute(flags) {
|
|
|
6386
6372
|
body.confirm_unsafe = true;
|
|
6387
6373
|
if (flags["confirm-third-party-terms"])
|
|
6388
6374
|
body.confirm_third_party_terms = true;
|
|
6389
|
-
if (flags["skip-robots"])
|
|
6390
|
-
body.skip_robots_check = true;
|
|
6391
6375
|
body.projection = { raw: true };
|
|
6392
6376
|
let result = await withPendingNotice(api2("POST", `/v1/skills/${skillId}/execute`, body), "Still working. This endpoint may require browser replay or first-time auth/capture setup.");
|
|
6393
6377
|
if (isResolveSuccessResult(result)) {
|
package/dist/mcp.js
CHANGED
|
@@ -230,11 +230,11 @@ import { dirname, join, parse } from "path";
|
|
|
230
230
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
231
231
|
|
|
232
232
|
// ../../src/build-info.generated.ts
|
|
233
|
-
var BUILD_RELEASE_VERSION = "6.
|
|
234
|
-
var BUILD_GIT_SHA = "
|
|
233
|
+
var BUILD_RELEASE_VERSION = "6.12.0";
|
|
234
|
+
var BUILD_GIT_SHA = "cbea913e06cf";
|
|
235
235
|
var BUILD_CODE_HASH = "5d9ebf619c61";
|
|
236
|
-
var BUILD_RELEASE_MANIFEST_BASE64 = "
|
|
237
|
-
var BUILD_RELEASE_MANIFEST_SIGNATURE = "
|
|
236
|
+
var BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiNi4xMi4wIiwiZ2l0X3NoYSI6ImNiZWE5MTNlMDZjZiIsImNvZGVfaGFzaCI6IjVkOWViZjYxOWM2MSIsInRyYWNlX3ZlcnNpb24iOiI1ZDllYmY2MTljNjFAY2JlYTkxM2UwNmNmIiwiaXNzdWVkX2F0IjoiMjAyNi0wNS0xMVQyMDo1MzoyNC4xOTBaIn0";
|
|
237
|
+
var BUILD_RELEASE_MANIFEST_SIGNATURE = "mNh0iIBPQusrleK1qHzy32E9JY3RBhGJuNzOJiQ0_GU";
|
|
238
238
|
var BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai";
|
|
239
239
|
var BUILD_DEFAULT_PROFILE = "";
|
|
240
240
|
|
|
@@ -1854,7 +1854,6 @@ var tools = [
|
|
|
1854
1854
|
dry_run: { type: "boolean", description: "Preview unsafe calls without applying them." },
|
|
1855
1855
|
confirm_third_party_terms: { type: "boolean", description: "Explicitly confirm policy-sensitive third-party terms risk for flagged domains/actions." },
|
|
1856
1856
|
force_capture: { type: "boolean", description: "Bypass cache and re-capture the exact URL." },
|
|
1857
|
-
skip_robots: { type: "boolean", description: "Bypass robots.txt compliance check." },
|
|
1858
1857
|
raw: { type: "boolean", description: "Keep raw projection enabled. Default true." },
|
|
1859
1858
|
schema: { type: "boolean", description: "Return a schema tree instead of data." },
|
|
1860
1859
|
path: { type: "string", description: "Drill into the result before returning it, e.g. data.items[] ." },
|
|
@@ -1889,8 +1888,6 @@ var tools = [
|
|
|
1889
1888
|
body.confirm_third_party_terms = true;
|
|
1890
1889
|
if (args.force_capture === true)
|
|
1891
1890
|
body.force_capture = true;
|
|
1892
|
-
if (args.skip_robots === true)
|
|
1893
|
-
body.skip_robots_check = true;
|
|
1894
1891
|
let result = await api2("POST", "/v1/intent/resolve", body);
|
|
1895
1892
|
const authError = resolveNestedError(result);
|
|
1896
1893
|
if (authError === "auth_required") {
|
|
@@ -1924,7 +1921,6 @@ var tools = [
|
|
|
1924
1921
|
dry_run: { type: "boolean", description: "Preview unsafe calls without applying them." },
|
|
1925
1922
|
confirm_unsafe: { type: "boolean", description: "Confirm mutation if the endpoint is unsafe." },
|
|
1926
1923
|
confirm_third_party_terms: { type: "boolean", description: "Explicitly confirm policy-sensitive third-party terms risk for flagged domains/actions." },
|
|
1927
|
-
skip_robots: { type: "boolean", description: "Bypass robots.txt compliance check." },
|
|
1928
1924
|
raw: { type: "boolean", description: "Keep raw projection enabled. Default true." },
|
|
1929
1925
|
schema: { type: "boolean", description: "Return a schema tree instead of data." },
|
|
1930
1926
|
path: { type: "string", description: "Drill into the result before returning it, e.g. data.items[] ." },
|
|
@@ -1954,8 +1950,6 @@ var tools = [
|
|
|
1954
1950
|
body.confirm_unsafe = true;
|
|
1955
1951
|
if (args.confirm_third_party_terms === true)
|
|
1956
1952
|
body.confirm_third_party_terms = true;
|
|
1957
|
-
if (args.skip_robots === true)
|
|
1958
|
-
body.skip_robots_check = true;
|
|
1959
1953
|
const result = await api2("POST", `/v1/skills/${args.skill}/execute`, body);
|
|
1960
1954
|
const nestedError = resolveNestedError(result);
|
|
1961
1955
|
recordImpactForTool("execute", result, args);
|
package/dist/server.js
CHANGED
|
@@ -7661,7 +7661,7 @@ var init_capture = __esm(async () => {
|
|
|
7661
7661
|
});
|
|
7662
7662
|
|
|
7663
7663
|
// ../../src/build-info.generated.ts
|
|
7664
|
-
var BUILD_RELEASE_VERSION = "6.
|
|
7664
|
+
var BUILD_RELEASE_VERSION = "6.12.0", BUILD_GIT_SHA = "cbea913e06cf", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiNi4xMi4wIiwiZ2l0X3NoYSI6ImNiZWE5MTNlMDZjZiIsImNvZGVfaGFzaCI6IjVkOWViZjYxOWM2MSIsInRyYWNlX3ZlcnNpb24iOiI1ZDllYmY2MTljNjFAY2JlYTkxM2UwNmNmIiwiaXNzdWVkX2F0IjoiMjAyNi0wNS0xMVQyMDo1MzoyNC4xOTBaIn0", BUILD_RELEASE_MANIFEST_SIGNATURE = "mNh0iIBPQusrleK1qHzy32E9JY3RBhGJuNzOJiQ0_GU", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai", BUILD_DEFAULT_PROFILE = "";
|
|
7665
7665
|
|
|
7666
7666
|
// ../../src/version.ts
|
|
7667
7667
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -10011,8 +10011,6 @@ function classifyFailure(error) {
|
|
|
10011
10011
|
return "empty_response";
|
|
10012
10012
|
if (e.includes("missing") || e.includes("dependency"))
|
|
10013
10013
|
return "dependency_missing";
|
|
10014
|
-
if (e.includes("robots") || e.includes("disallowed"))
|
|
10015
|
-
return "robots_disallowed";
|
|
10016
10014
|
return "unknown";
|
|
10017
10015
|
}
|
|
10018
10016
|
function emitRouteTrace(params) {
|
|
@@ -15160,116 +15158,6 @@ var init_payments = __esm(() => {
|
|
|
15160
15158
|
PRICING_API_URL = process.env.UNBROWSE_BACKEND_URL ?? DEFAULT_BACKEND_URL;
|
|
15161
15159
|
});
|
|
15162
15160
|
|
|
15163
|
-
// ../../src/execution/robots.ts
|
|
15164
|
-
function parseRobotsTxt(text) {
|
|
15165
|
-
const groups = [];
|
|
15166
|
-
let current = null;
|
|
15167
|
-
for (const rawLine of text.split(/\r?\n/)) {
|
|
15168
|
-
const line = rawLine.replace(/#.*$/, "").trim();
|
|
15169
|
-
if (!line) {
|
|
15170
|
-
current = null;
|
|
15171
|
-
continue;
|
|
15172
|
-
}
|
|
15173
|
-
const colon = line.indexOf(":");
|
|
15174
|
-
if (colon === -1)
|
|
15175
|
-
continue;
|
|
15176
|
-
const field = line.slice(0, colon).trim().toLowerCase();
|
|
15177
|
-
const value = line.slice(colon + 1).trim();
|
|
15178
|
-
if (field === "user-agent") {
|
|
15179
|
-
if (!current) {
|
|
15180
|
-
current = { agents: [], disallow: [], allow: [] };
|
|
15181
|
-
groups.push(current);
|
|
15182
|
-
}
|
|
15183
|
-
current.agents.push(value.toLowerCase());
|
|
15184
|
-
} else if (field === "disallow") {
|
|
15185
|
-
if (current && value)
|
|
15186
|
-
current.disallow.push(value);
|
|
15187
|
-
} else if (field === "allow") {
|
|
15188
|
-
if (current && value)
|
|
15189
|
-
current.allow.push(value);
|
|
15190
|
-
} else if (field === "crawl-delay") {
|
|
15191
|
-
if (current)
|
|
15192
|
-
current.crawlDelay = parseFloat(value);
|
|
15193
|
-
} else {
|
|
15194
|
-
current = null;
|
|
15195
|
-
}
|
|
15196
|
-
}
|
|
15197
|
-
return groups;
|
|
15198
|
-
}
|
|
15199
|
-
function selectRules(groups, agent) {
|
|
15200
|
-
const lower = agent.toLowerCase();
|
|
15201
|
-
const exact = groups.find((g) => g.agents.some((a) => a === lower));
|
|
15202
|
-
if (exact)
|
|
15203
|
-
return exact;
|
|
15204
|
-
return groups.find((g) => g.agents.includes("*")) ?? null;
|
|
15205
|
-
}
|
|
15206
|
-
function pathMatches(path5, prefix) {
|
|
15207
|
-
if (prefix.endsWith("$")) {
|
|
15208
|
-
return path5 === prefix.slice(0, -1);
|
|
15209
|
-
}
|
|
15210
|
-
return path5.startsWith(prefix);
|
|
15211
|
-
}
|
|
15212
|
-
function longestMatch(path5, patterns) {
|
|
15213
|
-
let best = -1;
|
|
15214
|
-
for (const p of patterns) {
|
|
15215
|
-
const base = p.endsWith("$") ? p.slice(0, -1) : p;
|
|
15216
|
-
if (pathMatches(path5, p) && base.length > best)
|
|
15217
|
-
best = base.length;
|
|
15218
|
-
}
|
|
15219
|
-
return best;
|
|
15220
|
-
}
|
|
15221
|
-
async function fetchRules(origin) {
|
|
15222
|
-
const now = Date.now();
|
|
15223
|
-
const cached = cache.get(origin);
|
|
15224
|
-
if (cached && now - cached.fetchedAt < TTL_MS2)
|
|
15225
|
-
return cached.rules;
|
|
15226
|
-
try {
|
|
15227
|
-
const res = await fetch(`${origin}/robots.txt`, {
|
|
15228
|
-
headers: { "user-agent": USER_AGENT },
|
|
15229
|
-
redirect: "follow",
|
|
15230
|
-
signal: AbortSignal.timeout(5000)
|
|
15231
|
-
});
|
|
15232
|
-
if (!res.ok) {
|
|
15233
|
-
cache.set(origin, { rules: [], fetchedAt: now });
|
|
15234
|
-
return [];
|
|
15235
|
-
}
|
|
15236
|
-
const text = await res.text();
|
|
15237
|
-
const rules = parseRobotsTxt(text);
|
|
15238
|
-
cache.set(origin, { rules, fetchedAt: now });
|
|
15239
|
-
return rules;
|
|
15240
|
-
} catch {
|
|
15241
|
-
cache.set(origin, { rules: [], fetchedAt: now });
|
|
15242
|
-
return [];
|
|
15243
|
-
}
|
|
15244
|
-
}
|
|
15245
|
-
async function isAllowedByRobots(url) {
|
|
15246
|
-
let origin;
|
|
15247
|
-
let pathname;
|
|
15248
|
-
try {
|
|
15249
|
-
const parsed = new URL(url);
|
|
15250
|
-
origin = parsed.origin;
|
|
15251
|
-
pathname = parsed.pathname || "/";
|
|
15252
|
-
} catch {
|
|
15253
|
-
return true;
|
|
15254
|
-
}
|
|
15255
|
-
const groups = await fetchRules(origin);
|
|
15256
|
-
const rules = selectRules(groups, USER_AGENT);
|
|
15257
|
-
if (!rules)
|
|
15258
|
-
return true;
|
|
15259
|
-
const allowLen = longestMatch(pathname, rules.allow);
|
|
15260
|
-
const disallowLen = longestMatch(pathname, rules.disallow);
|
|
15261
|
-
if (disallowLen < 0)
|
|
15262
|
-
return true;
|
|
15263
|
-
if (allowLen >= disallowLen)
|
|
15264
|
-
return true;
|
|
15265
|
-
return false;
|
|
15266
|
-
}
|
|
15267
|
-
var USER_AGENT = "unbrowse", TTL_MS2, cache;
|
|
15268
|
-
var init_robots = __esm(() => {
|
|
15269
|
-
TTL_MS2 = 24 * 60 * 60 * 1000;
|
|
15270
|
-
cache = new Map;
|
|
15271
|
-
});
|
|
15272
|
-
|
|
15273
15161
|
// ../../src/site-policy.ts
|
|
15274
15162
|
function detectSessionBoundParams(endpoint) {
|
|
15275
15163
|
if (!endpoint.query || typeof endpoint.query !== "object")
|
|
@@ -18885,11 +18773,6 @@ async function executeEndpoint(skill, endpoint, params = {}, projection, options
|
|
|
18885
18773
|
}
|
|
18886
18774
|
}
|
|
18887
18775
|
const hasAuthContext = cookies.length > 0 || Object.keys(authHeaders).length > 0 || !!skill.auth_profile_ref || endpoint.semantic?.auth_required === true;
|
|
18888
|
-
if (!hasAuthContext) {
|
|
18889
|
-
const allowed = await isAllowedByRobots(url);
|
|
18890
|
-
if (!allowed)
|
|
18891
|
-
log("exec", `robots.txt would block ${url} (not enforced)`);
|
|
18892
|
-
}
|
|
18893
18776
|
const serverFetch = async (extraHeaders = {}, bodyOverride = body) => {
|
|
18894
18777
|
const endpointHeaders = normalizeReplayHeaders(endpoint.headers_template);
|
|
18895
18778
|
const sessionHeaders = normalizeReplayHeaders(authHeaders);
|
|
@@ -20607,7 +20490,6 @@ var init_execution = __esm(async () => {
|
|
|
20607
20490
|
init_version();
|
|
20608
20491
|
init_search_forms();
|
|
20609
20492
|
init_payments();
|
|
20610
|
-
init_robots();
|
|
20611
20493
|
init_site_policy();
|
|
20612
20494
|
init_artifact();
|
|
20613
20495
|
init_compile();
|
|
@@ -30047,7 +29929,7 @@ async function registerRoutes(app) {
|
|
|
30047
29929
|
});
|
|
30048
29930
|
app.post("/v1/intent/resolve", { config: { rateLimit: ROUTE_LIMITS["/v1/intent/resolve"] } }, async (req, reply) => {
|
|
30049
29931
|
const clientScope = clientScopeFor(req);
|
|
30050
|
-
const { intent, params, context, projection, confirm_unsafe, confirm_third_party_terms, dry_run, force_capture,
|
|
29932
|
+
const { intent, params, context, projection, confirm_unsafe, confirm_third_party_terms, dry_run, force_capture, visual_context, budget_ms, require_proof } = req.body;
|
|
30051
29933
|
if (!intent)
|
|
30052
29934
|
return reply.code(400).send({ error: "intent required" });
|
|
30053
29935
|
let inflightFlushResult = null;
|
|
@@ -30070,7 +29952,7 @@ async function registerRoutes(app) {
|
|
|
30070
29952
|
}
|
|
30071
29953
|
}
|
|
30072
29954
|
try {
|
|
30073
|
-
const result = await resolveAndExecute(intent, params ?? {}, context, projection, { confirm_unsafe, confirm_third_party_terms, dry_run, force_capture,
|
|
29955
|
+
const result = await resolveAndExecute(intent, params ?? {}, context, projection, { confirm_unsafe, confirm_third_party_terms, dry_run, force_capture, client_scope: clientScope, budget_ms, require_proof });
|
|
30074
29956
|
const res = attachAgentOutcomeHints({ ...result }, {
|
|
30075
29957
|
skill: result.skill,
|
|
30076
29958
|
endpointId: result.trace.endpoint_id,
|
|
@@ -30578,7 +30460,7 @@ async function registerRoutes(app) {
|
|
|
30578
30460
|
app.post("/v1/skills/:skill_id/execute", { config: { rateLimit: ROUTE_LIMITS["/v1/skills/:skill_id/execute"] } }, async (req, reply) => {
|
|
30579
30461
|
const clientScope = clientScopeFor(req);
|
|
30580
30462
|
const { skill_id } = req.params;
|
|
30581
|
-
const { params, projection, confirm_unsafe, confirm_third_party_terms, dry_run, intent, context_url
|
|
30463
|
+
const { params, projection, confirm_unsafe, confirm_third_party_terms, dry_run, intent, context_url } = req.body;
|
|
30582
30464
|
let skill = getRecentLocalSkill(skill_id, clientScope);
|
|
30583
30465
|
if (!skill) {
|
|
30584
30466
|
const { findExistingSkillForDomain: findLocal } = await Promise.resolve().then(() => (init_client2(), exports_client2));
|
|
@@ -30600,7 +30482,7 @@ async function registerRoutes(app) {
|
|
|
30600
30482
|
...context_url && typeof params?.url !== "string" ? { url: context_url } : {}
|
|
30601
30483
|
};
|
|
30602
30484
|
try {
|
|
30603
|
-
let execResult = await executeSkill(skill, execParams, projection, { confirm_unsafe, confirm_third_party_terms, dry_run,
|
|
30485
|
+
let execResult = await executeSkill(skill, execParams, projection, { confirm_unsafe, confirm_third_party_terms, dry_run, intent, contextUrl: context_url, client_scope: clientScope });
|
|
30604
30486
|
if (!execResult.trace.success && execResult.result?.error === "endpoint_not_found" && typeof execParams.endpoint_id === "string") {
|
|
30605
30487
|
let recovered = false;
|
|
30606
30488
|
const freshSkill = await getSkill2(skill_id, clientScope);
|
|
@@ -30635,7 +30517,7 @@ async function registerRoutes(app) {
|
|
|
30635
30517
|
}
|
|
30636
30518
|
}
|
|
30637
30519
|
if (recovered) {
|
|
30638
|
-
execResult = await executeSkill(skill, execParams, projection, { confirm_unsafe, confirm_third_party_terms, dry_run,
|
|
30520
|
+
execResult = await executeSkill(skill, execParams, projection, { confirm_unsafe, confirm_third_party_terms, dry_run, intent, contextUrl: context_url, client_scope: clientScope });
|
|
30639
30521
|
}
|
|
30640
30522
|
}
|
|
30641
30523
|
saveTrace(execResult.trace);
|
|
@@ -30648,7 +30530,7 @@ async function registerRoutes(app) {
|
|
|
30648
30530
|
if (execResult.trace.status_code === 404 && skill.domain && skill.intent_signature && skill.execution_type !== "browser-capture") {
|
|
30649
30531
|
try {
|
|
30650
30532
|
const recoveryUrl = context_url || typeof execParams.url === "string" && execParams.url || skill.endpoints.find((endpoint) => typeof endpoint.trigger_url === "string" && endpoint.trigger_url)?.trigger_url || `https://${skill.domain}`;
|
|
30651
|
-
const freshResult = await resolveAndExecute(intent || skill.intent_signature, { ...execParams, url: recoveryUrl }, { url: recoveryUrl }, projection, { confirm_unsafe, confirm_third_party_terms, dry_run,
|
|
30533
|
+
const freshResult = await resolveAndExecute(intent || skill.intent_signature, { ...execParams, url: recoveryUrl }, { url: recoveryUrl }, projection, { confirm_unsafe, confirm_third_party_terms, dry_run, intent: intent || skill.intent_signature, client_scope: clientScope });
|
|
30652
30534
|
saveTrace(freshResult.trace);
|
|
30653
30535
|
if (freshResult.trace?.skill_id && freshResult.trace?.endpoint_id) {
|
|
30654
30536
|
recordExecution(freshResult.trace.skill_id, freshResult.trace.endpoint_id, freshResult.trace, skill).catch(() => {});
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"binaries": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"zig_target": "aarch64-macos",
|
|
9
|
-
"sha256": "
|
|
9
|
+
"sha256": "f1c110bfe6546c3434acd45b9f487efafaa18e09effa98e8cc6745152b6deb80",
|
|
10
10
|
"source": "ci-built"
|
|
11
11
|
},
|
|
12
12
|
"darwin-x64": {
|