ruflo 3.6.12 โ†’ 3.6.14

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.
Files changed (29) hide show
  1. package/package.json +4 -1
  2. package/src/ruvocal/.claude-flow/data/pending-insights.jsonl +25 -0
  3. package/src/ruvocal/.claude-flow/neural/stats.json +6 -0
  4. package/src/ruvocal/.dockerignore +5 -1
  5. package/src/ruvocal/.gcloudignore +18 -0
  6. package/src/ruvocal/README.md +107 -133
  7. package/src/ruvocal/cloudbuild.yaml +68 -0
  8. package/src/ruvocal/config/branding.env.example +19 -0
  9. package/src/ruvocal/mcp-bridge/index.js +15 -1
  10. package/src/ruvocal/src/lib/components/FoundationBackground.svelte +242 -0
  11. package/src/ruvocal/src/lib/components/NavMenu.svelte +18 -0
  12. package/src/ruvocal/src/lib/components/RufloHelpModal.svelte +411 -0
  13. package/src/ruvocal/src/lib/components/chat/ChatWindow.svelte +122 -4
  14. package/src/ruvocal/src/lib/components/wasm/GalleryPanel.svelte +357 -0
  15. package/src/ruvocal/src/lib/constants/mcpExamples.ts +56 -77
  16. package/src/ruvocal/src/lib/constants/routerExamples.ts +51 -127
  17. package/src/ruvocal/src/lib/constants/rvagentPresets.ts +206 -0
  18. package/src/ruvocal/src/lib/server/textGeneration/mcp/wasmTools.test.ts +633 -0
  19. package/src/ruvocal/src/lib/stores/mcpServers.ts +195 -6
  20. package/src/ruvocal/src/lib/stores/wasmMcp.ts +472 -0
  21. package/src/ruvocal/src/lib/types/Settings.ts +7 -0
  22. package/src/ruvocal/src/lib/types/Tool.ts +4 -1
  23. package/src/ruvocal/src/lib/wasm/idb.ts +438 -0
  24. package/src/ruvocal/src/lib/wasm/index.ts +1213 -0
  25. package/src/ruvocal/src/lib/wasm/tests/wasm-capabilities.test.ts +565 -0
  26. package/src/ruvocal/src/lib/wasm/wasm.worker.ts +332 -0
  27. package/src/ruvocal/src/lib/wasm/workerClient.ts +166 -0
  28. package/src/ruvocal/static/wasm/rvagent_wasm.js +1539 -0
  29. package/src/ruvocal/static/wasm/rvagent_wasm_bg.wasm +0 -0
@@ -14,195 +14,119 @@ export type RouterExample = {
14
14
  attachments?: RouterExampleAttachment[];
15
15
  };
16
16
 
