unbrowse 9.3.7 → 9.3.9
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/package.json +1 -1
- package/runtime/cli.js +62 -4
- package/runtime/mcp.js +10 -4
- package/vendor/kuri/darwin-arm64/libkuri_ffi.dylib +0 -0
- package/vendor/kuri/darwin-x64/libkuri_ffi.dylib +0 -0
- package/vendor/kuri/linux-arm64/libkuri_ffi.so +0 -0
- package/vendor/kuri/linux-x64/kuri +0 -0
- package/vendor/kuri/linux-x64/libkuri_ffi.so +0 -0
- package/vendor/kuri/manifest.json +7 -7
- package/vendor/kuri/win-x64/kuri.exe +0 -0
package/package.json
CHANGED
package/runtime/cli.js
CHANGED
|
@@ -5020,7 +5020,7 @@ var init_cached_resolution = __esm(() => {
|
|
|
5020
5020
|
});
|
|
5021
5021
|
|
|
5022
5022
|
// .tmp-runtime-src/build-info.generated.ts
|
|
5023
|
-
var BUILD_RELEASE_VERSION = "9.3.
|
|
5023
|
+
var BUILD_RELEASE_VERSION = "9.3.9", BUILD_GIT_SHA = "65f0a4a43779", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiOS4zLjkiLCJnaXRfc2hhIjoiNjVmMGE0YTQzNzc5IiwiY29kZV9oYXNoIjoiNWQ5ZWJmNjE5YzYxIiwidHJhY2VfdmVyc2lvbiI6IjVkOWViZjYxOWM2MUA2NWYwYTRhNDM3NzkiLCJpc3N1ZWRfYXQiOiIyMDI2LTA2LTE1VDA5OjAyOjAyLjkzNloifQ", BUILD_RELEASE_MANIFEST_SIGNATURE = "qwiNcOf5Ns6uVB8dJAjwWDGlxaF1AfcsDFvVXhstcG0", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai", BUILD_DEFAULT_PROFILE = "";
|
|
5024
5024
|
|
|
5025
5025
|
// .tmp-runtime-src/version.ts
|
|
5026
5026
|
import { createHash as createHash4 } from "crypto";
|
|
@@ -172947,6 +172947,12 @@ async function executeEndpoint(skill, endpoint, params = {}, projection, options
|
|
|
172947
172947
|
}
|
|
172948
172948
|
})();
|
|
172949
172949
|
await reloadExecutionAuthState(skill, epDomain, authHeaders, cookies);
|
|
172950
|
+
if (options?.authHeaders) {
|
|
172951
|
+
for (const [k, v] of Object.entries(options.authHeaders)) {
|
|
172952
|
+
if (typeof v === "string" && v.length > 0)
|
|
172953
|
+
authHeaders[k] = v;
|
|
172954
|
+
}
|
|
172955
|
+
}
|
|
172950
172956
|
log("exec", `auth_tokens check: ${endpoint.auth_tokens?.length ?? 0} bindings on ${endpoint.endpoint_id}`);
|
|
172951
172957
|
if (endpoint.auth_tokens?.length) {
|
|
172952
172958
|
try {
|
|
@@ -189474,7 +189480,7 @@ async function registerRoutes(app) {
|
|
|
189474
189480
|
app.post("/v1/skills/:skill_id/execute", { config: { rateLimit: ROUTE_LIMITS["/v1/skills/:skill_id/execute"] } }, async (req, reply) => {
|
|
189475
189481
|
const clientScope = clientScopeFor(req);
|
|
189476
189482
|
const { skill_id } = req.params;
|
|
189477
|
-
const { params, projection, confirm_unsafe, confirm_third_party_terms, dry_run, intent, context_url, session_id } = req.body;
|
|
189483
|
+
const { params, projection, confirm_unsafe, confirm_third_party_terms, dry_run, intent, context_url, session_id, auth_headers } = req.body;
|
|
189478
189484
|
let skill = getRecentLocalSkill(skill_id, clientScope);
|
|
189479
189485
|
if (!skill) {
|
|
189480
189486
|
const { findExistingSkillForDomain: findLocal } = await Promise.resolve().then(() => (init_client(), exports_client));
|
|
@@ -189574,7 +189580,7 @@ async function registerRoutes(app) {
|
|
|
189574
189580
|
try {
|
|
189575
189581
|
const executeDeadlineMs = Number(process.env.UNBROWSE_EXECUTE_TIMEOUT_MS) || 60000;
|
|
189576
189582
|
const endpointIdForTrace = typeof execParams.endpoint_id === "string" ? execParams.endpoint_id : "";
|
|
189577
|
-
let execResult = await withExecuteDeadline(executeSkill(skill, execParams, projection, { confirm_unsafe: effectiveConfirmUnsafe, confirm_third_party_terms, dry_run, intent, contextUrl: context_url, client_scope: clientScope }), executeDeadlineMs, () => {
|
|
189583
|
+
let execResult = await withExecuteDeadline(executeSkill(skill, execParams, projection, { confirm_unsafe: effectiveConfirmUnsafe, confirm_third_party_terms, dry_run, intent, contextUrl: context_url, client_scope: clientScope, authHeaders: auth_headers }), executeDeadlineMs, () => {
|
|
189578
189584
|
const now = new Date().toISOString();
|
|
189579
189585
|
return {
|
|
189580
189586
|
trace: {
|
|
@@ -189642,7 +189648,7 @@ async function registerRoutes(app) {
|
|
|
189642
189648
|
}
|
|
189643
189649
|
}
|
|
189644
189650
|
if (recovered) {
|
|
189645
|
-
execResult = await executeSkill(skill, execParams, projection, { confirm_unsafe, confirm_third_party_terms, dry_run, intent, contextUrl: context_url, client_scope: clientScope });
|
|
189651
|
+
execResult = await executeSkill(skill, execParams, projection, { confirm_unsafe, confirm_third_party_terms, dry_run, intent, contextUrl: context_url, client_scope: clientScope, authHeaders: auth_headers });
|
|
189646
189652
|
}
|
|
189647
189653
|
}
|
|
189648
189654
|
saveTrace(execResult.trace);
|
|
@@ -201930,6 +201936,41 @@ function extractEmbeddedJsonBody(intent) {
|
|
|
201930
201936
|
return;
|
|
201931
201937
|
}
|
|
201932
201938
|
|
|
201939
|
+
// .tmp-runtime-src/lib/extract-auth-header.ts
|
|
201940
|
+
var TOKEN = "([A-Za-z0-9][A-Za-z0-9._~+/=-]{5,})";
|
|
201941
|
+
var BEARER_RULES = [
|
|
201942
|
+
new RegExp(`\\bbearer\\s+token\\s+${TOKEN}`, "i"),
|
|
201943
|
+
new RegExp(`\\bbearer\\s+${TOKEN}`, "i"),
|
|
201944
|
+
new RegExp(`\\b(?:auth(?:enticate|orization)?)\\s+(?:with\\s+)?token\\s+${TOKEN}`, "i")
|
|
201945
|
+
];
|
|
201946
|
+
var APIKEY_RULES = [
|
|
201947
|
+
new RegExp(`\\b(?:api[- ]?key|apikey|x-api-key)\\s*[:=]?\\s+${TOKEN}`, "i")
|
|
201948
|
+
];
|
|
201949
|
+
function looksLikeToken(t) {
|
|
201950
|
+
if (t.length >= 16)
|
|
201951
|
+
return true;
|
|
201952
|
+
if (/[0-9._~+/=-]/.test(t))
|
|
201953
|
+
return true;
|
|
201954
|
+
if (/[A-Z]/.test(t) && /[a-z]/.test(t))
|
|
201955
|
+
return true;
|
|
201956
|
+
return false;
|
|
201957
|
+
}
|
|
201958
|
+
function extractAuthHeader(intent) {
|
|
201959
|
+
if (!intent)
|
|
201960
|
+
return;
|
|
201961
|
+
for (const re of BEARER_RULES) {
|
|
201962
|
+
const m = intent.match(re);
|
|
201963
|
+
if (m?.[1] && looksLikeToken(m[1]))
|
|
201964
|
+
return `Authorization: Bearer ${m[1]}`;
|
|
201965
|
+
}
|
|
201966
|
+
for (const re of APIKEY_RULES) {
|
|
201967
|
+
const m = intent.match(re);
|
|
201968
|
+
if (m?.[1] && looksLikeToken(m[1]))
|
|
201969
|
+
return `X-API-Key: ${m[1]}`;
|
|
201970
|
+
}
|
|
201971
|
+
return;
|
|
201972
|
+
}
|
|
201973
|
+
|
|
201933
201974
|
// .tmp-runtime-src/env/kuri-proxy-bridge.ts
|
|
201934
201975
|
init_proxy_fetch();
|
|
201935
201976
|
var __dirname = "/home/runner/work/unbrowse-dev/unbrowse-dev/.tmp-runtime-src/env";
|
|
@@ -206990,6 +207031,12 @@ async function cmdRun(args, flags, verb = "run") {
|
|
|
206990
207031
|
...oneHoleWriteBody ? { body: oneHoleWriteBody } : {}
|
|
206991
207032
|
});
|
|
206992
207033
|
}
|
|
207034
|
+
if (url) {
|
|
207035
|
+
const authHeader = typeof flags.header === "string" ? flags.header : extractAuthHeader(intent);
|
|
207036
|
+
if (authHeader) {
|
|
207037
|
+
return cmdFetch([], { ...flags, url, header: authHeader });
|
|
207038
|
+
}
|
|
207039
|
+
}
|
|
206993
207040
|
const draftOnlyIntent = isDraftOnlyMutationIntent(intent);
|
|
206994
207041
|
const resolveIntent = draftOnlyIntent ? draftOnlyReadIntent(intent) : intent;
|
|
206995
207042
|
maybeShowContributionNotice();
|
|
@@ -207546,6 +207593,17 @@ async function cmdExecute(flags) {
|
|
|
207546
207593
|
body.method = flags.method.toUpperCase();
|
|
207547
207594
|
if (typeof flags.session === "string")
|
|
207548
207595
|
body.session_id = flags.session;
|
|
207596
|
+
{
|
|
207597
|
+
const rawHeaders = Array.isArray(flags.header) ? flags.header : typeof flags.header === "string" ? [flags.header] : [];
|
|
207598
|
+
const authHeaders = {};
|
|
207599
|
+
for (const h of rawHeaders) {
|
|
207600
|
+
const idx = h.indexOf(":");
|
|
207601
|
+
if (idx > 0)
|
|
207602
|
+
authHeaders[h.slice(0, idx).trim()] = h.slice(idx + 1).trim();
|
|
207603
|
+
}
|
|
207604
|
+
if (Object.keys(authHeaders).length > 0)
|
|
207605
|
+
body.auth_headers = authHeaders;
|
|
207606
|
+
}
|
|
207549
207607
|
if (flags.intent ?? flags.task)
|
|
207550
207608
|
body.intent = flags.intent ?? flags.task;
|
|
207551
207609
|
if (flags["dry-run"])
|
package/runtime/mcp.js
CHANGED
|
@@ -36178,7 +36178,7 @@ var init_cached_resolution = __esm(() => {
|
|
|
36178
36178
|
});
|
|
36179
36179
|
|
|
36180
36180
|
// .tmp-runtime-src/build-info.generated.ts
|
|
36181
|
-
var BUILD_RELEASE_VERSION = "9.3.
|
|
36181
|
+
var BUILD_RELEASE_VERSION = "9.3.9", BUILD_GIT_SHA = "65f0a4a43779", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiOS4zLjkiLCJnaXRfc2hhIjoiNjVmMGE0YTQzNzc5IiwiY29kZV9oYXNoIjoiNWQ5ZWJmNjE5YzYxIiwidHJhY2VfdmVyc2lvbiI6IjVkOWViZjYxOWM2MUA2NWYwYTRhNDM3NzkiLCJpc3N1ZWRfYXQiOiIyMDI2LTA2LTE1VDA5OjAyOjAyLjkzNloifQ", BUILD_RELEASE_MANIFEST_SIGNATURE = "qwiNcOf5Ns6uVB8dJAjwWDGlxaF1AfcsDFvVXhstcG0", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai", BUILD_DEFAULT_PROFILE = "";
|
|
36182
36182
|
|
|
36183
36183
|
// .tmp-runtime-src/version.ts
|
|
36184
36184
|
import { createHash as createHash3 } from "crypto";
|
|
@@ -106870,6 +106870,12 @@ async function executeEndpoint(skill, endpoint, params = {}, projection, options
|
|
|
106870
106870
|
}
|
|
106871
106871
|
})();
|
|
106872
106872
|
await reloadExecutionAuthState(skill, epDomain, authHeaders, cookies);
|
|
106873
|
+
if (options?.authHeaders) {
|
|
106874
|
+
for (const [k, v] of Object.entries(options.authHeaders)) {
|
|
106875
|
+
if (typeof v === "string" && v.length > 0)
|
|
106876
|
+
authHeaders[k] = v;
|
|
106877
|
+
}
|
|
106878
|
+
}
|
|
106873
106879
|
log("exec", `auth_tokens check: ${endpoint.auth_tokens?.length ?? 0} bindings on ${endpoint.endpoint_id}`);
|
|
106874
106880
|
if (endpoint.auth_tokens?.length) {
|
|
106875
106881
|
try {
|
|
@@ -139874,7 +139880,7 @@ async function registerRoutes(app) {
|
|
|
139874
139880
|
app.post("/v1/skills/:skill_id/execute", { config: { rateLimit: ROUTE_LIMITS["/v1/skills/:skill_id/execute"] } }, async (req, reply) => {
|
|
139875
139881
|
const clientScope = clientScopeFor(req);
|
|
139876
139882
|
const { skill_id } = req.params;
|
|
139877
|
-
const { params, projection, confirm_unsafe, confirm_third_party_terms, dry_run, intent, context_url, session_id } = req.body;
|
|
139883
|
+
const { params, projection, confirm_unsafe, confirm_third_party_terms, dry_run, intent, context_url, session_id, auth_headers } = req.body;
|
|
139878
139884
|
let skill = getRecentLocalSkill(skill_id, clientScope);
|
|
139879
139885
|
if (!skill) {
|
|
139880
139886
|
const { findExistingSkillForDomain: findLocal } = await Promise.resolve().then(() => (init_client2(), exports_client2));
|
|
@@ -139974,7 +139980,7 @@ async function registerRoutes(app) {
|
|
|
139974
139980
|
try {
|
|
139975
139981
|
const executeDeadlineMs = Number(process.env.UNBROWSE_EXECUTE_TIMEOUT_MS) || 60000;
|
|
139976
139982
|
const endpointIdForTrace = typeof execParams.endpoint_id === "string" ? execParams.endpoint_id : "";
|
|
139977
|
-
let execResult = await withExecuteDeadline(executeSkill(skill, execParams, projection, { confirm_unsafe: effectiveConfirmUnsafe, confirm_third_party_terms, dry_run, intent, contextUrl: context_url, client_scope: clientScope }), executeDeadlineMs, () => {
|
|
139983
|
+
let execResult = await withExecuteDeadline(executeSkill(skill, execParams, projection, { confirm_unsafe: effectiveConfirmUnsafe, confirm_third_party_terms, dry_run, intent, contextUrl: context_url, client_scope: clientScope, authHeaders: auth_headers }), executeDeadlineMs, () => {
|
|
139978
139984
|
const now = new Date().toISOString();
|
|
139979
139985
|
return {
|
|
139980
139986
|
trace: {
|
|
@@ -140042,7 +140048,7 @@ async function registerRoutes(app) {
|
|
|
140042
140048
|
}
|
|
140043
140049
|
}
|
|
140044
140050
|
if (recovered) {
|
|
140045
|
-
execResult = await executeSkill(skill, execParams, projection, { confirm_unsafe, confirm_third_party_terms, dry_run, intent, contextUrl: context_url, client_scope: clientScope });
|
|
140051
|
+
execResult = await executeSkill(skill, execParams, projection, { confirm_unsafe, confirm_third_party_terms, dry_run, intent, contextUrl: context_url, client_scope: clientScope, authHeaders: auth_headers });
|
|
140046
140052
|
}
|
|
140047
140053
|
}
|
|
140048
140054
|
saveTrace(execResult.trace);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"repo_url": "https://github.com/justrach/kuri.git",
|
|
3
3
|
"branch": "adding-extensions",
|
|
4
4
|
"source_sha": "149881254046a20778f642b69f20f0c6468f6fb4",
|
|
5
|
-
"built_at": "2026-06-
|
|
5
|
+
"built_at": "2026-06-15T08:45:06.771Z",
|
|
6
6
|
"binaries": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"zig_target": "aarch64-macos",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
"linux-x64": {
|
|
23
23
|
"zig_target": "x86_64-linux",
|
|
24
|
-
"sha256": "
|
|
24
|
+
"sha256": "c95ba2aba85676900b9f80689d58d6b31b12cb6ad407cba0ef7d17ae1a505788"
|
|
25
25
|
},
|
|
26
26
|
"win-x64": {
|
|
27
27
|
"zig_target": "x86_64-windows-gnu",
|
|
28
|
-
"sha256": "
|
|
28
|
+
"sha256": "6a5cdee00887bfe1ba84aab0aa99c6a5a500616c56f44ab7e45ae92c13b378fa",
|
|
29
29
|
"source": "pre-staged"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
@@ -33,22 +33,22 @@
|
|
|
33
33
|
"darwin-arm64": {
|
|
34
34
|
"zig_target": "aarch64-macos",
|
|
35
35
|
"lib": "libkuri_ffi.dylib",
|
|
36
|
-
"sha256": "
|
|
36
|
+
"sha256": "16efa027d0d1390cc010aafdb5277a2a83b7ac08920f3c06241fa6dfa9ba7cb3"
|
|
37
37
|
},
|
|
38
38
|
"darwin-x64": {
|
|
39
39
|
"zig_target": "x86_64-macos",
|
|
40
40
|
"lib": "libkuri_ffi.dylib",
|
|
41
|
-
"sha256": "
|
|
41
|
+
"sha256": "64c129f0e8732991949fca700123d2cdc9847d4ee11881f68a83f639c1f5a399"
|
|
42
42
|
},
|
|
43
43
|
"linux-arm64": {
|
|
44
44
|
"zig_target": "aarch64-linux",
|
|
45
45
|
"lib": "libkuri_ffi.so",
|
|
46
|
-
"sha256": "
|
|
46
|
+
"sha256": "c12b803d0189d86c47c9b376069237fe0f59eee1caef239da1795d4523803a92"
|
|
47
47
|
},
|
|
48
48
|
"linux-x64": {
|
|
49
49
|
"zig_target": "x86_64-linux",
|
|
50
50
|
"lib": "libkuri_ffi.so",
|
|
51
|
-
"sha256": "
|
|
51
|
+
"sha256": "be1dbcc8ae6835d2e600c30bd69d5ea168fee811d2d5ad5a5852fac95e10d843"
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
Binary file
|