5 Commits
Author SHA1 Message Date
Test 2a3b080e29 feat: add CanvasReasonerActivity for auto-inferring workflow connections
ci / test (push) Failing after 6m2s
2026-09-05 00:54:22 -07:00
Test 0da90fdd7a feat: database layer + canvas validator/converter + LLM inference activities
ci / test (push) Failing after 2m11s
- Add pkg/db models and CRUD methods for workflows
- Add internal/routing canvas validator (DAG check, connectivity)
- Add internal/routing canvas converter (Canvas → WorkflowSpec)
- Register LLMInferenceActivity and LLMBatchInferenceActivity
- Update api/server and cmd/server with database integration
- Add K8s environment variable support
- Update activity knowledge base with LLM activities
- Add .env.example configuration template
2026-09-05 00:43:30 -07:00
Test 4a34c8e672 feat: add AssumeRoleActivity for temporary LLM API token grants
Implements AWS AssumeRole-like pattern for Poimen:
- User/service requests temporary access with identity + scope
- AssumeRoleActivity exchanges credentials with OAuth2 auth server
- Returns JWT token valid for limited time (default: 1hr, max: 24hrs)
- Token used in all subsequent LLM API calls to api.riotpiao.com

Key features:
- Credentials from vault/K8s secrets (never hardcoded)
- Scope-based access control (llm:read, llm:read llm:write, llm:admin)
- Automatic token expiration tracking
- Retry support for transient auth failures (2x, 1.5s backoff)
- Configurable auth server endpoint

Usage pattern:
1. AssumeRoleActivity(identity, scope) → JWT token
2. LLMRouter uses token in LLMAuth config
3. All activity calls validated against token + scopes
4. Workflow optionally refreshes token before expiry

Security:
- No credentials in code/logs (env or vault only)
- Short-lived tokens (1hr default, 24hr max)
- Server-enforced scope validation
- Token revocation support

Activity registered: #10 (authentication category)
Knowledge base updated with full activity spec

New file: action/assume_role.go (5.2 KB)
2026-09-04 14:11:58 -07:00
Test a0e64224a7 feat: RoutingWorkflow + LLM Router + Memory Activity
ci / test (push) Successful in 2m12s
- Add RoutingWorkflow: generic state machine executor for WorkflowSpec
- Add LLM Router: natural language → WorkflowSpec generation
- Add RetrieveMemoryActivity: query poimen-memory for context
- Add activities: AnalyzeCode, SecurityScan, GenerateReport, Notify, etc.
- Add agent-prompts/router: LLM prompt documentation
- Extend starter with --route flag for routing workflows
- Remove orchestrator job (trigger via API/message instead)
- Clean up: move docs to Desktop, add .gitignore for *.md
2026-09-02 19:21:53 -07:00
Test ab79cf33bc feat(routing): implement ActivityKnowledgeBase with loader
Task 1.2 & 1.3 COMPLETE 

Core knowledge base infrastructure:
- activity_knowledge_base.json: Catalog of 8 activities with metadata
  - CloneRepoActivity: Clone Git repo (stable, 1 retry)
  - AnalyzeCodeActivity: AST analysis (flaky, 3 retries)
  - SecurityScanActivity: SAST scanning (2 retries)
  - GenerateReportActivity: Report generation (1 retry)
  - DeploymentPreCheckActivity: Pre-deployment validation (flaky, 2 retries)
  - NotifyStatusActivity: Slack/email notifications (flaky, 3 retries)
  - ApproveWorkflowActivity: Human approval (120m timeout)
  - ArchiveResultsActivity: Cloud storage archival (flaky, 2 retries)

- knowledge_base.go: KnowledgeBase loader with methods:
  - LoadKnowledgeBase(path) - Load from JSON file
  - LoadKnowledgeBaseFromDefaultPath() - Auto-discover file
  - GetActivity(name) - Lookup single activity
  - GetActivityNames() - List all activity names
  - HasActivity(name) - Check existence
  - GetTimeoutForActivity(name) - Get timeout from KB
  - GetRetryPolicyForActivity(name) - Get retry config
  - IsFlaky(name) - Check if flaky
  - GetDependencies(name) - Get activity dependencies
  - ListActivitiesByCategory(category) - Filter by category
  - Validate() - Check for circular dependencies
  - PrintSummary() - Human-readable summary

- knowledge_base_test.go: 14 unit tests
  - Test loading, lookup, filtering, dependencies
  - Test timeout/retry extraction
  - Test validation logic
  - All tests PASS  (22/22 total)

Acceptance criteria met:
 Knowledge base loads successfully
 All 8 activities properly defined
 Flaky/stable flags correctly set
 Dependencies validate with no cycles
 Timeout/retry extraction works
 Unit tests pass (14/14 KB tests)
 Ready for validator (Task 1.4)

Effort: 5 hours (estimated 3+2)
Files: activity_knowledge_base.json (10.3KB)
       knowledge_base.go (246 lines)
       knowledge_base_test.go (324 lines)
2026-08-31 19:26:16 -07:00