@jskit-ai/agent-docs 0.1.48 → 0.1.49

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.
@@ -554,6 +554,24 @@ The default error policy is intent-based. Runtime code reports what kind of erro
554
554
  - `app-recoverable` uses `banner`; shell refresh and recoverable navigation failures stay visible without blocking the app.
555
555
  - `blocking` uses `dialog`; unexpected UI failures and other blocking errors require explicit attention.
556
556
 
557
+ When app code catches a dynamic import failure itself, report it through the shell async module recovery runtime so it uses the same reload banner as router chunk failures:
558
+
559
+ ```js
560
+ import { useShellAsyncModuleRecoveryRuntime } from "@jskit-ai/shell-web/client";
561
+
562
+ const asyncModuleRecovery = useShellAsyncModuleRecoveryRuntime();
563
+
564
+ try {
565
+ await import("@xterm/xterm");
566
+ } catch (error) {
567
+ asyncModuleRecovery?.notify(error, {
568
+ label: "Terminal"
569
+ });
570
+ }
571
+ ```
572
+
573
+ `useShellAsyncModuleRecoveryRuntime()` returns `null` when the shell runtime is not available in the current Vue context. That lets app-owned components use optional chaining instead of duplicating shell-web's internal injection token.
574
+
557
575
  ### The home page talks to the backend
558
576
 
559
577
  `src/pages/home/index.vue` uses Vue Query to fetch `/api/health` and display the result in the UI.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/agent-docs",
3
- "version": "0.1.48",
3
+ "version": "0.1.49",
4
4
  "description": "Distributed JSKIT agent references, prompts, guides, and generated reference maps.",
5
5
  "type": "module",
6
6
  "files": [
@@ -14,6 +14,17 @@ Use this on demand; do not load the full index at startup.
14
14
 
15
15
  ### src
16
16
 
17
+ ### `src/client/asyncModuleRecovery/index.js`
18
+ Exports
19
+ - `SHELL_ASYNC_MODULE_RECOVERY_RUNTIME_KEY`
20
+ - `useShellAsyncModuleRecoveryRuntime`
21
+
22
+ ### `src/client/asyncModuleRecovery/inject.js`
23
+ Exports
24
+ - `SHELL_ASYNC_MODULE_RECOVERY_RUNTIME_KEY`
25
+ - `isShellAsyncModuleRecoveryRuntime(value)`
26
+ - `useShellAsyncModuleRecoveryRuntime()`
27
+
17
28
  ### `src/client/bootstrap/bootstrapErrorStatus.js`
18
29
  Exports
19
30
  - `resolveBootstrapErrorStatusCode(error)`
@@ -194,6 +205,8 @@ Exports
194
205
  - `useShellLayoutState`
195
206
  - `useShellLayoutStore`
196
207
  - `useShellErrorPresentationStore`
208
+ - `SHELL_ASYNC_MODULE_RECOVERY_RUNTIME_KEY`
209
+ - `useShellAsyncModuleRecoveryRuntime`
197
210
  - `BOOTSTRAP_PAYLOAD_HANDLER_TAG`
198
211
  - `registerBootstrapPayloadHandler`
199
212
  - `resolveBootstrapPayloadHandlers`