@bardioc/app-sdk 0.4.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.
- package/LICENSE +5 -0
- package/README.md +368 -0
- package/assets/fonts/README.md +11 -0
- package/assets/fonts/bardioc-fonts.css +55 -0
- package/assets/fonts/v1/geist-mono-latin-wght-normal.woff2 +0 -0
- package/assets/fonts/v1/nunito-sans-latin-wght-italic.woff2 +0 -0
- package/assets/fonts/v1/nunito-sans-latin-wght-normal.woff2 +0 -0
- package/dist/contract-matrix.d.ts +130 -0
- package/dist/contract-matrix.js +132 -0
- package/dist/dev-auth-proxy-core.d.ts +24 -0
- package/dist/dev-auth-proxy-core.js +59 -0
- package/dist/dev-auth-vite.d.ts +34 -0
- package/dist/dev-auth-vite.js +221 -0
- package/dist/dev-proxy.d.ts +8 -0
- package/dist/dev-proxy.js +40 -0
- package/dist/dev-session-cli.d.ts +34 -0
- package/dist/dev-session-cli.js +125 -0
- package/dist/dev.d.ts +33 -0
- package/dist/dev.js +223 -0
- package/dist/dot-env.d.ts +2 -0
- package/dist/dot-env.js +22 -0
- package/dist/errors.d.ts +27 -0
- package/dist/errors.js +57 -0
- package/dist/host-bridge.d.ts +3 -0
- package/dist/host-bridge.js +260 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +6 -0
- package/dist/manifest.d.ts +78 -0
- package/dist/manifest.js +169 -0
- package/dist/protocol.d.ts +26 -0
- package/dist/protocol.js +28 -0
- package/dist/react.d.ts +26 -0
- package/dist/react.js +208 -0
- package/dist/transports/graph-transport.d.ts +224 -0
- package/dist/transports/graph-transport.js +584 -0
- package/dist/transports/os-transport.d.ts +189 -0
- package/dist/transports/os-transport.js +444 -0
- package/dist/types.d.ts +343 -0
- package/dist/vite.d.ts +9 -0
- package/dist/vite.js +262 -0
- package/package.json +101 -0
package/LICENSE
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
# @bardioc/app-sdk
|
|
2
|
+
|
|
3
|
+
SDK and Vite integration for building apps for the Bardioc OS.
|
|
4
|
+
|
|
5
|
+
This package focuses on the runtime SDK and Vite plugin only:
|
|
6
|
+
|
|
7
|
+
1. Bridge communication between an app and the OS, IndexedDB, and host APIs.
|
|
8
|
+
2. Validate app manifests and wire Vite apps for iframe-based development.
|
|
9
|
+
|
|
10
|
+
## Requirements
|
|
11
|
+
|
|
12
|
+
- Node.js `>=20.19.0`
|
|
13
|
+
- TypeScript `>=6.0.0`
|
|
14
|
+
- For React apps, install `react` and `react-dom` in the consuming project
|
|
15
|
+
|
|
16
|
+
## Install into an existing project
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pnpm add @bardioc/app-sdk
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Apps can be developed independently outside the Bardioc OS and then tested through a live AppStore development session. That keeps the local development loop fast while still exercising the real host communication path.
|
|
23
|
+
|
|
24
|
+
## Quick start
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import { AppSdkProvider, useNotify } from '@bardioc/app-sdk/react';
|
|
28
|
+
import { createRoot } from 'react-dom/client';
|
|
29
|
+
|
|
30
|
+
function App() {
|
|
31
|
+
const notify = useNotify();
|
|
32
|
+
|
|
33
|
+
function sayHello() {
|
|
34
|
+
notify('Hello from my app', 'success');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return <button onClick={sayHello}>Say hello</button>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const isInsideIframe = globalThis.window.parent !== globalThis.window;
|
|
41
|
+
|
|
42
|
+
createRoot(document.getElementById('root')!).render(
|
|
43
|
+
isInsideIframe ? (
|
|
44
|
+
<AppSdkProvider appId="my-app">
|
|
45
|
+
<App />
|
|
46
|
+
</AppSdkProvider>
|
|
47
|
+
) : (
|
|
48
|
+
<div>Open this app from the Bardioc OS dock to use SDK features.</div>
|
|
49
|
+
)
|
|
50
|
+
);
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Exports
|
|
54
|
+
|
|
55
|
+
| Path | Contents |
|
|
56
|
+
| --------------------------- | ------------------------------------------- |
|
|
57
|
+
| `@bardioc/app-sdk` | `createHostBridge`, errors, types, manifest |
|
|
58
|
+
| `@bardioc/app-sdk/react` | `AppSdkProvider`, hooks (`useSdk`, etc.) |
|
|
59
|
+
| `@bardioc/app-sdk/dev` | host-backed standalone dev-session helpers |
|
|
60
|
+
| `@bardioc/app-sdk/types` | Type-only TypeScript exports |
|
|
61
|
+
| `@bardioc/app-sdk/protocol` | `SDK_MSG` constants, wire format types |
|
|
62
|
+
| `@bardioc/app-sdk/vite` | `bardiocApp()` Vite plugin |
|
|
63
|
+
|
|
64
|
+
### Key exports
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
// Bridge and types
|
|
68
|
+
import {
|
|
69
|
+
createHostBridge,
|
|
70
|
+
type HostBridge,
|
|
71
|
+
type HostBridgeConfig,
|
|
72
|
+
type GraphNodeRaw,
|
|
73
|
+
type GraphEdgeRaw,
|
|
74
|
+
type UserProfile,
|
|
75
|
+
type OrgStructure,
|
|
76
|
+
} from '@bardioc/app-sdk';
|
|
77
|
+
|
|
78
|
+
// Errors
|
|
79
|
+
import {
|
|
80
|
+
EntityNotFoundError,
|
|
81
|
+
ValidationError,
|
|
82
|
+
PermissionError,
|
|
83
|
+
TimeoutError,
|
|
84
|
+
NetworkError,
|
|
85
|
+
SdkError,
|
|
86
|
+
} from '@bardioc/app-sdk';
|
|
87
|
+
|
|
88
|
+
// React hooks
|
|
89
|
+
import {
|
|
90
|
+
AppSdkProvider,
|
|
91
|
+
useSdk,
|
|
92
|
+
useNotify,
|
|
93
|
+
useSendToKernel,
|
|
94
|
+
useStandaloneDevLogout,
|
|
95
|
+
} from '@bardioc/app-sdk/react';
|
|
96
|
+
|
|
97
|
+
// Standalone dev helpers
|
|
98
|
+
import {
|
|
99
|
+
ensureDevAuthSession,
|
|
100
|
+
installDevBridge,
|
|
101
|
+
isDevStandalone,
|
|
102
|
+
isInsideIframe,
|
|
103
|
+
} from '@bardioc/app-sdk/dev';
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Vite plugin
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
// vite.config.ts
|
|
110
|
+
import { bardiocApp } from '@bardioc/app-sdk/vite';
|
|
111
|
+
import react from '@vitejs/plugin-react';
|
|
112
|
+
import { defineConfig } from 'vite';
|
|
113
|
+
|
|
114
|
+
export default defineConfig({
|
|
115
|
+
plugins: [react(), bardiocApp({ appName: 'my-app', port: 3005 })],
|
|
116
|
+
});
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Handles dev base path, port config, host session proxy routes, optional Cloudflare tunnel, platform fonts, and manifest validation on build.
|
|
120
|
+
|
|
121
|
+
### Platform fonts
|
|
122
|
+
|
|
123
|
+
The Bardioc platform guarantees a stable font endpoint wherever an app runs — like `/api/transport`, it is a public contract that will never be renamed or removed. Load it with one line in `index.html` and do **not** bundle font packages into your app:
|
|
124
|
+
|
|
125
|
+
```html
|
|
126
|
+
<link rel="stylesheet" href="/fonts/bardioc-fonts.css" />
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
It provides `Nunito Sans Variable` (normal + italic) and `Geist Mono Variable` as variable fonts (latin subset), matching the `--font-nunito-sans` / `--font-geist-mono` theme variables that `@bardioc/ui` resolves by default.
|
|
130
|
+
|
|
131
|
+
- **Embedded in the OS** the URL resolves same-origin against the host, which serves it with immutable caching — one download shared by the host and every app.
|
|
132
|
+
- **Standalone dev / tunnel mode** the `bardiocApp()` plugin serves the same files from assets shipped inside this package (dev server only — they are never added to your bundle). This applies to Vite-based apps; the angular and nextjs templates run their own dev servers, where the link is a harmless 404 standalone and resolves normally embedded in the OS.
|
|
133
|
+
|
|
134
|
+
New apps scaffolded with `create-bardioc-app` include the `<link>` already.
|
|
135
|
+
|
|
136
|
+
## Standalone Dev Session
|
|
137
|
+
|
|
138
|
+
Standalone local development is host-backed only.
|
|
139
|
+
|
|
140
|
+
1. Create or open the app in the host App Store so you have its `VITE_APP_ID`.
|
|
141
|
+
2. In the host App Store, open the app details and use `Copy Dev Session`.
|
|
142
|
+
3. Paste the snippet into your local `.env`.
|
|
143
|
+
4. Set `VITE_ENABLE_DEV_AUTH=true` and run `pnpm dev`.
|
|
144
|
+
|
|
145
|
+
That flow stores a host-issued dev session locally and routes transport calls through the host `/api/transport` endpoint. There is no separate local token exchange mode anymore.
|
|
146
|
+
|
|
147
|
+
For public testing against a live URL, run `pnpm dev:live` and use the emitted tunnel URL as the app's live URL in the host App Store configuration.
|
|
148
|
+
|
|
149
|
+
## React hooks
|
|
150
|
+
|
|
151
|
+
- `useSdk()` — raw bridge instance
|
|
152
|
+
- `useNotify()` — fire-and-forget toast
|
|
153
|
+
- `useSendToKernel()` — proxy a whitelisted message to the OS service worker
|
|
154
|
+
- `useStandaloneDevLogout()` — clear standalone dev auth state and reload the page
|
|
155
|
+
|
|
156
|
+
### IndexedDB persistence
|
|
157
|
+
|
|
158
|
+
`useSdk()` exposes `bridge.idb(storeName)` for app-scoped persistence:
|
|
159
|
+
|
|
160
|
+
```ts
|
|
161
|
+
const drafts = bridge.idb('drafts');
|
|
162
|
+
|
|
163
|
+
await drafts.put('welcome', {
|
|
164
|
+
title: 'Q2 rollout',
|
|
165
|
+
summary: 'Publish SDK changes before updating the host workspace.',
|
|
166
|
+
});
|
|
167
|
+
const draft = await drafts.get<{ title: string; summary: string }>('welcome');
|
|
168
|
+
const items = await drafts.query({ prefix: 'wel', limit: 20 });
|
|
169
|
+
await drafts.delete('welcome');
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Each handle is scoped by the host to the app's manifest `id`, so two apps can use the same `storeName` without colliding.
|
|
173
|
+
|
|
174
|
+
### Transport API
|
|
175
|
+
|
|
176
|
+
The bridge provides namespaced transport APIs for graph database and OS operations.
|
|
177
|
+
|
|
178
|
+
**Note:** For multiple graph/OS instances or contexts, the Host OS is responsible for routing requests. The SDK proxies all transport requests to the host via postMessage - one bridge = one iframe = one host connection.
|
|
179
|
+
|
|
180
|
+
#### Graph API
|
|
181
|
+
|
|
182
|
+
Access the graph database via `bridge.transport.graph.*`:
|
|
183
|
+
|
|
184
|
+
```ts
|
|
185
|
+
const sdk = useSdk();
|
|
186
|
+
|
|
187
|
+
// Get single node
|
|
188
|
+
const node = await sdk.transport.graph.get<GraphNodeRaw>('node-id');
|
|
189
|
+
|
|
190
|
+
// Query with Lucene
|
|
191
|
+
const people = await sdk.transport.graph.query<GraphNodeRaw>(
|
|
192
|
+
'ogit/_type:ogit/Person AND ogit/name:John*',
|
|
193
|
+
{ limit: 50, offset: 0, scopeId: 'instance-scope-id' }
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
// Gremlin traversal
|
|
197
|
+
const edges = await sdk.transport.graph.gremlin(rootId, "outE('ogit/relates')");
|
|
198
|
+
|
|
199
|
+
// Create node
|
|
200
|
+
const newNode = await sdk.transport.graph.create('ogit/Person', {
|
|
201
|
+
'ogit/name': 'Jane Doe',
|
|
202
|
+
'ogit/email': 'jane@example.com',
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
// Update node
|
|
206
|
+
await sdk.transport.graph.update('node-id', {
|
|
207
|
+
'ogit/name': 'Updated Name',
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
// Create edge
|
|
211
|
+
await sdk.transport.graph.connect(fromId, toId, 'ogit/relates');
|
|
212
|
+
|
|
213
|
+
// Delete node
|
|
214
|
+
await sdk.transport.graph.delete('node-id');
|
|
215
|
+
|
|
216
|
+
// Time series
|
|
217
|
+
const values = await sdk.transport.graph.timeseries.get('ts-id', {
|
|
218
|
+
from: '2026-01-01',
|
|
219
|
+
to: '2026-01-31',
|
|
220
|
+
});
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Available methods: `get`, `getMany`, `getByXid`, `query`, `gremlin`, `combined`, `create`, `update`, `delete`, `connect`, `history`, `batch.delete`, `timeseries.get`, `timeseries.add`, `timeseries.query`, `content.set`, `content.get`.
|
|
224
|
+
|
|
225
|
+
All graph request option types accept optional `scopeId` when a request must target a specific scope.
|
|
226
|
+
|
|
227
|
+
#### OS API
|
|
228
|
+
|
|
229
|
+
Access OS features via `bridge.transport.os.*`:
|
|
230
|
+
|
|
231
|
+
```ts
|
|
232
|
+
const sdk = useSdk();
|
|
233
|
+
|
|
234
|
+
// User profile
|
|
235
|
+
const profile = await sdk.transport.os.profile.get();
|
|
236
|
+
const avatar = await sdk.transport.os.profile.getAvatar();
|
|
237
|
+
await sdk.transport.os.profile.setAvatar(imageBlob);
|
|
238
|
+
|
|
239
|
+
// Organization
|
|
240
|
+
const org = await sdk.transport.os.organization.getStructure();
|
|
241
|
+
const unit = await sdk.transport.os.organization.createUnit({
|
|
242
|
+
name: 'Engineering',
|
|
243
|
+
parentId: 'parent-unit-id',
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
// Applications
|
|
247
|
+
const apps = await sdk.transport.os.applications.list();
|
|
248
|
+
const app = await sdk.transport.os.applications.get('app-id');
|
|
249
|
+
await sdk.transport.os.applications.upload('app-id', zipBlob);
|
|
250
|
+
await sdk.transport.os.request({
|
|
251
|
+
path: '/custom/endpoint',
|
|
252
|
+
method: 'GET',
|
|
253
|
+
scopeId: 'instance-scope-id',
|
|
254
|
+
});
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Available namespaces:
|
|
258
|
+
|
|
259
|
+
- `os.profile.*` — `get`, `getAvatar`, `setAvatar`, `getInstances`
|
|
260
|
+
- `os.organization.*` — `getStructure`, `createUnit`, `updateUnit`, `createMember`, `updateMember`, `deleteMember`, `inviteMember`
|
|
261
|
+
- `os.applications.*` — `list`, `get`, `upload`, `download`, `getFiles`, `getFile`, `getConfigurations`
|
|
262
|
+
|
|
263
|
+
### Error handling
|
|
264
|
+
|
|
265
|
+
All transport methods throw structured errors:
|
|
266
|
+
|
|
267
|
+
```ts
|
|
268
|
+
import {
|
|
269
|
+
EntityNotFoundError,
|
|
270
|
+
ValidationError,
|
|
271
|
+
PermissionError,
|
|
272
|
+
TimeoutError,
|
|
273
|
+
NetworkError,
|
|
274
|
+
SdkError,
|
|
275
|
+
} from '@bardioc/app-sdk';
|
|
276
|
+
|
|
277
|
+
try {
|
|
278
|
+
const node = await sdk.transport.graph.get('node-id');
|
|
279
|
+
} catch (error) {
|
|
280
|
+
if (error instanceof EntityNotFoundError) {
|
|
281
|
+
console.log('Node not found:', error.context.id);
|
|
282
|
+
} else if (error instanceof ValidationError) {
|
|
283
|
+
console.log('Invalid data:', error.context?.field);
|
|
284
|
+
} else if (error instanceof PermissionError) {
|
|
285
|
+
console.log('Missing permission:', error.context.permission);
|
|
286
|
+
} else if (error instanceof TimeoutError) {
|
|
287
|
+
console.log('Request timed out:', error.context.operation);
|
|
288
|
+
} else if (error instanceof NetworkError) {
|
|
289
|
+
console.log('Network error:', error.statusCode, error.message);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
All errors extend `SdkError` with properties: `code`, `statusCode`, `context`, `message`.
|
|
295
|
+
|
|
296
|
+
## App manifest
|
|
297
|
+
|
|
298
|
+
Every app must include `public/app-manifest.json`:
|
|
299
|
+
|
|
300
|
+
```json
|
|
301
|
+
{
|
|
302
|
+
"manifestVersion": 2,
|
|
303
|
+
"id": "my-app",
|
|
304
|
+
"name": "My App",
|
|
305
|
+
"version": "1.0.0",
|
|
306
|
+
"permissions": ["notify", "transport"]
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
Available permissions:
|
|
311
|
+
|
|
312
|
+
- `notify` — Show toast notifications via `bridge.notify()`
|
|
313
|
+
- `storage` — Key-value storage via `bridge.storage.*`
|
|
314
|
+
- `indexdb` — App-scoped IndexedDB via `bridge.idb()`
|
|
315
|
+
- `kernel-proxy` — Message the OS service worker via `bridge.sendToKernel()`
|
|
316
|
+
- `transport` — Access graph and OS APIs via `bridge.transport.*`
|
|
317
|
+
|
|
318
|
+
The Vite plugin validates this automatically and fails the build when the manifest is missing or invalid.
|
|
319
|
+
|
|
320
|
+
### Window
|
|
321
|
+
|
|
322
|
+
Optionally control how the OS frames the app via a `window` block:
|
|
323
|
+
|
|
324
|
+
```json
|
|
325
|
+
{
|
|
326
|
+
"manifestVersion": 2,
|
|
327
|
+
"id": "my-app",
|
|
328
|
+
"name": "My App",
|
|
329
|
+
"version": "1.0.0",
|
|
330
|
+
"permissions": ["notify"],
|
|
331
|
+
"window": {
|
|
332
|
+
"size": "md",
|
|
333
|
+
"resizable": true
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
`size` picks a tier (default `md`):
|
|
339
|
+
|
|
340
|
+
| Tier | Size (w × h) | Min (w × h) |
|
|
341
|
+
| ---- | ------------ | ----------- |
|
|
342
|
+
| `xs` | 480 × 320 | 360 × 280 |
|
|
343
|
+
| `sm` | 640 × 480 | 480 × 320 |
|
|
344
|
+
| `md` | 800 × 600 | 480 × 320 |
|
|
345
|
+
| `lg` | 1024 × 800 | 640 × 480 |
|
|
346
|
+
| `xl` | 1280 × 800 | 800 × 600 |
|
|
347
|
+
|
|
348
|
+
Instead of a tier, `size` may be a custom dimensions object — `{ width, height }` (px), with optional `minWidth`/`minHeight` (each defaults to a floor when omitted). Custom dimensions are literal, so `orientation` does not swap them:
|
|
349
|
+
|
|
350
|
+
```json
|
|
351
|
+
{
|
|
352
|
+
"window": { "size": { "width": 720, "height": 540, "minWidth": 400, "minHeight": 300 } }
|
|
353
|
+
}
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
Other flags (all optional booleans): `canHaveMultipleWindows`, `isInstanceAware`, `resizable`, `maximizable`, `minimizable`, `customScroll`, `centered`, `isHeaderless`.
|
|
357
|
+
|
|
358
|
+
## Support
|
|
359
|
+
|
|
360
|
+
For support, contact yevhenii.atlanov@almato.com.
|
|
361
|
+
|
|
362
|
+
## License
|
|
363
|
+
|
|
364
|
+
MIT.
|
|
365
|
+
|
|
366
|
+
Copyright (c) 2026 ALMATO AG. All rights reserved.
|
|
367
|
+
|
|
368
|
+
This is an internal library for ALMATO AG.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Platform font contract assets (dev server only)
|
|
2
|
+
|
|
3
|
+
Byte-identical copies of the canonical files served by webos-host at `/fonts/*`
|
|
4
|
+
(source of truth: `bardioc-desktop-frontend/apps/webos-host/public/fonts/`).
|
|
5
|
+
|
|
6
|
+
The `bardiocApp()` Vite plugin serves these at `/fonts/*` in standalone dev mode so
|
|
7
|
+
the same `<link rel="stylesheet" href="/fonts/bardioc-fonts.css" />` works embedded
|
|
8
|
+
in the OS and standalone. They are dev-server assets only — never bundled into apps.
|
|
9
|
+
|
|
10
|
+
When webos-host's fonts change, re-copy the files verbatim. Files under `v1/` are
|
|
11
|
+
immutable: never overwrite a published binary, mirror new version directories instead.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Bardioc platform font contract — stable entry point.
|
|
3
|
+
*
|
|
4
|
+
* Hosted apps load this file with a single static line in index.html:
|
|
5
|
+
* <link rel="stylesheet" href="/fonts/bardioc-fonts.css" />
|
|
6
|
+
* It resolves same-origin both embedded in the OS shell (served by webos-host)
|
|
7
|
+
* and in standalone dev mode (served by the @bardioc/app-sdk Vite plugin).
|
|
8
|
+
*
|
|
9
|
+
* This URL is a public platform API: it must never be renamed or removed,
|
|
10
|
+
* because installed 3rd-party app zips reference it and cannot be rebuilt.
|
|
11
|
+
* The binaries below are versioned (./v1/) so the contents of this file can
|
|
12
|
+
* evolve without breaking already-installed apps.
|
|
13
|
+
*
|
|
14
|
+
* Variable fonts, latin subset only — matching the OS shell (layout.tsx loads
|
|
15
|
+
* subsets: ['latin']). Each file covers the full weight axis; the
|
|
16
|
+
* unicode-range gates keep the door open to add more script subsets
|
|
17
|
+
* additively later. Sources are verbatim from @fontsource-variable packages
|
|
18
|
+
* (see README.md), with URLs rewritten to the local ./v1/ copies.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/* nunito-sans-latin-wght-normal — @fontsource-variable/nunito-sans 5.2.7 */
|
|
22
|
+
@font-face {
|
|
23
|
+
font-family: 'Nunito Sans Variable';
|
|
24
|
+
font-style: normal;
|
|
25
|
+
font-display: swap;
|
|
26
|
+
font-weight: 200 1000;
|
|
27
|
+
src: url(./v1/nunito-sans-latin-wght-normal.woff2) format('woff2-variations');
|
|
28
|
+
unicode-range:
|
|
29
|
+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
|
|
30
|
+
U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* nunito-sans-latin-wght-italic — @fontsource-variable/nunito-sans 5.2.7 */
|
|
34
|
+
@font-face {
|
|
35
|
+
font-family: 'Nunito Sans Variable';
|
|
36
|
+
font-style: italic;
|
|
37
|
+
font-display: swap;
|
|
38
|
+
font-weight: 200 1000;
|
|
39
|
+
src: url(./v1/nunito-sans-latin-wght-italic.woff2) format('woff2-variations');
|
|
40
|
+
unicode-range:
|
|
41
|
+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
|
|
42
|
+
U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* geist-mono-latin-wght-normal — @fontsource-variable/geist-mono 5.2.8 */
|
|
46
|
+
@font-face {
|
|
47
|
+
font-family: 'Geist Mono Variable';
|
|
48
|
+
font-style: normal;
|
|
49
|
+
font-display: swap;
|
|
50
|
+
font-weight: 100 900;
|
|
51
|
+
src: url(./v1/geist-mono-latin-wght-normal.woff2) format('woff2-variations');
|
|
52
|
+
unicode-range:
|
|
53
|
+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
|
|
54
|
+
U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
55
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import type { AppManifestPermission } from './manifest.js';
|
|
2
|
+
export declare const SDK_CONTRACT_MATRIX: {
|
|
3
|
+
readonly SDK_INIT: {
|
|
4
|
+
readonly requestPayload: "{ appId?: string }";
|
|
5
|
+
readonly responsePayload: "SdkInitResponse";
|
|
6
|
+
readonly permission: null;
|
|
7
|
+
readonly expectedHostBehavior: "Handshake the iframe app and return SDK-owned host context.";
|
|
8
|
+
};
|
|
9
|
+
readonly SDK_NOTIFY: {
|
|
10
|
+
readonly requestPayload: "SdkNotifyPayload";
|
|
11
|
+
readonly responsePayload: "{ ok: true }";
|
|
12
|
+
readonly permission: "notify";
|
|
13
|
+
readonly expectedHostBehavior: "Surface a host-level notification and acknowledge delivery.";
|
|
14
|
+
};
|
|
15
|
+
readonly SDK_KERNEL_PROXY: {
|
|
16
|
+
readonly requestPayload: "SdkKernelProxyPayload";
|
|
17
|
+
readonly responsePayload: "KernelProtocol response";
|
|
18
|
+
readonly permission: "kernel-proxy";
|
|
19
|
+
readonly expectedHostBehavior: "Forward only allow-listed kernel messages through the host.";
|
|
20
|
+
};
|
|
21
|
+
readonly SDK_TRANSPORT: {
|
|
22
|
+
readonly requestPayload: "SdkTransportPayload";
|
|
23
|
+
readonly responsePayload: "Upstream transport response payload";
|
|
24
|
+
readonly permission: "transport";
|
|
25
|
+
readonly expectedHostBehavior: "Relay app-scoped transport requests with scope-aware host mediation.";
|
|
26
|
+
};
|
|
27
|
+
readonly SDK_SET_COMMANDS: {
|
|
28
|
+
readonly requestPayload: "SdkSetCommandsPayload";
|
|
29
|
+
readonly responsePayload: "{ ok: true }";
|
|
30
|
+
readonly permission: null;
|
|
31
|
+
readonly expectedHostBehavior: "Store the app command registry for host command invocation.";
|
|
32
|
+
};
|
|
33
|
+
readonly SDK_SET_MENU: {
|
|
34
|
+
readonly requestPayload: "SdkSetMenuPayload";
|
|
35
|
+
readonly responsePayload: "{ ok: true }";
|
|
36
|
+
readonly permission: null;
|
|
37
|
+
readonly expectedHostBehavior: "Store the app menu tree without degrading supported SDK menu kinds.";
|
|
38
|
+
};
|
|
39
|
+
readonly SDK_SET_ACTIVE_TAB: {
|
|
40
|
+
readonly requestPayload: "SdkSetActiveTabPayload";
|
|
41
|
+
readonly responsePayload: "{ ok: true }";
|
|
42
|
+
readonly permission: null;
|
|
43
|
+
readonly expectedHostBehavior: "Persist the app-reported active tab label in host window state.";
|
|
44
|
+
};
|
|
45
|
+
readonly SDK_SHORTCUT_EVENT: {
|
|
46
|
+
readonly requestPayload: "SdkShortcutEventPayload";
|
|
47
|
+
readonly responsePayload: null;
|
|
48
|
+
readonly permission: null;
|
|
49
|
+
readonly expectedHostBehavior: "Route a focused iframe shortcut event through host shortcut handling.";
|
|
50
|
+
};
|
|
51
|
+
readonly SDK_STORAGE_GET: {
|
|
52
|
+
readonly requestPayload: "SdkStorageGetPayload";
|
|
53
|
+
readonly responsePayload: "unknown";
|
|
54
|
+
readonly permission: "storage";
|
|
55
|
+
readonly expectedHostBehavior: "Host-owned storage bridge; currently deferred in bdf.";
|
|
56
|
+
};
|
|
57
|
+
readonly SDK_STORAGE_SET: {
|
|
58
|
+
readonly requestPayload: "SdkStorageSetPayload";
|
|
59
|
+
readonly responsePayload: "void";
|
|
60
|
+
readonly permission: "storage";
|
|
61
|
+
readonly expectedHostBehavior: "Host-owned storage bridge; currently deferred in bdf.";
|
|
62
|
+
};
|
|
63
|
+
readonly SDK_STORAGE_DELETE: {
|
|
64
|
+
readonly requestPayload: "SdkStorageDeletePayload";
|
|
65
|
+
readonly responsePayload: "void";
|
|
66
|
+
readonly permission: "storage";
|
|
67
|
+
readonly expectedHostBehavior: "Host-owned storage bridge; currently deferred in bdf.";
|
|
68
|
+
};
|
|
69
|
+
readonly SDK_STORAGE_KEYS: {
|
|
70
|
+
readonly requestPayload: "{}";
|
|
71
|
+
readonly responsePayload: "string[]";
|
|
72
|
+
readonly permission: "storage";
|
|
73
|
+
readonly expectedHostBehavior: "Host-owned storage bridge; currently deferred in bdf.";
|
|
74
|
+
};
|
|
75
|
+
readonly SDK_IDB_GET: {
|
|
76
|
+
readonly requestPayload: "SdkIdbGetPayload";
|
|
77
|
+
readonly responsePayload: "SdkIdbEntry | null";
|
|
78
|
+
readonly permission: "indexdb";
|
|
79
|
+
readonly expectedHostBehavior: "Perform app-scoped IndexedDB reads in host-owned storage.";
|
|
80
|
+
};
|
|
81
|
+
readonly SDK_IDB_PUT: {
|
|
82
|
+
readonly requestPayload: "SdkIdbPutPayload";
|
|
83
|
+
readonly responsePayload: "void";
|
|
84
|
+
readonly permission: "indexdb";
|
|
85
|
+
readonly expectedHostBehavior: "Perform app-scoped IndexedDB writes in host-owned storage.";
|
|
86
|
+
};
|
|
87
|
+
readonly SDK_IDB_DELETE: {
|
|
88
|
+
readonly requestPayload: "SdkIdbDeletePayload";
|
|
89
|
+
readonly responsePayload: "void";
|
|
90
|
+
readonly permission: "indexdb";
|
|
91
|
+
readonly expectedHostBehavior: "Perform app-scoped IndexedDB deletes in host-owned storage.";
|
|
92
|
+
};
|
|
93
|
+
readonly SDK_IDB_QUERY: {
|
|
94
|
+
readonly requestPayload: "SdkIdbQueryPayload";
|
|
95
|
+
readonly responsePayload: "SdkIdbEntry[]";
|
|
96
|
+
readonly permission: "indexdb";
|
|
97
|
+
readonly expectedHostBehavior: "Perform app-scoped IndexedDB queries in host-owned storage.";
|
|
98
|
+
};
|
|
99
|
+
readonly SDK_LAUNCH_APP: {
|
|
100
|
+
readonly requestPayload: "{ appId: string }";
|
|
101
|
+
readonly responsePayload: "{ windowId: string | null }";
|
|
102
|
+
readonly permission: null;
|
|
103
|
+
readonly expectedHostBehavior: "Launch another registered app through the host shell.";
|
|
104
|
+
};
|
|
105
|
+
readonly SDK_COMMAND_INVOKE: {
|
|
106
|
+
readonly requestPayload: "SdkCommandInvokePayload";
|
|
107
|
+
readonly responsePayload: "{ ok: true }";
|
|
108
|
+
readonly permission: null;
|
|
109
|
+
readonly expectedHostBehavior: "Host-to-app command callback delivery.";
|
|
110
|
+
};
|
|
111
|
+
readonly SDK_OS_CONFIG_UPDATE: {
|
|
112
|
+
readonly requestPayload: "OsConfig";
|
|
113
|
+
readonly responsePayload: null;
|
|
114
|
+
readonly permission: null;
|
|
115
|
+
readonly expectedHostBehavior: "Host-to-app runtime OS configuration update delivery.";
|
|
116
|
+
};
|
|
117
|
+
readonly SDK_RESPONSE: {
|
|
118
|
+
readonly requestPayload: "SdkResponse";
|
|
119
|
+
readonly responsePayload: null;
|
|
120
|
+
readonly permission: null;
|
|
121
|
+
readonly expectedHostBehavior: "Request/response envelope used by the bridge runtime.";
|
|
122
|
+
};
|
|
123
|
+
readonly SDK_INIT_ACK: {
|
|
124
|
+
readonly requestPayload: "SdkInitResponse";
|
|
125
|
+
readonly responsePayload: null;
|
|
126
|
+
readonly permission: null;
|
|
127
|
+
readonly expectedHostBehavior: "Handshake acknowledgement used by the bridge runtime.";
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
export declare function getRequiredPermissionForSdkMessage(messageType: string): AppManifestPermission | null;
|