@anna-ai/app-runtime 0.15.0 → 0.16.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.
- package/dist/index.js +35 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Anna App Runtime SDK — v0.
|
|
2
|
+
* Anna App Runtime SDK — v0.16.1
|
|
3
|
+
*
|
|
4
|
+
* v0.16.1 — invokeAsyncAwait's wait_timeout message no longer embeds a
|
|
5
|
+
* call-shaped literal (`anna.tools.getJob({jobId})`): naïve source
|
|
6
|
+
* scanners (grep-class) treated the diagnostic string as a real host
|
|
7
|
+
* API call (forum #296). Wording only — no behavior change.
|
|
8
|
+
*
|
|
9
|
+
* v0.16.0 — Adds the `anna.mobile.*` native-bridge namespace (design
|
|
10
|
+
* anna-app-mobile-runtime-phase3.md P1): `anna.mobile.share({title?,
|
|
11
|
+
* text?, url?, filename?, data_url?})` → `{shared}` (user cancel is
|
|
12
|
+
* `{shared: false}`, not an error), `anna.mobile.haptics({type, style?})`
|
|
13
|
+
* → `{ok}` and `anna.mobile.camera_capture({camera?, quality?,
|
|
14
|
+
* max_bytes?})` → `{data_url, mime, width, height, byte_size}`.
|
|
15
|
+
* Requires manifest `ui.host_api.mobile`. Only executable inside the
|
|
16
|
+
* anna-mobile shell — the shell intercepts granted envelopes client-side;
|
|
17
|
+
* desktop containers reject with `.code = "unsupported_container"`
|
|
18
|
+
* (distinct from `permission_denied` = grant missing) so apps can render
|
|
19
|
+
* a clean degradation notice. Structured non-error rejections from the
|
|
20
|
+
* native layer: `permission_denied_by_user` / `cancelled` / `too_large`.
|
|
21
|
+
* Coordinated versions: dispatcher_version 0.22.0 + schema 0.22.0 +
|
|
22
|
+
* anna-app-core 0.20.0. Additive: old hosts reject with `unknown_method`.
|
|
3
23
|
*
|
|
4
24
|
* v0.15.0 — Adds the async tool-job family (design
|
|
5
25
|
* anna-app-tools-invoke-async-jobs.md §3): `anna.tools.invokeAsync`
|
|
@@ -411,8 +431,8 @@
|
|
|
411
431
|
wallTimer = setTimeout(() => {
|
|
412
432
|
const err = new Error(
|
|
413
433
|
`invokeAsyncAwait wall clock elapsed after ${wallMs}ms; ` +
|
|
414
|
-
`job ${jobId} may still be running — recover
|
|
415
|
-
`
|
|
434
|
+
`job ${jobId} may still be running — recover it with the ` +
|
|
435
|
+
`tools.getJob host method using this jobId`
|
|
416
436
|
);
|
|
417
437
|
err.code = "wait_timeout";
|
|
418
438
|
settleErr(err);
|
|
@@ -805,6 +825,18 @@
|
|
|
805
825
|
// user-enabled per-app credentials_grant.
|
|
806
826
|
this.credentials = buildNamespace(this, "credentials");
|
|
807
827
|
|
|
828
|
+
// ---- mobile namespace (v0.16.0; anna-mobile native bridge) ----
|
|
829
|
+
// anna.mobile.share({title?, text?, url?, filename?, data_url?})
|
|
830
|
+
// → {shared} (user cancel = {shared:false}, not an error)
|
|
831
|
+
// anna.mobile.haptics({type: "impact"|"notification"|"selection",
|
|
832
|
+
// style?}) → {ok}
|
|
833
|
+
// anna.mobile.camera_capture({camera?, quality?, max_bytes?})
|
|
834
|
+
// → {data_url, mime, width, height, byte_size}
|
|
835
|
+
// Requires manifest ui.host_api.mobile. Desktop containers reject
|
|
836
|
+
// with code="unsupported_container" (vs "permission_denied" = grant
|
|
837
|
+
// missing) — branch on it for a clean degradation notice.
|
|
838
|
+
this.mobile = buildNamespace(this, "mobile");
|
|
839
|
+
|
|
808
840
|
// ---- web namespace (v0.13.0; host-managed search/fetch) ----
|
|
809
841
|
// anna.web.search({query, max_results?, search_depth?, topic?,
|
|
810
842
|
// time_range?, region?, include_domains?, exclude_domains?})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anna-ai/app-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Anna App browser runtime SDK. Loaded by every Anna App iframe; provides typed proxy over the postMessage RPC bridge to the host (Anna dashboard / `anna-app dev` harness).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|