Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,28 @@ menu for stage, stage-all, unstage, and explicitly confirmed discard actions.

GitHub pull-request creation, review, and management stay inside Git Workspace/Git Sidebar through the typed CrewCode client. Preserve the single-PR Branches → Details → Review creation flow, measured base-relative evidence, the compact current-branch PR sidebar launcher, and the canonical repository PR Browser with real on-demand detail/diff/check evidence, PierreDiff per-file review, overall review submission, explicit draft-to-ready action, visible action-gate reasons, explicit merge confirmation, and merge/squash/rebase choices. The Browser must capture the exact selected PR/branches, lock selection/navigation during every mutation, and refresh authoritative evidence after the observed result; do not restore a second review shell or mutation state. PR conflict preparation must require explicit confirmation, the exact clean PR-head worktree, validated refs, observed fetch/merge outcomes, and must surface conflicts through the existing merge card without implicit checkout; retain `MERGE_HEAD` visibility after the last file is staged, then require explicit continue and push. `--auto` is not conflict resolution. Read methods remain registered-root `workspace:read`; mutations require `workspace:write`. Never expose GitHub credentials to the renderer/browser, fabricate inline comments, imply self-approval is available, or infer readiness/merge from silence. Crew integration remains a separate provenance-journal and behavioral-verification workflow. See `docs/github-pull-requests.md`.

Pull-request creation may select a bounded subset of the observed base-to-head
commit history. Revalidate full commit ids after fetching the latest base, then
create and push a new named head branch by cherry-picking in history order from
an isolated temporary worktree; never rewrite, checkout, or dirty the user's
current branch. Abort and remove the isolated operation without pushing when a
selected commit conflicts. Keep PR conflict file editing, ours/theirs,
exact-file staging, continue, abort, and push in the PR Browser's contextual
Conflicts tab. Recheck the selected PR head branch before every local mutation
and refresh GitHub detail/check evidence after the resolved head is pushed.

PR creation Details keeps optional Description, Problem, What changed, Why it
changed, and Solution fields. Submit only non-empty author content under exact
level-two Markdown headings and show explicit not-provided states in Review;
never fabricate a missing section. The PR Browser Conflicts tab must render one
bounded, canonical PierreDiff patch from Git's exact stage-2 ours and stage-3
theirs blobs for the selected unresolved path, label the PR-head/base sides,
and keep Use ours/Use theirs actions beside that evidence. Manual resolution
remains editable, must reject standard conflict markers before exact-file
staging, and must not treat the marker-filled working file as side evidence.
Conflict-side reads require registered-root `workspace:read`; resolution writes
and staging retain `workspace:write`.

The Git Workspace repository PR browser loads a bounded all-state catalogue through the typed client, selects the current branch's head PR when present, and filters the observed catalogue locally by all/open/closed/assigned-to-viewer. Treat merged PRs as closed and assigned as observed assignee or requested-reviewer identity only. Load selected PR details on demand and identify the author with the observed GitHub username plus exact creation timestamp. Keep Overview, Timeline, Code changes, and Checks in the middle pane: Overview always exposes Description/Problem/What changed/Why it changed/Solution while marking absent author content as not provided rather than inventing it; Timeline chronologically combines the observed open event, commits, comments, and submitted reviews; Code changes loads GitHub's combined base-to-head diff on demand, never the `--patch` format-patch mail series, strips defensive mail boundaries, folds repeated paths under one canonical `diff --git` header, and sends one selected file patch to PierreDiff; Checks shows observed status and links only as an external fallback. Keep non-heading copy across every PR surface at the readable PR body scale rather than terminal-label sizes. Show real reviewers, assignees, labels, checks, branches, and change metrics. Keep mutation actions in the Browser inspector with exact target confirmation and mutation locking. Preserve the stacked mobile catalogue/detail and file-list/diff layouts and the explicit SSH-unavailable result. See `docs/github-pull-requests.md`.

PR authorship avatars must be retrieved only through the trusted main/Brain boundary. Restrict every redirect and bounded raster response to GitHub-controlled hosts, return only a data URL to the renderer, cache successful images by username, and keep the GitHub-mark fallback when retrieval fails. Keep observed GitHub comments and submitted review summaries at the bottom of PR Browser Overview after the description sections, with author, state, exact timestamp, Markdown body, and an explicit empty state.
Expand All @@ -25,7 +47,7 @@ PR Browser inline reviews remain bound to the exact selected PR, head commit, fi

PR Browser management stays in the canonical selected-PR inspector. Preserve exact-number mutation locking and authoritative catalogue/detail refresh for title/body edits, reviewer/assignee/label changes, draft/ready transitions, and close/reopen. Load bounded assignable-user, suggested-reviewer, and repository-label choices only when management opens through registered-root `workspace:read`; all management mutations require `workspace:write`. Keep author, label, base, head, review-request, and review-decision filtering local to the bounded catalogue. Preserve repository-scoped selected PR, filters/search, middle-pane tab, and selected file when returning where the evidence still exists. Copy PR identity and branch evidence without opening GitHub. Never expose GitHub credentials to the renderer or imply a mutation succeeded before refreshed GitHub evidence is observed. See `docs/github-pull-requests.md`.

