@vibechain/os 0.4.0 → 0.5.0

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 (93) hide show
  1. package/AGENTS.md +139 -208
  2. package/README.md +131 -54
  3. package/SECURITY.md +45 -20
  4. package/dist/app-client.d.ts +4 -1
  5. package/dist/app-client.js +4 -1
  6. package/dist/app-host.d.ts +111 -9
  7. package/dist/app-host.js +339 -58
  8. package/dist/app-protocol.d.ts +2 -0
  9. package/dist/app-runtime.d.ts +18 -2
  10. package/dist/app-runtime.js +75 -11
  11. package/dist/app-wire.d.ts +194 -0
  12. package/dist/app-wire.js +253 -0
  13. package/dist/browser.d.ts +2 -0
  14. package/dist/browser.js +2 -0
  15. package/dist/bundle.js +6 -6
  16. package/dist/canvas.d.ts +2 -2
  17. package/dist/canvas.js +3 -1
  18. package/dist/check.d.ts +12 -0
  19. package/dist/check.js +167 -0
  20. package/dist/cli-publish.d.ts +24 -0
  21. package/dist/cli-publish.js +288 -0
  22. package/dist/cli-session.d.ts +108 -0
  23. package/dist/cli-session.js +245 -0
  24. package/dist/cli.d.ts +10 -0
  25. package/dist/cli.js +46 -10
  26. package/dist/index.d.ts +5 -0
  27. package/dist/index.js +3 -0
  28. package/dist/listing.d.ts +3 -3
  29. package/dist/listing.js +1 -1
  30. package/dist/loop.d.ts +18 -2
  31. package/dist/loop.js +13 -1
  32. package/dist/manifest.d.ts +90 -4
  33. package/dist/manifest.js +340 -5
  34. package/dist/os.d.ts +56 -0
  35. package/dist/os.js +354 -0
  36. package/dist/preview-parent.d.ts +36 -0
  37. package/dist/preview-parent.js +122 -11
  38. package/dist/preview-ui.js +1 -1
  39. package/dist/preview.js +25 -7
  40. package/dist/redact.d.ts +6 -0
  41. package/dist/redact.js +16 -0
  42. package/dist/runtime-policy.d.ts +20 -0
  43. package/dist/runtime-policy.js +45 -0
  44. package/dist/scaffold.d.ts +13 -2
  45. package/dist/scaffold.js +99 -29
  46. package/dist/submit-notice.d.ts +26 -0
  47. package/dist/submit-notice.js +34 -0
  48. package/dist/templates/plain/game.js +18 -0
  49. package/dist/testing.d.ts +63 -0
  50. package/dist/testing.js +157 -1
  51. package/dist/transport.d.ts +20 -0
  52. package/dist/transport.js +71 -19
  53. package/dist/vibemarket-os.js +1 -0
  54. package/dist/worker.d.ts +18 -0
  55. package/dist/worker.js +34 -0
  56. package/examples/paw-beat/README.md +20 -8
  57. package/examples/paw-beat/cat.ts +665 -89
  58. package/examples/paw-beat/game.ts +162 -28
  59. package/examples/paw-beat/index.html +114 -40
  60. package/examples/paw-beat/main.ts +264 -149
  61. package/examples/paw-beat/music.ts +314 -65
  62. package/examples/paw-beat/stage.ts +560 -0
  63. package/examples/paw-beat/store/icon.png +0 -0
  64. package/examples/paw-beat/store/screenshot-1.webp +0 -0
  65. package/examples/paw-beat/store/screenshot-2.webp +0 -0
  66. package/examples/paw-beat/vibemarket.json +2 -2
  67. package/examples/vibexp-app/README.md +20 -4
  68. package/examples/vibexp-app/index.html +3 -2
  69. package/examples/vibexp-app/plain/game.ts +20 -0
  70. package/examples/vibexp-app/plain/index.html +6 -0
  71. package/examples/vibexp-app/plain/vibemarket.json +17 -0
  72. package/examples/vibexp-app/src/main.ts +46 -31
  73. package/examples/vibexp-app/store/icon.png +0 -0
  74. package/examples/vibexp-app/store/screenshot-1.png +0 -0
  75. package/examples/vibexp-app/three/README.md +21 -0
  76. package/examples/vibexp-app/three/index.html +4 -0
  77. package/examples/vibexp-app/three/src/main.ts +45 -0
  78. package/examples/vibexp-app/three/vibemarket.json +19 -0
  79. package/examples/vibexp-app/vibemarket.json +27 -1
  80. package/package.json +8 -3
  81. package/examples/chonk-stack/card-slice.ts +0 -17
  82. package/examples/chonk-stack/cat3d.ts +0 -57
  83. package/examples/chonk-stack/game.css +0 -174
  84. package/examples/chonk-stack/index.html +0 -32
  85. package/examples/chonk-stack/main.ts +0 -149
  86. package/examples/chonk-stack/model.ts +0 -40
  87. package/examples/chonk-stack/renderer.ts +0 -263
  88. package/examples/chonk-stack/skins.ts +0 -47
  89. package/examples/chonk-stack/vibemarket.json +0 -21
  90. package/examples/collection-room/index.html +0 -3
  91. package/examples/collection-room/main.ts +0 -31
  92. package/examples/collection-room/vibemarket.json +0 -12
  93. package/examples/tsconfig.json +0 -4
