@7n/tauri-components 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7n/tauri-components",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "description": "Shared LLM agent engine + Vue/Quasar UI for Tauri apps (chat, journal, trust-tier approval).",
6
6
  "license": "MIT",
@@ -1,17 +1,18 @@
1
1
  import { invoke } from '@tauri-apps/api/core'
2
2
 
3
- // Webview journal store: routes journal FS through Rust Tauri commands
4
- // (journal_*), provided by the shared `tauri-plugin-agent` (see SPEC §6). Same
5
- // shape any other store implements, so agent-handler stays backend-agnostic.
3
+ // Webview journal store: routes journal FS through the shared `tauri-plugin-agent`
4
+ // commands (`plugin:agent|journal_*`, see SPEC §6). Same shape any other store
5
+ // implements, so agent-handler stays backend-agnostic. The host app must
6
+ // register the plugin and grant `agent:default`.
6
7
 
7
8
  /**
8
9
  * @returns {{ create: (r:object)=>Promise<string>, load: (id:string)=>Promise<object>, update: (id:string,patch:object)=>Promise<void>, list: ()=>Promise<object[]> }} journal store
9
10
  */
10
11
  export function createTauriJournalStore() {
11
12
  return {
12
- create: ({ intent, actor }) => invoke('journal_create', { intent, actor }),
13
- load: id => invoke('journal_load', { id }),
14
- update: (id, patch) => invoke('journal_update', { id, patch }),
15
- list: () => invoke('journal_list'),
13
+ create: ({ intent, actor }) => invoke('plugin:agent|journal_create', { intent, actor }),
14
+ load: id => invoke('plugin:agent|journal_load', { id }),
15
+ update: (id, patch) => invoke('plugin:agent|journal_update', { id, patch }),
16
+ list: () => invoke('plugin:agent|journal_list'),
16
17
  }
17
18
  }
@@ -36,7 +36,7 @@ export function useOmlx({ storagePrefix = 'agent', defaultBaseUrl = DEFAULT_BASE
36
36
  async function loadEnv() {
37
37
  let env
38
38
  try {
39
- env = await invoke('omlx_config')
39
+ env = await invoke('plugin:agent|omlx_config')
40
40
  }
41
41
  catch {
42
42
  return // not running under Tauri — keep localStorage / defaults