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.
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.
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
The migration's final gate: drive one server with both a new-version ak (AMA
runner) and the last pre-AMA published ak (agent-kanban@1.13.4, legacy daemon)
at the same time, and assert each task renders on its own path — the new ak's
task is AMA-bound (ama.sessionId + AMA session events; ChatPanel AMA path), the
old ak's task has a relay session (active_session_id; ChatPanel legacy tunnel),
and neither blanks the other.
Pins + launches both ak versions against one local AK (ak用本地环境) talking to
the online AMA (AMA_ORIGIN). Documents the live prerequisites (local AK dev
server, ak auth, runtime creds) the acceptance run needs on the operator's host.
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.
kimi-k2.6's Workers AI upstream went into a sustained degradation (every
cloud session stopped with 'Provider request failed'), which broke cloud +
mixed smoke at the reject-resume step (a dead session can't resume in place).
The AK/AMA code path is correct — verified by real PRs once a healthy model
runs. Switch the cloud model catalog + smoke default to kimi-k2.7-code (same
moonshot family, healthy backend, code-focused) and list gpt-oss-120b as a
cross-vendor fallback. Cloud smoke now 10/10 incl. reject-resume (slink#103).
llama-3.3-70b was evaluated and rejected upstream (no tool_calls in the
runtime-core harness). Tests updated to the new catalog.
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.
Runners enumerate real host models now; pinning the retired
gpt-5.3-codex id selected a model no runner declares and precise lease
matching correctly refused the work.
AMA validates the session model against the runtime catalog and the
runner only declares gpt-5.3-codex; the previous spark pick fell back to
gpt-5.5 and session creation 409'd.
The status assertions decide pass/fail; a rejected ak command (e.g.
complete on a task stuck in_progress) should produce a FAIL line, not
kill the remaining tests.
npm is unusable inside AMA sandboxes (npm worker processes orphan the
exec pipe and the install never returns), so cloud sessions can't
npm-install the CLI. Build a fully-bundled dist/standalone.js (provider
runtime SDKs stubbed out — cloud agents only use the API-client
commands), serve it from the web app at /cli/ak-standalone.mjs with a
one-line /cli/install.sh bootstrap, and point the cloud initial prompt
at it.
New agent runtime "ama" runs tasks on AMA's Cloudflare Sandbox plane:
per-owner cloud environment, capacity-gate-free dispatch, self-contained
cloud initial prompt (install ak CLI, claim, branch, push, PR via GitHub
API), GH_TOKEN delivery from GITHUB_AGENT_TOKEN via an owner-scoped AMA
vault credential.
Atomic dispatch claim (ama.dispatch.result=dispatching) closes the
create/assign vs cron-sweep race that double-created sessions and tore
the first one down mid-run; assigns claim with takeover so a deliberate
re-assign still kicks a bound task; stale claims are released by the
sweep. Cancel now also works on todo tasks so swept tasks can be
stopped.
Smoke covers ama + mixed placements with a dev sweep loop and
deterministic subagent evidence.
- Install the server-pinned runner version when machine registration
provides one; extract inside BIN_DIR (tmpfs rename breaks cross-device);
fail fast when onboarding credentials are missing instead of silently
spawning a runner with no token; use one trimmed origin for --api-server
and the config file so the runner adopts its saved token.
- ak stop deletes the token-bearing runner config; status shows real
detected providers and live runner health; dead --poll-interval/
--task-timeout flags and the never-firing shutdown prompt are gone.
- The CLI reaps leader sessions whose runtime process died (close + usage
report), replacing the old daemon heartbeat cleanup.
- Smoke script asserts server-side binding teardown instead of local
session files, and no longer trips EPIPE on ak status.
Maintainers are board-level and scheduled (AMA ~5m cron), so they do not fit the
per-task daemon smoke. Layer A checks the CLI/API contract; --live waits for the
cron to dispatch a real heartbeat run.
Moved to saltbo/saltbo repo where it now watches the whole CF account
(agent-kanban + other workers) and attributes trips to a specific
scriptName / databaseId. Keeping a duplicate here would double-alert.
GitHub Actions passes unset repo variables as "" rather than undefined,
so `??` would not fall through to defaults. `Number("")` is 0, which
caused every metric to trip on the first manual run. Switch to `||`
so both undefined and "" drop to the built-in defaults.