@vibechain/os 0.4.1 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/AGENTS.md +80 -48
  2. package/README.md +143 -55
  3. package/SECURITY.md +47 -20
  4. package/dist/app-client.d.ts +4 -1
  5. package/dist/app-client.js +15 -4
  6. package/dist/app-host.d.ts +124 -9
  7. package/dist/app-host.js +395 -57
  8. package/dist/app-protocol.d.ts +17 -1
  9. package/dist/app-protocol.js +12 -0
  10. package/dist/app-runtime.d.ts +18 -2
  11. package/dist/app-runtime.js +75 -11
  12. package/dist/app-wire.d.ts +215 -0
  13. package/dist/app-wire.js +268 -0
  14. package/dist/browser.d.ts +3 -0
  15. package/dist/browser.js +3 -0
  16. package/dist/bundle.js +6 -6
  17. package/dist/canvas.d.ts +2 -2
  18. package/dist/canvas.js +3 -1
  19. package/dist/capture.d.ts +22 -0
  20. package/dist/capture.js +99 -0
  21. package/dist/check.d.ts +12 -0
  22. package/dist/check.js +167 -0
  23. package/dist/cli-publish.d.ts +24 -0
  24. package/dist/cli-publish.js +288 -0
  25. package/dist/cli-session.d.ts +108 -0
  26. package/dist/cli-session.js +245 -0
  27. package/dist/cli.d.ts +10 -0
  28. package/dist/cli.js +46 -10
  29. package/dist/index.d.ts +8 -0
  30. package/dist/index.js +4 -0
  31. package/dist/links.d.ts +15 -0
  32. package/dist/links.js +41 -0
  33. package/dist/listing.d.ts +3 -3
  34. package/dist/listing.js +1 -1
  35. package/dist/loop.d.ts +18 -2
  36. package/dist/loop.js +13 -1
  37. package/dist/manifest.d.ts +90 -4
  38. package/dist/manifest.js +340 -5
  39. package/dist/os.d.ts +63 -0
  40. package/dist/os.js +383 -0
  41. package/dist/preview-parent.d.ts +42 -0
  42. package/dist/preview-parent.js +134 -11
  43. package/dist/preview-ui.js +1 -1
  44. package/dist/preview.js +25 -7
  45. package/dist/redact.d.ts +6 -0
  46. package/dist/redact.js +16 -0
  47. package/dist/runtime-policy.d.ts +20 -0
  48. package/dist/runtime-policy.js +45 -0
  49. package/dist/scaffold.d.ts +13 -2
  50. package/dist/scaffold.js +95 -31
  51. package/dist/submit-notice.d.ts +26 -0
  52. package/dist/submit-notice.js +34 -0
  53. package/dist/templates/plain/game.js +18 -0
  54. package/dist/testing.d.ts +68 -0
  55. package/dist/testing.js +181 -1
  56. package/dist/transport.d.ts +22 -0
  57. package/dist/transport.js +71 -19
  58. package/dist/vibemarket-os.js +1 -0
  59. package/dist/worker.d.ts +18 -0
  60. package/dist/worker.js +34 -0
  61. package/examples/paw-beat/README.md +20 -8
  62. package/examples/paw-beat/cat.ts +665 -89
  63. package/examples/paw-beat/game.ts +162 -28
  64. package/examples/paw-beat/index.html +114 -40
  65. package/examples/paw-beat/main.ts +264 -149
  66. package/examples/paw-beat/music.ts +314 -65
  67. package/examples/paw-beat/stage.ts +560 -0
  68. package/examples/paw-beat/store/icon.png +0 -0
  69. package/examples/paw-beat/store/screenshot-1.webp +0 -0
  70. package/examples/paw-beat/store/screenshot-2.webp +0 -0
  71. package/examples/paw-beat/vibemarket.json +2 -2
  72. package/examples/vibexp-app/README.md +7 -7
  73. package/examples/vibexp-app/index.html +3 -2
  74. package/examples/vibexp-app/plain/game.ts +20 -0
  75. package/examples/vibexp-app/plain/index.html +6 -0
  76. package/examples/vibexp-app/plain/vibemarket.json +17 -0
  77. package/examples/vibexp-app/src/main.ts +46 -31
  78. package/examples/vibexp-app/store/icon.png +0 -0
  79. package/examples/vibexp-app/three/README.md +21 -0
  80. package/examples/vibexp-app/three/index.html +4 -0
  81. package/examples/vibexp-app/three/src/main.ts +45 -0
  82. package/examples/vibexp-app/three/vibemarket.json +19 -0
  83. package/examples/vibexp-app/vibemarket.json +17 -11
  84. package/package.json +6 -2
package/AGENTS.md CHANGED
@@ -1,4 +1,4 @@
1
- # VibeStore app author contract — @vibechain/os 0.4.1
1
+ # VibeStore app author contract — @vibechain/os 0.5.1
2
2
 
3
3
  This is the contract for people and agents building apps for VibeStore, the app
