feat: bundle assistant workflows with visor:// protocol, docs, and examples#421
feat: bundle assistant workflows with visor:// protocol, docs, and examples#421
Conversation
…rkflows Move assistant, code-talk, and intent-router workflow definitions from visor-ee into the main repo so they ship with every visor install. Add visor:// (and backward-compat visor-ee://) URL scheme resolution in workflow-registry so configs can reference bundled workflows without network fetches. Co-Authored-By: Claude Opus 4.6 <[email protected]>
PR Overview: Bundle Assistant Workflows with visor:// ProtocolSummaryThis PR introduces three production-ready assistant workflows bundled directly into the visor package, along with a custom What This PR Accomplishes1. Bundled Workflows (3,869 new lines)Three comprehensive workflows are now included in the
2. Custom URL ProtocolAdded // Resolves visor://workflows/assistant.yaml to local package files
if (source.startsWith('visor://') || source.startsWith('visor-ee://')) {
const relativePath = source.replace(/^visor(?:-ee)?:\/\//, '');
const defaultsDir = path.resolve(__dirname, '..', 'defaults');
const filePath = path.resolve(defaultsDir, relativePath);
// Security: Prevent path traversal
if (!filePath.startsWith(defaultsDir + path.sep)) {
throw new Error(`Invalid visor:// path: resolved path escapes defaults directory`);
}
const content = await fs.readFile(filePath, 'utf-8');
return { content, resolvedSource: filePath, importBasePath: path.dirname(filePath) };
}Key features:
3. Usage ExampleUsers can now reference built-in workflows in their configs: imports:
- visor://assistant.yaml
checks:
chat:
type: workflow
workflow: assistant
args:
question: "{{ outputs['ask'].text }}"
intents:
- id: chat
description: general Q&A
skills:
- id: jira
description: needs Jira access
knowledge: "Use jira_get_issue to fetch tickets."
tools:
jira:
command: uvx
args: [mcp-atlassian]Files Changed
Total: 5 files changed, 3,931 additions, 0 deletions Architecture & Impact AssessmentComponent Relationshipsgraph TD
A[User Config] -->|imports: visor://assistant.yaml| B[WorkflowRegistry]
B -->|detects visor:// protocol| C[Protocol Handler]
C -->|resolves to local path| D[defaults/assistant.yaml]
D -->|imports| E[defaults/intent-router.yaml]
D -->|imports| F[defaults/code-talk.yaml]
style B fill:#e1f5ff
style C fill:#fff4e1
style D fill:#e8f5e9
style E fill:#f3e5f5
style F fill:#f3e5f5
Key Technical Changes1. Protocol Resolution (
2. Workflow Features
Affected System Components
Scope Discovery & Context ExpansionImmediate Impact
Related Files to Review
Potential Follow-up Areas
Testing Status
Review NotesThe bundled workflows are substantial and well-tested. Key review areas:
Security ConsiderationsThe protocol handler includes path traversal protection:
Metadata
Powered by Visor from Probelabs Last updated: 2026-03-03T11:26:29.856Z | Triggered by: pr_updated | Commit: 305b27f 💡 TIP: You can chat with Visor using |
Security Issues (5)
Architecture Issues (15)
Security Issues (5)
Quality Issues (10)
Powered by Visor from Probelabs Last updated: 2026-03-03T11:23:37.868Z | Triggered by: pr_updated | Commit: 305b27f 💡 TIP: You can chat with Visor using |
Reject visor:// URLs that resolve outside the package root (e.g. visor://../../etc/passwd). Add unit tests for visor:// resolution, visor-ee:// backward compat, and path traversal rejection. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Place assistant.yaml, code-talk.yaml, and intent-router.yaml in defaults/ alongside existing bundled configs so they ship in dist/ without build changes. Update visor:// protocol to resolve from defaults/ dir. visor://assistant.yaml now maps to defaults/assistant.yaml. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Summary
assistant.yaml,code-talk.yaml, andintent-router.yamlindefaults/so they ship with every visor installvisor://(and backward-compatvisor-ee://) URL scheme inworkflow-registry.ts— resolves todefaults/with no network fetchvisor://../../etc/passwdstyle attacksdocs/assistant-workflows.md— skills, tools, intents, knowledge injection, composition patterns, deployment modescode-talk-workflow.yaml,code-talk-as-tool.yaml,intent-router-workflow.yamlTest plan
npm run buildcompiles cleanlynpm test— all 107 tests pass (0 failures)visor://resolution,visor-ee://backward compat, and path traversal rejectionimports: [visor://assistant.yaml]and verify it loads🤖 Generated with Claude Code