@dxos/plugin-native 0.10.0 → 0.11.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.
Files changed (80) hide show
  1. package/dist/lib/NativePlugin.mjs +30 -0
  2. package/dist/lib/NativePlugin.mjs.map +1 -0
  3. package/dist/lib/capabilities.mjs +11 -0
  4. package/dist/lib/capabilities.mjs.map +1 -0
  5. package/dist/lib/chunk-NativeSettings.mjs +102 -0
  6. package/dist/lib/chunk-NativeSettings.mjs.map +1 -0
  7. package/dist/lib/{neutral/chunk-WU6IZ56J.mjs → chunk-meta.mjs} +15 -24
  8. package/dist/lib/chunk-meta.mjs.map +1 -0
  9. package/dist/lib/chunk-ollama.mjs +307 -0
  10. package/dist/lib/chunk-ollama.mjs.map +1 -0
  11. package/dist/lib/chunk-react-surface.mjs +16 -0
  12. package/dist/lib/chunk-react-surface.mjs.map +1 -0
  13. package/dist/lib/chunk-settings.mjs +23 -0
  14. package/dist/lib/chunk-settings.mjs.map +1 -0
  15. package/dist/lib/chunk-spotlight-listener.mjs +61 -0
  16. package/dist/lib/chunk-spotlight-listener.mjs.map +1 -0
  17. package/dist/lib/chunk-updater.mjs +212 -0
  18. package/dist/lib/chunk-updater.mjs.map +1 -0
  19. package/dist/lib/containers.mjs +7 -0
  20. package/dist/lib/containers.mjs.map +1 -0
  21. package/dist/lib/index.mjs +2 -0
  22. package/dist/lib/meta.mjs +2 -0
  23. package/dist/lib/plugin.mjs +8 -0
  24. package/dist/lib/plugin.mjs.map +1 -0
  25. package/dist/lib/translations.mjs +26 -0
  26. package/dist/lib/translations.mjs.map +1 -0
  27. package/dist/lib/types.mjs +33 -0
  28. package/dist/lib/types.mjs.map +1 -0
  29. package/dist/types/src/capabilities/ollama.d.ts +1 -1
  30. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  31. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  32. package/dist/types/src/capabilities/settings.d.ts +1 -1
  33. package/dist/types/src/capabilities/spotlight-listener.d.ts +1 -1
  34. package/dist/types/src/capabilities/updater.d.ts +1 -1
  35. package/dist/types/src/containers/NativeSettings/NativeSettings.d.ts +4 -4
  36. package/dist/types/src/containers/NativeSettings/NativeSettings.d.ts.map +1 -1
  37. package/dist/types/src/types/NativeCapabilities.d.ts +1 -1
  38. package/dist/types/src/types/NativeCapabilities.d.ts.map +1 -1
  39. package/dist/types/src/types/Update.d.ts +1 -1
  40. package/dist/types/src/types/Update.d.ts.map +1 -1
  41. package/dist/types/tsconfig.tsbuildinfo +1 -1
  42. package/package.json +26 -25
  43. package/src/capabilities/ollama.ts +1 -1
  44. package/src/capabilities/{react-surface.tsx → react-surface.ts} +2 -7
  45. package/src/capabilities/updater.ts +1 -1
  46. package/src/containers/NativeSettings/NativeSettings.tsx +9 -6
  47. package/src/types/NativeCapabilities.ts +1 -1
  48. package/src/types/Update.ts +1 -1
  49. package/dist/lib/neutral/NativePlugin.mjs +0 -46
  50. package/dist/lib/neutral/NativePlugin.mjs.map +0 -7
  51. package/dist/lib/neutral/NativeSettings-33K63AVG.mjs +0 -120
  52. package/dist/lib/neutral/NativeSettings-33K63AVG.mjs.map +0 -7
  53. package/dist/lib/neutral/capabilities/index.mjs +0 -17
  54. package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
  55. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
  56. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
  57. package/dist/lib/neutral/chunk-WU6IZ56J.mjs.map +0 -7
  58. package/dist/lib/neutral/containers/index.mjs +0 -9
  59. package/dist/lib/neutral/containers/index.mjs.map +0 -7
  60. package/dist/lib/neutral/index.mjs +0 -8
  61. package/dist/lib/neutral/index.mjs.map +0 -7
  62. package/dist/lib/neutral/meta.json +0 -1
  63. package/dist/lib/neutral/meta.mjs +0 -8
  64. package/dist/lib/neutral/meta.mjs.map +0 -7
  65. package/dist/lib/neutral/ollama-HZEXAT2P.mjs +0 -312
  66. package/dist/lib/neutral/ollama-HZEXAT2P.mjs.map +0 -7
  67. package/dist/lib/neutral/plugin.mjs +0 -12
  68. package/dist/lib/neutral/plugin.mjs.map +0 -7
  69. package/dist/lib/neutral/react-surface-YST5DQA3.mjs +0 -27
  70. package/dist/lib/neutral/react-surface-YST5DQA3.mjs.map +0 -7
  71. package/dist/lib/neutral/settings-S5MFUI42.mjs +0 -28
  72. package/dist/lib/neutral/settings-S5MFUI42.mjs.map +0 -7
  73. package/dist/lib/neutral/spotlight-listener-K7S6LGL3.mjs +0 -48
  74. package/dist/lib/neutral/spotlight-listener-K7S6LGL3.mjs.map +0 -7
  75. package/dist/lib/neutral/translations.mjs +0 -34
  76. package/dist/lib/neutral/translations.mjs.map +0 -7
  77. package/dist/lib/neutral/types/index.mjs +0 -31
  78. package/dist/lib/neutral/types/index.mjs.map +0 -7
  79. package/dist/lib/neutral/updater-5ETKR4S3.mjs +0 -244
  80. package/dist/lib/neutral/updater-5ETKR4S3.mjs.map +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-native",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "description": "Composer plugin that runs when on a native device.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -16,50 +16,50 @@
16
16
  "#capabilities": {
17
17
  "source": "./src/capabilities/index.ts",
18
18
  "types": "./dist/types/src/capabilities/index.d.ts",
19
- "default": "./dist/lib/neutral/capabilities/index.mjs"
19
+ "default": "./dist/lib/capabilities.mjs"
20
20
  },
21
21
  "#containers": {
22
22
  "source": "./src/containers/index.ts",
23
23
  "types": "./dist/types/src/containers/index.d.ts",
24
- "default": "./dist/lib/neutral/containers/index.mjs"
24
+ "default": "./dist/lib/containers.mjs"
25
25
  },
26
26
  "#meta": {
27
27
  "source": "./src/meta.ts",
28
28
  "types": "./dist/types/src/meta.d.ts",
29
- "default": "./dist/lib/neutral/meta.mjs"
29
+ "default": "./dist/lib/meta.mjs"
30
30
  },
31
31
  "#plugin": {
32
32
  "source": "./src/NativePlugin.tsx",
33
33
  "types": "./dist/types/src/NativePlugin.d.ts",
34
- "default": "./dist/lib/neutral/NativePlugin.mjs"
34
+ "default": "./dist/lib/NativePlugin.mjs"
35
35
  },