4
4
  store inside VibeMarket OS. Read it with [README.md](README.md) (API, helpers and
@@ -9,63 +9,84 @@ guide is https://vibechain.com/os/docs.
9
9
 
10
10
  An ordinary static web app: a game, a tool or a desktop toy. You submit a ZIP of
11
11
  **built output**, not source, `node_modules`, a server or an install script.
12
- Vanilla TypeScript, canvas, WebGL and engine builds all work. Bundle every
13
- dependency and asset, and use relative paths (`base: './'` in Vite). No remote
14
- scripts, fonts, images or APIs: the app can load only its own files.
12
+ Vanilla JavaScript with two script tags, TypeScript, canvas, WebGL and engine
13
+ builds all work. Bundle your code and assets and use relative paths (`base: './'`
14
+ in Vite). Scripts, styles and workers' first scripts always come from the bundle;
15
+ images, audio, video, fonts and data may also come from servers your manifest
16
+ declares in `network` (below).
15
17
 
16
18
  ## Start
17
19
 
18
20
  ```sh
19
- npx --yes @vibechain/os@0.4.1 init my-app
21
+ npx --yes @vibechain/os@0.5.1 init my-app # TypeScript + canvas; or --template three, or --template plain
20
22
  cd my-app
21
23
  npm install
22
24
  npm run build
25
+ npm run check
23
26
  npm run dev
24
27
  ```
25
28
 
26
- `os init` writes Stamp Club, a complete starter whose `vibemarket.json` is already
27
- a schema version 2 listing with placeholder text and pictures. Replace the
28
- fields its README lists before submitting; an unchanged starter is rejected at
29
- review. `examples/paw-beat` in this package is a complete 3D game with a real
30
- listing.
29
+ `os init` writes a complete starter whose `vibemarket.json` is already a schema
30
+ version 3 listing with placeholder text and pictures. Replace the fields its
31
+ README lists before submitting; an unchanged starter is rejected at review.
32
+ `--template plain` writes `index.html`, `game.js`, `vibemarket-os.js`, the
33
+ manifest and two images, with nothing to install. `examples/paw-beat` in this
34
+ package is a complete 3D game with a real listing.
31
35
 
32
36
  ## The app API
33
37
 
34
38
  ```ts
35
- import { connectVibeMarketApp } from "@vibechain/os";
36
- const app = await connectVibeMarketApp();
37
- const saved = await app.checkpoint.read(); // null on first open
38
- await app.checkpoint.write({ level: 2 }); // resolves after the host accepts it
39
- app.lifecycle.onChanged(({ active, width, height }) => { /* pause when inactive, resize */ });
40
- await app.ready(); // remove the host's loading state
41
- // At the end of a game: await app.game.finish({ score: 42 });
42
- window.addEventListener("pagehide", () => app.destroy(), { once: true });
39
+ import { connect, OsError } from "@vibechain/os";
40
+ const os = await connect();
41
+ const save = await os.load<{ best: number }>(); // null on first open
42
+ await os.save({ best: 7 }); // up to 1 MiB of JSON; kept across opens and devices
43
+ os.onPause(() => { void os.save(state); }); // pause, resume and resize listeners
44
+ await os.ready(); // remove the host's loading state (or os.progress(0.5) while loading)
45
+ const cards = await os.cards(); // if the manifest declares cards
46
+ const me = await os.player(); // { guest: false, handle, username?, name, picture } or { guest: true }; plus token with network
47
+ await os.finish({ score: 42 });
43
48
  ```
44
49
 
45
- That is the whole facade: readiness, lifecycle, a bounded checkpoint and one
46
- score. Checkpoints are plain JSON of at most 32 KiB, kept in host memory only
47
- while the window is open. `game.finish` takes one integer score from 0 to
48
- 1,000,000,000, once per open window; the host owns the results screen and the
49
- score grants nothing. Optional helpers: `@vibechain/os/loop` (fixed-step loop
50
- that pauses when inactive), `@vibechain/os/canvas` (canvas sizing and WebGL
51
- context loss) and `@vibechain/os/testing` (an in-memory host for unit tests).
50
+ Every rejection is an `OsError` with a stable `code` (`unsupported`,
51
+ `not-permitted`, `invalid`, `too-large`, `rate-limited`, `needs-click`,
52
+ `unavailable`, `timeout`, `closed`); refusals keep the app running. `game.finish`
53
+ takes one integer score from 0 to 1,000,000,000, once per open window; the host
54
+ owns the results screen and the score grants nothing. Saves are coalesced (one
55
+ write per 10 seconds) and kept on the server, except a guest's, which last only
56
+ while the window is open. `os.pack(slug)`, `os.showPack(slug)`,
57
+ `os.showCard(slug, cardId)` and `os.open(link)` (app links `vmos://pack/<slug>`,
58
+ `vmos://card/<slug>/<cardId>` and `https://vibechain.com/os/pack/<slug>`) work
59
+ for any public pack, linked or not, on a click while the app is in front, at most
60
+ one per 10 seconds; buying happens only in VibeMarket's own window and the app
61
+ learns nothing from it. `os.cards()` and `os.packs()` need `cards` declared. Pointer lock,
62
+ gamepads, audio, WebAssembly and `blob:` workers (`spawnWorker`) work; threads
63
+ and `SharedArrayBuffer` do not. `os.fullscreen()` asks the host after a click.
64
+ The optional `os.onCapture?.(() => canvasOrDataUrl)` customises the picture the desktop camera takes of your app (by default the SDK sends the largest visible canvas, so canvas and WebGL games need nothing; apps built with an older SDK show a placeholder in desktop photos). Optional helpers: `@vibechain/os/loop`, `@vibechain/os/canvas` and
65
+ `@vibechain/os/testing` (`createFakeOs`, an in-memory host for unit tests).
66
+ `connectVibeMarketApp()` (0.4) still works and is deprecated.
52
67
 
53
68
  ## What an app cannot do
54
69
 
55
- An app has no access to the player's account, session, profile, Steam ID,
56
- handle or balance; no inventory, wallets, purchases, trades, Cash, XP or
57
- rewards; no network requests to vibechain.com APIs or other servers; no saves
58
- that outlive the open window; no multiplayer or leaderboards; and no access to
59
- the desktop page, other apps, Steam commands or native IPC. Requests for any of
60
- these end the app's session. Never ask players to type secrets into your app.
70
+ An app learns who is playing (their public handle, @name, display name and
71
+ picture, the same in every app; there is no anonymous id) but has no access to
72
+ the player's account, session, Steam ID or balance; no wallets, purchases,
73
+ trades, Cash, Nuggets, XP or rewards;
74
+ no vibechain.com APIs; no undeclared servers; no Classic `/market` holdings; and
75
+ no access to the desktop page, other apps, Steam commands or native IPC. Card
76
+ holdings are visible only as the manifest declares (`cards`), and the signed
77
+ player token only with `network`; whatever the app sends its servers is tied to
78
+ the player's public identity. A network app may not embed third-party advertising
79
+ or analytics SDKs, take payments, or ask players to sign in; what its server
80
+ sends after review is still bound by the listing rules. Never ask players to type
81
+ secrets into your app.
61
82
 
62
83
  ## Manifest and listing
63
84
 
64
- `vibemarket.json` sits at the root of the build. VibeStore accepts only schema
65
- version 2, with every field required and unknown fields refused at every level:
85
+ `vibemarket.json` sits at the root of the build. VibeStore accepts schema
86
+ version 3 (and version 2 unchanged), with unknown fields refused at every level:
66
87
 
67
- - `schemaVersion: 2`, `sdkVersion: 1`, `category: "vibexp-app"`,
68
- `permissions: []`, `collectionId: null`.
88
+ - `schemaVersion: 3`. Version 3 refuses the four constant fields of version 2
89
+ (`sdkVersion`, `category`, `permissions`, `collectionId`).
69
90
  - `id`: lowercase letters, digits and single hyphens, at most 60 characters;
70
91
  the first accepted submission claims it. `version`: semver, each submitted
71
92
  once. `name` (60) and `tagline` (160). `entry`: the HTML file.
@@ -74,28 +95,36 @@ version 2, with every field required and unknown fields refused at every level:
74
95
  - `store.screenshots`: 1–4 PNG, JPEG or WebP files in the bundle, at most
75
96
  1 MiB each, contents matching the extension, none the icon.
76
97
  - `store.description`: 40–2,000 characters of plain text (line breaks allowed).
77
- - `store.category`: `game`, `tool` or `toy`.
98
+ - `store.category`: `game` or `app`.
78
99
  - `store.rating`: `violence` and `language` each `none`, `mild` or `strong`;
79
100
  `mature` true or false. Rate honestly.
80
101
  - `store.support`: an `https://` URL or an email address, at most 200
81
102
  characters, shown to players and reviewers.
82
-
83
- `os preview` and `os pack` run these checks locally. `parseManifest`
84
- (`@vibechain/os/manifest`) and `checkListing` (`@vibechain/os/listing`) run them
85
- in your own tools.
103
+ - `packs` (optional): up to 3 vmOS pack slugs. Someone else's pack is linked
104
+ only after its creator approves.
105
+ - `cards` (optional): `none`, `linked` (needs `packs`) or `all` (every vmOS
106
+ pack the player holds).
107
+ - `network` (optional): up to 8 exact `https://` or `wss://` origins with a
108
+ public DNS name; no IP addresses, local or wildcard-DNS names, paths or `*`.
109
+ Your servers must send `Access-Control-Allow-Origin: *`.
110
+
111
+ `os check` lists every problem at once; `os preview` and `os pack` run the same
112
+ checks. `checkManifest` and `parseManifest` (`@vibechain/os/manifest`) and
113
+ `checkListing` (`@vibechain/os/listing`) run them in your own tools.
86
114
 
87
115
  ## Bundle rules
88
116
 
89
- At most 256 entries, 16 MiB per file, 64 MiB expanded and a 20 MiB ZIP. ASCII
90
- paths in normal subdirectories: no absolute or hidden paths, traversal,
91
- symlinks, encrypted entries, or names that differ only by letter case. File
92
- types: HTML, JS/MJS, CSS, JSON, PNG/JPEG/WebP/GIF/AVIF/ICO, WOFF/WOFF2/TTF/OTF,
93
- MP3/OGG/WAV, MP4/WebM, WASM/BIN/TXT. **No SVG** anywhere, because it is a
94
- document format that can carry script. Workers, `SharedArrayBuffer` and
117
+ At most 2,000 entries, 32 MiB per file, 128 MiB expanded and a 50 MiB ZIP; a
118
+ game may stream more from its declared servers. ASCII paths in normal
119
+ subdirectories: no absolute or hidden paths, traversal, symlinks, encrypted
120
+ entries, or names that differ only by letter case. File types: HTML, JS/MJS, CSS,
121
+ JSON, PNG/JPEG/WebP/GIF/AVIF/ICO, WOFF/WOFF2/TTF/OTF, MP3/OGG/WAV, MP4/WebM,
122
+ WASM/BIN/TXT. **No SVG** anywhere, because it is a document format that can carry
123
+ script. Workers start from `blob:` URLs (`spawnWorker`); `SharedArrayBuffer` and
95
124
  threaded WASM are unavailable.
96
125
 
97
126
  ```sh
98
- npm run build # the starter: type-check, bundle, then os assets copies HTML, manifest and store images
127
+ npm run build # the starter: type-check, bundle, then os assets copies HTML, manifest, store images and public/
99
128
  npm run pack # os pack dist app.zip
100
129
  ```
101
130
 
@@ -105,7 +134,10 @@ npm run pack # os pack dist app.zip
105
134
  a Steam account; new versions of an app must come from the account that
106
135
  first submitted it.
107
136
  2. Open **VibeStore**, go to **Submit**, choose `app.zip` and submit it for
108
- review. Refusals are explained there in plain words.
137
+ review. Refusals are explained there in plain words. Or, from a terminal:
138
+ `os login` (approve the code in your browser), then `os submit dist`; see
139
+ README.md, "Submit from the command line". Never approve a code you did not
140
+ start yourself.
109
141
  3. Vibechain staff review every version: they read the listing, look at the
110
142
  file list and run the app in a sandboxed window. There is no automatic
111
143
  approval and no promised review time. A rejection comes with a note; fix the
package/README.md CHANGED
@@ -1,87 +1,143 @@
1
1
  # @vibechain/os
2
2
 
3
- Build games, tools and desktop apps for VibeMarket OS with TypeScript. Start with a working app, preview it in a desktop window and save progress with checkpoints.
3
+ Build games, tools and desktop apps for VibeMarket OS. One `connect()` gives your app readiness, a save that follows the player, who is playing, their vmOS cards and packs, a signed statement of the player for your own server, and a score. Use TypeScript with a bundler, or two `<script>` tags and nothing to install.
4
4
 
5
5
  ## Quickstart
6
6
 
7
7
  ```sh
8
- npx --yes @vibechain/os@0.4.1 init my-app
9
- cd my-app
10
- npm install
11
- npm run build
12
- npm run dev
8
+ npx --yes @vibechain/os@0.5.1 init my-app # TypeScript, esbuild and a 2D canvas (the default)
9
+ npx --yes @vibechain/os@0.5.1 init my-app --template three # TypeScript, esbuild and Three.js: a spinning vmOS card
10
+ npx --yes @vibechain/os@0.5.1 init my-app --template plain # index.html + game.js, nothing to install
13
11
  ```
14
12
 
15
- Open the printed `http://127.0.0.1:PORT` address. Stamp Club is a complete starter: start a round, add stamps, minimize and restore, then finish to see the host's result screen. Play again starts a fresh round. Host-accepted state survives suspension in the same open window. Reset clears it. Rebuild and restart the immutable preview after changes. `npm run pack` creates `app.zip`, ready to submit to VibeStore: the starter's `vibemarket.json` is already a complete listing, with placeholder text and pictures you must replace first (its README lists the fields; an unchanged starter is rejected at review).
13
+ For `canvas` and `three`: `cd my-app`, `npm install`, `npm run build`, `npm run dev`, and open the printed `http://127.0.0.1:PORT` address. `npm run check` (`os check`) lists every problem with the manifest and the build at once, and `npm run pack` writes `app.zip`. For `plain`: `npx @vibechain/os preview my-app`; the folder is already the app, so zip it to submit. Every template's `vibemarket.json` is a complete schema version 3 listing with placeholder text and pictures you must replace first (an unchanged starter is rejected at review).
16
14
 
17
- The starter includes TypeScript and esbuild and pins your SDK version. To install from a downloaded SDK archive, supply its absolute path to npm and the initializer:
15
+ To install from a downloaded SDK archive, supply its absolute path to npm and the initializer:
18
16
 
19
17
  ```sh
20
- npm exec --yes --package=/absolute/path/vibechain-os-0.4.1.tgz -- os init my-app /absolute/path/vibechain-os-0.4.1.tgz
18
+ npm exec --yes --package=/absolute/path/vibechain-os-0.5.1.tgz -- os init my-app /absolute/path/vibechain-os-0.5.1.tgz
21
19
  ```
22
20
 
23
- That explicit fallback keeps a `file:` archive dependency; retain the archive for later reinstalls. Use a supported Node.js release: `^22.23.4`, `^24.22.1` or `^26.12.1`.
21
+ That keeps a `file:` archive dependency; retain the archive for later reinstalls. Use a supported Node.js release: `^22.23.4`, `^24.22.1` or `^26.12.1`. The library is ESM-only (`import`, or dynamic `import()` from CommonJS); browsers without a bundler use `vibemarket-os.js` (below).
24
22
 
25
- The library is ESM-only: use TypeScript/JavaScript `import`, or dynamic `import()` from CommonJS. There is no synchronous CommonJS `require()` build. Package validation checks the declared ESM and bundler resolution modes.
26
-
27
- ## App API
23
+ ## The app API
28
24
 
29
25
  ```ts
30
- import { connectVibeMarketApp } from "@vibechain/os";
31
-
32
- const app = await connectVibeMarketApp();
33
- const previous = await app.checkpoint.read(); // null on first open
34
- await app.checkpoint.write({ stamps: 1 }); // await host acknowledgement
35
- app.lifecycle.onChanged(({ active, width, height }) => {
36
- // Adapt rendering to the host surface. Untrusted frames are removed on suspension.
37
- });
38
- await app.ready(); // remove the host's loading state after initial render
39
- window.addEventListener("pagehide", () => app.destroy(), { once: true });
26
+ import { connect, OsError } from "@vibechain/os";
27
+
28
+ const os = await connect(); // the handshake; no arguments
29
+ os.progress(0.5); // optional, while loading
30
+ os.ready(); // hide the host's loading screen
31
+
32
+ const save = await os.load<MySave>(); // MySave | null
33
+ await os.save(save); // JSON, up to 1 MiB, coalesced
34
+
35
+ const cards = await os.cards(); // the Card[] the manifest permits; os.cards("rooftop-rats") filters
36
+ const off = os.onCards(next => {}); // the whole list again whenever it changes; returns unsubscribe
37
+ const packs = await os.packs(); // PackSummary[]
38
+ const pack = await os.pack("born-to-vibe"); // any public pack's face: name, cover, cards with art
39
+ await os.showPack("born-to-vibe"); // VibeMarket opens the pack; needs a click
40
+ await os.showCard("born-to-vibe", "b1"); // ...or one card on its pack's page
41
+ await os.open("vmos://pack/born-to-vibe"); // ...or an app link (packLink, cardLink, parseVmosLink)
42
+
43
+ const me = await os.player(); // { guest: false, handle, username?, name, picture, token?, expiresAt? } or { guest: true }
44
+ await os.finish({ score: 42 }); // one integer score, 0 to 1,000,000,000
45
+
46
+ os.onPause(() => {}); os.onResume(() => {});
47
+ os.onResize(({ width, height }) => {});
48
+ os.size; os.active; os.guest; // current values
49
+ await os.maximize(); await os.fullscreen();
50
+ os.close(); // release the port
40
51
  ```
41
52
 
42
- Checkpoint is a base app capability, separate from Market permissions. It accepts only the same app's bounded JSON: ≤32 KiB UTF-8, depth8, ≤2,048 nodes, ≤64 keys/object, ≤256 items/array and ≤8KiB/string. State lives in trusted host memory, scoped to the open installation/version/identity/window; it is cleared on close, revoke, package/identity change or the controller's absolute 15-minute expiry. Suspension does not extend that lifetime. There is no arbitrary namespace, disk storage, account data or browser-restart guarantee. `write()` resolves after acknowledgement; an accepted snapshot can be restored even if that acknowledgement was interrupted.
53
+ **Errors.** Every rejection is an `OsError` whose `code` is one of nine and never changes; the `message` is a plain sentence that may. A refusal keeps the app running; only protocol violations (malformed messages, replayed requests, the hard rate limits) end the session.
54
+
55
+ | Code | Means |
56
+ |---|---|
57
+ | `unsupported` | The host is older than this SDK and has no such feature. |
58
+ | `not-permitted` | The manifest does not declare it, or the app is loading or behind another window. |
59
+ | `invalid` | A bad argument: not JSON, a bad pack slug, a number out of range. |
60
+ | `too-large` | A save over 1 MiB, or over the player's 8 MiB across all apps. |
61
+ | `rate-limited` | Too often; try later. |
62
+ | `needs-click` | `showPack`, `showCard`, `open` or `fullscreen` without a fresh click in the app. |
63
+ | `unavailable` | The host or server could not answer now; retry. |
64
+ | `timeout` | No answer in 10 seconds. |
65
+ | `closed` | The session ended: the window closed, the app was revoked, or a limit. |
66
+
67
+ **Saves.** `os.save(value)` stores one JSON value per player per app on VibeMarket's servers: at most 1 MiB as UTF-8 JSON, nested at most 64 deep, finite numbers only. It survives closing the window, other devices and reinstalling; a save not written for 365 days is deleted, and the player can delete it from the app's VibeStore page. Calls made sooner than the host accepts (one write in flight, at most one every 10 seconds) replace the pending value, and every caller's promise resolves with the write that carries it, so call it as often as you like. Saves are accepted while the window is behind another one: `os.onPause(() => os.save(state))` is the place to save. Two devices playing at once overwrite each other (last write wins). A guest's save lives only while the window is open (`os.guest`).
68
+
69
+ **Cards and packs.** A manifest may link up to 3 vmOS packs by slug (the last part of `vibechain.com/os/pack/<slug>`), in `packs`. Linking someone else's pack takes effect once its creator approves the request your submission sends; your own packs are linked at once. With `packs` alone, the listing shows "Uses cards from" and VibeMarket shows your game on the pack's page. `"cards": "linked"` adds `os.cards()` and `os.packs()` for the player's holdings in those packs; `"cards": "all"` for every vmOS pack they hold. There is no prompt: the listing says what the app can see. An app never sees Nuggets, prices, Steam IDs or balances. Card art URLs are under your app's own address and send `Access-Control-Allow-Origin: *`: Three.js's `TextureLoader` uses them as WebGL textures as is; an `<img>` you create needs `img.crossOrigin = "anonymous"` before `src`. The [docs](https://vibechain.com/os/docs#sdk-05-card-game) show a card game skeleton (a deck builder) on these calls.
70
+
71
+ **Showing any pack, and app links (0.5.1).** Any app can show and advertise any public vmOS pack, linked or not, with nothing in the manifest. `os.pack(slug)` returns its public face, what the pack's public page shows: name, creator, cover art and every card with its name, rarity and art (art URLs work as described above), never what the player holds. `os.showPack(slug)` opens the pack in VibeMarket inside vmOS, and `os.showCard(slug, cardId)` opens one card on its pack's page. An app link is one string you can put in your own content or get from your server: `vmos://pack/<slug>`, `vmos://card/<slug>/<cardId>`, or a pack's public page `https://vibechain.com/os/pack/<slug>` (or `www.`); `os.open(link)` opens it. `packLink(slug)` and `cardLink(slug, cardId)` write links and `parseVmosLink(text)` reads one (`{ kind: "pack", pack }`, `{ kind: "card", pack, card }` or `null`); the grammar is exact (lowercase scheme and host, no query, fragment, port or percent-encoding, at most 200 characters), and anything else answers `invalid` without reaching the host. `open` never navigates your frame: the SDK sends the host only the parsed pack or card. All three need the app ready and in front (`not-permitted`) and a fresh click in it (`needs-click`), share one budget of one per 10 seconds (`rate-limited`), and answer `invalid` for a pack that does not exist or was taken down or a card not in it. Buying and opening happen only in VibeMarket's own window, and your app learns nothing about what the player does there; it sees new holdings only through `os.cards()` and `onCards`, as the manifest permits. On a 0.5.0 host `showCard` and card links answer `unsupported`. The [docs](https://vibechain.com/os/docs#sdk-05-link-out) have the full rules and examples.
72
+
73
+ **Network and the player.** A manifest may declare up to 8 servers in `network`: exact `https://` or `wss://` origins (a DNS name, no path, no IP addresses, no local or wildcard-DNS names). The app may then `fetch`, `WebSocket` and `EventSource` them, and load images, audio, video and fonts from the `https://` ones; never scripts, styles or workers. Your servers must answer the frame's `Origin: null` with `Access-Control-Allow-Origin: *` (or `null`) for `fetch` and for images used as textures. Version remote URLs and send a long `Cache-Control`: the app has no IndexedDB, Cache Storage or service worker. Every server you declare sees the player's IP address; the listing says "Connects to" and "Loads content from" your hosts, and what your server sends after review is still bound by the listing rules (no third-party advertising or analytics, no payments, no sign-in prompts).
74
+
75
+ **Who is playing, and what your app and your servers learn.** `os.player()` tells every schema 3 app who is playing, with no permission and no prompt: the player's public vmOS identity, exactly what their public profile shows anyone. That is `{ guest: false, handle, username?, name, picture }`: `handle` is the character's fixed id and never changes (key your data on it), `username` the @name they show when it differs, `name` the display name, and `picture` the avatar as a URL under your app's own address (CORS-clean, like card art), or null. A guest is `{ guest: true }` and nothing else. There is no anonymous or per-app id: the same player has the same handle in every app, so two apps can recognize the same player, and anything your app sends to your servers (handle, name, holdings, save, gameplay) arrives tied to that public identity. Your app never receives the player's Steam ID, account id, session, balance, Nuggets, level or wallet. With `network`, the answer also carries `token` and `expiresAt`: a 5-minute Ed25519 JWT stating the same identity (`sub` is the handle, plus `username`, `name`, `aud` = your app id) for your own server, which must verify it rather than trust a handle the client sends: the [verification sample in the docs](https://vibechain.com/os/docs#sdk-05-verify) is the whole check, in Node with no dependencies, and compares `aud` with your app id. The token is not a credential for any vibechain.com route; the SDK reuses it while more than a minute remains; guests get none. Every server you declare also sees the player's IP address.
76
+
77
+ **Loading, window and input.** `ready()` within 15 seconds, or call `progress(fraction)` at least every 15 seconds and `ready()` within 120 (the SDK sends at most one progress a second). `maximize()` maximizes or restores the window. `fullscreen()` asks the host to put your app's window, with a slim host strip (your app's name, Report, Exit), into the browser's full screen; it needs a fresh click and Escape always leaves. Pointer lock, gamepads and audio work in every app (sound starts on the first input). Workers run from `blob:` URLs: `spawnWorker("worker.js")` fetches a bundled worker script and starts it (bundle it into one file). WebAssembly works; threads and `SharedArrayBuffer` do not, so use single-threaded engine exports.
78
+
79
+ **Older hosts.** On a host older than 0.5, `ready`, `finish`, the lifecycle, `load` and `save` work (saves use the window-only 32 KiB checkpoint, and a larger one answers `too-large`); the rest answers `unsupported` and `progress` does nothing.
80
+
81
+ **Desktop photos.** The desktop camera cannot see inside a sandboxed app window, so it asks the app for its current frame (`app.capture`). `connect()` and `connectVibeMarketApp()` answer by default with the largest visible `<canvas>` on the page, taken on the next animation frame, scaled to at most 1280 pixels on its longest side and encoded as WebP (JPEG if WebP is unavailable) under 1,000,000 characters; a WebGL game needs no changes. An app that draws with the DOM, or wants a custom picture, registers `const off = os.onCapture?.(() => canvasOrDataUrl)` (optional; the 0.4 client has `sdk.onCapture` too): return an `HTMLCanvasElement`, a PNG/JPEG/WebP data URL, `null`, or a promise of one; the latest handler wins and the host waits about 1.2 seconds. Failures are silent. An app built with an older SDK shows a placeholder in desktop photos until it is rebuilt against this SDK.
82
+
83
+ **Legacy API.** `connectVibeMarketApp()` and its `checkpoint` (0.4) keep working and keep their types, and are deprecated: `connect()` does the same and more on every host.
43
84
 
44
- Manifest: use `sdkVersion: 1`, category `vibexp-app`, `permissions: []` and `collectionId: null`, with `schemaVersion: 2` and a store listing (below). Schema version 1, without a listing, still runs in the preview but cannot be submitted. App methods are deliberately limited to readiness, checkpoints and the score-only completion signal. Raw requests for profile, inventory, rewards, purchases, Steam, native IPC or wallet operations terminate this app session. Existing Market games continue using `connectGameSdk()` with their existing permissions and host transaction review.
85
+ ## Apps without a bundler
45
86
 
46
- ## Game helpers (since 0.3.0)
87
+ `vibemarket-os.js` (in `dist/` of the package, copied by `os init --template plain`) defines one global, `VibemarketOS`, with `connect`, `OsError` and the link helpers `packLink`, `cardLink` and `parseVmosLink`. **Load it and your game from files: inline `<script>` code does not run**, because the runtime's policy allows scripts only from your app's own files.
47
88
 
48
- Two optional imports for canvas, WebGL and engine-based games. Both follow the host lifecycle, so a game stops drawing when its window is not active.
89
+ ```html
90
+ <script src="vibemarket-os.js"></script>
91
+ <script src="game.js"></script>
92
+ ```
93
+
94
+ ```js
95
+ VibemarketOS.connect().then(async os => {
96
+ const best = (await os.load())?.best ?? 0;
97
+ os.ready();
98
+ // ... then await os.save({ best }) and await os.finish({ score })
99
+ });
100
+ ```
101
+
102
+ ## Game helpers
103
+
104
+ `@vibechain/os/loop` and `@vibechain/os/canvas` take the result of `connect()` (or of the legacy `connectVibeMarketApp()`) and follow its lifecycle, so a game stops drawing when its window is not active.
49
105
 
50
106
  ```ts
51
- import { connectVibeMarketApp } from "@vibechain/os";
107
+ import { connect } from "@vibechain/os";
52
108
  import { createLoop } from "@vibechain/os/loop";
53
109
  import { fitCanvas } from "@vibechain/os/canvas";
54
110
 
55
- const app = await connectVibeMarketApp();
111
+ const os = await connect();
56
112
  const canvas = document.querySelector("canvas")!;
57
- fitCanvas(app, canvas, { onResize: ({ width, height }) => renderer.setSize(width, height, false) });
58
- const loop = createLoop(app, { update: stepMs => world.step(stepMs), render: alpha => renderer.draw(alpha) });
59
- await app.ready();
60
- window.addEventListener("pagehide", () => { loop.stop(); app.destroy(); }, { once: true });
113
+ fitCanvas(os, canvas, { onResize: ({ width, height }) => renderer.setSize(width, height, false) });
114
+ const loop = createLoop(os, { update: stepMs => world.step(stepMs), render: alpha => renderer.draw(alpha) });
115
+ os.ready();
116
+ window.addEventListener("pagehide", () => { loop.stop(); os.close(); }, { once: true });
61
117
  ```
62
118
 
63
119
  `createLoop` runs a fixed-timestep simulation (default 60 steps per second, at most 5 catch-up steps per frame) and renders once per animation frame. It pauses while the app is inactive and discards that time instead of simulating it on return. `fitCanvas` sizes the canvas backing store from the host surface with the device pixel ratio capped (default 2, and at most 3840 x 2160 pixels), resizes only when the size changes, and keeps a lost WebGL context restorable through `onContextLost` and `onContextRestored`.
64
120
 
65
121
  ### Testing your game
66
122
 
67
- `@vibechain/os/testing` is an in-memory stand-in for the host, so game logic can be unit-tested without a browser:
123
+ `@vibechain/os/testing` has an in-memory host, so game logic can be unit-tested without a browser:
68
124
 
69
125
  ```ts
70
- import { createFakeApp } from "@vibechain/os/testing";
126
+ import { createFakeOs } from "@vibechain/os/testing";
71
127
 
72
- const host = createFakeApp({ checkpoint: { stamps: 3 } });
73
- const game = await startGame(host.app); // your code, given the app instead of connecting
128
+ const host = createFakeOs({ save: { best: 3 }, cards: myCards, packs: [myPack], access: { cards: "linked", packs: ["rooftop-rats"] }, network: true });
129
+ const game = await startGame(host.os); // your code, given the os instead of connecting
130
+ host.setCards(afterAPull); // onCards listeners hear about it
74
131
  host.setLifecycle({ active: false }); // as if the window was minimized
75
- expect(game.paused).toBe(true);
76
- await game.end();
77
- expect(host.finished).toEqual({ score: 3 });
132
+ host.click(); await game.openShop(); // showPack, showCard, open and fullscreen need a click
133
+ expect(host.save).toEqual({ best: 7 }); expect(host.finished).toEqual({ score: 7 });
78
134
  ```
79
135
 
80
- It applies the real checkpoint, score and lifecycle validation and the single-shot completion rule. It has no time limit or request budget, so still run the preview before you ship.
136
+ It applies the real save limits, slug checks, card access levels, single-shot score, click rule, link grammar and error codes, and `protocol: 1` behaves like an older host. `packs` lists every public pack it knows (any of them works with `pack`, `showPack`, `showCard` and `open`), and `shownPacks` and `shownCards` record what the game asked to show. It has no time limits, rate limits or save coalescing, so still run the preview before you ship. `createFakeApp` is the same for the legacy `connectVibeMarketApp()` API.
81
137
 
82
- ### A complete 3D example
138
+ ### Complete examples
83
139
 
84
- `examples/paw-beat` in this package is a small 3D rhythm game built on these helpers with Three.js: a procedural dancing cat, a synthesized song, a saved personal best and a reported score. Its README has the build commands.
140
+ `examples/paw-beat` is a small 3D rhythm game with Three.js (built on the legacy API, unchanged). The `os init` templates live in `examples/vibexp-app` (canvas), `examples/vibexp-app/plain` (the smallest app) and `examples/vibexp-app/three`.
85
141
 
86
142
  ## Intro, loading and results
87
143
 
@@ -99,41 +155,68 @@ Completion does not grant Cash, XP, inventory or a wallet action. The local prev
99
155
 
100
156
  ## Listing in VibeStore
101
157
 
102
- VibeStore is the app store inside VibeMarket OS. You submit from its **Submit** tab, and every version is reviewed by a person before it is listed. The requirements below are checked at submission. An app is listed with manifest schema version 2: version 1 plus two required objects.
158
+ VibeStore is the app store inside VibeMarket OS. You submit from its **Submit** tab or with `os submit` (below), and every version is reviewed by a person before it is listed. The requirements below are checked at submission. A listing is manifest schema version 3:
103
159
 
104
160
  ```json
105
161
  {
106
- "schemaVersion": 2, "sdkVersion": 1, "id": "my-app", "version": "1.0.0", "name": "My App", "tagline": "One line about it.",
107
- "category": "vibexp-app", "entry": "index.html", "permissions": [], "collectionId": null,
162
+ "schemaVersion": 3, "id": "my-app", "version": "1.0.0", "name": "My App", "tagline": "One line about it.", "entry": "index.html",
108
163
  "window": { "width": 960, "height": 600, "resizable": true },
109
164
  "store": {
110
165
  "icon": "store/icon.png", "screenshots": ["store/screenshot-1.webp"],
111
166
  "description": "At least forty characters of plain text about the app.", "category": "game",
112
167
  "rating": { "violence": "none", "language": "none", "mature": false }, "support": "https://example.com/help"
113
- }
168
+ },
169
+ "packs": ["rooftop-rats"], "cards": "linked", "network": ["wss://play.example.com"]
114
170
  }
115
171
  ```
116
172
 
117
173
  | Field | Requirement |
118
174
  |---|---|
119
- | `window` | `width` 320 to 1600 and `height` 200 to 1200 whole CSS pixels, `resizable` true or false. The window opens at this size. |
120
- | `store.icon` | A `.png` file in the bundle, exactly 256 x 256 pixels and at most 256 KiB. |
175
+ | `id` | Lowercase letters, digits and single hyphens, starting with a letter, at most 60 characters. The first accepted submission claims it. |
176
+ | `version` | Semantic version, each submitted once. |
177
+ | `name`, `tagline` | At most 60 and 160 characters. |
178
+ | `entry` | The relative path of the `.html` file to open. |
179
+ | `window` | `width` 320 to 1600 and `height` 200 to 1200 whole CSS pixels, `resizable` true or false. The window opens at this size; maximize and full screen go beyond it. |
180
+ | `store.icon` | A `.png` file in the bundle, exactly 256 x 256 pixels and at most 256 KiB. Supply a full-bleed, opaque square with your subject inside a margin: VibeStore rounds the corners itself. |
121
181
  | `store.screenshots` | 1 to 4 different `.png`, `.jpg`, `.jpeg` or `.webp` files in the bundle, none of them the icon, each at most 1 MiB, with contents that match the extension. |
122
182
  | `store.description` | Plain text, 40 to 2,000 characters after trimming. Line breaks are allowed; other control characters are not. Shown as text, never as HTML. |
123
- | `store.category` | `game`, `tool` or `toy`. |
183
+ | `store.category` | `game` or `app`. Version 2 manifests written for 0.4 with `tool` or `toy` still validate and are read as `app`; `os check` says so. |
124
184
  | `store.rating` | `violence` and `language` each `none`, `mild` or `strong`, and `mature` true or false. Rate honestly. |
125
185
  | `store.support` | An `https://` URL without a user name or password, or an email address, at most 200 characters. Players and reviewers see it. |
186
+ | `packs` | Optional. Up to 3 pack slugs, no repeats, in the order the listing shows them. |
187
+ | `cards` | Optional. `none` (the default), `linked` (needs a pack in `packs`) or `all`. |
188
+ | `network` | Optional. Up to 8 `https://` or `wss://` origins: `scheme://host` or `scheme://host:port` exactly (no path, not even `/`; no port 443), a public DNS name with internationalized names in punycode; never an IP address, `localhost` or a `.local`, `.internal`, `.lan`, `.home.arpa`, `.test`, `.example`, `.invalid`, `.onion` or `.arpa` name, a wildcard-DNS service (`nip.io`, `sslip.io`, `xip.io`, `localtest.me`, `lvh.me`, `traefik.me`), a vibechain.com, vibe.market or eattherich.gg address, or a `*`. Stored lowercase and sorted. |
126
189
 
127
- A version 2 bundle may not contain SVG files anywhere, because SVG is a document format that can carry script; use PNG or WebP. The bundle limits in [SECURITY.md](SECURITY.md) still apply, and the submitted ZIP is at most 20 MiB. Unknown fields are refused at every level. `os pack` and `os preview` run the same manifest and image checks, so a listing problem shows up locally first. To validate in your own tools, `@vibechain/os/manifest` exports `parseManifest` and the bounds, and `@vibechain/os/listing` exports `checkListing`, `pngSize` and `imageKind`, which work on plain `Uint8Array` bytes in Node or a browser.
190
+ Unknown fields are refused at every level, and version 3 refuses the four constant fields of version 2 (`sdkVersion`, `category`, `permissions`, `collectionId`). Schema version 2 manifests are still accepted unchanged. A bundle may not contain SVG files anywhere, because SVG is a document format that can carry script; use PNG or WebP. The submitted ZIP is at most 50 MiB (128 MiB expanded, 32 MiB per file, 2,000 files and folders; see [SECURITY.md](SECURITY.md)); a game may stream more art, audio and data from its declared servers. `os assets` copies a `public/` folder of your project whole into `dist/`, so assets need no manual copying.
128
191
 
129
- `examples/paw-beat` and the `os init` starter are complete version 2 listings.
192
+ `os check [dir]` prints every problem with the manifest and the built folder at once, one per line with the field and how to fix it (`store.icon: icon.png is 512 x 512; it must be exactly 256 x 256 pixels`), and exits 1 if there is any: the same manifest, origin, listing image, file type and size checks as the server. `os pack` and `os preview` run them too. To validate in your own tools, `@vibechain/os/manifest` exports `parseManifest`, `checkManifest` (every problem as `{ path, message }`), `networkOrigin` and the bounds (`APP_BUNDLE_LIMITS`, `APP_MANIFEST_LIMITS`, `APP_STORE_CATEGORIES`), `@vibechain/os/listing` exports `checkListing`, `pngSize` and `imageKind`, and `@vibechain/os/policy` exports `appRuntimeCsp`, the runtime's exact Content-Security-Policy, which the preview and vibechain.com share.
130
193
 
131
194
  ## Publishing status
132
195
 
133
- Publish by submitting your packed ZIP from the VibeStore **Submit** tab in VibeMarket OS; see [Publish](https://vibechain.com/os/docs#publish) and [Review](https://vibechain.com/os/docs#review). Installing the SDK does not list your app. An approved version is archived to public IPFS, so approval is publication: removing an app from VibeStore later does not recall that copy. Third-party apps open in the browser version of VibeMarket OS; the Steam client does not run them yet. The app API does not grant native, inventory, payment or reward access. Existing Market games continue to use their separate permissioned API.
196
+ Publish by submitting your packed ZIP from the VibeStore **Submit** tab in VibeMarket OS, or with `os submit` from your terminal; see [Publish](https://vibechain.com/os/docs#publish) and [Review](https://vibechain.com/os/docs#review). Installing the SDK does not list your app. An approved version is archived to public IPFS, so approval is publication: removing an app from VibeStore later does not recall that copy. Third-party apps open in the browser version of VibeMarket OS; the Steam client does not run them yet. The app API grants no native, payment, wallet or reward access, and card reads only as the manifest declares them. Existing Market games continue to use their separate permissioned API.
134
197
 
135
198
  See the [SDK docs](https://vibechain.com/os/docs) for the app API and [SECURITY.md](SECURITY.md) for the sandbox and resource limits.
136
199
 
200
+ ## Submit from the command line
201
+
202
+ `os submit` is a second way in to the same submission as the **Submit** tab: the same checks, limits, refusal codes and review.
203
+
204
+ ```sh
205
+ npx os login # prints a code and opens https://vibechain.com/os/cli
206
+ npx os submit dist # checks and packs the build, shows a summary and the notice, asks, uploads
207
+ npx os status # your submissions and their review state (os status <app-id> for one app)
208
+ npx os whoami # the account and computer of this sign-in
209
+ npx os logout # revokes this computer's sign-in, then deletes it
210
+ ```
211
+
212
+ - **Sign-in.** `os login` asks vibechain.com for a short code, prints it with the page address and opens the page with your system's opener (`--no-browser` to skip). Sign in with Steam on that page, type the code your terminal shows, check that the page shows the same code and your computer's name, and select **Approve**. The CLI never asks for, sees or stores your Steam password or browser session. Only approve a code that your own terminal just showed you: whoever gets you to approve their code can submit apps in your name.
213
+ - **What the sign-in can do.** Submit apps to VibeStore review and read your own submissions' status; nothing else. It lasts 30 days from sign-in (use does not extend it) and you can revoke it at [vibechain.com/os/cli](https://vibechain.com/os/cli) at any time. Signing out of Steam in the browser does not revoke it.
214
+ - **Where it is kept.** `$XDG_CONFIG_HOME/vibemarket-os/credentials.json`, else `~/Library/Application Support/vibemarket-os` (macOS), `%APPDATA%\vibemarket-os` (Windows) or `~/.config/vibemarket-os`: a `0700` directory and a `0600` file, never your project. The CLI refuses to read it if other users can.
215
+ - **CI.** Set `VIBEMARKET_OS_TOKEN` to the `token` of a saved sign-in, stored as a CI secret. It is used by `whoami`, `submit` and `status` and never written to disk. Use `os submit dist --yes` there: without a terminal the CLI does not ask.
216
+ - **Before uploading,** `os submit` prints the app, version, file count, size and digest, and the same notice as the [Review](https://vibechain.com/os/docs#review) docs: approval is publication, and the Terms link. It records no acceptance; it asks you to confirm (or takes `--yes`).
217
+ - **Refusals** print the Submit tab's code, the server's message and the fix from the [docs table](https://vibechain.com/os/docs#publish).
218
+ - **Hosts.** Requests go only to `https://vibechain.com`; redirects are never followed. `--origin http://127.0.0.1:<port>` (or `localhost`) is for local development only and prints a warning. `--verbose` prints each request's method, address and status, never the token.
219
+
137
220
  ## Maintainer workflow
138
221
 
139
222
  ```sh
@@ -141,10 +224,15 @@ pnpm install --frozen-lockfile
141
224
  pnpm review
142
225
  pnpm build
143
226
  pnpm check:package
144
- pnpm release:preview --version 0.4.1
227
+ pnpm release:preview --version 0.5.1
145
228
  ```
146
229
 
147
- `pnpm build` emits JavaScript/declarations plus one bundled preview host UI. Only `examples/paw-beat` and `examples/vibexp-app` are published. The store images of both examples are generated by scripts in `tools/` (not published), which drive headless, muted Chromium through Playwright. Read [SECURITY.md](SECURITY.md) before integrating any untrusted app.
230
+ `pnpm build` emits JavaScript/declarations, the bundled preview host UI, `dist/vibemarket-os.js` (the no-bundler IIFE) and `dist/templates/plain/game.js` (built from `examples/vibexp-app/plain/game.ts`, so the repository holds no authored JavaScript). Only `examples/paw-beat` and `examples/vibexp-app` (with its `plain` and `three` templates) are published; `examples/card-game` and `examples/verify-player.ts` are type-checked and tested here and shown on the docs site. The store images of both examples are generated by scripts in `tools/` (not published), which drive headless, muted Chromium through Playwright. Read [SECURITY.md](SECURITY.md) before integrating any untrusted app.
231
+
232
+ ## Changes in 0.5.1 (since 0.5.0)
233
+
234
+ - **New, optional: desktop photos.** The host may send `app.capture` and the SDK answers with a new `app.frame` request carrying the app's picture (by default its largest visible canvas). `Os.onCapture` and `VibeMarketAppSdk.onCapture` are new optional hooks to supply your own picture. Nothing existing was renamed or removed, and no app needs a code change: an app built with an older SDK, or one that sends nothing, is shown as its icon and name in desktop photos.
235
+ - **New: link out to any pack or card.** `os.pack` and `os.showPack` work for any public pack, linked or not; `os.showCard(slug, cardId)` and `os.open(link)` are new, with the pure helpers `packLink`, `cardLink` and `parseVmosLink` (also on the no-bundler `VibemarketOS` global). One new protocol message, `card.show`, advertised as the hello feature `"card.show"`; on a host without it `showCard` and card links answer `unsupported`.
148
236
 
149
237
  ## License
150
238