tauri-plugin-askit-api 0.4.1 → 0.5.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/dist-js/index.cjs CHANGED
@@ -16,8 +16,8 @@ async function getAgentFlows() {
16
16
  async function newAgentFlow(flowName) {
17
17
  return await core.invoke('plugin:askit|new_agent_flow', { flowName });
18
18
  }
19
- async function renameAgentFlow(oldName, newName) {
20
- return await core.invoke('plugin:askit|rename_agent_flow', { oldName, newName });
19
+ async function renameAgentFlow(flowId, newName) {
20
+ return await core.invoke('plugin:askit|rename_agent_flow', { flowId, newName });
21
21
  }
22
22
  async function uniqueFlowName(name) {
23
23
  return await core.invoke('plugin:askit|unique_flow_name', { name });
@@ -25,8 +25,8 @@ async function uniqueFlowName(name) {
25
25
  async function addAgentFlow(agentFlow) {
26
26
  await core.invoke('plugin:askit|add_agent_flow', { agentFlow });
27
27
  }
28
- async function removeAgentFlow(flowName) {
29
- await core.invoke('plugin:askit|remove_agent_flow', { flowName });
28
+ async function removeAgentFlow(id) {
29
+ await core.invoke('plugin:askit|remove_agent_flow', { id });
30
30
  }
31
31
  async function insertAgentFlow(agentFlow) {
32
32
  await core.invoke('plugin:askit|insert_agent_flow', { agentFlow });
@@ -34,28 +34,28 @@ async function insertAgentFlow(agentFlow) {
34
34
  async function copySubFlow(nodes, edges) {
35
35
  return await core.invoke('plugin:askit|copy_sub_flow', { nodes, edges });
36
36
  }
37
- async function startAgentFlow(flowName) {
38
- await core.invoke('plugin:askit|start_agent_flow', { flowName });
37
+ async function startAgentFlow(id) {
38
+ await core.invoke('plugin:askit|start_agent_flow', { id });
39
39
  }
40
- async function stopAgentFlow(flowName) {
41
- await core.invoke('plugin:askit|stop_agent_flow', { flowName });
40
+ async function stopAgentFlow(id) {
41
+ await core.invoke('plugin:askit|stop_agent_flow', { id });
42
42
  }
43
43
  // nodes
44
44
  async function newAgentFlowNode(defName) {
45
45
  return await core.invoke('plugin:askit|new_agent_flow_node', { defName });
46
46
  }
47
- async function addAgentFlowNode(flowName, node) {
48
- await core.invoke('plugin:askit|add_agent_flow_node', { flowName, node });
47
+ async function addAgentFlowNode(flowId, node) {
48
+ await core.invoke('plugin:askit|add_agent_flow_node', { flowId, node });
49
49
  }
50
- async function removeAgentFlowNode(flowName, nodeId) {
51
- await core.invoke('plugin:askit|remove_agent_flow_node', { flowName, nodeId });
50
+ async function removeAgentFlowNode(flowId, nodeId) {
51
+ await core.invoke('plugin:askit|remove_agent_flow_node', { flowId, nodeId });
52
52
  }
53
53
  // edge
54
- async function addAgentFlowEdge(flowName, edge) {
55
- await core.invoke('plugin:askit|add_agent_flow_edge', { flowName, edge });
54
+ async function addAgentFlowEdge(flowId, edge) {
55
+ await core.invoke('plugin:askit|add_agent_flow_edge', { flowId, edge });
56
56
  }
57
- async function removeAgentFlowEdge(flowName, edgeId) {
58
- await core.invoke('plugin:askit|remove_agent_flow_edge', { flowName, edgeId });
57
+ async function removeAgentFlowEdge(flowId, edgeId) {
58
+ await core.invoke('plugin:askit|remove_agent_flow_edge', { flowId, edgeId });
59
59
  }
60
60
  // agent
61
61
  async function startAgent(agentId) {
@@ -33,9 +33,10 @@ export type AgentDisplayConfigEntry = {
33
33
  export type AgentDisplayConfigType = "*" | "boolean" | "integer" | "number" | "string" | "text" | "object" | "messages";
34
34
  export type AgentFlows = Record<string, AgentFlow>;
35
35
  export type AgentFlow = {
36
+ id: string;
37
+ name: string;
36
38
  nodes: AgentFlowNode[];
37
39
  edges: AgentFlowEdge[];
38
- name: string;
39
40
  viewport: Viewport | null;
40
41
  };
41
42
  export type AgentConfigsMap = Record<string, AgentConfigs>;
@@ -94,19 +95,19 @@ export declare function getAgentDefinition(): Promise<AgentDefinition | null>;
94
95
  export declare function getAgentDefinitions(): Promise<AgentDefinitions>;
95
96
  export declare function getAgentFlows(): Promise<AgentFlows>;
96
97
  export declare function newAgentFlow(flowName: string): Promise<AgentFlow>;
97
- export declare function renameAgentFlow(oldName: string, newName: string): Promise<string>;
98
+ export declare function renameAgentFlow(flowId: string, newName: string): Promise<string>;
98
99
  export declare function uniqueFlowName(name: string): Promise<string>;
99
100
  export declare function addAgentFlow(agentFlow: AgentFlow): Promise<void>;
100
- export declare function removeAgentFlow(flowName: string): Promise<void>;
101
+ export declare function removeAgentFlow(id: string): Promise<void>;
101
102
  export declare function insertAgentFlow(agentFlow: AgentFlow): Promise<void>;
102
103
  export declare function copySubFlow(nodes: AgentFlowNode[], edges: AgentFlowEdge[]): Promise<[AgentFlowNode[], AgentFlowEdge[]]>;
103
- export declare function startAgentFlow(flowName: string): Promise<void>;
104
- export declare function stopAgentFlow(flowName: string): Promise<void>;
104
+ export declare function startAgentFlow(id: string): Promise<void>;
105
+ export declare function stopAgentFlow(id: string): Promise<void>;
105
106
  export declare function newAgentFlowNode(defName: string): Promise<AgentFlowNode>;
106
- export declare function addAgentFlowNode(flowName: string, node: AgentFlowNode): Promise<void>;
107
- export declare function removeAgentFlowNode(flowName: string, nodeId: string): Promise<void>;
108
- export declare function addAgentFlowEdge(flowName: string, edge: AgentFlowEdge): Promise<void>;
109
- export declare function removeAgentFlowEdge(flowName: string, edgeId: string): Promise<void>;
107
+ export declare function addAgentFlowNode(flowId: string, node: AgentFlowNode): Promise<void>;
108
+ export declare function removeAgentFlowNode(flowId: string, nodeId: string): Promise<void>;
109
+ export declare function addAgentFlowEdge(flowId: string, edge: AgentFlowEdge): Promise<void>;
110
+ export declare function removeAgentFlowEdge(flowId: string, edgeId: string): Promise<void>;
110
111
  export declare function startAgent(agentId: string): Promise<void>;
111
112
  export declare function stopAgent(agentId: string): Promise<void>;
112
113
  export declare function writeBoard(board: string, message: string): Promise<void>;
package/dist-js/index.js CHANGED
@@ -14,8 +14,8 @@ async function getAgentFlows() {
14
14
  async function newAgentFlow(flowName) {
15
15
  return await invoke('plugin:askit|new_agent_flow', { flowName });
16
16
  }
17
- async function renameAgentFlow(oldName, newName) {
18
- return await invoke('plugin:askit|rename_agent_flow', { oldName, newName });
17
+ async function renameAgentFlow(flowId, newName) {
18
+ return await invoke('plugin:askit|rename_agent_flow', { flowId, newName });
19
19
  }
20
20
  async function uniqueFlowName(name) {
21
21
  return await invoke('plugin:askit|unique_flow_name', { name });
@@ -23,8 +23,8 @@ async function uniqueFlowName(name) {
23
23
  async function addAgentFlow(agentFlow) {
24
24
  await invoke('plugin:askit|add_agent_flow', { agentFlow });
25
25
  }
26
- async function removeAgentFlow(flowName) {
27
- await invoke('plugin:askit|remove_agent_flow', { flowName });
26
+ async function removeAgentFlow(id) {
27
+ await invoke('plugin:askit|remove_agent_flow', { id });
28
28
  }
29
29
  async function insertAgentFlow(agentFlow) {
30
30
  await invoke('plugin:askit|insert_agent_flow', { agentFlow });
@@ -32,28 +32,28 @@ async function insertAgentFlow(agentFlow) {
32
32
  async function copySubFlow(nodes, edges) {
33
33
  return await invoke('plugin:askit|copy_sub_flow', { nodes, edges });
34
34
  }
35
- async function startAgentFlow(flowName) {
36
- await invoke('plugin:askit|start_agent_flow', { flowName });
35
+ async function startAgentFlow(id) {
36
+ await invoke('plugin:askit|start_agent_flow', { id });
37
37
  }
38
- async function stopAgentFlow(flowName) {
39
- await invoke('plugin:askit|stop_agent_flow', { flowName });
38
+ async function stopAgentFlow(id) {
39
+ await invoke('plugin:askit|stop_agent_flow', { id });
40
40
  }
41
41
  // nodes
42
42
  async function newAgentFlowNode(defName) {
43
43
  return await invoke('plugin:askit|new_agent_flow_node', { defName });
44
44
  }
45
- async function addAgentFlowNode(flowName, node) {
46
- await invoke('plugin:askit|add_agent_flow_node', { flowName, node });
45
+ async function addAgentFlowNode(flowId, node) {
46
+ await invoke('plugin:askit|add_agent_flow_node', { flowId, node });
47
47
  }
48
- async function removeAgentFlowNode(flowName, nodeId) {
49
- await invoke('plugin:askit|remove_agent_flow_node', { flowName, nodeId });
48
+ async function removeAgentFlowNode(flowId, nodeId) {
49
+ await invoke('plugin:askit|remove_agent_flow_node', { flowId, nodeId });
50
50
  }
51
51
  // edge
52
- async function addAgentFlowEdge(flowName, edge) {
53
- await invoke('plugin:askit|add_agent_flow_edge', { flowName, edge });
52
+ async function addAgentFlowEdge(flowId, edge) {
53
+ await invoke('plugin:askit|add_agent_flow_edge', { flowId, edge });
54
54
  }
55
- async function removeAgentFlowEdge(flowName, edgeId) {
56
- await invoke('plugin:askit|remove_agent_flow_edge', { flowName, edgeId });
55
+ async function removeAgentFlowEdge(flowId, edgeId) {
56
+ await invoke('plugin:askit|remove_agent_flow_edge', { flowId, edgeId });
57
57
  }
58
58
  // agent
59
59
  async function startAgent(agentId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tauri-plugin-askit-api",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "license": "MIT OR Apache-2.0",
5
5
  "author": "Akira Ishino",
6
6
  "description": "Tauri plugin for Agent Stream Kit",