miakapi 4.0.0-alpha.1 → 4.0.0-alpha.2

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/README.md CHANGED
@@ -11,11 +11,10 @@ client. It is currently an alpha while the Miakapp 4 stack is being completed.
11
11
 
12
12
  **Building a home with a coding agent?** Read
13
13
  [docs/agent-guide.md](docs/agent-guide.md) first. It covers the judgment the
14
- reference below does not: what the coordinator must authorize, why component
14
+ reference below does not: what the coordinator must authorize, why app
15
15
  requirements and coordinator grants intersect silently, and which failures must
16
16
  never be retried. Start a home interface with the published CLI:
17
- `npx @miakapp/cli init --starter app`. [`templates/home`](templates/home) is an
18
- optional developer example that builds against this repository's sources.
17
+ `npx @miakapp/cli init --starter app`.
19
18
 
20
19
  ## Coordinator requirements
21
20
 
@@ -0,0 +1,24 @@
1
+ export type LocalFunction = (args: unknown) => unknown;
2
+ export interface LocalServerOptions {
3
+ readonly home: {
4
+ readonly id: string;
5
+ readonly name: string;
6
+ };
7
+ /** The built app bundle (`dist/app.js`): a path or its contents. */
8
+ readonly artifact: string | Uint8Array;
9
+ readonly release?: string;
10
+ readonly state?: Readonly<Record<string, unknown>>;
11
+ readonly functions?: Readonly<Record<string, LocalFunction>>;
12
+ readonly port?: number;
13
+ readonly host?: string;
14
+ readonly token?: string;
15
+ }
16
+ export interface LocalServer {
17
+ /** Addresses a device on the network can open. */
18
+ readonly urls: readonly string[];
19
+ /** Merges values into the state and pushes them to open pages; `undefined` removes a path. */
20
+ set(values: Readonly<Record<string, unknown>>): void;
21
+ close(): Promise<void>;
22
+ }
23
+ export declare function serveLocal(options: LocalServerOptions): Promise<LocalServer>;
24
+ //# sourceMappingURL=local.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../src/local.ts"],"names":[],"mappings":"AAiBA,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC;AAEvD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9D,oEAAoE;IACpE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC;IACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACnD,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;IAC7D,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,kDAAkD;IAClD,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,8FAA8F;IAC9F,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IACrD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AA+ED,wBAAsB,UAAU,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,CA2FlF"}
package/dist/local.js ADDED
@@ -0,0 +1,185 @@
1
+ /**
2
+ * Serves a home's app on the local network, without the relay or the internet.
3
+ *
4
+ * The coordinator process opens a small HTTP server. A device on the same
5
+ * network opens `http://<coordinator address>:<port>/`: the page installs the
6
+ * same `window.miakapp` the trusted shell installs, wired straight to this
7
+ * process (state over Server-Sent Events, calls over POST), then runs the
8
+ * published `app.js`. Nothing here needs Firebase or the control plane, so it
9
+ * keeps working when the home's internet link is down.
10
+ *
11
+ * Access: anyone on the network, or only holders of `token` when one is set
12
+ * (open the page once as `/?key=<token>`).
13
+ */
14
+ import { readFileSync } from 'node:fs';
15
+ import { createServer } from 'node:http';
16
+ import { networkInterfaces } from 'node:os';
17
+ const SHIM = `(() => {
18
+ const config = JSON.parse(document.getElementById('miakapp-local').textContent);
19
+ const key = new URLSearchParams(location.search).get('key') || '';
20
+ const query = key ? '?key=' + encodeURIComponent(key) : '';
21
+ let values = config.state;
22
+ let revision = 0;
23
+ let stale = false;
24
+ const listeners = new Set();
25
+ const snapshot = () => ({ values, revision, stale });
26
+ const emit = () => { for (const listener of listeners) listener(snapshot()); };
27
+ const events = new EventSource('/events' + query);
28
+ events.onmessage = (message) => { values = JSON.parse(message.data); revision += 1; stale = false; emit(); };
29
+ events.onerror = () => { stale = true; emit(); };
30
+ window.miakapp = {
31
+ abi: 'miakapp.app/1',
32
+ release: config.release,
33
+ home: config.home,
34
+ locale: navigator.language || 'en',
35
+ theme: 'system',
36
+ onThemeChange: () => () => {},
37
+ state: {
38
+ get: (path) => values[path],
39
+ values: () => values,
40
+ get revision() { return revision; },
41
+ get stale() { return stale; },
42
+ subscribe: (listener) => { listeners.add(listener); return () => listeners.delete(listener); },
43
+ },
44
+ can: { read: () => true, call: (name) => config.functions.includes(name) },
45
+ async call(name, args, options) {
46
+ const controller = new AbortController();
47
+ const timer = setTimeout(() => controller.abort(), (options && options.timeoutMs) || 15000);
48
+ try {
49
+ const response = await fetch('/call' + query, {
50
+ method: 'POST',
51
+ headers: { 'content-type': 'application/json' },
52
+ body: JSON.stringify({ name, args: args === undefined ? null : args }),
53
+ signal: controller.signal,
54
+ });
55
+ const body = await response.json();
56
+ if (!response.ok) throw Object.assign(new Error(body.code), { code: body.code });
57
+ return body.result;
58
+ } catch (error) {
59
+ if (error && error.code) throw error;
60
+ throw Object.assign(new Error('timeout'), { code: controller.signal.aborted ? 'timeout' : 'unavailable' });
61
+ } finally {
62
+ clearTimeout(timer);
63
+ }
64
+ },
65
+ ready() {},
66
+ };
67
+ })();`;
68
+ function escapeJson(value) {
69
+ return JSON.stringify(value).replace(/</g, '\\u003c');
70
+ }
71
+ function lanUrls(port) {
72
+ const urls = [`http://localhost:${port}/`];
73
+ for (const addresses of Object.values(networkInterfaces())) {
74
+ for (const address of addresses ?? []) {
75
+ if (address.family === 'IPv4' && !address.internal)
76
+ urls.push(`http://${address.address}:${port}/`);
77
+ }
78
+ }
79
+ return urls;
80
+ }
81
+ async function readJson(request) {
82
+ const chunks = [];
83
+ let size = 0;
84
+ for await (const chunk of request) {
85
+ size += chunk.byteLength;
86
+ if (size > 1_048_576)
87
+ throw new Error('Body too large');
88
+ chunks.push(chunk);
89
+ }
90
+ return JSON.parse(Buffer.concat(chunks).toString('utf8'));
91
+ }
92
+ export async function serveLocal(options) {
93
+ const artifact = typeof options.artifact === 'string'
94
+ ? readFileSync(options.artifact)
95
+ : Buffer.from(options.artifact);
96
+ const functions = options.functions ?? {};
97
+ let state = { ...(options.state ?? {}) };
98
+ const streams = new Set();
99
+ const port = options.port ?? 8787;
100
+ const send = (response, status, type, body) => {
101
+ response.writeHead(status, { 'content-type': type, 'cache-control': 'no-store' });
102
+ response.end(body);
103
+ };
104
+ const server = createServer((request, response) => {
105
+ const url = new URL(request.url ?? '/', 'http://local');
106
+ if (options.token !== undefined && url.searchParams.get('key') !== options.token) {
107
+ send(response, 401, 'text/plain; charset=utf-8', 'Open this page with ?key=<token>.');
108
+ return;
109
+ }
110
+ if (request.method === 'GET' && url.pathname === '/') {
111
+ const config = {
112
+ home: options.home,
113
+ release: options.release ?? 'local',
114
+ state,
115
+ functions: Object.keys(functions),
116
+ };
117
+ send(response, 200, 'text/html; charset=utf-8', `<!doctype html>
118
+ <html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
119
+ <title>${options.home.name.replace(/[<&]/g, '')}</title></head>
120
+ <body><script type="application/json" id="miakapp-local">${escapeJson(config)}</script>
121
+ <script>${SHIM}</script><script src="/app.js${url.search}"></script></body></html>`);
122
+ return;
123
+ }
124
+ if (request.method === 'GET' && url.pathname === '/app.js') {
125
+ send(response, 200, 'application/javascript; charset=utf-8', artifact);
126
+ return;
127
+ }
128
+ if (request.method === 'GET' && url.pathname === '/events') {
129
+ response.writeHead(200, {
130
+ 'content-type': 'text/event-stream',
131
+ 'cache-control': 'no-store',
132
+ connection: 'keep-alive',
133
+ });
134
+ response.write(`data: ${JSON.stringify(state)}\n\n`);
135
+ streams.add(response);
136
+ request.on('close', () => streams.delete(response));
137
+ return;
138
+ }
139
+ if (request.method === 'POST' && url.pathname === '/call') {
140
+ void (async () => {
141
+ try {
142
+ const { name, args } = await readJson(request);
143
+ const handler = typeof name === 'string' ? functions[name] : undefined;
144
+ if (handler === undefined) {
145
+ send(response, 403, 'application/json', JSON.stringify({ code: 'denied' }));
146
+ return;
147
+ }
148
+ const result = await handler(args);
149
+ send(response, 200, 'application/json', JSON.stringify({ result: result ?? null }));
150
+ }
151
+ catch {
152
+ send(response, 500, 'application/json', JSON.stringify({ code: 'failed' }));
153
+ }
154
+ })();
155
+ return;
156
+ }
157
+ send(response, 404, 'text/plain; charset=utf-8', 'Not found');
158
+ });
159
+ await new Promise((resolve, reject) => {
160
+ server.once('error', reject);
161
+ server.listen(port, options.host ?? '0.0.0.0', () => resolve());
162
+ });
163
+ return {
164
+ urls: lanUrls(port),
165
+ set(values) {
166
+ const next = { ...state };
167
+ for (const [path, value] of Object.entries(values)) {
168
+ if (value === undefined)
169
+ delete next[path];
170
+ else
171
+ next[path] = value;
172
+ }
173
+ state = next;
174
+ const frame = `data: ${JSON.stringify(state)}\n\n`;
175
+ for (const stream of streams)
176
+ stream.write(frame);
177
+ },
178
+ close() {
179
+ for (const stream of streams)
180
+ stream.end();
181
+ return new Promise((resolve) => server.close(() => resolve()));
182
+ },
183
+ };
184
+ }
185
+ //# sourceMappingURL=local.js.map
@@ -0,0 +1 @@
1
+ {"version":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O,EAAE,MAAM,EAAE,EAAE;QAC1C,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC7B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,SAAS,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC;QACnB,GAAG,CAAC,MAAM;YACR,MAAM,IAAI,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;YAC1B,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;gBACnD,IAAI,KAAK,KAAK,SAAS;oBAAE,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;;oBACtC,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;YAC1B,CAAC;YACD,KAAK,GAAG,IAAI,CAAC;YACb,MAAM,KAAK,GAAG,SAAS,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC;YACnD,KAAK,MAAM,MAAM,IAAI,OAAO;gBAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACpD,CAAC;QACD,KAAK;YACH,KAAK,MAAM,MAAM,IAAI,OAAO;gBAAE,MAAM,CAAC,GAAG,EAAE,CAAC;YAC3C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACjE,CAAC;KACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "miakapi",
3
- "version": "4.0.0-alpha.1",
3
+ "version": "4.0.0-alpha.2",
4
4
  "description": "Typed coordinator and trusted-browser SDK for Miakapp",
5
5
  "type": "module",
6
6
  "packageManager": "bun@1.2.23",
@@ -19,6 +19,10 @@
19
19
  "./browser": {
20
20
  "types": "./dist/browser.d.ts",
21
21
  "import": "./dist/browser.js"
22
+ },
23
+ "./local": {
24
+ "types": "./dist/local.d.ts",
25
+ "import": "./dist/local.js"
22
26
  }
23
27
  },
24
28
  "files": [
@@ -33,9 +37,7 @@
33
37
  "build:contract": "tsc -p tsconfig.contract.json",
34
38
  "check": "bun run typecheck && bun run build && bun run test && bun run smoke:node && bun run smoke:browser && bun run test:contract && bun run pack:check",
35
39
  "check:cli": "bun --filter @miakapp/cli check",
36
- "check:component": "bun --filter @miakapp/component check",
37
- "check:packages": "bun run check:cli && bun run check:component && bun run check:app && bun run check:template",
38
- "check:template": "bun run build && bun --filter @miakapp/component build && bun --filter @miakapp/app build && bun --filter @miakapp/cli build && cd templates/home && rm -rf node_modules && bun install --frozen-lockfile && bun run check",
40
+ "check:packages": "bun run check:cli && bun run check:app",
39
41
  "pack:check": "npm pack --dry-run",
40
42
  "prepublishOnly": "bun run check",
41
43
  "smoke:browser": "node scripts/check-browser-bundle.mjs",