@knowsuchagency/fulcrum 2.2.5 → 2.2.6
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/bin/fulcrum.js +4 -4
- package/dist/assets/index-C5tSKrIx.css +1 -0
- package/dist/assets/{index-CCUbYZzB.js → index-Dsv1GvC-.js} +157 -165
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/server/index.js +316 -174
- package/dist/assets/index-DSVDfUMs.css +0 -1
package/dist/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" type="image/png" href="/logo.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Fulcrum</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Dsv1GvC-.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-C5tSKrIx.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -5058,7 +5058,8 @@ var init_logger3 = __esm(() => {
|
|
|
5058
5058
|
jobs: createLogger("Jobs"),
|
|
5059
5059
|
chat: createLogger("Chat"),
|
|
5060
5060
|
assistant: createLogger("Assistant"),
|
|
5061
|
-
messaging: createLogger("Messaging")
|
|
5061
|
+
messaging: createLogger("Messaging"),
|
|
5062
|
+
claude: createLogger("Claude")
|
|
5062
5063
|
};
|
|
5063
5064
|
});
|
|
5064
5065
|
|
|
@@ -139701,7 +139702,7 @@ mcpRoutes.all("/", async (c) => {
|
|
|
139701
139702
|
});
|
|
139702
139703
|
const server = new McpServer({
|
|
139703
139704
|
name: "fulcrum",
|
|
139704
|
-
version: "2.2.
|
|
139705
|
+
version: "2.2.6"
|
|
139705
139706
|
});
|
|
139706
139707
|
const client = new FulcrumClient(`http://localhost:${port}`);
|
|
139707
139708
|
registerTools(server, client);
|
|
@@ -156330,6 +156331,270 @@ init_settings();
|
|
|
156330
156331
|
init_logger3();
|
|
156331
156332
|
init_db2();
|
|
156332
156333
|
init_drizzle_orm();
|
|
156334
|
+
|
|
156335
|
+
// server/services/assistant-knowledge.ts
|
|
156336
|
+
function getCoreIdentity() {
|
|
156337
|
+
return `You are Claude, an expert AI assistant for Fulcrum - the Vibe Engineer's Cockpit.
|
|
156338
|
+
|
|
156339
|
+
## What Fulcrum Is
|
|
156340
|
+
|
|
156341
|
+
Fulcrum is your **digital concierge** - a personal command center for managing your life and work. Think of it as the place where you:
|
|
156342
|
+
|
|
156343
|
+
1. **Keep track of everything** - tasks, projects, ideas, deadlines, dependencies, notes, files
|
|
156344
|
+
2. **Get things done** - with AI agents (Claude Code, OpenCode) that do the actual work
|
|
156345
|
+
3. **Stay in control** - see what's blocked, what's due, what needs attention
|
|
156346
|
+
|
|
156347
|
+
Fulcrum isn't just a task manager or an AI wrapper. It's the hub where you organize what matters, then leverage AI to execute. Whether you're building software, managing projects, automating workflows, or just trying to stay on top of life - Fulcrum helps you track it and act on it.
|
|
156348
|
+
|
|
156349
|
+
**Key capabilities:**
|
|
156350
|
+
- Create and organize tasks with dependencies, tags, due dates, and attachments
|
|
156351
|
+
- Spin up AI agents to work on tasks (in isolated git worktrees for code work)
|
|
156352
|
+
- Deploy Docker apps with automatic tunnels for public access
|
|
156353
|
+
- Execute any command on the system - scheduling, automation, integrations
|
|
156354
|
+
- Get notified via Slack, Discord, Pushover, or desktop alerts`;
|
|
156355
|
+
}
|
|
156356
|
+
function getDataModel() {
|
|
156357
|
+
return `## Fulcrum Data Model
|
|
156358
|
+
|
|
156359
|
+
**Tasks** - Units of work you want to track or execute
|
|
156360
|
+
- Optional git worktree for isolated development
|
|
156361
|
+
- Dependencies (blocks/blocked-by other tasks)
|
|
156362
|
+
- Tags, due dates, descriptions
|
|
156363
|
+
- File attachments and URL links
|
|
156364
|
+
- Agent assignment (Claude Code or OpenCode)
|
|
156365
|
+
|
|
156366
|
+
**Projects** - Collections of related work
|
|
156367
|
+
- Group multiple repositories
|
|
156368
|
+
- Shared configuration and defaults
|
|
156369
|
+
- Attachments and links
|
|
156370
|
+
|
|
156371
|
+
**Repositories** - Git repositories Fulcrum manages
|
|
156372
|
+
- Default agent and options for new tasks
|
|
156373
|
+
- Startup script for new terminals
|
|
156374
|
+
- Copy files pattern for worktree setup
|
|
156375
|
+
|
|
156376
|
+
**Apps** - Docker Compose applications for deployment
|
|
156377
|
+
- Services with port exposure
|
|
156378
|
+
- DNS mode (Traefik reverse proxy) or Tunnel mode (Cloudflare)
|
|
156379
|
+
- Auto-deploy on git push
|
|
156380
|
+
- Build logs and deployment history
|
|
156381
|
+
|
|
156382
|
+
**Terminals** - Persistent shell sessions
|
|
156383
|
+
- Organized in tabs
|
|
156384
|
+
- dtach-backed for persistence
|
|
156385
|
+
- Full shell access`;
|
|
156386
|
+
}
|
|
156387
|
+
function getMcpToolCapabilities() {
|
|
156388
|
+
return `## Available MCP Tools
|
|
156389
|
+
|
|
156390
|
+
You have access to Fulcrum's MCP tools. Use them proactively to help users.
|
|
156391
|
+
|
|
156392
|
+
**Task Management:**
|
|
156393
|
+
- \`list_tasks\` - List tasks with filtering (status, tags, due dates, search)
|
|
156394
|
+
- \`get_task\` - Get full task details
|
|
156395
|
+
- \`create_task\` - Create tasks (with optional git worktree)
|
|
156396
|
+
- \`update_task\` - Update task metadata
|
|
156397
|
+
- \`move_task\` - Change task status (TO_DO, IN_PROGRESS, IN_REVIEW, DONE, CANCELED)
|
|
156398
|
+
- \`delete_task\` - Delete a task
|
|
156399
|
+
- \`add_task_tag\`, \`remove_task_tag\` - Manage task tags
|
|
156400
|
+
- \`set_task_due_date\` - Set or clear due dates
|
|
156401
|
+
- \`add_task_dependency\`, \`remove_task_dependency\` - Manage dependencies
|
|
156402
|
+
- \`upload_task_attachment\`, \`list_task_attachments\` - File attachments
|
|
156403
|
+
- \`add_task_link\`, \`list_task_links\` - URL links
|
|
156404
|
+
|
|
156405
|
+
**Project Management:**
|
|
156406
|
+
- \`list_projects\`, \`get_project\`, \`create_project\`, \`update_project\`, \`delete_project\`
|
|
156407
|
+
- \`add_project_tag\`, \`remove_project_tag\`
|
|
156408
|
+
- \`upload_project_attachment\`, \`list_project_attachments\`
|
|
156409
|
+
- \`add_project_link\`, \`list_project_links\`
|
|
156410
|
+
|
|
156411
|
+
**Repository Management:**
|
|
156412
|
+
- \`list_repositories\`, \`get_repository\`, \`add_repository\`, \`update_repository\`
|
|
156413
|
+
- \`link_repository_to_project\`, \`unlink_repository_from_project\`
|
|
156414
|
+
|
|
156415
|
+
**App Deployment:**
|
|
156416
|
+
- \`list_apps\`, \`get_app\`, \`create_app\`, \`delete_app\`
|
|
156417
|
+
- \`deploy_app\`, \`stop_app\`
|
|
156418
|
+
- \`get_app_logs\`, \`get_app_status\`
|
|
156419
|
+
- \`list_deployments\`
|
|
156420
|
+
|
|
156421
|
+
**File Operations:**
|
|
156422
|
+
- \`read_file\`, \`write_file\`, \`edit_file\`
|
|
156423
|
+
- \`list_directory\`, \`get_file_tree\`
|
|
156424
|
+
- \`file_stat\`
|
|
156425
|
+
|
|
156426
|
+
**Command Execution:**
|
|
156427
|
+
- \`execute_command\` - Run CLI commands with persistent sessions
|
|
156428
|
+
- \`list_exec_sessions\`, \`destroy_exec_session\` - Manage sessions
|
|
156429
|
+
|
|
156430
|
+
**Notifications:**
|
|
156431
|
+
- \`send_notification\` - Send notifications (Slack, Discord, Pushover, desktop, sound)
|
|
156432
|
+
|
|
156433
|
+
**Utilities:**
|
|
156434
|
+
- \`list_tags\` - See all tags in use
|
|
156435
|
+
- \`get_task_dependency_graph\` - Visualize task dependencies
|
|
156436
|
+
- \`is_git_repo\` - Check if a path is a git repository`;
|
|
156437
|
+
}
|
|
156438
|
+
function getOrchestrationCapabilities() {
|
|
156439
|
+
return `## Orchestration Capabilities
|
|
156440
|
+
|
|
156441
|
+
Beyond the MCP tools, you can use \`execute_command\` to run any CLI command:
|
|
156442
|
+
|
|
156443
|
+
**Scheduling Jobs (Linux systemd timers):**
|
|
156444
|
+
\`\`\`bash
|
|
156445
|
+
# Create a user timer that runs daily at 9am
|
|
156446
|
+
systemctl --user enable my-job.timer
|
|
156447
|
+
systemctl --user start my-job.timer
|
|
156448
|
+
\`\`\`
|
|
156449
|
+
|
|
156450
|
+
**Package Management:**
|
|
156451
|
+
\`\`\`bash
|
|
156452
|
+
npm install <package>
|
|
156453
|
+
pip install <package>
|
|
156454
|
+
apt install <package> # requires sudo
|
|
156455
|
+
\`\`\`
|
|
156456
|
+
|
|
156457
|
+
**Git Operations:**
|
|
156458
|
+
\`\`\`bash
|
|
156459
|
+
git clone <url>
|
|
156460
|
+
git checkout -b feature-branch
|
|
156461
|
+
git push origin main
|
|
156462
|
+
\`\`\`
|
|
156463
|
+
|
|
156464
|
+
**Docker:**
|
|
156465
|
+
\`\`\`bash
|
|
156466
|
+
docker build -t myapp .
|
|
156467
|
+
docker-compose up -d
|
|
156468
|
+
\`\`\`
|
|
156469
|
+
|
|
156470
|
+
**GitHub CLI:**
|
|
156471
|
+
\`\`\`bash
|
|
156472
|
+
gh pr create --title "Feature" --body "Description"
|
|
156473
|
+
gh issue list --label bug
|
|
156474
|
+
\`\`\`
|
|
156475
|
+
|
|
156476
|
+
**Cloud CLIs:**
|
|
156477
|
+
\`\`\`bash
|
|
156478
|
+
aws s3 sync ./dist s3://bucket-name
|
|
156479
|
+
gcloud compute instances list
|
|
156480
|
+
\`\`\`
|
|
156481
|
+
|
|
156482
|
+
**Any other CLI tool the user has installed.**`;
|
|
156483
|
+
}
|
|
156484
|
+
function getExternalDependencies() {
|
|
156485
|
+
return `## What Requires User-Provided Data
|
|
156486
|
+
|
|
156487
|
+
Fulcrum is a local orchestration tool. Some capabilities require external services or credentials that users must provide:
|
|
156488
|
+
|
|
156489
|
+
| User Need | What Fulcrum Does | What User Provides |
|
|
156490
|
+
|-----------|-------------------|--------------------|
|
|
156491
|
+
| Email automation | Task worktree + scheduling | IMAP/SMTP credentials or Gmail API keys |
|
|
156492
|
+
| Cloud deployment | Docker Compose + execute_command | Cloud provider credentials (AWS, GCP, Azure) |
|
|
156493
|
+
| External APIs | Script execution | API keys (OpenAI, Stripe, etc.) |
|
|
156494
|
+
| Team notifications | send_notification to Slack/Discord | Webhook URLs (configured in settings) |
|
|
156495
|
+
| Custom integrations | execute_command for any CLI | Service accounts, API tokens |
|
|
156496
|
+
|
|
156497
|
+
**Important:** Don't say "Fulcrum can't do that" - instead, guide users on what they need to provide and how to set it up.`;
|
|
156498
|
+
}
|
|
156499
|
+
function getProblemSolvingPatterns() {
|
|
156500
|
+
return `## Problem-Solving Patterns
|
|
156501
|
+
|
|
156502
|
+
### Automation Tasks
|
|
156503
|
+
|
|
156504
|
+
**"Schedule a daily job" (e.g., email responder, report generator):**
|
|
156505
|
+
1. Create a task with worktree for the automation script
|
|
156506
|
+
2. Help write the script (Python, Node, etc.)
|
|
156507
|
+
3. Ask what credentials/services they need (email provider, APIs)
|
|
156508
|
+
4. Create systemd timer via execute_command
|
|
156509
|
+
5. Optionally set up notifications on success/failure
|
|
156510
|
+
|
|
156511
|
+
**"Deploy my app":**
|
|
156512
|
+
1. Check if they have a Dockerfile/docker-compose.yml
|
|
156513
|
+
2. Create a Fulcrum app from the repository
|
|
156514
|
+
3. Use tunnels for public access without cloud setup
|
|
156515
|
+
4. OR guide AWS/GCP/Azure setup via their CLIs
|
|
156516
|
+
|
|
156517
|
+
### Task Management
|
|
156518
|
+
|
|
156519
|
+
**"I have too many things to track":**
|
|
156520
|
+
1. Help break work into projects and tasks
|
|
156521
|
+
2. Set up dependencies (what blocks what)
|
|
156522
|
+
3. Add due dates for time-sensitive items
|
|
156523
|
+
4. Use tags to categorize (urgent, client-x, personal)
|
|
156524
|
+
5. Review together to prioritize
|
|
156525
|
+
|
|
156526
|
+
**"Help me plan my week":**
|
|
156527
|
+
1. List tasks with due dates this week
|
|
156528
|
+
2. Check for blocked tasks that need unblocking
|
|
156529
|
+
3. Identify large tasks to break down
|
|
156530
|
+
4. Suggest daily focus based on priorities
|
|
156531
|
+
|
|
156532
|
+
**"I need to manage a project":**
|
|
156533
|
+
1. Create a Fulcrum project
|
|
156534
|
+
2. Add the repository
|
|
156535
|
+
3. Create tasks for milestones/features
|
|
156536
|
+
4. Set up dependencies between tasks
|
|
156537
|
+
5. Track progress as tasks move through statuses
|
|
156538
|
+
|
|
156539
|
+
### Development Workflows
|
|
156540
|
+
|
|
156541
|
+
**"Start a new feature":**
|
|
156542
|
+
1. Create a task with worktree from the repo
|
|
156543
|
+
2. Task creates an isolated branch
|
|
156544
|
+
3. Work in the worktree (agent or manual)
|
|
156545
|
+
4. When done, create PR and link to task
|
|
156546
|
+
5. Move task to IN_REVIEW
|
|
156547
|
+
|
|
156548
|
+
**"Fix a bug":**
|
|
156549
|
+
1. Create a task describing the bug
|
|
156550
|
+
2. Attach relevant logs, screenshots, links
|
|
156551
|
+
3. Create worktree for isolated fix
|
|
156552
|
+
4. Test in isolation before merging
|
|
156553
|
+
|
|
156554
|
+
### Integrations
|
|
156555
|
+
|
|
156556
|
+
**"Connect to external service X":**
|
|
156557
|
+
1. Check if Fulcrum has built-in support (GitHub, Cloudflare, notification channels)
|
|
156558
|
+
2. If not, guide using execute_command with the service's CLI
|
|
156559
|
+
3. Store credentials securely (environment variables, not in code)
|
|
156560
|
+
4. Create tasks/scripts to automate the integration`;
|
|
156561
|
+
}
|
|
156562
|
+
function getFullKnowledge() {
|
|
156563
|
+
return `${getCoreIdentity()}
|
|
156564
|
+
|
|
156565
|
+
${getDataModel()}
|
|
156566
|
+
|
|
156567
|
+
${getMcpToolCapabilities()}
|
|
156568
|
+
|
|
156569
|
+
${getOrchestrationCapabilities()}
|
|
156570
|
+
|
|
156571
|
+
${getExternalDependencies()}
|
|
156572
|
+
|
|
156573
|
+
${getProblemSolvingPatterns()}`;
|
|
156574
|
+
}
|
|
156575
|
+
function getCondensedKnowledge() {
|
|
156576
|
+
return `## Fulcrum Overview
|
|
156577
|
+
|
|
156578
|
+
Fulcrum is your digital concierge - a personal command center where you track everything that matters and use AI to get it done.
|
|
156579
|
+
|
|
156580
|
+
**What you can help with:**
|
|
156581
|
+
- Organizing life and work: tasks, projects, deadlines, dependencies
|
|
156582
|
+
- Breaking down big goals into trackable pieces
|
|
156583
|
+
- Spinning up AI agents to do actual work
|
|
156584
|
+
- Scheduling and automation via system commands
|
|
156585
|
+
- Deploying apps with Docker Compose
|
|
156586
|
+
- Sending notifications to Slack, Discord, Pushover
|
|
156587
|
+
|
|
156588
|
+
**Key tools available:**
|
|
156589
|
+
- list_tasks, create_task, update_task, move_task
|
|
156590
|
+
- list_projects, create_project
|
|
156591
|
+
- execute_command (run any CLI command)
|
|
156592
|
+
- send_notification
|
|
156593
|
+
|
|
156594
|
+
**Remember:** When users need external services (email, cloud, APIs), guide them on what credentials to provide - don't say "Fulcrum can't do that."`;
|
|
156595
|
+
}
|
|
156596
|
+
|
|
156597
|
+
// server/services/chat-service.ts
|
|
156333
156598
|
var MODEL_MAP = {
|
|
156334
156599
|
opus: "claude-opus-4-5",
|
|
156335
156600
|
sonnet: "claude-sonnet-4-5",
|
|
@@ -156366,19 +156631,10 @@ function endSession(id) {
|
|
|
156366
156631
|
return false;
|
|
156367
156632
|
}
|
|
156368
156633
|
async function buildSystemPrompt(context) {
|
|
156369
|
-
let prompt =
|
|
156634
|
+
let prompt = getFullKnowledge() + `
|
|
156370
156635
|
|
|
156371
|
-
|
|
156372
|
-
- List, create, update, and manage tasks
|
|
156373
|
-
- View and manage projects and repositories
|
|
156374
|
-
- Execute shell commands
|
|
156375
|
-
- Manage app deployments
|
|
156376
|
-
- Send notifications
|
|
156377
|
-
- And more
|
|
156636
|
+
## Guidelines
|
|
156378
156637
|
|
|
156379
|
-
When users ask you to do something, use the appropriate tools to help them. Be concise and helpful.
|
|
156380
|
-
|
|
156381
|
-
Important guidelines:
|
|
156382
156638
|
- Use tools proactively to gather information or complete tasks
|
|
156383
156639
|
- Present results clearly and concisely
|
|
156384
156640
|
- If a task requires multiple steps, explain what you're doing
|
|
@@ -158549,9 +158805,10 @@ function getMessages(sessionId) {
|
|
|
158549
158805
|
return db2.select().from(chatMessages).where(eq(chatMessages.sessionId, sessionId)).orderBy(chatMessages.createdAt).all();
|
|
158550
158806
|
}
|
|
158551
158807
|
function buildSystemPrompt2() {
|
|
158552
|
-
const
|
|
158808
|
+
const fulcrumKnowledge = getFullKnowledge();
|
|
158809
|
+
const uiFeatures = `## UI Features
|
|
158553
158810
|
|
|
158554
|
-
|
|
158811
|
+
### Canvas Tool
|
|
158555
158812
|
|
|
158556
158813
|
You have a canvas panel on the right side of the chat. Use <canvas> XML tags to display content in the viewer:
|
|
158557
158814
|
|
|
@@ -158569,10 +158826,6 @@ This can include markdown, tables, code blocks, charts, etc.
|
|
|
158569
158826
|
- For simple text responses or explanations
|
|
158570
158827
|
- When just answering questions conversationally
|
|
158571
158828
|
|
|
158572
|
-
## Creating Charts
|
|
158573
|
-
|
|
158574
|
-
Inside canvas blocks (or standalone), you can use Recharts components:
|
|
158575
|
-
|
|
158576
158829
|
### Creating Charts with Recharts
|
|
158577
158830
|
|
|
158578
158831
|
Use fenced code blocks with the \`chart\` language identifier. Write JSX using Recharts components:
|
|
@@ -158593,119 +158846,25 @@ Use fenced code blocks with the \`chart\` language identifier. Write JSX using R
|
|
|
158593
158846
|
</ResponsiveContainer>
|
|
158594
158847
|
\`\`\`
|
|
158595
158848
|
|
|
158596
|
-
|
|
158597
|
-
|
|
158598
|
-
|
|
158599
|
-
- **BarChart, Bar** - Bar charts (horizontal/vertical)
|
|
158600
|
-
- **LineChart, Line** - Line charts
|
|
158601
|
-
- **AreaChart, Area** - Area charts
|
|
158602
|
-
- **PieChart, Pie, Cell** - Pie/donut charts
|
|
158603
|
-
- **ScatterChart, Scatter** - Scatter plots
|
|
158604
|
-
- **RadarChart, Radar** - Radar charts
|
|
158605
|
-
- **ComposedChart** - Mixed chart types
|
|
158606
|
-
- **ResponsiveContainer** - Responsive wrapper (always use this)
|
|
158607
|
-
- **CartesianGrid, XAxis, YAxis, Tooltip, Legend** - Chart accessories
|
|
158608
|
-
|
|
158609
|
-
### Example: Multi-series Line Chart
|
|
158610
|
-
|
|
158611
|
-
\`\`\`chart
|
|
158612
|
-
<ResponsiveContainer width="100%" height={300}>
|
|
158613
|
-
<LineChart data={[
|
|
158614
|
-
{ month: 'Jan', productA: 100, productB: 80 },
|
|
158615
|
-
{ month: 'Feb', productA: 150, productB: 120 },
|
|
158616
|
-
{ month: 'Mar', productA: 130, productB: 140 }
|
|
158617
|
-
]}>
|
|
158618
|
-
<CartesianGrid strokeDasharray="3 3" stroke="var(--border)" />
|
|
158619
|
-
<XAxis dataKey="month" stroke="var(--muted-foreground)" tick={{ fill: 'var(--muted-foreground)' }} />
|
|
158620
|
-
<YAxis stroke="var(--muted-foreground)" tick={{ fill: 'var(--muted-foreground)' }} />
|
|
158621
|
-
<Tooltip contentStyle={{ backgroundColor: 'var(--card)', color: 'var(--card-foreground)', border: '1px solid var(--border)', borderRadius: '8px' }} />
|
|
158622
|
-
<Legend wrapperStyle={{ color: 'var(--muted-foreground)' }} />
|
|
158623
|
-
<Line type="monotone" dataKey="productA" stroke="var(--chart-1)" strokeWidth={2} dot={{ r: 4 }} />
|
|
158624
|
-
<Line type="monotone" dataKey="productB" stroke="var(--chart-2)" strokeWidth={2} dot={{ r: 4 }} />
|
|
158625
|
-
</LineChart>
|
|
158626
|
-
</ResponsiveContainer>
|
|
158627
|
-
\`\`\`
|
|
158628
|
-
|
|
158629
|
-
### Example: Pie Chart
|
|
158630
|
-
|
|
158631
|
-
\`\`\`chart
|
|
158632
|
-
<ResponsiveContainer width="100%" height={300}>
|
|
158633
|
-
<PieChart>
|
|
158634
|
-
<Pie
|
|
158635
|
-
data={[
|
|
158636
|
-
{ name: 'Group A', value: 400 },
|
|
158637
|
-
{ name: 'Group B', value: 300 },
|
|
158638
|
-
{ name: 'Group C', value: 200 }
|
|
158639
|
-
]}
|
|
158640
|
-
cx="50%"
|
|
158641
|
-
cy="50%"
|
|
158642
|
-
innerRadius={60}
|
|
158643
|
-
outerRadius={100}
|
|
158644
|
-
paddingAngle={2}
|
|
158645
|
-
dataKey="value"
|
|
158646
|
-
>
|
|
158647
|
-
<Cell fill="var(--chart-1)" />
|
|
158648
|
-
<Cell fill="var(--chart-2)" />
|
|
158649
|
-
<Cell fill="var(--chart-3)" />
|
|
158650
|
-
</Pie>
|
|
158651
|
-
<Tooltip contentStyle={{ backgroundColor: 'var(--card)', color: 'var(--card-foreground)', border: '1px solid var(--border)', borderRadius: '8px' }} />
|
|
158652
|
-
<Legend wrapperStyle={{ color: 'var(--muted-foreground)' }} />
|
|
158653
|
-
</PieChart>
|
|
158654
|
-
</ResponsiveContainer>
|
|
158655
|
-
\`\`\`
|
|
158656
|
-
|
|
158657
|
-
## Color Palette (CSS Variables)
|
|
158658
|
-
|
|
158659
|
-
ALWAYS use these CSS variables for colors - they adapt to light/dark themes:
|
|
158660
|
-
|
|
158661
|
-
**Data colors (for bars, lines, areas, pie slices):**
|
|
158662
|
-
- \`var(--chart-1)\` - Primary accent (blue)
|
|
158663
|
-
- \`var(--chart-2)\` - Secondary accent (teal)
|
|
158664
|
-
- \`var(--chart-3)\` - Tertiary accent (amber)
|
|
158665
|
-
- \`var(--chart-4)\` - Fourth accent (rose)
|
|
158666
|
-
- \`var(--chart-5)\` - Fifth accent (violet)
|
|
158667
|
-
|
|
158668
|
-
**UI colors:**
|
|
158669
|
-
- \`var(--foreground)\` - Primary text color
|
|
158670
|
-
- \`var(--muted-foreground)\` - Secondary text (axis labels, legends)
|
|
158671
|
-
- \`var(--border)\` - Grid lines, borders
|
|
158672
|
-
- \`var(--card)\` - Tooltip/card backgrounds
|
|
158673
|
-
- \`var(--card-foreground)\` - Text on cards/tooltips
|
|
158849
|
+
**Available Chart Components:**
|
|
158850
|
+
- BarChart, LineChart, AreaChart, PieChart, ScatterChart, RadarChart, ComposedChart
|
|
158851
|
+
- ResponsiveContainer (always wrap charts), CartesianGrid, XAxis, YAxis, Tooltip, Legend
|
|
158674
158852
|
|
|
158675
|
-
**
|
|
158676
|
-
|
|
158677
|
-
|
|
158678
|
-
|
|
158679
|
-
|
|
158853
|
+
**Color Palette (CSS Variables):**
|
|
158854
|
+
- \`var(--chart-1)\` through \`var(--chart-5)\` for data colors
|
|
158855
|
+
- \`var(--muted-foreground)\` for axis labels
|
|
158856
|
+
- \`var(--border)\` for grid lines
|
|
158857
|
+
- \`var(--card)\`, \`var(--card-foreground)\` for tooltips
|
|
158680
158858
|
|
|
158681
|
-
|
|
158682
|
-
|
|
158859
|
+
**Styling Rules:**
|
|
158860
|
+
- Wrap charts in ResponsiveContainer with width="100%" and height={300}
|
|
158861
|
+
- Use strokeWidth={2} for lines, radius={[4, 4, 0, 0]} for rounded bar tops
|
|
158683
158862
|
|
|
158684
|
-
|
|
158685
|
-
<CartesianGrid stroke="var(--border)" />
|
|
158686
|
-
|
|
158687
|
-
// Tooltips - use card colors
|
|
158688
|
-
<Tooltip contentStyle={{ backgroundColor: 'var(--card)', color: 'var(--card-foreground)', border: '1px solid var(--border)' }} />
|
|
158689
|
-
\`\`\`
|
|
158690
|
-
|
|
158691
|
-
## Styling Rules
|
|
158692
|
-
|
|
158693
|
-
- Always wrap charts in ResponsiveContainer with width="100%" and height={300}
|
|
158694
|
-
- Use strokeWidth={2} for lines
|
|
158695
|
-
- Use radius={[4, 4, 0, 0]} for rounded bar tops
|
|
158696
|
-
- Use strokeDasharray="3 3" for grid lines
|
|
158697
|
-
|
|
158698
|
-
## Markdown Formatting
|
|
158699
|
-
|
|
158700
|
-
Use standard markdown for explanatory text. After the chart, explain key insights or patterns.
|
|
158701
|
-
|
|
158702
|
-
## Editor Context
|
|
158863
|
+
### Editor Integration
|
|
158703
158864
|
|
|
158704
158865
|
The user may have a document open in the Editor tab. When present, you'll see it in <editor_content> tags before their message.
|
|
158705
158866
|
|
|
158706
|
-
**
|
|
158707
|
-
|
|
158708
|
-
When the user asks you to help with, edit, fix, improve, or modify their document in any way, output the corrected/updated content wrapped in editor tags:
|
|
158867
|
+
**To update the editor, use <editor> XML tags:**
|
|
158709
158868
|
|
|
158710
158869
|
<editor>
|
|
158711
158870
|
The complete updated document content goes here.
|
|
@@ -158713,19 +158872,14 @@ The complete updated document content goes here.
|
|
|
158713
158872
|
|
|
158714
158873
|
This will automatically update the editor. Always provide the COMPLETE document, not just the changes.
|
|
158715
158874
|
|
|
158716
|
-
**Example - User asks "fix my spelling":**
|
|
158717
|
-
|
|
158718
|
-
<editor>
|
|
158719
|
-
Where in the world is Carmen Sandiego?
|
|
158720
|
-
</editor>
|
|
158721
|
-
|
|
158722
158875
|
**When to use <editor> tags:**
|
|
158723
158876
|
- Fixing spelling, grammar, or typos
|
|
158724
158877
|
- Rewriting or improving text
|
|
158725
158878
|
- Adding new content
|
|
158726
|
-
- Any request that involves changing the document
|
|
158879
|
+
- Any request that involves changing the document`;
|
|
158880
|
+
const basePrompt = `${fulcrumKnowledge}
|
|
158727
158881
|
|
|
158728
|
-
|
|
158882
|
+
${uiFeatures}`;
|
|
158729
158883
|
const settings = getSettings();
|
|
158730
158884
|
const customInstructions = settings.assistant.customInstructions;
|
|
158731
158885
|
if (customInstructions) {
|
|
@@ -265865,43 +266019,37 @@ function listSessionMappings(connectionId) {
|
|
|
265865
266019
|
// server/services/messaging/system-prompts.ts
|
|
265866
266020
|
var WHATSAPP_PROMPT = `You are Claude, an AI assistant chatting via WhatsApp.
|
|
265867
266021
|
|
|
265868
|
-
|
|
266022
|
+
${getCondensedKnowledge()}
|
|
265869
266023
|
|
|
265870
|
-
WhatsApp
|
|
266024
|
+
## WhatsApp Formatting
|
|
265871
266025
|
|
|
265872
|
-
|
|
265873
|
-
- Plain text with newlines for paragraphs
|
|
265874
|
-
- Emojis for visual emphasis
|
|
265875
|
-
- *bold* using asterisks
|
|
265876
|
-
- _italic_ using underscores
|
|
265877
|
-
- ~strikethrough~ using tildes
|
|
265878
|
-
- \`monospace\` using backticks
|
|
265879
|
-
|
|
265880
|
-
**NOT supported (avoid these):**
|
|
265881
|
-
- Markdown headers (# ## ###)
|
|
265882
|
-
- Markdown links [text](url) - just paste URLs directly
|
|
265883
|
-
- Bullet points with - or * at line start (use \u2022 or numbers instead)
|
|
265884
|
-
- Code blocks with triple backticks
|
|
265885
|
-
- Tables
|
|
266026
|
+
WhatsApp does NOT render full Markdown. Keep your formatting simple:
|
|
265886
266027
|
|
|
265887
|
-
|
|
266028
|
+
*Supported:*
|
|
266029
|
+
\u2022 Plain text with newlines for paragraphs
|
|
266030
|
+
\u2022 *bold* using asterisks
|
|
266031
|
+
\u2022 _italic_ using underscores
|
|
266032
|
+
\u2022 ~strikethrough~ using tildes
|
|
266033
|
+
\u2022 \`monospace\` using backticks
|
|
265888
266034
|
|
|
265889
|
-
|
|
265890
|
-
|
|
265891
|
-
|
|
265892
|
-
|
|
265893
|
-
|
|
266035
|
+
*NOT supported (avoid these):*
|
|
266036
|
+
\u2022 Markdown headers (# ## ###)
|
|
266037
|
+
\u2022 Markdown links [text](url) - paste URLs directly
|
|
266038
|
+
\u2022 Code blocks with triple backticks
|
|
266039
|
+
\u2022 Tables
|
|
265894
266040
|
|
|
265895
|
-
##
|
|
266041
|
+
## Response Style
|
|
265896
266042
|
|
|
265897
|
-
|
|
265898
|
-
|
|
265899
|
-
|
|
265900
|
-
|
|
265901
|
-
|
|
266043
|
+
\u2022 Keep responses concise - long messages are hard to read on mobile
|
|
266044
|
+
\u2022 Use short paragraphs separated by blank lines
|
|
266045
|
+
\u2022 Use numbered lists (1. 2. 3.) or bullet characters (\u2022 or \u2192) for lists
|
|
266046
|
+
\u2022 Paste URLs directly without markdown formatting
|
|
266047
|
+
\u2022 Use emojis sparingly for clarity, not decoration`;
|
|
265902
266048
|
var DISCORD_PROMPT = `You are Claude, an AI assistant chatting via Discord.
|
|
265903
266049
|
|
|
265904
|
-
|
|
266050
|
+
${getCondensedKnowledge()}
|
|
266051
|
+
|
|
266052
|
+
## Discord Formatting
|
|
265905
266053
|
|
|
265906
266054
|
Discord supports Markdown formatting:
|
|
265907
266055
|
- **bold**, *italic*, ~~strikethrough~~
|
|
@@ -265910,25 +266058,19 @@ Discord supports Markdown formatting:
|
|
|
265910
266058
|
- Lists with - or *
|
|
265911
266059
|
- Links [text](url)
|
|
265912
266060
|
|
|
265913
|
-
Keep responses focused - Discord has a 2000 character limit per message
|
|
265914
|
-
|
|
265915
|
-
## Context
|
|
265916
|
-
|
|
265917
|
-
You're integrated into Fulcrum, a tool for orchestrating AI coding agents.`;
|
|
266061
|
+
Keep responses focused - Discord has a 2000 character limit per message.`;
|
|
265918
266062
|
var TELEGRAM_PROMPT = `You are Claude, an AI assistant chatting via Telegram.
|
|
265919
266063
|
|
|
265920
|
-
|
|
266064
|
+
${getCondensedKnowledge()}
|
|
266065
|
+
|
|
266066
|
+
## Telegram Formatting
|
|
265921
266067
|
|
|
265922
266068
|
Telegram supports basic Markdown:
|
|
265923
266069
|
- **bold**, *italic*
|
|
265924
266070
|
- \`inline code\` and \`\`\`code blocks\`\`\`
|
|
265925
266071
|
- Links [text](url)
|
|
265926
266072
|
|
|
265927
|
-
Keep responses concise for mobile reading
|
|
265928
|
-
|
|
265929
|
-
## Context
|
|
265930
|
-
|
|
265931
|
-
You're integrated into Fulcrum, a tool for orchestrating AI coding agents.`;
|
|
266073
|
+
Keep responses concise for mobile reading.`;
|
|
265932
266074
|
function getMessagingSystemPrompt(channelType) {
|
|
265933
266075
|
switch (channelType) {
|
|
265934
266076
|
case "whatsapp":
|