tauri-plugin-askit-api 0.5.1 → 0.7.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 +101 -76
- package/dist-js/index.d.ts +48 -69
- package/dist-js/index.js +85 -61
- package/package.json +1 -1
package/dist-js/index.cjs
CHANGED
|
@@ -4,113 +4,138 @@ var core = require('@tauri-apps/api/core');
|
|
|
4
4
|
|
|
5
5
|
// agent definition
|
|
6
6
|
async function getAgentDefinition() {
|
|
7
|
-
return await core.invoke(
|
|
7
|
+
return await core.invoke("plugin:askit|get_agent_definition", {});
|
|
8
8
|
}
|
|
9
9
|
async function getAgentDefinitions() {
|
|
10
|
-
return await core.invoke(
|
|
11
|
-
}
|
|
12
|
-
//
|
|
13
|
-
async function
|
|
14
|
-
return await core.invoke(
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
async function
|
|
48
|
-
await core.invoke(
|
|
49
|
-
}
|
|
50
|
-
async function
|
|
51
|
-
await core.invoke(
|
|
52
|
-
}
|
|
53
|
-
//
|
|
54
|
-
async function
|
|
55
|
-
await core.invoke(
|
|
56
|
-
}
|
|
57
|
-
async function
|
|
58
|
-
await core.invoke(
|
|
10
|
+
return await core.invoke("plugin:askit|get_agent_definitions", {});
|
|
11
|
+
}
|
|
12
|
+
// agent spec
|
|
13
|
+
async function getAgentSpec(agentId) {
|
|
14
|
+
return await core.invoke("plugin:askit|get_agent_spec", { agentId });
|
|
15
|
+
}
|
|
16
|
+
// stream
|
|
17
|
+
async function getAgentStreams() {
|
|
18
|
+
return await core.invoke("plugin:askit|get_agent_streams", {});
|
|
19
|
+
}
|
|
20
|
+
async function newAgentStream(streamName) {
|
|
21
|
+
return await core.invoke("plugin:askit|new_agent_stream", { streamName });
|
|
22
|
+
}
|
|
23
|
+
async function renameAgentStream(streamId, newName) {
|
|
24
|
+
return await core.invoke("plugin:askit|rename_agent_stream", {
|
|
25
|
+
streamId,
|
|
26
|
+
newName,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
async function uniqueStreamName(name) {
|
|
30
|
+
return await core.invoke("plugin:askit|unique_stream_name", { name });
|
|
31
|
+
}
|
|
32
|
+
async function addAgentStream(AgentStream) {
|
|
33
|
+
await core.invoke("plugin:askit|add_agent_stream", { AgentStream });
|
|
34
|
+
}
|
|
35
|
+
async function removeAgentStream(id) {
|
|
36
|
+
await core.invoke("plugin:askit|remove_agent_stream", { id });
|
|
37
|
+
}
|
|
38
|
+
async function insertAgentStream(AgentStream) {
|
|
39
|
+
await core.invoke("plugin:askit|insert_agent_stream", { AgentStream });
|
|
40
|
+
}
|
|
41
|
+
async function copySubStream(agents, channels) {
|
|
42
|
+
return await core.invoke("plugin:askit|copy_sub_stream", {
|
|
43
|
+
agents,
|
|
44
|
+
channels,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
async function startAgentStream(id) {
|
|
48
|
+
await core.invoke("plugin:askit|start_agent_stream", { id });
|
|
49
|
+
}
|
|
50
|
+
async function stopAgentStream(id) {
|
|
51
|
+
await core.invoke("plugin:askit|stop_agent_stream", { id });
|
|
52
|
+
}
|
|
53
|
+
// agents
|
|
54
|
+
async function newAgentSpec(defName) {
|
|
55
|
+
return await core.invoke("plugin:askit|new_agent_spec", { defName });
|
|
56
|
+
}
|
|
57
|
+
async function addAgent(streamId, spec) {
|
|
58
|
+
await core.invoke("plugin:askit|add_agent", {
|
|
59
|
+
streamId,
|
|
60
|
+
spec,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
async function removeAgent(streamId, agentId) {
|
|
64
|
+
await core.invoke("plugin:askit|remove_agent", {
|
|
65
|
+
streamId,
|
|
66
|
+
agentId,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
// channel
|
|
70
|
+
async function addChannel(streamId, channel) {
|
|
71
|
+
await core.invoke("plugin:askit|add_channel", {
|
|
72
|
+
streamId,
|
|
73
|
+
channel,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
async function removeChannel(streamId, channelId) {
|
|
77
|
+
await core.invoke("plugin:askit|remove_channel", {
|
|
78
|
+
streamId,
|
|
79
|
+
channelId,
|
|
80
|
+
});
|
|
59
81
|
}
|
|
60
82
|
// agent
|
|
61
83
|
async function startAgent(agentId) {
|
|
62
|
-
await core.invoke(
|
|
84
|
+
await core.invoke("plugin:askit|start_agent", { agentId });
|
|
63
85
|
}
|
|
64
86
|
async function stopAgent(agentId) {
|
|
65
|
-
await core.invoke(
|
|
87
|
+
await core.invoke("plugin:askit|stop_agent", { agentId });
|
|
66
88
|
}
|
|
67
89
|
// board
|
|
68
90
|
async function writeBoard(board, message) {
|
|
69
|
-
await core.invoke(
|
|
91
|
+
await core.invoke("plugin:askit|write_board", { board, message });
|
|
70
92
|
}
|
|
71
93
|
// configs
|
|
72
94
|
async function setAgentConfigs(agentId, configs) {
|
|
73
|
-
await core.invoke(
|
|
95
|
+
await core.invoke("plugin:askit|set_agent_configs", { agentId, configs });
|
|
74
96
|
}
|
|
75
97
|
async function getGlobalConfigs(defName) {
|
|
76
|
-
return await core.invoke(
|
|
98
|
+
return await core.invoke("plugin:askit|get_global_configs", { defName });
|
|
77
99
|
}
|
|
78
100
|
async function getGlobalConfigsMap() {
|
|
79
|
-
return await core.invoke(
|
|
101
|
+
return await core.invoke("plugin:askit|get_global_configs_map", {});
|
|
80
102
|
}
|
|
81
103
|
async function setGlobalConfigs(defName, configs) {
|
|
82
|
-
await core.invoke(
|
|
104
|
+
await core.invoke("plugin:askit|set_global_configs", { defName, configs });
|
|
83
105
|
}
|
|
84
106
|
async function setGlobalConfigsMap(configs) {
|
|
85
|
-
await core.invoke(
|
|
107
|
+
await core.invoke("plugin:askit|set_global_configs_map", { configs });
|
|
86
108
|
}
|
|
87
|
-
async function
|
|
88
|
-
return await core.invoke(
|
|
109
|
+
async function getAgentConfigSpecs(defName) {
|
|
110
|
+
return await core.invoke("plugin:askit|get_agent_config_specs", {
|
|
111
|
+
defName,
|
|
112
|
+
});
|
|
89
113
|
}
|
|
90
114
|
|
|
91
|
-
exports.
|
|
92
|
-
exports.
|
|
93
|
-
exports.
|
|
94
|
-
exports.
|
|
95
|
-
exports.
|
|
115
|
+
exports.addAgent = addAgent;
|
|
116
|
+
exports.addAgentStream = addAgentStream;
|
|
117
|
+
exports.addChannel = addChannel;
|
|
118
|
+
exports.copySubStream = copySubStream;
|
|
119
|
+
exports.getAgentConfigSpecs = getAgentConfigSpecs;
|
|
96
120
|
exports.getAgentDefinition = getAgentDefinition;
|
|
97
121
|
exports.getAgentDefinitions = getAgentDefinitions;
|
|
98
|
-
exports.
|
|
122
|
+
exports.getAgentSpec = getAgentSpec;
|
|
123
|
+
exports.getAgentStreams = getAgentStreams;
|
|
99
124
|
exports.getGlobalConfigs = getGlobalConfigs;
|
|
100
125
|
exports.getGlobalConfigsMap = getGlobalConfigsMap;
|
|
101
|
-
exports.
|
|
102
|
-
exports.
|
|
103
|
-
exports.
|
|
104
|
-
exports.
|
|
105
|
-
exports.
|
|
106
|
-
exports.
|
|
107
|
-
exports.
|
|
126
|
+
exports.insertAgentStream = insertAgentStream;
|
|
127
|
+
exports.newAgentSpec = newAgentSpec;
|
|
128
|
+
exports.newAgentStream = newAgentStream;
|
|
129
|
+
exports.removeAgent = removeAgent;
|
|
130
|
+
exports.removeAgentStream = removeAgentStream;
|
|
131
|
+
exports.removeChannel = removeChannel;
|
|
132
|
+
exports.renameAgentStream = renameAgentStream;
|
|
108
133
|
exports.setAgentConfigs = setAgentConfigs;
|
|
109
134
|
exports.setGlobalConfigs = setGlobalConfigs;
|
|
110
135
|
exports.setGlobalConfigsMap = setGlobalConfigsMap;
|
|
111
136
|
exports.startAgent = startAgent;
|
|
112
|
-
exports.
|
|
137
|
+
exports.startAgentStream = startAgentStream;
|
|
113
138
|
exports.stopAgent = stopAgent;
|
|
114
|
-
exports.
|
|
115
|
-
exports.
|
|
139
|
+
exports.stopAgentStream = stopAgentStream;
|
|
140
|
+
exports.uniqueStreamName = uniqueStreamName;
|
|
116
141
|
exports.writeBoard = writeBoard;
|
package/dist-js/index.d.ts
CHANGED
|
@@ -3,56 +3,48 @@ export type AgentGlobalConfigsMap = Record<string, AgentConfigs>;
|
|
|
3
3
|
export type AgentDefinition = {
|
|
4
4
|
kind: string;
|
|
5
5
|
name: string;
|
|
6
|
-
title
|
|
7
|
-
description
|
|
8
|
-
category
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
display_configs: AgentDisplayConfigs | null;
|
|
6
|
+
title?: string | null;
|
|
7
|
+
description?: string | null;
|
|
8
|
+
category?: string | null;
|
|
9
|
+
inputs?: string[] | null;
|
|
10
|
+
outputs?: string[] | null;
|
|
11
|
+
configs?: AgentConfigSpecs | null;
|
|
12
|
+
global_configs?: AgentGlobalConfigSpecs | null;
|
|
13
|
+
native_thread?: boolean | null;
|
|
15
14
|
};
|
|
16
|
-
export type
|
|
17
|
-
export type
|
|
18
|
-
export type
|
|
15
|
+
export type AgentConfigSpecs = Record<string, AgentConfigSpec>;
|
|
16
|
+
export type AgentGlobalConfigSpecs = Record<string, AgentConfigSpec>;
|
|
17
|
+
export type AgentConfigSpec = {
|
|
19
18
|
value: any;
|
|
20
19
|
type: AgentConfigValueType | null;
|
|
21
20
|
title?: string | null;
|
|
21
|
+
hideTitle?: boolean | null;
|
|
22
22
|
description?: string | null;
|
|
23
23
|
hidden?: boolean | null;
|
|
24
|
+
readonly?: boolean | null;
|
|
24
25
|
};
|
|
25
|
-
export type AgentConfigValueType =
|
|
26
|
-
export type
|
|
27
|
-
export type
|
|
28
|
-
type: AgentDisplayConfigType | null;
|
|
29
|
-
title?: string | null;
|
|
30
|
-
description?: string | null;
|
|
31
|
-
hideTitle?: boolean | null;
|
|
32
|
-
};
|
|
33
|
-
export type AgentDisplayConfigType = "*" | "boolean" | "integer" | "number" | "string" | "text" | "object" | "messages";
|
|
34
|
-
export type AgentFlows = Record<string, AgentFlow>;
|
|
35
|
-
export type AgentFlow = {
|
|
26
|
+
export type AgentConfigValueType = string;
|
|
27
|
+
export type AgentStreams = Record<string, AgentStream>;
|
|
28
|
+
export type AgentStream = {
|
|
36
29
|
id: string;
|
|
37
30
|
name: string;
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
agents: AgentSpec[];
|
|
32
|
+
channels: ChannelSpec[];
|
|
40
33
|
viewport: Viewport | null;
|
|
41
34
|
};
|
|
42
35
|
export type AgentConfigsMap = Record<string, AgentConfigs>;
|
|
43
36
|
export type AgentConfigs = Record<string, any>;
|
|
44
|
-
export type
|
|
45
|
-
|
|
37
|
+
export type AgentSpecExtensions = Record<string, any>;
|
|
38
|
+
export type AgentSpec = {
|
|
39
|
+
id?: string | null;
|
|
46
40
|
def_name: string;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
export type AgentFlowEdge = {
|
|
41
|
+
inputs?: string[] | null;
|
|
42
|
+
outputs?: string[] | null;
|
|
43
|
+
configs?: AgentConfigs | null;
|
|
44
|
+
config_specs?: AgentConfigSpecs | null;
|
|
45
|
+
enabled?: boolean | null;
|
|
46
|
+
} & AgentSpecExtensions;
|
|
47
|
+
export type ChannelSpec = {
|
|
56
48
|
id: string;
|
|
57
49
|
source: string;
|
|
58
50
|
source_handle: string | null;
|
|
@@ -71,49 +63,36 @@ export type CoreSettings = {
|
|
|
71
63
|
export type Settings = {
|
|
72
64
|
core: CoreSettings;
|
|
73
65
|
agents: Record<string, AgentDefinition>;
|
|
74
|
-
|
|
75
|
-
};
|
|
76
|
-
export type ConfigMessage = {
|
|
77
|
-
agent_id: string;
|
|
78
|
-
key: string;
|
|
79
|
-
value: any;
|
|
66
|
+
agent_streams: AgentStream[];
|
|
80
67
|
};
|
|
81
|
-
export type
|
|
82
|
-
agent_id: string;
|
|
68
|
+
export type BoardMessage = {
|
|
83
69
|
key: string;
|
|
84
70
|
value: any;
|
|
85
71
|
};
|
|
86
|
-
export type ErrorMessage = {
|
|
87
|
-
agent_id: string;
|
|
88
|
-
message: string;
|
|
89
|
-
};
|
|
90
|
-
export type InputMessage = {
|
|
91
|
-
agent_id: string;
|
|
92
|
-
ch: string;
|
|
93
|
-
};
|
|
94
72
|
export declare function getAgentDefinition(): Promise<AgentDefinition | null>;
|
|
95
73
|
export declare function getAgentDefinitions(): Promise<AgentDefinitions>;
|
|
96
|
-
export declare function
|
|
97
|
-
export declare function
|
|
98
|
-
export declare function
|
|
99
|
-
export declare function
|
|
100
|
-
export declare function
|
|
101
|
-
export declare function
|
|
102
|
-
export declare function
|
|
103
|
-
export declare function
|
|
104
|
-
export declare function
|
|
105
|
-
export declare function
|
|
106
|
-
export declare function
|
|
107
|
-
export declare function
|
|
108
|
-
export declare function
|
|
109
|
-
export declare function
|
|
110
|
-
export declare function
|
|
74
|
+
export declare function getAgentSpec(agentId: string): Promise<AgentSpec | null>;
|
|
75
|
+
export declare function getAgentStreams(): Promise<AgentStreams>;
|
|
76
|
+
export declare function newAgentStream(streamName: string): Promise<AgentStream>;
|
|
77
|
+
export declare function renameAgentStream(streamId: string, newName: string): Promise<string>;
|
|
78
|
+
export declare function uniqueStreamName(name: string): Promise<string>;
|
|
79
|
+
export declare function addAgentStream(AgentStream: AgentStream): Promise<void>;
|
|
80
|
+
export declare function removeAgentStream(id: string): Promise<void>;
|
|
81
|
+
export declare function insertAgentStream(AgentStream: AgentStream): Promise<void>;
|
|
82
|
+
export declare function copySubStream(agents: AgentSpec[], channels: ChannelSpec[]): Promise<[AgentSpec[], ChannelSpec[]]>;
|
|
83
|
+
export declare function startAgentStream(id: string): Promise<void>;
|
|
84
|
+
export declare function stopAgentStream(id: string): Promise<void>;
|
|
85
|
+
export declare function newAgentSpec(defName: string): Promise<AgentSpec>;
|
|
86
|
+
export declare function addAgent(streamId: string, spec: AgentSpec): Promise<void>;
|
|
87
|
+
export declare function removeAgent(streamId: string, agentId: string): Promise<void>;
|
|
88
|
+
export declare function addChannel(streamId: string, channel: ChannelSpec): Promise<void>;
|
|
89
|
+
export declare function removeChannel(streamId: string, channelId: string): Promise<void>;
|
|
111
90
|
export declare function startAgent(agentId: string): Promise<void>;
|
|
112
91
|
export declare function stopAgent(agentId: string): Promise<void>;
|
|
113
92
|
export declare function writeBoard(board: string, message: string): Promise<void>;
|
|
114
|
-
export declare function setAgentConfigs(agentId: string, configs:
|
|
93
|
+
export declare function setAgentConfigs(agentId: string, configs: AgentConfigs): Promise<void>;
|
|
115
94
|
export declare function getGlobalConfigs(defName: string): Promise<AgentConfigs | null>;
|
|
116
95
|
export declare function getGlobalConfigsMap(): Promise<AgentConfigsMap>;
|
|
117
96
|
export declare function setGlobalConfigs(defName: string, configs: AgentConfigs): Promise<void>;
|
|
118
97
|
export declare function setGlobalConfigsMap(configs: AgentConfigsMap): Promise<void>;
|
|
119
|
-
export declare function
|
|
98
|
+
export declare function getAgentConfigSpecs(defName: string): Promise<AgentConfigSpecs | null>;
|
package/dist-js/index.js
CHANGED
|
@@ -2,88 +2,112 @@ import { invoke } from '@tauri-apps/api/core';
|
|
|
2
2
|
|
|
3
3
|
// agent definition
|
|
4
4
|
async function getAgentDefinition() {
|
|
5
|
-
return await invoke(
|
|
5
|
+
return await invoke("plugin:askit|get_agent_definition", {});
|
|
6
6
|
}
|
|
7
7
|
async function getAgentDefinitions() {
|
|
8
|
-
return await invoke(
|
|
9
|
-
}
|
|
10
|
-
//
|
|
11
|
-
async function
|
|
12
|
-
return await invoke(
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
async function
|
|
46
|
-
await invoke(
|
|
47
|
-
}
|
|
48
|
-
async function
|
|
49
|
-
await invoke(
|
|
50
|
-
}
|
|
51
|
-
//
|
|
52
|
-
async function
|
|
53
|
-
await invoke(
|
|
54
|
-
}
|
|
55
|
-
async function
|
|
56
|
-
await invoke(
|
|
8
|
+
return await invoke("plugin:askit|get_agent_definitions", {});
|
|
9
|
+
}
|
|
10
|
+
// agent spec
|
|
11
|
+
async function getAgentSpec(agentId) {
|
|
12
|
+
return await invoke("plugin:askit|get_agent_spec", { agentId });
|
|
13
|
+
}
|
|
14
|
+
// stream
|
|
15
|
+
async function getAgentStreams() {
|
|
16
|
+
return await invoke("plugin:askit|get_agent_streams", {});
|
|
17
|
+
}
|
|
18
|
+
async function newAgentStream(streamName) {
|
|
19
|
+
return await invoke("plugin:askit|new_agent_stream", { streamName });
|
|
20
|
+
}
|
|
21
|
+
async function renameAgentStream(streamId, newName) {
|
|
22
|
+
return await invoke("plugin:askit|rename_agent_stream", {
|
|
23
|
+
streamId,
|
|
24
|
+
newName,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
async function uniqueStreamName(name) {
|
|
28
|
+
return await invoke("plugin:askit|unique_stream_name", { name });
|
|
29
|
+
}
|
|
30
|
+
async function addAgentStream(AgentStream) {
|
|
31
|
+
await invoke("plugin:askit|add_agent_stream", { AgentStream });
|
|
32
|
+
}
|
|
33
|
+
async function removeAgentStream(id) {
|
|
34
|
+
await invoke("plugin:askit|remove_agent_stream", { id });
|
|
35
|
+
}
|
|
36
|
+
async function insertAgentStream(AgentStream) {
|
|
37
|
+
await invoke("plugin:askit|insert_agent_stream", { AgentStream });
|
|
38
|
+
}
|
|
39
|
+
async function copySubStream(agents, channels) {
|
|
40
|
+
return await invoke("plugin:askit|copy_sub_stream", {
|
|
41
|
+
agents,
|
|
42
|
+
channels,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
async function startAgentStream(id) {
|
|
46
|
+
await invoke("plugin:askit|start_agent_stream", { id });
|
|
47
|
+
}
|
|
48
|
+
async function stopAgentStream(id) {
|
|
49
|
+
await invoke("plugin:askit|stop_agent_stream", { id });
|
|
50
|
+
}
|
|
51
|
+
// agents
|
|
52
|
+
async function newAgentSpec(defName) {
|
|
53
|
+
return await invoke("plugin:askit|new_agent_spec", { defName });
|
|
54
|
+
}
|
|
55
|
+
async function addAgent(streamId, spec) {
|
|
56
|
+
await invoke("plugin:askit|add_agent", {
|
|
57
|
+
streamId,
|
|
58
|
+
spec,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
async function removeAgent(streamId, agentId) {
|
|
62
|
+
await invoke("plugin:askit|remove_agent", {
|
|
63
|
+
streamId,
|
|
64
|
+
agentId,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
// channel
|
|
68
|
+
async function addChannel(streamId, channel) {
|
|
69
|
+
await invoke("plugin:askit|add_channel", {
|
|
70
|
+
streamId,
|
|
71
|
+
channel,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
async function removeChannel(streamId, channelId) {
|
|
75
|
+
await invoke("plugin:askit|remove_channel", {
|
|
76
|
+
streamId,
|
|
77
|
+
channelId,
|
|
78
|
+
});
|
|
57
79
|
}
|
|
58
80
|
// agent
|
|
59
81
|
async function startAgent(agentId) {
|
|
60
|
-
await invoke(
|
|
82
|
+
await invoke("plugin:askit|start_agent", { agentId });
|
|
61
83
|
}
|
|
62
84
|
async function stopAgent(agentId) {
|
|
63
|
-
await invoke(
|
|
85
|
+
await invoke("plugin:askit|stop_agent", { agentId });
|
|
64
86
|
}
|
|
65
87
|
// board
|
|
66
88
|
async function writeBoard(board, message) {
|
|
67
|
-
await invoke(
|
|
89
|
+
await invoke("plugin:askit|write_board", { board, message });
|
|
68
90
|
}
|
|
69
91
|
// configs
|
|
70
92
|
async function setAgentConfigs(agentId, configs) {
|
|
71
|
-
await invoke(
|
|
93
|
+
await invoke("plugin:askit|set_agent_configs", { agentId, configs });
|
|
72
94
|
}
|
|
73
95
|
async function getGlobalConfigs(defName) {
|
|
74
|
-
return await invoke(
|
|
96
|
+
return await invoke("plugin:askit|get_global_configs", { defName });
|
|
75
97
|
}
|
|
76
98
|
async function getGlobalConfigsMap() {
|
|
77
|
-
return await invoke(
|
|
99
|
+
return await invoke("plugin:askit|get_global_configs_map", {});
|
|
78
100
|
}
|
|
79
101
|
async function setGlobalConfigs(defName, configs) {
|
|
80
|
-
await invoke(
|
|
102
|
+
await invoke("plugin:askit|set_global_configs", { defName, configs });
|
|
81
103
|
}
|
|
82
104
|
async function setGlobalConfigsMap(configs) {
|
|
83
|
-
await invoke(
|
|
105
|
+
await invoke("plugin:askit|set_global_configs_map", { configs });
|
|
84
106
|
}
|
|
85
|
-
async function
|
|
86
|
-
return await invoke(
|
|
107
|
+
async function getAgentConfigSpecs(defName) {
|
|
108
|
+
return await invoke("plugin:askit|get_agent_config_specs", {
|
|
109
|
+
defName,
|
|
110
|
+
});
|
|
87
111
|
}
|
|
88
112
|
|
|
89
|
-
export {
|
|
113
|
+
export { addAgent, addAgentStream, addChannel, copySubStream, getAgentConfigSpecs, getAgentDefinition, getAgentDefinitions, getAgentSpec, getAgentStreams, getGlobalConfigs, getGlobalConfigsMap, insertAgentStream, newAgentSpec, newAgentStream, removeAgent, removeAgentStream, removeChannel, renameAgentStream, setAgentConfigs, setGlobalConfigs, setGlobalConfigsMap, startAgent, startAgentStream, stopAgent, stopAgentStream, uniqueStreamName, writeBoard };
|