ft-scout 9.5.4 → 9.5.5

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.
@@ -221,6 +221,74 @@ Action Rules:
221
221
  status: 'completed',
222
222
  };
223
223
  }
224
+ const simpleAppCheck = checkSimpleAppAction(userGoal);
225
+ if (simpleAppCheck.isSimple && simpleAppCheck.appName) {
226
+ const app = simpleAppCheck.appName;
227
+ const action = simpleAppCheck.action || 'open';
228
+ this.workspace.startStep(1);
229
+ let res;
230
+ const toolName = action === 'close' ? 'computer_close_app' : (action === 'switch' ? 'computer_switch_window' : 'computer_open_app');
231
+ const toolArgs = action === 'switch' ? { windowTitleOrApp: app } : { appName: app };
232
+ renderStepHeader({
233
+ step: 1,
234
+ maxSteps: this.maxSteps,
235
+ startTimeMs: this.startTime,
236
+ tokensConsumed: 0,
237
+ userTier: this.userTier,
238
+ });
239
+ renderToolCall({
240
+ name: toolName,
241
+ args: toolArgs,
242
+ step: 1,
243
+ });
244
+ const actionStartTime = Date.now();
245
+ if (action === 'close') {
246
+ res = await this.computerController.closeApplication(app);
247
+ }
248
+ else if (action === 'switch') {
249
+ res = await this.computerController.switchWindow(app);
250
+ }
251
+ else {
252
+ res = await this.computerController.openApplication(app);
253
+ }
254
+ renderToolResult({
255
+ name: toolName,
256
+ args: toolArgs,
257
+ result: JSON.stringify(res, null, 2),
258
+ durationMs: Date.now() - actionStartTime,
259
+ success: res && res.success !== false,
260
+ });
261
+ const actionVerb = action === 'close' ? 'closed' : (action === 'switch' ? 'focused' : 'launched');
262
+ const summary = res && res.success !== false
263
+ ? `I've ${actionVerb} ${app} for you. It's ready on your screen!`
264
+ : `Attempted to ${action} ${app}: ${res?.output || res?.error || 'Failed to execute application action'}`;
265
+ this.workspace.completeStep(1, summary);
266
+ this.workspace.setStatus(res && res.success !== false ? 'completed' : 'failed');
267
+ renderTaskCompletedCard({
268
+ objective: userGoal,
269
+ summary,
270
+ modifiedFiles: [],
271
+ steps: 1,
272
+ maxSteps: this.maxSteps,
273
+ totalTokens: 0,
274
+ totalToolCalls: 1,
275
+ elapsedSecs: Math.max(0.1, (Date.now() - this.startTime) / 1000),
276
+ userTier: this.userTier,
277
+ });
278
+ saveAgentSession({
279
+ goal: userGoal,
280
+ summary,
281
+ modifiedFiles: [],
282
+ });
283
+ return {
284
+ success: res && res.success !== false,
285
+ summary,
286
+ taskId,
287
+ stepsTaken: 1,
288
+ modifiedFiles: [],
289
+ status: res && res.success !== false ? 'completed' : 'failed',
290
+ };
291
+ }
224
292
  this.historyMessages.push({ role: 'system', content: this.buildSystemPrompt() });
225
293
  // Memory persistence
226
294
  const recentMemory = getRecentSessionsSummary(1);
@@ -312,9 +380,40 @@ Action Rules:
312
380
  goalLower.includes('calc') ||
313
381
  goalLower.includes('paint') ||
314
382
  goalLower.includes('type') ||
