Commit Graph

36 Commits

Author SHA1 Message Date
jarvis 3f98b2a40d fix(ui): align assistant UI runtime dependencies 2026-09-02 14:05:02 -04:00
jarvis 10f315930a fix(v2): harden boundaries and clean final artifacts 2026-09-02 09:50:29 -04:00
jarvis b301aac96a fix(build): align v2 toolchain and CI configuration
Pin the Biome version used by CI, align Cloudflare worker types, resolve the Assistant UI peer graph, and apply the matching formatter output.
2026-09-02 00:25:20 -04:00
jarvis a2fa54a729 feat!: rebuild Agent Kanban for Realmroot Toolbox
Replace the v1 Agent/Machine runtime and CLI architecture with the v2 Resource Server, AMA-backed projections, task lifecycle, session observation, BDD specifications, and a single-package layered codebase.

BREAKING CHANGE: remove the v1 CLI, internal Agent/Machine runtime entities, workspace layout, and legacy runtime coordination APIs.
2026-09-02 00:17:52 -04:00
saltbo d2c6c6c5f6 fix(auth)!: restore AK-owned agent sessions
Use Realmroot only for human and machine authentication, authorize AMA through the browser user's multi-resource grant, and restore AK-managed Ed25519 Agent sessions.

Preserve Better Auth source tables while removing the mistaken Realmroot Agent binding and machine M2M paths.

BREAKING CHANGE: AK no longer accepts Realmroot Agent tokens or AMA machine credentials; active browser users must sign in again to authorize the AMA resource.
2026-08-21 01:55:28 -06:00
saltbo 972673aecd feat(auth)!: snapshot Realmroot native cutover
Replace Better Auth user, machine, and agent authentication with Realmroot native flows, migrate tenant ownership, and route AMA access through the cutover adapter. Preserve this deployed migration state as the baseline for the narrower user-auth-only redesign.
2026-08-21 00:44:07 -06:00
saltbo 0cfd68954f chore(dev): refine AK skills and test tooling 2026-07-12 17:55:40 -04:00
saltbo 3f18ee4ec1 build: add real 'pnpm typecheck' (root tsc --noEmit was a no-op)
The root tsconfig is solution-style (files:[] + references to non-composite
projects), so 'tsc --noEmit' there type-checks nothing — which let an arity bug
slip into taskDispatch.ts. Add a typecheck script that runs tsc --noEmit per
project (shared, cli, web incl. server/worker) and point the CLAUDE.md regression
step at it.
2026-06-18 11:59:01 -04:00
saltbo 74cf8143ec fix(build): rename the root package to break a build recursion
The private root package shared the npm name "agent-kanban" with the
CLI package, so pnpm --filter agent-kanban resolved to the ROOT build
(shared+web). Once apps/web gained a prebuild that builds the CLI, the
chain closed into infinite recursion (web build → prebuild → root build
→ web build …), forking dozens of node processes. Root is private —
rename it; the filter now uniquely matches the CLI.
2026-06-12 00:32:04 -04:00
saltbo 459d6a77cd chore(skills): sync shared leader references 2026-05-05 10:05:21 -04:00
saltbo a4f8f76a0f feat(auth): require email verification 2026-05-04 23:35:30 -04:00
saltbo f0bd425ccd feat(providers): add generic ACP provider with hermes runtime
Introduces a runtime-agnostic Agent Client Protocol (ACP) provider via
`createAcpProvider(config)`. Registering a new ACP-compliant agent is a
one-row config entry in registry.ts; hermes is the first runtime to use
it. Existing claude/codex/gemini/copilot providers are left untouched
pending ACP protocol stabilization.

