unbrowse 9.3.2 → 9.3.3
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 +104 -3
- package/runtime/mcp.js +1 -1
- package/vendor/kuri/darwin-arm64/kuri +0 -0
- 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 +9 -9
- 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.3", BUILD_GIT_SHA = "88984f4881ae", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiOS4zLjMiLCJnaXRfc2hhIjoiODg5ODRmNDg4MWFlIiwiY29kZV9oYXNoIjoiNWQ5ZWJmNjE5YzYxIiwidHJhY2VfdmVyc2lvbiI6IjVkOWViZjYxOWM2MUA4ODk4NGY0ODgxYWUiLCJpc3N1ZWRfYXQiOiIyMDI2LTA2LTE1VDAzOjM3OjA5LjM5M1oifQ", BUILD_RELEASE_MANIFEST_SIGNATURE = "wxzvy30_AUnlGvlKbLRABlSN53ZK2JJXFyGQeafNpHU", 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";
|
|
@@ -206806,11 +206806,75 @@ function parseCmdGetArgs(args, flags) {
|
|
|
206806
206806
|
function parseCmdFillArgs(args, flags) {
|
|
206807
206807
|
return parseCmdHoleIntentArgs(args, flags, "fill");
|
|
206808
206808
|
}
|
|
206809
|
+
function isDraftOnlyMutationIntent(intent) {
|
|
206810
|
+
const s = intent.toLowerCase();
|
|
206811
|
+
const asksForDraft = /\b(draft|write|compose|prepare|suggest)\b/.test(s) && /\b(message|reply|dm|contact|inquiry|enquiry|seller|agent)\b/.test(s);
|
|
206812
|
+
const explicitSendSideEffect = (/\b(send|buy|purchase|offer|submit|click)\b/.test(s) || /\b(message|dm|contact)\s+(the\s+)?(seller|agent|owner|user|them|him|her)\b/.test(s)) && !/\bdo not (send|contact|message|buy|purchase|offer|submit|click)\b/.test(s) && !/\bdon't (send|contact|message|buy|purchase|offer|submit|click)\b/.test(s) && !/\bwithout (sending|contacting|messaging|buying|purchasing|offering|submitting|clicking)\b/.test(s) && !/\b(no|never) (send|contact|message|buy|purchase|offer|submit|click)\b/.test(s);
|
|
206813
|
+
const forbidsSideEffect = /\bdo not (send|contact|message|buy|purchase|offer|submit|click)\b/.test(s) || /\bdon't (send|contact|message|buy|purchase|offer|submit|click)\b/.test(s) || /\bwithout (sending|contacting|messaging|buying|purchasing|offering|submitting|clicking)\b/.test(s) || /\b(no|never) (send|contact|message|buy|purchase|offer|submit|click)\b/.test(s);
|
|
206814
|
+
return asksForDraft && (forbidsSideEffect || !explicitSendSideEffect);
|
|
206815
|
+
}
|
|
206816
|
+
function draftOnlySubjectHint(intent) {
|
|
206817
|
+
let subject = intent.replace(/\bdo not\b[^.?!]*(?:[.?!]|$)/gi, " ").replace(/\bdon't\b[^.?!]*(?:[.?!]|$)/gi, " ").replace(/\bwithout\b[^.?!]*(?:[.?!]|$)/gi, " ").replace(/\b(?:no|never)\s+(?:send|contact|message|buy|purchase|offer|submit|click)\b[^.?!]*(?:[.?!]|$)/gi, " ").replace(/\b(draft|write|compose|prepare|suggest)\b/gi, " ").replace(/\b(polite|message|reply|dm|contact|inquiry|enquiry|seller|agent|asking|ask|whether|if|still|available|availability)\b/gi, " ").replace(/\b(send|sent|buy|purchase|offer|submit|click)\b/gi, " ").replace(/\b(a|an|the|to|for|with|and|or|is|are|it|this|that|me|my|please)\b/gi, " ").replace(/\s+/g, " ").trim();
|
|
206818
|
+
subject = subject.replace(/^[,.:;!?-]+|[,.:;!?-]+$/g, "").trim();
|
|
206819
|
+
return subject.length >= 3 ? subject : "the first relevant visible listing";
|
|
206820
|
+
}
|
|
206821
|
+
function draftOnlyReadIntent(intent) {
|
|
206822
|
+
const subject = draftOnlySubjectHint(intent);
|
|
206823
|
+
const wantsAvailability = /\b(available|availability|still there|still for sale)\b/i.test(intent);
|
|
206824
|
+
return [
|
|
206825
|
+
`Find the first visible ${subject} on this public page.`,
|
|
206826
|
+
"Return only public listing context: title, price, condition, seller/page context, and visible availability cues.",
|
|
206827
|
+
wantsAvailability ? "This is read-only context for a later local availability draft." : "This is read-only context for a later local draft."
|
|
206828
|
+
].join(" ");
|
|
206829
|
+
}
|
|
206830
|
+
function textExcerptFromResult(result) {
|
|
206831
|
+
const direct = result.result;
|
|
206832
|
+
const candidates = [
|
|
206833
|
+
direct?.text_excerpt,
|
|
206834
|
+
direct?.markdown,
|
|
206835
|
+
direct?.content,
|
|
206836
|
+
direct?.result?.text_excerpt,
|
|
206837
|
+
result.text_excerpt,
|
|
206838
|
+
result.markdown,
|
|
206839
|
+
result.content
|
|
206840
|
+
];
|
|
206841
|
+
for (const c of candidates) {
|
|
206842
|
+
if (typeof c === "string" && c.trim())
|
|
206843
|
+
return c.trim().slice(0, 2400);
|
|
206844
|
+
}
|
|
206845
|
+
return;
|
|
206846
|
+
}
|
|
206847
|
+
function buildDraftOnlyEnvelope(originalIntent, url, sourceResult) {
|
|
206848
|
+
const excerpt = textExcerptFromResult(sourceResult);
|
|
206849
|
+
return {
|
|
206850
|
+
status: "draft_only",
|
|
206851
|
+
safety: {
|
|
206852
|
+
side_effects: "none",
|
|
206853
|
+
sent: false,
|
|
206854
|
+
offer_made: false,
|
|
206855
|
+
purchase_made: false,
|
|
206856
|
+
approval_required_before_send: true
|
|
206857
|
+
},
|
|
206858
|
+
intent: originalIntent,
|
|
206859
|
+
url,
|
|
206860
|
+
draft: "Hi, is this still available? I am interested and would like to know the condition, what is included, and whether the price is negotiable. Thanks.",
|
|
206861
|
+
source_excerpt: excerpt,
|
|
206862
|
+
source: sourceResult.source ?? sourceResult.result?.source ?? "read_only_lookup",
|
|
206863
|
+
trace: sourceResult.trace,
|
|
206864
|
+
impact: sourceResult.impact,
|
|
206865
|
+
next_action: {
|
|
206866
|
+
title: "Human approval required before any send/contact action",
|
|
206867
|
+
why: "This request asked for a draft only. Unbrowse did not open a composer, send a message, make an offer, or buy anything."
|
|
206868
|
+
}
|
|
206869
|
+
};
|
|
206870
|
+
}
|
|
206809
206871
|
async function cmdRun(args, flags, verb = "run") {
|
|
206810
206872
|
const parsed = parseCmdRunArgs(args, flags, verb);
|
|
206811
206873
|
if ("error" in parsed)
|
|
206812
206874
|
die(parsed.error);
|
|
206813
206875
|
const { url, intent } = parsed;
|
|
206876
|
+
const draftOnlyIntent = isDraftOnlyMutationIntent(intent);
|
|
206877
|
+
const resolveIntent = draftOnlyIntent ? draftOnlyReadIntent(intent) : intent;
|
|
206814
206878
|
maybeShowContributionNotice();
|
|
206815
206879
|
const hostType = detectTelemetryHostType2();
|
|
206816
206880
|
await ensureCliInstallTracked2(hostType);
|
|
@@ -206842,7 +206906,7 @@ async function cmdRun(args, flags, verb = "run") {
|
|
|
206842
206906
|
const runPlan = [];
|
|
206843
206907
|
function resolveBody() {
|
|
206844
206908
|
const body = {
|
|
206845
|
-
intent,
|
|
206909
|
+
intent: resolveIntent,
|
|
206846
206910
|
params: { url, ...extraParams },
|
|
206847
206911
|
context: { url },
|
|
206848
206912
|
projection: { raw: true }
|
|
@@ -206867,7 +206931,7 @@ async function cmdRun(args, flags, verb = "run") {
|
|
|
206867
206931
|
function execBody(endpointId) {
|
|
206868
206932
|
return {
|
|
206869
206933
|
params: { endpoint_id: endpointId, url, ...extraParams },
|
|
206870
|
-
intent,
|
|
206934
|
+
intent: resolveIntent,
|
|
206871
206935
|
projection: { raw: true },
|
|
206872
206936
|
...flags["confirm-third-party-terms"] ? { confirm_third_party_terms: true } : {}
|
|
206873
206937
|
};
|
|
@@ -207041,6 +207105,40 @@ async function cmdRun(args, flags, verb = "run") {
|
|
|
207041
207105
|
}
|
|
207042
207106
|
try {
|
|
207043
207107
|
let result = await resolveStep("initial");
|
|
207108
|
+
if (draftOnlyIntent) {
|
|
207109
|
+
if (isResolveSuccessResult(result)) {
|
|
207110
|
+
runPlan.push({
|
|
207111
|
+
step: "execute",
|
|
207112
|
+
mode: "draft_only_guard",
|
|
207113
|
+
status: "skipped",
|
|
207114
|
+
reason: "no_side_effects_without_approval"
|
|
207115
|
+
});
|
|
207116
|
+
output2(decorate(buildDraftOnlyEnvelope(intent, url, result)), !!flags.pretty);
|
|
207117
|
+
return;
|
|
207118
|
+
}
|
|
207119
|
+
const err = resolveResultError(result);
|
|
207120
|
+
output2(decorate({
|
|
207121
|
+
...result,
|
|
207122
|
+
status: err === "auth_required" ? "auth_required" : "draft_unavailable",
|
|
207123
|
+
original_intent: intent,
|
|
207124
|
+
safety: {
|
|
207125
|
+
side_effects: "none",
|
|
207126
|
+
sent: false,
|
|
207127
|
+
offer_made: false,
|
|
207128
|
+
purchase_made: false,
|
|
207129
|
+
approval_required_before_send: true
|
|
207130
|
+
},
|
|
207131
|
+
next_action: err === "auth_required" ? {
|
|
207132
|
+
title: "Authenticate site before drafting",
|
|
207133
|
+
command: `unbrowse auth "${resolveLoginUrl(result, url) ?? url}"`,
|
|
207134
|
+
why: "The site requires a local authenticated session before Unbrowse can read enough context to draft safely."
|
|
207135
|
+
} : {
|
|
207136
|
+
title: "Draft unavailable",
|
|
207137
|
+
why: "Unbrowse could not read enough page context to draft a message, and it did not attempt to send/contact/buy."
|
|
207138
|
+
}
|
|
207139
|
+
}), !!flags.pretty);
|
|
207140
|
+
return;
|
|
207141
|
+
}
|
|
207044
207142
|
const firstError = resolveResultError(result);
|
|
207045
207143
|
if (firstError === "auth_required") {
|
|
207046
207144
|
const loginUrl = resolveLoginUrl(result, url);
|
|
@@ -210427,7 +210525,10 @@ export {
|
|
|
210427
210525
|
parseCmdGetArgs,
|
|
210428
210526
|
parseCmdFillArgs,
|
|
210429
210527
|
parseArgs,
|
|
210528
|
+
isDraftOnlyMutationIntent,
|
|
210430
210529
|
fetchOutcome,
|
|
210530
|
+
draftOnlySubjectHint,
|
|
210531
|
+
draftOnlyReadIntent,
|
|
210431
210532
|
deprecationNotice,
|
|
210432
210533
|
ESSENTIAL_VERBS,
|
|
210433
210534
|
DEPRECATED_VERBS,
|
package/runtime/mcp.js
CHANGED
|
@@ -36159,7 +36159,7 @@ var init_cached_resolution = __esm(() => {
|
|
|
36159
36159
|
});
|
|
36160
36160
|
|
|
36161
36161
|
// .tmp-runtime-src/build-info.generated.ts
|
|
36162
|
-
var BUILD_RELEASE_VERSION = "9.3.
|
|
36162
|
+
var BUILD_RELEASE_VERSION = "9.3.3", BUILD_GIT_SHA = "88984f4881ae", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiOS4zLjMiLCJnaXRfc2hhIjoiODg5ODRmNDg4MWFlIiwiY29kZV9oYXNoIjoiNWQ5ZWJmNjE5YzYxIiwidHJhY2VfdmVyc2lvbiI6IjVkOWViZjYxOWM2MUA4ODk4NGY0ODgxYWUiLCJpc3N1ZWRfYXQiOiIyMDI2LTA2LTE1VDAzOjM3OjA5LjM5M1oifQ", BUILD_RELEASE_MANIFEST_SIGNATURE = "wxzvy30_AUnlGvlKbLRABlSN53ZK2JJXFyGQeafNpHU", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai", BUILD_DEFAULT_PROFILE = "";
|
|
36163
36163
|
|
|
36164
36164
|
// .tmp-runtime-src/version.ts
|
|
36165
36165
|
import { createHash as createHash3 } from "crypto";
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"repo_url": "https://github.com/justrach/kuri.git",
|
|
3
3
|
"branch": "adding-extensions",
|
|
4
|
-
"source_sha": "
|
|
5
|
-
"built_at": "2026-06-
|
|
4
|
+
"source_sha": "149881254046a20778f642b69f20f0c6468f6fb4",
|
|
5
|
+
"built_at": "2026-06-15T03:19:24.649Z",
|
|
6
6
|
"binaries": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"zig_target": "aarch64-macos",
|
|
9
|
-
"sha256": "
|
|
9
|
+
"sha256": "e7a2f965535c10fe4faf2e962ffa3237e96e65fb8bfe37428c84e72fcbcce613",
|
|
10
10
|
"source": "pre-staged"
|
|
11
11
|
},
|
|
12
12
|
"darwin-x64": {
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
"linux-x64": {
|
|
23
23
|
"zig_target": "x86_64-linux",
|
|
24
|
-
"sha256": "
|
|
24
|
+
"sha256": "ca9c958d7079b050892c8929bad64b1f634ccf5089ede9896bb068cc45d9fcba"
|
|
25
25
|
},
|
|
26
26
|
"win-x64": {
|
|
27
27
|
"zig_target": "x86_64-windows-gnu",
|
|
28
|
-
"sha256": "
|
|
28
|
+
"sha256": "ffec1ebe7901963544f97e2651b1dae37ff79d057707604a514b0c8d3052c1f6",
|
|
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": "0b98186ed8ebe3ed1cf3734e5900aeb7367cff07ede4064663bd8de28547fb74"
|
|
37
37
|
},
|
|
38
38
|
"darwin-x64": {
|
|
39
39
|
"zig_target": "x86_64-macos",
|
|
40
40
|
"lib": "libkuri_ffi.dylib",
|
|
41
|
-
"sha256": "
|
|
41
|
+
"sha256": "f9fc3b4c6935216f6afc3015a4cd1ec0710f08bfe30440f9ca0e935c0cdbf435"
|
|
42
42
|
},
|
|
43
43
|
"linux-arm64": {
|
|
44
44
|
"zig_target": "aarch64-linux",
|
|
45
45
|
"lib": "libkuri_ffi.so",
|
|
46
|
-
"sha256": "
|
|
46
|
+
"sha256": "d29fedbe361a8d62ab2dd13a4f5eafd0cce054a4f90aefed94fa6aba59f252d3"
|
|
47
47
|
},
|
|
48
48
|
"linux-x64": {
|
|
49
49
|
"zig_target": "x86_64-linux",
|
|
50
50
|
"lib": "libkuri_ffi.so",
|
|
51
|
-
"sha256": "
|
|
51
|
+
"sha256": "2fd9308fc0aeb6d545bc598d85293d402918b8670cf43358c940eeb41562949d"
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
Binary file
|