@rubytech/taskmaster 1.27.0 → 1.28.1
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/build-info.json +3 -3
- package/dist/cli/program/register.subclis.js +8 -0
- package/dist/cli/provision-cli.js +24 -0
- package/dist/cli/whiteglove-cli.js +369 -0
- package/dist/control-ui/assets/{index-1WwUK7EM.js → index-B_QfEVs7.js} +5 -8
- package/dist/control-ui/assets/index-B_QfEVs7.js.map +1 -0
- package/dist/control-ui/assets/{index-C7ieCeTV.css → index-CAE6wsJy.css} +1 -1
- package/dist/control-ui/index.html +2 -2
- package/dist/hooks/bundled/ride-dispatch/handler.js +120 -48
- package/dist/license/whiteglove-pack.js +225 -0
- package/dist/suggestions/broadcast.js +0 -56
- package/dist/suggestions/generator.js +5 -20
- package/package.json +1 -1
- package/templates/beagle-zanzibar/agents/admin/AGENTS.md +96 -1
- package/templates/beagle-zanzibar/skills/beagle-zanzibar/cron-template-lifecycle.json +20 -0
- package/templates/beagle-zanzibar/skills/beagle-zanzibar/references/ride-matching.md +20 -6
- package/dist/control-ui/assets/index-1WwUK7EM.js.map +0 -1
package/dist/build-info.json
CHANGED
|
@@ -218,6 +218,14 @@ const entries = [
|
|
|
218
218
|
mod.registerProvisionCli(program);
|
|
219
219
|
},
|
|
220
220
|
},
|
|
221
|
+
{
|
|
222
|
+
name: "whiteglove",
|
|
223
|
+
description: "White glove installation (sign, install, deploy)",
|
|
224
|
+
register: async (program) => {
|
|
225
|
+
const mod = await import("../whiteglove-cli.js");
|
|
226
|
+
mod.registerWhiteGloveCli(program);
|
|
227
|
+
},
|
|
228
|
+
},
|
|
221
229
|
];
|
|
222
230
|
function removeCommand(program, command) {
|
|
223
231
|
const commands = program.commands;
|
|
@@ -66,6 +66,12 @@ async function runProvision(opts) {
|
|
|
66
66
|
console.log("[5/7] Hostname: skipped (macOS)");
|
|
67
67
|
console.log("[6/7] Avahi service: skipped (macOS)");
|
|
68
68
|
}
|
|
69
|
+
// Step 6b: Log directory (Linux only) — ensure /tmp/taskmaster is world-writable
|
|
70
|
+
// on every boot via systemd-tmpfiles.d so the gateway can always write logs there
|
|
71
|
+
// regardless of which user created the directory previously.
|
|
72
|
+
if (isLinux) {
|
|
73
|
+
await setupLogDir();
|
|
74
|
+
}
|
|
69
75
|
// Step 7: Install daemon
|
|
70
76
|
console.log("[7/7] Installing gateway daemon...");
|
|
71
77
|
await runDaemonInstall({ port, force: true });
|
|
@@ -218,6 +224,24 @@ async function restartAvahi() {
|
|
|
218
224
|
}
|
|
219
225
|
}
|
|
220
226
|
// ---------------------------------------------------------------------------
|
|
227
|
+
// Step 6b: Log directory (Linux only)
|
|
228
|
+
// ---------------------------------------------------------------------------
|
|
229
|
+
async function setupLogDir() {
|
|
230
|
+
const tmpfileConf = "/etc/tmpfiles.d/taskmaster.conf";
|
|
231
|
+
const confLine = "d /tmp/taskmaster 1777 root root -\n";
|
|
232
|
+
console.log("[6b/7] Log directory: writing systemd-tmpfiles.d entry...");
|
|
233
|
+
try {
|
|
234
|
+
await runCommandWithTimeout(["sudo", "sh", "-c", `echo '${confLine.trim()}' > ${tmpfileConf}`], { timeoutMs: 10_000 });
|
|
235
|
+
await runCommandWithTimeout(["sudo", "systemd-tmpfiles", "--create", tmpfileConf], {
|
|
236
|
+
timeoutMs: 10_000,
|
|
237
|
+
});
|
|
238
|
+
console.log(" /tmp/taskmaster: world-writable (1777), persists across reboots");
|
|
239
|
+
}
|
|
240
|
+
catch (err) {
|
|
241
|
+
console.error(` log dir setup failed: ${String(err)}`);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
// ---------------------------------------------------------------------------
|
|
221
245
|
// Helpers
|
|
222
246
|
// ---------------------------------------------------------------------------
|
|
223
247
|
async function fileExists(p) {
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `taskmaster whiteglove` — White glove installation CLI.
|
|
3
|
+
*
|
|
4
|
+
* Three subcommands:
|
|
5
|
+
* sign — Read a template directory and produce a signed .whiteglove.json
|
|
6
|
+
* install — Apply a signed pack to the local workspace (overwrites agent files, seeds memory, installs skills)
|
|
7
|
+
* deploy — SCP a signed pack to a Pi and SSH to run install
|
|
8
|
+
*/
|
|
9
|
+
import fs from "node:fs/promises";
|
|
10
|
+
import path from "node:path";
|
|
11
|
+
import os from "node:os";
|
|
12
|
+
import { execFileSync } from "node:child_process";
|
|
13
|
+
import { signWhiteGlovePack, verifyWhiteGlovePack, } from "../license/whiteglove-pack.js";
|
|
14
|
+
import { getDeviceId } from "../license/device-id.js";
|
|
15
|
+
import { theme } from "../terminal/theme.js";
|
|
16
|
+
import { BOOTSTRAP_DONE_SENTINEL } from "../agents/workspace.js";
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
// Helpers
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
async function readDirFiles(dir) {
|
|
21
|
+
const files = [];
|
|
22
|
+
let entries;
|
|
23
|
+
try {
|
|
24
|
+
entries = await fs.readdir(dir);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return files;
|
|
28
|
+
}
|
|
29
|
+
for (const name of entries.sort()) {
|
|
30
|
+
if (name.startsWith("."))
|
|
31
|
+
continue;
|
|
32
|
+
const full = path.join(dir, name);
|
|
33
|
+
const stat = await fs.stat(full);
|
|
34
|
+
if (!stat.isFile())
|
|
35
|
+
continue;
|
|
36
|
+
const content = await fs.readFile(full, "utf-8");
|
|
37
|
+
files.push({ name, content });
|
|
38
|
+
}
|
|
39
|
+
return files;
|
|
40
|
+
}
|
|
41
|
+
async function readAgents(baseDir) {
|
|
42
|
+
const agentsDir = path.join(baseDir, "agents");
|
|
43
|
+
const agents = [];
|
|
44
|
+
let entries;
|
|
45
|
+
try {
|
|
46
|
+
entries = await fs.readdir(agentsDir);
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return agents;
|
|
50
|
+
}
|
|
51
|
+
for (const id of entries.sort()) {
|
|
52
|
+
if (id.startsWith("."))
|
|
53
|
+
continue;
|
|
54
|
+
const agentDir = path.join(agentsDir, id);
|
|
55
|
+
const stat = await fs.stat(agentDir);
|
|
56
|
+
if (!stat.isDirectory())
|
|
57
|
+
continue;
|
|
58
|
+
const files = await readDirFiles(agentDir);
|
|
59
|
+
if (files.length > 0) {
|
|
60
|
+
agents.push({ id, files });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return agents;
|
|
64
|
+
}
|
|
65
|
+
async function readMemory(baseDir) {
|
|
66
|
+
const memoryDir = path.join(baseDir, "memory");
|
|
67
|
+
const memory = [];
|
|
68
|
+
let scopes;
|
|
69
|
+
try {
|
|
70
|
+
scopes = await fs.readdir(memoryDir);
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return memory;
|
|
74
|
+
}
|
|
75
|
+
for (const scope of scopes.sort()) {
|
|
76
|
+
if (scope.startsWith("."))
|
|
77
|
+
continue;
|
|
78
|
+
const scopeDir = path.join(memoryDir, scope);
|
|
79
|
+
const stat = await fs.stat(scopeDir);
|
|
80
|
+
if (!stat.isDirectory())
|
|
81
|
+
continue;
|
|
82
|
+
const files = await readDirFiles(scopeDir);
|
|
83
|
+
for (const file of files) {
|
|
84
|
+
memory.push({ scope, name: file.name, content: file.content });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return memory;
|
|
88
|
+
}
|
|
89
|
+
async function readSkills(baseDir) {
|
|
90
|
+
const skillsDir = path.join(baseDir, "skills");
|
|
91
|
+
const skills = [];
|
|
92
|
+
let entries;
|
|
93
|
+
try {
|
|
94
|
+
entries = await fs.readdir(skillsDir);
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
return skills;
|
|
98
|
+
}
|
|
99
|
+
for (const id of entries.sort()) {
|
|
100
|
+
if (id.startsWith("."))
|
|
101
|
+
continue;
|
|
102
|
+
const skillDir = path.join(skillsDir, id);
|
|
103
|
+
const stat = await fs.stat(skillDir);
|
|
104
|
+
if (!stat.isDirectory())
|
|
105
|
+
continue;
|
|
106
|
+
const skillPath = path.join(skillDir, "SKILL.md");
|
|
107
|
+
let skillContent;
|
|
108
|
+
try {
|
|
109
|
+
skillContent = await fs.readFile(skillPath, "utf-8");
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
continue; // skip directories without SKILL.md
|
|
113
|
+
}
|
|
114
|
+
const references = [];
|
|
115
|
+
const refFiles = await readDirFiles(path.join(skillDir, "references"));
|
|
116
|
+
for (const ref of refFiles) {
|
|
117
|
+
references.push({ name: ref.name, content: ref.content });
|
|
118
|
+
}
|
|
119
|
+
skills.push({ id, skill: skillContent, references });
|
|
120
|
+
}
|
|
121
|
+
return skills;
|
|
122
|
+
}
|
|
123
|
+
async function runSign(templateDir, opts) {
|
|
124
|
+
const resolved = path.resolve(templateDir);
|
|
125
|
+
// Validate template directory exists
|
|
126
|
+
try {
|
|
127
|
+
await fs.access(resolved);
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
console.error(theme.error(`Template directory not found: ${resolved}`));
|
|
131
|
+
process.exit(1);
|
|
132
|
+
}
|
|
133
|
+
const packId = path.basename(resolved);
|
|
134
|
+
console.log(theme.heading(`Signing white glove pack: ${packId}`));
|
|
135
|
+
console.log("");
|
|
136
|
+
// Read template contents
|
|
137
|
+
const agents = await readAgents(resolved);
|
|
138
|
+
const memory = await readMemory(resolved);
|
|
139
|
+
const skills = await readSkills(resolved);
|
|
140
|
+
if (agents.length === 0 && memory.length === 0 && skills.length === 0) {
|
|
141
|
+
console.error(theme.error("Template directory is empty — no agents, memory, or skills found."));
|
|
142
|
+
process.exit(1);
|
|
143
|
+
}
|
|
144
|
+
// Summary
|
|
145
|
+
console.log(theme.muted(" Agents: ") + agents.map((a) => a.id).join(", "));
|
|
146
|
+
console.log(theme.muted(" Memory: ") + memory.map((m) => `${m.scope}/${m.name}`).join(", "));
|
|
147
|
+
console.log(theme.muted(" Skills: ") + skills.map((s) => s.id).join(", "));
|
|
148
|
+
console.log("");
|
|
149
|
+
const payload = {
|
|
150
|
+
format: "whiteglove-v1",
|
|
151
|
+
pack: {
|
|
152
|
+
id: packId,
|
|
153
|
+
version: opts.version ?? "1.0.0",
|
|
154
|
+
name: opts.name ?? packId,
|
|
155
|
+
description: opts.description ??
|
|
156
|
+
`White glove pack: ${agents.length} agent(s), ${memory.length} memory file(s), ${skills.length} skill(s)`,
|
|
157
|
+
author: "Rubytech LLC",
|
|
158
|
+
},
|
|
159
|
+
device: {
|
|
160
|
+
did: opts.device,
|
|
161
|
+
cid: opts.customer,
|
|
162
|
+
},
|
|
163
|
+
content: { agents, memory, skills },
|
|
164
|
+
signedAt: new Date().toISOString(),
|
|
165
|
+
};
|
|
166
|
+
const signed = signWhiteGlovePack(payload);
|
|
167
|
+
// Write output
|
|
168
|
+
const outputPath = opts.output ?? path.join(path.dirname(resolved), `${packId}.whiteglove.json`);
|
|
169
|
+
await fs.writeFile(outputPath, JSON.stringify(signed, null, 2), "utf-8");
|
|
170
|
+
console.log(theme.success(`Signed pack written to ${outputPath}`));
|
|
171
|
+
console.log(theme.muted(` ${agents.length} agent(s), ${memory.length} memory file(s), ${skills.length} skill(s)`));
|
|
172
|
+
console.log(theme.muted(` Device: ${opts.device} | Customer: ${opts.customer}`));
|
|
173
|
+
}
|
|
174
|
+
async function runInstall(packFile, opts) {
|
|
175
|
+
const resolved = path.resolve(packFile);
|
|
176
|
+
// Read and verify pack
|
|
177
|
+
let raw;
|
|
178
|
+
try {
|
|
179
|
+
const content = await fs.readFile(resolved, "utf-8");
|
|
180
|
+
raw = JSON.parse(content);
|
|
181
|
+
}
|
|
182
|
+
catch {
|
|
183
|
+
console.error(theme.error(`Could not read or parse: ${resolved}`));
|
|
184
|
+
process.exit(1);
|
|
185
|
+
}
|
|
186
|
+
const result = verifyWhiteGlovePack(raw);
|
|
187
|
+
if (!result.valid) {
|
|
188
|
+
console.error(theme.error(`Verification failed: ${result.message}`));
|
|
189
|
+
process.exit(1);
|
|
190
|
+
}
|
|
191
|
+
const { payload } = result;
|
|
192
|
+
const workspaceDir = opts.workspace ?? path.join(os.homedir(), "taskmaster");
|
|
193
|
+
console.log(theme.heading(`Installing white glove pack: ${payload.pack.name}`));
|
|
194
|
+
console.log(theme.muted(` Workspace: ${workspaceDir}`));
|
|
195
|
+
console.log("");
|
|
196
|
+
// ── 1. Overwrite agent files ──
|
|
197
|
+
for (const agent of payload.content.agents) {
|
|
198
|
+
const agentDir = path.join(workspaceDir, "agents", agent.id);
|
|
199
|
+
await fs.mkdir(agentDir, { recursive: true });
|
|
200
|
+
for (const file of agent.files) {
|
|
201
|
+
const filePath = path.join(agentDir, file.name);
|
|
202
|
+
await fs.writeFile(filePath, file.content, "utf-8");
|
|
203
|
+
}
|
|
204
|
+
console.log(theme.success(` Agent ${agent.id}: ${agent.files.map((f) => f.name).join(", ")}`));
|
|
205
|
+
}
|
|
206
|
+
// ── 2. Write .bootstrap-done sentinel for each agent (skip onboarding) ──
|
|
207
|
+
for (const agent of payload.content.agents) {
|
|
208
|
+
const sentinelPath = path.join(workspaceDir, "agents", agent.id, BOOTSTRAP_DONE_SENTINEL);
|
|
209
|
+
await fs.writeFile(sentinelPath, "", "utf-8");
|
|
210
|
+
// Remove BOOTSTRAP.md if present
|
|
211
|
+
const bootstrapPath = path.join(workspaceDir, "agents", agent.id, "BOOTSTRAP.md");
|
|
212
|
+
try {
|
|
213
|
+
await fs.unlink(bootstrapPath);
|
|
214
|
+
}
|
|
215
|
+
catch {
|
|
216
|
+
// Not present — fine
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
console.log(theme.muted(" Bootstrap skipped (sentinel written)"));
|
|
220
|
+
// ── 3. Seed memory files ──
|
|
221
|
+
for (const mem of payload.content.memory) {
|
|
222
|
+
// Memory lives at the workspace root: <workspace>/memory/<scope>/<name>
|
|
223
|
+
const memDir = path.join(workspaceDir, "memory", mem.scope);
|
|
224
|
+
await fs.mkdir(memDir, { recursive: true });
|
|
225
|
+
const memPath = path.join(memDir, mem.name);
|
|
226
|
+
await fs.writeFile(memPath, mem.content, "utf-8");
|
|
227
|
+
console.log(theme.success(` Memory ${mem.scope}/${mem.name}`));
|
|
228
|
+
}
|
|
229
|
+
// ── 4. Install skills ──
|
|
230
|
+
for (const skill of payload.content.skills) {
|
|
231
|
+
const skillDir = path.join(workspaceDir, "skills", skill.id);
|
|
232
|
+
await fs.mkdir(skillDir, { recursive: true });
|
|
233
|
+
// Write SKILL.md
|
|
234
|
+
await fs.writeFile(path.join(skillDir, "SKILL.md"), skill.skill, "utf-8");
|
|
235
|
+
// Write references
|
|
236
|
+
if (skill.references.length > 0) {
|
|
237
|
+
const refsDir = path.join(skillDir, "references");
|
|
238
|
+
await fs.mkdir(refsDir, { recursive: true });
|
|
239
|
+
for (const ref of skill.references) {
|
|
240
|
+
await fs.writeFile(path.join(refsDir, ref.name), ref.content, "utf-8");
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
// Write .skillpack marker
|
|
244
|
+
const marker = {
|
|
245
|
+
packId: payload.pack.id,
|
|
246
|
+
version: payload.pack.version,
|
|
247
|
+
author: payload.pack.author,
|
|
248
|
+
installedAt: new Date().toISOString(),
|
|
249
|
+
deviceId: payload.device.did,
|
|
250
|
+
customerId: payload.device.cid,
|
|
251
|
+
};
|
|
252
|
+
await fs.writeFile(path.join(skillDir, ".skillpack"), JSON.stringify(marker, null, 2) + "\n", "utf-8");
|
|
253
|
+
const refCount = skill.references.length;
|
|
254
|
+
console.log(theme.success(` Skill ${skill.id}`) +
|
|
255
|
+
(refCount > 0 ? theme.muted(` (${refCount} ref${refCount > 1 ? "s" : ""})`) : ""));
|
|
256
|
+
}
|
|
257
|
+
console.log("");
|
|
258
|
+
console.log(theme.success(`White glove installation complete: ` +
|
|
259
|
+
`${payload.content.agents.length} agent(s), ` +
|
|
260
|
+
`${payload.content.memory.length} memory file(s), ` +
|
|
261
|
+
`${payload.content.skills.length} skill(s)`));
|
|
262
|
+
}
|
|
263
|
+
async function runDeploy(packFile, opts) {
|
|
264
|
+
const resolved = path.resolve(packFile);
|
|
265
|
+
const remoteUser = opts.user ?? "admin";
|
|
266
|
+
const remoteHost = opts.host;
|
|
267
|
+
const remoteWorkspace = opts.workspace ?? "~/taskmaster";
|
|
268
|
+
const remoteTmpPath = `/tmp/${path.basename(resolved)}`;
|
|
269
|
+
console.log(theme.heading(`Deploying white glove pack to ${remoteUser}@${remoteHost}`));
|
|
270
|
+
console.log(theme.muted(` Pack: ${resolved}`));
|
|
271
|
+
console.log(theme.muted(` Remote workspace: ${remoteWorkspace}`));
|
|
272
|
+
console.log("");
|
|
273
|
+
// Verify the pack locally first
|
|
274
|
+
let raw;
|
|
275
|
+
try {
|
|
276
|
+
const content = await fs.readFile(resolved, "utf-8");
|
|
277
|
+
raw = JSON.parse(content);
|
|
278
|
+
}
|
|
279
|
+
catch {
|
|
280
|
+
console.error(theme.error(`Could not read or parse: ${resolved}`));
|
|
281
|
+
process.exit(1);
|
|
282
|
+
}
|
|
283
|
+
const result = verifyWhiteGlovePack(raw);
|
|
284
|
+
if (!result.valid) {
|
|
285
|
+
console.error(theme.error(`Verification failed locally: ${result.message}`));
|
|
286
|
+
process.exit(1);
|
|
287
|
+
}
|
|
288
|
+
console.log(theme.success(" Pack verified locally"));
|
|
289
|
+
// Step 1: SCP the file to the Pi
|
|
290
|
+
console.log(theme.muted(` Copying to ${remoteUser}@${remoteHost}:${remoteTmpPath} ...`));
|
|
291
|
+
try {
|
|
292
|
+
execFileSync("scp", [resolved, `${remoteUser}@${remoteHost}:${remoteTmpPath}`], {
|
|
293
|
+
stdio: "inherit",
|
|
294
|
+
timeout: 30_000,
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
catch {
|
|
298
|
+
console.error(theme.error("SCP failed. Check SSH connectivity and credentials."));
|
|
299
|
+
process.exit(1);
|
|
300
|
+
}
|
|
301
|
+
console.log(theme.success(" File transferred"));
|
|
302
|
+
// Step 2: SSH to run install
|
|
303
|
+
const installCmd = `taskmaster whiteglove install "${remoteTmpPath}" --workspace "${remoteWorkspace}"`;
|
|
304
|
+
console.log(theme.muted(` Running: ${installCmd}`));
|
|
305
|
+
try {
|
|
306
|
+
execFileSync("ssh", [`${remoteUser}@${remoteHost}`, installCmd], {
|
|
307
|
+
stdio: "inherit",
|
|
308
|
+
timeout: 60_000,
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
catch {
|
|
312
|
+
console.error(theme.error("Remote install failed. SSH into the Pi and check taskmaster whiteglove install."));
|
|
313
|
+
process.exit(1);
|
|
314
|
+
}
|
|
315
|
+
// Step 3: Cleanup remote temp file
|
|
316
|
+
try {
|
|
317
|
+
execFileSync("ssh", [`${remoteUser}@${remoteHost}`, `rm -f "${remoteTmpPath}"`], {
|
|
318
|
+
stdio: "pipe",
|
|
319
|
+
timeout: 10_000,
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
catch {
|
|
323
|
+
// Non-critical — just a temp file
|
|
324
|
+
}
|
|
325
|
+
console.log("");
|
|
326
|
+
console.log(theme.success(`Deploy complete. Restart the gateway on ${remoteHost}:`));
|
|
327
|
+
console.log(theme.command(` ssh admin@${remoteHost} "taskmaster daemon restart"`));
|
|
328
|
+
}
|
|
329
|
+
// ---------------------------------------------------------------------------
|
|
330
|
+
// CLI registration
|
|
331
|
+
// ---------------------------------------------------------------------------
|
|
332
|
+
export function registerWhiteGloveCli(program) {
|
|
333
|
+
const wg = program
|
|
334
|
+
.command("whiteglove")
|
|
335
|
+
.description("White glove installation — sign, install, and deploy bespoke workspace packs");
|
|
336
|
+
wg.command("sign")
|
|
337
|
+
.description("Sign a template directory into a .whiteglove.json pack")
|
|
338
|
+
.argument("<templateDir>", "Path to template directory (agents/, memory/, skills/)")
|
|
339
|
+
.requiredOption("--device <did>", "Target device ID (tm_dev_...)")
|
|
340
|
+
.requiredOption("--customer <cid>", "Customer identifier")
|
|
341
|
+
.option("--version <version>", "Pack version", "1.0.0")
|
|
342
|
+
.option("--name <name>", "Pack display name (defaults to directory name)")
|
|
343
|
+
.option("--description <desc>", "Pack description")
|
|
344
|
+
.option("--output <path>", "Output file path (defaults to <templateDir>/../<id>.whiteglove.json)")
|
|
345
|
+
.action(async (templateDir, opts) => {
|
|
346
|
+
await runSign(templateDir, opts);
|
|
347
|
+
});
|
|
348
|
+
wg.command("install")
|
|
349
|
+
.description("Install a signed .whiteglove.json pack to the local workspace")
|
|
350
|
+
.argument("<packFile>", "Path to .whiteglove.json file")
|
|
351
|
+
.option("--workspace <path>", "Workspace path (default: ~/taskmaster)")
|
|
352
|
+
.action(async (packFile, opts) => {
|
|
353
|
+
await runInstall(packFile, opts);
|
|
354
|
+
});
|
|
355
|
+
wg.command("deploy")
|
|
356
|
+
.description("SCP a signed pack to a Pi and run install via SSH")
|
|
357
|
+
.argument("<packFile>", "Path to .whiteglove.json file")
|
|
358
|
+
.requiredOption("--host <hostname>", "Pi hostname or IP address")
|
|
359
|
+
.option("--user <user>", "SSH user", "admin")
|
|
360
|
+
.option("--workspace <path>", "Remote workspace path", "~/taskmaster")
|
|
361
|
+
.action(async (packFile, opts) => {
|
|
362
|
+
await runDeploy(packFile, opts);
|
|
363
|
+
});
|
|
364
|
+
wg.command("device-id")
|
|
365
|
+
.description("Print the device ID of this machine")
|
|
366
|
+
.action(() => {
|
|
367
|
+
console.log(getDeviceId());
|
|
368
|
+
});
|
|
369
|
+
}
|
|
@@ -329,12 +329,9 @@ ${o}`)}return e.chatStream="","working"}else if(t.state==="block"){const s=Mn(t.
|
|
|
329
329
|
`)}
|
|
330
330
|
</div>
|
|
331
331
|
`:w}function wg(e){const t=e.currentDir;return e.connected?c`
|
|
332
|
-
<div class="setup-container">
|
|
332
|
+
<div class="setup-container setup-container--full">
|
|
333
333
|
${Rt("Files",e.wsProps)}
|
|
334
|
-
<div class="
|
|
335
|
-
<h1>Workspace Files</h1>
|
|
336
|
-
<p style="margin-bottom: 16px;">Browse, upload, and manage files in your workspace. Drag files between folders to move them.</p>
|
|
337
|
-
|
|
334
|
+
<div class="sp-files-page">
|
|
338
335
|
<div class="sp-toolbar">
|
|
339
336
|
<label class="setup-button secondary" style="padding: 10px 20px; font-size: 14px; cursor: pointer;">
|
|
340
337
|
Upload${t!=="."?c` to <em>${t}</em>`:w}
|
|
@@ -464,8 +461,8 @@ ${o}`)}return e.chatStream="","working"}else if(t.state==="block"){const s=Mn(t.
|
|
|
464
461
|
${o.copyable?c`<button
|
|
465
462
|
class="setup-info-btn"
|
|
466
463
|
title="Copy ${o.label}"
|
|
467
|
-
@click=${async a=>{const r=a.currentTarget;try{await navigator.clipboard.writeText(o.value),r.
|
|
468
|
-
|
|
464
|
+
@click=${async a=>{const r=a.currentTarget;try{await navigator.clipboard.writeText(o.value),r.classList.add("copied"),setTimeout(()=>r.classList.remove("copied"),1500)}catch{const l=document.createElement("textarea");l.value=o.value,l.style.position="fixed",l.style.opacity="0",document.body.appendChild(l),l.select(),document.execCommand("copy"),document.body.removeChild(l),r.classList.add("copied"),setTimeout(()=>r.classList.remove("copied"),1500)}}}
|
|
465
|
+
>${I.copy}</button>`:w}
|
|
469
466
|
</div>
|
|
470
467
|
`)}
|
|
471
468
|
<button
|
|
@@ -4937,4 +4934,4 @@ ${a.text}`:r.join(", "):a.text;t.push({kind:"message",key:`queue:${a.id}`,messag
|
|
|
4937
4934
|
`}const k0={trace:!1,debug:!1,info:!0,warn:!0,error:!0,fatal:!0},x0={name:"",description:"",agentId:"",enabled:!0,scheduleKind:"every",scheduleAt:"",everyAmount:"30",everyUnit:"minutes",cronExpr:"0 7 * * *",cronTz:"",sessionTarget:"main",wakeMode:"next-heartbeat",payloadKind:"systemEvent",payloadText:"",deliver:!1,channel:"last",recipients:[],toAdmins:!1,timeoutSeconds:"",postToMainPrefix:""};function $0(e){e.basePath=Gf();const t=Xe();Vl(t.accentColor),Ql(t.backgroundColor);const n=document.querySelector('link[rel="icon"]');if(n&&(n.href=t.iconUrl),window.scrollTo(0,0),Uf(e),e.publicChat){const i=window.__TASKMASTER_PUBLIC_CHAT_CONFIG__,s=(i==null?void 0:i.accountId)??"",o=s?s.charAt(0).toUpperCase()+s.slice(1):"Assistant";document.title=`Chat with ${o}`,Oe(e);return}if(e.setup){document.title=`${t.name} Setup`,Oe(e);return}if(e.filesPage){document.title=`${t.name} Files`,zf(e),Oe(e);return}if(e.browserPage){document.title=`${t.name} Browser`,Oe(e);return}if(e.adminsPage){document.title=`${t.name} Admins`,Oe(e);return}if(e.contactsPage){document.title=`${t.name} Contacts`,Oe(e);return}if(e.chatPage){document.title=`${t.name} Chat`,Oe(e);return}if(e.advancedPage){document.title=`${t.name} Advanced`,Oe(e),zi(e),Wi(e);return}Yf(e,!0),Vf(e),Qf(e),window.addEventListener("popstate",e.popStateHandler),Hf(e),Oe(e),Of(e),e.tab==="logs"&&(e.logsSubTab==="session"?zi(e):Wi(e)),e.tab==="debug"&&va(e)}function S0(e){mh(e)}function A0(e){var t;window.removeEventListener("popstate",e.popStateHandler),Ff(e),ma(e),ya(e),ba(e),Wf(e),Kf(e),Jf(e),(t=e.topbarObserver)==null||t.disconnect(),e.topbarObserver=null}function C0(e,t){if(!e.publicChat){if(e.filesPage&&e.connected&&t.has("connected")&&t.get("connected")===!1&&e.handleFilesLoad&&e.handleFilesLoad(),e.adminsPage&&e.connected&&t.has("connected")&&t.get("connected")===!1&&e.handleAdminsLoad&&e.handleAdminsLoad(),e.contactsPage&&e.connected&&t.has("connected")&&t.get("connected")===!1&&e.handleContactsLoad&&e.handleContactsLoad(),e.chatPage&&e.connected&&t.has("connected")&&t.get("connected")===!1&&e.handleChatLoad&&e.handleChatLoad(),e.advancedPage&&e.connected&&t.has("connected")&&t.get("connected")===!1&&e.handleAdvancedLoad&&e.handleAdvancedLoad(),e.setup&&e.connected){const n=t.has("connected")&&t.get("connected")===!1;n&&e.handleLicenseStatusCheck&&e.licenseValid===null&&!e.licenseBusy&&e.handleLicenseStatusCheck(),n&&e.handleUpdateCheck&&e.handleUpdateCheck();const i=t.has("setupStep")&&e.setupStep==="auth",s=t.has("setupStep")&&e.setupStep==="setup";(n||i||s)&&e.handleAuthStatusCheck&&e.authConnected===null&&!e.authBusy&&e.handleAuthStatusCheck(),e.setupStep==="setup"&&t.has("setupStep")&&e.client&&!e.channelsLoading&&(e.channelsLoading=!0,e.client.request("channels.status",{probe:!0,timeoutMs:8e3}).then(a=>{e.channelsSnapshot=a,e.channelsLoading=!1}).catch(()=>{e.channelsLoading=!1})),t.has("whatsappLoginConnected")&&e.whatsappLoginConnected===!0&&e.client&&!e.channelsLoading&&(e.channelsLoading=!0,e.client.request("channels.status",{probe:!0,timeoutMs:8e3}).then(o=>{e.channelsSnapshot=o,e.channelsLoading=!1}).catch(()=>{e.channelsLoading=!1}))}if(e.tab==="chat"&&!e.advancedPage&&(t.has("chatMessages")||t.has("chatToolMessages")||t.has("chatStream")||t.has("chatLoading")||t.has("tab"))){const n=t.has("tab"),i=t.has("chatLoading")&&t.get("chatLoading")===!0&&e.chatLoading===!1;sn(e,n||i||!e.chatHasAutoScrolled)}e.tab==="logs"&&!e.advancedPage&&(t.has("logsEntries")||t.has("logsAutoFollow")||t.has("tab"))&&e.logsAutoFollow&&e.logsAtBottom&&Ao(e,t.has("tab")||t.has("logsAutoFollow")),(t.has("sessionLogsEntries")||t.has("sessionLogsAutoFollow"))&&e.sessionLogsAutoFollow&&e.logsAtBottom&&Ao(e,t.has("sessionLogsAutoFollow"))}}function E0(e){const t={name:(e==null?void 0:e.name)??"",displayName:(e==null?void 0:e.displayName)??"",about:(e==null?void 0:e.about)??"",picture:(e==null?void 0:e.picture)??"",banner:(e==null?void 0:e.banner)??"",website:(e==null?void 0:e.website)??"",nip05:(e==null?void 0:e.nip05)??"",lud16:(e==null?void 0:e.lud16)??""};return{values:t,original:{...t},saving:!1,importing:!1,error:null,success:null,fieldErrors:{},showAdvanced:!!(e!=null&&e.banner||e!=null&&e.website||e!=null&&e.nip05||e!=null&&e.lud16)}}async function T0(e,t,n){await sa(e,t,n),await Z(e,!0)}async function _0(e,t){await hc(e,t),await Z(e,!0)}async function M0(e,t){await fc(e,t),await Z(e,!0)}async function P0(e,t){await gc(e,t)}async function I0(e,t){await mc(e,t)}async function R0(e){await bh(e),await We(e),await Z(e,!0)}async function L0(e){await We(e),await Z(e,!0)}function D0(e){if(!Array.isArray(e))return{};const t={};for(const n of e){if(typeof n!="string")continue;const[i,...s]=n.split(":");if(!i||s.length===0)continue;const o=i.trim(),a=s.join(":").trim();o&&a&&(t[o]=a)}return t}function Ou(e){var n,i,s;return((s=(((i=(n=e.channelsSnapshot)==null?void 0:n.channelAccounts)==null?void 0:i.nostr)??[])[0])==null?void 0:s.accountId)??e.nostrProfileAccountId??"default"}function Fu(e,t=""){return`/api/channels/nostr/${encodeURIComponent(e)}/profile${t}`}function B0(e,t,n){e.nostrProfileAccountId=t,e.nostrProfileFormState=E0(n??void 0)}function N0(e){e.nostrProfileFormState=null,e.nostrProfileAccountId=null}function O0(e,t,n){const i=e.nostrProfileFormState;i&&(e.nostrProfileFormState={...i,values:{...i.values,[t]:n},fieldErrors:{...i.fieldErrors,[t]:""}})}function F0(e){const t=e.nostrProfileFormState;t&&(e.nostrProfileFormState={...t,showAdvanced:!t.showAdvanced})}async function U0(e){const t=e.nostrProfileFormState;if(!t||t.saving)return;const n=Ou(e);e.nostrProfileFormState={...t,saving:!0,error:null,success:null,fieldErrors:{}};try{const i=await fetch(Fu(n),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t.values)}),s=await i.json().catch(()=>null);if(!i.ok||(s==null?void 0:s.ok)===!1||!s){const o=(s==null?void 0:s.error)??`Profile update failed (${i.status})`;e.nostrProfileFormState={...t,saving:!1,error:o,success:null,fieldErrors:D0(s==null?void 0:s.details)};return}if(!s.persisted){e.nostrProfileFormState={...t,saving:!1,error:"Profile publish failed on all relays.",success:null};return}e.nostrProfileFormState={...t,saving:!1,error:null,success:"Profile published to relays.",fieldErrors:{},original:{...t.values}},await Z(e,!0)}catch(i){e.nostrProfileFormState={...t,saving:!1,error:`Profile update failed: ${String(i)}`,success:null}}}async function W0(e){const t=e.nostrProfileFormState;if(!t||t.importing)return;const n=Ou(e);e.nostrProfileFormState={...t,importing:!0,error:null,success:null};try{const i=await fetch(Fu(n,"/import"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({autoMerge:!0})}),s=await i.json().catch(()=>null);if(!i.ok||(s==null?void 0:s.ok)===!1||!s){const l=(s==null?void 0:s.error)??`Profile import failed (${i.status})`;e.nostrProfileFormState={...t,importing:!1,error:l,success:null};return}const o=s.merged??s.imported??null,a=o?{...t.values,...o}:t.values,r=!!(a.banner||a.website||a.nip05||a.lud16);e.nostrProfileFormState={...t,importing:!1,values:a,error:null,success:s.saved?"Profile imported from relays. Review and publish.":"Profile imported. Review and publish.",showAdvanced:r},s.saved&&await Z(e,!0)}catch(i){e.nostrProfileFormState={...t,importing:!1,error:`Profile import failed: ${String(i)}`,success:null}}}async function z0(e){if(!e.client)return;const t=e.authRefreshTokenInput.trim();if(t){e.authRefreshTokenBusy=!0,e.authRefreshTokenError=null;try{const n=await e.client.request("auth.importRefreshToken",{refreshToken:t});e.authConnected=n.connected,e.authExpiresIn=n.expiresIn??null,e.authMessage=n.message??null,e.authRefreshToken=t,e.authRefreshTokenInput="",e.claudeAuthModalOpen=!1}catch(n){e.authRefreshTokenError=n instanceof Error?n.message:"Failed to import token"}finally{e.authRefreshTokenBusy=!1}}}async function K0(e){if(e.client){e.authBusy=!0,e.authMessage=null;try{const t=await e.client.request("auth.status",{});e.authConnected=t.connected,e.authExpiresIn=t.expiresIn??null,e.authMessage=t.message??null,e.authRefreshToken=t.refreshToken??null}catch(t){e.authConnected=!1,e.authMessage=t instanceof Error?t.message:"Failed to check auth status"}finally{e.authBusy=!1}}}async function H0(e){if(e.client){e.authBusy=!0,e.authMessage=null,e.authUrl=null,e.authConnected=null;try{const t=await e.client.request("auth.oauth.start",{provider:"anthropic"});e.authUrl=t.authUrl,e.authMessage=t.message??"Sign in with your Claude Pro account"}catch(t){e.authConnected=!1,e.authMessage=t instanceof Error?t.message:"Failed to start auth flow"}finally{e.authBusy=!1}}}async function q0(e,t){if(e.client){e.authBusy=!0,e.authMessage="Verifying code...";try{await e.client.request("auth.oauth.code",{code:t});const n=await e.client.request("auth.oauth.wait",{timeoutMs:3e4});n.connected?(e.authConnected=!0,e.authMessage=n.message??"Connected to Claude!",e.authUrl=null,e.authCodeInput=""):e.authMessage=n.message??"Still waiting for authorization..."}catch(n){e.authConnected=!1,e.authMessage=n instanceof Error?n.message:"Verification failed"}finally{e.authBusy=!1}}}function j0(e,t){e.authCodeInput=t}async function G0(e){if(e.client){e.licenseBusy=!0,e.licenseMessage=null;try{const t=await e.client.request("license.status",{});e.licenseDeviceId=t.deviceId??null,e.licenseStoredKey=t.key??null,t.licensed?(e.licenseValid=!0,e.licenseTier=t.tier??null,e.setupStep="setup"):(e.licenseValid=null,e.setupStep="license")}catch(t){const n=t instanceof Error?t.message:String(t);n.includes("unknown method")?(e.licenseValid=!0,e.setupStep="setup"):(e.licenseValid=null,e.licenseMessage=n,e.setupStep="license")}finally{e.licenseBusy=!1}}}async function V0(e){if(e.client&&e.licenseKey.trim()){e.licenseBusy=!0,e.licenseMessage=null,e.licenseValid=null;try{const t=await e.client.request("license.activate",{key:e.licenseKey.trim()});t.valid?(e.licenseValid=!0,e.licenseMessage=t.message??"License activated",e.licenseTier=t.tier??null,setTimeout(()=>{e.setupStep="setup"},1500)):(e.licenseValid=!1,e.licenseMessage=t.message??"Invalid license key")}catch(t){e.licenseValid=!1,e.licenseMessage=t instanceof Error?t.message:"Activation failed"}finally{e.licenseBusy=!1}}}async function Q0(e){if(e.client){e.licenseBusy=!0;try{await e.client.request("license.remove",{}),e.licenseValid=null,e.licenseKey="",e.licenseTier=null,e.licenseMessage=null,e.setupStep="license"}catch(t){e.licenseMessage=t instanceof Error?t.message:"Failed to remove license"}finally{e.licenseBusy=!1}}}function J0(e,t){e.licenseKey=t}async function Y0(e){var t,n;if(!(!e.client||!e.connected)&&!e.gatewayHealthLoading){e.gatewayHealthLoading=!0,(t=e.requestUpdate)==null||t.call(e);try{const i=await e.client.request("health",{probe:!0});e.gatewayHealthy=i.ok===!0,e.gatewayHealthMessage=i.ok?`Healthy${i.durationMs?` (${i.durationMs}ms)`:""}`:"Unhealthy"}catch(i){e.gatewayHealthy=!1,e.gatewayHealthMessage=`Error: ${String(i)}`}finally{e.gatewayHealthLoading=!1,(n=e.requestUpdate)==null||n.call(e)}}}async function X0(e){var t,n,i;if(!(!e.client||e.gatewayRestartBusy)){e.gatewayRestartBusy=!0,e.gatewayHealthMessage="Restarting...",(t=e.requestUpdate)==null||t.call(e);try{const s=await e.client.request("gateway.restart",{reason:"Manual restart from setup page",delayMs:1e3});if(s.ok&&((n=s.restart)!=null&&n.ok))e.gatewayHealthMessage="Restarting...",setTimeout(()=>{window.location.reload()},3e3);else throw new Error("Restart not scheduled")}catch(s){e.gatewayHealthMessage=`Restart failed: ${String(s)}`,e.gatewayRestartBusy=!1,(i=e.requestUpdate)==null||i.call(e)}}}var Z0=Object.defineProperty,ex=Object.getOwnPropertyDescriptor,g=(e,t,n,i)=>{for(var s=i>1?void 0:i?ex(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(s=(i?a(t,n,s):a(s))||s);return i&&s&&Z0(t,n,s),s};const wo=Sp();function tx(){if(!window.location.search)return!1;const t=new URLSearchParams(window.location.search).get("onboarding");if(!t)return!1;const n=t.trim().toLowerCase();return n==="1"||n==="true"||n==="yes"||n==="on"}function nx(){const e=window.location.pathname;if(e==="/setup"||e.endsWith("/setup"))return!0;if(!window.location.search)return!1;const n=new URLSearchParams(window.location.search).get("setup");if(!n)return!1;const i=n.trim().toLowerCase();return i==="1"||i==="true"||i==="yes"||i==="on"}function ix(){const e=window.location.pathname;return e==="/files"||e.endsWith("/files")}function sx(){const e=window.location.pathname;return e==="/browser"||e.endsWith("/browser")}function ox(){const e=window.location.pathname;return e==="/admins"||e.endsWith("/admins")}function ax(){const e=window.location.pathname;return e==="/contacts"||e.endsWith("/contacts")}function rx(){const e=window.location.pathname;return e==="/chat"||e.endsWith("/chat")}function lx(){const e=window.location.pathname;return e==="/advanced"||e.endsWith("/advanced")}let f=class extends Gt{constructor(){super(...arguments),this.settings=Ns(),this.password="",this.tab="chat",this.onboarding=tx(),this.setup=nx(),this.filesPage=ix(),this.browserPage=sx(),this.adminsPage=ox(),this.contactsPage=ax(),this.chatPage=rx(),this.advancedPage=lx(),this.advancedTab="cron",this.publicChat=!!window.__TASKMASTER_PUBLIC_CHAT__,this.publicChatConfig=window.__TASKMASTER_PUBLIC_CHAT_CONFIG__??{},this.publicChatSessionKey=null,this.publicChatAuthenticated=!1,this.publicChatAuthStep="idle",this.connected=!1,this.accessState=yc,this.theme=this.settings.theme??"system",this.themeResolved="dark",this.hello=null,this.lastError=null,this.eventLog=[],this.eventLogBuffer=[],this.toolStreamSyncTimer=null,this.sidebarCloseTimer=null,this.assistantName=wo.name,this.assistantAvatar=wo.avatar,this.assistantAgentId=wo.agentId??null,this.sessionKey=this.settings.sessionKey,this.chatLoading=!1,this.chatSending=!1,this.chatMessage="",this.chatMessages=[],this.chatHistoryTotal=0,this.chatHistoryHasMore=!1,this.chatLoadingOlder=!1,this.chatToolMessages=[],this.chatStream=null,this.chatInterimText=null,this.chatSuggestions=[],this.chatStreamStartedAt=null,this.chatRunId=null,this.compactionStatus=null,this.chatAvatarUrl=null,this.chatModelCatalog=[],this.chatVerboseLevel=null,this.chatQueue=[],this.chatAttachments=[],this.sidebarOpen=!1,this.sidebarContent=null,this.sidebarError=null,this.splitRatio=this.settings.splitRatio,this.nodesLoading=!1,this.nodes=[],this.devicesLoading=!1,this.devicesError=null,this.devicesList=null,this.execApprovalsLoading=!1,this.execApprovalsSaving=!1,this.execApprovalsDirty=!1,this.execApprovalsSnapshot=null,this.execApprovalsForm=null,this.execApprovalsSelectedAgent=null,this.execApprovalsTarget="gateway",this.execApprovalsTargetNodeId=null,this.execApprovalQueue=[],this.execApprovalBusy=!1,this.execApprovalError=null,this.configLoading=!1,this.configRaw=`{
|
|
4938
4935
|
}
|
|
4939
4936
|
`,this.configRawOriginal="",this.configValid=null,this.configIssues=[],this.configSaving=!1,this.configApplying=!1,this.updateRunning=!1,this.applySessionKey=this.settings.lastActiveSessionKey,this.configSnapshot=null,this.configSchema=null,this.configSchemaVersion=null,this.configSchemaLoading=!1,this.configUiHints={},this.configForm=null,this.configFormOriginal=null,this.configFormDirty=!1,this.configFormMode="form",this.configSearchQuery="",this.configActiveSection=null,this.configActiveSubsection=null,this.channelsLoading=!1,this.channelsSnapshot=null,this.channelsError=null,this.channelsLastSuccess=null,this.whatsappLoginMessage=null,this.whatsappLoginQrDataUrl=null,this.whatsappLoginConnected=null,this.whatsappBusy=!1,this.whatsappActiveQrAccountId=null,this.whatsappPairedPhone=null,this.addingWhatsAppAccount=!1,this.newWhatsAppAccountName="",this.whatsappAccountError=null,this.whatsappAccountSaving=!1,this.whatsappSettingsOpen=!1,this.publicChatToggleBusy=!1,this.publicChatGreetingBusy=!1,this.publicChatEmailBusy=!1,this.publicChatSettingsOpen=!1,this.publicChatWidgetModalOpen=!1,this.brandingBusy=!1,this.agentSettingsOpen=!1,this.brandingExpanded=!1,this.tailscaleStatus=null,this.tailscaleBusy=!1,this.tailscaleAuthUrl=null,this.tailscaleError=null,this.tailscaleServeEnableUrl=null,this.tailscaleFunnelEnableUrl=null,this.tailscaleDisableConfirm=!1,this.tailscaleConnectProgress=0,this.tailscaleConnectMessage="",this.tailscaleConnectSuccess=!1,this.wifiStatus=null,this.wifiNetworks=[],this.wifiBusy=!1,this.wifiError=null,this.wifiPassword="",this.wifiSelectedSsid=null,this.networkPort=null,this.networkHostname="",this.networkPortInput="",this.networkHostnameInput="",this.networkModalOpen=!1,this.networkBusy=!1,this.networkError=null,this.networkSuccess=null,this.wifiModalOpen=!1,this.licenseKey="",this.licenseBusy=!1,this.licenseValid=null,this.licenseMessage=null,this.licenseTier=null,this.licenseDeviceId=null,this.licenseStoredKey=null,this.licenseRemoveConfirm=!1,this.authConnected=null,this.authBusy=!1,this.authMessage=null,this.authUrl=null,this.authCodeInput="",this.authExpiresIn=null,this.authRefreshToken=null,this.claudeAuthModalOpen=!1,this.authRefreshTokenInput="",this.authRefreshTokenBusy=!1,this.authRefreshTokenError=null,this.setupStep="license",this.gatewayHealthy=null,this.gatewayHealthLoading=!1,this.gatewayHealthMessage=null,this.gatewayRestartBusy=!1,this.updateAvailable=null,this.currentVersion=null,this.latestVersion=null,this.updateChecking=!1,this.updateMessage=null,this.updateProgressSteps=[],this.updateLastResult=null,this.uninstallConfirm=!1,this.uninstallBusy=!1,this.uninstallDone=!1,this.uninstallError=null,this.uninstallConfirmText="",this.nostrProfileFormState=null,this.nostrProfileAccountId=null,this.presenceLoading=!1,this.presenceEntries=[],this.presenceError=null,this.presenceStatus=null,this.agentsLoading=!1,this.agentsList=null,this.agentsError=null,this.sessionsLoading=!1,this.sessionsResult=null,this.sessionsError=null,this.cronLoading=!1,this.cronJobs=[],this.cronStatus=null,this.cronError=null,this.cronForm={...x0},this.cronRunsJobId=null,this.cronRuns=[],this.cronBusy=!1,this.cronNewEventModal=!1,this.cronDetailJobId=null,this.cronEditJobId=null,this.cronPendingDeleteId=null,this.cronRunModalJobId=null,this.cronRunModalJobName="",this.cronRunResult=null,this.openingHoursLoading=!1,this.openingHoursError=null,this.openingHoursBusy=!1,this.openingHoursForm=Wa(),this.browserScreencastActive=!1,this.browserScreencastFrame=null,this.browserScreencastMetadata=null,this.browserHandoffPending=!1,this.browserHandoffReason=null,this.browserHandoffId=null,this.browserInputMode=!1,this.browserFullscreen=!1,this.browserLoading=!1,this.browserError=null,this.filesLoading=!1,this.filesTree=[],this.filesRoot="",this.filesError=null,this.filesSelectedPath=null,this.filesSelectedPaths=new Set,this.filesPreviewContent=null,this.filesPreviewLoading=!1,this.filesPreviewBinary=!1,this.filesPreviewSize=null,this.filesExpandedDirs=new Set,this.filesCurrentDir=".",this.filesPendingDeletePath=null,this.filesMessage=null,this.filesUploadBusy=!1,this.filesReindexBusy=!1,this.filesMemoryStatus=null,this.embeddingDownloading=!1,this.embeddingPollTimer=null,this.filesSearchQuery="",this.filesSearchResults=null,this.filesSearchLoading=!1,this.filesSearchAgentId=null,this.filesResolvedAgentId=void 0,this.auditEntries=[],this.auditLoading=!1,this.auditModalOpen=!1,this.skillsLoading=!1,this.skillsReport=null,this.skillsError=null,this.skillsFilter="",this.skillsTypeFilter="all",this.skillsAgentFilter="all",this.skillEdits={},this.skillsBusyKey=null,this.skillMessages={},this.skillDetail=null,this.skillDetailTab="",this.skillAddModal=!1,this.skillAddForm={name:"",skillContent:"",references:[]},this.skillAddFormSource="draft",this.skillEditTab="SKILL.md",this.skillDrafts=[],this.adminsLoading=!1,this.adminPhones=[],this.adminsError=null,this.adminsSaving=!1,this.adminsNewPhone="",this.contactsLoading=!1,this.contactsSaving=!1,this.contactsRecords=[],this.contactsError=null,this.contactsSearchQuery="",this.contactsEditingId=null,this.contactsShowAddForm=!1,this.contactsNewPhone="",this.contactsNewName="",this.contactsDeleteConfirmId=null,this.contactsAddFieldForId=null,this.contactsAddFieldKey="",this.contactsAddFieldValue="",this.imessageEnableConfirm=!1,this.imessageEnabling=!1,this.chatPageTab="chat",this.waConversations=[],this.waSelectedJid=null,this.waMessages=[],this.waGroupInfo=null,this.waLoading=!1,this.waMessagesLoading=!1,this.waSearchQuery="",this.waComposeDraft="",this.waSending=!1,this.waLastError=null,this.infoModalOpen=null,this.remoteAccessQrDataUrl=null,this.publicChatQrDataUrl=null,this.workspaces=[],this.workspacesLoading=!1,this.workspacesError=null,this.selectedWorkspace=null,this.addingWorkspace=!1,this.newWorkspaceName="",this.newWorkspacePath="",this.newWorkspacePin="",this.accountPinModalOpen=!1,this.accountPinBusy=!1,this.accountPinError=null,this.accountPinSuccess=null,this.apiKeyProviders=[],this.apiKeyModalOpen=!1,this.apiKeyBusy=!1,this.apiKeyError=null,this.apiKeySuccess=null,this.apiKeySavingProvider=null,this.authApiKeyMode=!1,this.authApiKeyInput="",this.authApiKeyBusy=!1,this.authApiKeyError=null,this.pinChanging=null,this.pinChangeBusy=!1,this.pinChangeError=null,this.loginChangePinMode=!1,this.changePinBusy=!1,this.changePinError=null,this.changePinSuccess=null,this.workspaceSaving=!1,this.workspaceRemoveConfirm=null,this.renamingWorkspace=!1,this.renameWorkspaceName="",this.debugLoading=!1,this.debugStatus=null,this.debugHealth=null,this.debugModels=[],this.debugHeartbeat=null,this.debugCallMethod="",this.debugCallParams="{}",this.debugCallResult=null,this.debugCallError=null,this.logsLoading=!1,this.logsError=null,this.logsFile=null,this.logsEntries=[],this.logsFilterText="",this.logsLevelFilters={...k0},this.logsAutoFollow=!0,this.logsTruncated=!1,this.logsCursor=null,this.logsLastFetchAt=null,this.logsLimit=5e3,this.logsMaxBytes=5e6,this.logsAtBottom=!0,this.logsDate=null,this.logsAvailableDates=[],this.logsSubTab="session",this.logsChipsExpanded=!1,this.sessionLogsLoading=!1,this.sessionLogsError=null,this.sessionLogsEntries=[],this.sessionLogsFilterText="",this.sessionLogsTypeFilters={user:!0,assistant:!0,tool:!0,tool_call:!0,tool_result:!0,thinking:!0,error:!0,system:!0},this.sessionLogsAgentFilters={},this.sessionLogsAgents=[],this.sessionLogsAutoFollow=!0,this.sessionLogsChipsExpanded=!1,this.sessionLogsExpandedIds=new Set,this.sessionLogsCursors={},this.sessionLogsLastFetchAt=null,this.sessionLogsAtBottom=!0,this.client=null,this.chatScrollFrame=null,this.chatScrollTimeout=null,this.chatHasAutoScrolled=!1,this.chatUserNearBottom=!0,this.onLoadOlder=()=>this.handleLoadOlderChat(),this.nodesPollInterval=null,this.logsPollInterval=null,this.sessionLogsPollInterval=null,this.debugPollInterval=null,this.auditPollInterval=null,this.logsScrollFrame=null,this.toolStreamById=new Map,this.toolStreamOrder=[],this.basePath="",this.popStateHandler=()=>Xf(this),this.themeMedia=null,this.themeMediaHandler=null,this.topbarObserver=null,this._beforeUnloadHandler=()=>{var t;$o();const e=this.selectedWorkspace??((t=this.publicChatConfig)==null?void 0:t.accountId)??"";e&&Wn(e,this.sessionKey,this.chatMessage)}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),$0(this),window.addEventListener("beforeunload",this._beforeUnloadHandler)}firstUpdated(){S0(this)}disconnectedCallback(){window.removeEventListener("beforeunload",this._beforeUnloadHandler),this.stopEmbeddingPoll(),A0(this),super.disconnectedCallback()}startEmbeddingPoll(){if(this.embeddingPollTimer!=null)return;const e=async()=>{if(!(!this.client||!this.connected)){try{const t=await this.client.request("memory.status",{});if((t==null?void 0:t.embeddingState)==="downloading")this.embeddingDownloading=!0;else{this.embeddingDownloading&&(this.embeddingDownloading=!1),this.stopEmbeddingPoll();return}}catch{this.embeddingDownloading=!1,this.stopEmbeddingPoll();return}this.embeddingPollTimer=window.setTimeout(e,3e3)}};e()}stopEmbeddingPoll(){this.embeddingPollTimer!=null&&(window.clearTimeout(this.embeddingPollTimer),this.embeddingPollTimer=null)}updated(e){C0(this,e)}connect(){Oe(this)}handleChatScroll(e){ch(this,e)}handleLogsScroll(e){uh(this,e)}handleSessionLogsScroll(e){ph(this,e)}exportLogs(e,t){fh(e,t)}exportSessionLogs(e,t){gh(e,t)}resetToolStream(){ia(this)}resetChatScroll(){hh(this)}async loadAssistantIdentity(){await Qo(this)}applySettings(e){at(this,e)}setTab(e){qf(this,e)}setTheme(e,t){jf(this,e,t)}async loadOverview(){await pd(this)}async loadCron(){var t;const e=this.getSelectedWorkspaceInfo();this.workspaceAgentIds=((t=e==null?void 0:e.agents)==null?void 0:t.map(n=>n.id))??void 0,this.accountId=this.selectedWorkspace??void 0,this.cronForm={...this.cronForm,accountId:this.selectedWorkspace??void 0},await hd(this)}async handleAbortChat(){await gd(this)}removeQueuedMessage(e){ng(this,e)}async handleSendChat(e,t){await ig(this,e,t)}async handleWhatsAppStart(e,t){await T0(this,e,t)}async handleWhatsAppWait(e){await _0(this,e)}async handleWhatsAppLogout(e){await M0(this,e)}async handleAddWhatsAppAccount(e){await P0(this,e)}async handleRemoveWhatsAppAccount(e){await I0(this,e)}async handleAccessCheck(){await Er(this)}async handlePinSubmit(e,t){await _h(this,e,t),this.accessState.authenticated&&this.accessState.workspace&&this.handleWorkspaceSelect(this.accessState.workspace)}async handleSetMasterPin(e){await Mh(this,e)}async handleLogout(){await Ih(this)}toggleChangePinMode(){this.loginChangePinMode=!this.loginChangePinMode,this.changePinError=null,this.changePinSuccess=null}async handleChangePin(e,t,n){if(this.client){this.changePinBusy=!0,this.changePinError=null,this.changePinSuccess=null;try{const i=await this.client.request("access.verify",{account:e,pin:t});if(!i.ok){this.changePinError=i.message??"Incorrect current PIN",this.changePinBusy=!1;return}e==="__master__"?await this.client.request("access.setMasterPin",{pin:n}):await this.client.request("access.setAccountPin",{workspace:e,pin:n}),this.changePinSuccess="PIN changed successfully",this.changePinBusy=!1,setTimeout(()=>{this.loginChangePinMode=!1,this.changePinSuccess=null},2e3)}catch{this.changePinError="Failed to change PIN",this.changePinBusy=!1}}}async handleAccountPinSave(e,t,n){if(this.client){this.accountPinBusy=!0,this.accountPinError=null,this.accountPinSuccess=null;try{if(t!==null){const i=await this.client.request("access.verify",{account:e,pin:t});if(!i.ok){this.accountPinError=i.message??"Incorrect current PIN",this.accountPinBusy=!1;return}}await this.client.request("access.setAccountPin",{workspace:e,pin:n}),this.accountPinSuccess="PIN saved",this.accountPinBusy=!1,await Er(this),setTimeout(()=>{this.accountPinModalOpen=!1,this.accountPinSuccess=null,this.accountPinError=null},1500)}catch{this.accountPinError="Failed to save PIN",this.accountPinBusy=!1}}}async handleLicenseStatusCheck(){await G0(this)}async handleLicenseActivate(){await V0(this)}async handleLicenseRemove(){await Q0(this)}handleLicenseKeyChange(e){J0(this,e)}async handleAuthStatusCheck(){await K0(this)}async handleAuthStart(){await H0(this)}async handleAuthSubmitCode(e){await q0(this,e)}handleAuthCodeChange(e){j0(this,e)}handleClaudeAuthModalOpen(){this.claudeAuthModalOpen=!0}handleClaudeAuthModalClose(){this.claudeAuthModalOpen=!1,this.authUrl=null,this.authRefreshTokenInput="",this.authRefreshTokenError=null}async handleImportRefreshToken(){await z0(this)}async handleGatewayHealthCheck(){await Y0(this)}async handleGatewayRestart(){await X0(this)}async handleUpdateCheck(){await Eu(this)}async handleUpdateRun(){await Fk(this)}handleUpdateDismissResult(){zk(this)}handleUninstallConfirm(){this.uninstallConfirm=!0,this.uninstallConfirmText=""}handleUninstallCancel(){this.uninstallConfirm=!1,this.uninstallConfirmText="",this.uninstallError=null}handleUninstallConfirmTextChange(e){this.uninstallConfirmText=e}async handleUninstallRun(){const{runUninstall:e}=await ae(async()=>{const{runUninstall:t}=await Promise.resolve().then(()=>Dr);return{runUninstall:t}},void 0,import.meta.url);await e(this)}handleUninstallDismiss(){ae(async()=>{const{clearUninstallDone:e}=await Promise.resolve().then(()=>Dr);return{clearUninstallDone:e}},void 0,import.meta.url).then(({clearUninstallDone:e})=>{e()}),this.uninstallDone=!1,this.uninstallConfirm=!1,this.uninstallConfirmText=""}async loadAuditEntries(){await ad(this)}async clearAudit(){await Af(this),this.auditModalOpen=!1}handleFilesLoad(){var n;const e=this.getSelectedWorkspaceInfo();this.workspaceAgentIds=((n=e==null?void 0:e.agents)==null?void 0:n.map(i=>i.id))??void 0;const t=this.resolveFilesAgentId();this.filesResolvedAgentId=t,rn(this,t),ps(this,t)}handleAdminsLoad(){const e=this.resolveAdminAgentId();ae(async()=>{const{loadAdmins:t}=await Promise.resolve().then(()=>o0);return{loadAdmins:t}},void 0,import.meta.url).then(({loadAdmins:t})=>{t(this,e)})}resolveAdminAgentId(){const e=this.getSelectedWorkspaceInfo();if(!e)return;const t=e.agents.find(n=>n.id.endsWith("-admin")||n.id==="admin");return t==null?void 0:t.id}resolveFilesAgentId(){var n;const e=this.getSelectedWorkspaceInfo();if(!e)return;const t=e.agents.find(i=>i.id.endsWith("-admin")||i.id==="admin");return(t==null?void 0:t.id)??((n=e.agents[0])==null?void 0:n.id)}handleChatLoad(){const e=this.resolveAdminAgentId();if(e){const t=`agent:${e}:main`;t!==this.sessionKey&&(this.sessionKey=t,this.chatMessages=[],this.chatStream=null,this.chatInterimText=null,this.chatRunId=null,this.chatSuggestions=[],this.resetChatScroll(),this.applySettings({...this.settings,sessionKey:t,lastActiveSessionKey:t}),this.loadAssistantIdentity())}ae(async()=>{const{loadChatHistory:t}=await Promise.resolve().then(()=>Oi);return{loadChatHistory:t}},void 0,import.meta.url).then(({loadChatHistory:t})=>{t(this).then(()=>{sn(this,!0)})})}async handleLoadOlderChat(){if(this.chatLoadingOlder||!this.chatHistoryHasMore)return;const e=dh(this),{loadOlderChatHistory:t}=await ae(async()=>{const{loadOlderChatHistory:i}=await Promise.resolve().then(()=>Oi);return{loadOlderChatHistory:i}},void 0,import.meta.url);await t(this)&&e&&(await this.updateComplete,e())}handleAdvancedLoad(){var t;const e=this.getSelectedWorkspaceInfo();this.workspaceAgentIds=((t=e==null?void 0:e.agents)==null?void 0:t.map(n=>n.id))??void 0,this.sessionLogsEntries=[],this.sessionLogsCursors={},this.sessionLogsAgents=[],this.advancedTab==="cron"&&this.selectedWorkspace&&this.loadCron(),this.advancedTab==="opening-hours"&&ae(async()=>{const{loadOpeningHours:n}=await Promise.resolve().then(()=>i0);return{loadOpeningHours:n}},void 0,import.meta.url).then(({loadOpeningHours:n})=>{n(this)}),this.advancedTab==="logs"&&(this.logsSubTab==="session"?ae(async()=>{const{loadSessionLogs:n}=await Promise.resolve().then(()=>od);return{loadSessionLogs:n}},void 0,import.meta.url).then(({loadSessionLogs:n})=>{n(this,{reset:!0})}):ae(async()=>{const{loadLogs:n}=await Promise.resolve().then(()=>Nh);return{loadLogs:n}},void 0,import.meta.url).then(({loadLogs:n})=>{n(this,{reset:!0})})),this.advancedTab==="skills"&&ae(async()=>{const{loadSkills:n}=await Promise.resolve().then(()=>vf);return{loadSkills:n}},void 0,import.meta.url).then(({loadSkills:n})=>{n(this,{clearMessages:!0})})}async handleChannelConfigSave(){await R0(this)}async handleChannelConfigReload(){await L0(this)}handleNostrProfileEdit(e,t){B0(this,e,t)}handleNostrProfileCancel(){N0(this)}handleNostrProfileFieldChange(e,t){O0(this,e,t)}async handleNostrProfileSave(){await U0(this)}async handleNostrProfileImport(){await W0(this)}handleNostrProfileToggleAdvanced(){F0(this)}async handleExecApprovalDecision(e){const t=this.execApprovalQueue[0];if(!(!t||!this.client||this.execApprovalBusy)){this.execApprovalBusy=!0,this.execApprovalError=null;try{await this.client.request("exec.approval.resolve",{id:t.id,decision:e}),this.execApprovalQueue=this.execApprovalQueue.filter(n=>n.id!==t.id)}catch(n){this.execApprovalError=`Exec approval failed: ${String(n)}`}finally{this.execApprovalBusy=!1}}}handleOpenSidebar(e){this.sidebarCloseTimer!=null&&(window.clearTimeout(this.sidebarCloseTimer),this.sidebarCloseTimer=null),this.sidebarContent=e,this.sidebarError=null,this.sidebarOpen=!0}handleCloseSidebar(){this.sidebarOpen=!1,this.sidebarCloseTimer!=null&&window.clearTimeout(this.sidebarCloseTimer),this.sidebarCloseTimer=window.setTimeout(()=>{this.sidebarOpen||(this.sidebarContent=null,this.sidebarError=null,this.sidebarCloseTimer=null)},200)}handleSplitRatioChange(e){const t=Math.max(.4,Math.min(.7,e));this.splitRatio=t,this.applySettings({...this.settings,splitRatio:t})}handleAdminsNewPhoneChange(e){this.adminsNewPhone=e,this.adminsError&&(this.adminsError=null)}handleContactsLoad(){const e=this.selectedWorkspace??void 0;ae(async()=>{const{loadContacts:t}=await Promise.resolve().then(()=>a0);return{loadContacts:t}},void 0,import.meta.url).then(({loadContacts:t})=>{t(this,e)})}handleContactsNewPhoneChange(e){this.contactsNewPhone=e,this.contactsError&&(this.contactsError=null)}handleContactsNewNameChange(e){this.contactsNewName=e,this.contactsError&&(this.contactsError=null)}async handleWorkspacesLoad(){const{loadWorkspaces:e}=await ae(async()=>{const{loadWorkspaces:t}=await Promise.resolve().then(()=>ki);return{loadWorkspaces:t}},void 0,import.meta.url);await e(this)}async handleWorkspaceCreate(e,t){const{createWorkspace:n}=await ae(async()=>{const{createWorkspace:s}=await Promise.resolve().then(()=>ki);return{createWorkspace:s}},void 0,import.meta.url),{loadChannels:i}=await ae(async()=>{const{loadChannels:s}=await Promise.resolve().then(()=>Eh);return{loadChannels:s}},void 0,import.meta.url);await n(this,{name:e,workspacePath:t,onCreated:s=>{if(!s.whatsappAccountId)return;const o=s.whatsappAccountId;this.handleWorkspaceSelect(e),setTimeout(async()=>{try{await i(this,!0),await this.handleWhatsAppStart(!0,o),this.whatsappLoginQrDataUrl&&(await this.handleWhatsAppWait(o),await i(this,!0),await this.handleWorkspacesLoad())}catch{}this.requestUpdate()},3e3)}})}async handleWorkspaceRemove(e){const{removeWorkspace:t}=await ae(async()=>{const{removeWorkspace:n}=await Promise.resolve().then(()=>ki);return{removeWorkspace:n}},void 0,import.meta.url);await t(this,e)}handleWorkspaceRenameStart(){const e=this.getSelectedWorkspaceInfo();this.renameWorkspaceName=(e==null?void 0:e.displayName)??(e==null?void 0:e.name)??"",this.renamingWorkspace=!0}handleWorkspaceRenameCancel(){this.renamingWorkspace=!1,this.renameWorkspaceName=""}async handleWorkspaceRename(e,t){const{renameWorkspace:n}=await ae(async()=>{const{renameWorkspace:i}=await Promise.resolve().then(()=>ki);return{renameWorkspace:i}},void 0,import.meta.url);await n(this,e,t),this.renamingWorkspace=!1,this.renameWorkspaceName=""}handleWorkspaceSelect(e){$o(),this.selectedWorkspace&&Wn(this.selectedWorkspace,this.sessionKey,this.chatMessage),this.selectedWorkspace=e,this.publicChatQrDataUrl=null,localStorage.setItem("taskmaster-selected-workspace",e),Tn(e),wr(e),this.settings=Ns(),this.chatMessage=zn(e,this.settings.sessionKey),this.chatAttachments=[],this.chatStream=null,this.chatInterimText=null,this.chatSuggestions=[],this.chatStreamStartedAt=null,this.chatRunId=null,this.chatQueue=[],this.lastError=null,this.waConversations=[],this.waSelectedJid=null,this.waMessages=[],this.waGroupInfo=null,this.waLastError=null,this.waSearchQuery="",this.waComposeDraft="",this.reloadCurrentPageData()}getSelectedWorkspaceInfo(){return this.selectedWorkspace?this.workspaces.find(e=>e.name===this.selectedWorkspace)??null:null}reloadCurrentPageData(){this.loadAuditEntries(),this.adminsPage?this.handleAdminsLoad():this.contactsPage?this.handleContactsLoad():this.filesPage?this.handleFilesLoad():this.chatPage?(this.handleChatLoad(),this.chatPageTab==="whatsapp"&&!this.waLoading&&this.waConversations.length===0&&this.reloadWhatsAppConversations()):this.advancedPage&&this.handleAdvancedLoad()}async reloadWhatsAppConversations(){if(!(!this.client||!this.connected)){this.waLoading=!0,this.waLastError=null;try{const e=this.getSelectedWorkspaceInfo(),t=e==null?void 0:e.whatsappAccountId,n=await this.client.request("whatsapp.conversations",{accountId:t});this.waConversations=n.conversations}catch(e){this.waLastError=String(e)}finally{this.waLoading=!1}}}initWorkspaceSelection(){if(this.workspaces.length===0){this.reloadCurrentPageData();return}const e=localStorage.getItem("taskmaster-selected-workspace"),t=e?this.workspaces.find(n=>n.name===e):null;if(t)this.selectedWorkspace=t.name;else{const n=this.workspaces.find(i=>i.isDefault)??this.workspaces[0];this.selectedWorkspace=n.name,localStorage.setItem("taskmaster-selected-workspace",n.name)}Tn(this.selectedWorkspace),wr(this.selectedWorkspace),this.settings=Ns(),this.chatMessage=zn(this.selectedWorkspace,this.settings.sessionKey),this.reloadCurrentPageData()}render(){return c`${v0(this)}${this.auditModalOpen?w0(this.auditEntries,()=>this.clearAudit(),()=>{this.auditModalOpen=!1}):w}`}};g([m()],f.prototype,"settings",2);g([m()],f.prototype,"password",2);g([m()],f.prototype,"tab",2);g([m()],f.prototype,"onboarding",2);g([m()],f.prototype,"setup",2);g([m()],f.prototype,"filesPage",2);g([m()],f.prototype,"browserPage",2);g([m()],f.prototype,"adminsPage",2);g([m()],f.prototype,"contactsPage",2);g([m()],f.prototype,"chatPage",2);g([m()],f.prototype,"advancedPage",2);g([m()],f.prototype,"advancedTab",2);g([m()],f.prototype,"publicChat",2);g([m()],f.prototype,"publicChatConfig",2);g([m()],f.prototype,"publicChatSessionKey",2);g([m()],f.prototype,"publicChatAuthenticated",2);g([m()],f.prototype,"publicChatAuthStep",2);g([m()],f.prototype,"connected",2);g([m()],f.prototype,"accessState",2);g([m()],f.prototype,"theme",2);g([m()],f.prototype,"themeResolved",2);g([m()],f.prototype,"hello",2);g([m()],f.prototype,"lastError",2);g([m()],f.prototype,"eventLog",2);g([m()],f.prototype,"assistantName",2);g([m()],f.prototype,"assistantAvatar",2);g([m()],f.prototype,"assistantAgentId",2);g([m()],f.prototype,"sessionKey",2);g([m()],f.prototype,"chatLoading",2);g([m()],f.prototype,"chatSending",2);g([m()],f.prototype,"chatMessage",2);g([m()],f.prototype,"chatMessages",2);g([m()],f.prototype,"chatHistoryTotal",2);g([m()],f.prototype,"chatHistoryHasMore",2);g([m()],f.prototype,"chatLoadingOlder",2);g([m()],f.prototype,"chatToolMessages",2);g([m()],f.prototype,"chatStream",2);g([m()],f.prototype,"chatInterimText",2);g([m()],f.prototype,"chatSuggestions",2);g([m()],f.prototype,"chatStreamStartedAt",2);g([m()],f.prototype,"chatRunId",2);g([m()],f.prototype,"compactionStatus",2);g([m()],f.prototype,"chatAvatarUrl",2);g([m()],f.prototype,"chatModelCatalog",2);g([m()],f.prototype,"chatVerboseLevel",2);g([m()],f.prototype,"chatQueue",2);g([m()],f.prototype,"chatAttachments",2);g([m()],f.prototype,"sidebarOpen",2);g([m()],f.prototype,"sidebarContent",2);g([m()],f.prototype,"sidebarError",2);g([m()],f.prototype,"splitRatio",2);g([m()],f.prototype,"nodesLoading",2);g([m()],f.prototype,"nodes",2);g([m()],f.prototype,"devicesLoading",2);g([m()],f.prototype,"devicesError",2);g([m()],f.prototype,"devicesList",2);g([m()],f.prototype,"execApprovalsLoading",2);g([m()],f.prototype,"execApprovalsSaving",2);g([m()],f.prototype,"execApprovalsDirty",2);g([m()],f.prototype,"execApprovalsSnapshot",2);g([m()],f.prototype,"execApprovalsForm",2);g([m()],f.prototype,"execApprovalsSelectedAgent",2);g([m()],f.prototype,"execApprovalsTarget",2);g([m()],f.prototype,"execApprovalsTargetNodeId",2);g([m()],f.prototype,"execApprovalQueue",2);g([m()],f.prototype,"execApprovalBusy",2);g([m()],f.prototype,"execApprovalError",2);g([m()],f.prototype,"configLoading",2);g([m()],f.prototype,"configRaw",2);g([m()],f.prototype,"configRawOriginal",2);g([m()],f.prototype,"configValid",2);g([m()],f.prototype,"configIssues",2);g([m()],f.prototype,"configSaving",2);g([m()],f.prototype,"configApplying",2);g([m()],f.prototype,"updateRunning",2);g([m()],f.prototype,"applySessionKey",2);g([m()],f.prototype,"configSnapshot",2);g([m()],f.prototype,"configSchema",2);g([m()],f.prototype,"configSchemaVersion",2);g([m()],f.prototype,"configSchemaLoading",2);g([m()],f.prototype,"configUiHints",2);g([m()],f.prototype,"configForm",2);g([m()],f.prototype,"configFormOriginal",2);g([m()],f.prototype,"configFormDirty",2);g([m()],f.prototype,"configFormMode",2);g([m()],f.prototype,"configSearchQuery",2);g([m()],f.prototype,"configActiveSection",2);g([m()],f.prototype,"configActiveSubsection",2);g([m()],f.prototype,"channelsLoading",2);g([m()],f.prototype,"channelsSnapshot",2);g([m()],f.prototype,"channelsError",2);g([m()],f.prototype,"channelsLastSuccess",2);g([m()],f.prototype,"whatsappLoginMessage",2);g([m()],f.prototype,"whatsappLoginQrDataUrl",2);g([m()],f.prototype,"whatsappLoginConnected",2);g([m()],f.prototype,"whatsappBusy",2);g([m()],f.prototype,"whatsappActiveQrAccountId",2);g([m()],f.prototype,"whatsappPairedPhone",2);g([m()],f.prototype,"addingWhatsAppAccount",2);g([m()],f.prototype,"newWhatsAppAccountName",2);g([m()],f.prototype,"whatsappAccountError",2);g([m()],f.prototype,"whatsappAccountSaving",2);g([m()],f.prototype,"whatsappSettingsOpen",2);g([m()],f.prototype,"publicChatToggleBusy",2);g([m()],f.prototype,"publicChatGreetingBusy",2);g([m()],f.prototype,"publicChatEmailBusy",2);g([m()],f.prototype,"publicChatSettingsOpen",2);g([m()],f.prototype,"publicChatWidgetModalOpen",2);g([m()],f.prototype,"brandingBusy",2);g([m()],f.prototype,"agentSettingsOpen",2);g([m()],f.prototype,"brandingExpanded",2);g([m()],f.prototype,"tailscaleStatus",2);g([m()],f.prototype,"tailscaleBusy",2);g([m()],f.prototype,"tailscaleAuthUrl",2);g([m()],f.prototype,"tailscaleError",2);g([m()],f.prototype,"tailscaleServeEnableUrl",2);g([m()],f.prototype,"tailscaleFunnelEnableUrl",2);g([m()],f.prototype,"tailscaleDisableConfirm",2);g([m()],f.prototype,"tailscaleConnectProgress",2);g([m()],f.prototype,"tailscaleConnectMessage",2);g([m()],f.prototype,"tailscaleConnectSuccess",2);g([m()],f.prototype,"wifiStatus",2);g([m()],f.prototype,"wifiNetworks",2);g([m()],f.prototype,"wifiBusy",2);g([m()],f.prototype,"wifiError",2);g([m()],f.prototype,"wifiPassword",2);g([m()],f.prototype,"wifiSelectedSsid",2);g([m()],f.prototype,"networkPort",2);g([m()],f.prototype,"networkHostname",2);g([m()],f.prototype,"networkPortInput",2);g([m()],f.prototype,"networkHostnameInput",2);g([m()],f.prototype,"networkModalOpen",2);g([m()],f.prototype,"networkBusy",2);g([m()],f.prototype,"networkError",2);g([m()],f.prototype,"networkSuccess",2);g([m()],f.prototype,"wifiModalOpen",2);g([m()],f.prototype,"licenseKey",2);g([m()],f.prototype,"licenseBusy",2);g([m()],f.prototype,"licenseValid",2);g([m()],f.prototype,"licenseMessage",2);g([m()],f.prototype,"licenseTier",2);g([m()],f.prototype,"licenseDeviceId",2);g([m()],f.prototype,"licenseStoredKey",2);g([m()],f.prototype,"licenseRemoveConfirm",2);g([m()],f.prototype,"authConnected",2);g([m()],f.prototype,"authBusy",2);g([m()],f.prototype,"authMessage",2);g([m()],f.prototype,"authUrl",2);g([m()],f.prototype,"authCodeInput",2);g([m()],f.prototype,"authExpiresIn",2);g([m()],f.prototype,"authRefreshToken",2);g([m()],f.prototype,"claudeAuthModalOpen",2);g([m()],f.prototype,"authRefreshTokenInput",2);g([m()],f.prototype,"authRefreshTokenBusy",2);g([m()],f.prototype,"authRefreshTokenError",2);g([m()],f.prototype,"setupStep",2);g([m()],f.prototype,"gatewayHealthy",2);g([m()],f.prototype,"gatewayHealthLoading",2);g([m()],f.prototype,"gatewayHealthMessage",2);g([m()],f.prototype,"gatewayRestartBusy",2);g([m()],f.prototype,"updateAvailable",2);g([m()],f.prototype,"currentVersion",2);g([m()],f.prototype,"latestVersion",2);g([m()],f.prototype,"updateChecking",2);g([m()],f.prototype,"updateMessage",2);g([m()],f.prototype,"updateProgressSteps",2);g([m()],f.prototype,"updateLastResult",2);g([m()],f.prototype,"uninstallConfirm",2);g([m()],f.prototype,"uninstallBusy",2);g([m()],f.prototype,"uninstallDone",2);g([m()],f.prototype,"uninstallError",2);g([m()],f.prototype,"uninstallConfirmText",2);g([m()],f.prototype,"nostrProfileFormState",2);g([m()],f.prototype,"nostrProfileAccountId",2);g([m()],f.prototype,"presenceLoading",2);g([m()],f.prototype,"presenceEntries",2);g([m()],f.prototype,"presenceError",2);g([m()],f.prototype,"presenceStatus",2);g([m()],f.prototype,"agentsLoading",2);g([m()],f.prototype,"agentsList",2);g([m()],f.prototype,"agentsError",2);g([m()],f.prototype,"sessionsLoading",2);g([m()],f.prototype,"sessionsResult",2);g([m()],f.prototype,"sessionsError",2);g([m()],f.prototype,"cronLoading",2);g([m()],f.prototype,"cronJobs",2);g([m()],f.prototype,"cronStatus",2);g([m()],f.prototype,"cronError",2);g([m()],f.prototype,"cronForm",2);g([m()],f.prototype,"cronRunsJobId",2);g([m()],f.prototype,"cronRuns",2);g([m()],f.prototype,"cronBusy",2);g([m()],f.prototype,"cronNewEventModal",2);g([m()],f.prototype,"cronDetailJobId",2);g([m()],f.prototype,"cronEditJobId",2);g([m()],f.prototype,"cronPendingDeleteId",2);g([m()],f.prototype,"cronRunModalJobId",2);g([m()],f.prototype,"cronRunModalJobName",2);g([m()],f.prototype,"cronRunResult",2);g([m()],f.prototype,"openingHoursLoading",2);g([m()],f.prototype,"openingHoursError",2);g([m()],f.prototype,"openingHoursBusy",2);g([m()],f.prototype,"openingHoursForm",2);g([m()],f.prototype,"browserScreencastActive",2);g([m()],f.prototype,"browserScreencastFrame",2);g([m()],f.prototype,"browserScreencastMetadata",2);g([m()],f.prototype,"browserHandoffPending",2);g([m()],f.prototype,"browserHandoffReason",2);g([m()],f.prototype,"browserHandoffId",2);g([m()],f.prototype,"browserInputMode",2);g([m()],f.prototype,"browserFullscreen",2);g([m()],f.prototype,"browserLoading",2);g([m()],f.prototype,"browserError",2);g([m()],f.prototype,"filesLoading",2);g([m()],f.prototype,"filesTree",2);g([m()],f.prototype,"filesRoot",2);g([m()],f.prototype,"filesError",2);g([m()],f.prototype,"filesSelectedPath",2);g([m()],f.prototype,"filesSelectedPaths",2);g([m()],f.prototype,"filesPreviewContent",2);g([m()],f.prototype,"filesPreviewLoading",2);g([m()],f.prototype,"filesPreviewBinary",2);g([m()],f.prototype,"filesPreviewSize",2);g([m()],f.prototype,"filesExpandedDirs",2);g([m()],f.prototype,"filesCurrentDir",2);g([m()],f.prototype,"filesPendingDeletePath",2);g([m()],f.prototype,"filesMessage",2);g([m()],f.prototype,"filesUploadBusy",2);g([m()],f.prototype,"filesReindexBusy",2);g([m()],f.prototype,"filesMemoryStatus",2);g([m()],f.prototype,"embeddingDownloading",2);g([m()],f.prototype,"filesSearchQuery",2);g([m()],f.prototype,"filesSearchResults",2);g([m()],f.prototype,"filesSearchLoading",2);g([m()],f.prototype,"filesSearchAgentId",2);g([m()],f.prototype,"auditEntries",2);g([m()],f.prototype,"auditLoading",2);g([m()],f.prototype,"auditModalOpen",2);g([m()],f.prototype,"skillsLoading",2);g([m()],f.prototype,"skillsReport",2);g([m()],f.prototype,"skillsError",2);g([m()],f.prototype,"skillsFilter",2);g([m()],f.prototype,"skillsTypeFilter",2);g([m()],f.prototype,"skillsAgentFilter",2);g([m()],f.prototype,"skillEdits",2);g([m()],f.prototype,"skillsBusyKey",2);g([m()],f.prototype,"skillMessages",2);g([m()],f.prototype,"skillDetail",2);g([m()],f.prototype,"skillDetailTab",2);g([m()],f.prototype,"skillAddModal",2);g([m()],f.prototype,"skillAddForm",2);g([m()],f.prototype,"skillAddFormSource",2);g([m()],f.prototype,"skillEditTab",2);g([m()],f.prototype,"skillDrafts",2);g([m()],f.prototype,"adminsLoading",2);g([m()],f.prototype,"adminPhones",2);g([m()],f.prototype,"adminsError",2);g([m()],f.prototype,"adminsSaving",2);g([m()],f.prototype,"adminsNewPhone",2);g([m()],f.prototype,"contactsLoading",2);g([m()],f.prototype,"contactsSaving",2);g([m()],f.prototype,"contactsRecords",2);g([m()],f.prototype,"contactsError",2);g([m()],f.prototype,"contactsSearchQuery",2);g([m()],f.prototype,"contactsEditingId",2);g([m()],f.prototype,"contactsShowAddForm",2);g([m()],f.prototype,"contactsNewPhone",2);g([m()],f.prototype,"contactsNewName",2);g([m()],f.prototype,"contactsDeleteConfirmId",2);g([m()],f.prototype,"contactsAddFieldForId",2);g([m()],f.prototype,"contactsAddFieldKey",2);g([m()],f.prototype,"contactsAddFieldValue",2);g([m()],f.prototype,"imessageEnableConfirm",2);g([m()],f.prototype,"imessageEnabling",2);g([m()],f.prototype,"chatPageTab",2);g([m()],f.prototype,"waConversations",2);g([m()],f.prototype,"waSelectedJid",2);g([m()],f.prototype,"waMessages",2);g([m()],f.prototype,"waGroupInfo",2);g([m()],f.prototype,"waLoading",2);g([m()],f.prototype,"waMessagesLoading",2);g([m()],f.prototype,"waSearchQuery",2);g([m()],f.prototype,"waComposeDraft",2);g([m()],f.prototype,"waSending",2);g([m()],f.prototype,"waLastError",2);g([m()],f.prototype,"infoModalOpen",2);g([m()],f.prototype,"remoteAccessQrDataUrl",2);g([m()],f.prototype,"publicChatQrDataUrl",2);g([m()],f.prototype,"workspaces",2);g([m()],f.prototype,"workspacesLoading",2);g([m()],f.prototype,"workspacesError",2);g([m()],f.prototype,"selectedWorkspace",2);g([m()],f.prototype,"addingWorkspace",2);g([m()],f.prototype,"newWorkspaceName",2);g([m()],f.prototype,"newWorkspacePath",2);g([m()],f.prototype,"newWorkspacePin",2);g([m()],f.prototype,"accountPinModalOpen",2);g([m()],f.prototype,"accountPinBusy",2);g([m()],f.prototype,"accountPinError",2);g([m()],f.prototype,"accountPinSuccess",2);g([m()],f.prototype,"apiKeyProviders",2);g([m()],f.prototype,"apiKeyModalOpen",2);g([m()],f.prototype,"apiKeyBusy",2);g([m()],f.prototype,"apiKeyError",2);g([m()],f.prototype,"apiKeySuccess",2);g([m()],f.prototype,"apiKeySavingProvider",2);g([m()],f.prototype,"authApiKeyMode",2);g([m()],f.prototype,"authApiKeyInput",2);g([m()],f.prototype,"authApiKeyBusy",2);g([m()],f.prototype,"authApiKeyError",2);g([m()],f.prototype,"pinChanging",2);g([m()],f.prototype,"pinChangeBusy",2);g([m()],f.prototype,"pinChangeError",2);g([m()],f.prototype,"loginChangePinMode",2);g([m()],f.prototype,"changePinBusy",2);g([m()],f.prototype,"changePinError",2);g([m()],f.prototype,"changePinSuccess",2);g([m()],f.prototype,"workspaceSaving",2);g([m()],f.prototype,"workspaceRemoveConfirm",2);g([m()],f.prototype,"renamingWorkspace",2);g([m()],f.prototype,"renameWorkspaceName",2);g([m()],f.prototype,"debugLoading",2);g([m()],f.prototype,"debugStatus",2);g([m()],f.prototype,"debugHealth",2);g([m()],f.prototype,"debugModels",2);g([m()],f.prototype,"debugHeartbeat",2);g([m()],f.prototype,"debugCallMethod",2);g([m()],f.prototype,"debugCallParams",2);g([m()],f.prototype,"debugCallResult",2);g([m()],f.prototype,"debugCallError",2);g([m()],f.prototype,"logsLoading",2);g([m()],f.prototype,"logsError",2);g([m()],f.prototype,"logsFile",2);g([m()],f.prototype,"logsEntries",2);g([m()],f.prototype,"logsFilterText",2);g([m()],f.prototype,"logsLevelFilters",2);g([m()],f.prototype,"logsAutoFollow",2);g([m()],f.prototype,"logsTruncated",2);g([m()],f.prototype,"logsCursor",2);g([m()],f.prototype,"logsLastFetchAt",2);g([m()],f.prototype,"logsLimit",2);g([m()],f.prototype,"logsMaxBytes",2);g([m()],f.prototype,"logsAtBottom",2);g([m()],f.prototype,"logsDate",2);g([m()],f.prototype,"logsAvailableDates",2);g([m()],f.prototype,"logsSubTab",2);g([m()],f.prototype,"logsChipsExpanded",2);g([m()],f.prototype,"sessionLogsLoading",2);g([m()],f.prototype,"sessionLogsError",2);g([m()],f.prototype,"sessionLogsEntries",2);g([m()],f.prototype,"sessionLogsFilterText",2);g([m()],f.prototype,"sessionLogsTypeFilters",2);g([m()],f.prototype,"sessionLogsAgentFilters",2);g([m()],f.prototype,"sessionLogsAgents",2);g([m()],f.prototype,"sessionLogsAutoFollow",2);g([m()],f.prototype,"sessionLogsChipsExpanded",2);g([m()],f.prototype,"sessionLogsCursors",2);g([m()],f.prototype,"sessionLogsLastFetchAt",2);g([m()],f.prototype,"sessionLogsAtBottom",2);g([m()],f.prototype,"chatUserNearBottom",2);f=g([jl("taskmaster-app")],f);
|
|
4940
|
-
//# sourceMappingURL=index-
|
|
4937
|
+
//# sourceMappingURL=index-B_QfEVs7.js.map
|