@dxos/plugin-native 0.8.4-main.406dc2a → 0.8.4-main.548089c

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.
@@ -0,0 +1,15 @@
1
+ // src/meta.ts
2
+ import { trim } from "@dxos/util";
3
+ var meta = {
4
+ id: "dxos.org/plugin/native",
5
+ name: "Native",
6
+ description: trim`
7
+ Native platform integration providing desktop-specific features and system-level capabilities.
8
+ Access native file dialogs, notifications, and OS integrations.
9
+ `
10
+ };
11
+
12
+ export {
13
+ meta
14
+ };
15
+ //# sourceMappingURL=chunk-SP3MEGKI.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 PluginMeta } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: PluginMeta = {\n id: 'dxos.org/plugin/native',\n name: 'Native',\n description: trim`\n Native platform integration providing desktop-specific features and system-level capabilities.\n Access native file dialogs, notifications, and OS integrations.\n `,\n};\n"],
5
+ "mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAmB;EAC9BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;AAIf;",
6
+ "names": ["trim", "meta", "id", "name", "description", "trim"]
7
+ }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  meta
3
- } from "./chunk-HFW3KCZU.mjs";
3
+ } from "./chunk-SP3MEGKI.mjs";
4
4
 
5
5
  // src/NativePlugin.tsx
6
6
  import { Capabilities, Events, contributes, defineModule, definePlugin } from "@dxos/app-framework";
@@ -8,8 +8,8 @@ import { AssistantEvents } from "@dxos/plugin-assistant";
8
8
 
9
9
  // src/capabilities/index.ts
10
10
  import { lazy } from "@dxos/app-framework";
11
- var Ollama = lazy(() => import("./ollama-FWIW4XTL.mjs"));
12
- var Updater = lazy(() => import("./updater-3XUIXC4F.mjs"));
11
+ var Ollama = lazy(() => import("./ollama-CQE7ZIWL.mjs"));
12
+ var Updater = lazy(() => import("./updater-SDBPTCXA.mjs"));
13
13
  var Window = lazy(() => import("./window-6G542FZL.mjs"));
14
14
 
15
15
  // src/translations.ts