36
36
  "#translations": {
37
37
  "source": "./src/translations.ts",
38
38
  "types": "./dist/types/src/translations.d.ts",
39
- "default": "./dist/lib/neutral/translations.mjs"
39
+ "default": "./dist/lib/translations.mjs"
40
40
  },
41
41
  "#types": {
42
42
  "source": "./src/types/index.ts",
43
43
  "types": "./dist/types/src/types/index.d.ts",
44
- "default": "./dist/lib/neutral/types/index.mjs"
44
+ "default": "./dist/lib/types.mjs"
45
45
  }
46
46
  },
47
47
  "exports": {
48
48
  ".": {
49
49
  "source": "./src/index.ts",
50
50
  "types": "./dist/types/src/index.d.ts",
51
- "default": "./dist/lib/neutral/index.mjs"
51
+ "import": "./dist/lib/index.mjs"
52
52
  },
53
53
  "./assets/PLUGIN.mdl": "./PLUGIN.mdl",
54
54
  "./plugin": {
55
55
  "source": "./src/plugin.ts",
56
56
  "types": "./dist/types/src/plugin.d.ts",
57
- "default": "./dist/lib/neutral/plugin.mjs"
57
+ "import": "./dist/lib/plugin.mjs"
58
58
  },
59
59
  "./translations": {
60
60
  "source": "./src/translations.ts",
61
61
  "types": "./dist/types/src/translations.d.ts",
62
- "default": "./dist/lib/neutral/translations.mjs"
62
+ "import": "./dist/lib/translations.mjs"
63
63
  }
64
64
  },
65
65
  "types": "dist/types/src/index.d.ts",
@@ -70,37 +70,38 @@
70
70
  "PLUGIN.mdl"
71
71
  ],
72
72
  "dependencies": {
73
+ "@effect-atom/atom": "^0.5.3",
73
74
  "@effect-atom/atom-react": "^0.5.0",
74
75
  "@effect/platform": "0.96.2",
75
- "@tauri-apps/api": "^2.11.0",
76
+ "@tauri-apps/api": "^2.11.1",
76
77
  "@tauri-apps/plugin-os": "^2.3.2",
77
78
  "@tauri-apps/plugin-process": "^2.3.1",
78
79
  "@tauri-apps/plugin-shell": "^2.3.5",
79
80
  "@tauri-apps/plugin-updater": "^2.10.1",
80
81
  "date-fns": "^3.6.0",
81
- "@dxos/ai": "0.10.0",
82
- "@dxos/app-framework": "0.10.0",
83
- "@dxos/app-toolkit": "0.10.0",
84
- "@dxos/keys": "0.10.0",
85
- "@dxos/effect": "0.10.0",
86
- "@dxos/log": "0.10.0",
87
- "@dxos/plugin-assistant": "0.10.0",
88
- "@dxos/util": "0.10.0"
82
+ "@dxos/ai": "0.11.1",
83
+ "@dxos/app-framework": "0.11.1",
84
+ "@dxos/app-toolkit": "0.11.1",
85
+ "@dxos/effect": "0.11.1",
86
+ "@dxos/keys": "0.11.1",
87
+ "@dxos/log": "0.11.1",
88
+ "@dxos/plugin-assistant": "0.11.1",
89
+ "@dxos/util": "0.11.1"
89
90
  },
90
91
  "devDependencies": {
91
92
  "@types/react": "~19.2.17",
92
93
  "effect": "3.21.4",
93
94
  "react": "~19.2.7",
94
- "vite": "^8.0.16",
95
- "@dxos/plugin-testing": "0.10.0",
96
- "@dxos/react-ui": "0.10.0",
97
- "@dxos/react-ui-form": "0.10.0"
95
+ "vite": "^8.1.4",
96
+ "@dxos/plugin-testing": "0.11.1",
97
+ "@dxos/react-ui": "0.11.1",
98
+ "@dxos/react-ui-form": "0.11.1"
98
99
  },
99
100
  "peerDependencies": {
100
101
  "effect": "3.21.4",
101
102
  "react": "~19.2.7",
102
- "@dxos/react-ui": "0.10.0",
103
- "@dxos/react-ui-form": "0.10.0"
103
+ "@dxos/react-ui": "^0.11.1",
104
+ "@dxos/react-ui-form": "^0.11.1"
104
105
  },
105
106
  "publishConfig": {
106
107
  "access": "public"
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Atom } from '@effect-atom/atom-react';
5
+ import { Atom } from '@effect-atom/atom';
6
6
  import * as FetchHttpClient from '@effect/platform/FetchHttpClient';
7
7
  import * as HttpClient from '@effect/platform/HttpClient';
8
8
  import { Command } from '@tauri-apps/plugin-shell';
@@ -3,15 +3,13 @@
3
3
  //
4
4
 
5
5
  import * as Effect from 'effect/Effect';
6
- import React from 'react';
7
6
 
8
7
  import { Capabilities, Capability } from '@dxos/app-framework';
9
- import { Surface, useSettingsState } from '@dxos/app-framework/ui';
8
+ import { Surface } from '@dxos/app-framework/ui';
10
9
  import { AppSurface } from '@dxos/app-toolkit/ui';
11
10
 
12
11
  import { NativeSettings } from '#containers';
13
12
  import { meta } from '#meta';
14
- import { type Settings } from '#types';
15
13
 
16
14
  export default Capability.makeModule(() =>
17
15
  Effect.succeed(
@@ -19,10 +17,7 @@ export default Capability.makeModule(() =>
19
17
  Surface.create({
20
18
  id: 'pluginSettings',
21
19
  filter: AppSurface.settings(AppSurface.Article, meta.profile.key),
22
- component: ({ data: { subject } }) => {
23
- const { settings, updateSettings } = useSettingsState<Settings.Settings>(subject.atom);
24
- return <NativeSettings settings={settings} onSettingsChange={updateSettings} />;
25
- },
20
+ component: NativeSettings,
26
21
  }),
27
22
  ]),
28
23
  ),
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Atom } from '@effect-atom/atom-react';
5
+ import { Atom } from '@effect-atom/atom';
6
6
  import { type } from '@tauri-apps/plugin-os';
7
7
  import { relaunch } from '@tauri-apps/plugin-process';
8
8
  import * as Updater from '@tauri-apps/plugin-updater';
@@ -9,14 +9,11 @@ import * as Schema from 'effect/Schema';
9
9
  import React, { type ReactNode, useState } from 'react';
10
10
 
11
11
  import { useCapability } from '@dxos/app-framework/ui';
12
- import { type AppSurface } from '@dxos/app-toolkit/ui';
13
12
  import { Button, useTranslation } from '@dxos/react-ui';
14
13
  import { Form } from '@dxos/react-ui-form';
15
14
 
16
15
  import { meta } from '#meta';
17
- import { NativeCapabilities, type Settings, type Update } from '#types';
18
-
19
- export type NativeSettingsProps = AppSurface.SettingsProps<Settings.Settings>;
16
+ import { NativeCapabilities, type Update } from '#types';
20
17
 
