chore(repo): wire dira cloud capture into this repo - #139
Merged
Conversation
Run `dira cloud init --harness claude` against our own repository, which was never teleport-wired despite shipping the feature in v0.6.0. Adds the portable `.dira/hook.sh` forwarder, the `.dira/bootstrap.sh` teleport, and the project `.claude/settings.json` hook entries that invoke them. Stop ignoring `.claude/settings.json`. The ignore rule was written for `dira init`, whose output embeds this machine's absolute dira path, but `dira cloud init` writes deliberately portable entries that a cloud VM can only read if they are committed. `.claude/settings.local.json` stays ignored, matching Claude Code's shared-vs-personal settings split. Verified end to end in a Claude Code on the web container: the bootstrap installs the v0.6.0 musl release, `dira doctor` reports 8/8 events wired and runtime 'claude-web', the device links via DIRA_RUNNER_TOKEN, and events reach app.dirahq.sh. The committed bootstrap carries no embedded digests: the generating dira was a debug build behind a proxy that blocked the digest fetch. It falls back to the release's own .sha256 asset at install time, so the download is still verified. Re-run `dira cloud init` from an installed dira to embed them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SJkrxbWMxfDXnWEcuZbAfx Signed-off-by: Claude <noreply@anthropic.com>
azlekov
marked this pull request as ready for review
September 3, 2026 19:47
Contributor
|
Knowledge layer
Spec currency is reported in the job summary and never fails a build, the same severity the local pre-commit hook uses. |
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.
Summary
We shipped
dira cloud initin v0.6.0 but never ran it against our own repository, so cloud agent sessions ondirahq-cliwere not instrumented at all. This PR fixes that — dogfooding the teleport feature on the repo that produces it.Running
dira cloud init --harness claudeadds:.dira/hook.sh— the portable forwarder that resolvesdiraat run time (PATH→~/.local/bin→/usr/local/bin) and carries the always-exit-0 hook contract..dira/bootstrap.sh— the SessionStart teleport: installs the pinned release in a cloud VM, starts the daemon, claims a runner-token device, then forwards the event. On an ordinary machine it skips provisioning and forwards straight through..dira/.gitattributes— LF normalization so a Windows checkout can't turn#!/bin/shinto a CRLF file..claude/settings.json— the project hook entries invoking those wrappers (8/8 Claude Code events).The blocking change: un-ignoring
.claude/settings.json.gitignoreignored.claude/settings.jsonwith the note "Machine-specific Claude Code settings (generated per-machine bydira init)". That is correct fordira init, whose output embeds one machine's absolutedirapath — but it also silently swallowed thedira cloud initoutput, which is deliberately portable and only works if committed, since the repository is the sole delivery channel into an ephemeral cloud VM. Without this change the.dira/scripts would commit but nothing would ever invoke them..claude/settings.local.jsonstays ignored, matching Claude Code's shared-vs-personal settings split.Known follow-up, not addressed here: a contributor who runs plain
dira initlocally will now dirty a tracked file with machine-specific absolute paths. Worth either teachingdira initto prefersettings.local.jsonfor the project scope, or documenting it inCONTRIBUTING.md.Note on the pin
The committed
bootstrap.shpinsv0.6.0but carries no embedded digests. The generatingdirawas a debug build in a sandbox whose proxy rejected the digest fetch (invalid peer certificate: UnknownIssuer), so generation fell back to the documented unpinned form: the tarball is verified against the release's own.sha256asset at install time. The download is still cryptographically verified — just one fetch later. Re-runningdira cloud initfrom an installeddirawith unproxied GitHub access will embed the digests; I deliberately did not hand-edit the generated file to add them.Test plan
Verified live in a Claude Code on the web container (
CLAUDE_CODE_REMOTEset), which is the runtime this wiring targets:sh .dira/bootstrap.sh --provision-onlyinstalled the v0.6.0x86_64-unknown-linux-muslrelease, checksum-verified, and starteddirad.dira doctor→ 18 ok, 1 warning, 0 failures. Relevant checks:hooks.config8/8 events wired ·cloud.runtimedetectedclaude-web·cloud.reachabilityapp.dirahq.shanswered ·device.linklinked ·sync.healthhealthy ·cloud.bootstrapteleport artifacts present. The lone warning isdaemon.supervision(pidfile, no restart-after-reboot), which is expected and irrelevant in an ephemeral container.dira statusshowed the live session being captured, and the sync cursor advanced with the pending queue draining — events reached the cloud.sh -nclean on both generated scripts.Checks run locally before pushing (
justis not installed in that container, so the recipes were run directly):cargo fmt --all -- --check— cleancargo clippy --workspace --all-targets -- -D warnings— cleancargo test --workspace— 33 suites, 1207 passed, 0 failed (cargo exit 0)just contractequivalent (emit-schema+sign_vector) — zero drift/contractsource change, no change to the signed byte stream, noinstall.sh/install.ps1change.GitHub CI on
38554f7is green across the board: Commit Lint, Rust (capture layer), Rust (windows), Shell Lint, PowerShell Lint, Dependency licenses, andzavet / checkall succeeded.Checklist
git commit -s) per the DCO — note: signed off as the container's configured git identity (Claude <noreply@anthropic.com>); re-sign under your own identity if the DCO check requires a human signer.chore(repo).chorehas noreleaseRulesentry in.releaserc.js, so this cuts no release despiterepobeing a release-triggering scope.develop, notmain.🤖 Generated with Claude Code
https://claude.ai/code/session_01SJkrxbWMxfDXnWEcuZbAfx