cb1948742fdd92522636f602b0fd177d323c9956
156
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
cb1948742f |
feat(claw): show the user's profile in the bottom-left account
android / debug (push) Successful in 2m26s
android / release (push) Successful in 2m19s
ci / checks (push) Successful in 3m48s
ci / test (push) Successful in 1m24s
ci / chart (push) Successful in 7s
ci / docker (push) Successful in 2m11s
ci / web (push) Successful in 15s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 2m17s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 16s
ci / publish-edge-chart (push) Successful in 4s
The web shell's account showed the agent's identity and the word
"connected", which left no way to see or set the human's own name and
picture.
The claw now stores a user profile beside the bootstrap files and
serves it over /v1/user and /v1/user/avatar. The agent sets it during
onboarding with user_profile_set; the bottom-left account in both
sidebars renders it and opens an editor for the name and picture. The
prompt context exposes user_name and user_profile, and bootstrap
documents resolve {{ user_name }}, so USER.md and the other markdown
files can address the user by name.
The connection state stays with the unreachable banner, so the sidebars
no longer report it.
Unit and HTTP tests cover the profile store, the tool, the variable
expansion, and the routes. fmt, clippy, cargo test, nuxt typecheck, and
nuxt build pass; both sidebars and the editor checked at 1280x800.
|
||
|
|
debc21a89f |
fix(web/claw): trim the identity editor and show the logo on About
android / debug (push) Successful in 2m22s
android / release (push) Successful in 2m7s
ci / checks (push) Successful in 3m48s
ci / test (push) Successful in 2m9s
ci / chart (push) Successful in 7s
ci / docker (push) Successful in 1m51s
ci / web (push) Successful in 18s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 2m5s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 15s
ci / publish-edge-chart (push) Successful in 5s
The General page exposed Mark, Initials, and Tagline even though the new shell renders none of them, and a callout explained an identity split that no longer needed saying. The About identity block still drew a green tile with an R. General now edits name, email, and sign-off only. Its save payload omits the retired fields, so values already stored stay untouched. AgentAvatar keeps just the avatar image and the name's initial; the sidebar tooltip now carries the display name. About renders the uploaded logo, or the Rhema mark when none is set. README follows. nuxt typecheck and build pass; General and About checked in light and dark. |
||
|
|
d17d8e2973 |
feat(web/claw): restyle the interface after Rhema Together
android / debug (push) Successful in 2m16s
android / release (push) Successful in 2m9s
ci / checks (push) Successful in 3m39s
ci / test (push) Successful in 2m5s
ci / docker (push) Successful in 1m52s
ci / web (push) Successful in 13s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m56s
ci / chart (push) Successful in 6s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 20s
ci / publish-edge-chart (push) Successful in 4s
The web client kept its own dark shell: an icon rail, neon jade accents, and rows that reported state with colored dots and pills. Rhema Together had since settled on a warmer, quieter language, and the two surfaces no longer looked like one product. The shell is now one 232px sidebar plus a view. Chat lists sessions in the sidebar and renders the transcript in a 760px column; settings moves its searchable nav into the same sidebar and its pages onto an 880px column. The palette, type scale, controls, cards, and markdown come from Together's light theme, with its dark values following the OS. FiraCode Nerd Font Mono sets code, and the product mark, logo, and lucide icons replace the glyph characters. Status is a word now: running, waiting, held, connected, live, snapshot. The rail, its dots, the duplicate consent deny action, and the session key tag are gone. The model backend moved into the chat topbar beside the stream state. The mobile shell keeps the composer fixed in chat and lets settings scroll as a document. README and component docs follow the new layout. nuxt typecheck and build pass; checked light and dark at 1280x800 and 390x844 against mock API data. |
||
|
|
acda9cc537 |
feat(claw): post forge comments only through a tool
A forge dispatch used to post the turn's final assistant message as the thread's comment. A turn that only investigated still posted, and the model could not tell a comment from a private note. Forge turns now carry `forge_comment`, bound to the dispatched thread and forge client. The tool takes the comment body and posts through `Forge::comment`; a turn that never calls it sends nothing. One comment per turn, retried only when the post itself failed. The final assistant message stays in the session. The prompt and SYSTEM.md say so, and both ask the model to call the tool only when the thread needs an answer. The e2e, mention, and continuity tests script the tool call. A new test asserts a text-only turn makes no POST. fmt, clippy with -D warnings, and the rhema-claw tests pass. |
||
|
|
7ad07b3893 |
fix(web/claw): stop settings cards clipping their last row
android / release (push) Successful in 2m29s
android / debug (push) Successful in 2m13s
ci / checks (push) Successful in 4m20s
ci / test (push) Successful in 2m30s
ci / chart (push) Successful in 6s
ci / web (push) Successful in 14s
ci / docker (push) Successful in 2m9s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m55s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 14s
ci / publish-edge-chart (push) Successful in 3s
The settings pages stack cards in a scrolling flex column. The cards kept the default flex-shrink, so a viewport shorter than the content compressed each card to the viewport and `overflow: hidden` cut off its bottom. On Bootstrap that was the byte count and the Save button, and a 1280x800 window showed no way to save SOUL.md or USER.md. Cards now keep their content height; the column scrolls instead. Checked at 1280x800: Save appears under SOUL.md and USER.md, and the input enables it. nuxt typecheck and build pass. |
||
|
|
829f30d27e |
feat(claw): load skills and subagents and edit the identity files
android / debug (push) Successful in 2m12s
ci / checks (push) Successful in 3m42s
ci / web (push) Successful in 12s
android / release (push) Successful in 2m5s
ci / test (push) Successful in 2m12s
ci / chart (push) Successful in 6s
ci / docker (push) Successful in 1m58s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m55s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 15s
ci / publish-edge-chart (push) Successful in 4s
The claw's agents had no skills and no way to delegate, and the settings
surface could only read a pair of booleans.
Skills now seed the bundled `commit-message` and `unslop` folders into
the global directory, discover the global and workspace tiers on every
dispatch, and list them in the prompt. The settings table owns an off
switch per skill, so the Skills page can hold one back without editing
YAML. The config set is the seed.
Subagents build on `rhema-subagents`. Definitions are `SUBAGENT.md`
folders under the global directory and the workspace tier, and the
parent prompt advertises the `subagent` tool. The wire passes the
parent's skills, environment report, and USER.md to the child, so a
delegated turn knows the same context.
The Bootstrap page reads the three identity files and writes SOUL.md
and USER.md. ENVIRONMENT.md stays read-only because the boot pass
rewrites it. The MCP page reads the client's config through the same
file the shell uses and shows servers, transports, and the daemon's
mute set. It stays read-only: the standalone client owns that file.
`GET` and `PUT /v1/bootstrap/{kind}`, `GET /v1/bootstrap/files`, `GET`
and `PUT /v1/skills`, and `GET /v1/mcp` carry the pages. The config
gains `skills_root`, `skills_disabled`, `subagents_root`, and
`disabled_subagents`.
fmt, clippy with -D warnings over all targets, the 304 lib and 46 HTTP
tests, and nuxt typecheck and build pass.
|
||
|
|
eb9f4e9ec5 |
fix(forge): mark a GitHub notification read with PATCH
android / debug (push) Successful in 2m15s
android / release (push) Successful in 2m32s
ci / test (push) Successful in 2m3s
ci / checks (push) Successful in 3m47s
ci / docker (push) Successful in 1m47s
ci / chart (push) Successful in 6s
ci / web (push) Successful in 12s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m52s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 9s
ci / publish-edge-chart (push) Successful in 4s
GitHub's read route is `PATCH /notifications/threads/{thread_id}`; the
adapter sent PUT, which does not exist, so every call answered 404 and
the thread stayed unread. The account feed then returned the same row
again whenever its `updated_at` moved, and that timestamp is part of the
dedup id: the merge bumped the row once, the reply to that turn bumped it
again, so one assignment ran three turns and the merged PR got two
replies.
The test mounted PUT as well, so it asserted the bug. Both now use
PATCH, whose 205 response `ensure_success` already accepted.
fmt, clippy with -D warnings over all features and targets, the
workspace tests, and the doc build pass.
|
||
|
|
5e7e2dcfe7 |
build: take the published rhema 0.5.1
android / release (push) Successful in 2m4s
ci / checks (push) Successful in 3m44s
ci / chart (push) Successful in 6s
android / debug (push) Successful in 2m14s
ci / test (push) Successful in 2m9s
ci / docker (push) Successful in 1m55s
ci / web (push) Successful in 12s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 2m0s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 19s
ci / publish-edge-chart (push) Successful in 4s
0.5.1 reached crates.io, so the workspace drops the temporary `[patch.crates-io]` onto the v0.5.0 tag and resolves the 28 framework crates from the registry. The lock pins their checksums now instead of a git rev. The claw's own version travels with the framework again: the workspace and the chart become 0.5.1. The graph resolves slightly older transitive versions than the tag's workspace did (nom 7 instead of 8, fluent 0.16 instead of 0.17, bech32 0.9 instead of 0.11), because the tag unified versions across crates the claw never links, and the published crates carry their own narrower requirements. No source changes: this is the manifests and the lock. Of what 0.5.1 adds, only `Usage::cost_usd` reaches the claw's graph, and the claw keeps counting tokens without it. fmt, clippy with -D warnings over all features and targets, the 488 workspace tests, and the doc build pass. |
||
|
|
9ac559616c |
build: move the claw to rhema 0.5.0
The 0.5.0 line renames what the claw imports and deletes what it wrapped. The autonomous agent is rhema-rsd now, driver and handler trait included, so every import moves with the name. The MCP bridge is gone outright: no crate, no socket, no generated bash functions. The claw's mcp module stops proxying. It names the client's config file and media directory in the shell env, runs `mcp prompt` once, and renders that text as the prompt section. A session with no client on PATH advertises no servers, which is the 0.5 rule. The config follows. `host_agent.mcp_servers` is gone, `config.mcp` is the client's rendered section, and the bare `claw mcp` subcommand gives way to the standalone `mcp` binary. Secrets leave the OS keyring for the encrypted file store the frontends write. The keyring is copied into that store once, under the service name the claw used, so a deployment that predates the file keeps its logins. rusqlite follows rhema-identity to 0.43, because the framework links libsqlite3-sys 0.40 and two `links = "sqlite3"` packages cannot share a graph. The image carries the toolbox the sessions' habits assume: ripgrep, fd, jq, sd, python3, yq (the Go v4, not Debian's), the mcp client, and lightpanda. Each release binary is pinned by version and by the checksum of every arch's artifact, and the boot report inventories them, so a session knows what it has. gob was already there. 0.5.0 is tagged but not on crates.io, since publishing is retried with 0.5.1, so the workspace carries a `[patch.crates-io]` onto the tag and the lock pins its rev. Deleting the block and running `cargo update` is the whole follow-up once 0.5.1 lands. The claw's own version travels with the framework: the workspace and the chart become 0.5.0. fmt, clippy with -D warnings over all features and targets, the workspace tests, and the doc build pass. |
||
|
|
9e3890c568 |
fix(claw): release the turns a restart cut as superseded
android / debug (push) Successful in 2m24s
android / release (push) Successful in 2m1s
ci / checks (push) Successful in 1m5s
ci / test (push) Successful in 37s
ci / chart (push) Successful in 5s
ci / docker (push) Successful in 1m51s
ci / web (push) Successful in 12s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m51s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 8s
ci / publish-edge-chart (push) Successful in 4s
A record keeps the outcome of its last release. A dispatch that was checkpointing when the process died left nothing newer, so its thread wore the outcome of the turn before it: a handled turn, ending on the first line the model streamed. The mention had been drained before the turn ran, so no reply was ever posted and nothing re-ran the key. Boot now reads the leases the dead process left, recovers them as before, and releases each one as superseded. The cut turn reads aborted instead of borrowing the previous outcome, and the superseded outcome says what the store knows: the work nobody finished is not wanted any longer. |
||
|
|
d1c1e7c8d9 |
fix(claw): read a turn with no release as running or aborted
The read-only transcript closes its newest turn with the record's last outcome, and a record that never released has none, so the turn closed as "handled". A turn a restart cut read back as finished work, with the model's first line standing in for the answer it never gave. No release now reads as what it is: the record holds the lease, so the turn is running, or it does not, so the turn was cut. Handled still means a dispatch finished and posted. |
||
|
|
70b53665d5 |
fix(web/claw): fetch an image again for a card the mirror rebuilt
android / debug (push) Successful in 2m31s
ci / docker (push) Successful in 2m3s
ci / web (push) Successful in 15s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 2m3s
android / release (push) Successful in 2m13s
ci / checks (push) Successful in 1m7s
ci / test (push) Successful in 39s
ci / chart (push) Successful in 5s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 13s
ci / publish-edge-chart (push) Successful in 3s
A page read, a mirror reset, or a turn folding into the record builds new card objects, and the pass that fetches image bytes remembered attachment ids, so a rebuilt card whose bytes had not landed was never asked for again. The guard now rides the card object: a new card gets its fetch, and the useClaw cache answers a repeat with the blob it already holds, so nothing is requested twice. The object URL also lands on every card naming the id, not only the first. A page's open tail is dropped and re-read with the turn's beginning above it, which can leave two cards for one attachment, and the second stayed blank. |
||
|
|
ea6edfe67a |
fix(claw): open a fresh stream on the newest turn's first event
A client with no cursor opens on the newest 400 events, and the route cut that window back to the first question in it. A turn longer than the window has no question inside it, so the cut did nothing and the replay started mid-turn. A reload then landed on the middle of a reply: the question was gone from the top, and so was everything the turn began with, attachments included. A turn that attaches a file and then streams a long answer hits this every time. The window now widens by doubling while it sits inside one turn, up to the history scan cap, and a record that opens inside a turn comes back whole. A record with no question in it reads once to its start and stops, so the walk still terminates. |
||
|
|
04b06e7623 |
fix(web/claw): render and download the images a turn hands over
ci / checks (push) Successful in 1m13s
android / debug (push) Successful in 2m17s
android / release (push) Successful in 2m13s
ci / test (push) Successful in 42s
ci / chart (push) Successful in 5s
ci / docker (push) Successful in 1m52s
ci / web (push) Successful in 12s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m57s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 13s
ci / publish-edge-chart (push) Successful in 3s
An attachment card lands inside the turn that produced it, and both passes that touch image cards scanned only the top-level rows. The pass that fetches bytes never saw the card, so it stayed a name and a size with no picture. The pass that stores the fetched object URL had the same blind spot, so even a fetch that ran dropped its result. Both now walk finished turns and the live one, through one helper that knows where cards live. Consents move to the same helper: a card whose turn already closed had the same problem. The download control was hidden for `media: "image"`, which left an image with no way out of the store when its bytes did not paint, as they never did. Every card offers it now. The anchor also joins the document for the click, which some browsers require before they follow a `download` on a blob URL. |
||
|
|
1a1ace014a |
feat(web/claw): open every key, read-only when it has no stream
android / debug (push) Successful in 2m29s
ci / test (push) Successful in 42s
ci / docker (push) Successful in 2m0s
ci / web (push) Successful in 12s
android / release (push) Successful in 2m17s
ci / checks (push) Successful in 1m13s
ci / chart (push) Successful in 6s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 2m0s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 13s
ci / publish-edge-chart (push) Successful in 3s
Every row in the sidebar was disabled unless its key started with a resident prefix, so a forge thread or a finished job could only be paused or aborted, never read. Now every row opens. A resident key subscribes as before. Any other key loads the snapshot its history route serves, which carries `read_only`; the header says `snapshot` instead of claiming a live stream, and the composer becomes a line saying why there is none. The mirror is the same one the stream feeds, so paging, outcomes, and the turn renderer come for free. That view has no stream to tell it a dispatch ran, so the inventory's revision drives reloads: a poll that sees it move fetches the newest page again, and nothing else does, so the pages a reader walked back to survive polling. `phone:` joins the client's resident prefixes, which the daemon already carried: those rows were dead ends that refused the message the phone client sends every day. The user label follows the key: a chat or phone key's rows are the human's, any other key's are the prompt its dispatch started with. |
||
|
|
8d7dc7c4c7 |
feat(claw): read a non-chat key's history back as a snapshot
The history route served only the resident prefixes, and every other key in the inventory answered 400: a forge thread, a finished coding job. Those keys never stream, because their handlers run outside the hub, so the daemon holds no turn record to page. What it does hold is the session stash the step engine checkpoints after every step, with the engine's own history in it. `thread` turns that history back into the hub's event shapes and cuts pages at turn boundaries with the hub's own rule, so one client renderer paints both a live chat and a finished thread. The store's `last_outcome` lands on the newest turn; earlier turns closed handled. The response carries `read_only`: the key takes no message, which the message route and the event stream already enforce. A key with no stash answers an empty page, since the inventory lists it and an empty transcript is the truth about it. A page ends at `before` and starts on the first user message in its window, widening by doubling while the window sits inside one turn. A turn longer than the limit comes back whole, and `more` says whether anything sits below the page. |
||
|
|
23aea1195d |
refactor(claw): carry the tool seam the 0.4.2 line removed
android / debug (push) Successful in 2m18s
android / release (push) Successful in 2m10s
ci / checks (push) Successful in 2m25s
ci / test (push) Successful in 1m1s
ci / chart (push) Successful in 6s
ci / docker (push) Successful in 1m56s
ci / web (push) Successful in 12s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m52s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 18s
ci / publish-edge-chart (push) Successful in 3s
The 0.4.2 line deletes the resident tool machinery from rhema-autonomous-agent. The claw was its only consumer, so the registry, the TOOL.yaml loader, the allowlist, and the resolver chain now live in `toolkit`, beside the manifests and builtins that feed them. The shapes do not change; only the owner does. The compiler marked the rest of the release's edges: - The resolver seam grew `resolve_streaming`, so the chain returns the shell's output as deltas and a filtered registry still answers the plain call. - `ShellExecutor::run` now takes a `RunRequest` and a `ToolProgress` sink. The sandbox adapter re-roots the request for the wrapped sandbox and relays its `RunOutcome`; `Sandbox::exec` became `Sandbox::run`, so the seed probe follows. - `SandboxError::OutOfMemory` joins the error mapping. - `rhema_core::paste` left the engine with the display encodings, so `paste` here carries the span record, the annotation, and the legacy migration. A stash from either line loads unchanged. - `rhema_bash::exec` no longer re-exports `async_trait`; the tool modules import it from the crate. The dependency pins and both integrations move to 0.4.2 together; the lock refreshes with them. |
||
|
|
ea26019f0c |
build: ship gob in the claw image
A coding turn that starts a dev server or a build has to either wait for it or background it with `&`, and a backgrounded process is gone from the next turn's view: no id, no logs, no port. gob keeps the process table that the agent and the operator both read, so the turn returns and a later one asks what happened. The release carries a static linux binary for amd64 and arm64. The image downloads one from a pinned tag (GOB_VERSION, a build arg) and unpacks it to /usr/local/bin/gob; no package rides along. No other arch is published, so a build for one fails at the download instead of shipping a container whose shell has no gob. The image gains XDG_RUNTIME_DIR=/tmp/run with it. Left unset, gob looks for /run/user/1000, which nothing creates here, and its daemon dies with "socket not created" even though the job table is writable. The socket stays off the volume, where an NFS PVC cannot hold one. The state (state.db, the run logs) follows XDG_STATE_HOME to /data/state, so jobs survive a restart of the container. Checked on the image's own base: gob run, gob add, gob list and gob shutdown as uid 1000, no flags. The full image still cannot build before the 0.4.2 sandbox release (cargo fetch rejects the unpublished pin), so the runtime stage was built from the Dockerfile's own lines. |
||
|
|
dc269472eb |
feat(web/claw): list every key and control its dispatch
The sidebar listed only the resident prefixes. The phone's status keys, the coding jobs' `job:<instance>#<id>` keys and the forge threads were on the wire and invisible in the client: an operator watching a job fill a queue had no row to look at, let alone act on. *Others* now carries the whole inventory, folded to the working count as before and every row listed unfolded. A row the chat cannot open is a control row — the resident prefixes are the only ones with a transcript — so it renders as a disabled entry rather than a dead click-through, and it keeps the status dot, the held badge and the depth that every row has. Beside the delete button, on hover: `hold` posts the pause and the row badges `held` in the warn tone, `run` posts the resume, `stop` posts the abort. `stop` is disabled when there is neither a live turn nor queued work, so an idle row sends nothing instead of collecting a no-op answer. What the abort did reads in the notice — the turn stopped, N queued items dropped, or nothing running — straight from the answer's `cut` and `dropped`. An aborted turn renders in the warn tone too: cut by the operator, not failed, and unlike a steered turn nothing replaces it. The About page's route list gains the three, and the README's inventory and delete paragraphs follow the fold and the controls. nuxt typecheck and build pass; checked against a mock daemon on a seeded store, folded and unfolded, with a held row, a queued job and an aborted turn. |
||
|
|
38292b6344 |
feat(claw): pause, resume and abort a key's dispatch
The inventory could show a key's queue and delete the key, and nothing
in between: a key wedged on a long turn, or a queue filling from a
source the operator wanted stopped, had no control short of a restart.
Three routes now sit beside the delete.
Pause is an operator's hold, not a dispatcher state: rhema-rsd has
idle, leased and re-acquire, and none of them means "keep the events,
run nothing". So the hold lives beside the store, a set of keys the
drivers' ownership predicates decline, persisted as `paused:<key>` rows
in the settings table and reloaded at boot. A held key ingests as
always, its inbox accumulates, `admit` offers it, and every driver
passes it by until resume lifts the hold. Deleting a key drops its
hold with it, so a name created again starts clean.
Abort stops what a pause cannot: a live turn is a dispatch minutes deep
in tool rounds, and only the dispatch itself can end it. An abort
registry carries the signal to the handler's own select, which drops
the turn future at its current await — a streaming request, or a
running shell command whose child dies with the drop. What the turn
committed is already the session (the commit hook), so the handler
repairs the dangling calls and releases as superseded rather than
failed: the work is no longer wanted. The chat closes on an `aborted`
end marker, the forge thread gets no half-answer, and a coding job's
row lands failed with `aborted`. An idle key's queued work is drained
and dropped under a throwaway lease instead, and a job row moves with
the queue it lost, or it would sit queued forever with nothing left to
run it.
The jobs handler arms its listener at dispatch entry rather than after
the agent is built: the route signals the moment it sees the lease, and
a listener arriving later would let an early abort fall through as a
no-op. Signalling a key with no listener stays a no-op, which is what
lets the route call it unconditionally before its idle path.
GET /v1/sessions carries `paused` beside the state, and the abort
answer says which shape it took: `{"key", "cut", "dropped"}`.
Verified with fmt, clippy -D warnings and the suite (266 lib, 40 http,
including a surface test for the three routes and one proving a dropped
queued job key lands its row aborted). The three sandbox deps still pin
unpublished 0.4.2, so the gates ran against a temporary 0.4.1 pin with
the one 0.4.2 call stubbed, then reverted.
|
||
|
|
cbd52b3b3f |
feat(claw): carry the ssh private key in the sandbox choice
The ssh sandbox took its credential from a key file the local disk had to hold, so a daemon whose secrets live in a store could not reach a far box without staging a file first. The choice gains private_key, the key text itself, threaded to the ssh backend's with_private_key; unset, the built-in hunt tries the agent and the default key files as before. The route keeps the token's write-only contract: GET /v1/sandbox answers private_key_set and never the key, PUT takes private_key and clear_private_key, an absent field keeps the stored one, a present-but-blank one clears it, and config.yaml's sandbox section accepts the field for boot seeding. The settings page grows the key textarea with its forget row, the token UI's shape. The three sandbox deps move to 0.4.2 for the seam, so the crate builds once the rhema 0.4.2 release lands on crates.io; until then the Rust gates cannot run and were checked by hand (cargo fmt parses the tree, vue-tsc passes). |
||
|
|
49c2fa42df |
chore(web/claw): refresh the npm dependencies in range
npm update moves every package inside its declared range: markdown-it 15.0.3, nuxt 4.6.4, vue 3.5.46, vue-tsc 3.3.14. The lockfile rewrite is larger than the moves because npm re-resolves the tree; npm ls and the build agree on the result. typescript stays on 5.9. The 7.0 line on the index is the Go rewrite, a different compiler with its own migration; that moves when the web surface is checked against it, not in a dependency pass. nuxt typecheck passes. |
||
|
|
4887e1c6d3 |
build: release 0.4.1 and refresh the dependencies
The workspace moves to 0.4.1 and the helm chart's version and appVersion follow. cargo update takes every compatible refresh the index offers (24 patch bumps across the tree). Three direct requirements move a semver line: reqwest 0.12 to 0.13, quick-xml 0.41 to 0.42, base64 0.22 to 0.23. reqwest 0.13 gates the query builder behind a feature of its own, so the claw's dev dependency and both integrations carry query beside json. The 0.12 line stays in the tree: the published rhema crates still require it, and semver-incompatible dependencies coexist where links allows. quick-xml 0.42 makes LocalName hold a &str and xml10_content infallible, so the CalDAV multistatus parser drops its from_utf8 unwrap and the map_err on a Result that no longer exists. rusqlite stays on 0.40. The published rhema-identity 0.4.1 still requires ^0.40, and libsqlite3-sys declares links = sqlite3, which the resolver allows exactly once per binary: two versions cannot coexist the way reqwest's do. The requirement moves when the published family publishes a rusqlite 0.43 build. Verified with fmt, clippy -D warnings, and the full workspace test suite with all features (449 tests). |
||
|
|
fa135acbc6 |
fix(git-identity): read and write git's global scope, not a guessed file
android / debug (push) Successful in 3m1s
android / release (push) Successful in 2m44s
ci / checks (push) Successful in 1m11s
ci / test (push) Successful in 41s
ci / chart (push) Successful in 5s
ci / docker (push) Successful in 1m31s
ci / web (push) Successful in 13s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m32s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 9s
ci / publish-edge-chart (push) Successful in 4s
The provisioning resolved its target itself: GIT_CONFIG_GLOBAL when set, `.gitconfig` in the home otherwise. That guess is wrong on half the machines git runs on — git's global scope spans both `.gitconfig` and the XDG `~/.config/git/config`, and when the user's identity lives in the XDG file, writing `.gitconfig` shadows it: the daemon's values win silently over the user's, and the guard — which read only the file it was about to write — never saw the existing identity it was built to respect. On this machine the daemon then booted once during testing and the next commit was authored claw <claw@k6>, and pushed. The scope is git's now. Reads and writes run through `git config --global`, so the guard sees whatever a commit would actually carry, from whichever file holds it; writes land in the file git itself picks — the established XDG config when that is the one, `.gitconfig` otherwise. A scope given explicitly pins `GIT_CONFIG_GLOBAL` on the child process only, which keeps the tests isolated without touching the caller's environment. Verified on the machine that was bitten: booting the daemon bare now resolves the defaults and then keeps the user's identity — no file written, the XDG values untouched. |
||
|
|
163fdbf6c9 |
feat(claw): forge turns answer as the resident
The claw's forge account spoke with a nameless stranger. The forge
handler built its agent on the host crate's built-in prompt — "You are
an agent operating on a host computer" — with no SOUL.md, no USER.md,
and nothing of the resident in it, so the comments posted on a review
request or a mention were written by a generic coding persona wearing
the claw's account. The chat answered as the character the user knows;
the forge answered as nobody.
Forge dispatches render the resident's own prompt now. The handler
holds the bootstrap store and renders the same template per dispatch
the chat renders — SOUL.md, USER.md, the environment report, live, so
a file the chat wrote this morning is what tonight's review carries —
over the thread's workspace, stamped into the agent as a verbatim
system prompt. The tool list renders from the same assembly the host
agent does for its own prompt (the shell built-ins, the transcript's
zoom when the view is on), so the prompt and the request's tools
cannot drift; the vision and MCP sections render from the same wired
values, which the claw template now carries as its own.
Who answers is the system prompt's to say. The reviewer and
implementer framing stays in the dispatch prompt, reworded as the
job — "this dispatch is a review request" — instead of a persona
claim ("you are acting as this thread's reviewer"). Onboarding never
renders on a forge dispatch: a GitHub thread is nobody's first
conversation. The memory section renders only when the roster
actually carries the memory tools, which a forge dispatch does not:
the chat-only rosters (memory, notifications, the key-scoped asks)
still do not ride forge turns.
jobs.rs keeps the bare coding agent on purpose. A background coding
job is the resident delegating — a different persona doing the work
the resident then reviews is the design, not a gap.
|
||
|
|
1b85cd8937 |
feat(claw): provision the workspace git identity at boot
Every forge thread works in a per-thread workspace, and implementer turns end in commits. git commit refuses to run without user.name and user.email, and a fresh workspace carries no gitconfig: the first commit on a fresh image fails, or succeeds with whatever the agent improvised. The agent commits as itself — its own name and address, never the user's, never inferred from whatever accounts happen to exist. The identity store gains an email field beside the name, so what onboarding collects with identity_set and the Agent · General page edits is what commits carry. The config gains an optional git section, an operator's override. Each field resolves independently: config, then identity, then defaults (claw, claw@hostname). The resolved pair is written into the daemon user's global git config at boot, in both run shapes — a cron pass commits too. The write is guarded: the settings store remembers the last pair the daemon wrote, and boot rewrites a field only when the config still holds that pair or nothing. A value anyone else set wins outright; the daemon is a tenant of its user's machine, not the owner of its git config. Provisioning runs from the binary's boot, not daemon assembly, so the tests that build daemons never touch a real gitconfig. An ssh sandbox runs git on another host and stays unprovisioned — a later story. The web UI gains an Email row on Agent · General; the phone's wire model gains the optional field. |
||
|
|
6a81dfa466 |
fix(forge): persist the account notification cursor
The account poll kept its notifications cursor in a Mutex<HashMap> on ForgeSource. A restart emptied the map, so the next poll asked the feed from nothing, and every row the forge still considered unread came back to be triaged again. mark_read usually consumes a row, but the call is best-effort, and one failure leaves the row in the feed forever, with every pass re-deciding it and dispatching a fresh turn for a thread that already had one. The repo watches already solve this one scope over: their cursors live in the watch_cursors table, and a restart resumes from the stored row. The account poll does the same now, under SCOPE_ACCOUNT, keyed by forge and account id. The first pass of a new watch still asks from nothing, because an unread feed is news. A restart asks from the durable row, and an unreadable row reads as absent, like a repo watch's, so a corrupted cursor cannot fire a backlog. Removing an account watch deletes its cursor row with it, as removing a repo watch already does. A re-add is a new watch. The new test builds a second ForgeSource over the same store, the shape every restart takes, and checks its notifications poll carries since=2026-10-05T12:00:00Z, the cursor the first pass left. |
||
|
|
d887026ff6 |
fix(daemon): run the long lanes off the tick path
`tick` awaited `forge_driver.run_once()` (and the jobs one before it), and `Driver::run_once` awaits every run it admits. So while a turn was under way the loop stopped doing everything else: no forge poll, no watch health, no due task, no calendar reminder, no phone delivery. With a 60s poll interval and a ten-minute turn, the daemon polled once per turn — which is why `last_ok_at` sat frozen at 00:35:02 while the turn that started at 00:35:03 ran. Not a network problem, and not the watch. Worse in combination with a longer lease: an hour-long turn would freeze detection for an hour. Split the pass. The resident loop (`run`) now uses `resident_tick`, which detects and then hands the forge and jobs passes to their own tasks; the interactive drain stays inline, since its runs are the chat itself. One pass per lane at a time — a tick that fires mid-pass leaves its events in the dispatcher's inbox for the next one, which is the queue the dispatcher already is; a second concurrent pass would only lose lease acquisitions to the first. The in-flight flag is cleared by a drop guard, so a panicking pass cannot strand its lane permanently. `tick` keeps its exact shape and semantics: `--once` and the tests still mean "the work happened" when a pass returns, and the forge-line log (`[claw] pass: N detected, H handled, F failed`) is unchanged there. The detached passes log without the detected count, which they do not own. |
||
|
|
5383b69f7b |
build: install curl in the claw and sandboxd images
The runtime layer ships bash, git and tar for the shells the agent runs, but no HTTP client: a turn asked to fetch a URL had nothing to fetch with. curl joins the same apt line in both images; ca-certificates was already in the list, so HTTPS needs nothing else. Checked against debian:stable-slim: the line installs curl 8.14.1 and an HTTPS fetch resolves. |
||
|
|
d306527792 |
feat(web/claw): a working line until the turn speaks
The web surface drops a turn's tool rows and thinking trace (only consent and attachment cards render), so the span between a turn's first event and its first text delta showed a bare name over empty space. Now a small ring plus `<agent> is working…` sits below where the reply will land, on screen exactly while `live.reply` is empty. The first delta takes the line away and the streaming cursor takes over from there; the two never show together. Text already streamed keeps the line gone for the rest of the turn, and a consent card waiting on the human does not stop it, the turn still being live. The gap between send and the turn's first event stays bare: no live block exists there yet, and that is the POST round-trip, not the model. The ring is a tokened CSS spinner, muted under the accent name, with role=status and a prefers-reduced-motion fallback to a static ring. Verified against a scripted claw (thinking_delta, tool_start, then a text_delta): the line shows through the tool phase and is gone with the cursor on the reply. |
||
|
|
178d0af82b |
feat(web/claw): fold the other keys to a working count
The task: and calendar: keys sat in the sidebar at full height all the time, a block of rows most of them idle. The group folds now: by default it shows one line, the count of other sessions holding a lease (the same `leased` state the status dot paints green) beside a more button, and the button unfolds every row and becomes less. The count stays visible unfolded, so the header does not jump when it toggles. The count is gray at zero and takes the ok color only when something runs. The Sessions header still counts folded rows, and the fold state is in-memory like the rest of the page: a reload folds again. |
||
|
|
473a7765e7 |
feat(claw): run bash on an ssh login, no daemon on the far end
The framework ships rhema-sandbox-ssh; the claw's sandbox seam now wires it as a third kind beside local and http. The ssh choice carries a host (any destination the local ssh config resolves) and a workspace base, default /root, with one directory per claw workspace under it so two sessions never share a root. The seed probe makes the root first and quotes it for the remote bash. The settings screen gains the SSH host card, and /v1/sandbox carries host and workspace. The rhema family moves to 0.4.1 in lockstep to pick the crate up. |
||
|
|
24d2323cd3 |
fix(forge): consume a decided account notification
The account feed is at-least-once in a way the dedup ids do not cover.
`since` is inclusive at the boundary and `NotificationPage::finish`
advances its cursor only to the newest row seen, so a row the poll cannot
get past — anything at or before the cursor, which is every poll — comes
back for as long as the forge still considers it unread. Nothing marked
it read, and the daemon's cursor map is in memory, so a restart asked for
the whole unread feed again.
The result is a re-dispatch loop: the same notification id re-triaged
every pass, a fresh turn for a thread that already has one, and a second
comment on that thread if the first turn ever finished inside its lease.
Observed live on `vhaudiquet/orcaslicer-snap#10`: key revision 1 → 2 at
the 00:35 poll, `inbox_depth: 0`, no outcome — a re-dispatch of a turn
that was already running.
So consume what the poll decides:
- `Forge::mark_read` — a new default no-op on the trait, implemented for
GitHub as `PUT /notifications/threads/{id}`;
- `Notification::read_key` carries what that route keys on (GitHub keys
on the notification id, which the dedup id embeds only as text), and
defaults on deserialize so a payload already in an inbox still decodes;
- `poll_account` marks each row read once it is triaged — dispatched,
surfaced, or ignored; best-effort, since an unread row costs a repeat
and never a lost event.
Gitea and GitLab keep the no-op: neither has an account watch here yet.
|
||
|
|
6777eaa247 |
fix(daemon): lease a forge turn for an hour, not ten minutes
The forge dispatcher was assembled on `DispatcherConfig::default()`, whose ten-minute lease TTL is the spec's example value, sized for a single agent step. A forge turn is not a step: it clones the repo, reads it, and may build and test a fix. Nothing renews the lease once the turn is under way — `poll_inbox` renews but is called once, at the start, and the commit hook between tool calls checkpoints, which fails on a lapsed lease rather than extending it — so the TTL is a hard ceiling on a whole turn. Crossing it is silent: the turn dies on its next tool call, the driver's own checkpoint and release then report `Expired`, and the key ends with no outcome recorded, indistinguishable from a pass that found nothing. Give the forge lane its own timing — the library defaults with an hour-long TTL, the same choice the interactive and jobs lanes already make — and use it in both shapes (`--once` included). |
||
|
|
96d8bf1d1e |
fix(forge): read a GitHub notification id as a string or a number
The notifications feed sends `id` as a JSON string (`"27210544329"`), unlike every other row this adapter decodes, so `WireNotification`'s `Option<i64>` refused one real row and failed the whole page. The account watch has been stuck on 'error decoding response body' since the first notification arrived (82 consecutive failures at the time of writing). `lenient_id` accepts either shape; a non-numeric string is still a loud parse error rather than a dropped row. The regression test is the row captured live. |
||
|
|
701a17c978 |
feat(claw): a mention of the daemon is an ask, not a phone buzz
The notifications feed triaged a GitHub `mention` as `Triage::Surface`:
the human hears about it, no agent runs. That verdict is right for a
consumer that only notifies — a mention of somebody else is not an
assignment — but this daemon is the party named. Somebody typed
`@handle` on a thread and is waiting for an answer, which is the same
ask an assignment is.
The bug that follows is silent: the surface arm never feeds the
dispatcher, so the thread is never dispatched and the mention is never
answered. Nothing looks broken; the phone buzzed.
`claw_triage` keeps the shared vocabulary as the base and upgrades
this one reason, the seam `triage` names for consumers ('classify is
the default, not a mandate'). Every other reason keeps its verdict, so
the co-edit that pinned those tests still holds.
|
||
|
|
d4758131fc |
feat(android): render chips from the span record, not the mark scan
The phone was the last surface reading chips as paired U+FFFC marks in the text: a web user's staged paste rendered as its raw payload inline, and the mark scan stayed the only parse. Now the row's chip record does the work. `user_message`'s `pastes` spans parse beside the text (the session annotation's own shape, absent on every row that predates it), the controller carries them through the fold's dedupe guard, and the render slices each chip out of the plain text at the record's UTF-8 offsets — one walk maps every character boundary, so a surrogate-heavy draft still lands exactly and a span that splits a character skips whole rather than cutting one in half. A row without a record still scans the mark form, exactly as before. The composer still sends plain text only — this is the read side; the phone never staged text chips even in the mark era. Verified as CI does (assembleDebug, lintDebug) plus a JVM harness running the verbatim slicing code against the daemon's own e2e record numbers, surrogates and seams included. |
||
|
|
dd91501e10 |
feat: chips travel as span records, not mark embeds
The claw's wire carried chips only as U+FFFC-payload-U+FFFC marks written into the text — the very encoding 0.4.0's fold migrated at the provider seam. Now the record rhema-core defined is the wire's own: a message's pasted payloads ride the POST body's `pastes` array beside the plain draft, the fold composes the plain form and measures each chip's PasteSpan, and the `user_message` echo carries text plus `pastes` — the session annotation's own shape — while the turn's question carries the span note into the checkpoint, shifted by the exact bytes any framing prefix adds. The web client mints and renders the new record: the composer sends draft and payloads separately, the optimistic row composes the same plain text and spans the fold will record (so the echo dedupes), and the render slices the text at the record's byte offsets. Rows recorded before spans arrived still parse the mark form — as does every arrival that still mints it, including every surface the shim or an older client feeds. The phone is one of those: it parses chips by scanning marks, and kotlinx ignores the new field, so it reads spans-less rows exactly as before; adopting span records for its own rows is a follow-up. |
||
|
|
22c502a9eb |
build: move the claw to rhema 0.4.0
The framework 0.4.0 split the toolkit: rhema-agent-tools becomes rhema-bash plus rhema-prompt, and the facade crate is deleted from the workspace this time, so the 0.3 facades never publish. The driver changes name with its types: rhema-coding-agent and its CodingAgent, CodingAgentConfig, and CodingAgentError become rhema-host-agent with HostAgent, HostAgentConfig, and HostAgentError. The claw imports the split crates directly, which drops its own vision once-lock: rhema-bash's wire already caches the process-wide answer. The paste expansion moved off the provider seam. Chips travel as the message's spans note now, and ExpandPastes is deleted: the dispatch input migrates its embedded form into plain text plus the note at run_turn, and a restashed session migrates the same way on restore, one rewrite on the way in exactly as the driver's from_session does. The transcript events keep the raw chip form, the record the web UI owns, and a migration test pins the restore path. max_turn_steps is NonZeroU32, the engine's own budget shape: a config naming zero is refused at load instead of cutting every round dead. The engine's Event and the sandbox error enum are non-exhaustive now, so the hub sink and the protocol error map carry wildcard arms that drop and fail in-band the way their neighbors do. The claw's own version travels with the framework, as the 0.3.0 move carried 0.2.3 to 0.3.0: the workspace and the chart base become 0.4.0, so the edge channel's pre-releases order above the 0.3.x line. fmt, clippy with -D warnings over all features and targets, the workspace tests, and the doc build pass. |
||
|
|
dc71ac224e |
fix(web/claw): keep the stream watchdog quiet on a tab switch
A hidden tab throttles timers and can stall the SSE reader. The 45s silence watchdog kept counting that time, aborted the stream, and pushed "the event stream went quiet" on every tab switch even though the connection was fine. The watchdog now pauses while the page is hidden and re-arms from zero when it becomes visible. The attempt also remembers whether it crossed a hidden period: if the browser held or dropped the connection there, the reconnect stays silent. A keep-alive or frame clears that mark, so a stream that really dies while visible still reports itself. Tested in headless Chromium against the dev mock: 50s hidden, then visible, no notice, and the stream went back to live. |
||
|
|
a583e11e67 |
build: bump the chart base version past the 0.2.3 release
CI publishes every main push as a timestamped pre-release of the chart's base version. The base stayed at 0.1.0 through the 0.3.0 framework move, but the package repository also holds a 0.2.3 chart from the old release line. SemVer ranks 0.2.3 above every 0.1.0 pre-release, so a HelmRelease with `>=0.1.0-0` resolves to 0.2.3 and never sees a newer edge chart. The base is 0.3.0 now, matching the workspace version. Edge charts sort above 0.2.3 again, and the release tag check already expects 0.3.0. |
||
|
|
1aa8d5578e |
feat(claw): choose where bash runs, this host or a remote sandbox
The daemon's `bash` always ran on its own host. A deployment that wants the shell isolated, or on a machine with the project's toolchain, had no way to say so, and the web settings had no surface for it. A sandbox choice now persists in the settings table, and the daemon can be seeded from `sandbox` in claw.yaml. `local` keeps the existing shell; `http` wraps `rhema-sandbox-http` in a `ShellSandbox` and gives every handler a `ShellTools` built over it. Chat turns, forge turns, and coding jobs all read the choice per dispatch, so a switch applies on the next turn without a restart. A remote sandbox starts empty. The first command for a workspace probes `/workspace` and, when it is empty, sends the host workspace as a tarball through the protocol's seed route. Later edits stay in the sandbox; the claw does not copy them back. The web settings gain a System > Sandbox page: the two kinds, the URL and a write-only token, a forget-token action, and the effective workspace. `GET /v1/sandbox` never returns the token; `PUT` validates and persists the choice. Tests: the sandbox state and config validation, the HTTP route round trip, and a remote turn that seeds a fresh sandbox and runs its shell there. fmt, clippy with -D warnings, the workspace tests, and the web typecheck and build pass. |
||
|
|
5dc8402107 |
build: move the claw to rhema 0.3.0
The framework releases 0.3.0, so every rhema dependency moves with it: the workspace version, the daemon's crates, and the two integrations. The only new transitive package is webpki-roots, pulled by the provider crates' TLS stack. The agent constructors changed shape. CodingAgentConfig::new takes the provider, model, workspace, and approval, and keeps both handles: CodingAgent::new and CodingAgent::from_session take the config alone, and turn no longer takes an approval argument. The claw's forge and job paths build one config each and pass AllowAll there, the policy every turn ran under before. The vision and mcp tests build their config through the same constructor, so they hand it a MockProvider. fmt, clippy with -D warnings, the workspace tests, and a locked check pass. |
||
|
|
6d5de9a574 |
feat(web/claw): render the reply, not the tool calls or the thinking
The web transcript was built to mirror the TUI: every tool call as a shell line or a glyph row, the thinking trace between them, each at the position the stream delivered it. That is the right shape for a terminal session you sit and watch. On the web it reads as machinery in front of the answer, and the answer is what the page is for. `TurnEntries` now keeps only the two entries the reader must handle: a consent card (the agent is waiting on an answer, so hiding it would stall the turn) and an attachment card (the file it handed over). Everything else in the turn renders as the reply, through `AppMarkdown`. The mirror in `useTranscript` still folds tool and thinking events; only the render ignores them. Replay, the pending-echo dedupe and consent placement keep working unchanged, and the bottom-pin watch loses the thinking-length term it only needed while that block took height. `TurnToolRow` had no other caller and goes with it. |
||
|
|
3b32e02ebb |
docs: add the tools spec, carried from the rhema repository
The spec describes this tree now: ClawExtension, the tools/ project (contract, common, notify), the daemon's axum router. It stayed behind when the claw cut loose, and a design record belongs beside its subject. |
||
|
|
f1a3d3b4ed |
feat(claw): answer a thread only when somebody addresses the daemon
A repo watch saw *every* issue, pull request, review and comment on the repository, and the handler treated each dispatch as work to do: a snapshot fetch, a coding-agent turn, and a comment posted back. On a repository with any traffic at all that is the wrong end of the question — watching a repo is not volunteering to answer it — and it is also how a daemon ends up talking to itself, since its own replies are news too. The dispatch now starts with a mention gate. A thread runs when: - it delivered a triaged notification — assigned, review requested, @-mentioned: the notifications feed already adjudicated that one; or - one of its plain events names the handle the daemon speaks as (`@kosmos`), written by anybody *but* the daemon. Everything else is drained and dropped: no snapshot, no model call, no comment. The outcome is `Superseded` — RSD's vocabulary has no "nothing was asked", and the closest is that the work the event names is not this daemon's. Recognizing its own name took a little plumbing. The credential a watch resolves carries a login only when an account identity supplied the token; a token pasted into a watch row, or a forge environment variable, names nobody — and that is the deployment the gate must not go inert on. So `Forge::viewer_login` is the backend's own answer to "who am I", from its `/user` (Gitea and GitHub spell it `login`, GitLab `username`), with a `None` default for backends that cannot say; the handler asks at most once per credential and keeps the answer beside the cached client. A forge that will not name the credential leaves the gate *open*, with a warning in the log: a filter that silently mutes a watch is worse than one that occasionally over-answers. The actor check is load-bearing for the same reason the gate exists: a reply quotes the mention it answers, so "addressed by name" alone would have the daemon answer itself, forever. Tests: unit tests for the gate (name in any case, own comment, no body, notification, unnamed credential), one end-to-end test per behaviour — a mention runs one turn and posts one reply; a thread's own chatter runs nothing and posts nothing; the daemon's own reply does not reopen the gate — plus `viewer_login` against all three backends. |
||
|
|
a9c41be440 |
test(claw): the github mock answers since, as the forge does
The fresh-watch pass now seeds its cursor at *now*, and the issues feed is where GitHub applies `since` server-side. The mock always answered the whole history, so the seeding pass fed an issue the real forge would have filtered out and the new "a fresh watch seeds its cursor" assertion saw one event. The mock now returns the issue row only for the rewound cursor the test sets, and nothing for any other `since`. |
||
|
|
721efceec5 |
fix(claw): a repo watch resumes from its durable cursor, or starts now
The watcher kept one cursor per repo in a `Mutex<HashMap>`, so every daemon restart began with no cursor — and `Watcher::poll` reads "no cursor" as "feed everything the forge returns". A restart therefore replayed the repository's whole history: every old thread a dispatch, and every dispatch a comment posted on a thread nobody had just touched. The dispatcher's dedup lane does not save this: it dedups against the pending inbox, and a drained event re-ingests clean. The cursor is a row now (`watch_cursors`, beside `watch_health`, same scope/forge/subject key), written after every successful poll and read before every poll, so a restart resumes where the last pass stopped. A watch with no cursor yet — newly added, or added to a repository full of history — starts at *now* rather than at the beginning: a watch reports news, and history is not news. The seed is written before the poll, so a forge that is down cannot walk the start line forward on every pass and lose the news arriving in between. Removing a watch forgets its cursor too, so a re-add seeds afresh instead of resuming into a backlog. `Watcher::poll_since` is the seam the daemon needs to pass a cursor it keeps itself; `Watcher::poll` keeps its in-memory behaviour unchanged. `Timestamp::from_epoch_millis` spells an instant the way the forges spell theirs, which is what a seed is. Tests: the first pass feeds nothing and asks from the seeded instant; a second pass resumes from it; the cursor moves only forward per watch and dies with the watch. `e2e`/`continuity`/`http` seed an established watch, since their subject is the dispatch, not the bootstrap. |
||
|
|
1cab66173f |
fix(forge): a gitea comment names its thread without issue_url
`comment_event` read the thread number from `issue_url` alone and failed
the whole poll when it could not. The instance behind git.vhaudiquet.fr
sends `issue_url: ""` on every row of the repo-wide `/issues/comments`
feed, so the first comment row failed the pass with
malformed forge response: comment issue_url without a thread number:
and kept failing on every poll since the watch was created — 5296
consecutive failures, no event ever reported, no comment, no pull
request, nothing. The feed being broken was invisible: a watch that has
never polled once looks exactly like a quiet repository.
The number now comes from the first URL that carries one
(`issue_url`, then `pull_request_url`, then `html_url`), and a fragment is
dropped first: a comment's `html_url` points at the comment
(`…/pulls/1#issuecomment-164`), not at its thread. `is_pr` reads the same
three URLs, so a PR comment whose `issue_url` is blank still lands on the
pull request's sequence.
A row with no number anywhere is still a loud parse error — the
fallbacks must not degrade into a silently skipped event.
|
||
|
|
03bdadc2b6 |
chore: carry dev.sh over — the claw+UI debug loop from the old tree
Unchanged: the paths are root-relative, so the script works as-is in the standalone workspace. |