Commit graph

19 commits

Author SHA1 Message Date
Snider
6393bfe4da refactor(agentic): adopt core.Env() + core.Path() across package
Replace all os.UserHomeDir/os.Getenv/os.Hostname with core.Env().
Replace all filepath.Base/Dir/Glob/IsAbs with core.PathBase/PathDir/
PathGlob/PathIsAbs.

10 files migrated: paths, prep, review_queue, remote, dispatch,
ingest, mirror, plan, verify, watch.

Imports eliminated: 5x os, 7x filepath. All file I/O and path
construction now routes through Core primitives.

Bumps dappco.re/go/core to v0.6.0.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-22 10:15:15 +00:00
Snider
a0dc9c32e7 refactor: migrate core/agent to Core primitives — reference implementation
Phase 1: go-io/go-log → core.Fs{}, core.E(), core.Error/Info/Warn
Phase 2: strings/fmt → core.Contains, core.Sprintf, core.Split etc
Phase 3: embed.FS → core.Mount/core.Embed, core.Extract
Phase 4: cmd/main.go → core.Command(), c.Cli().Run(), no cli package

All packages migrated:
- pkg/lib (Codex): core.Mount, core.Extract, Result returns, AX comments
- pkg/setup (Codex): core.Fs, core.E, fixed missing lib helpers
- pkg/brain (Codex): Core primitives, AX comments
- pkg/monitor (Codex): Core string/logging primitives
- pkg/agentic (Codex): 20 files, Core primitives throughout
- cmd/main.go: pure Core CLI, no fmt/log/filepath/strings/cli

Remaining stdlib: path/filepath (Core doesn't wrap OS paths),
fmt.Sscanf/strings.Map (no Core equivalent).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-22 06:13:41 +00:00
Snider
deaa06a54d refactor(pkg): migrate go-io/go-log to Core primitives
Replace separate go-io (coreio) and go-log (coreerr) packages with
Core's built-in Fs and error/logging functions. This is the reference
implementation for how all Core ecosystem packages should migrate.

Changes:
- coreio.Local.Read/Write/EnsureDir/Delete/IsFile → core.Fs methods
- coreerr.E() → core.E(), coreerr.Info/Warn/Error → core.Info/Warn/Error
- (value, error) return pattern → core.Result pattern (r.OK, r.Value)
- go-io and go-log moved from direct to indirect deps in go.mod
- Added AX usage-example comments on key public types
- Added newFs("/") helper for unrestricted filesystem access

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-22 03:41:07 +00:00
Snider
c6490c175a refactor: migrate imports to dappco.re paths + bump mcp to v0.4.0
Update all go-* imports from forge.lthn.ai to dappco.re/go/core/*.
Bump mcp to v0.4.0 (Options{} struct API).
Versions: core v0.5.0, io v0.2.0, log v0.1.0, process v0.3.0,
ws v0.3.0, ai v0.2.0, webview v0.2.0, i18n v0.2.0.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-22 01:27:48 +00:00
Snider
21f234aa7c refactor: flatten go/ subdir, migrate to dappco.re/go/agent, restore process service
- Module path: dappco.re/go/agent
- Core import: dappco.re/go/core v0.4.7
- Process service re-enabled with new Core API
- Plugin bumped to v0.11.0
- Directory flattened from go/ to root

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-21 11:10:44 +00:00
Snider
be1130f470 agent updates 2026-03-21 11:10:44 +00:00
Snider
4832827da7 fix: address code review findings (critical + high)
Critical:
- Fix token leaked in URL query string (getLabelID) — now uses Authorization header
- Fix unchecked type assertion panic in parseMessages — safe toInt() helper

High:
- Remove dead canDispatch() function
- Remove time.Now import hack from mirror.go
- Remove invalid --no-force git flag from mirror.go
- Tidy go.mod (remove unused deps from deleted packages)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 19:12:06 +00:00
Snider
662217c6f5 chore: sync dependencies for v0.3.3
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 22:28:07 +00:00
Snider
42788a2a88 refactor(dispatch): use go-process for agent spawning
Replace raw exec.Command with go-process.StartWithOptions for all agent
spawning (dispatch, queue, resume). Uses pipes for output capture instead
of file descriptor redirect — fixes Claude Code's empty log issue.

Shared spawnAgent() helper eliminates duplication across 3 files.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 17:52:55 +00:00
Snider
4e8fff62a0 chore: update core/mcp, drop go-ml/go-duckdb dependency
core/mcp no longer pulls go-ml. Unblocks CGO_ENABLED=0 cross-compilation.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 15:38:06 +00:00
Snider
2ea50959f2 refactor: move brain + agentic packages into core/agent, use core/cli
Brain and agentic subsystems now live in core/agent/pkg/ instead of
core/mcp/pkg/mcp/. core-agent binary uses core/cli for proper command
framework. Usage: core-agent mcp

One repo, one clone, everything works.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 11:10:33 +00:00
Snider
84e2b62beb feat: core-agent MCP binary using core/mcp subsystems
Replaces old mcp-go based server with core/mcp (brain + agentic).
Single binary: go install ./cmd/core-agent/
Provides: brain_recall, brain_remember, brain_forget, agentic_dispatch,
agentic_status, agentic_resume, agentic_scan, agentic_create_pr, etc.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 10:58:25 +00:00
Snider
f0cb5dd2bd chore: update dependencies
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-15 15:43:31 +00:00
Snider
3ac81d47cb chore: sync go.mod dependencies
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-15 15:28:58 +00:00
Snider
116fecb0d6 fix: align indirect dependency versions via go work sync
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 13:42:30 +00:00
Snider
3a2bc7c1f5 fix: update stale import paths and dependency versions from extraction
Resolve stale forge.lthn.ai/core/cli v0.1.0 references (tag never existed,
earliest is v0.0.1) and regenerate go.sum via workspace-aware go mod tidy.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 13:38:58 +00:00
Snider
6442cb85ad refactor: update import path from go-config to core/config
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 10:22:39 +00:00
Snider
9071f28eb9 refactor(api): update import path from go-api to core/api
Part of the polyglot merge — forge.lthn.ai/core/go-api is now
forge.lthn.ai/core/api.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 10:10:39 +00:00
Snider
e90a84eaa0 feat: merge go-agent + go-agentic + php-devops into unified agent repo
Combines three repositories into a single workspace:
- go-agent → pkg/orchestrator (Clotho), pkg/jobrunner, pkg/loop, cmd/
- go-agentic → pkg/lifecycle (allowance, sessions, plans, dispatch)
- php-devops → repos.yaml, setup.sh, scripts/, .core/

Module path: forge.lthn.ai/core/agent

All packages build, all tests pass.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 15:23:00 +00:00