bloby-bot 0.37.0 → 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
|
@@ -736,13 +736,19 @@ export class ChannelManager {
|
|
|
736
736
|
}).catch(() => {});
|
|
737
737
|
}
|
|
738
738
|
|
|
739
|
-
// Handle turn completion — restart backend if file tools were used
|
|
740
|
-
|
|
741
|
-
|
|
739
|
+
// Handle turn completion — restart backend if file tools were used,
|
|
740
|
+
// and tell every chat client the agent is idle so the typing dots
|
|
741
|
+
// stop. This callback owns the live conversation whenever a WhatsApp
|
|
742
|
+
// self-chat arrives before the dashboard does, so without this signal
|
|
743
|
+
// the dashboard's typing indicator would stay on forever.
|
|
744
|
+
if (type === 'bot:turn-complete') {
|
|
745
|
+
if (eventData.usedFileTools) this.opts.restartBackend();
|
|
746
|
+
broadcastBloby('bot:idle', { conversationId: convId });
|
|
747
|
+
return;
|
|
742
748
|
}
|
|
743
749
|
|
|
744
750
|
// Don't forward internal events to chat clients
|
|
745
|
-
if (type === 'bot:
|
|
751
|
+
if (type === 'bot:conversation-ended') return;
|
|
746
752
|
|
|
747
753
|
// Mirror streaming + task events to chat clients
|
|
748
754
|
broadcastBloby(type, eventData);
|
|
@@ -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`
|