Skip to content

Commit aa8a7fc

Browse files
committed
docs: complete launcher guide and acceptance coverage
1 parent 2a5fdb8 commit aa8a7fc

11 files changed

Lines changed: 564 additions & 10 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,20 @@ The desktop **Stacks** tab can create or edit the same checked-in definition thr
6262
structured fields. Saving applies the definition but never prepares ports or launches
6363
project services automatically.
6464

65+
Add a checked-in `portreeve.launcher.json` beside the stack definition when PortReeve
66+
should inject the stack's current endpoint values into project-owned Start, Stop,
67+
Restart, and Status commands. Desktop and CLI share the same exact-revision trust and
68+
lifecycle engine. Begin with command-only integration, then adopt verified activation
69+
when the project launcher is ready to prove ownership and cleanup.
70+
6571
## Documentation
6672

6773
- [Installation and releases](docs/installation.md)
6874
- [JavaScript client](docs/client.md)
6975
- [Socket protocol](docs/protocol.md)
7076
- [CLI automation contract](docs/cli-contract.md)
7177
- [Stack definitions](docs/stacks.md)
78+
- [Project launchers](docs/launchers.md)
7279
- [Desktop application](docs/desktop.md)
7380
- [Mixed process and Docker example](examples/mixed-stack/README.md)
7481
- [Migration from project-local remapping](docs/migration.md)

docs/cli-contract.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ output.
6161
| `stacks prune` | `{ "version": 1, "result": { "candidates": [ ... ], "blocked": [ ... ] } }` |
6262
| `stacks resolve` | `{ "version": 1, "resolution": { ... } }` |
6363
| `stacks snapshot` | `{ "version": 1, "result": { "filename": "...", "snapshot": { ... } } }` |
64+
| `launcher init` | `{ "version": 1, "result": { "created": true, "trusted": true, ... } }` |
65+
| `launcher validate` | `{ "version": 1, "launcher": { "valid": true, ... } }` |
66+
| `launcher trust` | `{ "version": 1, "result": { "trusted": true, ... } }` |
67+
| `launcher start` / `stop` / `restart` / `status` | `{ "version": 1, "result": { ... } }` |
6468
| `config get` | `{ "version": 1, "settings": { ... } }` or `{ "version": 1, "value": ... }` |
6569
| `config set` | `{ "version": 1, "settings": { ... } }` |
6670
| `history` | `{ "version": 1, "events": [ ... ] }` |
@@ -129,6 +133,30 @@ with mode `0600`. The gateway is supplied by the trusted launcher—for example,
129133
on Linux. PortReeve does not infer or verify sandbox topology. Mount the resulting
130134
document read-only and never mount the PortReeve control socket into the sandbox.
131135

136+
## Project launchers
137+
138+
`launcher init`, `validate`, `trust`, `start`, `stop`, `restart`, and `status` share
139+
the same definition, exact-revision trust, environment resolution, lifecycle policy,
140+
and structured results used by Desktop. They discover the nearest enclosing applied
141+
stack by default; `--stack-root <path>` selects an explicit canonical root.
142+
143+
`init` is interactive: it refuses an existing file, previews manifest-derived
144+
suggestions and the exact JSON, creates `portreeve.launcher.json` exclusively, and
145+
trusts only after confirmation. `validate` may inspect an unapplied definition and does
146+
not change trust. `trust` is always interactive and reviews the resolved shell, working
147+
directory, commands, and exact revision. There is no noninteractive trust bypass.
148+
149+
Lifecycle execution refuses invalid, unapplied, or untrusted launchers. `start
150+
--run-start-anyway` is the explicit repair path for partial nonconflicting evidence.
151+
`stop --allow-degraded` is the explicit daemon-outage path and uses only an exact-root,
152+
exact-launcher-revision cached nonsecret environment. Start and Restart never proceed
153+
without the daemon. Status output remains advisory beside fresh or clearly local stale
154+
evidence. Attached Start blocks in the invoking CLI process and forwards cancellation
155+
only to the exact process group that invocation created.
156+
157+
See [Project launchers](launchers.md) for the checked-in schema and complete behavioral
158+
contract.
159+
132160
## Prune consent
133161

