feat: sync open-source context and capsule removal

- remove legacy contexts surfaces from the app, MCP bridge, standalone server, and docs
- keep getContext and retrieveQueryContext while aligning the simplified graph-only contract
- harden dev startup migration behavior and disable the accidental chat surface in open source

Generated with Codex
This commit is contained in:
“BeeRad”
2026-04-17 12:34:51 +10:00
parent 97eeb0789f
commit 07754f5030
87 changed files with 2688 additions and 4861 deletions
+38
View File
@@ -0,0 +1,38 @@
import { tool } from 'ai';
import { z } from 'zod';
import { writeSkill } from '@/services/skills/skillService';
import { eventBroadcaster } from '@/services/events';
export const writeSkillTool = tool({
description: 'Write or update a skill. Content should be full markdown with YAML frontmatter (name, description).',
inputSchema: z.object({
name: z.string().describe('The name of the skill to write'),
content: z.string().describe('Full markdown content including YAML frontmatter'),
}),
execute: async ({ name, content }) => {
try {
const result = writeSkill(name, content);
if (!result.success) {
return {
success: false,
error: result.error,
data: null,
};
}
eventBroadcaster.broadcast({ type: 'GUIDE_UPDATED', data: { name } });
return {
success: true,
data: { name },
message: `Skill "${name}" saved`,
};
} catch (error) {
return {
success: false,
error: error instanceof Error ? error.message : 'Failed to write skill',
data: null,
};
}
},
});