@bobfrankston/msgapidefs 0.1.38 → 0.1.39
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 +1 -0
- package/msgapi-plan.md +47 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -150,6 +150,7 @@ nothing about capability.
|
|
|
150
150
|
| `tcp.close()` | ✅ | ✅ | ✅ | Close connection |
|
|
151
151
|
| **HTTP Fetch** | | | | **`window.msgapi.http.*`** |
|
|
152
152
|
| `http.fetch()` | ✅ | ✅ | ✅ | Native HTTP — bypasses CORS/mixed-content |
|
|
153
|
+
| **Media capture (mic/camera)** | ❌ | ❌ | ❌ | Not an msgapi API — `getUserMedia` is the engine's. What's missing is the permission grant, which no host makes: wry's WebKitGTK backend has no `permission-request` handling (WebKitGTK denies by default), msger ignores WebView2's `PermissionRequested`, msga lacks `RECORD_AUDIO`. Deferred; direction is an external speech package, not in-page capture — see [msgapi-plan.md](./msgapi-plan.md#not-planned-recorded-so-it-doesnt-get-re-investigated). |
|
|
153
154
|
| **Host Launcher Features** | | | | *Not part of `window.msgapi`; CLI / launcher-side* |
|
|
154
155
|
| Markdown rendering (`.md`/`.markdown` auto-render) | ✅ | ✅ | ❌ | Local `file://` URL → rendered HTML via `msgcommon/markdown` (marked + light/dark CSS). msga could match it in `MainPage.xaml.cs` URL interception — not done yet. |
|
|
155
156
|
| Unpacked Chrome extension loading (`-extension <dir>`) | ✅ | ❌ | ❌ | msgview-only via `session.extensions.loadExtension`. wry has no public extension API; WebKitGTK has none at all. **Not the add-in mechanism here** — app add-ins are `window.msgapi` + injected init scripts (`initScript` / `initScriptPath`), which work in msger and msga without Chromium. Chrome-extension-specific needs go to Chrome. |
|
package/msgapi-plan.md
CHANGED
|
@@ -242,6 +242,53 @@ interface MsgAPI {
|
|
|
242
242
|
|
|
243
243
|
---
|
|
244
244
|
|
|
245
|
+
## Not Planned (recorded so it doesn't get re-investigated)
|
|
246
|
+
|
|
247
|
+
### Microphone / camera capture — deferred, direction is an external package
|
|
248
|
+
|
|
249
|
+
**Status 2026-08-01: not in msgapi, and no host grants the permission.** Recorded
|
|
250
|
+
after the wallclock app showed *"Initialization failed: Microphone constraints not
|
|
251
|
+
supported"* under msger on a Pi 5.
|
|
252
|
+
|
|
253
|
+
**Why it isn't an msgapi API.** The mic is reached with the plain web API
|
|
254
|
+
`navigator.mediaDevices.getUserMedia` — the engine already provides it. msgapi
|
|
255
|
+
exists for what a browser *can't* do. What's actually missing is a **permission
|
|
256
|
+
decision**, and none of the hosts makes one:
|
|
257
|
+
|
|
258
|
+
| host | today |
|
|
259
|
+
|------|-------|
|
|
260
|
+
| msger / WebKitGTK (Linux, Pi) | wry 0.54's WebKitGTK backend has no permission-request handling at all; WebKitGTK denies an unhandled `permission-request` by default |
|
|
261
|
+
| msger / WebView2 (Windows) | msger never handles `PermissionRequested`; whatever WebView2 defaults to applies |
|
|
262
|
+
| msga (Android) | manifest doesn't declare `RECORD_AUDIO` (the only hits are inside `Mono.Android.dll`); no `onPermissionRequest` handler |
|
|
263
|
+
|
|
264
|
+
**Unresolved:** whether the Pi failure is the permission gate or the app's
|
|
265
|
+
constraints — WebKitGTK is pickier than Chromium about `echoCancellation`,
|
|
266
|
+
`sampleRate`, etc. One probe settles it: call `getUserMedia({audio: true})` with
|
|
267
|
+
bare constraints via `initScript` and read the error name — `NotAllowedError`
|
|
268
|
+
means permission, `OverconstrainedError` means constraints.
|
|
269
|
+
|
|
270
|
+
**If it ever becomes a priority**, the work is:
|
|
271
|
+
|
|
272
|
+
1. **msger (Rust)** — connect WebKitGTK's `permission-request` signal and WebView2's
|
|
273
|
+
`PermissionRequested` event, granting media for content the caller trusts.
|
|
274
|
+
Opt-in per the no-regression rule in CLAUDE.md (e.g. `permissions:
|
|
275
|
+
["microphone","camera"]` / `-allow mic`), defaulting to today's behavior so no
|
|
276
|
+
existing caller changes.
|
|
277
|
+
2. **msga** — `RECORD_AUDIO` in the manifest, the Android runtime permission
|
|
278
|
+
request, and a `WebChromeClient.onPermissionRequest` handler.
|
|
279
|
+
3. **msgapidefs** — a matrix row for which host grants what. No new
|
|
280
|
+
`window.msgapi` call is needed.
|
|
281
|
+
|
|
282
|
+
**Direction (Bob, 2026-08-01): don't build this speculatively.** The original
|
|
283
|
+
motivation was speech processing, which never worked well enough in-browser to be
|
|
284
|
+
worth it. The likely future is delegating to an **external speech package** —
|
|
285
|
+
msger/msga hand off to a native or networked processor (reachable today through
|
|
286
|
+
`msgapi.shell` / `msgapi.http` / `msgapi.udp`) rather than capturing audio in the
|
|
287
|
+
page. In-page mic support is only worth building if a concrete use case shows up
|
|
288
|
+
that genuinely needs the audio inside the WebView.
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
245
292
|
## Implementation Priorities
|
|
246
293
|
|
|
247
294
|
### Phase 1: msga msgapi + UDP ✅ Done
|