134162
`claims prune --dry-run` reports eligible missing-workspace claims without mutation.

docs/desktop.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,45 @@ Valid output uses two-space indentation, a final newline, editor order, and omit
9292
defaults such as TCP transport, required or published `true`, automatic allocation, and
9393
the dependency endpoint when it is `default`.
9494

95-
PortReeve Desktop never starts or stops a project process or container, invokes Docker
95+
The Stacks tab never starts or stops a project process or container, invokes Docker
9696
Compose, owns application startup order, maps project environment variables, or asserts
97-
application health. Those remain responsibilities of the project launcher. Stale stack
97+
application health. Those remain responsibilities of a project launcher. Stale stack
9898
evidence remains visible for diagnosis but withholds stack mutation controls until
9999
current evidence returns; the server revalidates every requested action as final
100100
authority.
101101

102+
## Launcher
103+
104+
Launcher is the fourth primary tab, after Stacks. It is the low-friction bridge from an
105+
applied stack's current PortReeve allocation to project-owned lifecycle commands. The
106+
stack-linked browser shows configuration, exact-revision trust, integration maturity,
107+
fresh evidence, action availability, bounded current-session output, and the latest
108+
twenty safe operation records.
109+
110+
An applied stack without `portreeve.launcher.json` offers setup. The dedicated editor
111+
provides Execution, Commands, Endpoint environment, Advanced, and Review sections. It
112+
may prefill editable suggestions from supported manifests in the exact selected working
113+
directory and always displays basename provenance. Discovery never runs project code or
114+
recursively searches child repositories. The exact canonical JSON is visible before
115+
**Save and Trust**.
116+
117+
The renderer holds only opaque stack, document, and session identifiers. Electron main
118+
owns command discovery, exact-byte file replacement, trust, execution, output saving,
119+
and attached-process termination. External changes offer Review, explicit Overwrite, or
120+
Cancel; changing verified activation to command-only requires a separate downgrade
121+
warning. Opening Launcher never executes a command.
122+
123+
Start, Stop, Restart, and Status availability follows the shared engine's current trust
124+
and evidence policy. Partial Start and degraded Stop require explicit confirmation;
125+
conflicts block Start. Attached Start has no timeout and blocks normal application exit
126+
until the stack is stopped, the exact app-owned process group is explicitly terminated,
127+
or exit is cancelled. Output is retained only in the current application session unless
128+
the user explicitly selects **Save output**.
129+
130+
See [Project launchers](launchers.md) for the file schema, environment contract,
131+
command-only and verified semantics, CLI workflow, degraded recovery, concurrency,
132+
retention, and platform boundaries.
133+
102134
## Trust and data boundary
103135

104136
Electron runs a sandboxed renderer with context isolation, Node integration disabled,

docs/issues/tb-portreeve-launcher/issues.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ and existing lifecycle failure details.
9898

9999
## I-8 - Deliver the Desktop Launcher tab
100100

101-
- **Status:** in-review
101+
- **Status:** closed
102102
- **Estimate:** 3d
103103
- **Plan steps:** P8
104104
- **Rubric criteria:** R1, R2, R3, R4, R5, R7, R8
@@ -111,7 +111,7 @@ flow, degraded states, Stacks cross-links, and packaged accessibility coverage.
111111

112112
## I-9 - Document and verify the assembled feature
113113

114-
- **Status:** open
114+
- **Status:** in-progress
115115
- **Estimate:** 2d
116116
- **Plan steps:** P9
117117
- **Rubric criteria:** R1, R2, R3, R4, R5, R6, R7, R8

docs/issues/tb-portreeve-launcher/tracker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Append PR boundary entries here.
128128
### PR #32 - Desktop Launcher tab
129129

130130
- **PR:** [#32](https://github.com/TrentBrown/portreeve/pull/32)
131-
- **Status:** in review
131+
- **Status:** merged 2026-08-08
132132
- **Scope:** P8 / I-8: fourth primary Launcher tab, stack-linked master-detail browser,
133133
guided editor and provenance, exact JSON review, Save and Trust, evidence and maturity
134134
presentation, lifecycle controls, confirmations, progress, cancellation, bounded

0 commit comments

Comments
 (0)