Skip to content

Commit a50aabc

Browse files
febrinandafebrinanda
authored andcommitted
Docs: document CoreHub install planning
1 parent 01b3ff0 commit a50aabc

4 files changed

Lines changed: 49 additions & 11 deletions

File tree

docs/corehub/cli.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ npm run corehub -- package download plugin-lab --output plugin-lab.corehub-manif
5858

5959
Without `--output`, the CLI requests `redirect=false` from the Registry API and prints the package, publisher, artifact checksum, storage URL, and signature metadata. With `--output`, it fetches the signed storage URL, verifies the downloaded byte count and SHA-256 checksum, and writes the artifact only after verification passes.
6060

61+
6. Produce a dry-run installer plan:
62+
63+
```sh
64+
npm run corehub -- package install plugin-lab --registry https://coreblow.com/corehub
65+
npm run corehub -- package install plugin-lab --output plugin-lab.corehub-manifest.json --registry https://coreblow.com/corehub
66+
```
67+
68+
`package install` does not modify CoreBlow plugin state yet. It resolves the package, checks publisher and artifact metadata, and reports the install steps that would run. With `--output`, it also performs the verified artifact download and includes the verification result in the plan.
69+
6170
## Package-Compatible Commands
6271

6372
CoreHub keeps ClawHub-style package commands so clients can grow around stable registry habits:
@@ -71,6 +80,8 @@ npm run corehub -- package files plugin-lab
7180
npm run corehub -- package artifact plugin-lab
7281
npm run corehub -- package download plugin-lab
7382
npm run corehub -- package download plugin-lab --output plugin-lab.corehub-manifest.json
83+
npm run corehub -- package install plugin-lab
84+
npm run corehub -- package install plugin-lab --output plugin-lab.corehub-manifest.json
7485
```
7586

7687
## Hosted Registry Reads
@@ -88,6 +99,8 @@ npm run corehub -- package files plugin-lab --registry https://coreblow.com/core
8899
npm run corehub -- package artifact plugin-lab --registry https://coreblow.com/corehub
89100
npm run corehub -- package download plugin-lab --registry https://coreblow.com/corehub
90101
npm run corehub -- package download plugin-lab --output plugin-lab.corehub-manifest.json --registry https://coreblow.com/corehub
102+
npm run corehub -- package install plugin-lab --registry https://coreblow.com/corehub
103+
npm run corehub -- package install plugin-lab --output plugin-lab.corehub-manifest.json --registry https://coreblow.com/corehub
91104
npm run corehub -- registry info --registry https://coreblow.com/corehub
92105
```
93106

@@ -118,6 +131,25 @@ If the byte count or SHA-256 checksum does not match the artifact manifest, the
118131

119132
For the signed redirect behavior behind this command, see [Downloads](/corehub/downloads). For the full trust chain, see [Trust Model](/corehub/trust-model).
120133

134+
## Install Planning
135+
136+
`corehub package install <id>` is currently an install planner. It returns JSON with:
137+
138+
| Field | Purpose |
139+
| --- | --- |
140+
| `dryRun` | Always `true` until CoreBlow plugin install wiring lands. |
141+
| `install.status` | Planned install action and whether CoreBlow state would be modified. |
142+
| `download.verified` | Whether the artifact was fetched and checksum verified. |
143+
| `plan` | Ordered install steps for package resolution, publisher verification, artifact fetch, and plugin install. |
144+
145+
Use `--output <path>` when you want the planner to prove the artifact bytes:
146+
147+
```sh
148+
npm run corehub -- package install plugin-lab --output plugin-lab.corehub-manifest.json --registry https://coreblow.com/corehub
149+
```
150+
151+
The command remains dry-run after writing the verified artifact; it does not install the plugin into CoreBlow yet.
152+
121153
## Command Map
122154

123155
| Command | Status | Purpose |
@@ -136,5 +168,6 @@ For the signed redirect behavior behind this command, see [Downloads](/corehub/d
136168
| `corehub package files <id>` | Available | Show file metadata from the artifact manifest. |
137169
| `corehub package artifact <id>` | Available | Show artifact manifest metadata, checksum, provenance, and download policy. |
138170
| `corehub package download <id>` | Available | Print signed download metadata or write a verified artifact with `--output`. |
171+
| `corehub package install <id>` | Available | Produce a dry-run install plan, optionally with a verified artifact download. |
139172
| `corehub package publish <source>` | Planned | Publish package artifacts after registry writes land. |
140173
| `corehub registry info` | Available | Read the API discovery document. |

docs/corehub/downloads.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,11 @@ The JSON response includes:
6262
```sh
6363
npm run corehub -- package download plugin-lab --registry https://coreblow.com/corehub
6464
npm run corehub -- package download plugin-lab --output plugin-lab.corehub-manifest.json --registry https://coreblow.com/corehub
65+
npm run corehub -- package install plugin-lab --output plugin-lab.corehub-manifest.json --registry https://coreblow.com/corehub
6566
```
6667

6768
Without `--output`, the CLI requests `redirect=false` and prints the signed download metadata. With `--output`, it fetches the signed storage URL, verifies `artifact.size` and `artifact.sha256`, then writes the artifact to disk.
6869

70+
`package install` uses the same verified download path when `--output` is present, but the command still returns a dry-run install plan instead of modifying CoreBlow plugin state.
71+
6972
For the security model behind this flow, see the [Trust Model](/corehub/trust-model). For endpoint details and status codes, see the [Registry API](/corehub/api).

docs/corehub/publishing-roadmap.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ CoreHub publishing is planned as a controlled registry workflow. The current reg
1212
| Publisher-owned versions | Live now |
1313
| Artifact manifests | Live now |
1414
| Storage-backed signed downloads | Live now |
15+
| Dry-run install planning | Live now |
1516
| Remote publish writes | Planned |
1617
| Artifact upload API | Planned |
1718
| Review and moderation queue | Planned |
@@ -128,13 +129,14 @@ Some operations stay blocked until the write-side registry is ready:
128129

129130
The recommended implementation order is:
130131

131-
1. Verified CLI download with checksum and size enforcement.
132-
2. Publisher registration model.
133-
3. Package submission draft API.
134-
4. Artifact upload and storage policy.
135-
5. Review and moderation queue.
136-
6. Publish approval flow.
137-
7. Ownership transfer workflow.
138-
8. Aggregate install analytics.
132+
1. Verified CLI download with checksum and size enforcement. Done.
133+
2. Dry-run install planning that wires verified downloads into install intent. Done.
134+
3. Publisher registration model.
135+
4. Package submission draft API.
136+
5. Artifact upload and storage policy.
137+
6. Review and moderation queue.
138+
7. Publish approval flow.
139+
8. Ownership transfer workflow.
140+
9. Aggregate install analytics.
139141

140142
This keeps the CoreHub trust chain intact while moving from read-only registry data toward controlled publisher writes.

0 commit comments

Comments
 (0)