@meshagent/meshagent 0.31.4 → 0.32.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/CHANGELOG.md +3 -0
- package/dist/browser/meshagent-client.d.ts +38 -0
- package/dist/browser/meshagent-client.js +16 -1
- package/dist/esm/meshagent-client.d.ts +38 -0
- package/dist/esm/meshagent-client.js +16 -1
- package/dist/node/meshagent-client.d.ts +38 -0
- package/dist/node/meshagent-client.js +16 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -76,6 +76,43 @@ export interface ServiceApiKeySpec {
|
|
|
76
76
|
name: string;
|
|
77
77
|
auto_provision?: boolean | null;
|
|
78
78
|
}
|
|
79
|
+
export interface PromptTemplate {
|
|
80
|
+
name: string;
|
|
81
|
+
description?: string | null;
|
|
82
|
+
prompt: string;
|
|
83
|
+
annotations?: Record<string, string> | null;
|
|
84
|
+
}
|
|
85
|
+
export interface ChannelSpec {
|
|
86
|
+
annotations?: Record<string, string> | null;
|
|
87
|
+
}
|
|
88
|
+
export interface EmailChannel extends ChannelSpec {
|
|
89
|
+
address: string;
|
|
90
|
+
private?: boolean | null;
|
|
91
|
+
}
|
|
92
|
+
export interface QueueChannel extends ChannelSpec {
|
|
93
|
+
queue: string;
|
|
94
|
+
threading_mode?: "default-new" | null;
|
|
95
|
+
message_schema?: Record<string, unknown> | null;
|
|
96
|
+
}
|
|
97
|
+
export interface MessagingChannel extends ChannelSpec {
|
|
98
|
+
protocol?: string | null;
|
|
99
|
+
prompts?: PromptTemplate[] | null;
|
|
100
|
+
}
|
|
101
|
+
export interface ToolkitChannel extends ChannelSpec {
|
|
102
|
+
name: string;
|
|
103
|
+
}
|
|
104
|
+
export interface ChannelsSpec {
|
|
105
|
+
email?: EmailChannel[] | null;
|
|
106
|
+
messaging?: MessagingChannel[] | null;
|
|
107
|
+
queue?: QueueChannel[] | null;
|
|
108
|
+
toolkit?: ToolkitChannel[] | null;
|
|
109
|
+
}
|
|
110
|
+
export interface AgentSpec {
|
|
111
|
+
name: string;
|
|
112
|
+
description?: string | null;
|
|
113
|
+
annotations?: Record<string, string> | null;
|
|
114
|
+
channels?: ChannelsSpec | null;
|
|
115
|
+
}
|
|
79
116
|
export interface ServiceMetadata {
|
|
80
117
|
name: string;
|
|
81
118
|
description?: string | null;
|
|
@@ -137,6 +174,7 @@ export interface ServiceSpec {
|
|
|
137
174
|
kind: "Service";
|
|
138
175
|
id?: string | null;
|
|
139
176
|
metadata: ServiceMetadata;
|
|
177
|
+
agents?: AgentSpec[] | null;
|
|
140
178
|
ports?: PortSpec[];
|
|
141
179
|
container?: ContainerSpec | null;
|
|
142
180
|
external?: ExternalServiceSpec | null;
|
|
@@ -27,7 +27,22 @@ function pruneUndefinedValues(value) {
|
|
|
27
27
|
return value;
|
|
28
28
|
}
|
|
29
29
|
function serializeServiceSpec(service) {
|
|
30
|
-
|
|
30
|
+
const agents = service.agents?.map((agent) => ({
|
|
31
|
+
...agent,
|
|
32
|
+
channels: agent.channels == null
|
|
33
|
+
? agent.channels
|
|
34
|
+
: {
|
|
35
|
+
...agent.channels,
|
|
36
|
+
messaging: agent.channels.messaging?.map((channel) => ({
|
|
37
|
+
...channel,
|
|
38
|
+
protocol: channel.protocol ?? "meshagent.agent-message.v1",
|
|
39
|
+
})),
|
|
40
|
+
},
|
|
41
|
+
}));
|
|
42
|
+
return pruneUndefinedValues({
|
|
43
|
+
...service,
|
|
44
|
+
agents,
|
|
45
|
+
});
|
|
31
46
|
}
|
|
32
47
|
class Meshagent {
|
|
33
48
|
constructor({ baseUrl, token } = {}) {
|
|
@@ -76,6 +76,43 @@ export interface ServiceApiKeySpec {
|
|
|
76
76
|
name: string;
|
|
77
77
|
auto_provision?: boolean | null;
|
|
78
78
|
}
|
|
79
|
+
export interface PromptTemplate {
|
|
80
|
+
name: string;
|
|
81
|
+
description?: string | null;
|
|
82
|
+
prompt: string;
|
|
83
|
+
annotations?: Record<string, string> | null;
|
|
84
|
+
}
|
|
85
|
+
export interface ChannelSpec {
|
|
86
|
+
annotations?: Record<string, string> | null;
|
|
87
|
+
}
|
|
88
|
+
export interface EmailChannel extends ChannelSpec {
|
|
89
|
+
address: string;
|
|
90
|
+
private?: boolean | null;
|
|
91
|
+
}
|
|
92
|
+
export interface QueueChannel extends ChannelSpec {
|
|
93
|
+
queue: string;
|
|
94
|
+
threading_mode?: "default-new" | null;
|
|
95
|
+
message_schema?: Record<string, unknown> | null;
|
|
96
|
+
}
|
|
97
|
+
export interface MessagingChannel extends ChannelSpec {
|
|
98
|
+
protocol?: string | null;
|
|
99
|
+
prompts?: PromptTemplate[] | null;
|
|
100
|
+
}
|
|
101
|
+
export interface ToolkitChannel extends ChannelSpec {
|
|
102
|
+
name: string;
|
|
103
|
+
}
|
|
104
|
+
export interface ChannelsSpec {
|
|
105
|
+
email?: EmailChannel[] | null;
|
|
106
|
+
messaging?: MessagingChannel[] | null;
|
|
107
|
+
queue?: QueueChannel[] | null;
|
|
108
|
+
toolkit?: ToolkitChannel[] | null;
|
|
109
|
+
}
|
|
110
|
+
export interface AgentSpec {
|
|
111
|
+
name: string;
|
|
112
|
+
description?: string | null;
|
|
113
|
+
annotations?: Record<string, string> | null;
|
|
114
|
+
channels?: ChannelsSpec | null;
|
|
115
|
+
}
|
|
79
116
|
export interface ServiceMetadata {
|
|
80
117
|
name: string;
|
|
81
118
|
description?: string | null;
|
|
@@ -137,6 +174,7 @@ export interface ServiceSpec {
|
|
|
137
174
|
kind: "Service";
|
|
138
175
|
id?: string | null;
|
|
139
176
|
metadata: ServiceMetadata;
|
|
177
|
+
agents?: AgentSpec[] | null;
|
|
140
178
|
ports?: PortSpec[];
|
|
141
179
|
container?: ContainerSpec | null;
|
|
142
180
|
external?: ExternalServiceSpec | null;
|
|
@@ -24,7 +24,22 @@ function pruneUndefinedValues(value) {
|
|
|
24
24
|
return value;
|
|
25
25
|
}
|
|
26
26
|
function serializeServiceSpec(service) {
|
|
27
|
-
|
|
27
|
+
const agents = service.agents?.map((agent) => ({
|
|
28
|
+
...agent,
|
|
29
|
+
channels: agent.channels == null
|
|
30
|
+
? agent.channels
|
|
31
|
+
: {
|
|
32
|
+
...agent.channels,
|
|
33
|
+
messaging: agent.channels.messaging?.map((channel) => ({
|
|
34
|
+
...channel,
|
|
35
|
+
protocol: channel.protocol ?? "meshagent.agent-message.v1",
|
|
36
|
+
})),
|
|
37
|
+
},
|
|
38
|
+
}));
|
|
39
|
+
return pruneUndefinedValues({
|
|
40
|
+
...service,
|
|
41
|
+
agents,
|
|
42
|
+
});
|
|
28
43
|
}
|
|
29
44
|
export class Meshagent {
|
|
30
45
|
constructor({ baseUrl, token } = {}) {
|
|
@@ -76,6 +76,43 @@ export interface ServiceApiKeySpec {
|
|
|
76
76
|
name: string;
|
|
77
77
|
auto_provision?: boolean | null;
|
|
78
78
|
}
|
|
79
|
+
export interface PromptTemplate {
|
|
80
|
+
name: string;
|
|
81
|
+
description?: string | null;
|
|
82
|
+
prompt: string;
|
|
83
|
+
annotations?: Record<string, string> | null;
|
|
84
|
+
}
|
|
85
|
+
export interface ChannelSpec {
|
|
86
|
+
annotations?: Record<string, string> | null;
|
|
87
|
+
}
|
|
88
|
+
export interface EmailChannel extends ChannelSpec {
|
|
89
|
+
address: string;
|
|
90
|
+
private?: boolean | null;
|
|
91
|
+
}
|
|
92
|
+
export interface QueueChannel extends ChannelSpec {
|
|
93
|
+
queue: string;
|
|
94
|
+
threading_mode?: "default-new" | null;
|
|
95
|
+
message_schema?: Record<string, unknown> | null;
|
|
96
|
+
}
|
|
97
|
+
export interface MessagingChannel extends ChannelSpec {
|
|
98
|
+
protocol?: string | null;
|
|
99
|
+
prompts?: PromptTemplate[] | null;
|
|
100
|
+
}
|
|
101
|
+
export interface ToolkitChannel extends ChannelSpec {
|
|
102
|
+
name: string;
|
|
103
|
+
}
|
|
104
|
+
export interface ChannelsSpec {
|
|
105
|
+
email?: EmailChannel[] | null;
|
|
106
|
+
messaging?: MessagingChannel[] | null;
|
|
107
|
+
queue?: QueueChannel[] | null;
|
|
108
|
+
toolkit?: ToolkitChannel[] | null;
|
|
109
|
+
}
|
|
110
|
+
export interface AgentSpec {
|
|
111
|
+
name: string;
|
|
112
|
+
description?: string | null;
|
|
113
|
+
annotations?: Record<string, string> | null;
|
|
114
|
+
channels?: ChannelsSpec | null;
|
|
115
|
+
}
|
|
79
116
|
export interface ServiceMetadata {
|
|
80
117
|
name: string;
|
|
81
118
|
description?: string | null;
|
|
@@ -137,6 +174,7 @@ export interface ServiceSpec {
|
|
|
137
174
|
kind: "Service";
|
|
138
175
|
id?: string | null;
|
|
139
176
|
metadata: ServiceMetadata;
|
|
177
|
+
agents?: AgentSpec[] | null;
|
|
140
178
|
ports?: PortSpec[];
|
|
141
179
|
container?: ContainerSpec | null;
|
|
142
180
|
external?: ExternalServiceSpec | null;
|
|
@@ -27,7 +27,22 @@ function pruneUndefinedValues(value) {
|
|
|
27
27
|
return value;
|
|
28
28
|
}
|
|
29
29
|
function serializeServiceSpec(service) {
|
|
30
|
-
|
|
30
|
+
const agents = service.agents?.map((agent) => ({
|
|
31
|
+
...agent,
|
|
32
|
+
channels: agent.channels == null
|
|
33
|
+
? agent.channels
|
|
34
|
+
: {
|
|
35
|
+
...agent.channels,
|
|
36
|
+
messaging: agent.channels.messaging?.map((channel) => ({
|
|
37
|
+
...channel,
|
|
38
|
+
protocol: channel.protocol ?? "meshagent.agent-message.v1",
|
|
39
|
+
})),
|
|
40
|
+
},
|
|
41
|
+
}));
|
|
42
|
+
return pruneUndefinedValues({
|
|
43
|
+
...service,
|
|
44
|
+
agents,
|
|
45
|
+
});
|
|
31
46
|
}
|
|
32
47
|
class Meshagent {
|
|
33
48
|
constructor({ baseUrl, token } = {}) {
|