ability to symlink a vault

This commit is contained in:
Arjun 2026-02-17 22:27:16 +05:30
parent b238089e2d
commit 63cbe83e3e
11 changed files with 518 additions and 19 deletions

View file

@ -11,6 +11,14 @@ import { ServiceEvent } from './service-events.js';
// Runtime Validation Schemas (Single Source of Truth)
// ============================================================================
const KnowledgeVault = z.object({
name: z.string(),
path: z.string(),
mountPath: z.string(),
readOnly: z.boolean(),
addedAt: z.string(),
});
const ipcSchemas = {
'app:getVersions': {
req: z.null(),
@ -104,6 +112,36 @@ const ipcSchemas = {
req: WorkspaceChangeEvent,
res: z.null(),
},
'knowledge:listVaults': {
req: z.null(),
res: z.object({
vaults: z.array(KnowledgeVault),
}),
},
'knowledge:pickVaultDirectory': {
req: z.null(),
res: z.object({
path: z.string().nullable(),
}),
},
'knowledge:addVault': {
req: z.object({
path: z.string(),
name: z.string(),
readOnly: z.boolean().optional(),
}),
res: z.object({
vault: KnowledgeVault,
}),
},
'knowledge:removeVault': {
req: z.object({
nameOrMountPath: z.string(),
}),
res: z.object({
removed: KnowledgeVault.nullable(),
}),
},
'mcp:listTools': {
req: z.object({
serverName: z.string(),