Commit Graph

86 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 1d2146da77 fix(cli): generate grouped help from command tree
Agent-Profile: https://agent-kanban.dev/agents/05f3d68684e84e89
2026-07-24 01:32:06 -04:00
saltbo dc9d0a440e feat(maintainers): serialize webhook dispatch 2026-07-20 02:51:33 -04:00
saltbo 84520b75ea feat(runtime): support AMA 0.7 structured runtimes 2026-07-18 02:06:17 -04:00
saltbo a989f3625c feat(cli): add Windows runtime support
Bundle a pure C Node-API process ancestry addon, support Windows runner installation and executable discovery, and make runner lifecycle and logs cross-platform.\n\nAdd Windows CI and release packaging for the native addon.\n\nCloses #210
2026-07-17 01:39:16 -04:00
saltbo 0cfd68954f chore(dev): refine AK skills and test tooling 2026-07-12 17:55:40 -04:00
saltbo aaf474627f fix(maintainers): send memory access as mount readOnly
Pin the AMA SDK to the runtime contract commit and emit maintainer memory resources as memoryRef volumes with readOnly on volumeMounts.
2026-07-05 00:26:31 -04:00
saltbo 6afa922866 feat(maintainers): manage AMA-backed variables 2026-07-04 22:29:42 -04:00
saltbo 1c5d6e3f8e feat(cli): add subagent session filtering 2026-07-03 15:02:11 -04:00
saltbo 7f3176dd51 chore(ama): pin sdk to commit 2026-07-02 13:53:45 -04:00
saltbo a1d3a8ba66 chore(ama): pin sdk to release tag 2026-07-02 13:51:45 -04:00
saltbo 899a6b1491 fix(cli): require isolated worker home for GitHub auth 2026-07-02 11:23:49 -04:00
saltbo 39c2af4516 chore(maintainer): rename session key label 2026-07-02 11:10:01 -04:00
saltbo 6c30dee99c fix(maintainer): namespace GitHub session key label 2026-07-02 10:53:55 -04:00
saltbo 0e087fbaa3 fix(maintainer): key sessions by trigger label 2026-07-02 04:49:06 -04:00
saltbo 17e835fa3a fix(ama): align session event contract 2026-07-01 20:18:45 -04:00
saltbo 15f977bdbc fix(runtime): update AMA runner to 0.5.1 2026-07-01 16:30:20 -04:00
saltbo 99533051cb fix(ama): adapt to latest sdk resources 2026-07-01 03:40:06 -04:00
saltbo fc6f434262 fix(ama): adapt to updated sdk facade 2026-06-28 09:54:45 -04:00
saltbo 6e2d7df208 feat(maintainers): show session activity 2026-06-25 22:54:07 -04:00
saltbo 8440a6bceb fix: harden AMA maintainer integration 2026-06-25 02:32:58 -04:00
saltbo 3807ee189d feat: wire maintainers to AMA events and memory 2026-06-25 01:28:57 -04:00
saltbo f5a9a8cedc feat(chat): dual-path ChatPanel so new + old ak clients both render
Backward compatibility for the session-event/relay migration: after the new
server deploys, an un-upgraded ak (legacy daemon) must keep showing its task's
session in the web chat alongside a new ak (AMA runner).

- ChatPanel branches per task: ama.sessionId annotation present -> the AMA path
  (snapshot of the AMA session events, now sourced from the Session DO for
  cloud-loop runtimes); absent -> the surviving RelayRuntimeProvider legacy
  tunnel keyed by the task's active_session_id. The AMA snapshot logic moved
  into an AmaSessionChat sub-component so its hooks stay unconditional.
- TaskChatDrawer derives amaSessionId + relaySessionId and threads them through.
  Neither path blanks the other; each task detail shows its own transcript.
- Bump @any-managed-agents/sdk to 2ce8c56 (Session DO + stream() facade).