package/AGENTS.md CHANGED
@@ -1,224 +1,155 @@
1
- # VibeMarket game author contract — SDK v1
2
-
3
- **VibeMarket OS app authors:** start with [README.md](README.md) and
4
- [SECURITY.md](SECURITY.md), the `os init` starter and
5
- `connectVibeMarketApp()`. Use category `vibexp-app`, `permissions: []` and
6
- `collectionId: null`. That browser-only app facade has readiness, lifecycle and
7
- bounded app-owned checkpoints and a score-only `game.finish({score})` signal; it has no profile, inventory, Steam/native,
8
- wallet, purchase or reward authority. The existing Market-game contract below
9
- continues to apply to collection games using `connectGameSdk()`; do not infer
10
- those permissions for an OS app. A VibeStore listing uses manifest schema version 2
11
- (window size and a `store` object with icon, screenshots, description, category,
12
- rating and support); the requirements are in README.md under "Listing in
13
- VibeStore". Submit the packed ZIP from the VibeStore Submit tab in VibeMarket OS; every version is reviewed before listing, and an approved version is archived to public IPFS.
14
-
15
- This is the contract internal developers and agents test before public release.
16
- Build an ordinary static web game. Deliver a ZIP of **built output**, not source,
17
- node_modules, a server, or an install script. React, vanilla TypeScript and canvas
18
- renderers all work. Use relative asset paths (`base: './'` in Vite). No remote
19
- scripts, fonts, APIs, workers or wallet libraries. Bundle your dependencies/assets.
20
-
21
- ## Install and author
22
-
23
- Install the published package in an independent game project:
1
+ # VibeStore app author contract — @vibechain/os 0.5.0
24
2
 
25
- ```sh
26
- npm install @vibechain/os@0.4.0
27
- ```
3
+ This is the contract for people and agents building apps for VibeStore, the app
4
+ store inside VibeMarket OS. Read it with [README.md](README.md) (API, helpers and
5
+ the listing table) and [SECURITY.md](SECURITY.md) (sandbox and limits). The public
6
+ guide is https://vibechain.com/os/docs.
28
7
 
29
- To use a reviewed local SDK tarball instead, build it from the SDK package directory:
8
+ ## What you build
30
9
 
31
- ```sh
32
- pnpm install --frozen-lockfile
33
- pnpm review
34
- pnpm build
35
- pnpm pack --out /tmp/vibechain-os-0.4.0.tgz
36
- ```
10
+ An ordinary static web app: a game, a tool or a desktop toy. You submit a ZIP of
11
+ **built output**, not source, `node_modules`, a server or an install script.
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).
37
17
 
38
- In an independent game project, install that tarball:
18
+ ## Start
39
19
 
40
20
  ```sh
41
- npm install /tmp/vibechain-os-0.4.0.tgz
42
- npm install --save-dev typescript esbuild
21
+ npx --yes @vibechain/os@0.5.0 init my-app # TypeScript + canvas; or --template three, or --template plain
22
+ cd my-app
23
+ npm install
24
+ npm run build
25
+ npm run check
26
+ npm run dev
43
27
  ```
44
28
 