@@ -1 +1 @@
1
- {"inputs":{"src/meta.ts":{"bytes":742,"imports":[],"format":"esm"},"src/capabilities/ollama.ts":{"bytes":10398,"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/AiServiceRouter","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/updater.ts":{"bytes":12408,"imports":[{"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/Function","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/log","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/capabilities/window.ts":{"bytes":5689,"imports":[{"path":"@tauri-apps/api/window","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1148,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/ollama.ts","kind":"dynamic-import","original":"./ollama"},{"path":"src/capabilities/updater.ts","kind":"dynamic-import","original":"./updater"},{"path":"src/capabilities/window.ts","kind":"dynamic-import","original":"./window"}],"format":"esm"},"src/translations.ts":{"bytes":1625,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/NativePlugin.tsx":{"bytes":3973,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-assistant","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":549,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/NativePlugin.tsx","kind":"import-statement","original":"./NativePlugin"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3100},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-HFW3KCZU.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-assistant","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/ollama-FWIW4XTL.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/updater-3XUIXC4F.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/window-6G542FZL.mjs","kind":"dynamic-import"}],"exports":["NativePlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/NativePlugin.tsx":{"bytesInOutput":771},"src/capabilities/index.ts":{"bytesInOutput":220},"src/translations.ts":{"bytesInOutput":293}},"bytes":1505},"dist/lib/browser/ollama-FWIW4XTL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5127},"dist/lib/browser/ollama-FWIW4XTL.mjs":{"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/AiServiceRouter","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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":2808}},"bytes":2923},"dist/lib/browser/updater-3XUIXC4F.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5657},"dist/lib/browser/updater-3XUIXC4F.mjs":{"imports":[{"path":"dist/lib/browser/chunk-HFW3KCZU.mjs","kind":"import-statement"},{"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/Function","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/log","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/updater.ts","inputs":{"src/capabilities/updater.ts":{"bytesInOutput":3611}},"bytes":3777},"dist/lib/browser/chunk-HFW3KCZU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":370},"dist/lib/browser/chunk-HFW3KCZU.mjs":{"imports":[],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":65}},"bytes":144},"dist/lib/browser/window-6G542FZL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2974},"dist/lib/browser/window-6G542FZL.mjs":{"imports":[{"path":"@tauri-apps/api/window","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/window.ts","inputs":{"src/capabilities/window.ts":{"bytesInOutput":1214}},"bytes":1329}}}
1
+ {"inputs":{"src/meta.ts":{"bytes":1396,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/ollama.ts":{"bytes":10161,"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/AiServiceRouter","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/updater.ts":{"bytes":12408,"imports":[{"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/Function","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/log","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/capabilities/window.ts":{"bytes":5689,"imports":[{"path":"@tauri-apps/api/window","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1148,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/ollama.ts","kind":"dynamic-import","original":"./ollama"},{"path":"src/capabilities/updater.ts","kind":"dynamic-import","original":"./updater"},{"path":"src/capabilities/window.ts","kind":"dynamic-import","original":"./window"}],"format":"esm"},"src/translations.ts":{"bytes":1625,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/NativePlugin.tsx":{"bytes":3973,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-assistant","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":549,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/NativePlugin.tsx","kind":"import-statement","original":"./NativePlugin"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3100},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-SP3MEGKI.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-assistant","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/ollama-CQE7ZIWL.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/updater-SDBPTCXA.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/window-6G542FZL.mjs","kind":"dynamic-import"}],"exports":["NativePlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/NativePlugin.tsx":{"bytesInOutput":771},"src/capabilities/index.ts":{"bytesInOutput":220},"src/translations.ts":{"bytesInOutput":293}},"bytes":1505},"dist/lib/browser/ollama-CQE7ZIWL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5092},"dist/lib/browser/ollama-CQE7ZIWL.mjs":{"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/AiServiceRouter","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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":2600}},"bytes":2715},"dist/lib/browser/updater-SDBPTCXA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5657},"dist/lib/browser/updater-SDBPTCXA.mjs":{"imports":[{"path":"dist/lib/browser/chunk-SP3MEGKI.mjs","kind":"import-statement"},{"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/Function","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/log","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/updater.ts","inputs":{"src/capabilities/updater.ts":{"bytesInOutput":3611}},"bytes":3777},"dist/lib/browser/chunk-SP3MEGKI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":665},"dist/lib/browser/chunk-SP3MEGKI.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":293}},"bytes":372},"dist/lib/browser/window-6G542FZL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2974},"dist/lib/browser/window-6G542FZL.mjs":{"imports":[{"path":"@tauri-apps/api/window","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/window.ts","inputs":{"src/capabilities/window.ts":{"bytesInOutput":1214}},"bytes":1329}}}
@@ -9,19 +9,6 @@ import * as ManagedRuntime from "effect/ManagedRuntime";
9
9
  import * as AiServiceRouter from "@dxos/ai/AiServiceRouter";
10
10
  import { Capabilities, contributes } from "@dxos/app-framework";
11
11
  import { log } from "@dxos/log";
12
- function _define_property(obj, key, value) {
13
- if (key in obj) {
14
- Object.defineProperty(obj, key, {
15
- value,
16
- enumerable: true,
17
- configurable: true,
18
- writable: true
19
- });
20
- } else {
21
- obj[key] = value;
22
- }
23
- return obj;
24
- }
25
12
  var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-native/src/capabilities/ollama.ts";
26
13
  var OLLAMA_HOST = "http://localhost:21434";
27
14
  var ollama_default = ((_context) => {
@@ -31,52 +18,51 @@ var ollama_default = ((_context) => {
31
18
  await runtime.dispose();
32
19
  });
33
20
  });
34
- var _Context_Tag;
35
- var OllamaSidecar = class extends (_Context_Tag = Context.Tag("@dxos/plugin-native/OllamaSidecar")()) {
36
- };
37
- _define_property(OllamaSidecar, "layerLive", Layer.scoped(OllamaSidecar, Effect.gen(function* () {
38
- const command = Command.sidecar("sidecar/ollama", [
39
- "serve"
40
- ], {
41
- env: {
42
- OLLAMA_HOST,
43
- OLLAMA_ORIGINS: "*"
44
- }
45
- });
46
- command.stdout.on("data", (data) => console.log("[ollama]", data.toString()));
47
- command.stderr.on("data", (data) => console.error("[ollama]", data.toString()));
48
- command.on("close", (code) => log.info("Ollama process exited", {
49
- code
50
- }, {
51
- F: __dxlog_file,
52
- L: 56,
53
- S: this,
54
- C: (f, a) => f(...a)
55
- }));
56
- command.on("error", (error) => log.error("Ollama error", {
57
- error
58
- }, {
59
- F: __dxlog_file,
60
- L: 57,
61
- S: this,
62
- C: (f, a) => f(...a)
63
- }));
64
- const child = yield* Effect.promise(() => command.spawn());
65
- yield* Effect.addFinalizer(Effect.fn(function* () {
66
- yield* Effect.promise(() => child.kill());
21
+ var OllamaSidecar = class _OllamaSidecar extends Context.Tag("@dxos/plugin-native/OllamaSidecar")() {
22
+ static layerLive = Layer.scoped(_OllamaSidecar, Effect.gen(function* () {
23
+ const command = Command.sidecar("sidecar/ollama", [
24
+ "serve"
25
+ ], {
26
+ env: {
27
+ OLLAMA_HOST,
28
+ OLLAMA_ORIGINS: "*"
29
+ }
30
+ });
31
+ command.stdout.on("data", (data) => console.log("[ollama]", data.toString()));
32
+ command.stderr.on("data", (data) => console.error("[ollama]", data.toString()));
33
+ command.on("close", (code) => log.info("Ollama process exited", {
34
+ code
35
+ }, {
36
+ F: __dxlog_file,
37
+ L: 56,
38
+ S: this,
39
+ C: (f, a) => f(...a)
40
+ }));
41
+ command.on("error", (error) => log.error("Ollama error", {
42
+ error
43
+ }, {
44
+ F: __dxlog_file,
45
+ L: 57,
46
+ S: this,
47
+ C: (f, a) => f(...a)
48
+ }));
49
+ const child = yield* Effect.promise(() => command.spawn());
50
+ yield* Effect.addFinalizer(Effect.fn(function* () {
51
+ yield* Effect.promise(() => child.kill());
52
+ }));
53
+ log.info("Running ollama", {
54
+ pid: child.pid
55
+ }, {
56
+ F: __dxlog_file,
57
+ L: 64,
58
+ S: this,
59
+ C: (f, a) => f(...a)
60
+ });
61
+ return {
62
+ endpoint: OLLAMA_HOST
63
+ };
67
64
  }));
68
- log.info("Running ollama", {
69
- pid: child.pid
70
- }, {
71
- F: __dxlog_file,
72
- L: 64,
73
- S: this,
74
- C: (f, a) => f(...a)
75
- });
76
- return {
77
- endpoint: OLLAMA_HOST
78
- };
79
- })));
65
+ };
80
66
  var OllamaSidecarModelResolver = Layer.unwrapEffect(Effect.gen(function* () {
81
67
  const { endpoint } = yield* OllamaSidecar;
82
68
  return AiServiceRouter.OllamaResolver({
@@ -87,4 +73,4 @@ var OllamaSidecarModelResolver = Layer.unwrapEffect(Effect.gen(function* () {
87
73
  export {
88
74
  ollama_default as default
89
75
  };
90
- //# sourceMappingURL=ollama-FWIW4XTL.mjs.map
76
+ //# sourceMappingURL=ollama-CQE7ZIWL.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/capabilities/ollama.ts"],
4
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 * as AiServiceRouter from '@dxos/ai/AiServiceRouter';\nimport { Capabilities, type Capability, type PluginContext, contributes } from '@dxos/app-framework';\nimport { log } from '@dxos/log';\n\n// Running ollama on non-standard port.\nconst OLLAMA_HOST = 'http://localhost:21434';\n\nexport default (_context: PluginContext): Capability<any> => {\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 contributes(\n Capabilities.AiModelResolver,\n OllamaSidecarModelResolver.pipe(Layer.provide(sidecarLayer)),\n async () => {\n await 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 command.stdout.on('data', (data) => console.log('[ollama]', data.toString()));\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<AiServiceRouter.AiModelResolver, never, OllamaSidecar> =\n Layer.unwrapEffect(\n Effect.gen(function* () {\n const { endpoint } = yield* OllamaSidecar;\n return AiServiceRouter.OllamaResolver({\n host: 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;AAEhC,YAAYC,qBAAqB;AACjC,SAASC,cAAmDC,mBAAmB;AAC/E,SAASC,WAAW;;;;;;;;;;;;;;;AAGpB,IAAMC,cAAc;AAEpB,IAAA,kBAAe,CAACC,aAAAA;AACd,QAAMC,UAAyBC,oBAAKC,cAAcC,SAAS;AAG3D,QAAMC,eAAqBC,oBACzBL,QAAQM,cAAcC,KAAYC,WAAI,CAACC,OAAOA,GAAGC,QAAQH,KAAaI,aAAKT,aAAAA,CAAAA,CAAAA,CAAAA,CAAAA;AAG7E,SAAON,YACLD,aAAaiB,iBACbC,2BAA2BN,KAAWO,cAAQV,YAAAA,CAAAA,GAC9C,YAAA;AACE,U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Q,MAAMD,MAAMK,KAAI,CAAA;IACxC,CAAA,CAAA;AAEFxC,QAAIkC,KAAK,kBAAkB;MAAEO,KAAKN,MAAMM;IAAI,GAAA;;;;;;AAE5C,WAAO;MACLC,UAAUzC;IACZ;EACF,CAAA,CAAA;AAEJ;AAEA,IAAMe,6BACE2B,mBACGtB,WAAI,aAAA;AACT,QAAM,EAAEqB,SAAQ,IAAK,OAAOrC;AAC5B,SAAuBuC,+BAAe;IACpCC,MAAMH;IACNI,iBAA4BC,iCAAsB,KAAA;EACpD,CAAA;AACF,CAAA,CAAA,EACArC,KAAWO,cAAwB+B,qBAAK,CAAA;",
6
6
  "names": ["FetchHttpClient", "HttpClient", "Command", "Context", "Effect", "Layer", "ManagedRuntime", "AiServiceRouter", "Capabilities", "contributes", "log", "OLLAMA_HOST", "_context", "runtime", "make", "OllamaSidecar", "layerLive", "sidecarLayer", "effectContext", "runtimeEffect", "pipe", "map", "rt", "context", "pick", "AiModelResolver", "OllamaSidecarModelResolver", "provide", "dispose", "Tag", "scoped", "gen", "command", "sidecar", "env", "OLLAMA_ORIGINS", "stdout", "on", "data", "console", "toString", "stderr", "error", "code", "info", "child", "promise", "spawn", "addFinalizer", "fn", "kill", "pid", "endpoint", "unwrapEffect", "OllamaResolver", "host", "transformClient", "withTracerPropagation", "layer"]
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  meta
3
- } from "./chunk-HFW3KCZU.mjs";
3
+ } from "./chunk-SP3MEGKI.mjs";
4
4
 
5
5
  // src/capabilities/updater.ts
6
6
  import { type } from "@tauri-apps/plugin-os";
@@ -135,4 +135,4 @@ var updater_default = ((context) => {
135
135
  export {
136
136
  updater_default as default
137
137
  };
138
- //# sourceMappingURL=updater-3XUIXC4F.mjs.map
138
+ //# sourceMappingURL=updater-SDBPTCXA.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAO,MAAM,IAAI,EAAE,UAGlB,CAAC"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,eAAO,MAAM,IAAI,EAAE,UAOlB,CAAC"}