tesseract-agent 0.10.4 → 0.10.6
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-bundle/cli.js +161 -6
- package/package.json +1 -1
package/dist-bundle/cli.js
CHANGED
|
@@ -3961,6 +3961,61 @@ var init_permissions = __esm({
|
|
|
3961
3961
|
}
|
|
3962
3962
|
});
|
|
3963
3963
|
|
|
3964
|
+
// ../../packages/shared/dist/app-elements.js
|
|
3965
|
+
var APP_ELEMENTS, byId, APP_ELEMENT_IDS;
|
|
3966
|
+
var init_app_elements = __esm({
|
|
3967
|
+
"../../packages/shared/dist/app-elements.js"() {
|
|
3968
|
+
"use strict";
|
|
3969
|
+
APP_ELEMENTS = [
|
|
3970
|
+
{
|
|
3971
|
+
id: "composer.input",
|
|
3972
|
+
area: "composer",
|
|
3973
|
+
title: "The message box",
|
|
3974
|
+
// The composer is MOUNTED but not LAID OUT until a conversation is open — zero rect, no
|
|
3975
|
+
// offsetParent — so without this a tour step pointing at it on a fresh Files view resolves
|
|
3976
|
+
// nothing. Found by running the tour in the app; no amount of type-checking would show it.
|
|
3977
|
+
reveal: "app.newConversation",
|
|
3978
|
+
description: "Where you type what you want the AI to do. The main way you talk to Tesseract."
|
|
3979
|
+
},
|
|
3980
|
+
{
|
|
3981
|
+
id: "titlebar.search",
|
|
3982
|
+
area: "titlebar",
|
|
3983
|
+
title: "Search",
|
|
3984
|
+
description: "Opens search and the command palette \u2014 the fastest way to find anything."
|
|
3985
|
+
},
|
|
3986
|
+
{
|
|
3987
|
+
id: "titlebar.settings",
|
|
3988
|
+
area: "titlebar",
|
|
3989
|
+
title: "Settings",
|
|
3990
|
+
reveal: "app.openSettings",
|
|
3991
|
+
description: "Opens Settings, where models, voice, appearance and permissions live."
|
|
3992
|
+
},
|
|
3993
|
+
{
|
|
3994
|
+
id: "titlebar.tasksRail",
|
|
3995
|
+
area: "titlebar",
|
|
3996
|
+
title: "The work panel button",
|
|
3997
|
+
description: "Shows or hides the panel listing what the AI is working on."
|
|
3998
|
+
},
|
|
3999
|
+
{
|
|
4000
|
+
id: "home.gettingStarted",
|
|
4001
|
+
area: "home",
|
|
4002
|
+
title: "The getting-started list",
|
|
4003
|
+
reveal: "app.openHome",
|
|
4004
|
+
description: "The first-run checklist on Home. Ticks itself off as you go."
|
|
4005
|
+
},
|
|
4006
|
+
{
|
|
4007
|
+
id: "rail.tasks",
|
|
4008
|
+
area: "rail",
|
|
4009
|
+
title: "The work panel",
|
|
4010
|
+
reveal: "app.toggleTasksRail",
|
|
4011
|
+
description: "Lists running and past work, so you can follow along or come back to it."
|
|
4012
|
+
}
|
|
4013
|
+
];
|
|
4014
|
+
byId = new Map(APP_ELEMENTS.map((e) => [e.id, e]));
|
|
4015
|
+
APP_ELEMENT_IDS = APP_ELEMENTS.map((e) => e.id);
|
|
4016
|
+
}
|
|
4017
|
+
});
|
|
4018
|
+
|
|
3964
4019
|
// ../../packages/shared/dist/ws-protocol.js
|
|
3965
4020
|
var RV_MAX_CYCLES, RV_GRADE_ATTEMPTS, RV_GRADE_TIMEOUT_MS, RV_GRADE_BACKOFF_MS, RV_VERDICT_GRACE_MS, MIRRORED_AGENT_EVENTS, OWN_STUN_HOST, OWN_STUN_PORT, OWN_STUN_URL, PUBLIC_STUN_URLS, DEFAULT_ICE_SERVERS;
|
|
3966
4021
|
var init_ws_protocol = __esm({
|
|
@@ -7137,6 +7192,7 @@ var init_dist = __esm({
|
|
|
7137
7192
|
"use strict";
|
|
7138
7193
|
init_surface_merge();
|
|
7139
7194
|
init_permissions();
|
|
7195
|
+
init_app_elements();
|
|
7140
7196
|
init_ws_protocol();
|
|
7141
7197
|
init_context_overflow();
|
|
7142
7198
|
init_engine_api_error();
|
|
@@ -27639,6 +27695,47 @@ var init_capabilities = __esm({
|
|
|
27639
27695
|
help: "What the model is told the `present.end` App-Control capability does (present domain, write).",
|
|
27640
27696
|
vars: [],
|
|
27641
27697
|
content: `Stop the live presentation.`
|
|
27698
|
+
},
|
|
27699
|
+
// ── Guided tour ──
|
|
27700
|
+
{
|
|
27701
|
+
id: "capability.tour.start",
|
|
27702
|
+
group: "tools",
|
|
27703
|
+
label: "Start the guided tour",
|
|
27704
|
+
help: "What the model is told the `tour.start` App-Control capability does (tour domain, write).",
|
|
27705
|
+
vars: [],
|
|
27706
|
+
content: `Start the app's guided tour \u2014 a short walkthrough that dims the screen, highlights one thing at a time, and explains it. Use it when someone asks to be shown around, or is plainly lost about where things are. Pass stepId to drop them at a specific point instead of the beginning.`
|
|
27707
|
+
},
|
|
27708
|
+
{
|
|
27709
|
+
id: "capability.tour.stop",
|
|
27710
|
+
group: "tools",
|
|
27711
|
+
label: "Stop the guided tour",
|
|
27712
|
+
help: "What the model is told the `tour.stop` App-Control capability does (tour domain, write).",
|
|
27713
|
+
vars: [],
|
|
27714
|
+
content: `Stop the guided tour and clear its overlay. Use it as soon as the person says they are done, or when you are about to do something they need the whole screen for.`
|
|
27715
|
+
},
|
|
27716
|
+
{
|
|
27717
|
+
id: "capability.tour.state",
|
|
27718
|
+
group: "tools",
|
|
27719
|
+
label: "Where the tour is",
|
|
27720
|
+
help: "What the model is told the `tour.state` App-Control capability does (tour domain, read).",
|
|
27721
|
+
vars: [],
|
|
27722
|
+
content: `Read where the guided tour is: which step, its title, how many are left, whether the thing it points at was actually found, and whether it is the person's turn to act. Call this before moving the tour rather than assuming where it got to.`
|
|
27723
|
+
},
|
|
27724
|
+
{
|
|
27725
|
+
id: "capability.tour.control",
|
|
27726
|
+
group: "tools",
|
|
27727
|
+
label: "Drive the guided tour",
|
|
27728
|
+
help: "What the model is told the `tour.control` App-Control capability does (tour domain, write). The action list is fixed in the registry; only the wording is tunable here.",
|
|
27729
|
+
vars: [],
|
|
27730
|
+
content: `Drive a running tour: move between steps (tour_move with by or to), read where it is (tour_state), end it (tour_end), change the pace (tour_set_pace), point at part of the app (highlight), draw a mark on it (annotate), or go quiet and let the person work (stop_talking). Targets are names from the app's element list, never CSS selectors. There is deliberately no way to click things on the person's behalf here \u2014 point at what they should do and let them do it.`
|
|
27731
|
+
},
|
|
27732
|
+
{
|
|
27733
|
+
id: "capability.tour.reset",
|
|
27734
|
+
group: "tools",
|
|
27735
|
+
label: "Offer the tour again",
|
|
27736
|
+
help: "What the model is told the `tour.reset` App-Control capability does (tour domain, write).",
|
|
27737
|
+
vars: [],
|
|
27738
|
+
content: `Clear the record of the person having seen the tour, so it is offered again on the Home screen. Use it when someone asks to see the introduction from scratch.`
|
|
27642
27739
|
}
|
|
27643
27740
|
];
|
|
27644
27741
|
}
|
|
@@ -30488,7 +30585,7 @@ var init_computer_control_tools = __esm({
|
|
|
30488
30585
|
|
|
30489
30586
|
// ../../packages/agent-core/dist/app-control/registry.js
|
|
30490
30587
|
function capabilityById(id) {
|
|
30491
|
-
return
|
|
30588
|
+
return byId2.get(id);
|
|
30492
30589
|
}
|
|
30493
30590
|
function capabilitiesByDomain(d) {
|
|
30494
30591
|
return APP_CAPABILITIES.filter((c) => c.domain === d);
|
|
@@ -30523,7 +30620,7 @@ function describeCapabilityInput(obj) {
|
|
|
30523
30620
|
}
|
|
30524
30621
|
return out;
|
|
30525
30622
|
}
|
|
30526
|
-
var ENGINE_ID, IMAGE_PROVIDER, VOICE_PROVIDER, MARKETPLACE_FAMILY, PERMISSION_ID, APP_CAPABILITY_SHAPES, APP_CAPABILITIES,
|
|
30623
|
+
var ENGINE_ID, IMAGE_PROVIDER, VOICE_PROVIDER, MARKETPLACE_FAMILY, PERMISSION_ID, APP_CAPABILITY_SHAPES, APP_CAPABILITIES, byId2, APP_CONTROL_DOMAINS;
|
|
30527
30624
|
var init_registry = __esm({
|
|
30528
30625
|
"../../packages/agent-core/dist/app-control/registry.js"() {
|
|
30529
30626
|
"use strict";
|
|
@@ -31228,10 +31325,68 @@ ${JSON.stringify(r, null, 2)}`
|
|
|
31228
31325
|
mutation: "write",
|
|
31229
31326
|
availability: "daemon",
|
|
31230
31327
|
binding: { kind: "ipc", channel: "present", verb: "end" }
|
|
31328
|
+
},
|
|
31329
|
+
// ── Guided tour (the app's own onboarding walkthrough) ──
|
|
31330
|
+
// All 'desktop': the tour engine and its overlay live in the renderer, so every one of these
|
|
31331
|
+
// round-trips to the window. `tour.state` relies on the nav ack carrying the command's RETURN
|
|
31332
|
+
// value (see apps/desktop/src/main/app-control.ts) — a read capability that could only report
|
|
31333
|
+
// "ok" would be useless.
|
|
31334
|
+
{
|
|
31335
|
+
id: "tour.start",
|
|
31336
|
+
domain: "tour",
|
|
31337
|
+
title: "Start the guided tour",
|
|
31338
|
+
input: external_exports.object({
|
|
31339
|
+
stepId: external_exports.string().optional().describe("Step to start at. Omit to start at the beginning.")
|
|
31340
|
+
}),
|
|
31341
|
+
mutation: "write",
|
|
31342
|
+
availability: "desktop",
|
|
31343
|
+
binding: { kind: "command", command: "app.tour.start" },
|
|
31344
|
+
summarize: () => "Started the tour."
|
|
31345
|
+
},
|
|
31346
|
+
{
|
|
31347
|
+
id: "tour.stop",
|
|
31348
|
+
domain: "tour",
|
|
31349
|
+
title: "Stop the guided tour",
|
|
31350
|
+
input: external_exports.object({}),
|
|
31351
|
+
mutation: "write",
|
|
31352
|
+
availability: "desktop",
|
|
31353
|
+
binding: { kind: "command", command: "app.tour.stop" },
|
|
31354
|
+
summarize: () => "Stopped the tour."
|
|
31355
|
+
},
|
|
31356
|
+
{
|
|
31357
|
+
id: "tour.state",
|
|
31358
|
+
domain: "tour",
|
|
31359
|
+
title: "Where the tour is",
|
|
31360
|
+
input: external_exports.object({}),
|
|
31361
|
+
mutation: "read",
|
|
31362
|
+
availability: "desktop",
|
|
31363
|
+
binding: { kind: "command", command: "app.tour.state" }
|
|
31364
|
+
},
|
|
31365
|
+
{
|
|
31366
|
+
id: "tour.control",
|
|
31367
|
+
domain: "tour",
|
|
31368
|
+
title: "Drive the guided tour",
|
|
31369
|
+
input: external_exports.object({
|
|
31370
|
+
name: external_exports.enum(["tour_move", "tour_state", "tour_end", "tour_set_pace", "highlight", "annotate", "stop_talking"]).describe("Which tour action to run."),
|
|
31371
|
+
args: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe('Arguments for that action, e.g. {"by":1} or {"target":"composer.input"}.')
|
|
31372
|
+
}),
|
|
31373
|
+
mutation: "write",
|
|
31374
|
+
availability: "desktop",
|
|
31375
|
+
binding: { kind: "command", command: "app.tour.control" }
|
|
31376
|
+
},
|
|
31377
|
+
{
|
|
31378
|
+
id: "tour.reset",
|
|
31379
|
+
domain: "tour",
|
|
31380
|
+
title: "Offer the tour again",
|
|
31381
|
+
input: external_exports.object({}),
|
|
31382
|
+
mutation: "write",
|
|
31383
|
+
availability: "desktop",
|
|
31384
|
+
binding: { kind: "command", command: "app.tour.reset" },
|
|
31385
|
+
summarize: () => "The tour will be offered again."
|
|
31231
31386
|
}
|
|
31232
31387
|
];
|
|
31233
31388
|
APP_CAPABILITIES = describedBy("capability", APP_CAPABILITY_SHAPES, (c) => c.id);
|
|
31234
|
-
|
|
31389
|
+
byId2 = new Map(APP_CAPABILITIES.map((c) => [c.id, c]));
|
|
31235
31390
|
APP_CONTROL_DOMAINS = (() => {
|
|
31236
31391
|
const seen = [];
|
|
31237
31392
|
for (const c of APP_CAPABILITIES)
|
|
@@ -32600,9 +32755,9 @@ async function findEngines(query2, catalog, opts = {}) {
|
|
|
32600
32755
|
note = `Semantic re-rank unavailable (${e instanceof Error ? e.message : String(e)}); ranked lexically.`;
|
|
32601
32756
|
}
|
|
32602
32757
|
}
|
|
32603
|
-
const
|
|
32758
|
+
const byId3 = new Map(pool.map((e) => [e.id, e]));
|
|
32604
32759
|
if (!semantic?.length) {
|
|
32605
|
-
const hits2 = lexOrder.map((id) => ({ ...
|
|
32760
|
+
const hits2 = lexOrder.map((id) => ({ ...byId3.get(id), score: (lex.get(id) ?? 0) * (byId3.get(id).status ? 0.1 : 1) })).sort((a, b) => b.score - a.score).slice(0, limit);
|
|
32606
32761
|
return { hits: hits2, mode: "lexical", ...note ? { note } : {} };
|
|
32607
32762
|
}
|
|
32608
32763
|
const lexPoints = rrfPoints([...lex.entries()].map(([id, score]) => ({ id, score })), false);
|
|
@@ -32613,7 +32768,7 @@ async function findEngines(query2, catalog, opts = {}) {
|
|
|
32613
32768
|
for (const e of pool)
|
|
32614
32769
|
if (e.status)
|
|
32615
32770
|
fused.set(e.id, (fused.get(e.id) ?? 0) * 0.1);
|
|
32616
|
-
const hits = [...fused.entries()].sort((a, b) => b[1] - a[1]).slice(0, limit).map(([id, score]) => ({ ...
|
|
32771
|
+
const hits = [...fused.entries()].sort((a, b) => b[1] - a[1]).slice(0, limit).map(([id, score]) => ({ ...byId3.get(id), score })).filter((h) => h.id);
|
|
32617
32772
|
return { hits, mode: "hybrid" };
|
|
32618
32773
|
}
|
|
32619
32774
|
var STOP, cosine, RRF_K;
|