PR Browser checks and merging remain head-pinned to the exact selected PR. Load bounded check suites, jobs, steps, annotations, and logs on demand through the trusted main/Brain boundary; state explicit third-party provider limits instead of inventing unavailable evidence. Check context and logs require registered-root `workspace:read`; reruns and merge automation require `workspace:write`. Revalidate the GitHub head and job/run ownership before reruns, and require explicit confirmation for job/workflow reruns, direct merge, auto-merge, queue submission, and disabling automation. Keep merge/squash/rebase, auto-merge, and queue operations locked to the observed head commit, then refresh authoritative detail and check evidence and report only the resulting observed state. Treat branch-update permission reasons as update guidance, not fabricated merge blockers. See `docs/github-pull-requests.md`.
PR Browser checks and merging remain head-pinned to the exact selected PR. Load bounded check suites, jobs, steps, annotations, and logs on demand through the trusted main/Brain boundary; state explicit third-party provider limits instead of inventing unavailable evidence. Pass the exact selected PR number when resolving GitHub's required-check fields, and surface check-context failures in the merge inspector instead of silently swallowing the action. Check context and logs require registered-root `workspace:read`; reruns and merge automation require `workspace:write`. Revalidate the GitHub head and job/run ownership before reruns, and require explicit confirmation for job/workflow reruns, direct merge, auto-merge, queue submission, and disabling automation. Keep merge/squash/rebase, auto-merge, and queue operations locked to the observed head commit, then refresh authoritative detail and check evidence and report only the resulting observed state. Treat branch-update permission reasons as update guidance, not fabricated merge blockers. See `docs/github-pull-requests.md`.

Desktop system-tray behavior is opt-in. When enabled, closing the window hides
it while app-owned work continues; the tray must expose explicit Open and Quit
Expand Down
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
[![X](https://img.shields.io/badge/X-@OnPointTools-000000.svg)](https://x.com/OnPointTools)
[![YouTube](https://img.shields.io/badge/YouTube-@CjWisdom-FF0000.svg)](https://www.youtube.com/@CjWisdom)

**[Want to continue where you left off — from any browser? Jump to the setup →](#continue-your-work-from-anywhere)**

</div>

<div align="center">
Expand Down Expand Up @@ -182,6 +184,38 @@ Plugin agent providers support `mock`, `exec`, and `http` runtimes, so you can c
- Configurable agent launch paths and shell preferences
- Remote hosting: Remote file editing,terminal, and agents connection to host

## Continue your work from anywhere

Leave your PC running at home and pick up exactly where you left off from a browser —
or run CrewCode headless on a VPS, NAS, or always-on server so your agents are always
reachable.

- **Desktop & web continuity (Background Brain):** enable **Settings → Desktop & Web** on an enrolled machine and CrewCode keeps a detached Brain running even after the Electron window closes. Desktop and browser share the same machine-authoritative workspaces, chat sessions, transcripts, terminals, and agents — provider resume state carries over, so you continue the same conversation instead of starting from scratch.
- **Self-hosted Hub:** one always-on `crewcode hub` gives you a single passkey-secured dashboard of all your enrolled machines. Brains connect outbound-only, so your dev machines need no open inbound ports. The relay is end-to-end encrypted — the Hub never sees your code, prompts, transcripts, or terminal output, and files never leave the machine they live on.
- **Always available:** run `crewcode brain` on a VPS or home server with explicit workspace roots and your workspaces are reachable from any device, anytime.
- **Phone access:** the Hub's mobile dashboard lists your online machines and recent threads, with a QR-assisted setup over Tailscale HTTPS.
- **Secure by default:** remote authority is off until you grant explicit workspace roots and scopes; pairing codes and connection tickets are short-lived and single-use; sign-in is passkey-based; provider API keys never leave the Brain's machine.

```bash
# On the always-on Hub host (VPS, NAS, or home server):
node bin/crewcode-server.mjs hub --local-brain \
--host 0.0.0.0 --public-origin https://your-hub.example

# On each development machine, enroll once and enable Background Brain
# in Settings → Desktop & Web (or run a headless Brain yourself):
node bin/crewcode-server.mjs enroll --hub https://your-hub.example
npm run brain
```

For a single machine with no Hub, `npm run serve` exposes the same web client over
loopback, LAN, or a Tailscale tailnet behind a one-time pairing URL.

This is a preview feature with documented first-release limits. See
[web remote access](./docs/web-remote-access.md) for deployment profiles, the Hub
security model, and direct-server mode, and
[desktop & web continuity](./docs/desktop-web-continuity.md) for how desktop state and
the Brain stay in sync.

## Best fit today

CrewCode is strongest today for:
Expand Down
Loading
Loading