tauri-plugin-askit-api 0.2.1 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-js/index.cjs CHANGED
@@ -68,36 +68,36 @@ async function stopAgent(agentId) {
68
68
  async function writeBoard(board, message) {
69
69
  await core.invoke('plugin:askit|write_board', { board, message });
70
70
  }
71
- // config
72
- async function setAgentConfig(agentId, config) {
73
- await core.invoke('plugin:askit|set_agent_config', { agentId, config });
71
+ // configs
72
+ async function setAgentConfigs(agentId, configs) {
73
+ await core.invoke('plugin:askit|set_agent_configs', { agentId, configs });
74
74
  }
75
- async function getGlobalConfig(defName) {
76
- return await core.invoke('plugin:askit|get_global_config', { defName });
75
+ async function getGlobalConfigs(defName) {
76
+ return await core.invoke('plugin:askit|get_global_configs', { defName });
77
77
  }
78
- async function getGlobalConfigs() {
79
- return await core.invoke('plugin:askit|get_global_configs', {});
78
+ async function getGlobalConfigsMap() {
79
+ return await core.invoke('plugin:askit|get_global_configs_map', {});
80
80
  }
81
- async function setGlobalConfig(defName, config) {
82
- await core.invoke('plugin:askit|set_global_config', { defName, config });
81
+ async function setGlobalConfigs(defName, configs) {
82
+ await core.invoke('plugin:askit|set_global_configs', { defName, configs });
83
83
  }
84
- async function setGlobalConfigs(configs) {
85
- await core.invoke('plugin:askit|set_global_configs', { configs });
84
+ async function setGlobalConfigsMap(configs) {
85
+ await core.invoke('plugin:askit|set_global_configs_map', { configs });
86
86
  }
87
- async function getAgentDefaultConfig(defName) {
88
- return await core.invoke('plugin:askit|get_agent_default_config', { defName });
87
+ async function getAgentDefaultConfigs(defName) {
88
+ return await core.invoke('plugin:askit|get_agent_default_configs', { defName });
89
89
  }
90
90
 
91
91
  exports.addAgentFlow = addAgentFlow;
92
92
  exports.addAgentFlowEdge = addAgentFlowEdge;
93
93
  exports.addAgentFlowNode = addAgentFlowNode;
94
94
  exports.copySubFlow = copySubFlow;
95
- exports.getAgentDefaultConfig = getAgentDefaultConfig;
95
+ exports.getAgentDefaultConfigs = getAgentDefaultConfigs;
96
96
  exports.getAgentDefinition = getAgentDefinition;
97
97
  exports.getAgentDefinitions = getAgentDefinitions;
98
98
  exports.getAgentFlows = getAgentFlows;
99
- exports.getGlobalConfig = getGlobalConfig;
100
99
  exports.getGlobalConfigs = getGlobalConfigs;
100
+ exports.getGlobalConfigsMap = getGlobalConfigsMap;
101
101
  exports.insertAgentFlow = insertAgentFlow;
102
102
  exports.newAgentFlow = newAgentFlow;
103
103
  exports.newAgentFlowNode = newAgentFlowNode;
@@ -105,9 +105,9 @@ exports.removeAgentFlow = removeAgentFlow;
105
105
  exports.removeAgentFlowEdge = removeAgentFlowEdge;
106
106
  exports.removeAgentFlowNode = removeAgentFlowNode;
107
107
  exports.renameAgentFlow = renameAgentFlow;
108
- exports.setAgentConfig = setAgentConfig;
109
- exports.setGlobalConfig = setGlobalConfig;
108
+ exports.setAgentConfigs = setAgentConfigs;
110
109
  exports.setGlobalConfigs = setGlobalConfigs;
110
+ exports.setGlobalConfigsMap = setGlobalConfigsMap;
111
111
  exports.startAgent = startAgent;
112
112
  exports.startAgentFlow = startAgentFlow;
113
113
  exports.stopAgent = stopAgent;
@@ -1,5 +1,5 @@
1
1
  export type AgentDefinitions = Record<string, AgentDefinition>;
2
- export type AgentGlobalConfigs = Record<string, AgentConfigs>;
2
+ export type AgentGlobalConfigsMap = Record<string, AgentConfigs>;
3
3
  export type AgentDefinition = {
4
4
  kind: string;
5
5
  name: string;
@@ -9,12 +9,12 @@ export type AgentDefinition = {
9
9
  path: string;
10
10
  inputs: string[] | null;
11
11
  outputs: string[] | null;
12
- default_config: AgentDefaultConfig | null;
13
- global_config: AgentGlobalConfig | null;
14
- display_config: AgentDisplayConfig | null;
12
+ default_configs: AgentDefaultConfigs | null;
13
+ global_configs: AgentGlobalConfigs | null;
14
+ display_configs: AgentDisplayConfigs | null;
15
15
  };
16
- export type AgentDefaultConfig = [string, AgentConfigEntry][];
17
- export type AgentGlobalConfig = [string, AgentConfigEntry][];
16
+ export type AgentDefaultConfigs = [string, AgentConfigEntry][];
17
+ export type AgentGlobalConfigs = [string, AgentConfigEntry][];
18
18
  export type AgentConfigEntry = {
19
19
  value: any;
20
20
  type: AgentConfigValueType | null;
@@ -23,7 +23,7 @@ export type AgentConfigEntry = {
23
23
  hidden?: boolean | null;
24
24
  };
25
25
  export type AgentConfigValueType = "unit" | "boolean" | "integer" | "number" | "string" | "password" | "text" | "object";
26
- export type AgentDisplayConfig = [string, AgentDisplayConfigEntry][];
26
+ export type AgentDisplayConfigs = [string, AgentDisplayConfigEntry][];
27
27
  export type AgentDisplayConfigEntry = {
28
28
  type: AgentDisplayConfigType | null;
29
29
  title?: string | null;
@@ -38,13 +38,13 @@ export type AgentFlow = {
38
38
  name: string;
39
39
  viewport: Viewport | null;
40
40
  };
41
- export type AgentConfigs = Record<string, AgentConfig>;
42
- export type AgentConfig = Record<string, any>;
41
+ export type AgentConfigsMap = Record<string, AgentConfigs>;
42
+ export type AgentConfigs = Record<string, any>;
43
43
  export type AgentFlowNode = {
44
44
  id: string;
45
45
  def_name: string;
46
46
  enabled: boolean;
47
- config: AgentConfig | null;
47
+ configs: AgentConfigs | null;
48
48
  title: string | null;
49
49
  x: number;
50
50
  y: number;
@@ -72,6 +72,11 @@ export type Settings = {
72
72
  agents: Record<string, AgentDefinition>;
73
73
  agent_flows: AgentFlow[];
74
74
  };
75
+ export type ConfigMessage = {
76
+ agent_id: string;
77
+ key: string;
78
+ data: any;
79
+ };
75
80
  export type DisplayMessage = {
76
81
  agent_id: string;
77
82
  key: string;
@@ -105,9 +110,9 @@ export declare function removeAgentFlowEdge(flowName: string, edgeId: string): P
105
110
  export declare function startAgent(agentId: string): Promise<void>;
106
111
  export declare function stopAgent(agentId: string): Promise<void>;
107
112
  export declare function writeBoard(board: string, message: string): Promise<void>;
108
- export declare function setAgentConfig(agentId: string, config: Record<string, any>): Promise<void>;
109
- export declare function getGlobalConfig(defName: string): Promise<AgentConfig | null>;
110
- export declare function getGlobalConfigs(): Promise<AgentConfigs>;
111
- export declare function setGlobalConfig(defName: string, config: AgentConfig): Promise<void>;
112
- export declare function setGlobalConfigs(configs: AgentConfigs): Promise<void>;
113
- export declare function getAgentDefaultConfig(defName: string): Promise<AgentDefaultConfig | null>;
113
+ export declare function setAgentConfigs(agentId: string, configs: Record<string, any>): Promise<void>;
114
+ export declare function getGlobalConfigs(defName: string): Promise<AgentConfigs | null>;
115
+ export declare function getGlobalConfigsMap(): Promise<AgentConfigsMap>;
116
+ export declare function setGlobalConfigs(defName: string, configs: AgentConfigs): Promise<void>;
117
+ export declare function setGlobalConfigsMap(configs: AgentConfigsMap): Promise<void>;
118
+ export declare function getAgentDefaultConfigs(defName: string): Promise<AgentDefaultConfigs | null>;
package/dist-js/index.js CHANGED
@@ -66,24 +66,24 @@ async function stopAgent(agentId) {
66
66
  async function writeBoard(board, message) {
67
67
  await invoke('plugin:askit|write_board', { board, message });
68
68
  }
69
- // config
70
- async function setAgentConfig(agentId, config) {
71
- await invoke('plugin:askit|set_agent_config', { agentId, config });
69
+ // configs
70
+ async function setAgentConfigs(agentId, configs) {
71
+ await invoke('plugin:askit|set_agent_configs', { agentId, configs });
72
72
  }
73
- async function getGlobalConfig(defName) {
74
- return await invoke('plugin:askit|get_global_config', { defName });
73
+ async function getGlobalConfigs(defName) {
74
+ return await invoke('plugin:askit|get_global_configs', { defName });
75
75
  }
76
- async function getGlobalConfigs() {
77
- return await invoke('plugin:askit|get_global_configs', {});
76
+ async function getGlobalConfigsMap() {
77
+ return await invoke('plugin:askit|get_global_configs_map', {});
78
78
  }
79
- async function setGlobalConfig(defName, config) {
80
- await invoke('plugin:askit|set_global_config', { defName, config });
79
+ async function setGlobalConfigs(defName, configs) {
80
+ await invoke('plugin:askit|set_global_configs', { defName, configs });
81
81
  }
82
- async function setGlobalConfigs(configs) {
83
- await invoke('plugin:askit|set_global_configs', { configs });
82
+ async function setGlobalConfigsMap(configs) {
83
+ await invoke('plugin:askit|set_global_configs_map', { configs });
84
84
  }
85
- async function getAgentDefaultConfig(defName) {
86
- return await invoke('plugin:askit|get_agent_default_config', { defName });
85
+ async function getAgentDefaultConfigs(defName) {
86
+ return await invoke('plugin:askit|get_agent_default_configs', { defName });
87
87
  }
88
88
 
89
- export { addAgentFlow, addAgentFlowEdge, addAgentFlowNode, copySubFlow, getAgentDefaultConfig, getAgentDefinition, getAgentDefinitions, getAgentFlows, getGlobalConfig, getGlobalConfigs, insertAgentFlow, newAgentFlow, newAgentFlowNode, removeAgentFlow, removeAgentFlowEdge, removeAgentFlowNode, renameAgentFlow, setAgentConfig, setGlobalConfig, setGlobalConfigs, startAgent, startAgentFlow, stopAgent, stopAgentFlow, uniqueFlowName, writeBoard };
89
+ export { addAgentFlow, addAgentFlowEdge, addAgentFlowNode, copySubFlow, getAgentDefaultConfigs, getAgentDefinition, getAgentDefinitions, getAgentFlows, getGlobalConfigs, getGlobalConfigsMap, insertAgentFlow, newAgentFlow, newAgentFlowNode, removeAgentFlow, removeAgentFlowEdge, removeAgentFlowNode, renameAgentFlow, setAgentConfigs, setGlobalConfigs, setGlobalConfigsMap, startAgent, startAgentFlow, stopAgent, stopAgentFlow, uniqueFlowName, writeBoard };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tauri-plugin-askit-api",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
4
4
  "license": "MIT OR Apache-2.0",
5
5
  "author": "Akira Ishino",
6
6
  "description": "Tauri plugin for Agent Stream Kit",