Commit graph

759 commits

Author SHA1 Message Date
Claude (M3 Studio)
3fc04f809b fix(bugseti): add TTL cleanup and max size cap to workspace map (#55)
The workspaces map in WorkspaceService grew unboundedly. Add cleanup()
that evicts entries older than 24h and enforces a 100-entry cap by
removing oldest entries first. Called on each Capture().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 11:25:00 +00:00
5e953944f5 Merge pull request 'feat(agentci): Clotho orchestrator, rate limiting, and security hardening' (#49) from feat/agentci-packaging into new 2026-02-10 03:08:36 +00:00
Claude
b00e0df89c
fix(agentci): resolve agents by Forgejo username, not config key
Adds FindByForgejoUser() to Spinner so dispatch matches issues
assigned to Forgejo users (Virgil, Claude, Charon) even when the
agent config key differs (e.g. Hypnos → forgejo_user: Claude).

Searches config key first (direct match), then ForgejoUser field.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 03:08:17 +00:00
Claude
3ccb67bddd
feat(agentci): rate limiting and native Go dispatch runner
Adds pkg/ratelimit for Gemini API rate limiting with sliding window
(RPM/TPM/RPD), persistent state, and token counting. Replaces the
bash agent-runner.sh with a native Go implementation under
`core ai dispatch {run,watch,status}` for local queue processing.

Rate limiting:
- Per-model quotas (RPM, TPM, RPD) with 1-minute sliding window
- WaitForCapacity blocks until capacity available or context cancelled
- Persistent state in ~/.core/ratelimits.yaml
- Default quotas for Gemini 3 Pro/Flash, 2.5 Pro, 2.0 Flash/Lite
- CountTokens helper calls Google tokenizer API
- CLI: core ai ratelimits {show,reset,count,config,check}

Dispatch runner:
- core ai dispatch run — process single ticket from queue
- core ai dispatch watch — daemon mode with configurable interval
- core ai dispatch status — show queue/active/done counts
- Supports claude/codex/gemini runners with rate-limited Gemini
- File-based locking with stale PID detection
- Completion handler updates issue labels on success/failure

Closes #42

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 03:08:16 +00:00
Claude
d92762ecdc
feat(agentci): Clotho orchestrator and security hardening
Adds the Clotho dual-run verification system and hardens the entire
agent dispatch pipeline against command injection, token exposure,
and SSH MitM attacks. Breaks the agentci→handlers circular dependency.

Security:
- SanitizePath (regex whitelist + filepath.Base) for all dispatch inputs
- EscapeShellArg for shell argument safety
- SecureSSHCommand (StrictHostKeyChecking=yes, BatchMode=yes)
- ForgeToken removed from ticket JSON, transferred via .env with 0600
- ssh-keyscan on agent add populates known_hosts before first connection

Clotho:
- Spinner orchestrator determines Standard vs Dual execution mode
- Config-driven via ClothoConfig (strategy, validation_threshold)
- Agent runner supports claude/codex/gemini backends with dual-run
- Divergence detection compares thread outputs via git diff

API:
- LoadActiveAgents() returns map[string]AgentConfig (no handlers import)
- LoadClothoConfig() reads clotho section from config
- Forge helpers: AssignIssue, EnsureLabel, AddIssueLabels

32 tests pass (19 agentci + 13 dispatch).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 03:08:16 +00:00
Claude
4c8be587bf
feat(agentci): add tests and Gemini 3 tiered batch pipeline
- Add 15 tests for pkg/agentci/config.go (load, save, remove, list, round-trip)
- Extend dispatch_test.go from 4 to 12 tests (match edge cases, ticket JSON
  serialization, model/runner variants, execute error paths)
- Add gemini-batch-runner.sh: rate-limit-aware tiered pipeline using
  Flash Lite → Gemini 3 Flash → Gemini 3 Pro with 80% TPM safety margin
- Generate docs/pkg-batch{1-6}-analysis.md covering all 33 packages
  using ~893K tokens total (vs 5.54M single-shot), zero rate limit hits

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 03:07:52 +00:00
Virgil
00dfd27072 Merge pull request 'feat(agentci): package dispatch for multi-agent deployment' (#39) from feat/agentci-packaging into new 2026-02-09 11:25:48 +00:00
Snider
0a3c0204d1 fix(agentci): use log.E() error pattern, add Charm SSH TODOs
Replace fmt.Errorf() with structured log.E() errors in agentci, forge,
jobrunner packages. Update PipelineSignal comment to reflect dispatch
fields. Add TODO markers for charmbracelet/ssh migration across all
exec ssh call sites.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-09 11:15:11 +00:00
Claude
95ef7ced6b
feat(agentci): add gemini runner backend
Support gemini -p -y (non-interactive yolo mode) alongside claude
and codex runners. Three AI backends for different cost profiles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:14:17 +00:00
Claude
947fa38bcd
fix(agentci): correct codex exec flags for v0.98
Use `codex exec --full-auto` instead of `--approval-mode full-auto`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:02:41 +00:00
Claude
67dc130424
feat(agentci): add model/runner fields for multi-backend support
Tickets now carry model (sonnet/haiku/opus) and runner (claude/codex)
fields. agent-runner.sh dispatches to the right backend. Defaults to
claude with sonnet model for cost efficiency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:58:46 +00:00
Virgil
71cde24842 Merge pull request 'fix(tray): replace placeholder icons with actual bug and diamond icons' (#40) from fix/tray-icons into new 2026-02-09 10:40:09 +00:00
Snider
3b155ae7bf fix(tray): replace placeholder icons with actual bug and diamond icons
BugSETI: bug with antennae and legs (black template, white dark, green app)
Core IDE: diamond shape (black template, white dark, blue app)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-09 10:39:50 +00:00
Claude
6ae525d54f
feat(agentci): package dispatch system for multi-agent deployment
Config-driven agent targets replace hardcoded map so new agents
can be added via CLI instead of recompiling. Includes setup script
for bootstrapping agent machines and CLI commands for management.

- Add pkg/agentci with config types and CRUD (LoadAgents, SaveAgent, etc.)
- Add CLI: core ai agent {add,list,status,logs,setup,remove}
- Add scripts/agent-setup.sh (SSH bootstrap: dirs, cron, prereq check)
- Headless loads agents from ~/.core/config.yaml
- Dispatch ticket includes forgejo_user for dynamic clone URLs
- agent-runner.sh reads username from ticket JSON, not hardcoded

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:36:23 +00:00
Virgil
ab7e7d7b3c Merge pull request 'feat(bugseti): wire BugSETI into root build system and ship v0.1.0' (#38) from feat/bugseti-launch into new 2026-02-09 10:28:37 +00:00
Snider
ff934fa0d3 Merge branch 'new' of https://forge.lthn.ai/host-uk/core into new 2026-02-09 10:24:27 +00:00
Snider
367bd35778 chore(bugseti): disable Angular CLI analytics
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-09 10:24:22 +00:00
Claude
b8b0a2e5b8
feat(jobrunner): add agent dispatch handler and queue runner
Dispatch handler matches child issues that need coding (no PR yet,
assigned to a known agent) and SCPs ticket JSON to the agent's
queue directory via SSH. Includes dedup across queue/active/done
and posts dispatch comments on issues.

- Extend PipelineSignal with NeedsCoding, Assignee, IssueTitle, IssueBody
- Extend ForgejoSource to emit signals for unstarted children
- Add DispatchHandler with Match/Execute (SCP ticket delivery)
- Add agent-runner.sh cron-based queue runner for agent machines
- Wire dispatch handler into headless mode

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:10:08 +00:00
Snider
d1b1341407 feat(bugseti): wire BugSETI into root build system and make functional
- Add bugseti:dev, bugseti:build, bugseti:frontend tasks to root Taskfile
- Update Wails v3 config to current dev_mode format (root_path, executes)
- Raise Angular component CSS budget to 6KB (inline styles by design)
- Fix vanity-import Dockerfile typo (---FROM → FROM)
- Verify: Go compiles, tests pass, frontend builds clean, binary runs

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-09 02:49:01 +00:00
Snider
e8119a49eb fix(core-ide): use path-based routing for multi-window SPA, clean up formatting
Switch Angular from hash-based to path-based routing so each Wails window
(/tray, /main, /settings) loads its correct route. Archive GitHub Actions
workflows to .gh-actions/, update Forgejo deploy registry to dappco.re/osi,
and apply gofmt/alignment fixes across packages.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-09 01:50:57 +00:00
Snider
b32858d135 updates 2026-02-09 01:27:40 +00:00
Claude
ccead55c0e
feat(jobrunner): port from GitHub to Forgejo using pkg/forge
Replace all GitHub API and gh CLI dependencies with Forgejo SDK via
pkg/forge. The bash dispatcher burned a week of credit in a day due to
bugs — the jobrunner now talks directly to Forgejo.

- Add forge client methods: CreateIssueComment, CloseIssue, MergePullRequest,
  SetPRDraft, ListPRReviews, GetCombinedStatus, DismissReview
- Create ForgejoSource implementing JobSource (epic polling, checklist
  parsing, commit status via combined status API)
- Rewrite all 5 handlers to accept *forge.Client instead of shelling out
- Replace ResolveThreadsHandler with DismissReviewsHandler (Forgejo has
  no thread resolution API — dismiss stale REQUEST_CHANGES reviews instead)
- Delete pkg/jobrunner/github/ and handlers/exec.go entirely
- Update internal/core-ide/headless.go to wire Forgejo source and handlers
- All 33 tests pass with mock Forgejo HTTP servers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:40:49 +00:00
12974f472a Merge pull request 'codex/bugseti-mcp' (#36) from codex/bugseti-mcp into new
Reviewed-on: host-uk/core#36
2026-02-08 23:16:41 +00:00
58a052bd17 Merge branch 'new' into codex/bugseti-mcp 2026-02-08 23:15:35 +00:00
Snider
6ded35887b feat(core-ide): add MCP bridge (SERVER) and Claude bridge (CLIENT)
SERVER bridge (mcp_bridge.go):
- HTTP server on :9877 exposing 24 MCP tools
- Window management: list, get, position, size, bounds, maximize,
  minimize, restore, focus, visibility, title, fullscreen, create, close
- Webview: eval JS, navigate, list
- System: clipboard read/write, tray control
- Endpoints: /mcp, /mcp/tools, /mcp/call, /health, /ws, /claude

CLIENT bridge (claude_bridge.go):
- WebSocket relay between GUI clients and MCP core on :9876
- Auto-reconnect with backoff
- Bidirectional message forwarding (claude_message type)

Moved HTTP server from IDEService to MCPBridge for unified endpoint.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-08 23:12:51 +00:00
Snider
f85aecb073 fix(tray-apps): SPA routing, TypeScript fixes, and deferred onboarding
- Add spaHandler() to both BugSETI and Core IDE for Angular client-side
  routing (AssetFileServerFS doesn't fallback to index.html)
- Fix jellyfin.component.ts sanitizer initialization order (both apps)
- Fix chat.component.ts Event/KeyboardEvent type mismatch
- Defer onboarding window to ApplicationStarted event hook

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-08 23:03:49 +00:00
Snider
4127509ccd fix: resolve conflict markers and remove legacy code after branch consolidation
- Remove conflict markers from 19 files that were accidentally committed
  during merge resolutions (keeping HEAD versions)
- Remove legacy root-level code (core.go, main.go, config/, crypt/,
  display/, filesystem/, workspace/, docs/*.go, cmd/app/) from old
  architecture predating pkg/ restructure
- Remove duplicate pkg/config/loader.go (Load/Save already in config.go)
- Fix import alias in cmd_apply.go (errors -> core)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-08 22:08:35 +00:00
Snider
3b1eb2fbfc Merge branch 'refactor/core-decomposition' into new 2026-02-08 22:00:38 +00:00
Snider
8d937b09eb Merge branch 'audit/dependencies-185' into new 2026-02-08 22:00:38 +00:00
Snider
ec83baee46 Merge branch 'ci/use-build-action' into new 2026-02-08 22:00:38 +00:00
Snider
0d764297e2 Merge branch 'ci/org-wide-workflows' into new 2026-02-08 22:00:38 +00:00
Snider
b2c1950bc2 Merge branch 'fix/windows-zip' into new 2026-02-08 22:00:30 +00:00
Snider
2e4656c5b3 Merge branch 'fix/ssh-security-13442055821003769195' into new 2026-02-08 22:00:30 +00:00
Snider
e09574e9cc Merge branch 'fix/release-windows-shell' into new 2026-02-08 22:00:30 +00:00
Snider
3ff2dbe129 Merge branch 'fix/release-go-build' into new 2026-02-08 22:00:30 +00:00
Snider
82229c2ac2 Merge branch 'fix/release-build-path' into new 2026-02-08 22:00:30 +00:00
Snider
f21ab1aaaa Merge branch 'fix/rag-formatting' into new 2026-02-08 22:00:29 +00:00
Snider
052040046b Merge branch 'fix/pr-263-reviews' into new 2026-02-08 22:00:29 +00:00
Snider
179b2bb0e6 Merge branch 'fix/linker-flags-226' into new 2026-02-08 22:00:29 +00:00
Snider
965498a9f4 Merge branch 'fix/homebrew-tap-auth' into new 2026-02-08 22:00:29 +00:00
Snider
1ee32dbec9 Merge branch 'fix/gofmt-client' into new 2026-02-08 22:00:29 +00:00
Snider
0bf47aa155 Merge branch 'fix/gemini-batch' into new 2026-02-08 22:00:29 +00:00
Snider
b8aa8dd8fd Merge branch 'fix/docstrings-exec-logger' into new 2026-02-08 22:00:29 +00:00
Snider
1c61d35a26 Merge branch 'fix/disable-dev-release' into new 2026-02-08 22:00:29 +00:00
Snider
b84a1ec29e Merge branch 'fix/consolidate-workflows' into new 2026-02-08 22:00:21 +00:00
Snider
b1e703fea3 Merge branch 'feature-core-integration' into new 2026-02-08 22:00:01 +00:00
Snider
bee2679714 Merge branch 'feat/job-runner' into new 2026-02-08 21:59:51 +00:00
Snider
cf0011c508 Merge branch 'feat/prod-infra' into new 2026-02-08 21:59:43 +00:00
Snider
3f9840b2ea Merge branch 'codex/bugseti-mcp' into new 2026-02-08 21:59:29 +00:00
Snider
5558642d5a Merge branch 'feat/unifi-sdk' into new 2026-02-08 21:59:25 +00:00