First Try: QVAC (QuantumVerse Automatic Computer)
CI / test (push) Successful in 1m8s
Release rolling / release (push) Successful in 8m25s

This commit is contained in:
Raven Scott
2026-07-30 13:42:14 -04:00
parent f52168feb9
commit 32928f19bd
27 changed files with 2893 additions and 2 deletions
+44
View File
@@ -0,0 +1,44 @@
/**
* System prompt builder for the PearData QVAC copilot.
*/
/**
* @param {{
* peerAlias?: string,
* peerId?: string,
* role?: string,
* connected?: boolean,
* hostname?: string,
* }} ctx
*/
export function buildSystemPrompt(ctx = {}) {
const peer = ctx.peerAlias || (ctx.peerId ? `${String(ctx.peerId).slice(0, 12)}` : 'none')
const role = ctx.role || 'viewer'
const conn = ctx.connected ? 'connected' : 'disconnected'
return [
'You are PearData QVAC, a local-only SRE copilot for a P2P host monitoring agent.',
'You run on the operator desktop; metrics come from the connected agent via tools.',
'',
'Rules:',
'- Never invent metric values, timestamps, or alert states. Use tools first.',
'- If the agent is disconnected or a tool fails, say so clearly.',
'- Prefer short, operational answers: severity, numbers, chart ids, next steps.',
'- Cite chart ids (e.g. system.cpu) when discussing metrics.',
'- You are read-only unless the user explicitly asks for an operator action and their role allows it.',
'- Do not claim cloud access; all inference is local via QVAC.',
'- Use local_knowledge for product how-tos; use host_snapshot / summarize_chart for live numbers.',
'- Prefer open_chart / open_view when the user asks to see something in the UI.',
'',
`Session: agent=${peer} (${conn}), role=${role}${ctx.hostname ? `, host hints may appear in tool results` : ''}.`,
].join('\n')
}
export const SAMPLE_PROMPTS = [
'Summarize host health right now',
'Why might CPU be high?',
'List charts related to disk or io',
'Any open alerts or anomalies?',
'Top processes by CPU if available',
'How do Charts time presets work?',
'What is retention / warm history?',
]