feat(harness): Complete Agentic Harness Implementation (Phases 1-6)#92
Merged
Conversation
- Add ExecutionContext with SessionID, WorkflowRunID, AgentRunID - Add ResolveWorkspacePath() for workspace isolation - Add git/cloner.go for runtime repo cloning - Add collaboration modes (sequential vs parallel) - Update PRD with design decisions: - Sequential mode: agents pick up where previous left off (same branch) - Parallel mode: each agent gets own branch, merge later - Session locking for sequential concurrent access - Explicit session lifecycle management
- Add session CLI commands (list, info, delete, cleanup, unlock) - Integrate streaming into AgenticExecutor with full ownership identifiers - Add StreamingConfig and wire publishers through execution engine - Add session manager for workspace persistence and locking - Add stream publisher tests and NATS publisher implementation Phase 2 complete: - 2.1 Workspace Isolation ✅ - 2.2 Session Manager ✅ - 2.3 Git Cloner ✅ - 2.4 NATS State Store ✅ - 2.5 Session CLI Commands ✅ - 2.6 Streaming Integration ✅
…mplete Phase 2 complete: - Session manager with locking - Real-time streaming with ownership identifiers - Session CLI commands (list, info, delete, cleanup, unlock) - Git cloner for repo targeting Phase 3 planned: - Sandbox isolation strategies (Docker, Firecracker, gVisor, WASM) - Resource limits (CPU, memory, disk) - Network filtering - Filesystem ACLs
- Add Sandbox interface with Create, Exec, ReadFile, WriteFile, etc. - Add SandboxConfig with Mode, Resources, Network, Filesystem settings - Implement HostSandbox (passthrough, no isolation) - Implement DockerSandbox with container isolation: - Resource limits (CPU, memory, PIDs) - Network isolation (--network none by default) - Read-only root filesystem - Dropped capabilities - Security options (no-new-privileges) - Add Factory for creating sandbox instances by mode - Add comprehensive tests for HostSandbox Supported modes: host, docker (firecracker, gvisor, wasm planned)
Phase 4 - Session Management: - pkg/harness/session/session_executor.go - SessionExecutor with lifecycle mgmt - pkg/harness/session/history_store.go - JSON persistence for message history - Session locking, metadata tracking, and resume capability Phase 5 - Session Persistence: - WithInitialHistory executor option for loading prior conversation - Automatic message persistence after each execution - Session resume via --session <id> flag Phase 6 - Interactive REPL: - cmd/main/harness_repl.go - Full REPL with session persistence integration - Commands: /help, /status, /history, /clear, /skills, /memory, /tools, etc. - JSON export/import of session state - Integration with HistoryStore for message persistence across sessions Also includes: - Sandbox isolation improvements (docker cp for file operations) - Compaction with token counting and history truncation - Tool registry with sandbox-aware execution - E2E tests for multi-step execution and workflow simulation - Documentation updates for testing operations
2ee1054 to
272b474
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements the complete Agentic Harness system for Station, enabling long-running AI agent execution with:
Key Features
pkg/harness/- Complete harness execution enginepkg/harness/session/- Session management with history persistencepkg/harness/sandbox/- Docker, E2B, and host sandbox backendspkg/harness/tools/- Bash, Read, Write, Edit, Glob, Grep toolscmd/main/harness_repl.go- Interactive REPL with/history,/clear,/statuscommandscmd/main/session_commands.go- Session management CLI commandsTest Plan
go test ./pkg/harness/... -vgo test ./pkg/harness/session/... -vstn harness --helpstn session --helpNotes
This branch has diverged from main and may require manual conflict resolution during merge.
🤖 Generated with Claude Code