tauri-plugin-modular-agent-api 0.12.0 → 0.13.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/README.md CHANGED
@@ -1 +1 @@
1
- # Tauri Plugin for Modular Agent Kit
1
+ # Tauri Plugin for Modular Agent
package/dist-js/index.cjs CHANGED
@@ -6,21 +6,12 @@ var core = require('@tauri-apps/api/core');
6
6
  async function newPreset() {
7
7
  return await core.invoke("plugin:modular-agent|new_preset", {});
8
8
  }
9
- // export async function renamePreset(
10
- // id: string,
11
- // name: string
12
- // ): Promise<string> {
13
- // return await invoke<any>("plugin:modular-agent|rename_preset", {
14
- // id,
15
- // name,
16
- // });
17
- // }
18
- // export async function uniquePresetName(name: string): Promise<string> {
19
- // return await invoke<any>("plugin:modular-agent|unique_preset_name", { name });
20
- // }
21
9
  async function addPreset(spec) {
22
10
  return await core.invoke("plugin:modular-agent|add_preset", { spec });
23
11
  }
12
+ async function addPresetWithName(spec, name) {
13
+ return await core.invoke("plugin:modular-agent|add_preset_with_name", { spec, name });
14
+ }
24
15
  async function removePreset(id) {
25
16
  await core.invoke("plugin:modular-agent|remove_preset", { id });
26
17
  }
