685 lines
20 KiB
JSON
685 lines
20 KiB
JSON
{
|
|
"version": "1.0",
|
|
"activities": [
|
|
{
|
|
"name": "CloneRepoActivity",
|
|
"description": "Clone a Git repository to the worker filesystem",
|
|
"category": "repository",
|
|
"inputs": {
|
|
"repo": {
|
|
"type": "string",
|
|
"description": "Git repository URL",
|
|
"required": true
|
|
},
|
|
"branch": {
|
|
"type": "string",
|
|
"description": "Git branch to clone (default: main)",
|
|
"required": false,
|
|
"default": "main"
|
|
},
|
|
"depth": {
|
|
"type": "integer",
|
|
"description": "Shallow clone depth (optional)",
|
|
"required": false
|
|
}
|
|
},
|
|
"outputs": {
|
|
"path": {
|
|
"type": "string",
|
|
"description": "Local filesystem path where repo was cloned"
|
|
},
|
|
"commit": {
|
|
"type": "string",
|
|
"description": "Current commit hash"
|
|
},
|
|
"branch": {
|
|
"type": "string",
|
|
"description": "Current branch name"
|
|
}
|
|
},
|
|
"constraints": {
|
|
"defaultTimeout": "5m",
|
|
"isFlaky": false,
|
|
"recommendedRetries": 1,
|
|
"retryBackoff": 1.5,
|
|
"dependencies": [],
|
|
"notes": "Network-dependent, may timeout on slow connections"
|
|
}
|
|
},
|
|
{
|
|
"name": "AnalyzeCodeActivity",
|
|
"description": "Analyze code quality, structure, and metrics using ast-grep and pi CLI",
|
|
"category": "analysis",
|
|
"inputs": {
|
|
"path": {
|
|
"type": "string",
|
|
"description": "Local filesystem path to analyze",
|
|
"required": true
|
|
},
|
|
"language": {
|
|
"type": "string",
|
|
"description": "Programming language (go, python, javascript, etc)",
|
|
"required": false
|
|
},
|
|
"depth": {
|
|
"type": "integer",
|
|
"description": "Analysis depth (1=shallow, 5=deep)",
|
|
"required": false,
|
|
"default": 3
|
|
}
|
|
},
|
|
"outputs": {
|
|
"quality": {
|
|
"type": "number",
|
|
"description": "Quality score 0-1.0"
|
|
},
|
|
"metrics": {
|
|
"type": "object",
|
|
"description": "Code metrics (LOC, complexity, etc)"
|
|
},
|
|
"issues": {
|
|
"type": "array",
|
|
"description": "List of identified issues"
|
|
},
|
|
"summary": {
|
|
"type": "string",
|
|
"description": "Human-readable analysis summary"
|
|
}
|
|
},
|
|
"constraints": {
|
|
"defaultTimeout": "10m",
|
|
"isFlaky": true,
|
|
"recommendedRetries": 3,
|
|
"retryBackoff": 2.0,
|
|
"dependencies": ["CloneRepoActivity"],
|
|
"notes": "CPU-intensive, can timeout on large repos. Flaky on memory pressure."
|
|
}
|
|
},
|
|
{
|
|
"name": "SecurityScanActivity",
|
|
"description": "Run security scanning (SAST) on codebase",
|
|
"category": "security",
|
|
"inputs": {
|
|
"path": {
|
|
"type": "string",
|
|
"description": "Local filesystem path to scan",
|
|
"required": true
|
|
},
|
|
"severity": {
|
|
"type": "string",
|
|
"description": "Minimum severity level (low, medium, high, critical)",
|
|
"required": false,
|
|
"default": "medium"
|
|
}
|
|
},
|
|
"outputs": {
|
|
"vulnerabilities": {
|
|
"type": "array",
|
|
"description": "List of vulnerabilities found"
|
|
},
|
|
"securityScore": {
|
|
"type": "number",
|
|
"description": "Security score 0-100"
|
|
},
|
|
"riskLevel": {
|
|
"type": "string",
|
|
"description": "Risk level (low, medium, high, critical)"
|
|
}
|
|
},
|
|
"constraints": {
|
|
"defaultTimeout": "8m",
|
|
"isFlaky": false,
|
|
"recommendedRetries": 2,
|
|
"retryBackoff": 1.5,
|
|
"dependencies": ["CloneRepoActivity"],
|
|
"notes": "Network calls for vulnerability databases may timeout"
|
|
}
|
|
},
|
|
{
|
|
"name": "GenerateReportActivity",
|
|
"description": "Generate comprehensive report from analysis and scan results",
|
|
"category": "reporting",
|
|
"inputs": {
|
|
"analysisResult": {
|
|
"type": "object",
|
|
"description": "Output from AnalyzeCodeActivity",
|
|
"required": true
|
|
},
|
|
"securityResult": {
|
|
"type": "object",
|
|
"description": "Output from SecurityScanActivity",
|
|
"required": true
|
|
},
|
|
"format": {
|
|
"type": "string",
|
|
"description": "Report format (markdown, html, json)",
|
|
"required": false,
|
|
"default": "markdown"
|
|
}
|
|
},
|
|
"outputs": {
|
|
"report": {
|
|
"type": "string",
|
|
"description": "Generated report content"
|
|
},
|
|
"reportPath": {
|
|
"type": "string",
|
|
"description": "Path to saved report file"
|
|
}
|
|
},
|
|
"constraints": {
|
|
"defaultTimeout": "2m",
|
|
"isFlaky": false,
|
|
"recommendedRetries": 1,
|
|
"retryBackoff": 1.0,
|
|
"dependencies": ["AnalyzeCodeActivity", "SecurityScanActivity"],
|
|
"notes": "CPU-light, reliable. Depends on upstream results."
|
|
}
|
|
},
|
|
{
|
|
"name": "DeploymentPreCheckActivity",
|
|
"description": "Validate readiness for deployment (linting, tests, etc)",
|
|
"category": "deployment",
|
|
"inputs": {
|
|
"path": {
|
|
"type": "string",
|
|
"description": "Local filesystem path to check",
|
|
"required": true
|
|
},
|
|
"checkType": {
|
|
"type": "string",
|
|
"description": "Type of check (lint, test, build, all)",
|
|
"required": false,
|
|
"default": "all"
|
|
}
|
|
},
|
|
"outputs": {
|
|
"passed": {
|
|
"type": "boolean",
|
|
"description": "Whether all checks passed"
|
|
},
|
|
"failures": {
|
|
"type": "array",
|
|
"description": "List of failed checks"
|
|
},
|
|
"warnings": {
|
|
"type": "array",
|
|
"description": "List of warnings"
|
|
}
|
|
},
|
|
"constraints": {
|
|
"defaultTimeout": "15m",
|
|
"isFlaky": true,
|
|
"recommendedRetries": 2,
|
|
"retryBackoff": 2.0,
|
|
"dependencies": ["CloneRepoActivity"],
|
|
"notes": "Very flaky - tests are non-deterministic, network issues, race conditions. Retry 2x."
|
|
}
|
|
},
|
|
{
|
|
"name": "NotifyStatusActivity",
|
|
"description": "Send notifications to Slack, email, or webhook",
|
|
"category": "notification",
|
|
"inputs": {
|
|
"channel": {
|
|
"type": "string",
|
|
"description": "Target channel or email",
|
|
"required": true
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "Status to report (success, failure, warning)",
|
|
"required": true
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "Message body",
|
|
"required": true
|
|
}
|
|
},
|
|
"outputs": {
|
|
"notificationId": {
|
|
"type": "string",
|
|
"description": "ID of sent notification"
|
|
},
|
|
"timestamp": {
|
|
"type": "string",
|
|
"description": "When notification was sent"
|
|
}
|
|
},
|
|
"constraints": {
|
|
"defaultTimeout": "3m",
|
|
"isFlaky": true,
|
|
"recommendedRetries": 3,
|
|
"retryBackoff": 1.5,
|
|
"dependencies": [],
|
|
"notes": "Network-dependent, may fail due to network or external service issues. Retry 3x."
|
|
}
|
|
},
|
|
{
|
|
"name": "ApproveWorkflowActivity",
|
|
"description": "Human approval step or automated policy check",
|
|
"category": "approval",
|
|
"inputs": {
|
|
"workflowId": {
|
|
"type": "string",
|
|
"description": "ID of workflow awaiting approval",
|
|
"required": true
|
|
},
|
|
"requiredApprovals": {
|
|
"type": "integer",
|
|
"description": "Number of approvals needed (default 1)",
|
|
"required": false,
|
|
"default": 1
|
|
},
|
|
"timeoutMinutes": {
|
|
"type": "integer",
|
|
"description": "Minutes to wait for approval",
|
|
"required": false,
|
|
"default": 60
|
|
}
|
|
},
|
|
"outputs": {
|
|
"approved": {
|
|
"type": "boolean",
|
|
"description": "Whether approved"
|
|
},
|
|
"approver": {
|
|
"type": "string",
|
|
"description": "Who approved (if approved)"
|
|
},
|
|
"timestamp": {
|
|
"type": "string",
|
|
"description": "When approval was given"
|
|
}
|
|
},
|
|
"constraints": {
|
|
"defaultTimeout": "120m",
|
|
"isFlaky": false,
|
|
"recommendedRetries": 1,
|
|
"retryBackoff": 1.0,
|
|
"dependencies": [],
|
|
"notes": "Waits for human input. Long timeout. Cannot retry (user input is irrevocable)."
|
|
}
|
|
},
|
|
{
|
|
"name": "ArchiveResultsActivity",
|
|
"description": "Archive analysis results to cloud storage (S3, GCS)",
|
|
"category": "storage",
|
|
"inputs": {
|
|
"reportPath": {
|
|
"type": "string",
|
|
"description": "Path to report to archive",
|
|
"required": true
|
|
},
|
|
"destination": {
|
|
"type": "string",
|
|
"description": "Cloud destination (s3://bucket/path or gcs://bucket/path)",
|
|
"required": true
|
|
},
|
|
"metadata": {
|
|
"type": "object",
|
|
"description": "Optional metadata tags",
|
|
"required": false
|
|
}
|
|
},
|
|
"outputs": {
|
|
"archiveUrl": {
|
|
"type": "string",
|
|
"description": "URL of archived file"
|
|
},
|
|
"archiveSize": {
|
|
"type": "integer",
|
|
"description": "Size of archived file in bytes"
|
|
}
|
|
},
|
|
"constraints": {
|
|
"defaultTimeout": "5m",
|
|
"isFlaky": true,
|
|
"recommendedRetries": 2,
|
|
"retryBackoff": 1.5,
|
|
"dependencies": [],
|
|
"notes": "Network-dependent. May fail on network issues or service throttling. Retry 2x."
|
|
}
|
|
},
|
|
{
|
|
"name": "RetrieveMemoryActivity",
|
|
"description": "Retrieve relevant knowledge, skills, and lessons from poimen-memory semantic search",
|
|
"category": "memory",
|
|
"inputs": {
|
|
"query": {
|
|
"type": "string",
|
|
"description": "Semantic search query",
|
|
"required": true
|
|
},
|
|
"project": {
|
|
"type": "string",
|
|
"description": "Memory project (default: poimen)",
|
|
"required": false,
|
|
"default": "poimen"
|
|
},
|
|
"scope": {
|
|
"type": "string",
|
|
"description": "Retrieval scope: skills, lessons, references, all",
|
|
"required": false,
|
|
"default": "all"
|
|
},
|
|
"limit": {
|
|
"type": "integer",
|
|
"description": "Max results to return",
|
|
"required": false,
|
|
"default": 10
|
|
},
|
|
"tool": {
|
|
"type": "string",
|
|
"description": "Tool context for skill matching",
|
|
"required": false
|
|
},
|
|
"task": {
|
|
"type": "string",
|
|
"description": "Task description for context retrieval",
|
|
"required": false
|
|
}
|
|
},
|
|
"outputs": {
|
|
"skills": {
|
|
"type": "array",
|
|
"description": "Relevant skills found"
|
|
},
|
|
"lessons": {
|
|
"type": "array",
|
|
"description": "Relevant lessons/knowledge found"
|
|
},
|
|
"references": {
|
|
"type": "array",
|
|
"description": "Reference documents found"
|
|
},
|
|
"totalResults": {
|
|
"type": "integer",
|
|
"description": "Total results found"
|
|
}
|
|
},
|
|
"constraints": {
|
|
"defaultTimeout": "30s",
|
|
"isFlaky": true,
|
|
"recommendedRetries": 2,
|
|
"retryBackoff": 1.5,
|
|
"dependencies": [],
|
|
"notes": "Network-dependent. First activity to run for context-aware routing. Fast timeout."
|
|
}
|
|
},
|
|
{
|
|
"name": "AssumeRoleActivity",
|
|
"description": "Request temporary JWT token for accessing LLM APIs (like AWS AssumeRole)",
|
|
"category": "authentication",
|
|
"inputs": {
|
|
"identity": {
|
|
"type": "string",
|
|
"description": "User/service identity requesting access",
|
|
"required": true,
|
|
"examples": ["[email protected]", "service:poimen-worker"]
|
|
},
|
|
"clientId": {
|
|
"type": "string",
|
|
"description": "OAuth2 client ID (from vault if not provided)",
|
|
"required": false
|
|
},
|
|
"clientSecret": {
|
|
"type": "string",
|
|
"description": "OAuth2 client secret (from vault if not provided)",
|
|
"required": false
|
|
},
|
|
"scope": {
|
|
"type": "string",
|
|
"description": "Scope of access (e.g., 'llm:read' or 'llm:read llm:write')",
|
|
"required": true,
|
|
"examples": ["llm:read", "llm:read llm:write", "llm:admin"]
|
|
},
|
|
"durationSeconds": {
|
|
"type": "integer",
|
|
"description": "Token validity duration in seconds (default: 3600, max: 86400)",
|
|
"required": false,
|
|
"default": 3600
|
|
},
|
|
"authServerUrl": {
|
|
"type": "string",
|
|
"description": "Auth server URL (from AUTH_SERVER_URL env if not provided)",
|
|
"required": false
|
|
}
|
|
},
|
|
"outputs": {
|
|
"token": {
|
|
"type": "string",
|
|
"description": "JWT token for calling api.riotpiao.com"
|
|
},
|
|
"expiresAt": {
|
|
"type": "integer",
|
|
"description": "Token expiration time (Unix timestamp)"
|
|
},
|
|
"expiresIn": {
|
|
"type": "integer",
|
|
"description": "Seconds until token expires"
|
|
},
|
|
"tokenType": {
|
|
"type": "string",
|
|
"description": "Token type (typically 'Bearer')"
|
|
}
|
|
},
|
|
"constraints": {
|
|
"defaultTimeout": "30s",
|
|
"isFlaky": false,
|
|
"recommendedRetries": 2,
|
|
"retryBackoff": 1.5,
|
|
"dependencies": [],
|
|
"notes": "Must run before LLM Router to provide auth token. Call early in workflow."
|
|
}
|
|
},
|
|
{
|
|
"name": "LLMInferenceActivity",
|
|
"description": "Call LLM API with custom prompt and get response text",
|
|
"category": "llm",
|
|
"inputs": {
|
|
"model": {
|
|
"type": "string",
|
|
"description": "Model ID (reasoning, ornith:35b, ornith:13b, qwen2.5:3b)",
|
|
"required": true,
|
|
"examples": ["reasoning", "ornith:35b"]
|
|
},
|
|
"system_prompt": {
|
|
"type": "string",
|
|
"description": "System instruction for the model",
|
|
"required": false,
|
|
"default": ""
|
|
},
|
|
"user_prompt": {
|
|
"type": "string",
|
|
"description": "User message to send to the model",
|
|
"required": true
|
|
},
|
|
"temperature": {
|
|
"type": "number",
|
|
"description": "Sampling temperature (0.0-1.0, higher=more creative)",
|
|
"required": false,
|
|
"default": 0.7
|
|
},
|
|
"max_tokens": {
|
|
"type": "integer",
|
|
"description": "Maximum tokens in response",
|
|
"required": false
|
|
}
|
|
},
|
|
"outputs": {
|
|
"response": {
|
|
"type": "string",
|
|
"description": "LLM response text"
|
|
},
|
|
"model": {
|
|
"type": "string",
|
|
"description": "Model used for inference"
|
|
},
|
|
"stop_reason": {
|
|
"type": "string",
|
|
"description": "Why inference stopped (stop_sequence, length, etc)"
|
|
},
|
|
"tokens_used": {
|
|
"type": "integer",
|
|
"description": "Total tokens consumed"
|
|
}
|
|
},
|
|
"constraints": {
|
|
"defaultTimeout": "120s",
|
|
"isFlaky": true,
|
|
"recommendedRetries": 2,
|
|
"retryBackoff": 2.0,
|
|
"dependencies": [],
|
|
"notes": "API-dependent. Network flaky. Use for single prompts. See LLMBatchInferenceActivity for multiple."
|
|
}
|
|
},
|
|
{
|
|
"name": "LLMBatchInferenceActivity",
|
|
"description": "Call LLM API multiple times sequentially with different prompts",
|
|
"category": "llm",
|
|
"inputs": {
|
|
"model": {
|
|
"type": "string",
|
|
"description": "Model ID (reasoning, ornith:35b, ornith:13b, qwen2.5:3b)",
|
|
"required": true
|
|
},
|
|
"system_prompt": {
|
|
"type": "string",
|
|
"description": "System instruction (same for all prompts)",
|
|
"required": false
|
|
},
|
|
"prompts": {
|
|
"type": "array",
|
|
"description": "List of user prompts to process",
|
|
"required": true,
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"temperature": {
|
|
"type": "number",
|
|
"description": "Sampling temperature (0.0-1.0)",
|
|
"required": false,
|
|
"default": 0.7
|
|
}
|
|
},
|
|
"outputs": {
|
|
"responses": {
|
|
"type": "array",
|
|
"description": "List of LLM responses (parallel to input prompts)",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"model": {
|
|
"type": "string",
|
|
"description": "Model used"
|
|
},
|
|
"errors": {
|
|
"type": "array",
|
|
"description": "Error messages for failed prompts",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"constraints": {
|
|
"defaultTimeout": "600s",
|
|
"isFlaky": true,
|
|
"recommendedRetries": 1,
|
|
"retryBackoff": 2.0,
|
|
"dependencies": [],
|
|
"notes": "Sequential processing of multiple prompts. Use for batch analysis, summarization, etc."
|
|
}
|
|
},
|
|
{
|
|
"name": "CanvasReasonerActivity",
|
|
"description": "Use LLM reasoning to infer and suggest connections between workflow activities",
|
|
"category": "workflow",
|
|
"inputs": {
|
|
"nodes": {
|
|
"type": "array",
|
|
"description": "Canvas workflow nodes to analyze",
|
|
"required": true,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {"type": "string"},
|
|
"type": {"type": "string"},
|
|
"label": {"type": "string"}
|
|
}
|
|
}
|
|
},
|
|
"edges": {
|
|
"type": "array",
|
|
"description": "Existing edges in the workflow",
|
|
"required": false,
|
|
"items": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"preserve_existing": {
|
|
"type": "boolean",
|
|
"description": "If true, only suggest new edges; if false, redesign entire workflow",
|
|
"required": false,
|
|
"default": true
|
|
},
|
|
"auth_token": {
|
|
"type": "string",
|
|
"description": "JWT token for authenticated LLM calls",
|
|
"required": false
|
|
}
|
|
},
|
|
"outputs": {
|
|
"suggested_edges": {
|
|
"type": "array",
|
|
"description": "Edges suggested by LLM reasoning",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"source": {"type": "string"},
|
|
"target": {"type": "string"}
|
|
}
|
|
}
|
|
},
|
|
"reasoning": {
|
|
"type": "string",
|
|
"description": "LLM explanation of suggested connections"
|
|
},
|
|
"confidence": {
|
|
"type": "number",
|
|
"description": "Confidence score (0.0-1.0) of the suggestions"
|
|
}
|
|
},
|
|
"constraints": {
|
|
"defaultTimeout": "120s",
|
|
"isFlaky": true,
|
|
"recommendedRetries": 2,
|
|
"retryBackoff": 2.0,
|
|
"dependencies": [],
|
|
"notes": "Uses reasoning model to analyze workflow logic. Good for understanding data flow and connections between activities."
|
|
}
|
|
}
|
|
],
|
|
"metadata": {
|
|
"totalActivities": 13,
|
|
"lastUpdated": "2025-09-05T00:00:00Z",
|
|
"categories": {
|
|
"repository": 1,
|
|
"analysis": 1,
|
|
"security": 1,
|
|
"reporting": 1,
|
|
"deployment": 1,
|
|
"notification": 1,
|
|
"approval": 1,
|
|
"storage": 1,
|
|
"memory": 1,
|
|
"authentication": 1,
|
|
"llm": 2,
|
|
"workflow": 1
|
|
}
|
|
}
|
|
}
|