/** One command a chat surface may advertise. Builtin and non-opted-in rows are * dropped before this DTO exists, so `source` never carries `'builtin'`. */ export interface ChatInventoryCommandDTO { /** No leading slash, exactly as the engine dispatches it. */ name: string; description: string; source: 'command' | 'template'; /** Argument shape to display beside the name, when the command supplies one. */ argument_hint?: string; /** Deterministic expansion metadata for a memory-slash command — the same * material the terminal preview uses, so a chat preview cannot drift from * what submission sends. */ expansion?: { kind: 'memory-slash'; commandName: string; body: string; }; /** Raw prompt-template content (frontmatter stripped), for `source: 'template'`. */ template?: string; } /** One resolvable inline memory reference. Metadata only — never the document * body or its source path. `shortForm` stays camelCase to mirror the broker's * own `RefMeta`, which is where these rows come from. */ export interface ChatInventoryMemoryRefDTO { /** Canonical `/`-joined name, e.g. `taste/writing`. */ name: string; kind: 'knowledge' | 'preference'; scope: 'node' | 'project' | 'profile' | 'user' | 'builtin'; shortForm: string; } /** `GET /v1/nodes/{id}/chat-inventory` result. * * `broker_live` reports whether the node's engine was reachable at all. There * is no per-part error flag: a part that failed and a part that is genuinely * empty both arrive as an empty array, and a client's behavior is identical * for both. A dormant node answers 200 with `broker_live: false` — this read * never revives an engine. */ export interface ChatInventoryDTO { node_id: string; broker_live: boolean; commands: ChatInventoryCommandDTO[]; memory_refs: ChatInventoryMemoryRefDTO[]; } /** Session-less inventory for the launch target a create would resolve. */ export interface ProspectiveChatInventoryDTO { profile_id: string | null; cwd: string; commands: ChatInventoryCommandDTO[]; memory_refs: ChatInventoryMemoryRefDTO[]; } export interface ProspectiveChatInventoryQuery { profile?: string; cwd?: string; /** Same optional kind operand as POST /v1/nodes. */ kind?: string; }