First Try: QVAC (QuantumVerse Automatic Computer)
This commit is contained in:
@@ -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?',
|
||||
]
|
||||
Reference in New Issue
Block a user