tesseract-agent 0.11.16 → 0.11.17
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 +74 -84
- package/dist-bundle/mesh-core/package.json +1 -1
- package/package.json +1 -1
package/dist-bundle/cli.js
CHANGED
|
@@ -20222,6 +20222,21 @@ Rules:
|
|
|
20222
20222
|
- Plain words a non-expert understands. No jargon, no file paths, no command names unless the suggestion itself names them.
|
|
20223
20223
|
- Address the developer directly ("This would\u2026"). Never answer the suggestion, never do the work, never ask a question.
|
|
20224
20224
|
- Two sentences maximum. Stop.`
|
|
20225
|
+
},
|
|
20226
|
+
{
|
|
20227
|
+
id: "side-llm.summarize-turn",
|
|
20228
|
+
group: "side-llm",
|
|
20229
|
+
label: "Conversation tab summariser",
|
|
20230
|
+
help: "One short line describing what the conversation has DONE so far, shown in the tab's hover tooltip under the title. Rebuilt after each turn. The \u226412-word / one-sentence limit is the whole contract \u2014 it sits in a small tooltip, so anything longer is clipped; and it must read as a status of work done, never as a reply to the developer.",
|
|
20231
|
+
vars: [],
|
|
20232
|
+
content: `A developer is working with an AI coding agent. Summarise, in ONE short sentence, what this conversation has accomplished SO FAR \u2014 the kind of line that belongs under a browser-tab title.
|
|
20233
|
+
Rules:
|
|
20234
|
+
- Output ONLY the sentence. No markdown, no quotes, no preamble, no trailing period.
|
|
20235
|
+
- 12 words MAXIMUM. Shorter is better.
|
|
20236
|
+
- Describe the WORK DONE, not what is planned or being asked. Past/perfect or a noun phrase ("Added tab tooltips and per-turn summaries", "Debugging the failing image upload").
|
|
20237
|
+
- Weight the MOST RECENT messages most heavily: if the topic shifted, describe where it is now, not where it started.
|
|
20238
|
+
- Plain, concrete words. Name the real feature/file/thing when it is clear. No filler like "The agent\u2026" or "This conversation\u2026".
|
|
20239
|
+
- Never answer the developer, never do the work, never ask a question.`
|
|
20225
20240
|
},
|
|
20226
20241
|
{
|
|
20227
20242
|
id: "side-llm.project-inspect",
|
|
@@ -23061,7 +23076,7 @@ var init_capabilities = __esm({
|
|
|
23061
23076
|
label: "Create a presentation",
|
|
23062
23077
|
help: "What the model is told the `present.create_deck` App-Control capability does (present domain, write).",
|
|
23063
23078
|
vars: [],
|
|
23064
|
-
content: `Make a new, empty Tesseract Stage presentation in the user
|
|
23079
|
+
content: `Make a new, empty Tesseract Stage presentation and return its deck handle. It lands in the project the user has open \u2014 beside the files it is about \u2014 or in their library (~/Documents/Tesseract/Presentations) when no project is open. This is how you make a presentation \u2014 NOT a PowerPoint file, NOT markdown, NOT an HTML canvas. Pass the title in the user's own words and language. Optionally set a theme: CSS custom properties every slide inherits, e.g. { "--bg": "#FFFFFF", "--ink": "#16130F", "--accent": "#D97757" }. Then write slides with write_slide.`
|
|
23065
23080
|
},
|
|
23066
23081
|
{
|
|
23067
23082
|
id: "capability.present.write_slide",
|
|
@@ -32986,8 +33001,9 @@ ${JSON.stringify(r, null, 2)}`
|
|
|
32986
33001
|
domain: "present",
|
|
32987
33002
|
title: "Create a presentation",
|
|
32988
33003
|
input: external_exports.object({
|
|
32989
|
-
title: external_exports.string().describe("What the presentation is called.
|
|
33004
|
+
title: external_exports.string().describe("What the presentation is called. Used for its folder name; keep the user's own wording and language."),
|
|
32990
33005
|
description: external_exports.string().optional().describe("One line about what it is for."),
|
|
33006
|
+
root: external_exports.string().optional().describe("Folder to create it in. Leave unset \u2014 it then lands in the project the user has open, which is almost always what they want. Only set this if they asked for somewhere specific."),
|
|
32991
33007
|
theme: external_exports.record(external_exports.string(), external_exports.string()).optional().describe('CSS custom properties applied to every slide, e.g. { "--bg": "#FFFFFF", "--ink": "#16130F", "--accent": "#D97757" }.')
|
|
32992
33008
|
}),
|
|
32993
33009
|
mutation: "write",
|
|
@@ -33000,7 +33016,7 @@ ${JSON.stringify(r, null, 2)}`
|
|
|
33000
33016
|
domain: "present",
|
|
33001
33017
|
title: "Write a slide",
|
|
33002
33018
|
input: external_exports.object({
|
|
33003
|
-
deck: external_exports.string().describe("The deck
|
|
33019
|
+
deck: external_exports.string().describe("The deck handle, exactly as `list_decks` or `create_deck` returned it. Either a folder name or an absolute path, both ending in .tessdeck \u2014 pass it back unchanged rather than rebuilding it."),
|
|
33004
33020
|
path: external_exports.string().describe('Path inside the presentation, e.g. "slides/03-pricing.tsx". Filename order IS slide order, so number the prefixes. Helper files may live anywhere in the package.'),
|
|
33005
33021
|
source: external_exports.string().describe("The whole file. A slide exports `meta` ({ id, title, summary?, notes?, transition?, builds? }) and a default React component.")
|
|
33006
33022
|
}),
|
|
@@ -33014,7 +33030,7 @@ ${JSON.stringify(r, null, 2)}`
|
|
|
33014
33030
|
domain: "present",
|
|
33015
33031
|
title: "Read a slide",
|
|
33016
33032
|
input: external_exports.object({
|
|
33017
|
-
deck: external_exports.string().describe("The deck
|
|
33033
|
+
deck: external_exports.string().describe("The deck handle, exactly as it was returned to you."),
|
|
33018
33034
|
path: external_exports.string().describe('Path inside the presentation, e.g. "slides/03-pricing.tsx".')
|
|
33019
33035
|
}),
|
|
33020
33036
|
mutation: "read",
|
|
@@ -33026,7 +33042,7 @@ ${JSON.stringify(r, null, 2)}`
|
|
|
33026
33042
|
domain: "present",
|
|
33027
33043
|
title: "Delete a slide",
|
|
33028
33044
|
input: external_exports.object({
|
|
33029
|
-
deck: external_exports.string().describe("The deck
|
|
33045
|
+
deck: external_exports.string().describe("The deck handle, exactly as it was returned to you."),
|
|
33030
33046
|
path: external_exports.string().describe("Path inside the presentation.")
|
|
33031
33047
|
}),
|
|
33032
33048
|
mutation: "write",
|
|
@@ -33038,7 +33054,7 @@ ${JSON.stringify(r, null, 2)}`
|
|
|
33038
33054
|
id: "present.validate_deck",
|
|
33039
33055
|
domain: "present",
|
|
33040
33056
|
title: "Check a presentation",
|
|
33041
|
-
input: external_exports.object({ deck: external_exports.string().describe("The deck
|
|
33057
|
+
input: external_exports.object({ deck: external_exports.string().describe("The deck handle, exactly as it was returned to you.") }),
|
|
33042
33058
|
mutation: "read",
|
|
33043
33059
|
availability: "desktop",
|
|
33044
33060
|
binding: { kind: "ipc", channel: "decklib", verb: "validate" },
|
|
@@ -33049,7 +33065,7 @@ ${JSON.stringify(r, null, 2)}`
|
|
|
33049
33065
|
domain: "present",
|
|
33050
33066
|
title: "Set a presentation\u2019s theme",
|
|
33051
33067
|
input: external_exports.object({
|
|
33052
|
-
deck: external_exports.string().describe("The deck
|
|
33068
|
+
deck: external_exports.string().describe("The deck handle, exactly as it was returned to you."),
|
|
33053
33069
|
theme: external_exports.record(external_exports.string(), external_exports.string()).describe(`CSS custom properties, e.g. { "--bg": "#0C0A14", "--ink": "#FFFFFF" }. Replaces the deck's current theme.`)
|
|
33054
33070
|
}),
|
|
33055
33071
|
mutation: "write",
|
|
@@ -33062,7 +33078,7 @@ ${JSON.stringify(r, null, 2)}`
|
|
|
33062
33078
|
domain: "present",
|
|
33063
33079
|
title: "Add an image to a presentation",
|
|
33064
33080
|
input: external_exports.object({
|
|
33065
|
-
deck: external_exports.string().describe("The deck
|
|
33081
|
+
deck: external_exports.string().describe("The deck handle, exactly as it was returned to you."),
|
|
33066
33082
|
source_path: external_exports.string().describe("Absolute path of the file to copy in \u2014 a generated image, a photo, an audio clip."),
|
|
33067
33083
|
name: external_exports.string().optional().describe("Filename to use inside the presentation.")
|
|
33068
33084
|
}),
|
|
@@ -33075,7 +33091,7 @@ ${JSON.stringify(r, null, 2)}`
|
|
|
33075
33091
|
id: "present.open_deck",
|
|
33076
33092
|
domain: "present",
|
|
33077
33093
|
title: "Open a presentation",
|
|
33078
|
-
input: external_exports.object({ deck: external_exports.string().describe("The deck
|
|
33094
|
+
input: external_exports.object({ deck: external_exports.string().describe("The deck handle, exactly as it was returned to you.") }),
|
|
33079
33095
|
mutation: "write",
|
|
33080
33096
|
availability: "desktop",
|
|
33081
33097
|
binding: { kind: "ipc", channel: "decklib", verb: "open" },
|
|
@@ -33085,7 +33101,7 @@ ${JSON.stringify(r, null, 2)}`
|
|
|
33085
33101
|
id: "present.delete_deck",
|
|
33086
33102
|
domain: "present",
|
|
33087
33103
|
title: "Delete a presentation",
|
|
33088
|
-
input: external_exports.object({ deck: external_exports.string().describe("The deck
|
|
33104
|
+
input: external_exports.object({ deck: external_exports.string().describe("The deck handle, exactly as it was returned to you.") }),
|
|
33089
33105
|
mutation: "write",
|
|
33090
33106
|
availability: "desktop",
|
|
33091
33107
|
binding: { kind: "ipc", channel: "decklib", verb: "delete" },
|
|
@@ -48164,29 +48180,6 @@ function readDaemonAgentSettings() {
|
|
|
48164
48180
|
return snap;
|
|
48165
48181
|
}
|
|
48166
48182
|
}
|
|
48167
|
-
function gatewayCanCall(model, snapshot4) {
|
|
48168
|
-
const tiers2 = snapshot4.gatewayTiers;
|
|
48169
|
-
if (!tiers2?.length)
|
|
48170
|
-
return true;
|
|
48171
|
-
return tiers2.includes(model) || snapshot4.gatewayDirectNaming === true;
|
|
48172
|
-
}
|
|
48173
|
-
function gatewayTierRejection(model) {
|
|
48174
|
-
if (!model)
|
|
48175
|
-
return null;
|
|
48176
|
-
const snap = readDaemonAgentSettings();
|
|
48177
|
-
if (gatewayCanCall(model, snap))
|
|
48178
|
-
return null;
|
|
48179
|
-
return { model, tiers: [...snap.gatewayTiers ?? []] };
|
|
48180
|
-
}
|
|
48181
|
-
function gatewayTierClamp(model) {
|
|
48182
|
-
if (!model)
|
|
48183
|
-
return model;
|
|
48184
|
-
const snap = readDaemonAgentSettings();
|
|
48185
|
-
if (gatewayCanCall(model, snap))
|
|
48186
|
-
return model;
|
|
48187
|
-
console.warn(`[gateway] Model "${model}" isn't served by this device's gateway key (${(snap.gatewayTiers ?? []).join(", ")}) \u2014 dropping it so the gateway picks one it can reach.`);
|
|
48188
|
-
return void 0;
|
|
48189
|
-
}
|
|
48190
48183
|
function chatSendToParams(msg, defaults) {
|
|
48191
48184
|
return mergeDaemonAgentSettings({
|
|
48192
48185
|
message: msg.message,
|
|
@@ -48227,7 +48220,6 @@ function chatSendToParams(msg, defaults) {
|
|
|
48227
48220
|
function mergeDaemonAgentSettings(params) {
|
|
48228
48221
|
const s = readDaemonAgentSettings();
|
|
48229
48222
|
const hostModel = poolActiveModel() ?? s.model;
|
|
48230
|
-
const clampToGatewayTier = gatewayTierClamp;
|
|
48231
48223
|
return {
|
|
48232
48224
|
...params,
|
|
48233
48225
|
mcpServers: params.mcpServers ?? s.mcpServers,
|
|
@@ -48237,16 +48229,15 @@ function mergeDaemonAgentSettings(params) {
|
|
|
48237
48229
|
settingSources: params.settingSources ?? s.settingSources,
|
|
48238
48230
|
maxTurns: params.maxTurns ?? s.maxTurns,
|
|
48239
48231
|
maxBudgetUsd: params.maxBudgetUsd ?? s.maxBudgetUsd,
|
|
48240
|
-
model:
|
|
48232
|
+
model: params.model ?? hostModel,
|
|
48241
48233
|
hostInjectedModel: params.hostInjectedModel ?? (params.model === void 0 && hostModel !== void 0),
|
|
48242
48234
|
permissionMode: params.permissionMode ?? s.permissionMode,
|
|
48243
48235
|
effort: params.effort ?? s.effort,
|
|
48244
48236
|
ultracode: params.ultracode ?? s.ultracode,
|
|
48245
48237
|
// Model-level fallback: the engine switches models BEFORE the turn fails. Our runner
|
|
48246
48238
|
// rotation works one level up (credential/config) and only AFTER a failure, so the two
|
|
48247
|
-
// compose rather than compete.
|
|
48248
|
-
|
|
48249
|
-
fallbackModel: clampToGatewayTier(params.fallbackModel ?? s.fallbackModel),
|
|
48239
|
+
// compose rather than compete. Sent as named, like `model`.
|
|
48240
|
+
fallbackModel: params.fallbackModel ?? s.fallbackModel,
|
|
48250
48241
|
// Token budget the MODEL is told about, so it paces tool use and wraps up instead of
|
|
48251
48242
|
// being cut off mid-thought (distinct from maxBudgetUsd, which is dollars and hard).
|
|
48252
48243
|
taskBudget: params.taskBudget ?? s.taskBudget,
|
|
@@ -84115,7 +84106,6 @@ function toRewindOutcome(res, noHistory) {
|
|
|
84115
84106
|
|
|
84116
84107
|
// ../../packages/host-core/dist/control-link.js
|
|
84117
84108
|
import { join as join67, basename as basename12 } from "node:path";
|
|
84118
|
-
import { randomUUID as randomUUID28 } from "node:crypto";
|
|
84119
84109
|
import { mkdirSync as mkdirSync31 } from "node:fs";
|
|
84120
84110
|
|
|
84121
84111
|
// ../../node_modules/ws/wrapper.mjs
|
|
@@ -104948,7 +104938,25 @@ var PeerLinkManager = class {
|
|
|
104948
104938
|
const socket2 = await q.makeQuicSocket(this.udpPort);
|
|
104949
104939
|
this.quicSocket = socket2;
|
|
104950
104940
|
await q.startQuicServerOnSocket({ socket: socket2, identity, onStream: (bs5) => this.acceptInbound(bs5, "punch") });
|
|
104941
|
+
const disableQuicTier = (why) => {
|
|
104942
|
+
if (this.quicUnavailable)
|
|
104943
|
+
return;
|
|
104944
|
+
this.quicUnavailable = true;
|
|
104945
|
+
if (this.quicKeepalive) {
|
|
104946
|
+
clearInterval(this.quicKeepalive);
|
|
104947
|
+
this.quicKeepalive = null;
|
|
104948
|
+
}
|
|
104949
|
+
this.quicSocket = null;
|
|
104950
|
+
try {
|
|
104951
|
+
void socket2.stop({ force: true });
|
|
104952
|
+
} catch {
|
|
104953
|
+
}
|
|
104954
|
+
console.warn(`[peer-link] QUIC tier disabled at runtime \u2014 ${why}. Using TCP tiers; a sandbox-safe @matrixai/quic rebuild re-enables it.`);
|
|
104955
|
+
};
|
|
104956
|
+
const isSandboxFailure = (m) => /create external arraybuffer failed/i.test(m);
|
|
104951
104957
|
const refresh = async () => {
|
|
104958
|
+
if (this.quicUnavailable)
|
|
104959
|
+
return;
|
|
104952
104960
|
const found = [];
|
|
104953
104961
|
for (const { host, port } of resolveStunServers()) {
|
|
104954
104962
|
try {
|
|
@@ -104958,7 +104966,12 @@ var PeerLinkManager = class {
|
|
|
104958
104966
|
if (!found.some((c) => c.ip === cand.ip && c.port === cand.port))
|
|
104959
104967
|
found.push(cand);
|
|
104960
104968
|
} catch (e) {
|
|
104961
|
-
|
|
104969
|
+
const detail = e.message;
|
|
104970
|
+
if (isSandboxFailure(detail)) {
|
|
104971
|
+
disableQuicTier(`the native binding rejects this runtime's ArrayBuffers (${detail})`);
|
|
104972
|
+
return;
|
|
104973
|
+
}
|
|
104974
|
+
console.warn(`[peer-link] srflx FAILED via ${host}:${port}: ${detail}`);
|
|
104962
104975
|
}
|
|
104963
104976
|
}
|
|
104964
104977
|
if (found.length && JSON.stringify(found) !== JSON.stringify(this.quicSrflxList)) {
|
|
@@ -104966,6 +104979,14 @@ var PeerLinkManager = class {
|
|
|
104966
104979
|
console.log(`[peer-link] srflx candidates: ${found.map((c) => `${c.ip}:${c.port}`).join(", ")}`);
|
|
104967
104980
|
}
|
|
104968
104981
|
};
|
|
104982
|
+
const onUnhandled = (reason) => {
|
|
104983
|
+
const m = reason instanceof Error ? reason.message : String(reason);
|
|
104984
|
+
if (!isSandboxFailure(m))
|
|
104985
|
+
return;
|
|
104986
|
+
process.off("unhandledRejection", onUnhandled);
|
|
104987
|
+
disableQuicTier(`the native binding rejects this runtime's ArrayBuffers (${m})`);
|
|
104988
|
+
};
|
|
104989
|
+
process.on("unhandledRejection", onUnhandled);
|
|
104969
104990
|
await refresh();
|
|
104970
104991
|
this.quicKeepalive = setInterval(() => {
|
|
104971
104992
|
void refresh();
|
|
@@ -110532,23 +110553,7 @@ async function handleInboundAgent(msg, driverClientId) {
|
|
|
110532
110553
|
void b.backgroundTask?.(msg.sessionId, msg.toolUseId, origin);
|
|
110533
110554
|
break;
|
|
110534
110555
|
case "agent:set_mode":
|
|
110535
|
-
{
|
|
110536
|
-
const rejected = gatewayTierRejection(msg.model);
|
|
110537
|
-
if (rejected) {
|
|
110538
|
-
send3("agent", {
|
|
110539
|
-
type: "agent:notice",
|
|
110540
|
-
sessionId: msg.sessionId,
|
|
110541
|
-
noticeId: randomUUID28(),
|
|
110542
|
-
category: "model",
|
|
110543
|
-
level: "warning",
|
|
110544
|
-
title: "That model is not available on this device",
|
|
110545
|
-
body: `The gateway key on this machine serves ${rejected.tiers.join(", ")}, so "${rejected.model}" was not applied \u2014 the conversation is still on its previous model.`,
|
|
110546
|
-
toast: true,
|
|
110547
|
-
inline: true
|
|
110548
|
-
}, route3);
|
|
110549
|
-
}
|
|
110550
|
-
}
|
|
110551
|
-
void b.setRunMode?.(msg.sessionId, { permissionMode: msg.permissionMode, model: gatewayTierClamp(msg.model), maxThinkingTokens: msg.maxThinkingTokens, unattended: msg.unattended, reinforcedVerification: msg.reinforcedVerification, effort: msg.effort, ultracode: msg.ultracode });
|
|
110556
|
+
void b.setRunMode?.(msg.sessionId, { permissionMode: msg.permissionMode, model: msg.model, maxThinkingTokens: msg.maxThinkingTokens, unattended: msg.unattended, reinforcedVerification: msg.reinforcedVerification, effort: msg.effort, ultracode: msg.ultracode });
|
|
110552
110557
|
break;
|
|
110553
110558
|
case "chat:permission":
|
|
110554
110559
|
b.respondToPermission?.(msg.requestId, { behavior: msg.behavior, updatedInput: msg.updatedInput, persist: msg.persist, message: msg.message, interrupt: msg.interrupt }, origin);
|
|
@@ -111359,7 +111364,7 @@ init_base_paths();
|
|
|
111359
111364
|
init_credentials();
|
|
111360
111365
|
init_dist5();
|
|
111361
111366
|
import { mkdirSync as mkdirSync32, readFileSync as readFileSync42, writeFileSync as writeFileSync28 } from "node:fs";
|
|
111362
|
-
import { randomUUID as
|
|
111367
|
+
import { randomUUID as randomUUID28 } from "node:crypto";
|
|
111363
111368
|
import { dirname as dirname28 } from "node:path";
|
|
111364
111369
|
var REFRESH_MS = 24 * 60 * 60 * 1e3;
|
|
111365
111370
|
var TIMEOUT_MS2 = 1e4;
|
|
@@ -111375,7 +111380,7 @@ function deviceId2() {
|
|
|
111375
111380
|
return raw.deviceId;
|
|
111376
111381
|
} catch {
|
|
111377
111382
|
}
|
|
111378
|
-
const fresh =
|
|
111383
|
+
const fresh = randomUUID28().slice(0, 8);
|
|
111379
111384
|
try {
|
|
111380
111385
|
mkdirSync32(dirname28(DEVICE_ID()), { recursive: true });
|
|
111381
111386
|
writeFileSync28(DEVICE_ID(), JSON.stringify({ deviceId: fresh }), { mode: 384 });
|
|
@@ -113456,7 +113461,6 @@ function stopSystemEvents() {
|
|
|
113456
113461
|
}
|
|
113457
113462
|
|
|
113458
113463
|
// ../../packages/host-core/dist/local-server.js
|
|
113459
|
-
import { randomUUID as randomUUID31 } from "node:crypto";
|
|
113460
113464
|
init_daemon_settings();
|
|
113461
113465
|
|
|
113462
113466
|
// ../../packages/host-core/dist/vault/manager.js
|
|
@@ -114052,7 +114056,7 @@ var XJSON_AAD = utf8("tesseract-vault-encrypted-json-v1");
|
|
|
114052
114056
|
init_credentials();
|
|
114053
114057
|
|
|
114054
114058
|
// ../../packages/host-core/dist/vault/store.js
|
|
114055
|
-
import { randomUUID as
|
|
114059
|
+
import { randomUUID as randomUUID29 } from "node:crypto";
|
|
114056
114060
|
var b64 = (u) => Buffer.from(u).toString("base64");
|
|
114057
114061
|
var u82 = (s) => new Uint8Array(Buffer.from(s, "base64"));
|
|
114058
114062
|
var isServerRecoverableMeta = (m) => !m.wrappedVaultKey;
|
|
@@ -114354,7 +114358,7 @@ var VaultStore = class {
|
|
|
114354
114358
|
const existing = input.id ? items.get(input.id) : void 0;
|
|
114355
114359
|
const { id: _drop, name, folderId, favorite, reprompt, notes, tags, ...content } = input;
|
|
114356
114360
|
const item = {
|
|
114357
|
-
id: input.id ??
|
|
114361
|
+
id: input.id ?? randomUUID29(),
|
|
114358
114362
|
name,
|
|
114359
114363
|
folderId,
|
|
114360
114364
|
favorite,
|
|
@@ -114383,7 +114387,7 @@ var VaultStore = class {
|
|
|
114383
114387
|
const now2 = this.now();
|
|
114384
114388
|
for (const d of drafts) {
|
|
114385
114389
|
const { name, notes, favorite, tags, ...content } = d;
|
|
114386
|
-
const item = { id:
|
|
114390
|
+
const item = { id: randomUUID29(), name, notes, favorite, tags, createdAt: now2, updatedAt: now2, ...content };
|
|
114387
114391
|
items.set(item.id, item);
|
|
114388
114392
|
this.enc.set(item.id, await encryptItem(key2, item));
|
|
114389
114393
|
this.dirty.add(item.id);
|
|
@@ -115426,21 +115430,7 @@ async function startLocalServer(opts) {
|
|
|
115426
115430
|
void b.backgroundTask?.(msg.sessionId, msg.toolUseId, loopbackOrigin);
|
|
115427
115431
|
break;
|
|
115428
115432
|
case "agent:set_mode": {
|
|
115429
|
-
|
|
115430
|
-
if (rejected) {
|
|
115431
|
-
send5("agent", {
|
|
115432
|
-
type: "agent:notice",
|
|
115433
|
-
sessionId: msg.sessionId,
|
|
115434
|
-
noticeId: randomUUID31(),
|
|
115435
|
-
category: "model",
|
|
115436
|
-
level: "warning",
|
|
115437
|
-
title: "That model is not available on this device",
|
|
115438
|
-
body: `Your gateway key serves ${rejected.tiers.join(", ")}, so "${rejected.model}" was not applied \u2014 the conversation is still on its previous model.`,
|
|
115439
|
-
toast: true,
|
|
115440
|
-
inline: true
|
|
115441
|
-
});
|
|
115442
|
-
}
|
|
115443
|
-
void b.setRunMode?.(msg.sessionId, { permissionMode: msg.permissionMode, model: gatewayTierClamp(msg.model), maxThinkingTokens: msg.maxThinkingTokens, unattended: msg.unattended, reinforcedVerification: msg.reinforcedVerification, effort: msg.effort, ultracode: msg.ultracode });
|
|
115433
|
+
void b.setRunMode?.(msg.sessionId, { permissionMode: msg.permissionMode, model: msg.model, maxThinkingTokens: msg.maxThinkingTokens, unattended: msg.unattended, reinforcedVerification: msg.reinforcedVerification, effort: msg.effort, ultracode: msg.ultracode });
|
|
115444
115434
|
break;
|
|
115445
115435
|
}
|
|
115446
115436
|
case "chat:permission":
|
|
@@ -119489,7 +119479,7 @@ async function fetchBlobDrop(opts) {
|
|
|
119489
119479
|
}
|
|
119490
119480
|
|
|
119491
119481
|
// ../../packages/host-core/dist/chat-agent.js
|
|
119492
|
-
import { randomUUID as
|
|
119482
|
+
import { randomUUID as randomUUID30 } from "node:crypto";
|
|
119493
119483
|
init_prompts();
|
|
119494
119484
|
var TURN_TIMEOUT_MS = 4 * 6e4;
|
|
119495
119485
|
var PARTIAL_INTERVAL_MS = 700;
|
|
@@ -119518,7 +119508,7 @@ function createChatAgentRunner(deps) {
|
|
|
119518
119508
|
}
|
|
119519
119509
|
async function runTurn(prompt2, onPartial) {
|
|
119520
119510
|
const backend2 = await getSharedBackend();
|
|
119521
|
-
const clientRequestId = `chat-agent-${
|
|
119511
|
+
const clientRequestId = `chat-agent-${randomUUID30()}`;
|
|
119522
119512
|
return new Promise((resolve16, reject) => {
|
|
119523
119513
|
let text13 = "";
|
|
119524
119514
|
let settled = false;
|
|
@@ -121544,7 +121534,7 @@ init_credentials();
|
|
|
121544
121534
|
init_base_paths();
|
|
121545
121535
|
import { existsSync as existsSync47, mkdirSync as mkdirSync46, readFileSync as readFileSync57, writeFileSync as writeFileSync43 } from "node:fs";
|
|
121546
121536
|
import { dirname as dirname39, join as join88 } from "node:path";
|
|
121547
|
-
import { randomUUID as
|
|
121537
|
+
import { randomUUID as randomUUID31 } from "node:crypto";
|
|
121548
121538
|
function deviceIdFile() {
|
|
121549
121539
|
return join88(tesseractHome(), "device-id.json");
|
|
121550
121540
|
}
|
|
@@ -121560,7 +121550,7 @@ function persistentDeviceId() {
|
|
|
121560
121550
|
const cur = readPersistedDeviceId();
|
|
121561
121551
|
if (cur)
|
|
121562
121552
|
return cur;
|
|
121563
|
-
const id =
|
|
121553
|
+
const id = randomUUID31().slice(0, 8);
|
|
121564
121554
|
try {
|
|
121565
121555
|
const f = deviceIdFile();
|
|
121566
121556
|
const dir2 = dirname39(f);
|
|
@@ -121575,7 +121565,7 @@ function persistentDeviceId() {
|
|
|
121575
121565
|
// ../../packages/host-core/dist/error-report.js
|
|
121576
121566
|
init_dist2();
|
|
121577
121567
|
init_credentials();
|
|
121578
|
-
import { randomUUID as
|
|
121568
|
+
import { randomUUID as randomUUID32 } from "node:crypto";
|
|
121579
121569
|
import { release as osRelease, arch as osArch } from "node:os";
|
|
121580
121570
|
var MAX_QUEUE = 100;
|
|
121581
121571
|
var FLUSH_INTERVAL_MS = 3e4;
|
|
@@ -121627,7 +121617,7 @@ function captureDaemonError(error51, opts = {}) {
|
|
|
121627
121617
|
return;
|
|
121628
121618
|
const creds3 = readCredentials();
|
|
121629
121619
|
const report = {
|
|
121630
|
-
reportId:
|
|
121620
|
+
reportId: randomUUID32(),
|
|
121631
121621
|
occurredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
121632
121622
|
schemaVersion: 1,
|
|
121633
121623
|
surface,
|