>_
.issue.db
/highway-workflow-engine
Dashboard
Issues
Memory
Lessons
Audit Log
New Issue
Edit Issue #204
Update issue details
Title *
Description
## Parent Epic: #195 ## Description Integrate the app system with the existing tool registry so apps can be used in workflows. ## Location engine/apps/tool_bridge.py, engine/tools/registry.py ## Tool Name Convention apps.{app_name}.{action_name} Examples: - apps.slack.send_message - apps.github.create_issue - apps.email.send ## AppToolBridge Class ### register_app_tools(app_id, version_id, tenant_id) For each action in app: 1. Create wrapper function 2. Register with tool registry 3. Set waits_for_event flag ### unregister_app_tools(app_id, tenant_id) Remove app tools from registry when uninstalled ### create_tool_wrapper(app_id, version_id, action_name) Returns function with signature: def wrapper(ctx: DurableContext, **kwargs) -> Any: return app_executor.execute( ctx=ctx, app_id=app_id, version_id=version_id, action_name=action_name, tenant_id=ctx.tenant_id, kwargs=kwargs, ) ## Tool Registry Updates ### Tenant-Scoped Tool Registration Apps are tenant-scoped, so tool registry needs tenant awareness. Option 1: Prefix tools with tenant - tools.{tenant_id}.apps.slack.send_message - Requires tenant context in tool lookup Option 2: Dynamic lookup - Keep tool name as apps.slack.send_message - Lookup tenant installation at execution time - Fail if app not installed for tenant Recommended: Option 2 (cleaner, runtime check) ### registry.py Changes - Add is_app_tool(name) method - Add get_app_executor() method - Modify get() to handle app tools specially ## Workflow Usage ```python builder.task( 'notify', 'apps.slack.send_message', kwargs={'channel': '#alerts', 'message': 'Hello'} ) ``` ## Lazy Loading App tools loaded on first use, not at worker startup ## Testing - Test tool registration - Test tool execution through registry - Test tenant isolation - Test unregistration on uninstall
Priority
Low
Medium
High
Critical
Status
Open
In Progress
Closed
Due Date (YYYY-MM-DD)
Tags (comma separated)
Related Issues (IDs)
Enter IDs of issues related to this one. They will be linked as 'related'.
Update Issue
Cancel