sync: editable workflows from private repo

- Users can edit/create workflows from Settings → Workflows tab
- File-based storage for custom workflows
- Bundled workflows serve as fallback when no user file exists
- Added createEdge tool access for workflows (Quick Link)
- Cleaned up stale terminology in workflow prompts

Files synced:
- src/services/workflows/workflowFileService.ts (NEW)
- app/api/workflows/[key]/route.ts (NEW)
- src/services/workflows/registry.ts
- src/components/settings/WorkflowsViewer.tsx
- src/tools/infrastructure/registry.ts
- src/services/agents/wiseRAHExecutor.ts
- src/config/workflows/integrate.ts
- src/config/prompts/wise-rah.ts
This commit is contained in:
“BeeRad”
2026-01-04 16:30:25 +11:00
parent 8190df8cf2
commit a3647c0693
8 changed files with 804 additions and 100 deletions
+4 -4
View File
@@ -11,7 +11,7 @@ Available tools:
- queryNodes — search nodes by title/content/dimensions across ENTIRE database
- getNodesById — retrieve full node data
- queryEdge — inspect existing edges
- searchContentEmbeddings — semantic search across ALL nodes (not just pinned)
- searchContentEmbeddings — semantic search across ALL nodes
- webSearch — external research when necessary
- think — internal planning/reflection (use once per workflow unless plan changes)
- updateNode — append content to nodes (tool handles appending automatically)
@@ -24,16 +24,16 @@ When you receive a workflow task:
2. Call think once to produce a numbered plan matching the workflow steps.
3. Execute the plan step-by-step:
- Extract key entities (names, projects, concepts) from the node
- Search the FULL database using those entities (ignore pinned context during search)
- Search the FULL database using those entities
- Find both obvious (structural) and thematic connections
- Then contextualize findings with pinned context
- Contextualize findings using background context (top nodes by edge count)
4. Stay within the tool budget and avoid redundant queries.
5. When calling updateNode, provide ONLY the new content (never include existing content) - tool appends automatically.
6. Finish with a concise Task / Actions / Result / Nodes / Follow-up summary.
</execution>
<constraints>
- Search the ENTIRE database, not just pinned nodes
- Search the ENTIRE database, not just top nodes
- Extract entities first, then search using those entities
- Use minimal tool calls needed for high-quality output
- Keep responses structured, factual, and ≤120 words
+6 -6
View File
@@ -18,7 +18,7 @@ WORKFLOW STEPS
- Summarize the core insight in one sentence
2. SEARCH THE DATABASE FOR CONNECTIONS
DO NOT reference pinned context yet. Search the ENTIRE database:
Search the ENTIRE database:
a) Obvious structural connections:
- If names mentioned → queryNodes to find existing nodes about those people
@@ -33,10 +33,10 @@ WORKFLOW STEPS
- Aim for 38 strong connections, not 20 weak ones
- Check existing edges with queryEdge to avoid duplicating connections
3. CONTEXTUALIZE WITH PINNED NODES
NOW review the supplied PINNED CONTEXT:
3. CONTEXTUALIZE WITH TOP NODES
Review the BACKGROUND CONTEXT (top nodes by edge count):
- Why might this node matter given the user's focus areas?
- Does it advance any themes visible in pinned nodes?
- Does it advance any themes visible in their most connected nodes?
- Keep this brief 12 sentences maximum
4. APPEND INTEGRATION ANALYSIS
@@ -52,7 +52,7 @@ WORKFLOW STEPS
- [NODE:456:"Title"] — [why: ...]
- [continue for 38 connections found in step 2]
**Relevance:** [12 sentences connecting to user's pinned context themes]
**Relevance:** [12 sentences connecting to user's top nodes/focus areas]
CRITICAL: Send ONLY this new section. The tool will automatically append it to existing content.
@@ -62,7 +62,7 @@ WORKFLOW STEPS
Reply with: Task / Actions / Result / Nodes / Follow-up (≤120 words)
CRITICAL RULES
- Search the FULL database, not just pinned nodes
- Search the FULL database, not just top nodes
- Use entities from step 1 to guide searches in step 2
- Call updateNode EXACTLY ONCE - after success, move to step 5 immediately
- Keep total tool calls ≤ 18 (be efficient)