Skip to content

Commit e56e863

Browse files
feat: install pinned native components with brigade setup (#368)
* docs: plan pinned component setup Co-authored-by: Cursor <cursoragent@cursor.com> * docs(setup): fix phase-355 executable spec defects Replace impossible asset_bytes synthesis with fixture_payload-derived digests, split Task 6 engine dry-run from Task 9 CLI wiring, and standardize installed state on installed_at. Co-authored-by: Cursor <cursoragent@cursor.com> * docs(setup): align phase-355 helpers with manifest loader Publish the full five-platform matrix in write_test_manifest, use owner/name repository values, derive fixture bytes from runnable smoke stubs, and delegate the smoke test runner to subprocess.run while recording argv. Co-authored-by: Cursor <cursoragent@cursor.com> * chore(components): publish graphtrail v0.4.0 manifest assets Co-authored-by: Cursor <cursoragent@cursor.com> * feat(components): add installed state schema v1 Co-authored-by: Cursor <cursoragent@cursor.com> * feat(components): verify cache bytes and brigade version Co-authored-by: Cursor <cursoragent@cursor.com> * feat(components): download assets into digest cache Co-authored-by: Cursor <cursoragent@cursor.com> * feat(components): materialize managed executables safely Co-authored-by: Cursor <cursoragent@cursor.com> * feat(components): add post-install smoke suite Co-authored-by: Cursor <cursoragent@cursor.com> * feat(components): add setup dry-run planning Co-authored-by: Cursor <cursoragent@cursor.com> * feat(components): install pinned native components * feat(components): add setup rollback * feat(cli): register brigade setup command Co-authored-by: Cursor <cursoragent@cursor.com> * fix(components): bound downloads and repair executable mode Co-authored-by: Cursor <cursoragent@cursor.com> * test(components): cover download hardening edge cases Co-authored-by: Cursor <cursoragent@cursor.com> * docs: refresh command inventory --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent d2b140a commit e56e863

16 files changed

Lines changed: 3871 additions & 19 deletions

docs/command-inventory.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ enabled: run `brigade extras on` once, or set `BRIGADE_EXTRAS=1`.
5959
- `brigade scrub`: 1 command path(s)
6060
- `brigade search`: 3 command path(s)
6161
- `brigade security`: 15 command path(s)
62+
- `brigade setup`: 1 command path(s)
6263
- `brigade skills`: 29 command path(s)
6364
- `brigade stations`: 3 command path(s)
6465
- `brigade status`: 1 command path(s)
@@ -432,6 +433,7 @@ enabled: run `brigade extras on` once, or set `BRIGADE_EXTRAS=1`.
432433
- `brigade security suppress`
433434
- `brigade security template-audit`
434435
- `brigade security unsuppress`
436+
- `brigade setup`
435437
- `brigade skills adapters init`
436438
- `brigade skills adapters list`
437439
- `brigade skills adapters show`

docs/phase-355-pinned-component-setup.md

Lines changed: 794 additions & 0 deletions
Large diffs are not rendered by default.

src/brigade/cli/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
receipts as _receipts_group,
3232
daily as _daily_group,
3333
add as _add_group,
34+
setup as _setup_group,
3435
stations as _stations_group,
3536
pantry as _pantry_group,
3637
evidence as _evidence_group,
@@ -129,6 +130,7 @@ def _build_parser() -> argparse.ArgumentParser:
129130
_receipts_group.register(sub)
130131
_daily_group.register(sub)
131132
_add_group.register(sub)
133+
_setup_group.register(sub)
132134
_stations_group.register(sub)
133135
_evidence_group.register(sub)
134136
_search_group.register(sub)

src/brigade/cli/_common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"Stations and tools",
2525
[
2626
"add",
27+
"setup",
2728
"stations",
2829
"skills",
2930
"harness",

src/brigade/cli/setup.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
"""brigade setup command group."""
2+
3+
from __future__ import annotations
4+
5+
import argparse
6+
7+
8+
def register(sub: argparse._SubParsersAction) -> None:
9+
p_setup = sub.add_parser("setup", help="Install pinned native Brigade components.")
10+
p_setup.add_argument("--dry-run", action="store_true", help="Report planned actions without writing.")
11+
p_setup.add_argument("--offline", action="store_true", help="Use verified cache only; fail if missing.")
12+
p_setup.add_argument("--rollback", action="store_true", help="Restore the previous installed manifest.")
13+
p_setup.set_defaults(func=dispatch)
14+
15+
16+
def dispatch(args) -> int:
17+
from ..component_install import setup_native_components
18+
19+
return setup_native_components(
20+
dry_run=args.dry_run,
21+
offline=args.offline,
22+
rollback=args.rollback,
23+
)

0 commit comments

Comments
 (0)