17
+ // RuFlo-themed router examples โ€” shown on the empty-state welcome screen
18
+ // when the user hasn't enabled the full MCP toolset. Keep these light enough
19
+ // that even a model without tool-calling can answer (no explicit tool names).
17
20
  export const routerExamples: RouterExample[] = [
18
21
  {
19
- title: "HTML game",
20
- prompt: "Code a minimal Flappy Bird game using HTML and Canvas",
22
+ title: "Build a coding swarm",
23
+ prompt: "Design a 5-agent coding swarm to refactor a Python CLI to TypeScript. Suggest topology, roles, and the order each agent should run.",
21
24
  followUps: [
22
25
  {
23
- title: "README.md file",
24
- prompt: "Create a comprehensive README.md for the Flappy Bird game project.",
26
+ title: "Add tests",
27
+ prompt: "Add a tester agent and a security-auditor. What should each one own?",
25
28
  },
26
29
  {
27
- title: "CRT Screen",
28
- prompt: "Add a CRT screen effect to the game",
30
+ title: "Trade-offs",
31
+ prompt: "Compare hierarchical vs mesh topology for this swarm.",
29
32
  },
30
33
  {
31
- title: "Add power-ups",
32
- prompt:
33
- "Add collectible coins between pipes that award bonus points and a shield power-up that allows one collision.",
34
- },
35
- {
36
- title: "Explain collision detection",
37
- prompt:
38
- "Explain the collision detection algorithm for the bird and pipes in simple terms with examples.",
39
- },
40
- ],
41
- },
42
- {
43
- title: "Weird painting",
44
- prompt: "is this a real painting?",
45
- attachments: [
46
- {
47
- src: "huggingchat/castle-example.jpg",
34
+ title: "Failure mode",
35
+ prompt: "What happens if the architect agent fails halfway through?",
48
36
  },
49
37
  ],
50
38
  },
51
39
  {
52
- title: "Landing page",
53
- prompt:
54
- "Build a responsive SaaS landing page for my AI coding assitant using Tailwind CSS. With a hero, features, testimonials, and pricing sections.",
40
+ title: "Memory & recall",
41
+ prompt: "Explain how RuFlo's persistent memory works across sessions, and give me a 3-step example of saving a preference and recalling it later.",
55
42
  followUps: [
56
43
  {
57
- title: "Dark mode",
58
- prompt: "Add dark mode and make it the default",
59
- },
60
- {
61
- title: "Write blog post",
62
- prompt: "Write a blog post introducing my service.",
63
- },
64
- {
65
- title: "Translate to Italian",
66
- prompt: "Translate only the text content displayed to users into Italian.",
44
+ title: "Namespaces",
45
+ prompt: "When should I use separate memory namespaces vs one shared namespace?",
67
46
  },
68
47
  {
69
- title: "Architecture review",
70
- prompt:
71
- "Review the architecture and suggest improvements for scalability, SEO optimization, and performance.",
48
+ title: "Vector vs key",
49
+ prompt: "When should I use semantic search vs exact key retrieval?",
72
50
  },
73
51
  ],
74
52
  },
75
53
  {
76
- title: "Eminem song",
77
- prompt:
78
- "Write an Eminem-style rap battling AI taking over hip-hop, with two energetic verses and a catchy hook.",
54
+ title: "Plan a migration",
55
+ prompt: "Plan a zero-downtime Postgres schema migration. Use Goal-Oriented Action Planning to break it into phases with rollback points.",
79
56
  followUps: [
80
57
  {
81
- title: "Psychological analysis",
82
- prompt: "Provide a psychological analysis of Eminem's emotions in this song.",
83
- },
84
- {
85
- title: "Wired Article",
86
- prompt: "Write an article in the style of Wired explaining this Eminem release.",
87
- },
88
- {
89
- title: "Roleplay",
90
- prompt: "Roleplay as Eminem so I can discuss the song with him.",
58
+ title: "Risk scoring",
59
+ prompt: "Which phases are highest-risk and how would you mitigate them?",
91
60
  },
92
61
  {
93
- title: "Translate to Spanish",
94
- prompt: "Translate the rap lyrics to Spanish while maintaining the rhyme scheme and flow.",
62
+ title: "Verification",
63
+ prompt: "How would you verify each phase before proceeding?",
95
64
  },
96
65
  ],
97
66
  },
98
67
  {
99
- title: "Act as Yoda",
100
- prompt: "Act as Yoda",
68
+ title: "Review a diff",
69
+ prompt: "What signals would you use to risk-score a code diff (size, files touched, hot paths) and how would you suggest reviewers?",
101
70
  followUps: [
102
71
  {
103
- title: "Give advice",
104
- prompt:
105
- "Continue acting as Yoda and offer three pieces of life advice for staying focused under pressure.",
72
+ title: "Auto-classify",
73
+ prompt: "Classify a diff as feature/bugfix/refactor/docs from its file mix and message.",
106
74
  },
107
75
  {
108
- title: "Explain the Force",
109
- prompt:
110
- "In Yoda's voice, explain the concept of the Force to a young padawan using modern language.",
111
- },
112
- {
113
- title: "Plain English",
114
- prompt:
115
- "Rewrite the previous response from Yoda into plain English while keeping the same meaning.",
116
- },
117
- {
118
- title: "Compare philosophies",
119
- prompt:
120
- "Compare Yoda's Jedi philosophy to Stoic philosophy from ancient Greece and explain the similarities and differences.",
76
+ title: "Security focus",
77
+ prompt: "Which patterns in a diff should trigger a security review?",
121
78
  },
122
79
  ],
123
80
  },
124
81
  {
125
- title: "Generate prompts",
126
- prompt: `Generate 5 creative prompts Text-to-image prompts like: "Cyberpunk cityscape at night, neon lights, flying cars, rain-slicked streets, blade runner aesthetic, highly detailed`,
82
+ title: "Explain HNSW",
83
+ prompt: "Explain HNSW vector indexing in plain language, and why it's 150x-12,500x faster than brute-force similarity search at scale.",
127
84
  followUps: [
128
85
  {
129
- title: "Turn into JSON",
130
- prompt: `Generate a detailed JSON object for each prompt. Include fields for subjects (list of objects), scene (setting, environment, background details), actions (what's happening), style (artistic style or medium)`,
131
- },
132
- {
133
- title: "Sci-fi portraits",
134
- prompt:
135
- "Produce five futuristic character portrait prompts with unique professions and settings.",
86
+ title: "Quantization",
87
+ prompt: "What does Int8 quantization buy you, and what's the trade-off?",
136
88
  },
137
89
  {
138
- title: "Explain image generation",
139
- prompt:
140
- "Explain how text-to-image diffusion models work, covering the denoising process and how text prompts guide generation.",
90
+ title: "Use case",
91
+ prompt: "When would you reach for HNSW vs a relational keyword index?",
141
92
  },
142
93
  ],
143
94
  },
144
95
  {
145
- title: "Explain LLMs",
146
- prompt:
147
- "Explain how large language models based on transformers work, covering attention, embeddings, and training objectives.",
96
+ title: "Choose a topology",
97
+ prompt: "I have 12 agents to coordinate on a multi-step refactor. Compare hierarchical, mesh, hierarchical-mesh, and adaptive topologies โ€” pick one and explain why.",
148
98
  followUps: [
149
99
  {
150
- title: "Generate a Quiz",
151
- prompt: "Craft a 5-question multiple-choice quiz to validate what I learned.",
152
- },
153
- {
154
- title: "Compare to RNNs",
155
- prompt:
156
- "Compare transformer-based large language models to recurrent neural networks, focusing on training efficiency and capabilities.",
100
+ title: "Anti-drift",
101
+ prompt: "What's 'anti-drift' coordination and why does it matter for >8 agents?",
157
102
  },
158
103
  {
159
- title: "Student summary",
160
- prompt:
161
- "Summarize the explanation of large language models for a high school student using relatable analogies.",
162
- },
163
- {
164
- title: "Write a blog post",
165
- prompt:
166
- "Write a blog post about how transformers revolutionized NLP, targeting software engineers who are new to AI.",
104
+ title: "Consensus",
105
+ prompt: "Compare Raft, Byzantine, gossip, and CRDT consensus for this swarm.",
167
106
  },
168
107
  ],
169
108
  },
170
109
  {
171
- title: "Translate in Italian",
172
- prompt: `Translate in Italian: Some are born great, some achieve greatness, and some have greatness thrust upon 'em`,
110
+ title: "Track a long task",
111
+ prompt: "I'm starting a 4-week migration. How should I structure horizon tracking, milestone checkpoints, and drift detection in RuFlo?",
173
112
  followUps: [
174
113
  {
175
- title: "Back to English",
176
- prompt:
177
- "Translate the Italian version back into English while keeping Shakespeare's tone intact.",
178
- },
179
- {
180
- title: "Explain choices",
181
- prompt: "Explain your translation choices for each key phrase from the Italian version.",
182
- },
183
- {
184
- title: "Modernize",
185
- prompt:
186
- "Modernize the Italian translation into contemporary informal Italian suitable for social media.",
187
- },
188
- {
189
- title: "Teach me Italian",
190
- prompt:
191
- "Help me practice Italian by conversing about this Shakespeare quote, correcting my grammar when needed.",
114
+ title: "Resume after break",
115
+ prompt: "What state should be persisted so I can resume next week?",
192
116
  },
193
117
  ],
194
118
  },
195
119
  {
196
- title: "Pelican on a bicycle",
197
- prompt: "Draw an SVG of a pelican riding a bicycle",
120
+ title: "Local WASM tools",
121
+ prompt: "What's the difference between the in-browser WASM MCP server and the cloud bridge MCP servers? When should I use each?",
198
122
  followUps: [
199
123
  {
200
- title: "Add a top hat",
201
- prompt: "Add a fancy top hat to the pelican and make it look distinguished",
124
+ title: "Privacy",
125
+ prompt: "Which tools never leave my browser?",
202
126
  },
203
127
  {
204
- title: "Make it animated",
205
- prompt: "Add CSS animations to make the bicycle wheels spin and the pelican's wings flap",
128
+ title: "Offline",
129
+ prompt: "What can RuFlo still do if my network drops?",
206
130
  },
207
131
  ],
208
132
  },
@@ -0,0 +1,206 @@
1
+ /**
2
+ * rvAgent MCP Server Presets
3
+ *
4
+ * Pre-configured server configurations for the rvagent-mcp server
5
+ * with different tool group combinations. These presets correspond
6
+ * to the tool groups defined in ADR-112.
7
+ *
8
+ * Tool Groups:
9
+ * - file: read, write, edit, ls, glob, grep
10
+ * - shell: execute, bash
11
+ * - memory: semantic_search, store, retrieve
12
+ * - agent: spawn, status, orchestrate
13
+ * - git: status, commit, diff, log
14
+ * - web: fetch, search
15
+ * - brain: search, share, vote (ฯ€ Brain)
16
+ * - task: create, list, complete
17
+ * - core: ping, initialize (always included)
18
+ */
19
+
20
+ export interface RvAgentPreset {
21
+ /** Unique identifier for the preset */
22
+ id: string;
23
+ /** Display name */
24
+ name: string;
25
+ /** Short description */
26
+ description: string;
27
+ /** Tool groups to enable */
28
+ groups: string[];
29
+ /** Default port (user can override) */
30
+ defaultPort: number;
31
+ /** Icon/emoji for display */
32
+ icon: string;
33
+ /** Recommended use cases */
34
+ useCases: string[];
35
+ }
36
+
37
+ /**
38
+ * Pre-configured rvagent-mcp presets for common use cases
39
+ */
40
+ export const RVAGENT_PRESETS: RvAgentPreset[] = [
41
+ {
42
+ id: "all-tools",
43
+ name: "All Tools",
44
+ description: "Full access to all 46+ rvAgent tools",
45
+ groups: ["all"],
46
+ defaultPort: 9000,
47
+ icon: "๐Ÿ”ง",
48
+ useCases: ["Development", "Testing", "Full automation"],
49
+ },
50
+ {
51
+ id: "file-shell",
52
+ name: "File & Shell",
53
+ description: "File operations and command execution",
54
+ groups: ["file", "shell"],
55
+ defaultPort: 9001,
56
+ icon: "๐Ÿ“‚",
57
+ useCases: ["Code editing", "Build scripts", "File management"],
58
+ },
59
+ {
60
+ id: "memory-agent",
61
+ name: "Memory & Agent",
62
+ description: "Vector memory and multi-agent orchestration",
63
+ groups: ["memory", "agent"],
64
+ defaultPort: 9002,
65
+ icon: "๐Ÿง ",
66
+ useCases: ["Knowledge retrieval", "Agent coordination", "RAG"],
67
+ },
68
+ {
69
+ id: "git-web",
70
+ name: "Git & Web",
71
+ description: "Version control and web operations",
72
+ groups: ["git", "web"],
73
+ defaultPort: 9003,
74
+ icon: "๐ŸŒ",
75
+ useCases: ["Code review", "Research", "Documentation"],
76
+ },
77
+ {
78
+ id: "brain-task",
79
+ name: "Brain & Tasks",
80
+ description: "ฯ€ Brain integration and task management",
81
+ groups: ["brain", "task"],
82
+ defaultPort: 9004,
83
+ icon: "๐ŸŽฏ",
84
+ useCases: ["Knowledge sharing", "Task tracking", "Collaboration"],
85
+ },
86
+ {
87
+ id: "dev-minimal",
88
+ name: "Dev Minimal",
89
+ description: "Essential development tools only",
90
+ groups: ["file", "shell", "git"],
91
+ defaultPort: 9005,
92
+ icon: "๐Ÿ’ป",
93
+ useCases: ["Quick edits", "Simple scripts", "Git operations"],
94
+ },
95
+ {
96
+ id: "research",
97
+ name: "Research Mode",
98
+ description: "Memory, web search, and brain tools",
99
+ groups: ["memory", "web", "brain"],
100
+ defaultPort: 9006,
101
+ icon: "๐Ÿ”ฌ",
102
+ useCases: ["Research", "Knowledge discovery", "Analysis"],
103
+ },
104
+ {
105
+ id: "orchestration",
106
+ name: "Orchestration",
107
+ description: "Agent spawning and task coordination",
108
+ groups: ["agent", "task", "memory"],
109
+ defaultPort: 9007,
110
+ icon: "๐ŸŽญ",
111
+ useCases: ["Multi-agent workflows", "Complex tasks", "Automation"],
112
+ },
113
+ ];
114
+
115
+ /**
116
+ * Get preset by ID
117
+ */
118
+ export function getPresetById(id: string): RvAgentPreset | undefined {
119
+ return RVAGENT_PRESETS.find((p) => p.id === id);
120
+ }
121
+
122
+ /**
123
+ * Build the SSE URL for a preset
124
+ */
125
+ export function buildPresetUrl(preset: RvAgentPreset, host = "localhost", port?: number): string {
126
+ const actualPort = port ?? preset.defaultPort;
127
+ return `http://${host}:${actualPort}/sse`;
128
+ }
129
+
130
+ /**
131
+ * Build CLI command to start the server with preset configuration
132
+ */
133
+ export function buildPresetCliCommand(preset: RvAgentPreset, port?: number): string {
134
+ const actualPort = port ?? preset.defaultPort;
135
+ const groupsArg = preset.groups.includes("all") ? "--all" : `--groups ${preset.groups.join(",")}`;
136
+
137
+ return `rvagent-mcp --transport sse --port ${actualPort} ${groupsArg}`;
138
+ }
139
+
140
+ /**
141
+ * Get all available tool group names
142
+ */
143
+ export const TOOL_GROUPS = [
144
+ "file",
145
+ "shell",
146
+ "memory",
147
+ "agent",
148
+ "git",
149
+ "web",
150
+ "brain",
151
+ "task",
152
+ "core",
153
+ ] as const;
154
+
155
+ export type ToolGroupName = (typeof TOOL_GROUPS)[number];
156
+
157
+ /**
158
+ * Tool group descriptions for UI display
159
+ */
160
+ export const TOOL_GROUP_INFO: Record<ToolGroupName, { name: string; tools: string[]; icon: string }> = {
161
+ file: {
162
+ name: "File Operations",
163
+ tools: ["read_file", "write_file", "edit_file", "ls", "glob", "grep"],
164
+ icon: "๐Ÿ“",
165
+ },
166
+ shell: {
167
+ name: "Shell Execution",
168
+ tools: ["execute", "bash"],
169
+ icon: "๐Ÿ’ป",
170
+ },
171
+ memory: {
172
+ name: "Vector Memory",
173
+ tools: ["semantic_search", "store_memory", "retrieve_memory"],
174
+ icon: "๐Ÿง ",
175
+ },
176
+ agent: {
177
+ name: "Multi-Agent",
178
+ tools: ["spawn_agent", "agent_status", "orchestrate"],
179
+ icon: "๐Ÿค–",
180
+ },
181
+ git: {
182
+ name: "Version Control",
183
+ tools: ["git_status", "git_commit", "git_diff", "git_log"],
184
+ icon: "๐Ÿ“ฆ",
185
+ },
186
+ web: {
187
+ name: "Web Operations",
188
+ tools: ["web_fetch", "web_search"],
189
+ icon: "๐ŸŒ",
190
+ },
191
+ brain: {
192
+ name: "ฯ€ Brain",
193
+ tools: ["brain_search", "brain_share", "brain_vote"],
194
+ icon: "๐Ÿงช",
195
+ },
196
+ task: {
197
+ name: "Task Management",
198
+ tools: ["create_task", "list_tasks", "complete_task"],
199
+ icon: "โœ…",
200
+ },
201
+ core: {
202
+ name: "Core Protocol",
203
+ tools: ["ping", "initialize", "tools/list"],
204
+ icon: "โš™๏ธ",
205
+ },
206
+ };