@dxos/plugin-native 0.8.4-main.ead640a → 0.8.4-main.effb148878
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/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/NativePlugin.mjs +34 -0
- package/dist/lib/neutral/NativePlugin.mjs.map +7 -0
- package/dist/lib/neutral/NativeSettings-CLYG5TJH.mjs +113 -0
- package/dist/lib/neutral/NativeSettings-CLYG5TJH.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +17 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-BJW75IOZ.mjs +32 -0
- package/dist/lib/neutral/chunk-BJW75IOZ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +9 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +8 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/ollama-BHWFTROM.mjs +62 -0
- package/dist/lib/neutral/ollama-BHWFTROM.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +12 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-W46XEBPK.mjs +27 -0
- package/dist/lib/neutral/react-surface-W46XEBPK.mjs.map +7 -0
- package/dist/lib/neutral/settings-HF6TQNU4.mjs +28 -0
- package/dist/lib/neutral/settings-HF6TQNU4.mjs.map +7 -0
- package/dist/lib/neutral/spotlight-listener-K7S6LGL3.mjs +48 -0
- package/dist/lib/neutral/spotlight-listener-K7S6LGL3.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +35 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +31 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/neutral/updater-JEBXWSSK.mjs +244 -0
- package/dist/lib/neutral/updater-JEBXWSSK.mjs.map +7 -0
- package/dist/types/src/NativePlugin.d.ts +3 -1
- package/dist/types/src/NativePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +6 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/ollama.d.ts +5 -2
- package/dist/types/src/capabilities/ollama.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts +7 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/spotlight-listener.d.ts +8 -0
- package/dist/types/src/capabilities/spotlight-listener.d.ts.map +1 -0
- package/dist/types/src/capabilities/updater.d.ts +4 -2
- package/dist/types/src/capabilities/updater.d.ts.map +1 -1
- package/dist/types/src/components/NativeSettings/NativeSettings.d.ts +6 -0
- package/dist/types/src/components/NativeSettings/NativeSettings.d.ts.map +1 -0
- package/dist/types/src/components/NativeSettings/index.d.ts +2 -0
- package/dist/types/src/components/NativeSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +3 -0
- package/dist/types/src/components/index.d.ts.map +1 -0
- package/dist/types/src/constants.d.ts +2 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +3 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +20 -6
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/NativeCapabilities.d.ts +5 -0
- package/dist/types/src/types/NativeCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +5 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/Update.d.ts +30 -0
- package/dist/types/src/types/Update.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +77 -24
- package/src/NativePlugin.tsx +22 -20
- package/src/capabilities/index.ts +6 -4
- package/src/capabilities/ollama.ts +26 -20
- package/src/capabilities/react-surface.tsx +29 -0
- package/src/capabilities/settings.ts +31 -0
- package/src/capabilities/spotlight-listener.ts +58 -0
- package/src/capabilities/updater.ts +159 -50
- package/src/components/NativeSettings/NativeSettings.tsx +132 -0
- package/src/components/NativeSettings/index.ts +5 -0
- package/src/components/index.ts +7 -0
- package/src/constants.ts +7 -0
- package/src/index.ts +0 -1
- package/src/meta.ts +25 -4
- package/src/plugin.ts +9 -0
- package/src/translations.ts +20 -5
- package/src/types/NativeCapabilities.ts +16 -0
- package/src/types/Settings.ts +11 -0
- package/src/types/Update.ts +24 -0
- package/src/types/index.ts +7 -0
- package/dist/lib/browser/chunk-HFW3KCZU.mjs +0 -10
- package/dist/lib/browser/chunk-HFW3KCZU.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -56
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/ollama-FWIW4XTL.mjs +0 -90
- package/dist/lib/browser/ollama-FWIW4XTL.mjs.map +0 -7
- package/dist/lib/browser/updater-3XUIXC4F.mjs +0 -138
- package/dist/lib/browser/updater-3XUIXC4F.mjs.map +0 -7
- package/dist/lib/browser/window-6G542FZL.mjs +0 -34
- package/dist/lib/browser/window-6G542FZL.mjs.map +0 -7
- package/dist/types/src/capabilities/window.d.ts +0 -4
- package/dist/types/src/capabilities/window.d.ts.map +0 -1
- package/src/capabilities/window.ts +0 -49
package/LICENSE
CHANGED
|
@@ -1,8 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c) 2022 DXOS
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
## Abbreviation
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 DXOS
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
package/README.md
CHANGED
|
@@ -12,4 +12,4 @@ Composer plugin that runs when being used by the Socket Supply Co. runtime on a
|
|
|
12
12
|
|
|
13
13
|
Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
|
|
14
14
|
|
|
15
|
-
License: [
|
|
15
|
+
License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2023 © DXOS
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
var NativePlugin = Plugin.define(meta).pipe(AppPlugin.addSettingsModule({
|
|
11
|
+
activate: NativeSettings
|
|
12
|
+
}), AppPlugin.addSurfaceModule({
|
|
13
|
+
activate: ReactSurface
|
|
14
|
+
}), AppPlugin.addTranslationsModule({
|
|
15
|
+
translations
|
|
16
|
+
}), Plugin.addModule({
|
|
17
|
+
id: "spotlight-listener",
|
|
18
|
+
activatesOn: ActivationEvents.ProcessManagerReady,
|
|
19
|
+
activate: SpotlightListener
|
|
20
|
+
}), Plugin.addModule({
|
|
21
|
+
id: "updater",
|
|
22
|
+
activatesOn: ActivationEvents.ProcessManagerReady,
|
|
23
|
+
activate: Updater
|
|
24
|
+
}), Plugin.addModule({
|
|
25
|
+
id: "ollama",
|
|
26
|
+
activatesOn: AssistantEvents.SetupAiServiceProviders,
|
|
27
|
+
activate: Ollama
|
|
28
|
+
}), Plugin.make);
|
|
29
|
+
var NativePlugin_default = NativePlugin;
|
|
30
|
+
export {
|
|
31
|
+
NativePlugin,
|
|
32
|
+
NativePlugin_default as default
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=NativePlugin.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/NativePlugin.tsx"],
|
|
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\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 Plugin.make,\n);\n\nexport default NativePlugin;\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;AAEtB,IAAMC,eAAeV,OAAOW,OAAOH,IAAAA,EAAMI,KAC9CX,UAAUY,kBAAkB;EAAEC,UAAUX;AAAe,CAAA,GACvDF,UAAUc,iBAAiB;EAAED,UAAUT;AAAa,CAAA,GACpDJ,UAAUe,sBAAsB;EAAEP;AAAa,CAAA,GAC/CT,OAAOiB,UAAU;EACfC,IAAI;EACJC,aAAapB,iBAAiBqB;EAC9BN,UAAUR;AACZ,CAAA,GACAN,OAAOiB,UAAU;EACfC,IAAI;EACJC,aAAapB,iBAAiBqB;EAC9BN,UAAUP;AACZ,CAAA,GACAP,OAAOiB,UAAU;EACfC,IAAI;EACJC,aAAajB,gBAAgBmB;EAC7BP,UAAUV;AACZ,CAAA,GACAJ,OAAOsB,IAAI;AAGb,IAAA,uBAAeZ;",
|
|
6
|
+
"names": ["ActivationEvents", "Plugin", "AppPlugin", "AssistantEvents", "NativeSettings", "Ollama", "ReactSurface", "SpotlightListener", "Updater", "meta", "translations", "NativePlugin", "define", "pipe", "addSettingsModule", "activate", "addSurfaceModule", "addTranslationsModule", "addModule", "id", "activatesOn", "ProcessManagerReady", "SetupAiServiceProviders", "make"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/components/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 React, { useState } from "react";
|
|
8
|
+
import { useCapability } from "@dxos/app-framework/ui";
|
|
9
|
+
import { Button, useTranslation } from "@dxos/react-ui";
|
|
10
|
+
import { Settings as SettingsForm } from "@dxos/react-ui-form";
|
|
11
|
+
import { meta } from "#meta";
|
|
12
|
+
import { NativeCapabilities } from "#types";
|
|
13
|
+
var NativeSettings = (_props) => {
|
|
14
|
+
const { t } = useTranslation(meta.id);
|
|
15
|
+
const manager = useCapability(NativeCapabilities.UpdateManager);
|
|
16
|
+
const status = useAtomValue(manager.status);
|
|
17
|
+
const [pending, setPending] = useState(null);
|
|
18
|
+
const runAction = (kind, action) => async () => {
|
|
19
|
+
setPending(kind);
|
|
20
|
+
try {
|
|
21
|
+
await action();
|
|
22
|
+
} finally {
|
|
23
|
+
setPending(null);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const { description, button } = renderUpdateRow(status, pending, t, {
|
|
27
|
+
onCheck: runAction("check", manager.check),
|
|
28
|
+
onInstall: runAction("install", manager.install),
|
|
29
|
+
onRelaunch: runAction("relaunch", manager.relaunch)
|
|
30
|
+
});
|
|
31
|
+
return /* @__PURE__ */ React.createElement(SettingsForm.Viewport, null, /* @__PURE__ */ React.createElement(SettingsForm.Section, {
|
|
32
|
+
title: t("settings.title")
|
|
33
|
+
}, /* @__PURE__ */ React.createElement(SettingsForm.Item, {
|
|
34
|
+
title: t("settings.updates.label"),
|
|
35
|
+
description
|
|
36
|
+
}, button)));
|
|
37
|
+
};
|
|
38
|
+
var renderUpdateRow = (status, pending, t, { onCheck, onInstall, onRelaunch }) => {
|
|
39
|
+
const isChecking = pending === "check" || status.kind === "checking";
|
|
40
|
+
const isInstalling = pending === "install" || status.kind === "downloading";
|
|
41
|
+
const checkButton = (disabled = false) => /* @__PURE__ */ React.createElement(Button, {
|
|
42
|
+
disabled: disabled || isChecking || isInstalling || pending === "relaunch",
|
|
43
|
+
onClick: () => void onCheck()
|
|
44
|
+
}, isChecking ? t("settings.updates.checking.label") : t("settings.updates.check.label"));
|
|
45
|
+
return Match.value(status).pipe(Match.withReturnType(), Match.when({
|
|
46
|
+
kind: "unsupported"
|
|
47
|
+
}, () => ({
|
|
48
|
+
description: t("settings.updates.unsupported.message"),
|
|
49
|
+
button: checkButton(true)
|
|
50
|
+
})), Match.when({
|
|
51
|
+
kind: "idle"
|
|
52
|
+
}, () => ({
|
|
53
|
+
description: isChecking ? t("settings.updates.checking.message") : t("settings.updates.idle.message"),
|
|
54
|
+
button: checkButton()
|
|
55
|
+
})), Match.when({
|
|
56
|
+
kind: "checking"
|
|
57
|
+
}, () => ({
|
|
58
|
+
description: t("settings.updates.checking.message"),
|
|
59
|
+
button: checkButton()
|
|
60
|
+
})), Match.when({
|
|
61
|
+
kind: "up-to-date"
|
|
62
|
+
}, (s) => ({
|
|
63
|
+
description: isChecking ? t("settings.updates.checking.message") : t("settings.updates.up-to-date.message", {
|
|
64
|
+
checkedAt: formatDistanceToNow(new Date(s.checkedAt), {
|
|
65
|
+
addSuffix: true
|
|
66
|
+
})
|
|
67
|
+
}),
|
|
68
|
+
button: checkButton()
|
|
69
|
+
})), Match.when({
|
|
70
|
+
kind: "available"
|
|
71
|
+
}, (s) => ({
|
|
72
|
+
description: t("settings.updates.available.message", {
|
|
73
|
+
version: s.version
|
|
74
|
+
}),
|
|
75
|
+
button: /* @__PURE__ */ React.createElement(Button, {
|
|
76
|
+
variant: "primary",
|
|
77
|
+
disabled: isInstalling,
|
|
78
|
+
onClick: () => void onInstall()
|
|
79
|
+
}, isInstalling ? t("settings.updates.downloading.label") : t("settings.updates.update-now.label"))
|
|
80
|
+
})), Match.when({
|
|
81
|
+
kind: "downloading"
|
|
82
|
+
}, (s) => {
|
|
83
|
+
const percent = s.contentLength > 0 ? Math.round(s.downloaded / s.contentLength * 100) : 0;
|
|
84
|
+
return {
|
|
85
|
+
description: t("settings.updates.downloading.message", {
|
|
86
|
+
percent
|
|
87
|
+
}),
|
|
88
|
+
button: /* @__PURE__ */ React.createElement(Button, {
|
|
89
|
+
disabled: true
|
|
90
|
+
}, t("settings.updates.downloading.label"))
|
|
91
|
+
};
|
|
92
|
+
}), Match.when({
|
|
93
|
+
kind: "ready"
|
|
94
|
+
}, () => ({
|
|
95
|
+
description: t("settings.updates.ready.message"),
|
|
96
|
+
button: /* @__PURE__ */ React.createElement(Button, {
|
|
97
|
+
variant: "primary",
|
|
98
|
+
disabled: pending === "relaunch",
|
|
99
|
+
onClick: () => void onRelaunch()
|
|
100
|
+
}, t("settings.updates.relaunch.label"))
|
|
101
|
+
})), Match.when({
|
|
102
|
+
kind: "failed"
|
|
103
|
+
}, (s) => ({
|
|
104
|
+
description: t("settings.updates.failed.message", {
|
|
105
|
+
error: s.error
|
|
106
|
+
}),
|
|
107
|
+
button: checkButton()
|
|
108
|
+
})), Match.exhaustive);
|
|
109
|
+
};
|
|
110
|
+
export {
|
|
111
|
+
NativeSettings as default
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=NativeSettings-CLYG5TJH.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/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 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 { Settings as SettingsForm } from '@dxos/react-ui-form';\n\nimport { meta } from '#meta';\nimport { NativeCapabilities, type Settings, type Update } from '#types';\n\nexport type NativeSettingsProps = AppSurface.SettingsArticleProps<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.id);\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 <SettingsForm.Viewport>\n <SettingsForm.Section title={t('settings.title')}>\n <SettingsForm.Item title={t('settings.updates.label')} description={description}>\n {button}\n </SettingsForm.Item>\n </SettingsForm.Section>\n </SettingsForm.Viewport>\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": "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",
|
|
6
|
+
"names": ["useAtomValue", "formatDistanceToNow", "Match", "React", "useState", "useCapability", "Button", "useTranslation", "Settings", "SettingsForm", "meta", "NativeCapabilities", "NativeSettings", "_props", "t", "id", "manager", "UpdateManager", "status", "pending", "setPending", "runAction", "kind", "action", "description", "button", "renderUpdateRow", "onCheck", "check", "onInstall", "install", "onRelaunch", "relaunch", "Viewport", "Section", "title", "Item", "isChecking", "isInstalling", "checkButton", "disabled", "onClick", "value", "pipe", "withReturnType", "when", "s", "checkedAt", "Date", "addSuffix", "version", "variant", "percent", "contentLength", "Math", "round", "downloaded", "error", "exhaustive"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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-HF6TQNU4.mjs"));
|
|
6
|
+
var Ollama = Capability.lazy("Ollama", () => import("../ollama-BHWFTROM.mjs"));
|
|
7
|
+
var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-W46XEBPK.mjs"));
|
|
8
|
+
var SpotlightListener = Capability.lazy("SpotlightListener", () => import("../spotlight-listener-K7S6LGL3.mjs"));
|
|
9
|
+
var Updater = Capability.lazy("Updater", () => import("../updater-JEBXWSSK.mjs"));
|
|
10
|
+
export {
|
|
11
|
+
NativeSettings,
|
|
12
|
+
Ollama,
|
|
13
|
+
ReactSurface,
|
|
14
|
+
SpotlightListener,
|
|
15
|
+
Updater
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// src/meta.ts
|
|
2
|
+
import { trim } from "@dxos/util";
|
|
3
|
+
var meta = {
|
|
4
|
+
id: "org.dxos.plugin.native",
|
|
5
|
+
name: "App",
|
|
6
|
+
author: "DXOS",
|
|
7
|
+
spec: "PLUGIN.mdl",
|
|
8
|
+
description: trim`
|
|
9
|
+
Tauri-based native platform integration for DXOS Composer on macOS, Linux, and Windows.
|
|
10
|
+
|
|
11
|
+
Provides Spotlight window integration that forwards spotlight:invoke Tauri events to
|
|
12
|
+
Composer operations, letting the OS-level launcher open spaces and switch workspaces
|
|
13
|
+
without the main window being focused first.
|
|
14
|
+
|
|
15
|
+
Manages over-the-air application updates via the Tauri updater plugin, automatically
|
|
16
|
+
checking for new releases in the background, streaming download progress, and surfacing
|
|
17
|
+
a toast notification with a one-click Relaunch action when an update is ready.
|
|
18
|
+
|
|
19
|
+
Spawns an Ollama sidecar process on localhost for local AI model inference, registering
|
|
20
|
+
it as an AiModelResolver so Assistant features can resolve model requests without any
|
|
21
|
+
external server dependency.
|
|
22
|
+
`,
|
|
23
|
+
icon: "ph--app-window--regular",
|
|
24
|
+
tags: [
|
|
25
|
+
"system"
|
|
26
|
+
]
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
meta
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=chunk-BJW75IOZ.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\n// TODO(wittjosiah): Rename plugin (package + id) from `native` to `app` to match the user-facing name.\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.native',\n name: 'App',\n author: 'DXOS',\n spec: 'PLUGIN.mdl',\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 icon: 'ph--app-window--regular',\n tags: ['system'],\n};\n"],
|
|
5
|
+
"mappings": ";AAKA,SAASA,YAAY;AAGd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,QAAQ;EACRC,MAAM;EACNC,aAAaN;;;;;;;;;;;;;;;EAebO,MAAM;EACNC,MAAM;IAAC;;AACT;",
|
|
6
|
+
"names": ["trim", "meta", "id", "name", "author", "spec", "description", "icon", "tags"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/components/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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":3431,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":368,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/NativePlugin.tsx":{"bytes":4056,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-assistant","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/settings.ts":{"bytes":3050,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/ollama.ts":{"bytes":10648,"imports":[{"path":"@effect/platform/FetchHttpClient","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClient","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-shell","kind":"import-statement","external":true},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/ManagedRuntime","kind":"import-statement","external":true},{"path":"@dxos/ai/resolvers","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":3563,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"#components","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/spotlight-listener.ts":{"bytes":6502,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@tauri-apps/api/event","kind":"dynamic-import","external":true},{"path":"@tauri-apps/api/window","kind":"dynamic-import","external":true}],"format":"esm"},"src/constants.ts":{"bytes":807,"imports":[],"format":"esm"},"src/capabilities/updater.ts":{"bytes":24930,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-os","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-process","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-updater","kind":"import-statement","external":true},{"path":"effect/Duration","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Fiber","kind":"import-statement","external":true},{"path":"effect/Match","kind":"import-statement","external":true},{"path":"effect/Schedule","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"../constants"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":2057,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/settings.ts","kind":"dynamic-import","original":"./settings"},{"path":"src/capabilities/ollama.ts","kind":"dynamic-import","original":"./ollama"},{"path":"src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"},{"path":"src/capabilities/spotlight-listener.ts","kind":"dynamic-import","original":"./spotlight-listener"},{"path":"src/capabilities/updater.ts","kind":"dynamic-import","original":"./updater"}],"format":"esm"},"src/components/NativeSettings/NativeSettings.tsx":{"bytes":16288,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"date-fns/formatDistanceToNow","kind":"import-statement","external":true},{"path":"effect/Match","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/components/NativeSettings/index.ts":{"bytes":518,"imports":[{"path":"src/components/NativeSettings/NativeSettings.tsx","kind":"import-statement","original":"./NativeSettings"}],"format":"esm"},"src/components/index.ts":{"bytes":714,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/components/NativeSettings/index.ts","kind":"dynamic-import","original":"./NativeSettings"}],"format":"esm"},"src/plugin.ts":{"bytes":855,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"#plugin","kind":"dynamic-import","external":true}],"format":"esm"},"src/translations.ts":{"bytes":4467,"imports":[{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/types/NativeCapabilities.ts":{"bytes":1827,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/types/Settings.ts":{"bytes":880,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true}],"format":"esm"},"src/types/Update.ts":{"bytes":1080,"imports":[],"format":"esm"},"src/types/index.ts":{"bytes":796,"imports":[{"path":"src/types/NativeCapabilities.ts","kind":"import-statement","original":"./NativeCapabilities"},{"path":"src/types/Settings.ts","kind":"import-statement","original":"./Settings"},{"path":"src/types/Update.ts","kind":"import-statement","original":"./Update"}],"format":"esm"}},"outputs":{"dist/lib/neutral/settings-HF6TQNU4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1561},"dist/lib/neutral/settings-HF6TQNU4.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/settings.ts","inputs":{"src/capabilities/settings.ts":{"bytesInOutput":706}},"bytes":859},"dist/lib/neutral/ollama-BHWFTROM.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5093},"dist/lib/neutral/ollama-BHWFTROM.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@effect/platform/FetchHttpClient","kind":"import-statement","external":true},{"path":"@effect/platform/HttpClient","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-shell","kind":"import-statement","external":true},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/ManagedRuntime","kind":"import-statement","external":true},{"path":"@dxos/ai/resolvers","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/ollama.ts","inputs":{"src/capabilities/ollama.ts":{"bytesInOutput":2583}},"bytes":2730},"dist/lib/neutral/react-surface-W46XEBPK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1853},"dist/lib/neutral/react-surface-W46XEBPK.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit/ui","kind":"import-statement","external":true},{"path":"#components","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":830}},"bytes":999},"dist/lib/neutral/spotlight-listener-K7S6LGL3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3118},"dist/lib/neutral/spotlight-listener-K7S6LGL3.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@tauri-apps/api/event","kind":"dynamic-import","external":true},{"path":"@tauri-apps/api/window","kind":"dynamic-import","external":true}],"exports":["default"],"entryPoint":"src/capabilities/spotlight-listener.ts","inputs":{"src/capabilities/spotlight-listener.ts":{"bytesInOutput":1750}},"bytes":1933},"dist/lib/neutral/updater-JEBXWSSK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":11785},"dist/lib/neutral/updater-JEBXWSSK.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-os","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-process","kind":"import-statement","external":true},{"path":"@tauri-apps/plugin-updater","kind":"import-statement","external":true},{"path":"effect/Duration","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Fiber","kind":"import-statement","external":true},{"path":"effect/Match","kind":"import-statement","external":true},{"path":"effect/Schedule","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/updater.ts","inputs":{"src/capabilities/updater.ts":{"bytesInOutput":6430},"src/constants.ts":{"bytesInOutput":36}},"bytes":6669},"dist/lib/neutral/NativeSettings-CLYG5TJH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8530},"dist/lib/neutral/NativeSettings-CLYG5TJH.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"date-fns/formatDistanceToNow","kind":"import-statement","external":true},{"path":"effect/Match","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/components/NativeSettings/index.ts","inputs":{"src/components/NativeSettings/NativeSettings.tsx":{"bytesInOutput":4051},"src/components/NativeSettings/index.ts":{"bytesInOutput":0}},"bytes":4228},"dist/lib/neutral/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-BJW75IOZ.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":132},"dist/lib/neutral/NativePlugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2138},"dist/lib/neutral/NativePlugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-assistant","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"exports":["NativePlugin","default"],"entryPoint":"src/NativePlugin.tsx","inputs":{"src/NativePlugin.tsx":{"bytesInOutput":975}},"bytes":1135},"dist/lib/neutral/capabilities/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1081},"dist/lib/neutral/capabilities/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/neutral/settings-HF6TQNU4.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/ollama-BHWFTROM.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/react-surface-W46XEBPK.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/spotlight-listener-K7S6LGL3.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/updater-JEBXWSSK.mjs","kind":"dynamic-import"}],"exports":["NativeSettings","Ollama","ReactSurface","SpotlightListener","Updater"],"entryPoint":"src/capabilities/index.ts","inputs":{"src/capabilities/index.ts":{"bytesInOutput":524}},"bytes":708},"dist/lib/neutral/components/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":404},"dist/lib/neutral/components/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/neutral/NativeSettings-CLYG5TJH.mjs","kind":"dynamic-import"}],"exports":["NativeSettings"],"entryPoint":"src/components/index.ts","inputs":{"src/components/index.ts":{"bytesInOutput":105}},"bytes":229},"dist/lib/neutral/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/meta.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-BJW75IOZ.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/meta.ts","inputs":{},"bytes":131},"dist/lib/neutral/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":440},"dist/lib/neutral/plugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-BJW75IOZ.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["NativePlugin"],"entryPoint":"src/plugin.ts","inputs":{"src/plugin.ts":{"bytesInOutput":109}},"bytes":268},"dist/lib/neutral/chunk-BJW75IOZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1594},"dist/lib/neutral/chunk-BJW75IOZ.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":1026}},"bytes":1105},"dist/lib/neutral/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2055},"dist/lib/neutral/translations.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"#meta","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":1414}},"bytes":1538},"dist/lib/neutral/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1996},"dist/lib/neutral/types/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true}],"exports":["NativeCapabilities","Settings","Update"],"entryPoint":"src/types/index.ts","inputs":{"src/types/NativeCapabilities.ts":{"bytesInOutput":368},"src/types/index.ts":{"bytesInOutput":0},"src/types/Settings.ts":{"bytesInOutput":180},"src/types/Update.ts":{"bytesInOutput":25}},"bytes":869},"dist/lib/neutral/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/capabilities/ollama.ts
|
|
4
|
+
import * as FetchHttpClient from "@effect/platform/FetchHttpClient";
|
|
5
|
+
import * as HttpClient from "@effect/platform/HttpClient";
|
|
6
|
+
import { Command } from "@tauri-apps/plugin-shell";
|
|
7
|
+
import * as Context from "effect/Context";
|
|
8
|
+
import * as Effect from "effect/Effect";
|
|
9
|
+
import * as Layer from "effect/Layer";
|
|
10
|
+
import * as ManagedRuntime from "effect/ManagedRuntime";
|
|
11
|
+
import { OllamaResolver } from "@dxos/ai/resolvers";
|
|
12
|
+
import { Capability } from "@dxos/app-framework";
|
|
13
|
+
import { AppCapabilities } from "@dxos/app-toolkit";
|
|
14
|
+
import { log } from "@dxos/log";
|
|
15
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-native/src/capabilities/ollama.ts";
|
|
16
|
+
var OLLAMA_HOST = "http://localhost:21434";
|
|
17
|
+
var ollama_default = Capability.makeModule(() => Effect.sync(() => {
|
|
18
|
+
const runtime = ManagedRuntime.make(OllamaSidecar.layerLive);
|
|
19
|
+
const sidecarLayer = Layer.effectContext(runtime.runtimeEffect.pipe(Effect.map((rt) => rt.context.pipe(Context.pick(OllamaSidecar)))));
|
|
20
|
+
return Capability.contributes(AppCapabilities.AiModelResolver, OllamaSidecarModelResolver.pipe(Layer.provide(sidecarLayer)), () => Effect.tryPromise(() => runtime.dispose()));
|
|
21
|
+
}));
|
|
22
|
+
var OllamaSidecar = class _OllamaSidecar extends Context.Tag("@dxos/plugin-native/OllamaSidecar")() {
|
|
23
|
+
static layerLive = Layer.scoped(_OllamaSidecar, Effect.gen(function* () {
|
|
24
|
+
const command = Command.sidecar("sidecar/ollama", [
|
|
25
|
+
"serve"
|
|
26
|
+
], {
|
|
27
|
+
env: {
|
|
28
|
+
OLLAMA_HOST,
|
|
29
|
+
OLLAMA_ORIGINS: "*"
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
command.stdout.on("data", (data) => console.log("[ollama]", data.toString()));
|
|
33
|
+
command.stderr.on("data", (data) => console.error("[ollama]", data.toString()));
|
|
34
|
+
command.on("close", (code) => log.info("Ollama process exited", {
|
|
35
|
+
code
|
|
36
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 38, S: this }));
|
|
37
|
+
command.on("error", (error) => log.error("Ollama error", {
|
|
38
|
+
error
|
|
39
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 41, S: this }));
|
|
40
|
+
const child = yield* Effect.promise(() => command.spawn());
|
|
41
|
+
yield* Effect.addFinalizer(Effect.fn(function* () {
|
|
42
|
+
yield* Effect.promise(() => child.kill());
|
|
43
|
+
}));
|
|
44
|
+
log.info("Running ollama", {
|
|
45
|
+
pid: child.pid
|
|
46
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 48, S: this });
|
|
47
|
+
return {
|
|
48
|
+
endpoint: OLLAMA_HOST
|
|
49
|
+
};
|
|
50
|
+
}));
|
|
51
|
+
};
|
|
52
|
+
var OllamaSidecarModelResolver = Layer.unwrapEffect(Effect.gen(function* () {
|
|
53
|
+
const { endpoint } = yield* OllamaSidecar;
|
|
54
|
+
return OllamaResolver.make({
|
|
55
|
+
endpoint,
|
|
56
|
+
transformClient: HttpClient.withTracerPropagation(false)
|
|
57
|
+
});
|
|
58
|
+
})).pipe(Layer.provide(FetchHttpClient.layer));
|
|
59
|
+
export {
|
|
60
|
+
ollama_default as default
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=ollama-BHWFTROM.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/ollama.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport * as HttpClient from '@effect/platform/HttpClient';\nimport { Command } from '@tauri-apps/plugin-shell';\nimport * as Context from 'effect/Context';\nimport * as Effect from 'effect/Effect';\nimport * as Layer from 'effect/Layer';\nimport * as ManagedRuntime from 'effect/ManagedRuntime';\n\nimport { type AiModelResolver } from '@dxos/ai';\nimport { OllamaResolver } from '@dxos/ai/resolvers';\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { log } from '@dxos/log';\n\n// NOTE: Running ollama on non-standard port (config Tauri).\nconst OLLAMA_HOST = 'http://localhost:21434';\n\nexport type OllamaCapabilities = Capability.Capability<typeof AppCapabilities.AiModelResolver>;\n\nexport default Capability.makeModule<[], OllamaCapabilities>(() =>\n Effect.sync(() => {\n const runtime = ManagedRuntime.make(OllamaSidecar.layerLive);\n\n // Layer for the sidecar but the lifecycle is managed by the runtime.\n const sidecarLayer = Layer.effectContext(\n runtime.runtimeEffect.pipe(Effect.map((rt) => rt.context.pipe(Context.pick(OllamaSidecar)))),\n );\n\n return Capability.contributes(\n AppCapabilities.AiModelResolver,\n OllamaSidecarModelResolver.pipe(Layer.provide(sidecarLayer)),\n () => Effect.tryPromise(() => runtime.dispose()),\n );\n }),\n);\n\nclass OllamaSidecar extends Context.Tag('@dxos/plugin-native/OllamaSidecar')<\n OllamaSidecar,\n {\n endpoint: string;\n }\n>() {\n static layerLive = Layer.scoped(\n OllamaSidecar,\n Effect.gen(function* () {\n const command = Command.sidecar('sidecar/ollama', ['serve'], {\n env: {\n OLLAMA_HOST,\n OLLAMA_ORIGINS: '*', // CORS\n },\n });\n\n // NOTE: Keeping those as console.log for consistent formatting.\n // eslint-disable-next-line no-console\n command.stdout.on('data', (data) => console.log('[ollama]', data.toString()));\n // eslint-disable-next-line no-console\n command.stderr.on('data', (data) => console.error('[ollama]', data.toString()));\n command.on('close', (code) => log.info('Ollama process exited', { code }));\n command.on('error', (error) => log.error('Ollama error', { error }));\n const child = yield* Effect.promise(() => command.spawn());\n yield* Effect.addFinalizer(\n Effect.fn(function* () {\n yield* Effect.promise(() => child.kill());\n }),\n );\n log.info('Running ollama', { pid: child.pid });\n\n return {\n endpoint: OLLAMA_HOST,\n };\n }),\n );\n}\n\nconst OllamaSidecarModelResolver: Layer.Layer<AiModelResolver.AiModelResolver, never, OllamaSidecar> =\n Layer.unwrapEffect(\n Effect.gen(function* () {\n const { endpoint } = yield* OllamaSidecar;\n return OllamaResolver.make({\n endpoint,\n transformClient: HttpClient.withTracerPropagation(false),\n });\n }),\n ).pipe(Layer.provide(FetchHttpClient.layer));\n"],
|
|
5
|
+
"mappings": ";;;AAIA,YAAYA,qBAAqB;AACjC,YAAYC,gBAAgB;AAC5B,SAASC,eAAe;AACxB,YAAYC,aAAa;AACzB,YAAYC,YAAY;AACxB,YAAYC,WAAW;AACvB,YAAYC,oBAAoB;AAGhC,SAASC,sBAAsB;AAC/B,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAChC,SAASC,WAAW;AAEpB,IAAA,eAAA;kBAOUC;qBAEN,WAAA,WAAA,MAAA,YAAA,MAAA;AACA,QAAMC,UAAqBC,oBAAAA,cACjBC,SAAAA;AASZ,QAAA,eAAA,oBAAA,QAAA,cAAA,KAAA,WAAA,CAAA,OAAA,GAAA,QAAA,KAAA,aAAA,aAAA,CAAA,CAAA,CAAA,CAAA;AAEIC,SAAAA,WAAAA,YAA8BC,gBAAI,iBAAA,2BAAA,KAAA,cAAA,YAAA,CAAA,GAAA,MAAA,kBAAA,MAAA,QAAA,QAAA,CAAA,CAAA;AAMtC,CAAA,CAAA;iDAG4BC,YAAQ,mCAAkB,EAAA,EAAA;qBAAC,aAAA,gBAAA,WAAA,aAAA;UAAU,UAAA,QAAA,QAAA,kBAAA;MAC3DC;;WAEEC;QACF;QACF,gBAAA;MAEA;IACA,CAAA;AAGAC,YAAQC,OAAOC,GAAG,QAAQ,CAACC,SAASC,QAAQC,IAAAA,YAAM,KAAYF,SAAKG,CAAQ,CAAA;YACTC,OAAAA,GAAAA,QAAAA,CAAAA,SAAAA,QAAAA,MAAAA,YAAAA,KAAAA,SAAAA,CAAAA,CAAAA;YAAK,GAAA,SAAA,CAAA,SAAA,IAAA,KAAA,yBAAA;MAC/DL;qBAAmDG,YAAAA,GAAAA,cAAAA,GAAAA,IAAAA,GAAAA,KAAAA,CAAAA,CAAAA;YAAM,GAAA,SAAA,CAAA,UAAA,IAAA,MAAA,gBAAA;MAC3DG;IACN,GAAA,EAAOxB,YAAOyB,YACZzB,GAAAA,cAAU,GAAA,IAAA,GAAA,KAAA,CAAA,CAAA;UACR,QAAOA,OAAe,eAAY0B,MAAI,QAAA,MAAA,CAAA;AACxC,WAAA,oBAAA,UAAA,aAAA;AAEEC,aAAK,eAAA,MAAkB,MAAA,KAAA,CAAA;;AAAiB,QAAA,KAAA,kBAAA;MAE5C,KAAO,MAAA;qBACKC,YAAAA,GAAAA,cAAAA,GAAAA,IAAAA,GAAAA,KAAAA,CAAAA;AACZ,WAAA;MAEF,UAAA;IACJ;EAEA,CAAA,CAAMC;;IAIA,6BAA2B,mBAAA,WAAA,aAAA;QACzBC,EAAAA,SAAAA,IAAAA,OAAAA;SACAC,eAAiBlC,KAAAA;IACnB;IAEE,iBAAeD,iCAAqB,KAAA;;;",
|
|
6
|
+
"names": ["FetchHttpClient", "HttpClient", "Command", "Context", "Effect", "Layer", "ManagedRuntime", "OllamaResolver", "Capability", "AppCapabilities", "log", "runtime", "sidecarLayer", "effectContext", "runtimeEffect", "OllamaSidecar", "Tag", "sidecar", "env", "OLLAMA_ORIGINS", "command", "stderr", "on", "data", "console", "error", "toString", "code", "child", "addFinalizer", "kill", "info", "OLLAMA_HOST", "OllamaSidecarModelResolver", "endpoint", "transformClient"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
meta
|
|
3
|
+
} from "./chunk-BJW75IOZ.mjs";
|
|
4
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
5
|
+
|
|
6
|
+
// src/plugin.ts
|
|
7
|
+
import { Plugin } from "@dxos/app-framework";
|
|
8
|
+
var NativePlugin = Plugin.lazy(meta, () => import("#plugin"));
|
|
9
|
+
export {
|
|
10
|
+
NativePlugin
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=plugin.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/plugin.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport const NativePlugin = Plugin.lazy(meta, () => import('#plugin'));\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,SAASA,cAAc;AAIhB,IAAMC,eAAeC,OAAOC,KAAKC,MAAM,MAAM,OAAO,SAAA,CAAA;",
|
|
6
|
+
"names": ["Plugin", "NativePlugin", "Plugin", "lazy", "meta"]
|
|
7
|
+
}
|