383
+ goalLower.includes('chrome') ||
384
+ goalLower.includes('browser') ||
385
+ goalLower.includes('vscode') ||
386
+ goalLower.includes('vs code') ||
387
+ goalLower.includes('code') ||
388
+ goalLower.includes('terminal') ||
389
+ goalLower.includes('powershell') ||
390
+ goalLower.includes('cmd') ||
391
+ goalLower.includes('explorer') ||
392
+ goalLower.includes('spotify') ||
393
+ goalLower.includes('slack') ||
394
+ goalLower.includes('discord') ||
395
+ goalLower.includes('edge') ||
396
+ goalLower.includes('firefox') ||
397
+ goalLower.includes('excel') ||
398
+ goalLower.includes('word') ||
399
+ goalLower.includes('blender') ||
400
+ goalLower.includes('open') ||
401
+ goalLower.includes('launch') ||
402
+ goalLower.includes('window') ||
403
+ simpleAppCheck.isSimple ||
315
404
  this.workspace?.getExecutionIntent()?.requiredInteraction === 'computer' ||
316
405
  ((this.workspace?.getExecutionIntent()?.requiredApplications?.length ?? 0) > 0);
317
406
  let baseTools = this.toolRegistry.getToolsForTier(this.userTier);
407
+ if (needsComputer) {
408
+ const computerTools = this.toolRegistry.getAllTools().filter((t) => t.name.startsWith('computer_'));
409
+ const existingNames = new Set(baseTools.map((t) => t.name));
410
+ for (const ct of computerTools) {
411
+ if (!existingNames.has(ct.name)) {
412
+ baseTools.push(ct);
413
+ existingNames.add(ct.name);
414
+ }
415
+ }
416
+ }
318
417
  if (mcpRouting.tools.length > 0 && !needsBrowser && !needsComputer) {
319
418
  const ESSENTIAL_BASE_TOOLS = new Set(['read_file', 'write_file', 'edit_file', 'run_command', 'list_dir', 'grep_search', 'task_completed', 'ask_user', 'speak_text', 'scratchpad', 'computer_open_app']);
320
419
  baseTools = baseTools.filter((t) => ESSENTIAL_BASE_TOOLS.has(t.name));
@@ -199,8 +199,8 @@ ${req.context ? `[ADDITIONAL CONTEXT]\n${req.context}\n` : ''}
199
199
  [EXECUTION INSTRUCTIONS]
200
200
  1. Focus strictly on your assigned role and goal.
201
201
  2. Complete the necessary tool calls (reading, writing, editing, searching, testing) directly.
202
- 3. You have full access to workspace files and directories. Inspect local files using read_file or list_dir instead of asking the user.
203
- 4. Do NOT call ask_user — execute autonomously.
202
+ 3. You have full access to workspace files and directories. Inspect local files using read_file or list_dir.
203
+ 4. If you need user input, guidance, or clarification to proceed, call ask_user to ask the user directly.
204
204
  5. Call task_completed with a concise, professional summary of what you did and your key findings.
205
205
  `.trim();
206
206
  const execResult = await subAgent.executeGoal(scopedGoal);
package/bin/src/index.js CHANGED
@@ -22,6 +22,7 @@ import { handleLogout } from './commands/logout.js';
22
22
  import { handleSwitch, handleAccounts } from './commands/switchCommand.js';
23
23
  import { handleAuthStatus } from './commands/authCommand.js';
24
24
  import { handleDashboard } from './commands/dashboard.js';
25
+ import { handleSupport } from './commands/support.js';
25
26
  import { handleQuota } from './commands/quota.js';
26
27
  import { handlePlanCommand } from './commands/plan.js';
27
28
  import { handleMcpList, handleMcpAdd, handleMcpRemove, handleMcpConnect, handleMcpDisconnect, handleMcpInspect, handleMcpTools, handleMcpHealth } from './commands/mcp.js';
@@ -38,16 +39,16 @@ program
38
39
  .name('scout')
39
40
  .alias('ft')
40
41
  .description('FrontTerrain The Onboarding Co-Pilot for New Codebases')
41
- .version('9.5.4');
42
+ .version('9.5.5');
42
43
  // Header UI on execution with FrontTerrain proprietary logo & version auto-checker
43
44
  program.hook('preAction', async (_thisCommand, actionCommand) => {
44
- intro(renderBranding('9.5.4'));
45
+ intro(renderBranding('9.5.5'));
45
46
  const cmdName = actionCommand ? actionCommand.name() : '';
46
47
  if (cmdName !== 'upgrade') {
47
- await checkForUpdates('9.5.4');
48
+ await checkForUpdates('9.5.5');
48
49
  }
49
- // Auth Guard: enforce authentication for all commands except login, signup, upgrade, help, dashboard, auth, status, plan, mcp, switch, accounts
50
- const EXEMPT_COMMANDS = ['login', 'signin', 'signup', 'register', 'upgrade', 'help', 'dashboard', 'web-ui', 'gui', 'auth', 'status', 'quota', 'usage', 'credits', 'plan', 'pricing', 'subscribe', 'mcp', 'switch', 'accounts', 'account'];
50
+ // Auth Guard: enforce authentication for all commands except login, signup, upgrade, help, dashboard, auth, status, plan, mcp, switch, accounts, support
51
+ const EXEMPT_COMMANDS = ['login', 'signin', 'signup', 'register', 'upgrade', 'help', 'dashboard', 'web-ui', 'gui', 'auth', 'status', 'quota', 'usage', 'credits', 'plan', 'pricing', 'subscribe', 'mcp', 'switch', 'accounts', 'account', 'support', 'ticket', 'helpdesk'];
51
52
  if (!EXEMPT_COMMANDS.includes(cmdName)) {
52
53
  const authCfg = loadAuthConfig();
53
54
  const hasEnvApiKey = Boolean(process.env.OPENAI_API_KEY ||
@@ -265,7 +266,7 @@ program
265
266
  .command('upgrade')
266
267
  .description('Check for updates and auto-upgrade Scout to the latest version')
267
268
  .action(async () => {
268
- await checkForUpdates('9.5.4', true);
269
+ await checkForUpdates('9.5.5', true);
269
270
  outro(chalk.cyan('Upgrade check complete.'));
270
271
  });
271
272
  program
@@ -355,6 +356,25 @@ program
355
356
  await handlePlanCommand();
356
357
  outro(chalk.cyan('Subscription workflow complete.'));
357
358
  });
359
+ program
360
+ .command('support')
361
+ .alias('ticket')
362
+ .alias('helpdesk')
363
+ .description('Help & Support center: submit tickets, view status, browse FAQs & diagnostics')
364
+ .option('-n, --new', 'Raise a new support ticket interactively')
365
+ .option('-l, --list', 'List all open support tickets')
366
+ .option('-o, --open', 'Open the Web Help & Support Dashboard in your browser')
367
+ .option('--faq', 'View instant knowledge base FAQs')
368
+ .option('--diagnostics', 'View sanitized system and agent diagnostics')
369
+ .action(async (options) => {
370
+ await handleSupport({
371
+ new: !!options.new,
372
+ list: !!options.list,
373
+ open: !!options.open,
374
+ faq: !!options.faq,
375
+ diagnostics: !!options.diagnostics,
376
+ });
377
+ });
358
378
  const mcp = program
359
379
  .command('mcp')
360
380
  .description('Manage Model Context Protocol (MCP) server connections, tools, and health');
@@ -37,7 +37,7 @@ export class MCPClient {
37
37
  },
38
38
  clientInfo: {
39
39
  name: 'scout',
40
- version: '9.5.4',
40
+ version: '9.5.5',
41
41
  },
42
42
  };
43
43
  const result = await this.transport.sendRequest('initialize', initParams, timeoutMs);
@@ -14,6 +14,7 @@ import { TaskStateManager } from '../engine/agentState.js';
14
14
  import { ApprovalManager } from '../engine/safety.js';
15
15
  import { AgentExecutionLoop } from '../engine/agentEngine.js';
16
16
  import { getMCPManager, MCPTelemetry } from '../mcp/index.js';
17
+ import { loadSupportTickets, createSupportTicket, getSupportTicket, addTicketMessage, updateTicketStatus, collectSanitizedDiagnostics, getPresetFaqs, } from '../utils/support.js';
17
18
  let activeAgentLoop = null;
18
19
  const serverStateManager = new TaskStateManager(process.cwd());
19
20
  const DEFAULT_PORT = 9120;
@@ -1054,6 +1055,138 @@ export function startDashboardServer(port = DEFAULT_PORT) {
1054
1055
  return;
1055
1056
  }
1056
1057
  }
1058
+ // ---------------------------------------------------------
1059
+ // Help & Support API Endpoints
1060
+ // ---------------------------------------------------------
1061
+ // GET /api/support/tickets - List all support tickets
1062
+ if (pathname === '/api/support/tickets' && req.method === 'GET') {
1063
+ const tickets = loadSupportTickets();
1064
+ res.writeHead(200);
1065
+ res.end(JSON.stringify({ success: true, tickets }));
1066
+ return;
1067
+ }
1068
+ // POST /api/support/tickets - Submit a new support ticket
1069
+ if (pathname === '/api/support/tickets' && req.method === 'POST') {
1070
+ let body = '';
1071
+ req.on('data', chunk => body += chunk);
1072
+ req.on('end', () => {
1073
+ try {
1074
+ const data = JSON.parse(body || '{}');
1075
+ if (!data.subject || !data.description || !data.userEmail) {
1076
+ res.writeHead(400);
1077
+ res.end(JSON.stringify({
1078
+ success: false,
1079
+ error: 'Subject, description, and contact email are required to create a ticket.'
1080
+ }));
1081
+ return;
1082
+ }
1083
+ const ticket = createSupportTicket({
1084
+ subject: data.subject,
1085
+ description: data.description,
1086
+ userEmail: data.userEmail,
1087
+ userName: data.userName,
1088
+ category: data.category,
1089
+ priority: data.priority,
1090
+ attachDiagnostics: data.attachDiagnostics !== false,
1091
+ });
1092
+ res.writeHead(201);
1093
+ res.end(JSON.stringify({ success: true, ticket }));
1094
+ }
1095
+ catch (err) {
1096
+ res.writeHead(400);
1097
+ res.end(JSON.stringify({ success: false, error: err.message || 'Failed to create support ticket' }));
1098
+ }
1099
+ });
1100
+ return;
1101
+ }
1102
+ // GET /api/support/faqs - Knowledge base & FAQ items
1103
+ if (pathname === '/api/support/faqs' && req.method === 'GET') {
1104
+ const faqs = getPresetFaqs();
1105
+ res.writeHead(200);
1106
+ res.end(JSON.stringify({ success: true, faqs }));
1107
+ return;
1108
+ }
1109
+ // GET /api/support/diagnostics - Sanitized diagnostic bundle
1110
+ if (pathname === '/api/support/diagnostics' && req.method === 'GET') {
1111
+ const diagnostics = collectSanitizedDiagnostics();
1112
+ res.writeHead(200);
1113
+ res.end(JSON.stringify({ success: true, diagnostics }));
1114
+ return;
1115
+ }
1116
+ // GET /api/support/tickets/:id
1117
+ const ticketIdMatch = pathname.match(/^\/api\/support\/tickets\/([a-zA-Z0-9_\-]+)$/);
1118
+ if (ticketIdMatch && req.method === 'GET') {
1119
+ const ticketId = ticketIdMatch[1];
1120
+ const ticket = getSupportTicket(ticketId);
1121
+ if (!ticket) {
1122
+ res.writeHead(404);
1123
+ res.end(JSON.stringify({ success: false, error: 'Ticket not found' }));
1124
+ return;
1125
+ }
1126
+ res.writeHead(200);
1127
+ res.end(JSON.stringify({ success: true, ticket }));
1128
+ return;
1129
+ }
1130
+ // POST /api/support/tickets/:id/message - Add reply to ticket
1131
+ const ticketMessageMatch = pathname.match(/^\/api\/support\/tickets\/([a-zA-Z0-9_\-]+)\/message$/);
1132
+ if (ticketMessageMatch && req.method === 'POST') {
1133
+ const ticketId = ticketMessageMatch[1];
1134
+ let body = '';
1135
+ req.on('data', chunk => body += chunk);
1136
+ req.on('end', () => {
1137
+ try {
1138
+ const data = JSON.parse(body || '{}');
1139
+ if (!data.message || !data.message.trim()) {
1140
+ res.writeHead(400);
1141
+ res.end(JSON.stringify({ success: false, error: 'Message cannot be empty.' }));
1142
+ return;
1143
+ }
1144
+ const updated = addTicketMessage(ticketId, data.message, data.sender || 'user', data.senderName);
1145
+ if (!updated) {
1146
+ res.writeHead(404);
1147
+ res.end(JSON.stringify({ success: false, error: 'Ticket not found.' }));
1148
+ return;
1149
+ }
1150
+ res.writeHead(200);
1151
+ res.end(JSON.stringify({ success: true, ticket: updated }));
1152
+ }
1153
+ catch (err) {
1154
+ res.writeHead(400);
1155
+ res.end(JSON.stringify({ success: false, error: err.message || 'Failed to add message.' }));
1156
+ }
1157
+ });
1158
+ return;
1159
+ }
1160
+ // POST /api/support/tickets/:id/status - Update ticket status
1161
+ const ticketStatusMatch = pathname.match(/^\/api\/support\/tickets\/([a-zA-Z0-9_\-]+)\/status$/);
1162
+ if (ticketStatusMatch && req.method === 'POST') {
1163
+ const ticketId = ticketStatusMatch[1];
1164
+ let body = '';
1165
+ req.on('data', chunk => body += chunk);
1166
+ req.on('end', () => {
1167
+ try {
1168
+ const data = JSON.parse(body || '{}');
1169
+ if (!data.status) {
1170
+ res.writeHead(400);
1171
+ res.end(JSON.stringify({ success: false, error: 'Status is required.' }));
1172
+ return;
1173
+ }
1174
+ const updated = updateTicketStatus(ticketId, data.status);
1175
+ if (!updated) {
1176
+ res.writeHead(404);
1177
+ res.end(JSON.stringify({ success: false, error: 'Ticket not found.' }));
1178
+ return;
1179
+ }
1180
+ res.writeHead(200);
1181
+ res.end(JSON.stringify({ success: true, ticket: updated }));
1182
+ }
1183
+ catch (err) {
1184
+ res.writeHead(400);
1185
+ res.end(JSON.stringify({ success: false, error: err.message || 'Failed to update status.' }));
1186
+ }
1187
+ });
1188
+ return;
1189
+ }
1057
1190
  res.writeHead(404);
1058
1191
  res.end(JSON.stringify({ error: 'API route not found' }));
1059
1192
  return;
@@ -1072,6 +1205,9 @@ export function startDashboardServer(port = DEFAULT_PORT) {
1072
1205
  else if (pathname === '/admin' || pathname === '/admin/') {
1073
1206
  filePath = path.join(webDir, 'admin.html');
1074
1207
  }
1208
+ else if (pathname === '/support' || pathname === '/support/' || pathname === '/help' || pathname === '/help/') {
1209
+ filePath = path.join(webDir, 'support.html');
1210
+ }
1075
1211
  else {
1076
1212
  let targetFile = pathname === '/' ? 'index.html' : pathname.replace(/^\//, '');
1077
1213
  filePath = path.join(webDir, targetFile);
@@ -1,5 +1,5 @@
1
1
  import chalk from 'chalk';
2
- export function renderBranding(version = '9.5.4') {
2
+ export function renderBranding(version = '9.5.5') {
3
3
  const logo = chalk.cyan.bold(' ███████╗████████╗') + ' ' + chalk.cyan.bold('███████╗ ██████╗ ██████╗ ██╗ ██╗████████╗') + '\n' +
4
4
  chalk.cyan.bold(' ██╔════╝╚══██╔══╝') + ' ' + chalk.cyan.bold('██╔════╝ ██╔════╝██╔═══██╗ ██║ ██║╚══██╔══╝') + '\n' +
5
5
  chalk.cyan.bold(' █████╗ ██║ ') + ' ' + chalk.cyan.bold(' ███████╗ ██║ ██║ ██║ ██║ ██║ ██║ ') + '\n' +
@@ -105,7 +105,7 @@ export async function startQrPairingSession() {
105
105
  const pairingCode = `SCT-${rawNum}`;
106
106
  const sessionId = `sct_sess_${Date.now().toString(36)}_${crypto.randomBytes(3).toString('hex')}`;
107
107
  const hostName = os.hostname() || 'workstation.local';
108
- const version = '9.5.4';
108
+ const version = '9.5.5';
109
109
  let localIp = '127.0.0.1';
110
110
  try {
111
111
  const nets = os.networkInterfaces();
@@ -15,7 +15,11 @@ export interface AgentSessionRecord {
15
15
  * Load all recorded agent sessions from disk.
16
16
  * Sorted by timestamp descending (newest first).
17
17
  */
18
- export declare function loadAgentSessions(limit?: number): AgentSessionRecord[];
18
+ export declare function loadAgentSessions(limit?: number, includeInternal?: boolean): AgentSessionRecord[];
19
+ /**
20
+ * Retrieves the most recent real user goal (excluding mock test sessions and internal subagents).
21
+ */
22
+ export declare function getLastUserGoal(): string | null;
19
23
  /**
20
24
  * Save a new agent session record to disk.
21
25
  * Keeps history intact, prepending the latest session.
@@ -18,7 +18,7 @@ function ensureFtDir() {
18
18
  * Load all recorded agent sessions from disk.
19
19
  * Sorted by timestamp descending (newest first).
20
20
  */
21
- export function loadAgentSessions(limit = 10) {
21
+ export function loadAgentSessions(limit = 10, includeInternal = false) {
22
22
  ensureFtDir();
23
23
  if (!fs.existsSync(SESSIONS_FILE))
24
24
  return [];
@@ -27,19 +27,52 @@ export function loadAgentSessions(limit = 10) {
27
27
  const sessions = JSON.parse(raw);
28
28
  if (!Array.isArray(sessions))
29
29
  return [];
30
- return sessions.slice(0, limit);
30
+ if (includeInternal)
31
+ return sessions.slice(0, limit);
32
+ const filtered = sessions.filter(s => {
33
+ const g = (s.goal || '').trim();
34
+ return !g.startsWith('Test Goal') && !g.startsWith('[SPECIALIST ROLE DIRECTIVE');
35
+ });
36
+ return filtered.slice(0, limit);
31
37
  }
32
38
  catch {
33
39
  return [];
34
40
  }
35
41
  }
42
+ /**
43
+ * Retrieves the most recent real user goal (excluding mock test sessions and internal subagents).
44
+ */
45
+ export function getLastUserGoal() {
46
+ const sessions = loadAgentSessions(50);
47
+ for (const session of sessions) {
48
+ const goal = (session.goal || '').trim();
49
+ if (goal &&
50
+ !goal.startsWith('Test Goal') &&
51
+ !goal.startsWith('[SPECIALIST ROLE DIRECTIVE') &&
52
+ !goal.startsWith('mock')) {
53
+ return goal;
54
+ }
55
+ }
56
+ return null;
57
+ }
36
58
  /**
37
59
  * Save a new agent session record to disk.
38
60
  * Keeps history intact, prepending the latest session.
39
61
  */
40
62
  export function saveAgentSession(session) {
41
63
  ensureFtDir();
42
- const existing = loadAgentSessions(50);
64
+ // Prevent internal subagent directives from polluting the main session log
65
+ if (session.goal && session.goal.startsWith('[SPECIALIST ROLE DIRECTIVE')) {
66
+ return {
67
+ id: session.id || `subagent-${Date.now()}`,
68
+ timestamp: session.timestamp || new Date().toISOString(),
69
+ goal: session.goal,
70
+ summary: session.summary,
71
+ modifiedFiles: session.modifiedFiles || [],
72
+ keyHighlights: session.keyHighlights || [],
73
+ };
74
+ }
75
+ const existing = loadAgentSessions(50, true);
43
76
  const newRecord = {
44
77
  id: session.id || `session-${Date.now()}-${Math.floor(Math.random() * 1000)}`,
45
78
  timestamp: session.timestamp || new Date().toISOString(),
@@ -0,0 +1,63 @@
1
+ export interface SupportTicketMessage {
2
+ id: string;
3
+ sender: 'user' | 'support' | 'system';
4
+ senderName?: string | undefined;
5
+ message: string;
6
+ timestamp: string;
7
+ }
8
+ export interface SystemDiagnosticsInfo {
9
+ scoutVersion: string;
10
+ nodeVersion: string;
11
+ platform: string;
12
+ osRelease: string;
13
+ arch: string;
14
+ currentTier: string;
15
+ activeModel: string;
16
+ byokEnabled: boolean;
17
+ totalCredits: number;
18
+ usedCredits: number;
19
+ activeTaskCount: number;
20
+ lastErrorSnippet?: string | undefined;
21
+ }
22
+ export type TicketCategory = 'agent_automation' | 'billing_quota' | 'cli_crash' | 'mcp_integration' | 'feature_request' | 'other';
23
+ export type TicketPriority = 'low' | 'medium' | 'high' | 'urgent';
24
+ export type TicketStatus = 'open' | 'in_progress' | 'resolved' | 'closed';
25
+ export interface SupportTicket {
26
+ id: string;
27
+ userEmail: string;
28
+ userName?: string | undefined;
29
+ subject: string;
30
+ category: TicketCategory;
31
+ priority: TicketPriority;
32
+ status: TicketStatus;
33
+ description: string;
34
+ createdAt: string;
35
+ updatedAt: string;
36
+ diagnostics?: SystemDiagnosticsInfo | undefined;
37
+ messages: SupportTicketMessage[];
38
+ }
39
+ export interface FAQItem {
40
+ id: string;
41
+ category: string;
42
+ question: string;
43
+ answer: string;
44
+ tags: string[];
45
+ }
46
+ export declare function loadSupportTickets(): SupportTicket[];
47
+ export declare function saveSupportTickets(tickets: SupportTicket[]): void;
48
+ export declare function generateTicketId(): string;
49
+ export declare function collectSanitizedDiagnostics(): SystemDiagnosticsInfo;
50
+ export declare function createSupportTicket(params: {
51
+ subject: string;
52
+ description: string;
53
+ userEmail: string;
54
+ userName?: string;
55
+ category?: TicketCategory;
56
+ priority?: TicketPriority;
57
+ attachDiagnostics?: boolean;
58
+ }): SupportTicket;
59
+ export declare function getSupportTicket(id: string): SupportTicket | null;
60
+ export declare function addTicketMessage(ticketId: string, messageContent: string, sender?: 'user' | 'support' | 'system', senderName?: string): SupportTicket | null;
61
+ export declare function updateTicketStatus(ticketId: string, status: TicketStatus): SupportTicket | null;
62
+ export declare function getPresetFaqs(): FAQItem[];
63
+ //# sourceMappingURL=support.d.ts.map