Gate: pnpm build + pnpm typecheck + npx vitest run green (2600 + 17 new
ChatPanel branch tests).
2026-06-20 04:25:21 -04:00
saltbo 788ee67ab9 chore(ama): pin @any-managed-agents/sdk to merged main (6d80103)
PR saltbo/any-managed-agents#72 merged the community-generated SDK + facade
into main; repin off the feature-branch commit.
2026-06-20 00:28:52 -04:00
saltbo 97b864c283 refactor(ama): drive amaRuntime through the typed SDK facade
Replace the hand-written `new AmaClient().request("opId", body)` calls (body
typed `unknown`) with the SDK's resource facade — `createAmaClient(...)
.<resource>.<verb>(...)` — so every request body and response is checked
against the OpenAPI contract at compile time. Drops the four internal
Ama*Response shadow interfaces (the generated models are their supertypes).

Pin @any-managed-agents/sdk to 3a435be (community-generated SDK + facade).

AMA test fetch mocks updated for the standards-compliant client: it calls
fetch(new Request(...)) with one argument and parses JSON by content-type.

build + typecheck + full suite (2600) green.
2026-06-20 00:21:42 -04:00
saltbo 69d11f3c5c feat(maintainers): hard-delete a maintainer instead of archiving it
Deleting a maintainer now truly removes it on both sides: the AK board_maintainers
row is deleted, and the AMA trigger (plus its runs) is deleted via the new
deleteTrigger endpoint — no more soft archive. Pause/resume still covers "stop but
keep"; delete is permanent.

- Bump @any-managed-agents/sdk to a929816 (adds the deleteTrigger operation).
- amaRuntime: archiveAmaScheduledAgentTrigger → deleteAmaScheduledAgentTrigger
  (calls deleteTrigger; AMA returns 204).
- boardMaintainerRepo: add deleteBoardMaintainer (hard delete).
- routes: maintainer DELETE now deletes both sides, returns { ok: true }.
- console: the maintainer "Archive" action becomes a destructive "Delete" with a
  confirm.
- tests: the maintainer DELETE tests assert the trigger DELETE + row removal.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 23:40:47 -04:00
saltbo 61dec8f627 refactor(cloud): adapt to AMA's global de-tenanted model catalog
AMA de-tenanted its model catalog into a single global vendor catalog
auto-discovered from models.dev, removing per-tenant provider CRUD and the
per-runtime cloud-models endpoint. Adapt AK to match (SDK pin 5d2d602->e921866):

- listRuntimeModels (GET /runtimes/{runtime}/models, REMOVED) -> listModels
  (GET /api/v1/providers/models, runtime-agnostic global catalog). modelCatalog
  cloud path fetches it and re-imposes AK's preferred order (kimi-k2.7-code,
  gpt-oss-120b first) since the global catalog is unordered; self-hosted still
  discovers models from live runner capabilities.
- createProvider/upsertProviderModel/listProviders (REMOVED): provider identity
  is now the vendor slug (providers.id === slug), so resolveAmaProviderModelProfile
  is pure -- it derives the vendor from the model id (vendorFromModelId) for cloud
  and uses a runtime->vendor map for self-hosted. No more per-dispatch AMA calls.

Smoke (live ama.tftt.cc): claude 11/11, ama 10/10, mixed 11/11.
2026-06-16 13:10:53 -04:00
saltbo d1ee9d371e refactor(cloud): fetch the cloud model catalog from AMA, drop the AK hardcode
The cloud model list was duplicated: AMA's RUNTIME_CATALOG.ama and AK's own
CLOUD_RUNTIME_MODELS. Make AMA the single source of truth — AK's
listRuntimeModels now fetches GET /api/v1/runtimes/{runtime}/models (new SDK op
listRuntimeModels, SDK pin 9a918c8->5d2d602). A non-empty result is a cloud
runtime; self-hosted runtimes return [] and fall through to runner-capability
discovery. The smoke's ama default model is likewise dynamic now
(ak get model --runtime ama -> data[0] = kimi-k2.7-code), so a catalog change
applies everywhere from one place. Verified end-to-end against the live AMA.
2026-06-15 14:47:00 -04:00
saltbo 16867035c2 feat(ama): migrate AK to AMA's /api/v1 control-plane rewrite
AMA rewrote its control plane as a strict RESTful /api/v1 API (#60) and
hardened its v1 schema (resetting data). Adapt AK to the new contract and
re-verify the full self-hosted + cloud task lifecycle.

- Bump @any-managed-agents/sdk pin to the refactored main (9a918c8).
- Rewrite amaRuntime.ts to /api/v1 operations and shapes:
  createSessionCommand->createSessionMessage (message->content),
  stopSession->updateSession{state:stopped},
  createExternalProjectBinding->createFederatedTenant (+session:poll/claim
  caps, 409-idempotent), scheduled-trigger ops->trigger ops,
  readUsageSummary->listUsageRecords (summed, cursor-paginated, limit 100).
  Field renames: runtimeEnv->env, secretEnv credentialRef{credentialId,
  versionId}, provider->providerId, session status->state, runner
  state->status.
- taskDispatch/routes updated for the new secret-env, session.state and
  federated-tenant call sites.
- Pin ama-runner v0.3.1 (/api/v1 self-hosted runner protocol + 404 re-register
  self-heal).
- Smoke: mixed scenario now runs claude locally (+ ama cloud).
- Update AMA-contract unit/integration tests to the new shapes.

Verified locally: daemon smoke claude 11/11, ama 10/10, mixed 11/11;
build + typecheck + 1768 unit/integration tests green.

Server-side AMA fixes pushed to main + deployed separately: AMA_VAULT_
ENCRYPTION_KEY secret, runner 404 self-heal (v0.3.1), idle-session resume
via work item, live-prompt turn-end fix, sandbox.exec AbortSignal-over-RPC fix.
2026-06-15 06:07:39 -04:00
saltbo 0f1d549770 feat(cli): drop provider runtime SDKs from the npm install footprint
The claude/codex/copilot/ACP SDKs are only exercised by optional
provider features (model listing, dormant execute/history paths) —
execution lives in the external ama-runner. Load them lazily with a
graceful not-installed error and ship them as devDependencies: a fresh
npm install shrinks from ~851MB to ~6MB, small enough for environments
without a populated npm cache. The standalone bundle keeps its stubs;
the workspace-linked dev CLI still resolves the SDKs.
2026-06-11 19:33:18 -04:00
saltbo 19eef6f419 feat(runtime): integrate AMA runner onboarding 2026-06-07 19:19:42 -04:00
saltbo 3bd8ad366e feat(runtime): dispatch AK tasks through AMA 2026-06-07 17:13:42 -04:00
dependabot[bot] d0f8f4d9a7 chore(deps): bump hono in the npm_and_yarn group across 1 directory (#156)
Bumps the npm_and_yarn group with 1 update in the / directory: [hono](https://github.com/honojs/hono).


Updates `hono` from 4.12.12 to 4.12.14
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.12.12...v4.12.14)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.12.14
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-05 00:21:56 -04:00
saltbo a4f8f76a0f feat(auth): require email verification 2026-05-04 23:35:30 -04:00
saltbo 39db878793 feat(web): split board settings and add metric badges 2026-05-04 16:41:27 -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 bfe093021c feat(providers): add GitHub Copilot provider via @github/copilot-sdk
- Add 'copilot' to AgentRuntime union, AGENT_RUNTIMES, RUNTIME_LABELS, RUNTIME_ALIASES in shared types
- Implement CopilotProvider with execute(), getHistory(), fetchUsage()
- Map SDK SessionEvent → AgentEvent via mapCopilotEvent() generator
- Track active sessions for concurrency-safe getHistory() during execution
- Fetch usage via GET /copilot_internal/user with gh auth token
- Register provider in registry.ts and add COPILOT_CLI env var detection in runtime.ts
- Add 43 unit tests for mapCopilotEvent and copilot.test.ts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-14 22:18:21 -04:00
saltbo dcc735d0f1 feat(cli): add auto-upgrade check and server-side version gate
CLI sends X-CLI-Version header with every API request. Server middleware
rejects outdated clients with 426 when MIN_CLI_VERSION is set (heartbeat
excluded so old machines can still report in). CLI checks npm registry
for updates on startup (24h cache, skipped for npx/worker-agent) and
prints a stderr notification. `ak upgrade` command detects install
method (npx/volta/npm -g) and runs the appropriate upgrade command.
2026-04-13 13:29:36 -04:00
saltbo 75b93954be chore: upgrade vite to v7, align CF deps with zpan 2026-04-13 09:44:19 -04:00
saltbo d4754ba35f chore: upgrade wrangler to 4.82.0 2026-04-13 09:22:21 -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 afa23c373a feat(chat): per-tool UI renderers with diff viewer and syntax highlighting
Extracts ChatPanel internals into components/chat/ and registers
per-tool renderers via makeAssistantToolUI so each Claude Code tool
(Bash, Read, Edit, MultiEdit, Write, Grep, Glob, Task, TodoWrite,
WebFetch, WebSearch, AskUserQuestion, ExitPlanMode, SlashCommand,
NotebookEdit) gets a compact collapsible with a one-line summary and
purpose-built details. Unknown tools and mcp__* calls fall through to
a smarter ChatToolFallback that parses the MCP namespace.

- FileDiff uses react-diff-viewer-continued (word-level highlight,
  line numbers, auto light/dark palette)
- CodeBlock uses prism-react-renderer with lang autodetect from file
  extension, auto light/dark theme via a useIsDarkMode hook
- Adds /mock/chat route backed by useExternalStoreRuntime with
  ThreadMessageLike fixtures (including a running message to exercise
  loading/spinner states) so the mock page exercises the exact same
  component tree as the live ChatPanel
2026-04-08 20:18:51 -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
dependabot[bot] 208263cf0e chore(deps): bump the npm_and_yarn group across 1 directory with 2 updates (#130)
Bumps the npm_and_yarn group with 1 update in the / directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.4.1 to 6.4.2
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.4.2/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.4.2/packages/vite)

Updates `picomatch` from 2.3.1 to 2.3.2
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.4.2
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-07 15:37:44 -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