45
- The tarball contains `examples/collection-room`. Copy its three files into your
46
- project to start. Build `main.ts` with
47
- `npx esbuild main.ts --bundle --format=esm --target=es2022 --outfile=dist/game.js`,
48
- and copy `index.html` and `vibemarket.json` into `dist/`. Type-check your game with
49
- strict TypeScript. Do not import VibeMarket host files or depend on a repo alias.
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.
50
35
 
51
- ```ts
52
- import { connectGameSdk } from '@vibechain/os';
53
- const sdk = await connectGameSdk();
54
- await sdk.ready(); // Call when the first usable frame is mounted, within 30 seconds.
55
- // At the end of a round: await sdk.game.finish({ score: 42 });
56
- // Report only the integer score; the host owns results and any verified reward.
57
- const profile = await sdk.profile.get(); // null for guests; no wallet address
58
- const packs = await sdk.catalog.list(); // only this game's approved collection
59
- const inventory = await sdk.inventory.get(); // pages of <=100 cards
60
- const stop = sdk.inventory.onChanged(() => { /* re-fetch inventory */ });
61
- // On teardown: stop(); sdk.destroy();
62
- ```
36
+ ## The app API
63
37
 
64
- For a complete reactive collection, use `watchInventory(sdk, { onChange,
65
- onError, maxPages: 20 })` from the same package. It reads all pages atomically,
66
- coalesces overlapping change events, discards interrupted snapshots, rejects
67
- non-advancing cursors, and stops emitting after `observer.destroy()`. The
68
- default bound is 20 pages / 2,000 cards; `maxPages` supports 1–100. Exceeding
69
- the bound calls `onError`, rather than presenting a partial collection as
70
- complete. Revoke cosmetic entitlements on error; retry with `observer.refresh()`.
71
- This helper adds no host permission and does not poll the chain by itself.
72
-
73
- `examples/paw-beat` is a complete 3D rhythm game on the OS app facade (no permissions): Three.js, the `@vibechain/os/loop` and `@vibechain/os/canvas` helpers, synthesized audio, a checkpoint and `game.finish`; see its README.
74
-
75
- `examples/chonk-stack` is a complete game using this contract: vanilla
76
- TypeScript and Three.js, with all geometry and textures generated locally.
77
- Copy the folder into your game project, install the SDK tarball, run
78
- `npm install three@0.175.0` and `npm install --save-dev @types/three@0.175.0`, then run
79
- `npx esbuild main.ts --bundle --minify --target=es2022 --outfile=dist/game.js`.
80
- Copy `index.html` and `vibemarket.json` into `dist/`; esbuild emits `game.css`.
81
- Use a unique manifest ID/version before packaging. Its After Hours collection
82
- is intentionally fixed in `skins.ts` and the manifest; change both for a new
83
- collection. The package is usable under the normal opaque-origin sandbox.
84
- The game pauses on blur, tab hiding, collection access, and opening the shop.
85
- Scores are session-only; cosmetics never alter timing, speed, or rewards.
86
-
87
- `profile.get`, `catalog.list`, `inventory.get`, `packs.buy`, `packs.sell`,
88
- `packs.open`, `cards.reveal`, `cards.sell` and `cards.collect` each require an
89
- explicit manifest permission. `ready()`, `showShop()` and the score-only `game.finish()` signal are always available; they grant no reward or transaction authority.
90
- The SDK has no provider, arbitrary signing, chain RPC, wallet/session object,
91
- private key, balances, recipient override or transaction calldata escape hatch.
92
- `playerId` is session-local, not a durable account ID. Guest inventories are empty.
93
-
94
- Pack actions take `(packId, quantity = 1)` (integer 1–10); card actions take
95
- `cardId`. Calls return `{completed: true}` after the existing host driver
96
- completes. Handle cancellation/errors and re-read inventory. On timeout check
97
- inventory before retrying: a submitted transaction may still complete. The host
98
- revalidates account, ownership and price after the user reviews the action.
99
- Never auto-buy on game load. Only request spending following a clear player
100
- interaction. Calling `showShop()` opens the trusted host rail/mobile drawer.
101
-
102
- Collecting a non-Classic card permanently forfeits its cashout; Classic KEEP is a
103
- local preference and remains sellable. Collection skins should use rarity/foil
104
- or bundled artwork. Metadata image URLs are returned as data, but arbitrary
105
- remote images are blocked in the runtime; the host rail renders collection art.
106
-
107
- ## Bundle and manifest
108
-
109
- ZIP root must contain `vibemarket.json` and the declared HTML entry. All manifest
110
- fields are required; unknown fields fail validation. Example:
111
-
112
- ```json
113
- {
114
- "schemaVersion": 1,
115
- "sdkVersion": 1,
116
- "id": "my-cat-game",
117
- "version": "1.0.0-test.1",
118
- "name": "My Cat Game",
119
- "tagline": "Collect a cat. Take it for a spin.",
120
- "category": "Collect · customize · play",
121
- "entry": "index.html",
122
- "permissions": ["profile.get", "catalog.list", "inventory.get", "packs.buy", "packs.open", "cards.reveal", "cards.collect"],
123
- "collectionId": "REPLACE_WITH_A_REAL_MARKET_COLLECTION_ID"
124
- }
125
- ```
126
-
127
- Use `collectionId: null` for unbound free play; omit trading permissions in that
128
- case. This release binds **one collection** per version. Get its exact ID from
129
- the market catalog/developer collection selector; do not invent one. All game
130
- and rail access is filtered to that collection. A missing/retired collection
131
- shows an unavailable state; it does not silently bind another one. The local
132
- operator approves the declared collection and permissions when publishing.
133
- Changing either requires a new version. Public developer ownership approval is
134
- not implemented in the local adapter.
135
-
136
- Supported assets: HTML, JS/MJS, CSS, JSON, PNG/JPEG/WebP/GIF/AVIF/SVG/ICO (no SVG in
137
- schema version 2 bundles), WOFF/
138
- WOFF2/TTF/OTF, MP3/OGG/WAV, MP4/WebM, WASM/BIN/TXT. Max 20 MiB compressed,
139
- 64 MiB expanded, 16 MiB/file, 256 ZIP entries. No symlinks, encrypted files,
140
- traversal, duplicate/case-colliding names, absolute paths or hidden paths.
141
- Use ASCII filenames and normal subdirectories. WASM must run without threads;
142
- workers/SharedArrayBuffer and arbitrary network access are unavailable.
143
-
144
- ```sh
145
- npx vibemarket-game pack dist my-cat-game.zip
38
+ ```ts
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 });
146
48
  ```
147
49
 
148
- ## Local test → publish → rollback
149
-
150
- Run the host from its verified checkout using its existing local stack. Use
151
- `http://127.0.0.1:<port>/market/games?manage=1` (localhost also works). In the host's
152
- `vibechain/` directory run `pnpm games:publisher-token`; paste that local operator
153
- credential into Developer Studio. Do not commit/share this token. Upload the ZIP,
154
- inspect permissions and collection, preview, then select **Publish to dev**.
155
- Uploading never publishes automatically. Draft links are unlisted bearer links;
156
- anyone with the link on the same computer can preview. They are not multi-user
157
- private previews or authenticated sharing links.
158
-
159
- CLI uses exactly the same endpoints:
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)` and `os.showPack(slug)` work for linked
57
+ packs; `os.cards()` and `os.packs()` with `cards` declared. Pointer lock,
58
+ gamepads, audio, WebAssembly and `blob:` workers (`spawnWorker`) work; threads
59
+ and `SharedArrayBuffer` do not. `os.fullscreen()` asks the host after a click.
60
+ Optional helpers: `@vibechain/os/loop`, `@vibechain/os/canvas` and
61
+ `@vibechain/os/testing` (`createFakeOs`, an in-memory host for unit tests).
62
+ `connectVibeMarketApp()` (0.4) still works and is deprecated.
63
+
64
+ ## What an app cannot do
65
+
66
+ An app learns who is playing (their public handle, @name, display name and
67
+ picture, the same in every app; there is no anonymous id) but has no access to
68
+ the player's account, session, Steam ID or balance; no wallets, purchases,
69
+ trades, Cash, Nuggets, XP or rewards;
70
+ no vibechain.com APIs; no undeclared servers; no Classic `/market` holdings; and
71
+ no access to the desktop page, other apps, Steam commands or native IPC. Card
72
+ holdings are visible only as the manifest declares (`cards`), and the signed
73
+ player token only with `network`; whatever the app sends its servers is tied to
74
+ the player's public identity. A network app may not embed third-party advertising
75
+ or analytics SDKs, take payments, or ask players to sign in; what its server
76
+ sends after review is still bound by the listing rules. Never ask players to type
77
+ secrets into your app.
78
+
79
+ ## Manifest and listing
80
+
81
+ `vibemarket.json` sits at the root of the build. VibeStore accepts schema
82
+ version 3 (and version 2 unchanged), with unknown fields refused at every level:
83
+
84
+ - `schemaVersion: 3`. Version 3 refuses the four constant fields of version 2
85
+ (`sdkVersion`, `category`, `permissions`, `collectionId`).
86
+ - `id`: lowercase letters, digits and single hyphens, at most 60 characters;
87
+ the first accepted submission claims it. `version`: semver, each submitted
88
+ once. `name` (60) and `tagline` (160). `entry`: the HTML file.
89
+ - `window`: `width` 320–1600 and `height` 200–1200 CSS pixels, `resizable`.
90
+ - `store.icon`: a PNG in the bundle, exactly 256 x 256, at most 256 KiB.
91
+ - `store.screenshots`: 1–4 PNG, JPEG or WebP files in the bundle, at most
92
+ 1 MiB each, contents matching the extension, none the icon.
93
+ - `store.description`: 40–2,000 characters of plain text (line breaks allowed).
94
+ - `store.category`: `game` or `app`.
95
+ - `store.rating`: `violence` and `language` each `none`, `mild` or `strong`;
96
+ `mature` true or false. Rate honestly.
97
+ - `store.support`: an `https://` URL or an email address, at most 200
98
+ characters, shown to players and reviewers.
99
+ - `packs` (optional): up to 3 vmOS pack slugs. Someone else's pack is linked
100
+ only after its creator approves.
101
+ - `cards` (optional): `none`, `linked` (needs `packs`) or `all` (every vmOS
102
+ pack the player holds).
103
+ - `network` (optional): up to 8 exact `https://` or `wss://` origins with a
104
+ public DNS name; no IP addresses, local or wildcard-DNS names, paths or `*`.
105
+ Your servers must send `Access-Control-Allow-Origin: *`.
106
+
107
+ `os check` lists every problem at once; `os preview` and `os pack` run the same
108
+ checks. `checkManifest` and `parseManifest` (`@vibechain/os/manifest`) and
109
+ `checkListing` (`@vibechain/os/listing`) run them in your own tools.
110
+
111
+ ## Bundle rules
112
+
113
+ At most 2,000 entries, 32 MiB per file, 128 MiB expanded and a 50 MiB ZIP; a
114
+ game may stream more from its declared servers. ASCII paths in normal
115
+ subdirectories: no absolute or hidden paths, traversal, symlinks, encrypted
116
+ entries, or names that differ only by letter case. File types: HTML, JS/MJS, CSS,
117
+ JSON, PNG/JPEG/WebP/GIF/AVIF/ICO, WOFF/WOFF2/TTF/OTF, MP3/OGG/WAV, MP4/WebM,
118
+ WASM/BIN/TXT. **No SVG** anywhere, because it is a document format that can carry
119
+ script. Workers start from `blob:` URLs (`spawnWorker`); `SharedArrayBuffer` and
120
+ threaded WASM are unavailable.
160
121
 