@@ -30,20 +21,11 @@ async function startPreset(id) {
30
21
  async function stopPreset(id) {
31
22
  await core.invoke("plugin:modular-agent|stop_preset", { id });
32
23
  }
33
- async function openPresetFromFile(path) {
34
- return await core.invoke("plugin:modular-agent|open_preset_from_file", { path });
35
- }
36
- async function savePreset(id) {
37
- await core.invoke("plugin:modular-agent|save_preset", { id });
38
- }
39
- async function savePresetAs(id, path) {
40
- await core.invoke("plugin:modular-agent|save_preset_as", { id, path });
41
- }
42
- async function getPresetFileName(id) {
43
- return await core.invoke("plugin:modular-agent|get_preset_file_name", { id });
24
+ async function openPresetFromFile(path, name) {
25
+ return await core.invoke("plugin:modular-agent|open_preset_from_file", { path, name });
44
26
  }
45
- async function setPresetFileName(id, fileName) {
46
- await core.invoke("plugin:modular-agent|set_preset_file_name", { id, fileName });
27
+ async function savePreset(id, path) {
28
+ await core.invoke("plugin:modular-agent|save_preset", { id, path });
47
29
  }
48
30
  async function getPresetSpec(id) {
49
31
  return await core.invoke("plugin:modular-agent|get_preset_spec", { id });
@@ -142,12 +124,12 @@ exports.addAgent = addAgent;
142
124
  exports.addAgentsAndConnections = addAgentsAndConnections;
143
125
  exports.addConnection = addConnection;
144
126
  exports.addPreset = addPreset;
127
+ exports.addPresetWithName = addPresetWithName;
145
128
  exports.getAgentDefinition = getAgentDefinition;
146
129
  exports.getAgentDefinitions = getAgentDefinitions;
147
130
  exports.getAgentSpec = getAgentSpec;
148
131
  exports.getGlobalConfigs = getGlobalConfigs;
149
132
  exports.getGlobalConfigsMap = getGlobalConfigsMap;
150
- exports.getPresetFileName = getPresetFileName;
151
133
  exports.getPresetInfo = getPresetInfo;
152
134
  exports.getPresetInfos = getPresetInfos;
153
135
  exports.getPresetSpec = getPresetSpec;
@@ -158,11 +140,9 @@ exports.removeAgent = removeAgent;
158
140
  exports.removeConnection = removeConnection;
159
141
  exports.removePreset = removePreset;
160
142
  exports.savePreset = savePreset;
161
- exports.savePresetAs = savePresetAs;
162
143
  exports.setAgentConfigs = setAgentConfigs;
163
144
  exports.setGlobalConfigs = setGlobalConfigs;
164
145
  exports.setGlobalConfigsMap = setGlobalConfigsMap;
165
- exports.setPresetFileName = setPresetFileName;
166
146
  exports.startAgent = startAgent;
167
147
  exports.startPreset = startPreset;
168
148
  exports.stopAgent = stopAgent;
@@ -63,14 +63,12 @@ export type BoardMessage = {
63
63
  };
64
64
  export declare function newPreset(): Promise<[string, string]>;
65
65
  export declare function addPreset(spec: PresetSpec): Promise<string>;
66
+ export declare function addPresetWithName(spec: PresetSpec, name: string): Promise<string>;
66
67
  export declare function removePreset(id: string): Promise<void>;
67
68
  export declare function startPreset(id: string): Promise<void>;
68
69
  export declare function stopPreset(id: string): Promise<void>;
69
- export declare function openPresetFromFile(path: string): Promise<string>;
70
- export declare function savePreset(id: string): Promise<void>;
71
- export declare function savePresetAs(id: string, path: string): Promise<void>;
72
- export declare function getPresetFileName(id: string): Promise<string | null>;
73
- export declare function setPresetFileName(id: string, fileName: string): Promise<void>;
70
+ export declare function openPresetFromFile(path: string, name?: string | null): Promise<string>;
71
+ export declare function savePreset(id: string, path: string): Promise<void>;
74
72
  export declare function getPresetSpec(id: string): Promise<PresetSpec | null>;
75
73
  export declare function updatePresetSpec(id: string, value: Partial<PresetSpec>): Promise<void>;
76
74
  export declare function getPresetInfo(id: string): Promise<PresetInfo | null>;
package/dist-js/index.js CHANGED
@@ -4,21 +4,12 @@ import { invoke } from '@tauri-apps/api/core';
4
4
  async function newPreset() {
5
5
  return await invoke("plugin:modular-agent|new_preset", {});
6
6
  }
7
- // export async function renamePreset(
8
- // id: string,
9
- // name: string
10
- // ): Promise<string> {
11
- // return await invoke<any>("plugin:modular-agent|rename_preset", {
12
- // id,
13
- // name,
14
- // });
15
- // }
16
- // export async function uniquePresetName(name: string): Promise<string> {
17
- // return await invoke<any>("plugin:modular-agent|unique_preset_name", { name });
18
- // }
19
7
  async function addPreset(spec) {
20
8
  return await invoke("plugin:modular-agent|add_preset", { spec });
21
9
  }
10
+ async function addPresetWithName(spec, name) {
11
+ return await invoke("plugin:modular-agent|add_preset_with_name", { spec, name });
12
+ }
22
13
  async function removePreset(id) {
23
14
  await invoke("plugin:modular-agent|remove_preset", { id });
24
15
  }
@@ -28,20 +19,11 @@ async function startPreset(id) {
28
19
  async function stopPreset(id) {
29
20
  await invoke("plugin:modular-agent|stop_preset", { id });
30
21
  }
31
- async function openPresetFromFile(path) {
32
- return await invoke("plugin:modular-agent|open_preset_from_file", { path });
33
- }
34
- async function savePreset(id) {
35
- await invoke("plugin:modular-agent|save_preset", { id });
36
- }
37
- async function savePresetAs(id, path) {
38
- await invoke("plugin:modular-agent|save_preset_as", { id, path });
39
- }
40
- async function getPresetFileName(id) {
41
- return await invoke("plugin:modular-agent|get_preset_file_name", { id });
22
+ async function openPresetFromFile(path, name) {
23
+ return await invoke("plugin:modular-agent|open_preset_from_file", { path, name });
42
24
  }
43
- async function setPresetFileName(id, fileName) {
44
- await invoke("plugin:modular-agent|set_preset_file_name", { id, fileName });
25
+ async function savePreset(id, path) {
26
+ await invoke("plugin:modular-agent|save_preset", { id, path });
45
27
  }
46
28
  async function getPresetSpec(id) {
47
29
  return await invoke("plugin:modular-agent|get_preset_spec", { id });
@@ -136,4 +118,4 @@ async function setGlobalConfigsMap(configs) {
136
118
  await invoke("plugin:modular-agent|set_global_configs_map", { configs });
137
119
  }
138
120
 
139
- export { addAgent, addAgentsAndConnections, addConnection, addPreset, getAgentDefinition, getAgentDefinitions, getAgentSpec, getGlobalConfigs, getGlobalConfigsMap, getPresetFileName, getPresetInfo, getPresetInfos, getPresetSpec, newAgentSpec, newPreset, openPresetFromFile, removeAgent, removeConnection, removePreset, savePreset, savePresetAs, setAgentConfigs, setGlobalConfigs, setGlobalConfigsMap, setPresetFileName, startAgent, startPreset, stopAgent, stopPreset, updateAgentSpec, updatePresetSpec, writeBoard };
121
+ export { addAgent, addAgentsAndConnections, addConnection, addPreset, addPresetWithName, getAgentDefinition, getAgentDefinitions, getAgentSpec, getGlobalConfigs, getGlobalConfigsMap, getPresetInfo, getPresetInfos, getPresetSpec, newAgentSpec, newPreset, openPresetFromFile, removeAgent, removeConnection, removePreset, savePreset, setAgentConfigs, setGlobalConfigs, setGlobalConfigsMap, startAgent, startPreset, stopAgent, stopPreset, updateAgentSpec, updatePresetSpec, writeBoard };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "tauri-plugin-modular-agent-api",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "license": "MIT OR Apache-2.0",
5
5
  "author": "Akira Ishino",
6
- "description": "Tauri plugin for Modular Agent Kit",
6
+ "description": "Tauri plugin for Modular Agent",
7
7
  "type": "module",
8
8
  "types": "./dist-js/index.d.ts",
9
9
  "main": "./dist-js/index.cjs",