@iblai/web-containers 1.77.0 → 1.78.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.
Files changed (67) hide show
  1. package/dist/cjs/_virtual/index2.js +2 -2
  2. package/dist/cjs/_virtual/index3.js +2 -2
  3. package/dist/cjs/components/chat/chat-utils.js +93 -0
  4. package/dist/cjs/components/chat/chat-utils.js.map +1 -1
  5. package/dist/cjs/components/chat/code-activity.js +8 -6
  6. package/dist/cjs/components/chat/code-activity.js.map +1 -1
  7. package/dist/cjs/components/chat/code-error-text.js +12 -5
  8. package/dist/cjs/components/chat/code-error-text.js.map +1 -1
  9. package/dist/cjs/components/chat/working-indicator.js +33 -2
  10. package/dist/cjs/components/chat/working-indicator.js.map +1 -1
  11. package/dist/cjs/components/chat-input-form/cowork-control.js +305 -41
  12. package/dist/cjs/components/chat-input-form/cowork-control.js.map +1 -1
  13. package/dist/cjs/components/chat-input-form/inside-buttons.js +1 -1
  14. package/dist/cjs/components/chat-input-form/inside-buttons.js.map +1 -1
  15. package/dist/cjs/hooks/use-cua-driver.js +104 -4
  16. package/dist/cjs/hooks/use-cua-driver.js.map +1 -1
  17. package/dist/cjs/hooks/use-model-download.js +9 -9
  18. package/dist/cjs/hooks/use-model-download.js.map +1 -1
  19. package/dist/cjs/i18n/messages/en.json.js +35 -8
  20. package/dist/cjs/i18n/messages/en.json.js.map +1 -1
  21. package/dist/cjs/i18n/messages/es.json.js +34 -7
  22. package/dist/cjs/i18n/messages/es.json.js.map +1 -1
  23. package/dist/cjs/i18n/messages/fr.json.js +34 -7
  24. package/dist/cjs/i18n/messages/fr.json.js.map +1 -1
  25. package/dist/cjs/i18n/messages/zh.json.js +35 -8
  26. package/dist/cjs/i18n/messages/zh.json.js.map +1 -1
  27. package/dist/cjs/node_modules/.pnpm/css-mediaquery@0.1.2/node_modules/css-mediaquery/index.js +1 -1
  28. package/dist/cjs/node_modules/.pnpm/matchmediaquery@0.4.2/node_modules/matchmediaquery/index.js +1 -1
  29. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
  30. package/dist/cjs/types/tauri.js +8 -0
  31. package/dist/cjs/types/tauri.js.map +1 -1
  32. package/dist/cjs/web-containers/tsconfig.build.tsbuildinfo +1 -1
  33. package/dist/esm/_virtual/index2.js +2 -2
  34. package/dist/esm/_virtual/index3.js +2 -2
  35. package/dist/esm/components/chat/chat-utils.js +87 -1
  36. package/dist/esm/components/chat/chat-utils.js.map +1 -1
  37. package/dist/esm/components/chat/code-activity.js +8 -6
  38. package/dist/esm/components/chat/code-activity.js.map +1 -1
  39. package/dist/esm/components/chat/code-error-text.js +12 -5
  40. package/dist/esm/components/chat/code-error-text.js.map +1 -1
  41. package/dist/esm/components/chat/working-indicator.js +33 -2
  42. package/dist/esm/components/chat/working-indicator.js.map +1 -1
  43. package/dist/esm/components/chat-input-form/cowork-control.js +308 -44
  44. package/dist/esm/components/chat-input-form/cowork-control.js.map +1 -1
  45. package/dist/esm/components/chat-input-form/inside-buttons.js +2 -2
  46. package/dist/esm/components/chat-input-form/inside-buttons.js.map +1 -1
  47. package/dist/esm/hooks/use-cua-driver.js +104 -4
  48. package/dist/esm/hooks/use-cua-driver.js.map +1 -1
  49. package/dist/esm/hooks/use-model-download.js +9 -9
  50. package/dist/esm/hooks/use-model-download.js.map +1 -1
  51. package/dist/esm/i18n/messages/en.json.js +35 -8
  52. package/dist/esm/i18n/messages/en.json.js.map +1 -1
  53. package/dist/esm/i18n/messages/es.json.js +34 -7
  54. package/dist/esm/i18n/messages/es.json.js.map +1 -1
  55. package/dist/esm/i18n/messages/fr.json.js +34 -7
  56. package/dist/esm/i18n/messages/fr.json.js.map +1 -1
  57. package/dist/esm/i18n/messages/zh.json.js +35 -8
  58. package/dist/esm/i18n/messages/zh.json.js.map +1 -1
  59. package/dist/esm/node_modules/.pnpm/css-mediaquery@0.1.2/node_modules/css-mediaquery/index.js +1 -1
  60. package/dist/esm/node_modules/.pnpm/matchmediaquery@0.4.2/node_modules/matchmediaquery/index.js +1 -1
  61. package/dist/esm/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
  62. package/dist/esm/types/tauri.js +8 -0
  63. package/dist/esm/types/tauri.js.map +1 -1
  64. package/dist/esm/web-containers/tsconfig.build.tsbuildinfo +1 -1
  65. package/dist/index.d.ts +28 -3
  66. package/dist/package.json +1 -1
  67. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -469,7 +469,23 @@ declare const CUA_DRIVER_TAURI_COMMANDS: {
469
469
  readonly SUPPORT: "cua_driver_support";
470
470
  /** Stop the driver's MCP process. */
471
471
  readonly STOP: "cua_driver_stop";
472
+ /** Open the macOS Privacy & Security pane a Cowork grant lives in. */
473
+ readonly OPEN_PRIVACY_SETTINGS: "open_privacy_settings";
474
+ /** Relaunch the app, so a new Screen Recording grant takes effect. */
475
+ readonly RELAUNCH_APP: "relaunch_app";
476
+ /** Ask macOS for one Cowork grant; on a repeat ask also open its pane. */
477
+ readonly REQUEST_PERMISSION: "request_cowork_permission";
478
+ /** Bring the app window back in front of System Settings. */
479
+ readonly BRING_TO_FRONT: "bring_app_to_front";
472
480
  };