21
18
  type Pending = null | 'check' | 'install' | 'relaunch';
22
19
 
@@ -26,9 +23,13 @@ type UpdateActions = {
26
23
  onRelaunch: () => Promise<void>;
27
24
  };
28
25
 
29
- type UpdateRow = { description: string; button: ReactNode };
26
+ type UpdateRow = {
27
+ description: string;
28
+ button: ReactNode;
29
+ };
30
30
 
31
- export const NativeSettings = (_props: NativeSettingsProps) => {
31
+ /** Update status comes from the update-manager capability, so this panel takes no settings props. */
32
+ export const NativeSettings = () => {
32
33
  const { t } = useTranslation(meta.profile.key);
33
34
  const manager = useCapability(NativeCapabilities.UpdateManager);
34
35
  const status = useAtomValue(manager.status);
@@ -135,3 +136,5 @@ const renderUpdateRow = (
135
136
  Match.exhaustive,
136
137
  );
137
138
  };
139
+
140
+ NativeSettings.displayName = 'NativeSettings';
@@ -4,7 +4,7 @@
4
4
 
5
5
  // @import-as-namespace
6
6
 
7
- import type { Atom } from '@effect-atom/atom-react';
7
+ import type { Atom } from '@effect-atom/atom';
8
8
 
9
9
  import { Capability } from '@dxos/app-framework';
10
10
 
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { type Atom } from '@effect-atom/atom-react';
5
+ import { type Atom } from '@effect-atom/atom';
6
6
 
7
7
  // @import-as-namespace
8
8
 
@@ -1,46 +0,0 @@
1
- import "./chunk-J5LGTIGS.mjs";
2
-
3
- // src/NativePlugin.tsx
4
- import { ActivationEvents, Plugin } from "@dxos/app-framework";
5
- import { AppPlugin } from "@dxos/app-toolkit";
6
- import { AssistantEvents } from "@dxos/plugin-assistant";
7
- import { NativeSettings, Ollama, ReactSurface, SpotlightListener, Updater } from "#capabilities";
8
- import { meta } from "#meta";
9
- import { translations } from "#translations";
10
-
11
- // raw-loader:/__w/dxos/dxos/packages/plugins/plugin-native/PLUGIN.mdl
12
- var PLUGIN_default = "---\nid: org.dxos.plugin.native\nname: NativePlugin\nversion: 0.1.0\n---\n\nA Tauri-based native platform integration plugin for DXOS Composer that enables desktop-specific\ncapabilities on macOS, Linux, and Windows. It manages Spotlight window integration, over-the-air\napplication updates, and an Ollama sidecar process for local AI model inference.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype Settings\n fields:\n # No user-visible settings fields yet; reserved for future configuration.\n```\n\n```mdl\ntype UpdateStatus\n literals: unsupported | idle | checking | up-to-date | available | downloading | ready | failed\n```\n\n```mdl\ntype UpdateState\n fields:\n kind: UpdateStatus\n version?: string # set when kind = available\n checkedAt?: number # epoch ms; set when kind = up-to-date\n downloaded?: number # bytes received; set when kind = downloading\n contentLength?: number # total bytes; set when kind = downloading\n error?: string # set when kind = failed\n```\n\n## Components\n\n```mdl\ncomponent NativeSettings\n desc: |\n Settings panel section rendered inside the global Settings dialog under the\n App (native) plugin entry. Shows the current update status and exposes\n Check / Update Now / Relaunch actions depending on the UpdateState.\n props:\n settings: Settings\n onSettingsChange(patch: Partial<Settings>)\n state:\n pending: null | 'check' | 'install' | 'relaunch'\n status: UpdateState # derived from UpdateManager capability\n actions:\n checkForUpdate()\n installUpdate()\n relaunchApp()\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 Updates \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 [status description] [Check / Update]\u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\n```mdl\nop CheckForUpdate\n desc: |\n Initiates an OTA update check via the Tauri updater plugin.\n Updates the UpdateManager status atom as the check progresses.\n input: void\n output: void\n effects: [http]\n note: No-op on unsupported platforms; guarded by SUPPORTS_OTA list.\n```\n\n```mdl\nop InstallUpdate\n desc: |\n Downloads and installs a pending update, streaming progress events to the\n UpdateManager status atom. Does not relaunch the app automatically.\n input: void\n output: void\n effects: [http, fs]\n note: Only valid when UpdateManager status kind = available.\n```\n\n```mdl\nop RelaunchApp\n desc: |\n Relaunches the Tauri app process to apply the installed update.\n input: void\n output: void\n effects: [process]\n```\n\n## Features\n\n```mdl\nfeat F-1: Spotlight Window Integration\n\n req F-1.1:\n when: the main Composer window receives a spotlight:invoke Tauri event with operation = 'open'\n then: the LayoutOperation.Open intent is dispatched with the provided payload\n\n req F-1.2:\n when: the main Composer window receives a spotlight:invoke event with operation = 'switch-workspace'\n then: the LayoutOperation.SwitchWorkspace intent is dispatched with the provided payload\n\n req F-1.3:\n when: a spotlight:invoke event is handled successfully\n then: the main Composer window is shown and brought to focus\n\n req F-1.4:\n when: a spotlight:invoke event carries an unrecognised operation\n then: a warning is logged and no intent is dispatched\n```\n\n```mdl\nfeat F-2: Over-the-Air Updates\n\n req F-2.1:\n when: the Updater module activates on a supported platform (macOS, Linux, Windows) in production\n then: a background Effect fiber is started that checks for updates immediately and repeats hourly\n\n req F-2.2:\n when: an update is available and successfully downloaded\n then: a toast notification is shown with a Relaunch action; the status atom transitions to ready\n\n req F-2.3:\n when: the Tauri updater check throws\n then: the status atom transitions to failed with a human-readable error string\n\n req F-2.4:\n when: the app is running in a dev-server build (port \u2260 TAURI_LOCALHOST_PORT)\n then: the updater is disabled and status remains unsupported\n\n req F-2.5:\n when: the Updater module is torn down\n then: the background update-check fiber is interrupted cleanly\n```\n\n```mdl\nfeat F-3: Ollama Sidecar\n\n req F-3.1:\n when: the AssistantEvents.SetupAiServiceProviders event fires\n then: the Ollama sidecar binary is spawned via Tauri shell on localhost port 21434\n\n req F-3.2:\n when: the Ollama sidecar is running\n then: it is registered as an AiModelResolver under AppCapabilities.AiModelResolver\n\n req F-3.3:\n when: the Ollama capability is torn down\n then: the sidecar process is killed and the managed runtime is disposed\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Spotlight open dispatches LayoutOperation.Open\n given: Composer is running and SpotlightListener is active\n when: a spotlight:invoke Tauri event arrives with operation = 'open' and payload { spaceId: 'abc' }\n then:\n - LayoutOperation.Open is invoked with { spaceId: 'abc' }\n - main window is visible and focused\n```\n\n```mdl\ntest T-2: Unknown spotlight operation is silently dropped\n given: SpotlightListener is active\n when: a spotlight:invoke event arrives with operation = 'foobar'\n then:\n - no intent is dispatched\n - a warning log entry is emitted with the unknown operation name\n```\n\n```mdl\ntest T-3: Update check transitions status atom\n given: Updater module is active on a supported platform\n when: CheckForUpdate is called\n then:\n - status transitions to checking while the HTTP call is in-flight\n - status transitions to up-to-date if no update is available\n - status transitions to available with a version string if an update exists\n```\n\n```mdl\ntest T-4: Failed update check transitions to failed status\n given: Updater module is active\n when: the Tauri updater plugin throws an error during check\n then:\n - status transitions to failed\n - status.error contains a human-readable description\n```\n\n```mdl\ntest T-5: Dev-server build disables updater\n given: the app is served on a port other than TAURI_LOCALHOST_PORT\n when: the Updater module activates\n then:\n - status is set to unsupported immediately\n - no HTTP update check is performed\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive \u2014 the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap # name[?]: TypeExpr (# inline comment)\n literals?: UnionList # a | b | c\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self # feat blocks may contain feat blocks\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap # external inputs (immutable inside component)\n state?: FieldMap # internal reactive state\n slots?: FieldMap # named ReactNode injection points\n actions?: ActionMap # methods the component exposes or handles\n emits?: EventMap # events the component raises to its parent\n layout?: CodeBlock # ASCII sketch of visual structure (non-normative)\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap # named input parameters\n output?: TypeExpr # return type\n errors?: ErrorMap # name: Prose (when this error occurs)\n effects?: EffectList # echo:read | echo:write | http | fs | ...\n requires?: ServiceList # injected service dependencies\n note?: Prose # implementation guidance (non-normative)\n```\n";
13
-
14
- // src/NativePlugin.tsx
15
- var NativePlugin = Plugin.define(meta).pipe(AppPlugin.addSettingsModule({
16
- activate: NativeSettings
17
- }), AppPlugin.addSurfaceModule({
18
- activate: ReactSurface
19
- }), AppPlugin.addTranslationsModule({
20
- translations
21
- }), Plugin.addModule({
22
- id: "spotlight-listener",
23
- activatesOn: ActivationEvents.ProcessManagerReady,
24
- activate: SpotlightListener
25
- }), Plugin.addModule({
26
- id: "updater",
27
- activatesOn: ActivationEvents.ProcessManagerReady,
28
- activate: Updater
29
- }), Plugin.addModule({
30
- id: "ollama",
31
- activatesOn: AssistantEvents.SetupAiServiceProviders,
32
- activate: Ollama
33
- }), AppPlugin.addPluginAssetModule({
34
- asset: {
35
- pluginId: meta.profile.key,
36
- path: "PLUGIN.mdl",
37
- content: PLUGIN_default,
38
- mimeType: "application/x-mdl"
39
- }
40
- }), Plugin.make);
41
- var NativePlugin_default = NativePlugin;
42
- export {
43
- NativePlugin,
44
- NativePlugin_default as default
45
- };
46
- //# sourceMappingURL=NativePlugin.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/NativePlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-native/PLUGIN.mdl"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { ActivationEvents, Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { AssistantEvents } from '@dxos/plugin-assistant';\n\nimport { NativeSettings, Ollama, ReactSurface, SpotlightListener, Updater } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\nexport const NativePlugin = Plugin.define(meta).pipe(\n AppPlugin.addSettingsModule({ activate: NativeSettings }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n id: 'spotlight-listener',\n activatesOn: ActivationEvents.ProcessManagerReady,\n activate: SpotlightListener,\n }),\n Plugin.addModule({\n id: 'updater',\n activatesOn: ActivationEvents.ProcessManagerReady,\n activate: Updater,\n }),\n Plugin.addModule({\n id: 'ollama',\n activatesOn: AssistantEvents.SetupAiServiceProviders,\n activate: Ollama,\n }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nexport default NativePlugin;\n", "---\nid: org.dxos.plugin.native\nname: NativePlugin\nversion: 0.1.0\n---\n\nA Tauri-based native platform integration plugin for DXOS Composer that enables desktop-specific\ncapabilities on macOS, Linux, and Windows. It manages Spotlight window integration, over-the-air\napplication updates, and an Ollama sidecar process for local AI model inference.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype Settings\n fields:\n # No user-visible settings fields yet; reserved for future configuration.\n```\n\n```mdl\ntype UpdateStatus\n literals: unsupported | idle | checking | up-to-date | available | downloading | ready | failed\n```\n\n```mdl\ntype UpdateState\n fields:\n kind: UpdateStatus\n version?: string # set when kind = available\n checkedAt?: number # epoch ms; set when kind = up-to-date\n downloaded?: number # bytes received; set when kind = downloading\n contentLength?: number # total bytes; set when kind = downloading\n error?: string # set when kind = failed\n```\n\n## Components\n\n```mdl\ncomponent NativeSettings\n desc: |\n Settings panel section rendered inside the global Settings dialog under the\n App (native) plugin entry. Shows the current update status and exposes\n Check / Update Now / Relaunch actions depending on the UpdateState.\n props:\n settings: Settings\n onSettingsChange(patch: Partial<Settings>)\n state:\n pending: null | 'check' | 'install' | 'relaunch'\n status: UpdateState # derived from UpdateManager capability\n actions:\n checkForUpdate()\n installUpdate()\n relaunchApp()\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 Updates \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 [status description] [Check / Update]\u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\n```mdl\nop CheckForUpdate\n desc: |\n Initiates an OTA update check via the Tauri updater plugin.\n Updates the UpdateManager status atom as the check progresses.\n input: void\n output: void\n effects: [http]\n note: No-op on unsupported platforms; guarded by SUPPORTS_OTA list.\n```\n\n```mdl\nop InstallUpdate\n desc: |\n Downloads and installs a pending update, streaming progress events to the\n UpdateManager status atom. Does not relaunch the app automatically.\n input: void\n output: void\n effects: [http, fs]\n note: Only valid when UpdateManager status kind = available.\n```\n\n```mdl\nop RelaunchApp\n desc: |\n Relaunches the Tauri app process to apply the installed update.\n input: void\n output: void\n effects: [process]\n```\n\n## Features\n\n```mdl\nfeat F-1: Spotlight Window Integration\n\n req F-1.1:\n when: the main Composer window receives a spotlight:invoke Tauri event with operation = 'open'\n then: the LayoutOperation.Open intent is dispatched with the provided payload\n\n req F-1.2:\n when: the main Composer window receives a spotlight:invoke event with operation = 'switch-workspace'\n then: the LayoutOperation.SwitchWorkspace intent is dispatched with the provided payload\n\n req F-1.3:\n when: a spotlight:invoke event is handled successfully\n then: the main Composer window is shown and brought to focus\n\n req F-1.4:\n when: a spotlight:invoke event carries an unrecognised operation\n then: a warning is logged and no intent is dispatched\n```\n\n```mdl\nfeat F-2: Over-the-Air Updates\n\n req F-2.1:\n when: the Updater module activates on a supported platform (macOS, Linux, Windows) in production\n then: a background Effect fiber is started that checks for updates immediately and repeats hourly\n\n req F-2.2:\n when: an update is available and successfully downloaded\n then: a toast notification is shown with a Relaunch action; the status atom transitions to ready\n\n req F-2.3:\n when: the Tauri updater check throws\n then: the status atom transitions to failed with a human-readable error string\n\n req F-2.4:\n when: the app is running in a dev-server build (port \u2260 TAURI_LOCALHOST_PORT)\n then: the updater is disabled and status remains unsupported\n\n req F-2.5:\n when: the Updater module is torn down\n then: the background update-check fiber is interrupted cleanly\n```\n\n```mdl\nfeat F-3: Ollama Sidecar\n\n req F-3.1:\n when: the AssistantEvents.SetupAiServiceProviders event fires\n then: the Ollama sidecar binary is spawned via Tauri shell on localhost port 21434\n\n req F-3.2:\n when: the Ollama sidecar is running\n then: it is registered as an AiModelResolver under AppCapabilities.AiModelResolver\n\n req F-3.3:\n when: the Ollama capability is torn down\n then: the sidecar process is killed and the managed runtime is disposed\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Spotlight open dispatches LayoutOperation.Open\n given: Composer is running and SpotlightListener is active\n when: a spotlight:invoke Tauri event arrives with operation = 'open' and payload { spaceId: 'abc' }\n then:\n - LayoutOperation.Open is invoked with { spaceId: 'abc' }\n - main window is visible and focused\n```\n\n```mdl\ntest T-2: Unknown spotlight operation is silently dropped\n given: SpotlightListener is active\n when: a spotlight:invoke event arrives with operation = 'foobar'\n then:\n - no intent is dispatched\n - a warning log entry is emitted with the unknown operation name\n```\n\n```mdl\ntest T-3: Update check transitions status atom\n given: Updater module is active on a supported platform\n when: CheckForUpdate is called\n then:\n - status transitions to checking while the HTTP call is in-flight\n - status transitions to up-to-date if no update is available\n - status transitions to available with a version string if an update exists\n```\n\n```mdl\ntest T-4: Failed update check transitions to failed status\n given: Updater module is active\n when: the Tauri updater plugin throws an error during check\n then:\n - status transitions to failed\n - status.error contains a human-readable description\n```\n\n```mdl\ntest T-5: Dev-server build disables updater\n given: the app is served on a port other than TAURI_LOCALHOST_PORT\n when: the Updater module activates\n then:\n - status is set to unsupported immediately\n - no HTTP update check is performed\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive \u2014 the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap # name[?]: TypeExpr (# inline comment)\n literals?: UnionList # a | b | c\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self # feat blocks may contain feat blocks\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap # external inputs (immutable inside component)\n state?: FieldMap # internal reactive state\n slots?: FieldMap # named ReactNode injection points\n actions?: ActionMap # methods the component exposes or handles\n emits?: EventMap # events the component raises to its parent\n layout?: CodeBlock # ASCII sketch of visual structure (non-normative)\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap # named input parameters\n output?: TypeExpr # return type\n errors?: ErrorMap # name: Prose (when this error occurs)\n effects?: EffectList # echo:read | echo:write | http | fs | ...\n requires?: ServiceList # injected service dependencies\n note?: Prose # implementation guidance (non-normative)\n```\n"],
5
- "mappings": ";;;AAIA,SAASA,kBAAkBC,cAAc;AACzC,SAASC,iBAAiB;AAC1B,SAASC,uBAAuB;AAEhC,SAASC,gBAAgBC,QAAQC,cAAcC,mBAAmBC,eAAe;AACjF,SAASC,YAAY;AACrB,SAASC,oBAAoB;;;ACV7B;;;ADeO,IAAMC,eAAeC,OAAOC,OAAOC,IAAAA,EAAMC,KAC9CC,UAAUC,kBAAkB;EAAEC,UAAUC;AAAe,CAAA,GACvDH,UAAUI,iBAAiB;EAAEF,UAAUG;AAAa,CAAA,GACpDL,UAAUM,sBAAsB;EAAEC;AAAa,CAAA,GAC/CX,OAAOY,UAAU;EACfC,IAAI;EACJC,aAAaC,iBAAiBC;EAC9BV,UAAUW;AACZ,CAAA,GACAjB,OAAOY,UAAU;EACfC,IAAI;EACJC,aAAaC,iBAAiBC;EAC9BV,UAAUY;AACZ,CAAA,GACAlB,OAAOY,UAAU;EACfC,IAAI;EACJC,aAAaK,gBAAgBC;EAC7Bd,UAAUe;AACZ,CAAA,GACAjB,UAAUkB,qBAAqB;EAC7BC,OAAO;IAAEC,UAAUtB,KAAKuB,QAAQC;IAAKC,MAAM;IAAcC,SAASC;IAAYC,UAAU;EAAoB;AAC9G,CAAA,GACA9B,OAAO+B,IAAI;AAGb,IAAA,uBAAehC;",
6
- "names": ["ActivationEvents", "Plugin", "AppPlugin", "AssistantEvents", "NativeSettings", "Ollama", "ReactSurface", "SpotlightListener", "Updater", "meta", "translations", "NativePlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addSettingsModule", "activate", "NativeSettings", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "addModule", "id", "activatesOn", "ActivationEvents", "ProcessManagerReady", "SpotlightListener", "Updater", "AssistantEvents", "SetupAiServiceProviders", "Ollama", "addPluginAssetModule", "asset", "pluginId", "profile", "key", "path", "content", "pluginSpec", "mimeType", "make"]
7
- }
@@ -1,120 +0,0 @@
1
- import "./chunk-J5LGTIGS.mjs";
2
-
3
- // src/containers/NativeSettings/NativeSettings.tsx
4
- import { useAtomValue } from "@effect-atom/atom-react";
5
- import { formatDistanceToNow } from "date-fns/formatDistanceToNow";
6
- import * as Match from "effect/Match";
7
- import * as Schema from "effect/Schema";
8
- import React, { useState } from "react";
9
- import { useCapability } from "@dxos/app-framework/ui";
10
- import { Button, useTranslation } from "@dxos/react-ui";
11
- import { Form } from "@dxos/react-ui-form";
12
- import { meta } from "#meta";
13
- import { NativeCapabilities } from "#types";
14
- var NativeSettings = (_props) => {
15
- const { t } = useTranslation(meta.profile.key);
16
- const manager = useCapability(NativeCapabilities.UpdateManager);
17
- const status = useAtomValue(manager.status);
18
- const [pending, setPending] = useState(null);
19
- const runAction = (kind, action) => async () => {
20
- setPending(kind);
21
- try {
22
- await action();
23
- } finally {
24
- setPending(null);
25
- }
26
- };
27
- const { description, button } = renderUpdateRow(status, pending, t, {
28
- onCheck: runAction("check", manager.check),
29
- onInstall: runAction("install", manager.install),
30
- onRelaunch: runAction("relaunch", manager.relaunch)
31
- });
32
- return /* @__PURE__ */ React.createElement(Form.Root, {
33
- schema: Schema.Struct({}),
34
- values: {},
35
- variant: "settings"
36
- }, /* @__PURE__ */ React.createElement(Form.Viewport, {
37
- scroll: true
38
- }, /* @__PURE__ */ React.createElement(Form.Content, null, /* @__PURE__ */ React.createElement(Form.Section, {
39
- title: meta.profile.name ?? meta.profile.key
40
- }, /* @__PURE__ */ React.createElement(Form.Row, {
41
- label: t("settings.updates.label"),
42
- description
43
- }, button)))));
44
- };
45
- var renderUpdateRow = (status, pending, t, { onCheck, onInstall, onRelaunch }) => {
46
- const isChecking = pending === "check" || status.kind === "checking";
47
- const isInstalling = pending === "install" || status.kind === "downloading";
48
- const checkButton = (disabled = false) => /* @__PURE__ */ React.createElement(Button, {
49
- disabled: disabled || isChecking || isInstalling || pending === "relaunch",
50
- onClick: () => void onCheck()
51
- }, isChecking ? t("settings.updates.checking.label") : t("settings.updates.check.label"));
52
- return Match.value(status).pipe(Match.withReturnType(), Match.when({
53
- kind: "unsupported"
54
- }, () => ({
55
- description: t("settings.updates.unsupported.message"),
56
- button: checkButton(true)
57
- })), Match.when({
58
- kind: "idle"
59
- }, () => ({
60
- description: isChecking ? t("settings.updates.checking.message") : t("settings.updates.idle.message"),
61
- button: checkButton()
62
- })), Match.when({
63
- kind: "checking"
64
- }, () => ({
65
- description: t("settings.updates.checking.message"),
66
- button: checkButton()
67
- })), Match.when({
68
- kind: "up-to-date"
69
- }, (s) => ({
70
- description: isChecking ? t("settings.updates.checking.message") : t("settings.updates.up-to-date.message", {
71
- checkedAt: formatDistanceToNow(new Date(s.checkedAt), {
72
- addSuffix: true
73
- })
74
- }),
75
- button: checkButton()
76
- })), Match.when({
77
- kind: "available"
78
- }, (s) => ({
79
- description: t("settings.updates.available.message", {
80
- version: s.version
81
- }),
82
- button: /* @__PURE__ */ React.createElement(Button, {
83
- variant: "primary",
84
- disabled: isInstalling,
85
- onClick: () => void onInstall()
86
- }, isInstalling ? t("settings.updates.downloading.label") : t("settings.updates.update-now.label"))
87
- })), Match.when({
88
- kind: "downloading"
89
- }, (s) => {
90
- const percent = s.contentLength > 0 ? Math.round(s.downloaded / s.contentLength * 100) : 0;
91
- return {
92
- description: t("settings.updates.downloading.message", {
93
- percent
94
- }),
95
- button: /* @__PURE__ */ React.createElement(Button, {
96
- disabled: true
97
- }, t("settings.updates.downloading.label"))
98
- };
99
- }), Match.when({
100
- kind: "ready"
101
- }, () => ({
102
- description: t("settings.updates.ready.message"),
103
- button: /* @__PURE__ */ React.createElement(Button, {
104
- variant: "primary",
105
- disabled: pending === "relaunch",
106
- onClick: () => void onRelaunch()
107
- }, t("settings.updates.relaunch.label"))
108
- })), Match.when({
109
- kind: "failed"
110
- }, (s) => ({
111
- description: t("settings.updates.failed.message", {
112
- error: s.error
113
- }),
114
- button: checkButton()
115
- })), Match.exhaustive);
116
- };
117
- export {
118
- NativeSettings as default
119
- };
120
- //# sourceMappingURL=NativeSettings-33K63AVG.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/containers/NativeSettings/NativeSettings.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { useAtomValue } from '@effect-atom/atom-react';\nimport { formatDistanceToNow } from 'date-fns/formatDistanceToNow';\nimport * as Match from 'effect/Match';\nimport * as Schema from 'effect/Schema';\nimport React, { type ReactNode, useState } from 'react';\n\nimport { useCapability } from '@dxos/app-framework/ui';\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { Button, useTranslation } from '@dxos/react-ui';\nimport { Form } from '@dxos/react-ui-form';\n\nimport { meta } from '#meta';\nimport { NativeCapabilities, type Settings, type Update } from '#types';\n\nexport type NativeSettingsProps = AppSurface.SettingsProps<Settings.Settings>;\n\ntype Pending = null | 'check' | 'install' | 'relaunch';\n\ntype UpdateActions = {\n onCheck: () => Promise<void>;\n onInstall: () => Promise<void>;\n onRelaunch: () => Promise<void>;\n};\n\ntype UpdateRow = { description: string; button: ReactNode };\n\nexport const NativeSettings = (_props: NativeSettingsProps) => {\n const { t } = useTranslation(meta.profile.key);\n const manager = useCapability(NativeCapabilities.UpdateManager);\n const status = useAtomValue(manager.status);\n\n // UI-level pending flag. The status atom can flip between `checking` and `up-to-date` faster\n // than the user can perceive, so we also gate the button on the click handler's lifetime to\n // guarantee no duplicate triggers and a visible busy state.\n const [pending, setPending] = useState<Pending>(null);\n\n const runAction = (kind: Exclude<Pending, null>, action: () => Promise<void>) => async () => {\n setPending(kind);\n try {\n await action();\n } finally {\n setPending(null);\n }\n };\n\n const { description, button } = renderUpdateRow(status, pending, t, {\n onCheck: runAction('check', manager.check),\n onInstall: runAction('install', manager.install),\n onRelaunch: runAction('relaunch', manager.relaunch),\n });\n\n return (\n <Form.Root schema={Schema.Struct({})} values={{}} variant='settings'>\n <Form.Viewport scroll>\n <Form.Content>\n <Form.Section title={meta.profile.name ?? meta.profile.key}>\n <Form.Row label={t('settings.updates.label')} description={description}>\n {button}\n </Form.Row>\n </Form.Section>\n </Form.Content>\n </Form.Viewport>\n </Form.Root>\n );\n};\n\nconst renderUpdateRow = (\n status: Update.Status,\n pending: Pending,\n t: (key: string, options?: Record<string, unknown>) => string,\n { onCheck, onInstall, onRelaunch }: UpdateActions,\n): UpdateRow => {\n const isChecking = pending === 'check' || status.kind === 'checking';\n const isInstalling = pending === 'install' || status.kind === 'downloading';\n\n const checkButton = (disabled = false) => (\n <Button disabled={disabled || isChecking || isInstalling || pending === 'relaunch'} onClick={() => void onCheck()}>\n {isChecking ? t('settings.updates.checking.label') : t('settings.updates.check.label')}\n </Button>\n );\n\n return Match.value(status).pipe(\n Match.withReturnType<UpdateRow>(),\n Match.when({ kind: 'unsupported' }, () => ({\n description: t('settings.updates.unsupported.message'),\n button: checkButton(true),\n })),\n Match.when({ kind: 'idle' }, () => ({\n description: isChecking ? t('settings.updates.checking.message') : t('settings.updates.idle.message'),\n button: checkButton(),\n })),\n Match.when({ kind: 'checking' }, () => ({\n description: t('settings.updates.checking.message'),\n button: checkButton(),\n })),\n Match.when({ kind: 'up-to-date' }, (s) => ({\n description: isChecking\n ? t('settings.updates.checking.message')\n : t('settings.updates.up-to-date.message', {\n checkedAt: formatDistanceToNow(new Date(s.checkedAt), { addSuffix: true }),\n }),\n button: checkButton(),\n })),\n Match.when({ kind: 'available' }, (s) => ({\n description: t('settings.updates.available.message', { version: s.version }),\n button: (\n <Button variant='primary' disabled={isInstalling} onClick={() => void onInstall()}>\n {isInstalling ? t('settings.updates.downloading.label') : t('settings.updates.update-now.label')}\n </Button>\n ),\n })),\n Match.when({ kind: 'downloading' }, (s) => {\n const percent = s.contentLength > 0 ? Math.round((s.downloaded / s.contentLength) * 100) : 0;\n return {\n description: t('settings.updates.downloading.message', { percent }),\n button: <Button disabled>{t('settings.updates.downloading.label')}</Button>,\n };\n }),\n Match.when({ kind: 'ready' }, () => ({\n description: t('settings.updates.ready.message'),\n button: (\n <Button variant='primary' disabled={pending === 'relaunch'} onClick={() => void onRelaunch()}>\n {t('settings.updates.relaunch.label')}\n </Button>\n ),\n })),\n Match.when({ kind: 'failed' }, (s) => ({\n description: t('settings.updates.failed.message', { error: s.error }),\n button: checkButton(),\n })),\n Match.exhaustive,\n );\n};\n"],
5
- "mappings": ";;;AAIA,SAASA,oBAAoB;AAC7B,SAASC,2BAA2B;AACpC,YAAYC,WAAW;AACvB,YAAYC,YAAY;AACxB,OAAOC,SAAyBC,gBAAgB;AAEhD,SAASC,qBAAqB;AAE9B,SAASC,QAAQC,sBAAsB;AACvC,SAASC,YAAY;AAErB,SAASC,YAAY;AACrB,SAASC,0BAAsD;AAcxD,IAAMC,iBAAiB,CAACC,WAAAA;AAC7B,QAAM,EAAEC,EAAC,IAAKN,eAAeE,KAAKK,QAAQC,GAAG;AAC7C,QAAMC,UAAUX,cAAcK,mBAAmBO,aAAa;AAC9D,QAAMC,SAASnB,aAAaiB,QAAQE,MAAM;AAK1C,QAAM,CAACC,SAASC,UAAAA,IAAchB,SAAkB,IAAA;AAEhD,QAAMiB,YAAY,CAACC,MAA8BC,WAAgC,YAAA;AAC/EH,eAAWE,IAAAA;AACX,QAAI;AACF,YAAMC,OAAAA;IACR,UAAA;AACEH,iBAAW,IAAA;IACb;EACF;AAEA,QAAM,EAAEI,aAAaC,OAAM,IAAKC,gBAAgBR,QAAQC,SAASN,GAAG;IAClEc,SAASN,UAAU,SAASL,QAAQY,KAAK;IACzCC,WAAWR,UAAU,WAAWL,QAAQc,OAAO;IAC/CC,YAAYV,UAAU,YAAYL,QAAQgB,QAAQ;EACpD,CAAA;AAEA,SACE,sBAAA,cAACxB,KAAKyB,MAAI;IAACC,QAAeC,cAAO,CAAC,CAAA;IAAIC,QAAQ,CAAC;IAAGC,SAAQ;KACxD,sBAAA,cAAC7B,KAAK8B,UAAQ;IAACC,QAAAA;KACb,sBAAA,cAAC/B,KAAKgC,SAAO,MACX,sBAAA,cAAChC,KAAKiC,SAAO;IAACC,OAAOjC,KAAKK,QAAQ6B,QAAQlC,KAAKK,QAAQC;KACrD,sBAAA,cAACP,KAAKoC,KAAG;IAACC,OAAOhC,EAAE,wBAAA;IAA2BW;KAC3CC,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA;AAOf;AAEA,IAAMC,kBAAkB,CACtBR,QACAC,SACAN,GACA,EAAEc,SAASE,WAAWE,WAAU,MAAiB;AAEjD,QAAMe,aAAa3B,YAAY,WAAWD,OAAOI,SAAS;AAC1D,QAAMyB,eAAe5B,YAAY,aAAaD,OAAOI,SAAS;AAE9D,QAAM0B,cAAc,CAACC,WAAW,UAC9B,sBAAA,cAAC3C,QAAAA;IAAO2C,UAAUA,YAAYH,cAAcC,gBAAgB5B,YAAY;IAAY+B,SAAS,MAAM,KAAKvB,QAAAA;KACrGmB,aAAajC,EAAE,iCAAA,IAAqCA,EAAE,8BAAA,CAAA;AAI3D,SAAasC,YAAMjC,MAAAA,EAAQkC,KACnBC,qBAAc,GACdC,WAAK;IAAEhC,MAAM;EAAc,GAAG,OAAO;IACzCE,aAAaX,EAAE,sCAAA;IACfY,QAAQuB,YAAY,IAAA;EACtB,EAAA,GACMM,WAAK;IAAEhC,MAAM;EAAO,GAAG,OAAO;IAClCE,aAAasB,aAAajC,EAAE,mCAAA,IAAuCA,EAAE,+BAAA;IACrEY,QAAQuB,YAAAA;EACV,EAAA,GACMM,WAAK;IAAEhC,MAAM;EAAW,GAAG,OAAO;IACtCE,aAAaX,EAAE,mCAAA;IACfY,QAAQuB,YAAAA;EACV,EAAA,GACMM,WAAK;IAAEhC,MAAM;EAAa,GAAG,CAACiC,OAAO;IACzC/B,aAAasB,aACTjC,EAAE,mCAAA,IACFA,EAAE,uCAAuC;MACvC2C,WAAWxD,oBAAoB,IAAIyD,KAAKF,EAAEC,SAAS,GAAG;QAAEE,WAAW;MAAK,CAAA;IAC1E,CAAA;IACJjC,QAAQuB,YAAAA;EACV,EAAA,GACMM,WAAK;IAAEhC,MAAM;EAAY,GAAG,CAACiC,OAAO;IACxC/B,aAAaX,EAAE,sCAAsC;MAAE8C,SAASJ,EAAEI;IAAQ,CAAA;IAC1ElC,QACE,sBAAA,cAACnB,QAAAA;MAAO+B,SAAQ;MAAUY,UAAUF;MAAcG,SAAS,MAAM,KAAKrB,UAAAA;OACnEkB,eAAelC,EAAE,oCAAA,IAAwCA,EAAE,mCAAA,CAAA;EAGlE,EAAA,GACMyC,WAAK;IAAEhC,MAAM;EAAc,GAAG,CAACiC,MAAAA;AACnC,UAAMK,UAAUL,EAAEM,gBAAgB,IAAIC,KAAKC,MAAOR,EAAES,aAAaT,EAAEM,gBAAiB,GAAA,IAAO;AAC3F,WAAO;MACLrC,aAAaX,EAAE,wCAAwC;QAAE+C;MAAQ,CAAA;MACjEnC,QAAQ,sBAAA,cAACnB,QAAAA;QAAO2C,UAAAA;SAAUpC,EAAE,oCAAA,CAAA;IAC9B;EACF,CAAA,GACMyC,WAAK;IAAEhC,MAAM;EAAQ,GAAG,OAAO;IACnCE,aAAaX,EAAE,gCAAA;IACfY,QACE,sBAAA,cAACnB,QAAAA;MAAO+B,SAAQ;MAAUY,UAAU9B,YAAY;MAAY+B,SAAS,MAAM,KAAKnB,WAAAA;OAC7ElB,EAAE,iCAAA,CAAA;EAGT,EAAA,GACMyC,WAAK;IAAEhC,MAAM;EAAS,GAAG,CAACiC,OAAO;IACrC/B,aAAaX,EAAE,mCAAmC;MAAEoD,OAAOV,EAAEU;IAAM,CAAA;IACnExC,QAAQuB,YAAAA;EACV,EAAA,GACMkB,gBAAU;AAEpB;",
6
- "names": ["useAtomValue", "formatDistanceToNow", "Match", "Schema", "React", "useState", "useCapability", "Button", "useTranslation", "Form", "meta", "NativeCapabilities", "NativeSettings", "_props", "t", "profile", "key", "manager", "UpdateManager", "status", "pending", "setPending", "runAction", "kind", "action", "description", "button", "renderUpdateRow", "onCheck", "check", "onInstall", "install", "onRelaunch", "relaunch", "Root", "schema", "Struct", "values", "variant", "Viewport", "scroll", "Content", "Section", "title", "name", "Row", "label", "isChecking", "isInstalling", "checkButton", "disabled", "onClick", "value", "pipe", "withReturnType", "when", "s", "checkedAt", "Date", "addSuffix", "version", "percent", "contentLength", "Math", "round", "downloaded", "error", "exhaustive"]
7
- }
@@ -1,17 +0,0 @@
1
- import "../chunk-J5LGTIGS.mjs";
2
-
3
- // src/capabilities/index.ts
4
- import { Capability } from "@dxos/app-framework";
5
- var NativeSettings = Capability.lazy("NativeSettings", () => import("../settings-S5MFUI42.mjs"));
6
- var Ollama = Capability.lazy("Ollama", () => import("../ollama-HZEXAT2P.mjs"));
7
- var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-YST5DQA3.mjs"));
8
- var SpotlightListener = Capability.lazy("SpotlightListener", () => import("../spotlight-listener-K7S6LGL3.mjs"));
9
- var Updater = Capability.lazy("Updater", () => import("../updater-5ETKR4S3.mjs"));
10
- export {
11
- NativeSettings,
12
- Ollama,
13
- ReactSurface,
14
- SpotlightListener,
15
- Updater
16
- };
17
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/capabilities/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const NativeSettings = Capability.lazy('NativeSettings', () => import('./settings'));\nexport const Ollama = Capability.lazy('Ollama', () => import('./ollama'));\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\nexport const SpotlightListener = Capability.lazy('SpotlightListener', () => import('./spotlight-listener'));\nexport const Updater = Capability.lazy('Updater', () => import('./updater'));\n"],
5
- "mappings": ";;;AAIA,SAASA,kBAAkB;AAEpB,IAAMC,iBAAiBD,WAAWE,KAAK,kBAAkB,MAAM,OAAO,0BAAA,CAAA;AACtE,IAAMC,SAASH,WAAWE,KAAK,UAAU,MAAM,OAAO,wBAAA,CAAA;AACtD,IAAME,eAAeJ,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAMG,oBAAoBL,WAAWE,KAAK,qBAAqB,MAAM,OAAO,oCAAA,CAAA;AAC5E,IAAMI,UAAUN,WAAWE,KAAK,WAAW,MAAM,OAAO,yBAAA,CAAA;",
6
- "names": ["Capability", "NativeSettings", "lazy", "Ollama", "ReactSurface", "SpotlightListener", "Updater"]
7
- }
@@ -1,10 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
6
-
7
- export {
8
- __export
9
- };
10
- //# sourceMappingURL=chunk-J5LGTIGS.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/meta.ts", "../../../dx.config.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport config from '../dx.config';\n\n// TODO(wittjosiah): Rename plugin (package + id) from `native` to `app` to match the user-facing name.\nexport const meta = Plugin.getMetaFromConfig(config);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.native',\n name: 'App',\n author: 'DXOS',\n description: trim`\n Tauri-based native platform integration for DXOS Composer on macOS, Linux, and Windows.\n\n Provides Spotlight window integration that forwards spotlight:invoke Tauri events to\n Composer operations, letting the OS-level launcher open spaces and switch workspaces\n without the main window being focused first.\n\n Manages over-the-air application updates via the Tauri updater plugin, automatically\n checking for new releases in the background, streaming download progress, and surfacing\n a toast notification with a one-click Relaunch action when an update is ready.\n\n Spawns an Ollama sidecar process on localhost for local AI model inference, registering\n it as an AiModelResolver so Assistant features can resolve model requests without any\n external server dependency.\n `,\n spec: 'PLUGIN.mdl',\n icon: { key: 'ph--app-window--regular' },\n tags: ['system'],\n },\n});\n"],
5
- "mappings": ";AAIA,SAASA,cAAc;;;ACAvB,SAASC,eAAe;AACxB,SAASC,YAAY;AAErB,IAAA,oBAAeD,QAAQE,KAAK;EAC1BC,QAAQ;IACNC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,aAAaN;;;;;;;;;;;;;;;IAebO,MAAM;IACNC,MAAM;MAAEL,KAAK;IAA0B;IACvCM,MAAM;MAAC;;EACT;AACF,CAAA;;;ADtBO,IAAMC,OAAOC,OAAOC,kBAAkBC,iBAAAA;",
6
- "names": ["Plugin", "Config2", "trim", "make", "plugin", "key", "name", "author", "description", "spec", "icon", "tags", "meta", "Plugin", "getMetaFromConfig", "config"]
7
- }
@@ -1,9 +0,0 @@
1
- import "../chunk-J5LGTIGS.mjs";
2
-
3
- // src/containers/index.ts
4
- import { lazy } from "react";
5
- var NativeSettings = lazy(() => import("../NativeSettings-33K63AVG.mjs"));
6
- export {
7
- NativeSettings
8
- };
9
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/containers/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport const NativeSettings: ComponentType<any> = lazy(() => import('./NativeSettings'));\n"],
5
- "mappings": ";;;AAIA,SAA6BA,YAAY;AAElC,IAAMC,iBAAqCD,KAAK,MAAM,OAAO,gCAAA,CAAA;",
6
- "names": ["lazy", "NativeSettings"]
7
- }
@@ -1,8 +0,0 @@
1
- import {
2
- meta
3
- } from "./chunk-WU6IZ56J.mjs";
4
- import "./chunk-J5LGTIGS.mjs";
5
- export {
6
- meta
7
- };
8
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }