Skip to content

Commit e3fee98

Browse files
os-zhuangclaude
andauthored
docs: marketplace client is the open @objectstack/cloud-connection package + os package install (ADR-0008) (#22)
- marketplace.mdx: 'How it works' reflects the post-ADR-0008 reality — the client is the open cloud-connection package, wired explicitly (snippet included); installed apps run cloud-independent. New 'Installing from the CLI' section (catalog + air-gapped modes). - packages.mdx: Installing table gains the two CLI rows; note that install commands take the stable manifest id, never pkg_ row ids. - reference/cli.mdx: document os package install. - deploy/air-gapped.mdx: inline-install section for running instances. English masters only; locale variants follow the translation pipeline. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent a9502c0 commit e3fee98

4 files changed

Lines changed: 75 additions & 6 deletions

File tree

content/docs/build/marketplace.mdx

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,38 @@ fastest way to put real software in front of users on day one.
1111

1212
## How it works
1313

14-
Every ObjectOS runtime ships with the `MarketplaceProxy` and
15-
`MarketplaceInstallLocal` plugins enabled by default. When you open
16-
Console (`/_console/`), the marketplace tab queries the configured app
17-
catalog and shows installable apps.
14+
The marketplace client is the open-source `@objectstack/cloud-connection`
15+
package. Cloud-managed environments and the self-hosted ObjectOS image
16+
ship it wired up out of the box; a stack you assemble yourself enables
17+
it with a few lines of config:
18+
19+
```ts
20+
import {
21+
MarketplaceProxyPlugin,
22+
MarketplaceInstallLocalPlugin,
23+
RuntimeConfigPlugin,
24+
resolveCloudUrl,
25+
} from '@objectstack/cloud-connection';
26+
27+
const catalogUrl = resolveCloudUrl(); // OS_CLOUD_URL; 'off' disables
28+
29+
plugins: [
30+
...(catalogUrl ? [
31+
new MarketplaceProxyPlugin({ controlPlaneUrl: catalogUrl }),
32+
new MarketplaceInstallLocalPlugin({ controlPlaneUrl: catalogUrl }),
33+
] : []),
34+
new RuntimeConfigPlugin({ controlPlaneUrl: '', singleEnvironment: true, installLocal: true }),
35+
]
36+
```
37+
38+
The browse/install *mechanism* is open; the catalog *service* (org
39+
catalogs, review, paid distribution) is provided by whichever control
40+
plane `OS_CLOUD_URL` points at. Once an app is installed it lives in
41+
your runtime's own kernel — nothing at runtime depends on the catalog
42+
staying reachable.
43+
44+
When you open Console (`/_console/`), the marketplace tab queries the
45+
configured app catalog and shows installable apps.
1846

1947
```text
2048
You ─→ Console ─→ Marketplace tab ─→ pick app ─→ Install
@@ -101,6 +129,24 @@ runtime tracks installed version + available updates per app. Users see
101129
an "Update available" badge in Console when a new version is published
102130
to a catalog they're tracking.
103131

132+
## Installing from the CLI
133+
134+
Console is the primary install surface, but the same install-local
135+
endpoint is scriptable for CI and air-gapped operations:
136+
137+
```bash
138+
# Catalog mode — the runtime resolves the package from its configured catalog
139+
os package install com.acme.crm --runtime http://localhost:3000 \
140+
--email admin@example.com --password …
141+
142+
# Air-gapped mode — send a compiled artifact inline, no catalog round-trip
143+
os package install ./dist/objectstack.json --runtime http://localhost:3000 \
144+
--email admin@example.com --password …
145+
```
146+
147+
The credentials are an account on the **target runtime** (not your
148+
cloud login) — the same authorization Console install uses.
149+
104150
## Permissions
105151

106152
Installing apps requires the `manage_marketplace` system permission —

content/docs/build/packages.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,13 @@ environment login. You never need to know an environment id to install.
120120
| Path | How |
121121
|---|---|
122122
| Console (recommended) | Sign in to the environment → **Marketplace** → pick the package → **Install**. Installs into the current environment. |
123-
| REST | `POST /api/v1/marketplace/install-local` (body: `{ packageId, versionId? }`) |
124-
| Air-gapped | Mount the compiled `dist/objectstack.json` artifact (see [Air-gapped](/docs/deploy/air-gapped)) |
123+
| CLI → running runtime | `os package install com.acme.crm --runtime <url>` — the runtime resolves the package from its configured catalog and merges it into its own kernel |
124+
| CLI air-gapped | `os package install ./dist/objectstack.json --runtime <url>` — compiled artifact sent inline, no catalog round-trip |
125+
| REST | `POST /api/v1/marketplace/install-local` (body: `{ packageId, versionId? }` or `{ manifest }`) |
126+
| Air-gapped (boot-time) | Mount the compiled `dist/objectstack.json` artifact (see [Air-gapped](/docs/deploy/air-gapped)) |
127+
128+
Package ids in install commands are the stable manifest id
129+
(`com.acme.crm`) — you never need the internal `pkg_…` row id.
125130

126131
> **CI shortcut.** Pipelines that deploy to a *known* environment can publish
127132
> and install in one step: `os package publish --env <id> --install

content/docs/deploy/air-gapped.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,20 @@ If the customer uses OIDC/SSO, the identity provider must be reachable
5656
from the air-gapped network. If not, use local email/password auth or an
5757
identity provider hosted inside the same network.
5858

59+
## Installing additional packages
60+
61+
A running air-gapped instance can take additional packages without any
62+
catalog connectivity — hand the compiled artifact to the install CLI
63+
and it is sent inline and merged into the live kernel (no restart):
64+
65+
```bash
66+
os package install ./dist/objectstack.json --runtime https://os.internal.example \
67+
--email admin@example.com --password …
68+
```
69+
70+
The manifest is cached on the runtime host under
71+
`.objectstack/installed-packages/` and re-registers on every boot.
72+
5973
## Upgrade process
6074

6175
Treat artifacts as immutable:

content/docs/reference/cli.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ os cloud login | logout | whoami
160160

161161
```bash
162162
os package publish # publish artifact as a versioned package
163+
os package install <id|file> # install into a RUNNING runtime: catalog id
164+
# (com.acme.crm) or a compiled artifact JSON
165+
# (air-gapped, inline). --runtime / --email /
166+
# --password identify the runtime to install into
163167
os publish # publish to ObjectStack Cloud
164168
os rollback <revision> # activate a previous artifact revision
165169
```

0 commit comments

Comments
 (0)