Repository navigation
Plan 323 P3 + P3b — models on this computer, diagnosed, managed, and changed by Helmsman with approval - #123
Merged
Merged
Conversation
…in the chat The Ollama adapter reads /api/ps before a request whose caller listens for runtime phases; when the request would load the model it loads it first, at the request's window, so the end of the load is observable. The agent turn writes each phase to a new 'status' live-delta channel, and the chat's activity row shows it in place of 'Working…' until the first token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LocalRuntimeDiagnostics in @aflow/schemas and diagnoseLocalRuntime in @aflow/ai-client: installed and lineup models with fit, what is loaded and how much of it is on the GPU, the build against the measured one, and issues each with a cause carrying its numbers and a remedy that is an action or an instruction. The runtime client gains version, installed, pull and remove; the host inventory publishes free disk under the model store. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…om the UI - @aflow/cybernetic-runtime localModels: resolveSpaceLocalRuntime (moved from the server so Helmsman's operations reach the same runtime), diagnoseSpaceLocalRuntime, applyLocalModelAction (pull with a disk check and one claim per runtime and tag, delete, warm, unload, set the window), and cancelLocalModelPull. - @aflow/redis localModelPulls: the pull's claim and progress in one record, renewed by its progress, with the cancel read on the same round trip. - Routes: GET /spaces/:id/local-models (the diagnosis), POST .../actions (a LocalModelAction), DELETE .../pulls/:model. - Readiness derives localFit and localIssues from the diagnosis; an error issue counts against ready, and the banner points at This Computer. - This Computer gains 'Models on this computer': runtime and machine, each issue as a card whose button runs its remedy, and per-model download with progress and stop, load, unload, use for every role and delete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… computer - In the local edition a tenant following the platform recommendation may assign the catalog's models on this computer (allowedModelIds takes the edition); a tenant that named its set is held to it. - Onboarding offers them beside the hosted models. Choosing one puts every role on it, the Clerk included, adds an Ollama connection unless one already resolves, and skips the key step. - A run whose every model call ran here reads 'Cost: local', and so does each such step, rather than showing no cost at all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… plan 323 D18 and P3 state cleanupStaleConsumers takes the consumer groups to visit, every executor job stream's by default. Its two real-Redis tests walked every job stream of the Redis the live stack shares, so they reaped the stack's idle executor consumers, counted them, and deleted its eval job stream; they now hand hygiene a stream of the test's own, which keeps the pending guard exercised. Plan 323: D18 (local models assignable under the recommendation in the local edition) and what P3 built and did not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nging it - model.runtime.status and model.runtime.change, in a 'model' step type whose lane only the local edition composes; inline in the orchestrator over the shared localModels code. Capability group model.runtime (migration 220), bundle local_models, discoverable by Helmsman with the status read pinned on the local edition; Runner-excluded and refused in skills. - The change parks on the write-approval pause as a third target, 'local_model', through payload, blockedOn, Action Center item and card, and the chat notice. Its request is rebuilt from a fresh diagnosis on every run and its hash covers the impact — requests in flight that an unload or delete ends, whether the asking conversation runs on the model, the change's own figures — so a changed impact asks again. - spendBrowserApproval becomes spendWriteApprovalGrant, the one spend for any target, under aflow:approval-spent: which the host's ACL may write. - onboarding-flow.tsx stays under the 1500-line ceiling: provider data and the model card move to their own modules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Free disk and a loaded model's cache size change continuously; in the hash, an approved change would find no grant for the request it now makes and ask again. The hash covers the change and what it ends; the figures stay on the card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…vive silence - A model-runtime approval item carries resolverPolicy ['admin'], the role the operator's own routes for these changes require; a write member could otherwise approve a delete or a window change they could not make directly. - The approval hash keeps the change and whether it reloads the asking conversation; the runtime-wide count of requests in flight, which no lease ties to a model, moves to the card only, worded as what it is. - A pull's lease is ten minutes, outlasting the runtime's silent digest check; every progress write carries the status, so a lapsed record is rebuilt whole; a stream that ends without 'success' is a failed pull, not an installed one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan 323 P3 and P3b, plus D17 and D18, and a test fix. Plan:
docs/plans/323-models-that-run-on-this-computer.md.What it does
D17: loading shown in the chat
While a turn waits on a model on this computer, the chat's activity row says so in place of "Working…": "Loading Gemma 4 26B (this computer) into memory…", then "Reading the conversation…". The first thinking or text token replaces it.
/api/ps. If the request would load the model, the adapter loads it first at the request's window, so the load has a visible end.statuslive-delta channel.D15 and P3: one diagnosis, and the models on This Computer
LocalRuntimeDiagnosticsanddiagnoseLocalRuntime. Every issue carries a cause with its numbers and a remedy, which is either an action or an instruction.localFitandlocalIssuesfrom the record. An error issue, such as Ollama down or a role's model not downloaded, counts againstready, and the banner points at This Computer.@aflow/cybernetic-runtimelocalModels/.P3b: Helmsman reads and asks
model.runtime.statusandmodel.runtime.change, in amodelstep type that only the local edition composes. They run inline in the orchestrator.model.runtimegroup to the system profiles.local_model, with its own Action Center card. A space admin answers it.spendWriteApprovalGrant, which browser actions now share.Test fix
streamRetention's consumer-hygiene tests walked every job stream on the Redis the live stack shares. They reaped the stack's idle consumers and deleted its eval job stream.cleanupStaleConsumersnow takes the groups to visit, and the tests use a stream of their own.Not built (stated in the plan)
Helmsman cannot assign a role's model. That goes through the space update, which no executor reaches, so Helmsman tells the operator to do it.
Review findings left as they are
aflow:browser-ask:spent:toaflow:approval-spent:, so for up to an hour after deploy a browser approval spent before it reads as unspent. The host's ACL gains~aflow:approval-spent:*, and a host executor running new code before the server has re-applied ACLs gets NOPERM on a spend until the server restarts.servesWithoutLoadingcompares/api/pscontext_lengthwith the window on llama.cpp. If the runtime ever reported a different figure, each request would report loading and send an extra (no-op) load. Not seen in the tests against 0.40.5.Testing
yarn typecheckand the web-product build pass.yarn test:changedpasses exceptaflow-executor-hostcheckoutReplacement("cannot be made from inside the sandbox"). It also failed before this branch's host changes and imports nothing it touches.🤖 Generated with Claude Code