Also promotes `AgentProvider.getHistory` from optional to required so
every provider commits to a uniform contract. Gemini returns `[]` (no
exposed session store); ACP implements real history via `session/load`.
2026-04-18 15:53:27 -04:00
saltbo 75b93954be chore: upgrade vite to v7, align CF deps with zpan 2026-04-13 09:44:19 -04:00
saltbo c9e9339ec8 refactor: migrate from Pages+Functions to Cloudflare Worker
Unify the app into a single Worker deployment:
- Move functions/api/ → server/, add worker/index.ts entry point
- Merge relay-worker DO (TunnelRelay) into the main worker
- Replace Pages Functions with @cloudflare/vite-plugin build
- Integrate share SSR (OG meta injection) into Hono routes
- Remove dayjs dep from shared (native Date suffices)
- Simplify dev to single `vite dev`, deploy via CF Git integration
- Delete packages/relay-worker/ and Pages-specific _routes.json
2026-04-13 07:58:39 -04:00
saltbo b3b7686d45 feat(skills): enforce CONTRIBUTING.md compliance and interactive confirmation
ak-task and ak-plan skills now require agents to read the target repo's
CONTRIBUTING.md before creating tasks, follow its review process during
PR review, and use AskUserQuestion to interactively resolve uncertainties
with the user before task creation.
2026-04-12 00:49:35 -04:00
saltbo 5e4a89fd5d chore(deps): patch-level security updates
Fixes 16 dependabot alerts (5 high, 11 moderate):
- hono 4.7→4.12.12
- picomatch 4.0.3→4.0.4, 2.3.1→2.3.2
- brace-expansion 2.0.2→2.0.3, 5.0.4→5.0.5
- path-to-regexp 8.3.0→8.4.2
- defu 6.1.4→6.1.7