161
122
  ```sh
162
- export VIBEMARKET_PUBLISH_URL=http://127.0.0.1:8888
163
- # Set VIBEMARKET_PUBLISH_TOKEN to the local operator credential without logging it.
164
- npx vibemarket-game upload my-cat-game.zip
165
- npx vibemarket-game list
166
- npx vibemarket-game publish my-cat-game 1.0.0-test.1 1
167
- # Last argument = latest registry revision returned by list/upload; never guess.
168
- npx vibemarket-game rollback my-cat-game 1.0.0-test.1 3
123
+ npm run build # the starter: type-check, bundle, then os assets copies HTML, manifest, store images and public/
124
+ npm run pack # os pack dist app.zip
169
125
  ```
170
126
 
171
- The upload response contains a preview URL. Test guest play, loading, SDK reads,
172
- permission errors, bound inventory, cancellation and mobile drawer. Wallet tests
173
- must use an explicitly selected disposable/test chain or a user-authorized real
174
- transaction; do not spend real funds just to test publication. Then increment the
175
- manifest version for changes, rebuild and upload again. A byte-identical repeat
176
- is idempotent; changing bytes under an existing version returns 409. Publish and
177
- rollback atomically select a retained immutable version. An already open game
178
- stays pinned to its version until reopened. Old previews remain available.
179
-
180
- The library lists only active versions. Drafts and previous versions remain in
181
- Studio. Local quota is 40 games / 100 total versions; there is no delete UI.
182
- Registry/assets persist in ignored `vibechain/.game-publisher/`. Back up this
183
- folder to retain local uploads; losing it loses the local registry. A crash can
184
- leave `.lock`: confirm no publisher request is running before removing that lock.
185
-
186
- ## Runtime and future public adapter
187
-
188
- Host wallet and HUD stay in VibeMarket. Uploaded HTML/JS runs at
189
- `http://games.localhost:<port>/game-assets/...`, in an `allow-scripts` sandbox with
190
- an opaque origin and a private MessagePort SDK session. HTTP CSP also sandboxes
191
- a directly opened game URL. Do not add `allow-same-origin`, parent DOM access,
192
- injected wallet scripts, popup navigation or top-level navigation. Fetch is
193
- limited to this immutable bundle's assets. The runtime host denies all market
194
- pages and APIs. The existing Next server must listen on that loopback address;
195
- a server bound only to 127.0.0.1 cannot serve the second address.
196
-
197
- Local desktop browser/device emulation works; physical-phone/LAN previews need
198
- a separately configured isolated runtime host and are not supported yet.
199
- All publisher APIs and uploaded runtimes return 404 outside development. This is
200
- not a public upload service. To enable public publishing, replace the local
201
- adapter with authenticated developer/collection approval, object storage/CDN on
202
- a separate registrable domain, transactional version registry, quotas, malware
203
- review and revocation. Keep this bundle, version and SDK contract unchanged.
204
-
205
- ### Player links
206
-
207
- Published games open at `/market/games/<manifest.id>`. Upload returns a draft
208
- URL at that same path with `?preview=<version-key>`; keep the key to reopen that
209
- exact version. Do not generate `?play=<id>` URLs. Existing query-style links
210
- redirect for compatibility.
211
-
212
- ### Cosmetic entitlements (Chonk reference)
213
-
214
- Read `inventory.get()` and offer equip controls only for cards whose `state` is
215
- `collected`. A revealed/sealed card is not an equipped collectible. Subscribe to
216
- `inventory.onChanged` and revalidate every displayed page; revoke a skin when
217
- its ownership disappears. Render names as text. Never derive race odds, payouts,
218
- or ownership from local storage. Chonk After Hours maps the five rarity indices
219
- to five matching model palettes; foil changes no race advantage.
220
-
221
- Ship wardrobe thumbnails inside your bundle. The Chonk packaging command copies
222
- its five product images and rewrites their paths, so it works under the same
223
- no-external-network policy as every uploaded game. The host records development
224
- views and successful SDK boots separately; games cannot assign counter values.
127
+ ## Submit, review and publication
128
+
129
+ 1. Open VibeMarket OS in a web browser and sign in with Steam. Submitting needs
130
+ a Steam account; new versions of an app must come from the account that
131
+ first submitted it.
132
+ 2. Open **VibeStore**, go to **Submit**, choose `app.zip` and submit it for
133
+ review. Refusals are explained there in plain words. Or, from a terminal:
134
+ `os login` (approve the code in your browser), then `os submit dist`; see
135
+ README.md, "Submit from the command line". Never approve a code you did not
136
+ start yourself.
137
+ 3. Vibechain staff review every version: they read the listing, look at the
138
+ file list and run the app in a sandboxed window. There is no automatic
139
+ approval and no promised review time. A rejection comes with a note; fix the
140
+ problem and submit a new version number.
141
+ 4. **Approval is publication.** An approved version's files are copied to public
142
+ IPFS, and removing or revoking the app later does not recall that copy.
143
+ Submit only what you are willing to publish permanently. Staff choose which
144
+ approved version is live.
145
+
146
+ Apps open in the browser version of VibeMarket OS. The Steam client shows a
147
+ notice with a link instead of opening them, and the mobile apps do not run them.
148
+
149
+ ## Market-game API (not for VibeStore apps)
150
+
151
+ The package still exports `connectGameSdk()`, `watchInventory()` and the schema
152
+ version 1 manifest with permissions and a `collectionId`. They exist for
153
+ Vibechain's own collection games and are not available to VibeStore apps:
154
+ VibeStore refuses any manifest with permissions or a collection, and an app
155
+ that calls them gets no economy access.