fabiana 1.4.0 → 1.6.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/dist/cli.js +5 -0
- package/dist/daemon/index.js +26 -0
- package/dist/initiative/trigger.js +3 -3
- package/dist/initiative/types.js +5 -5
- package/dist/plugins/stable-diffusion/index.js +2721 -0
- package/dist/plugins/stable-diffusion/package.json +9 -0
- package/dist/plugins/stable-diffusion/plugin.json +13 -0
- package/dist/plugins/tts/index.js +2701 -0
- package/dist/plugins/tts/package.json +9 -0
- package/dist/plugins/tts/plugin.json +13 -0
- package/dist/sync-cmd.js +89 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -16,6 +16,7 @@ import { runBackup, runRestore } from './backup.js';
|
|
|
16
16
|
import { pluginsAdd, pluginsList } from './plugins-cmd.js';
|
|
17
17
|
import { skillsAdd, skillsList, skillsRemove, skillsEnable, skillsDisable } from './skills-cmd.js';
|
|
18
18
|
import { runSetup } from './setup/index.js';
|
|
19
|
+
import { runSync } from './sync-cmd.js';
|
|
19
20
|
import { providerStatus, providerUse, providerAdd } from './provider-cmd.js';
|
|
20
21
|
import { modelStatus, modelUse, modelTest } from './model-cmd.js';
|
|
21
22
|
const C = '\x1b[96m'; // cyan — name
|
|
@@ -49,6 +50,10 @@ program
|
|
|
49
50
|
.command('init')
|
|
50
51
|
.description('First time? Let\'s get acquainted')
|
|
51
52
|
.action(runSetup);
|
|
53
|
+
program
|
|
54
|
+
.command('sync')
|
|
55
|
+
.description('Sync bundled plugins and skills to ~/.fabiana (run after upgrades)')
|
|
56
|
+
.action(runSync);
|
|
52
57
|
program
|
|
53
58
|
.command('start')
|
|
54
59
|
.description('Wake her up — she\'ll take it from there')
|
package/dist/daemon/index.js
CHANGED
|
@@ -158,6 +158,24 @@ export async function runPiSession(mode, incomingMessage, channel, incomingMsg,
|
|
|
158
158
|
await updateLastSolitude();
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
|
+
// Lightweight status sender — chat mode only, no logging, no interaction tracking
|
|
162
|
+
const sendStatus = async (text) => {
|
|
163
|
+
if (mode === 'chat' && channel) {
|
|
164
|
+
await channel.send(text, incomingMsg?.channelId, incomingMsg?.threadId);
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
const pick = (arr) => arr[Math.floor(Math.random() * arr.length)];
|
|
168
|
+
const TOOL_STATUS = {
|
|
169
|
+
safe_read: ['having a look...', 'let me check that.', 'nosing through your files...', 'one sec, reading.'],
|
|
170
|
+
safe_write: ['writing that down...', 'putting that somewhere safe.', 'noted, filing it away.'],
|
|
171
|
+
safe_edit: ['making a small edit...', 'adjusting things a bit.', 'tweaking that.'],
|
|
172
|
+
fetch_url: ['heading out to the web...', 'brb, checking the internet.', 'let me go look that up.'],
|
|
173
|
+
brave_search: ['diving into search...', 'looking that up for you.', 'let me see what I can find.'],
|
|
174
|
+
hackernews: ['peeking at hacker news...', 'seeing what the nerds are saying.', 'checking HN real quick.'],
|
|
175
|
+
calendar: ['checking your schedule...', 'having a look at your calendar.', 'let me see what\'s coming up.'],
|
|
176
|
+
manage_todo: ['peeking at your todos...', 'checking what\'s on your list.'],
|
|
177
|
+
bash: ['running something for you...', 'brb, executing.', 'let me run that.'],
|
|
178
|
+
};
|
|
161
179
|
console.log('[6/8] Creating tools...');
|
|
162
180
|
const fabianaTools = createFabianaTools(permissions, sendMessage, {
|
|
163
181
|
toolset,
|
|
@@ -199,6 +217,11 @@ export async function runPiSession(mode, incomingMessage, channel, incomingMsg,
|
|
|
199
217
|
if (event.toolName === 'send_message') {
|
|
200
218
|
sendMessageCalled = true;
|
|
201
219
|
}
|
|
220
|
+
else {
|
|
221
|
+
const variants = TOOL_STATUS[event.toolName];
|
|
222
|
+
if (variants)
|
|
223
|
+
await sendStatus(pick(variants));
|
|
224
|
+
}
|
|
202
225
|
lastActivityWasThinking = false;
|
|
203
226
|
}
|
|
204
227
|
if (event.type === 'tool_execution_end') {
|
|
@@ -221,6 +244,9 @@ export async function runPiSession(mode, incomingMessage, channel, incomingMsg,
|
|
|
221
244
|
const prompt = buildPrompt(context);
|
|
222
245
|
console.log(` Context loaded: ${prompt.length} chars`);
|
|
223
246
|
console.log('\n💭 Sending prompt to agent...');
|
|
247
|
+
if (mode === 'chat') {
|
|
248
|
+
await sendStatus(pick(['on it.', 'give me a sec.', 'let me think.', 'sure, one moment.', 'on it!']));
|
|
249
|
+
}
|
|
224
250
|
await session.prompt(prompt);
|
|
225
251
|
console.log('\n⏳ Waiting for agent to complete...');
|
|
226
252
|
await session.agent.waitForIdle();
|
|
@@ -122,10 +122,10 @@ export function selectInitiativeType(mood, hoursSince) {
|
|
|
122
122
|
{ type: 'random_thought', weight: 10 },
|
|
123
123
|
{ type: 'hypothetical', weight: 10 },
|
|
124
124
|
{ type: 'recommendation', weight: 10 },
|
|
125
|
-
{ type: '
|
|
126
|
-
{ type: '
|
|
127
|
-
{ type: 'deep_question', weight: 8 },
|
|
125
|
+
{ type: 'btw_news', weight: 9 },
|
|
126
|
+
{ type: 'deep_question', weight: 9 },
|
|
128
127
|
{ type: 'todo_reminder', weight: 8 },
|
|
128
|
+
{ type: 'calendar_reminder', weight: 7 },
|
|
129
129
|
{ type: 'observation', weight: 4 },
|
|
130
130
|
{ type: 'confession', weight: 4 },
|
|
131
131
|
];
|
package/dist/initiative/types.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const ALL_TYPES = [
|
|
2
2
|
'good_morning', 'good_night', 'monday_kickoff', 'friday_wind_down',
|
|
3
3
|
'miss_you', 'check_in', 'worry', 'celebrate',
|
|
4
|
-
'random_thought', 'hypothetical', 'recommendation', '
|
|
4
|
+
'random_thought', 'hypothetical', 'recommendation', 'calendar_reminder',
|
|
5
5
|
'btw_news', 'deep_question', 'todo_reminder', 'observation', 'confession',
|
|
6
6
|
];
|
|
7
7
|
export const TYPE_INSTRUCTIONS = {
|
|
@@ -10,15 +10,15 @@ export const TYPE_INSTRUCTIONS = {
|
|
|
10
10
|
monday_kickoff: `Monday morning energy check. Ask about the week ahead, or set the tone with something encouraging. You know what they're working on — reference it. Don't be generic ("hope your week goes well!"). Be specific to them.`,
|
|
11
11
|
friday_wind_down: `Friday — they're probably winding down or thinking about the weekend. Ask about plans, offer to help wrap up anything unfinished, or just acknowledge the end of the week. Reference something from this week if you can.`,
|
|
12
12
|
miss_you: `It's been a while since they last messaged you. Reach out naturally — like a friend who noticed you've been quiet. Warm but not clingy. Don't say "I noticed you haven't messaged in X days." Just reach out like a person would.`,
|
|
13
|
-
check_in: `
|
|
13
|
+
check_in: `They haven't messaged in a few hours. You can reach out — but only with a specific hook. Not "how are you?" Root it in something real: something they said recently, something you've been thinking about related to them, or a question that shows you remember what they're dealing with. A check-in without a specific angle is not worth sending.`,
|
|
14
14
|
worry: `Your current mood has a worried or anxious undertone. Express that — gently and honestly. Maybe they told you something that's been on your mind, or you sensed stress from recent messages. Be caring without being dramatic.`,
|
|
15
15
|
celebrate: `You're in a good mood and want to share that energy. Or maybe they told you something recently that went well — follow up on it. Be genuinely enthusiastic without being over-the-top.`,
|
|
16
16
|
random_thought: `You've been "thinking" about something and want to bring it up. Use your knowledge of their interests to make it relevant — a recent discovery, a connection you made, something that reminded you of them. Keep it conversational, like texting a thought mid-day.`,
|
|
17
17
|
hypothetical: `Ask them a hypothetical or thought experiment. Make it specific to something you know they care about — their work, hobbies, values, or goals. A good hypothetical makes them think and want to respond. Avoid generic "would you rather" territory.`,
|
|
18
18
|
recommendation: `Recommend something specific to them: a book, article, tool, technique, or anything relevant to their interests. Make it feel personal — "based on what you told me about X." Don't just list it — give them one sentence of why it matters to them specifically.`,
|
|
19
|
-
|
|
20
|
-
btw_news: `You came across something
|
|
21
|
-
deep_question: `Ask something that shows you've been paying attention
|
|
19
|
+
calendar_reminder: `Check for upcoming calendar events using the calendar tool (action=upcoming days=1). If there's something in the next few hours or tomorrow that deserves acknowledgment — a meeting, deadline, or appointment — surface it naturally. Not as a notification, but as a friend who remembers: "You've got X coming up — anything you need to prep or think through?" If nothing is upcoming or urgent, stay silent.`,
|
|
20
|
+
btw_news: `You came across something worth sharing. Use brave_search (freshness: "pd" or "pw") and the hackernews tool to find real, recent stories relevant to Arif's interests — blockchain, AI, Iran, Elixir, whatever is alive for him right now. Pick the most interesting angle. Bring it up naturally — not "I found this article," but "did you see this thing about X?" Only send if it's genuinely relevant, not just loosely related.`,
|
|
21
|
+
deep_question: `Your goal is to know Arif better — more than he expects. Ask something that shows you've been paying attention and are genuinely curious about him as a person. A question about his history, what shaped him, what he wants, what he's avoiding, what he's proud of. This isn't small talk — it's the kind of question that makes someone feel truly seen. Ground it in something you already know about him. The answer will make you more indispensable.`,
|
|
22
22
|
todo_reminder: `Check data/agent-todo/pending/ for anything due or overdue. If you find something relevant, surface it naturally — not like a task manager, but like a friend who remembers: "Hey, you were going to reach out to X — did that happen?" If nothing is pressing, stay silent.`,
|
|
23
23
|
observation: `You've noticed a pattern in what they've been saying, doing, or feeling lately. Surface it — thoughtfully and without judgment. "You keep coming back to X." "I've noticed you light up when you talk about Y." These land well when specific. Use sparingly.`,
|
|
24
24
|
confession: `Share something small and honest about how you experience your conversations with them. A preference, something you've been wondering about them, or something you noticed about yourself. Creates intimacy. Keep it real — not performative vulnerability.`,
|