tauri-plugin-askit-api 0.8.0 → 0.9.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
@@ -44,8 +44,9 @@ async function addAgentStream(name, spec) {
44
44
  async function removeAgentStream(id) {
45
45
  await core.invoke("plugin:askit|remove_agent_stream", { id });
46
46
  }
47
- async function copySubStream(agents, channels) {
48
- return await core.invoke("plugin:askit|copy_sub_stream", {
47
+ async function addAgentsAndChannels(streamId, agents, channels) {
48
+ return await core.invoke("plugin:askit|add_agents_and_channels", {
49
+ streamId,
49
50
  agents,
50
51
  channels,
51
52
  });
@@ -61,7 +62,7 @@ async function newAgentSpec(defName) {
61
62
  return await core.invoke("plugin:askit|new_agent_spec", { defName });
62
63
  }
63
64
  async function addAgent(streamId, spec) {
64
- await core.invoke("plugin:askit|add_agent", {
65
+ return await core.invoke("plugin:askit|add_agent", {
65
66
  streamId,
66
67
  spec,
67
68
  });
@@ -79,10 +80,10 @@ async function addChannel(streamId, channel) {
79
80
  channel,
80
81
  });
81
82
  }
82
- async function removeChannel(streamId, channelId) {
83
+ async function removeChannel(streamId, channel) {
83
84
  await core.invoke("plugin:askit|remove_channel", {
84
85
  streamId,
85
- channelId,
86
+ channel,
86
87
  });
87
88
  }
88
89
  // agent
@@ -115,8 +116,8 @@ async function setGlobalConfigsMap(configs) {
115
116
 
116
117
  exports.addAgent = addAgent;
117
118
  exports.addAgentStream = addAgentStream;
119
+ exports.addAgentsAndChannels = addAgentsAndChannels;
118
120
  exports.addChannel = addChannel;
119
- exports.copySubStream = copySubStream;
120
121
  exports.getAgentDefinition = getAgentDefinition;
121
122
  exports.getAgentDefinitions = getAgentDefinitions;
122
123
  exports.getAgentSpec = getAgentSpec;
@@ -48,7 +48,6 @@ export type AgentSpec = {
48
48
  disabled?: boolean | null;
49
49
  } & AgentSpecExtensions;
50
50
  export type ChannelSpec = {
51
- id: string;
52
51
  source: string;
53
52
  source_handle: string | null;
54
53
  target: string;
@@ -75,14 +74,14 @@ export declare function renameAgentStream(id: string, name: string): Promise<str
75
74
  export declare function uniqueStreamName(name: string): Promise<string>;
76
75
  export declare function addAgentStream(name: string, spec: AgentStreamSpec): Promise<string>;
77
76
  export declare function removeAgentStream(id: string): Promise<void>;
78
- export declare function copySubStream(agents: AgentSpec[], channels: ChannelSpec[]): Promise<[AgentSpec[], ChannelSpec[]]>;
77
+ export declare function addAgentsAndChannels(streamId: string, agents: AgentSpec[], channels: ChannelSpec[]): Promise<[AgentSpec[], ChannelSpec[]]>;
79
78
  export declare function startAgentStream(id: string): Promise<void>;
80
79
  export declare function stopAgentStream(id: string): Promise<void>;
81
80
  export declare function newAgentSpec(defName: string): Promise<AgentSpec>;
82
- export declare function addAgent(streamId: string, spec: AgentSpec): Promise<void>;
81
+ export declare function addAgent(streamId: string, spec: AgentSpec): Promise<string>;
83
82
  export declare function removeAgent(streamId: string, agentId: string): Promise<void>;
84
83
  export declare function addChannel(streamId: string, channel: ChannelSpec): Promise<void>;
85
- export declare function removeChannel(streamId: string, channelId: string): Promise<void>;
84
+ export declare function removeChannel(streamId: string, channel: ChannelSpec): Promise<void>;
86
85
  export declare function startAgent(agentId: string): Promise<void>;
87
86
  export declare function stopAgent(agentId: string): Promise<void>;
88
87
  export declare function writeBoard(board: string, message: string): Promise<void>;
package/dist-js/index.js CHANGED
@@ -42,8 +42,9 @@ async function addAgentStream(name, spec) {
42
42
  async function removeAgentStream(id) {
43
43
  await invoke("plugin:askit|remove_agent_stream", { id });
44
44
  }
45
- async function copySubStream(agents, channels) {
46
- return await invoke("plugin:askit|copy_sub_stream", {
45
+ async function addAgentsAndChannels(streamId, agents, channels) {
46
+ return await invoke("plugin:askit|add_agents_and_channels", {
47
+ streamId,
47
48
  agents,
48
49
  channels,
49
50
  });
@@ -59,7 +60,7 @@ async function newAgentSpec(defName) {
59
60
  return await invoke("plugin:askit|new_agent_spec", { defName });
60
61
  }
61
62
  async function addAgent(streamId, spec) {
62
- await invoke("plugin:askit|add_agent", {
63
+ return await invoke("plugin:askit|add_agent", {
63
64
  streamId,
64
65
  spec,
65
66
  });
@@ -77,10 +78,10 @@ async function addChannel(streamId, channel) {
77
78
  channel,
78
79
  });
79
80
  }
80
- async function removeChannel(streamId, channelId) {
81
+ async function removeChannel(streamId, channel) {
81
82
  await invoke("plugin:askit|remove_channel", {
82
83
  streamId,
83
- channelId,
84
+ channel,
84
85
  });
85
86
  }
86
87
  // agent
@@ -111,4 +112,4 @@ async function setGlobalConfigsMap(configs) {
111
112
  await invoke("plugin:askit|set_global_configs_map", { configs });
112
113
  }
113
114
 
114
- export { addAgent, addAgentStream, addChannel, copySubStream, getAgentDefinition, getAgentDefinitions, getAgentSpec, getAgentStreamInfo, getAgentStreamInfos, getAgentStreamSpec, getGlobalConfigs, getGlobalConfigsMap, newAgentSpec, newAgentStream, removeAgent, removeAgentStream, removeChannel, renameAgentStream, setAgentConfigs, setAgentStreamSpec, setGlobalConfigs, setGlobalConfigsMap, startAgent, startAgentStream, stopAgent, stopAgentStream, uniqueStreamName, writeBoard };
115
+ export { addAgent, addAgentStream, addAgentsAndChannels, addChannel, getAgentDefinition, getAgentDefinitions, getAgentSpec, getAgentStreamInfo, getAgentStreamInfos, getAgentStreamSpec, getGlobalConfigs, getGlobalConfigsMap, newAgentSpec, newAgentStream, removeAgent, removeAgentStream, removeChannel, renameAgentStream, setAgentConfigs, setAgentStreamSpec, setGlobalConfigs, setGlobalConfigsMap, startAgent, startAgentStream, stopAgent, stopAgentStream, uniqueStreamName, writeBoard };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tauri-plugin-askit-api",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "license": "MIT OR Apache-2.0",
5
5
  "author": "Akira Ishino",
6
6
  "description": "Tauri plugin for Agent Stream Kit",