bloby-bot 0.37.1 → 0.38.0
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/package.json
CHANGED
|
@@ -571,6 +571,14 @@ async function spawnAndInitialize(
|
|
|
571
571
|
conv.threadId = startResult.thread.id;
|
|
572
572
|
conversations.set(conversationId, conv);
|
|
573
573
|
log.ok(`[codex] thread started ${conv.threadId}`);
|
|
574
|
+
|
|
575
|
+
// Prime codex's per-thread skill cache with the workspace skills
|
|
576
|
+
// directory. Without this, codex only sees its system-scope skills and
|
|
577
|
+
// never discovers anything Bloby ships in `workspace/skills/*`. Fire and
|
|
578
|
+
// forget — failure here just means workspace skills won't be auto-routable
|
|
579
|
+
// for this thread, but the agent can still read SKILL.md files directly.
|
|
580
|
+
primeWorkspaceSkills(rpc);
|
|
581
|
+
|
|
574
582
|
return conv;
|
|
575
583
|
} catch (err: any) {
|
|
576
584
|
rpc.close();
|
|
@@ -579,6 +587,28 @@ async function spawnAndInitialize(
|
|
|
579
587
|
}
|
|
580
588
|
}
|
|
581
589
|
|
|
590
|
+
const SKILLS_DIR = path.join(WORKSPACE_DIR, 'skills');
|
|
591
|
+
|
|
592
|
+
function primeWorkspaceSkills(rpc: CodexRpc): void {
|
|
593
|
+
rpc.request('skills/list', {
|
|
594
|
+
cwds: [WORKSPACE_DIR],
|
|
595
|
+
forceReload: true,
|
|
596
|
+
perCwdExtraUserRoots: [{
|
|
597
|
+
cwd: WORKSPACE_DIR,
|
|
598
|
+
extraUserRoots: [SKILLS_DIR],
|
|
599
|
+
}],
|
|
600
|
+
}).then((result: any) => {
|
|
601
|
+
const entry = result?.data?.[0];
|
|
602
|
+
const all = entry?.skills ?? [];
|
|
603
|
+
const workspace = all.filter((s: any) => s.scope !== 'system');
|
|
604
|
+
const errors = entry?.errors ?? [];
|
|
605
|
+
log.ok(`[codex] skills primed: ${workspace.length} workspace, ${all.length - workspace.length} system${errors.length ? `, ${errors.length} rejected` : ''}`);
|
|
606
|
+
for (const err of errors) log.warn(`[codex] skill load error: ${err.path} — ${err.message}`);
|
|
607
|
+
}).catch((err: any) => {
|
|
608
|
+
log.warn(`[codex] skills/list failed: ${err.message}`);
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
|
|
582
612
|
/* ── Harness implementation ────────────────────────────────────────────── */
|
|
583
613
|
|
|
584
614
|
export function hasConversation(conversationId: string): boolean {
|
|
@@ -792,6 +822,10 @@ export async function runAgentQuery(req: AgentQueryRequest): Promise<AgentQueryR
|
|
|
792
822
|
resolvedThreadId = r.thread.id;
|
|
793
823
|
}
|
|
794
824
|
|
|
825
|
+
// Same priming as live conversations — workspace skills won't be visible
|
|
826
|
+
// to codex's router otherwise.
|
|
827
|
+
primeWorkspaceSkills(rpc);
|
|
828
|
+
|
|
795
829
|
const turnParams: Record<string, any> = {
|
|
796
830
|
threadId: resolvedThreadId,
|
|
797
831
|
input: [{ type: 'text', text: req.message }],
|
|
@@ -266,9 +266,9 @@ If something fails, own it: "Hmm, that didn't work. Let me try again."
|
|
|
266
266
|
|
|
267
267
|
## Skills
|
|
268
268
|
|
|
269
|
-
Skills live in `skills/` — each skill is a folder
|
|
269
|
+
Skills live in `skills/` — each skill is a folder containing a `SKILL.md` that explains what the skill does and how to use it. When a user request matches a skill's purpose (e.g. they mention WhatsApp and a `whatsapp` skill exists), open that skill's `SKILL.md` and follow its guidance. List `skills/` whenever you're unsure what's installed.
|
|
270
270
|
|
|
271
|
-
|
|
271
|
+
If your human asks you to update a skill's behavior, edit the files INSIDE `skills/{skill-name}/`.
|
|
272
272
|
|
|
273
273
|
**IMPORTANT: When editing skill files, always use the full path inside the skill directory.**
|
|
274
274
|
- Correct: `skills/my-skill/SCRIPT.md`
|