481
+ /** The two macOS grants Cowork needs, named as the host commands take them. */
482
+ type CoworkPermissionKind = 'accessibility' | 'screen_recording';
483
+ /**
484
+ * What asking for one grant came to. `unsupported`: a desktop app released
485
+ * before these commands could not open System Settings either, so the user has
486
+ * to be told where to go.
487
+ */
488
+ type CoworkPermissionOutcome = 'granted' | 'not_granted' | 'unsupported';
473
489
  /**
474
490
  * Why Cowork can't run here. The UI must map these to translated strings —
475
491
  * never render the raw code. Mirrors `cua_driver_mcp::reason` in the host.
@@ -481,6 +497,8 @@ declare const CUA_DRIVER_UNSUPPORTED_REASONS: {
481
497
  /** GNOME/Mutter needs the WinRects helper before input can be targeted. */
482
498
  readonly GNOME_HELPER_MISSING: "gnome_helper_missing";
483
499
  readonly UNKNOWN_SESSION: "unknown_session";
500
+ /** The Mac App Store build: its App Sandbox blocks the grants Cowork needs. */
501
+ readonly SANDBOXED: "sandboxed";
484
502
  };
485
503
  type CuaDriverUnsupportedReason = (typeof CUA_DRIVER_UNSUPPORTED_REASONS)[keyof typeof CUA_DRIVER_UNSUPPORTED_REASONS];
486
504
  /**
@@ -697,9 +715,8 @@ declare function useSelectedLocalModel(): SelectedLocalModel;
697
715
  * **Consent is the host application's job, not this hook's.** Enabling Cowork
698
716
  * hands an LLM synthetic input, screen capture, and — through the driver's
699
717
  * `--grant existing-profile` — the user's logged-in browser sessions. The driver
700
- * renders no consent UI of its own, and neither does the `InsideButtons` toggle
701
- * in this package. A host must explain that and get consent before calling
702
- * `requestDriverPermissions()`.
718
+ * renders no consent UI of its own. A host must explain that and get consent
719
+ * before calling `requestPermission()` or `requestDriverPermissions()`.
703
720
  */
704
721
  declare function useCuaDriver(): {
705
722
  isAvailable: boolean;
@@ -719,6 +736,14 @@ declare function useCuaDriver(): {
719
736
  accessibility: boolean | null;
720
737
  screenRecording: boolean | null;
721
738
  }>;
739
+ refreshPermissions: () => Promise<{
740
+ accessibility: boolean | null;
741
+ screenRecording: boolean | null;
742
+ }>;
743
+ requestPermission: (kind: CoworkPermissionKind, openSettings: boolean) => Promise<CoworkPermissionOutcome>;
744
+ bringToFront: () => Promise<void>;
745
+ openPrivacySettings: (pane: "accessibility" | "screen_recording") => Promise<boolean>;
746
+ relaunch: () => Promise<boolean>;
722
747
  };
723
748
 
724
749
  /** Rendered offsets from the viewport's right/bottom edges. */
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iblai/web-containers",
3
- "version": "1.76.0",
3
+ "version": "1.77.0",
4
4
  "description": "ibl web containers",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iblai/web-containers",
3
- "version": "1.77.0",
3
+ "version": "1.78.0",
4
4
  "description": "ibl web containers",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -180,9 +180,9 @@
180
180
  "react-remove-scroll": "^2.7.2",
181
181
  "react-remove-scroll-bar": "^2.3.8",
182
182
  "sonner": "^2.0.0",
183
- "@iblai/data-layer": "1.48.0",
184
- "@iblai/web-utils": "2.26.0",
185
- "@iblai/agent-ai": "2.15.0"
183
+ "@iblai/web-utils": "2.27.0",
184
+ "@iblai/agent-ai": "2.15.0",
185
+ "@iblai/data-layer": "1.48.0"
186
186
  },
187
187
  "peerDependenciesMeta": {
188
188
  "@livekit/components-react": {