Also bumps other patch/minor deps across the monorepo.
2026-04-08 15:02:58 -04:00
saltbo c2ca0175da feat(web): rewrite ChatPanel with assistant-ui components
Replace hand-rolled event stream UI with assistant-ui primitives:
- Add @assistant-ui/react + @assistant-ui/react-markdown
- Create RelayRuntimeProvider bridging WebSocket relay to ExternalStoreRuntime
- Use MessagePrimitive.Parts for text/reasoning/tool-call rendering
- Add tool_use.id and tool_result.tool_use_id to ContentBlock for proper correlation
- Scaffold Reasoning, ToolFallback, MarkdownText components via assistant-ui CLI
2026-04-02 09:03:55 -04:00
saltbo 7a37a72fe3 feat(cli): replace spawn-based Claude/Codex providers with official SDKs
Claude provider now uses @anthropic-ai/claude-agent-sdk query() with typed
SDKMessage events (precise rate limit info, utilization, rateLimitType).
Codex provider now uses @openai/codex-sdk Codex class with streamed threads.
Both support bidirectional communication via streamInput/multi-turn threads.
2026-04-01 19:50:48 -04:00
saltbo 7d18fac4f7 feat: agent mailbox inbox + GPG sync hardening 2026-03-28 11:22:55 -04:00
Jasper Van 904c5a3632 feat: add GPG root key infrastructure per owner (#104)
Add gpg_keys table, gpgKeyRepo layer, and GET /api/gpg/public-key endpoint.
Each owner gets one root GPG key (auto-created on first use), with addSubkey
support for generating per-agent signing subkeys.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 00:56:38 -04:00
saltbo 591095c37a feat: agent avatar floating animation + onboarding demo board
Board-level SSE endpoint streams task_notes for all tasks in a board,
enabling real-time agent avatar animations on the kanban board.

Backend:
- Board SSE endpoint (GET /api/boards/:id/stream) with ownerId scoping
- getBoardNotes() query joining agents for public_key/kind
- 9 integration tests for board SSE

Avatar system:
- Unified FloatingAvatar with 8 animation phases: spawning, flying,
  absorbing, emerging, dragging, working, returning, leaving
- useAgentPresence choreography engine: SSE events trigger multi-step
  animation sequences (spawn→fly→slide→absorb for claims, etc.)
- useBoardSSE hook for board-level EventSource with dedup
- Card effects (liftCard/slideCard/resetCard) for cross-column drag
- Framer Motion AnimatePresence + layout for within-column animations

Onboarding demo:
- DemoBoard with scripted 75s animation showcasing full task lifecycle
- Two rounds: sequential (approve + reject→retry) and concurrent (3 agents)
- Composable sequence builders (seqClaim, seqReview, seqApprove, etc.)
- Agent soul absorb/emerge animations with glow suppression control

Route restructuring:
- /onboarding — demo board showcase
- /boards/new — create board + add machine (split from old Onboarding)
- BoardPage cleaned up, no more _new sentinel

TaskCard changes:
- Shows assigned agent in gray before claim, colorizes on in_progress
- glow_suppressed field for animation timing control
- Framer Motion layout animations via motion.div wrapper

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 00:37:08 -04:00
saltbo 4c029ce0d1 fix: restore @biomejs/biome dependency removed by pnpm remove prettier
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:21:57 -04:00
saltbo d84dc66373 refactor: replace prettier with biome for formatting and linting
Prettier's aggressive line-splitting (printWidth 100, single quotes) didn't
match the project's existing compact code style. Switch to Biome which
provides formatting + linting in one tool with better chain-call handling.

- Remove prettier, add @biomejs/biome
- Configure biome: double quotes, lineWidth 150, recommended lint rules
- Update lefthook pre-commit to use `biome check`
- Full codebase format pass with new config

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 19:51:41 -04:00
Jasper Van 60a41acbaa feat: setup lefthook pre-commit hooks with prettier and typecheck (#8)
Adds quality gates enforced on every commit:
- Prettier formatting check on staged files
- TypeScript type checking across all packages

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 19:12:23 -04:00
saltbo b285b60ad6 ci: add GitHub Actions CI with test coverage and badge
- Add CI workflow: build, type check, test with coverage on PRs and master
- Configure vitest coverage (v8 provider) scoped to source directories
- PR coverage report via vitest-coverage-report-action
- Coverage badge via GitHub Pages (no external services needed)
- Update CLAUDE.md with post-write workflow and testing conventions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 15:46:45 -04:00
saltbo 8ffd0b3ea5 test(e2e): add Playwright test suite covering all pages
87 tests across 8 modules: Auth, Routing, Board, Header,
Settings, Machines, Agents, Repositories. Vite dev port
configurable via VITE_DEV_PORT env var for parallel development.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 14:43:53 -04:00
saltbo 36d50cb779 chore: switch license to FSL-1.1-ALv2 and move repo to saltbo org
Replace MIT with Functional Source License (converts to Apache 2.0
after two years). Update all references from bonaysoft/agent-kanban
to saltbo/agent-kanban.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 00:09:45 -04:00
saltbo c21f37b709 fix(cli): bundle shared package with tsup to fix npx install failure
@agent-kanban/shared used workspace:* protocol which npm cannot resolve
when installing from registry. Switch build from tsc to tsup so shared
code is inlined at build time, eliminating the runtime dependency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:21:43 -04:00
saltbo 769986888c fix(scripts): smoke test picks developer agent instead of first agent
The smoke test was blindly selecting the first agent from the list,
which could be a builtin like Quality Goalkeeper. Now filters by
developer role and auto-creates from fullstack-developer template
if none exists.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 10:49:46 -04:00
saltbo ea9940b761 feat(web): redesign create agent dialog with recruit/custom flow and upgrade to Tailwind v4
- Add two-path agent creation: "Recruit" from templates (fetched from GitHub)
  or "Custom" from scratch
- Templates fetched dynamically via shared fetchTemplateIndex/fetchTemplate
- Move template types and fetcher from packages/cli to packages/shared
- handoff_to: multi-select dropdown from existing agent roles
- skills: tag input with Enter to add, Backspace to remove
- Upgrade Tailwind CSS v3 → v4 with @tailwindcss/vite plugin
- Initialize shadcn/ui: Dialog, Button, Input, Label, Textarea, Select
- Map shadcn color tokens to project design system in globals.css
- Use shadcn components throughout (no hand-rolled form elements)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 00:10:47 -04:00
saltbo fa0a4c5cda fix: replace deprecated wrangler proxy with concurrently for local dev
The `wrangler pages dev -- command` syntax was removed in wrangler v4.
Run vite and wrangler as parallel processes via concurrently instead.
Remove changeOrigin so OAuth callbacks redirect to vite (5173) not
wrangler (8788).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 17:13:49 -04:00
saltbo 0080ba2e53 fix: agent JWT passthrough, ApiClient hierarchy, lint pipeline, rate limit config
- ApiClient as abstract base class, MachineClient/AgentClient as subclasses
  differing only in authorize() — no duplicated method sets
- Daemon exports Ed25519 private key via env vars to spawned agent process
- createClient() factory returns AgentClient or MachineClient based on env
- processManager: agentClient is required (not optional), no fallback
- Fix rateLimitEnabled (invalid key) → rateLimit: { enabled, maxRequests, timeWindow }
- Add lint script to all workspaces, root lint runs pnpm -r --parallel
- Add @cloudflare/workers-types via env.d.ts triple-slash reference
- Fix machine-usage.test.ts: heartbeat→updateMachine, add missing ownerId param
- Fix frontend type errors (useRef init, res.json() typing)
- Add cli-agent-jwt integration test validating full JWT auth flow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 10:13:23 -04:00
saltbo 70d2ab06d5 fix: agent JWT must include typ, aud, and forceAllowId for BA adapter
Integration tests revealed three issues with the agent-auth bridge:
- BA adapter silently ignores custom IDs without forceAllowId: true
- Agent JWT requires typ: "agent+jwt" in protected header
- Agent JWT requires aud claim matching the server URL

Adds integration test suite (miniflare + real D1) covering the full
agent-auth flow: machine/host creation, agent registration in both
tables, JWT verification, and rejection of invalid/unsigned tokens.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 21:53:32 -04:00
saltbo 531e1936c0 fix(cli): fix Node.js ESM build — add @types/node, nodenext module resolution, ak alias
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:17:20 -04:00
Jasper Van d8fffb55ce feat: Agent Kanban v1.2.0 — agent observatory, dependencies, SSE streaming (#1)
* feat: Agent Kanban v2 — agent observatory, dependencies, SSE streaming

Transform the board from a task tracker into an agent observatory with
real-time visibility, platform-driven assignment, and dependency-aware
task coordination.

- Agent entity: status tracking (idle/working/offline), GET /api/agents
- Task dependencies: depends_on with cycle detection, blocked computation
- Task origin: created_from for subtask tracking
- Assign/Release: POST /api/tasks/:id/assign and /release endpoints
- Stale detection: auto-release after 2h, write-on-read in board fetch
- SSE streaming: GET /api/tasks/:id/stream with polling fallback
- CLI: task assign/release, agent list, --parent/--depends-on flags
- UI: ActivityLog, AssignDropdown, AgentProfile, SubtaskList, blocked badges

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(review): address 5 review findings from pre-landing review

- Narrow SSE auth bypass to exact path pattern (was too broad)
- Fix SSE reconnection: resolve log ID to timestamp for since filtering
- Compute blocked status in getBoard() so kanban view shows blocked badges
- Remove dead code in useSSE polling fallback
- Rename fetch→load in useAgents to avoid shadowing global

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: bootstrap test framework (vitest)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: enum completeness coverage for v2 actions and agent statuses

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: bump version and changelog (v1.2.0)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: sync CLAUDE.md with v1.2.0 patterns

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:51:35 -04:00
saltbo 79ecb56e77 feat: Agent Kanban v1 — full implementation
Monorepo with Hono API (Cloudflare Pages + D1), React SPA, CLI, and agent skill.

- API: boards CRUD, tasks CRUD, claim/complete, logs, auth (Machine-level API keys + auto-registered agents)
- Web UI: kanban board, inline task creation, slide-out detail with editing (title, description, project, priority, column move), filter bar, onboarding flow, dark mode, settings page
- CLI: config, task create/list/claim/log/complete, board view, smart project detection
- Skill: SKILL.md teaching agents the CLI workflow
- Design system: Geist + Geist Mono, cyan accent, industrial/utilitarian aesthetic

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:56:37 -04:00