@redplanethq/corebrain 2.8.29 → 2.8.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/gateway/register.js +1 -1
- package/dist/commands/gateway/register.js.map +1 -1
- package/dist/server/api/server.d.ts.map +1 -1
- package/dist/server/api/server.js +5 -0
- package/dist/server/api/server.js.map +1 -1
- package/dist/server/api/skills/index.d.ts +9 -0
- package/dist/server/api/skills/index.d.ts.map +1 -0
- package/dist/server/api/skills/index.js +12 -0
- package/dist/server/api/skills/index.js.map +1 -0
- package/dist/server/coding-session-watcher.d.ts +4 -3
- package/dist/server/coding-session-watcher.d.ts.map +1 -1
- package/dist/server/coding-session-watcher.js +5 -13
- package/dist/server/coding-session-watcher.js.map +1 -1
- package/dist/server/skills/install.d.ts +35 -0
- package/dist/server/skills/install.d.ts.map +1 -0
- package/dist/server/skills/install.js +182 -0
- package/dist/server/skills/install.js.map +1 -0
- package/dist/server/skills/skill-store.d.ts +12 -0
- package/dist/server/skills/skill-store.d.ts.map +1 -0
- package/dist/server/skills/skill-store.js +76 -0
- package/dist/server/skills/skill-store.js.map +1 -0
- package/dist/server/tools/skills-tools.d.ts +14 -0
- package/dist/server/tools/skills-tools.d.ts.map +1 -0
- package/dist/server/tools/skills-tools.js +100 -0
- package/dist/server/tools/skills-tools.js.map +1 -0
- package/dist/tui/chat.d.ts.map +1 -1
- package/dist/tui/chat.js +390 -57
- package/dist/tui/chat.js.map +1 -1
- package/dist/tui/components/approval-bar.d.ts +1 -1
- package/dist/tui/components/approval-bar.d.ts.map +1 -1
- package/dist/tui/components/approval-bar.js +1 -1
- package/dist/tui/components/approval-bar.js.map +1 -1
- package/dist/tui/components/approval-panel.d.ts +1 -1
- package/dist/tui/components/approval-panel.d.ts.map +1 -1
- package/dist/tui/components/approval-panel.js +1 -1
- package/dist/tui/components/approval-panel.js.map +1 -1
- package/dist/tui/components/context-bar.d.ts +26 -0
- package/dist/tui/components/context-bar.d.ts.map +1 -0
- package/dist/tui/components/context-bar.js +45 -0
- package/dist/tui/components/context-bar.js.map +1 -0
- package/dist/tui/components/conversation-selector.d.ts +24 -6
- package/dist/tui/components/conversation-selector.d.ts.map +1 -1
- package/dist/tui/components/conversation-selector.js +187 -117
- package/dist/tui/components/conversation-selector.js.map +1 -1
- package/dist/tui/components/integrations-view.d.ts +1 -1
- package/dist/tui/components/integrations-view.d.ts.map +1 -1
- package/dist/tui/components/integrations-view.js +1 -1
- package/dist/tui/components/integrations-view.js.map +1 -1
- package/dist/tui/components/scratchpad-panel.d.ts +28 -0
- package/dist/tui/components/scratchpad-panel.d.ts.map +1 -0
- package/dist/tui/components/scratchpad-panel.js +117 -0
- package/dist/tui/components/scratchpad-panel.js.map +1 -0
- package/dist/tui/components/split-pane.d.ts +23 -0
- package/dist/tui/components/split-pane.d.ts.map +1 -0
- package/dist/tui/components/split-pane.js +59 -0
- package/dist/tui/components/split-pane.js.map +1 -0
- package/dist/tui/components/status-line.d.ts +35 -6
- package/dist/tui/components/status-line.d.ts.map +1 -1
- package/dist/tui/components/status-line.js +149 -19
- package/dist/tui/components/status-line.js.map +1 -1
- package/dist/tui/components/task-detail.d.ts +1 -1
- package/dist/tui/components/task-detail.d.ts.map +1 -1
- package/dist/tui/components/task-detail.js +1 -1
- package/dist/tui/components/task-detail.js.map +1 -1
- package/dist/tui/components/task-list.d.ts +1 -1
- package/dist/tui/components/task-list.d.ts.map +1 -1
- package/dist/tui/components/task-list.js +5 -6
- package/dist/tui/components/task-list.js.map +1 -1
- package/dist/tui/components/task-runs.d.ts +32 -0
- package/dist/tui/components/task-runs.d.ts.map +1 -0
- package/dist/tui/components/task-runs.js +146 -0
- package/dist/tui/components/task-runs.js.map +1 -0
- package/dist/tui/components/tool-call-item.d.ts +1 -1
- package/dist/tui/components/tool-call-item.d.ts.map +1 -1
- package/dist/tui/components/tool-call-item.js +44 -13
- package/dist/tui/components/tool-call-item.js.map +1 -1
- package/dist/tui/components/widgets-view.d.ts +1 -1
- package/dist/tui/components/widgets-view.d.ts.map +1 -1
- package/dist/tui/components/widgets-view.js +1 -1
- package/dist/tui/components/widgets-view.js.map +1 -1
- package/dist/tui/utils/avatar.d.ts +1 -1
- package/dist/tui/utils/avatar.d.ts.map +1 -1
- package/dist/tui/utils/avatar.js +1 -1
- package/dist/tui/utils/avatar.js.map +1 -1
- package/dist/tui/utils/bundle-loader.d.ts.map +1 -1
- package/dist/tui/utils/bundle-loader.js +8 -1
- package/dist/tui/utils/bundle-loader.js.map +1 -1
- package/dist/tui/utils/integration-loader.d.ts +1 -1
- package/dist/tui/utils/integration-loader.d.ts.map +1 -1
- package/dist/tui/utils/stream.d.ts +75 -13
- package/dist/tui/utils/stream.d.ts.map +1 -1
- package/dist/tui/utils/stream.js +148 -13
- package/dist/tui/utils/stream.js.map +1 -1
- package/dist/utils/env-bootstrap.js +1 -1
- package/dist/utils/env-bootstrap.js.map +1 -1
- package/dist/utils/setup/docker.js +1 -1
- package/dist/utils/setup/docker.js.map +1 -1
- package/dist/utils/setup/railway.js +1 -1
- package/dist/utils/setup/railway.js.map +1 -1
- package/package.json +3 -2
- package/dist/tui/components/dashboard-view.d.ts +0 -20
- package/dist/tui/components/dashboard-view.d.ts.map +0 -1
- package/dist/tui/components/dashboard-view.js +0 -147
- package/dist/tui/components/dashboard-view.js.map +0 -1
- package/dist/tui/components/reminder-list.d.ts +0 -28
- package/dist/tui/components/reminder-list.d.ts.map +0 -1
- package/dist/tui/components/reminder-list.js +0 -261
- package/dist/tui/components/reminder-list.js.map +0 -1
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import zod from 'zod';
|
|
2
|
+
import { installSkill, removeSkill } from '../../server/skills/install.js';
|
|
3
|
+
const InstallSchema = zod.object({
|
|
4
|
+
url: zod.string().min(1),
|
|
5
|
+
name: zod.string().min(1),
|
|
6
|
+
subdir: zod.string().optional(),
|
|
7
|
+
force: zod.boolean().optional(),
|
|
8
|
+
});
|
|
9
|
+
const RemoveSchema = zod.object({
|
|
10
|
+
name: zod.string().min(1),
|
|
11
|
+
});
|
|
12
|
+
const jsonSchemas = {
|
|
13
|
+
skill_install: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
url: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'Git URL of the source repository. Must start with "https://" or "git@host:". For library skills this points at the CORE monorepo.',
|
|
19
|
+
},
|
|
20
|
+
name: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'Kebab-case skill slug. Becomes both the SKILL.md frontmatter `name` and the directory under ~/.corebrain/skills/.',
|
|
23
|
+
},
|
|
24
|
+
subdir: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Optional path inside the cloned repo to the skill folder (e.g. "docs/skills/my-skill"). Triggers sparse-checkout so only this subtree is fetched. Omit for repos whose root is the skill.',
|
|
27
|
+
},
|
|
28
|
+
force: {
|
|
29
|
+
type: 'boolean',
|
|
30
|
+
description: 'If true, overwrite an existing skill with the same name. Without this an existing install fails.',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
required: ['url', 'name'],
|
|
34
|
+
},
|
|
35
|
+
skill_remove: {
|
|
36
|
+
type: 'object',
|
|
37
|
+
properties: {
|
|
38
|
+
name: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'Skill name to remove. Deletes ~/.corebrain/skills/<name>/ recursively.',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
required: ['name'],
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
export const skillsTools = [
|
|
47
|
+
{
|
|
48
|
+
name: 'skill_install',
|
|
49
|
+
description: 'Install a skill from a git URL into ~/.corebrain/skills/<name>/. Uses sparse-checkout when `subdir` is set, so library skills nested inside a monorepo can be pulled cheaply. Atomic: stages in a temp dir, then renames into place.',
|
|
50
|
+
inputSchema: jsonSchemas.skill_install,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'skill_remove',
|
|
54
|
+
description: 'Remove an installed skill. Deletes ~/.corebrain/skills/<name>/ recursively. Fails if the skill does not exist.',
|
|
55
|
+
inputSchema: jsonSchemas.skill_remove,
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
async function handleInstall(params) {
|
|
59
|
+
try {
|
|
60
|
+
const skill = await installSkill({
|
|
61
|
+
source: 'url',
|
|
62
|
+
url: params.url,
|
|
63
|
+
name: params.name,
|
|
64
|
+
...(params.subdir ? { subdir: params.subdir } : {}),
|
|
65
|
+
...(params.force ? { force: true } : {}),
|
|
66
|
+
});
|
|
67
|
+
return { success: true, result: skill };
|
|
68
|
+
}
|
|
69
|
+
catch (err) {
|
|
70
|
+
return { success: false, error: err instanceof Error ? err.message : String(err) };
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
async function handleRemove(params) {
|
|
74
|
+
try {
|
|
75
|
+
await removeSkill(params.name);
|
|
76
|
+
return { success: true, result: { name: params.name, removed: true } };
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
return { success: false, error: err instanceof Error ? err.message : String(err) };
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export async function executeSkillsTool(toolName, params) {
|
|
83
|
+
try {
|
|
84
|
+
switch (toolName) {
|
|
85
|
+
case 'skill_install':
|
|
86
|
+
return await handleInstall(InstallSchema.parse(params));
|
|
87
|
+
case 'skill_remove':
|
|
88
|
+
return await handleRemove(RemoveSchema.parse(params));
|
|
89
|
+
default:
|
|
90
|
+
return { success: false, error: `Unknown tool: ${toolName}` };
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
catch (err) {
|
|
94
|
+
if (err instanceof zod.ZodError) {
|
|
95
|
+
return { success: false, error: `Invalid parameters: ${err.message}` };
|
|
96
|
+
}
|
|
97
|
+
return { success: false, error: err instanceof Error ? err.message : 'Unknown error' };
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=skills-tools.js.map
|
|
@@ -0,0 +1 @@
|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d.ts","sourceRoot":"","sources":["../../src/tui/chat.ts"],"names":[],"mappings":"AAqCA,wBAAgB,WAAW,CAC1B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACb,IAAI,CA8yCN"}
|