@daocloud-proto/agentclaw 0.3.3 → 0.4.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/package.json +1 -1
- package/v1alpha1/agent/agent.pb.ts +116 -0
- package/v1alpha1/feature_gate/feature_gate.pb.ts +28 -0
- package/v1alpha1/overview/overview.pb.ts +149 -0
- package/v1alpha1/skill/skill.pb.ts +173 -0
- package/v1alpha1/skill/skill_types.pb.ts +143 -0
- package/v1alpha1/types/permission.pb.ts +2 -0
- package/v1alpha1/types/types.pb.ts +2 -0
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as fm from "../../fetch.pb"
|
|
8
8
|
import * as GoogleProtobufEmpty from "../../google/api/empty.pb"
|
|
9
|
+
import * as AgentclawV1alpha1OverviewOverview from "../overview/overview.pb"
|
|
9
10
|
import * as AgentclawV1alpha1TypesTypes from "../types/types.pb"
|
|
10
11
|
|
|
11
12
|
export enum AgentImagePortName {
|
|
@@ -53,6 +54,7 @@ export type AgentInstanceSpec = {
|
|
|
53
54
|
feishu?: AgentclawV1alpha1TypesTypes.FeishuConfig
|
|
54
55
|
modelConfig?: AgentclawV1alpha1TypesTypes.ModelConfig
|
|
55
56
|
resources?: AgentclawV1alpha1TypesTypes.ResourceConfig
|
|
57
|
+
fallbackModels?: AgentclawV1alpha1TypesTypes.ModelConfig[]
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
export type NetworkConfig = {
|
|
@@ -152,6 +154,111 @@ export type FeishuOnboardEvent = {
|
|
|
152
154
|
clientSecret?: string
|
|
153
155
|
}
|
|
154
156
|
|
|
157
|
+
export type GetAgentInstanceRequest = {
|
|
158
|
+
workspace?: number
|
|
159
|
+
cluster?: string
|
|
160
|
+
namespace?: string
|
|
161
|
+
name?: string
|
|
162
|
+
rangeQuery?: AgentclawV1alpha1OverviewOverview.RangeQuery
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export type TokenUsageOverview = {
|
|
166
|
+
today?: AgentclawV1alpha1OverviewOverview.TokenUsage
|
|
167
|
+
thisMonth?: AgentclawV1alpha1OverviewOverview.TokenUsage
|
|
168
|
+
currentTotal?: AgentclawV1alpha1OverviewOverview.TokenUsage
|
|
169
|
+
tokenUsageTrend?: AgentclawV1alpha1OverviewOverview.TrendPoint[]
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export type UsagePerformance = {
|
|
173
|
+
calls?: number
|
|
174
|
+
callsChanges?: number
|
|
175
|
+
successRate?: number
|
|
176
|
+
successRateChanges?: number
|
|
177
|
+
avgResponseTime?: number
|
|
178
|
+
avgResponseTimeChanges?: number
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export type GetAgentInstanceTokenTrendResponse = {
|
|
182
|
+
tokenUsageToday?: AgentclawV1alpha1OverviewOverview.TokenUsage
|
|
183
|
+
tokenUsageMonth?: AgentclawV1alpha1OverviewOverview.TokenUsage
|
|
184
|
+
tokenUsageTotal?: AgentclawV1alpha1OverviewOverview.TokenUsage
|
|
185
|
+
tokenUsageTrend?: AgentclawV1alpha1OverviewOverview.TrendPoint[]
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export type GetAgentInstanceBehaviorAnalysisResponse = {
|
|
189
|
+
totalCalls?: number
|
|
190
|
+
totalCallsChanges?: number
|
|
191
|
+
successRate?: number
|
|
192
|
+
successRateChanges?: number
|
|
193
|
+
avgResponseTime?: number
|
|
194
|
+
avgResponseTimeChanges?: number
|
|
195
|
+
skillCallDistribution?: AgentclawV1alpha1OverviewOverview.DistributionItem[]
|
|
196
|
+
modelUsageDistribution?: AgentclawV1alpha1OverviewOverview.DistributionItem[]
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export type GetAgentInstanceRootSpansRequest = {
|
|
200
|
+
workspace?: number
|
|
201
|
+
cluster?: string
|
|
202
|
+
namespace?: string
|
|
203
|
+
name?: string
|
|
204
|
+
status?: string
|
|
205
|
+
input?: string
|
|
206
|
+
rangeQuery?: AgentclawV1alpha1OverviewOverview.RangeQuery
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export type GetOpenClawSpansResponse = {
|
|
210
|
+
items?: OpenClawSpan[]
|
|
211
|
+
pagination?: AgentclawV1alpha1TypesTypes.Pagination
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export type OpenClawSpan = {
|
|
215
|
+
traceId?: string
|
|
216
|
+
spanId?: string
|
|
217
|
+
operationName?: string
|
|
218
|
+
startTime?: string
|
|
219
|
+
durationMs?: number
|
|
220
|
+
agent?: OpenClawAgent
|
|
221
|
+
session?: OpenClawSession
|
|
222
|
+
entryPoint?: string
|
|
223
|
+
model?: OpenClawModel
|
|
224
|
+
tokens?: OpenClawTokens
|
|
225
|
+
toolCount?: string
|
|
226
|
+
costUsd?: number
|
|
227
|
+
status?: string
|
|
228
|
+
previews?: OpenClawPreviews
|
|
229
|
+
lane?: string
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export type OpenClawAgent = {
|
|
233
|
+
id?: string
|
|
234
|
+
name?: string
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export type OpenClawSession = {
|
|
238
|
+
id?: string
|
|
239
|
+
key?: string
|
|
240
|
+
chatType?: string
|
|
241
|
+
cwd?: string
|
|
242
|
+
updatedAt?: string
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export type OpenClawModel = {
|
|
246
|
+
provider?: string
|
|
247
|
+
name?: string
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export type OpenClawTokens = {
|
|
251
|
+
input?: string
|
|
252
|
+
output?: string
|
|
253
|
+
total?: string
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export type OpenClawPreviews = {
|
|
257
|
+
input?: string
|
|
258
|
+
output?: string
|
|
259
|
+
reasoning?: string
|
|
260
|
+
}
|
|
261
|
+
|
|
155
262
|
export class AgentService {
|
|
156
263
|
static ListWorkspaceAgentInstances(req: ListWorkspaceAgentInstancesRequest, initReq?: fm.InitReq): Promise<ListWorkspaceAgentInstancesResponse> {
|
|
157
264
|
return fm.fetchReq<ListWorkspaceAgentInstancesRequest, ListWorkspaceAgentInstancesResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspaceId"]}/agent-instances?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
@@ -183,4 +290,13 @@ export class AgentService {
|
|
|
183
290
|
static WatchFeishuOnboard(req: WatchFeishuOnboardRequest, entityNotifier?: fm.NotifyStreamEntityArrival<FeishuOnboardEvent>, initReq?: fm.InitReq): Promise<void> {
|
|
184
291
|
return fm.fetchStreamingRequest<WatchFeishuOnboardRequest, FeishuOnboardEvent>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspaceId"]}/agent-instances/channels/feishu-onboard`, entityNotifier, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
185
292
|
}
|
|
293
|
+
static GetAgentInstanceTokenTrend(req: GetAgentInstanceRequest, initReq?: fm.InitReq): Promise<GetAgentInstanceTokenTrendResponse> {
|
|
294
|
+
return fm.fetchReq<GetAgentInstanceRequest, GetAgentInstanceTokenTrendResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/agent-instances/${req["name"]}/token-trend?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
295
|
+
}
|
|
296
|
+
static GetAgentInstanceBehaviorAnalysis(req: GetAgentInstanceRequest, initReq?: fm.InitReq): Promise<GetAgentInstanceBehaviorAnalysisResponse> {
|
|
297
|
+
return fm.fetchReq<GetAgentInstanceRequest, GetAgentInstanceBehaviorAnalysisResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/agent-instances/${req["name"]}/behavior-analysis?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
298
|
+
}
|
|
299
|
+
static QueryOpenClawRootSpans(req: GetAgentInstanceRootSpansRequest, initReq?: fm.InitReq): Promise<GetOpenClawSpansResponse> {
|
|
300
|
+
return fm.fetchReq<GetAgentInstanceRootSpansRequest, GetOpenClawSpansResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/agent-instances/${req["name"]}/spans`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
301
|
+
}
|
|
186
302
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as fm from "../../fetch.pb"
|
|
8
|
+
import * as GoogleProtobufEmpty from "../../google/api/empty.pb"
|
|
9
|
+
|
|
10
|
+
export enum FeatureGate {
|
|
11
|
+
FEATURE_GATE_UNSPECIFIED = "FEATURE_GATE_UNSPECIFIED",
|
|
12
|
+
FEATURE_GATE_SKILL_HUB = "FEATURE_GATE_SKILL_HUB",
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type FeatureGateState = {
|
|
16
|
+
gate?: FeatureGate
|
|
17
|
+
enabled?: boolean
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type ListFeatureGatesResponse = {
|
|
21
|
+
featureGates?: FeatureGateState[]
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export class FeatureGateService {
|
|
25
|
+
static ListFeatureGates(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise<ListFeatureGatesResponse> {
|
|
26
|
+
return fm.fetchReq<GoogleProtobufEmpty.Empty, ListFeatureGatesResponse>(`/apis/agentclaw.io/v1alpha1/feature-gates?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as fm from "../../fetch.pb"
|
|
8
|
+
import * as AgentclawV1alpha1TypesTypes from "../types/types.pb"
|
|
9
|
+
|
|
10
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
11
|
+
type OneOf<T> =
|
|
12
|
+
| { [k in keyof T]?: undefined }
|
|
13
|
+
| (
|
|
14
|
+
keyof T extends infer K ?
|
|
15
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
16
|
+
: never)
|
|
17
|
+
: never);
|
|
18
|
+
|
|
19
|
+
export enum TokenQuotaPeriod {
|
|
20
|
+
TOKEN_QUOTA_PERIOD_UNSPECIFIED = "TOKEN_QUOTA_PERIOD_UNSPECIFIED",
|
|
21
|
+
TOKEN_QUOTA_PERIOD_DAY = "TOKEN_QUOTA_PERIOD_DAY",
|
|
22
|
+
TOKEN_QUOTA_PERIOD_WEEK = "TOKEN_QUOTA_PERIOD_WEEK",
|
|
23
|
+
TOKEN_QUOTA_PERIOD_MONTH = "TOKEN_QUOTA_PERIOD_MONTH",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export enum GetTopStateRequestRankType {
|
|
27
|
+
USER = "USER",
|
|
28
|
+
INSTANCE = "INSTANCE",
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type GetSummaryRequest = {
|
|
32
|
+
workspace?: number
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type GetSummaryResponse = {
|
|
36
|
+
activeUsers?: number
|
|
37
|
+
totalUsers?: number
|
|
38
|
+
activeUserChanges?: number
|
|
39
|
+
tokenQuota?: number
|
|
40
|
+
usedTokens?: number
|
|
41
|
+
tokenUsageRate?: number
|
|
42
|
+
tokenQuotaPeriod?: TokenQuotaPeriod
|
|
43
|
+
totalInstances?: number
|
|
44
|
+
runningInstances?: number
|
|
45
|
+
abnormalInstances?: number
|
|
46
|
+
apiKeyCount?: number
|
|
47
|
+
apiKeyChanges?: number
|
|
48
|
+
tokenUsageToday?: number
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type RangeQuery = {
|
|
52
|
+
start?: string
|
|
53
|
+
end?: string
|
|
54
|
+
step?: number
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type GetStateRequest = {
|
|
58
|
+
workspace?: number
|
|
59
|
+
rangeQuery?: RangeQuery
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export type TokenUsage = {
|
|
63
|
+
total?: number
|
|
64
|
+
input?: number
|
|
65
|
+
output?: number
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type GetRunningStateResponseTokenUsageTrend = {
|
|
69
|
+
input?: TrendPoint[]
|
|
70
|
+
output?: TrendPoint[]
|
|
71
|
+
total?: TrendPoint[]
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type GetRunningStateResponse = {
|
|
75
|
+
tokenUsageCurrent?: TokenUsage
|
|
76
|
+
totalTokenUsageChanges?: TokenUsage
|
|
77
|
+
callTotal?: number
|
|
78
|
+
callTrendChanges?: number
|
|
79
|
+
callErrorsRate?: number
|
|
80
|
+
callErrorsRateTarget?: number
|
|
81
|
+
tokenUsageTrend?: GetRunningStateResponseTokenUsageTrend
|
|
82
|
+
callTrend?: TrendPoint[]
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export type TrendPoint = {
|
|
86
|
+
time?: string
|
|
87
|
+
value?: number
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export type GetTopStateRequest = {
|
|
91
|
+
workspace?: number
|
|
92
|
+
rankType?: GetTopStateRequestRankType
|
|
93
|
+
rangeQuery?: RangeQuery
|
|
94
|
+
page?: number
|
|
95
|
+
pageSize?: number
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
type BaseGetTopStateResponse = {
|
|
100
|
+
pagination?: AgentclawV1alpha1TypesTypes.Pagination
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export type GetTopStateResponse = BaseGetTopStateResponse
|
|
104
|
+
& OneOf<{ users: UserTopList; instances: InstanceTopList }>
|
|
105
|
+
|
|
106
|
+
export type GetTokenDistributionResponse = {
|
|
107
|
+
tokenDistribution?: DistributionItem[]
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type UserTopList = {
|
|
111
|
+
items?: TopUserItem[]
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export type InstanceTopList = {
|
|
115
|
+
items?: TopInstanceItem[]
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export type TopInstanceItem = {
|
|
119
|
+
instanceName?: string
|
|
120
|
+
userName?: string
|
|
121
|
+
tokenUsage?: number
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export type TopUserItem = {
|
|
125
|
+
userName?: string
|
|
126
|
+
tokenUsage?: number
|
|
127
|
+
instances?: string[]
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type DistributionItem = {
|
|
131
|
+
name?: string
|
|
132
|
+
value?: number
|
|
133
|
+
percentage?: number
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export class OverviewService {
|
|
137
|
+
static GetOverviewSummary(req: GetSummaryRequest, initReq?: fm.InitReq): Promise<GetSummaryResponse> {
|
|
138
|
+
return fm.fetchReq<GetSummaryRequest, GetSummaryResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspace"]}/overview/summary?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
139
|
+
}
|
|
140
|
+
static GetOverviewRunningState(req: GetStateRequest, initReq?: fm.InitReq): Promise<GetRunningStateResponse> {
|
|
141
|
+
return fm.fetchReq<GetStateRequest, GetRunningStateResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspace"]}/overview/running-state?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
142
|
+
}
|
|
143
|
+
static ListTopUsersOrInstances(req: GetTopStateRequest, initReq?: fm.InitReq): Promise<GetTopStateResponse> {
|
|
144
|
+
return fm.fetchReq<GetTopStateRequest, GetTopStateResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspace"]}/overview/top-user-instances?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
145
|
+
}
|
|
146
|
+
static GetTokenDistribution(req: GetStateRequest, initReq?: fm.InitReq): Promise<GetTokenDistributionResponse> {
|
|
147
|
+
return fm.fetchReq<GetStateRequest, GetTokenDistributionResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspace"]}/overview/token-distribution?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as fm from "../../fetch.pb"
|
|
8
|
+
import * as GoogleProtobufEmpty from "../../google/api/empty.pb"
|
|
9
|
+
import * as GoogleApiHttpbody from "../../google/api/httpbody.pb"
|
|
10
|
+
import * as AgentclawV1alpha1TypesTypes from "../types/types.pb"
|
|
11
|
+
import * as AgentclawV1alpha1SkillSkill_types from "./skill_types.pb"
|
|
12
|
+
export type ListSkillsRequest = {
|
|
13
|
+
namespace?: string
|
|
14
|
+
fuzzyName?: string
|
|
15
|
+
workspace?: number
|
|
16
|
+
sort?: AgentclawV1alpha1SkillSkill_types.SkillListSortType
|
|
17
|
+
page?: number
|
|
18
|
+
pageSize?: number
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type ListSkillsResponse = {
|
|
22
|
+
items?: AgentclawV1alpha1SkillSkill_types.SkillSummary[]
|
|
23
|
+
pagination?: AgentclawV1alpha1TypesTypes.Pagination
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type ListAdminManagedSkillsRequest = {
|
|
27
|
+
namespace?: string
|
|
28
|
+
fuzzyName?: string
|
|
29
|
+
sort?: AgentclawV1alpha1SkillSkill_types.SkillListSortType
|
|
30
|
+
page?: number
|
|
31
|
+
pageSize?: number
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type ListAdminManagedSkillsResponse = {
|
|
35
|
+
items?: AgentclawV1alpha1SkillSkill_types.SkillSummary[]
|
|
36
|
+
pagination?: AgentclawV1alpha1TypesTypes.Pagination
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type GetSkillRequest = {
|
|
40
|
+
namespace?: string
|
|
41
|
+
slug?: string
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type GetSkillResponse = {
|
|
45
|
+
item?: AgentclawV1alpha1SkillSkill_types.SkillDetail
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type ListSkillVersionsRequest = {
|
|
49
|
+
namespace?: string
|
|
50
|
+
slug?: string
|
|
51
|
+
page?: number
|
|
52
|
+
pageSize?: number
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type ListSkillVersionsResponse = {
|
|
56
|
+
items?: AgentclawV1alpha1SkillSkill_types.SkillVersionItem[]
|
|
57
|
+
pagination?: AgentclawV1alpha1TypesTypes.Pagination
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type ListSkillFilesRequest = {
|
|
61
|
+
namespace?: string
|
|
62
|
+
slug?: string
|
|
63
|
+
version?: string
|
|
64
|
+
path?: string
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type ListSkillFilesResponse = {
|
|
68
|
+
items?: AgentclawV1alpha1SkillSkill_types.SkillFile[]
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type GetSkillFileRequest = {
|
|
72
|
+
namespace?: string
|
|
73
|
+
slug?: string
|
|
74
|
+
version?: string
|
|
75
|
+
path?: string
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type GetSkillFileResponse = {
|
|
79
|
+
contentType?: string
|
|
80
|
+
text?: string
|
|
81
|
+
size?: string
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export type DownloadSkillFileRequest = {
|
|
85
|
+
namespace?: string
|
|
86
|
+
slug?: string
|
|
87
|
+
version?: string
|
|
88
|
+
path?: string
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export type GetSkillOverviewRequest = {
|
|
92
|
+
namespace?: string
|
|
93
|
+
slug?: string
|
|
94
|
+
version?: string
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export type GetSkillOverviewResponse = {
|
|
98
|
+
content?: string
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type GetSkillSecurityAuditRequest = {
|
|
102
|
+
namespace?: string
|
|
103
|
+
slugId?: string
|
|
104
|
+
versionId?: string
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type GetSkillSecurityAuditResponse = {
|
|
108
|
+
items?: AgentclawV1alpha1SkillSkill_types.SkillSecurityAudit[]
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type GetSkillRegistryRequest = {
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export type GetSkillRegistryResponse = {
|
|
115
|
+
registryUrl?: string
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export type SetSkillListingRequest = {
|
|
119
|
+
namespace?: string
|
|
120
|
+
slug?: string
|
|
121
|
+
listed?: boolean
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export type SetSkillListingResponse = {
|
|
125
|
+
version?: AgentclawV1alpha1SkillSkill_types.SkillLifecycleVersion
|
|
126
|
+
action?: string
|
|
127
|
+
status?: AgentclawV1alpha1SkillSkill_types.SkillStatus
|
|
128
|
+
listed?: boolean
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export type DeleteSkillRequest = {
|
|
132
|
+
namespace?: string
|
|
133
|
+
slug?: string
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export class SkillService {
|
|
137
|
+
static ListSkills(req: ListSkillsRequest, initReq?: fm.InitReq): Promise<ListSkillsResponse> {
|
|
138
|
+
return fm.fetchReq<ListSkillsRequest, ListSkillsResponse>(`/apis/agentclaw.io/v1alpha1/workspaces/${req["workspace"]}/skills?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
139
|
+
}
|
|
140
|
+
static ListAdminManagedSkills(req: ListAdminManagedSkillsRequest, initReq?: fm.InitReq): Promise<ListAdminManagedSkillsResponse> {
|
|
141
|
+
return fm.fetchReq<ListAdminManagedSkillsRequest, ListAdminManagedSkillsResponse>(`/apis/agentclaw.io/v1alpha1/skills/managed?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
142
|
+
}
|
|
143
|
+
static GetSkill(req: GetSkillRequest, initReq?: fm.InitReq): Promise<GetSkillResponse> {
|
|
144
|
+
return fm.fetchReq<GetSkillRequest, GetSkillResponse>(`/apis/agentclaw.io/v1alpha1/skills/${req["namespace"]}/${req["slug"]}?${fm.renderURLSearchParams(req, ["namespace", "slug"])}`, {...initReq, method: "GET"})
|
|
145
|
+
}
|
|
146
|
+
static ListSkillVersions(req: ListSkillVersionsRequest, initReq?: fm.InitReq): Promise<ListSkillVersionsResponse> {
|
|
147
|
+
return fm.fetchReq<ListSkillVersionsRequest, ListSkillVersionsResponse>(`/apis/agentclaw.io/v1alpha1/skills/${req["namespace"]}/${req["slug"]}/versions?${fm.renderURLSearchParams(req, ["namespace", "slug"])}`, {...initReq, method: "GET"})
|
|
148
|
+
}
|
|
149
|
+
static ListSkillFiles(req: ListSkillFilesRequest, initReq?: fm.InitReq): Promise<ListSkillFilesResponse> {
|
|
150
|
+
return fm.fetchReq<ListSkillFilesRequest, ListSkillFilesResponse>(`/apis/agentclaw.io/v1alpha1/skills/${req["namespace"]}/${req["slug"]}/versions/${req["version"]}/files?${fm.renderURLSearchParams(req, ["namespace", "slug", "version"])}`, {...initReq, method: "GET"})
|
|
151
|
+
}
|
|
152
|
+
static GetSkillFile(req: GetSkillFileRequest, initReq?: fm.InitReq): Promise<GetSkillFileResponse> {
|
|
153
|
+
return fm.fetchReq<GetSkillFileRequest, GetSkillFileResponse>(`/apis/agentclaw.io/v1alpha1/skills/${req["namespace"]}/${req["slug"]}/versions/${req["version"]}/file?${fm.renderURLSearchParams(req, ["namespace", "slug", "version"])}`, {...initReq, method: "GET"})
|
|
154
|
+
}
|
|
155
|
+
static DownloadSkillFile(req: DownloadSkillFileRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
|
|
156
|
+
return fm.fetchReq<DownloadSkillFileRequest, GoogleApiHttpbody.HttpBody>(`/apis/agentclaw.io/v1alpha1/skills/${req["namespace"]}/${req["slug"]}/versions/${req["version"]}/file/download?${fm.renderURLSearchParams(req, ["namespace", "slug", "version"])}`, {...initReq, method: "GET"})
|
|
157
|
+
}
|
|
158
|
+
static GetSkillOverview(req: GetSkillOverviewRequest, initReq?: fm.InitReq): Promise<GetSkillOverviewResponse> {
|
|
159
|
+
return fm.fetchReq<GetSkillOverviewRequest, GetSkillOverviewResponse>(`/apis/agentclaw.io/v1alpha1/skills/${req["namespace"]}/${req["slug"]}/versions/${req["version"]}/overview?${fm.renderURLSearchParams(req, ["namespace", "slug", "version"])}`, {...initReq, method: "GET"})
|
|
160
|
+
}
|
|
161
|
+
static GetSkillSecurityAudit(req: GetSkillSecurityAuditRequest, initReq?: fm.InitReq): Promise<GetSkillSecurityAuditResponse> {
|
|
162
|
+
return fm.fetchReq<GetSkillSecurityAuditRequest, GetSkillSecurityAuditResponse>(`/apis/agentclaw.io/v1alpha1/skills/${req["namespace"]}/${req["slugId"]}/versions/${req["versionId"]}/security-audit?${fm.renderURLSearchParams(req, ["namespace", "slugId", "versionId"])}`, {...initReq, method: "GET"})
|
|
163
|
+
}
|
|
164
|
+
static GetSkillRegistry(req: GetSkillRegistryRequest, initReq?: fm.InitReq): Promise<GetSkillRegistryResponse> {
|
|
165
|
+
return fm.fetchReq<GetSkillRegistryRequest, GetSkillRegistryResponse>(`/apis/agentclaw.io/v1alpha1/skills/registry?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
166
|
+
}
|
|
167
|
+
static SetSkillListing(req: SetSkillListingRequest, initReq?: fm.InitReq): Promise<SetSkillListingResponse> {
|
|
168
|
+
return fm.fetchReq<SetSkillListingRequest, SetSkillListingResponse>(`/apis/agentclaw.io/v1alpha1/skills/${req["namespace"]}/${req["slug"]}/listing`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
169
|
+
}
|
|
170
|
+
static DeleteSkill(req: DeleteSkillRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
171
|
+
return fm.fetchReq<DeleteSkillRequest, GoogleProtobufEmpty.Empty>(`/apis/agentclaw.io/v1alpha1/skills/${req["namespace"]}/${req["slug"]}`, {...initReq, method: "DELETE"})
|
|
172
|
+
}
|
|
173
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export enum SkillVisibility {
|
|
8
|
+
SKILL_VISIBILITY_UNSPECIFIED = "SKILL_VISIBILITY_UNSPECIFIED",
|
|
9
|
+
SKILL_VISIBILITY_PUBLIC = "SKILL_VISIBILITY_PUBLIC",
|
|
10
|
+
SKILL_VISIBILITY_PRIVATE = "SKILL_VISIBILITY_PRIVATE",
|
|
11
|
+
SKILL_VISIBILITY_NAMESPACE_ONLY = "SKILL_VISIBILITY_NAMESPACE_ONLY",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export enum SkillStatus {
|
|
15
|
+
SKILL_STATUS_UNSPECIFIED = "SKILL_STATUS_UNSPECIFIED",
|
|
16
|
+
SKILL_STATUS_ACTIVE = "SKILL_STATUS_ACTIVE",
|
|
17
|
+
SKILL_STATUS_ARCHIVED = "SKILL_STATUS_ARCHIVED",
|
|
18
|
+
SKILL_STATUS_HIDDEN = "SKILL_STATUS_HIDDEN",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export enum SkillListSortType {
|
|
22
|
+
NEWEST = "NEWEST",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export enum SkillVersionStatus {
|
|
26
|
+
SKILL_VERSION_STATUS_UNSPECIFIED = "SKILL_VERSION_STATUS_UNSPECIFIED",
|
|
27
|
+
SKILL_VERSION_STATUS_DRAFT = "SKILL_VERSION_STATUS_DRAFT",
|
|
28
|
+
SKILL_VERSION_STATUS_REVIEW = "SKILL_VERSION_STATUS_REVIEW",
|
|
29
|
+
SKILL_VERSION_STATUS_PUBLISHED = "SKILL_VERSION_STATUS_PUBLISHED",
|
|
30
|
+
SKILL_VERSION_STATUS_YANKED = "SKILL_VERSION_STATUS_YANKED",
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export enum SkillSecurityVerdict {
|
|
34
|
+
SKILL_SECURITY_VERDICT_UNSPECIFIED = "SKILL_SECURITY_VERDICT_UNSPECIFIED",
|
|
35
|
+
SKILL_SECURITY_VERDICT_SAFE = "SKILL_SECURITY_VERDICT_SAFE",
|
|
36
|
+
SKILL_SECURITY_VERDICT_SUSPICIOUS = "SKILL_SECURITY_VERDICT_SUSPICIOUS",
|
|
37
|
+
SKILL_SECURITY_VERDICT_DANGEROUS = "SKILL_SECURITY_VERDICT_DANGEROUS",
|
|
38
|
+
SKILL_SECURITY_VERDICT_BLOCKED = "SKILL_SECURITY_VERDICT_BLOCKED",
|
|
39
|
+
SKILL_SECURITY_VERDICT_SCAN_FAILED = "SKILL_SECURITY_VERDICT_SCAN_FAILED",
|
|
40
|
+
SKILL_SECURITY_VERDICT_SCANNING = "SKILL_SECURITY_VERDICT_SCANNING",
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export enum SkillSecuritySeverity {
|
|
44
|
+
SKILL_SECURITY_SEVERITY_UNSPECIFIED = "SKILL_SECURITY_SEVERITY_UNSPECIFIED",
|
|
45
|
+
SKILL_SECURITY_SEVERITY_INFO = "SKILL_SECURITY_SEVERITY_INFO",
|
|
46
|
+
SKILL_SECURITY_SEVERITY_LOW = "SKILL_SECURITY_SEVERITY_LOW",
|
|
47
|
+
SKILL_SECURITY_SEVERITY_MEDIUM = "SKILL_SECURITY_SEVERITY_MEDIUM",
|
|
48
|
+
SKILL_SECURITY_SEVERITY_HIGH = "SKILL_SECURITY_SEVERITY_HIGH",
|
|
49
|
+
SKILL_SECURITY_SEVERITY_CRITICAL = "SKILL_SECURITY_SEVERITY_CRITICAL",
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type SkillLifecycleVersion = {
|
|
53
|
+
id?: string
|
|
54
|
+
version?: string
|
|
55
|
+
status?: SkillVersionStatus
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type SkillSummary = {
|
|
59
|
+
id?: string
|
|
60
|
+
slug?: string
|
|
61
|
+
displayName?: string
|
|
62
|
+
summary?: string
|
|
63
|
+
status?: SkillStatus
|
|
64
|
+
downloadCount?: string
|
|
65
|
+
starCount?: number
|
|
66
|
+
ratingAvg?: string
|
|
67
|
+
ratingCount?: number
|
|
68
|
+
namespace?: string
|
|
69
|
+
versionCount?: number
|
|
70
|
+
creator?: string
|
|
71
|
+
updatedAt?: string
|
|
72
|
+
headlineVersion?: SkillLifecycleVersion
|
|
73
|
+
publishedVersion?: SkillLifecycleVersion
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export type SkillDetail = {
|
|
77
|
+
id?: string
|
|
78
|
+
slug?: string
|
|
79
|
+
displayName?: string
|
|
80
|
+
ownerId?: string
|
|
81
|
+
ownerDisplayName?: string
|
|
82
|
+
summary?: string
|
|
83
|
+
visibility?: SkillVisibility
|
|
84
|
+
status?: SkillStatus
|
|
85
|
+
downloadCount?: string
|
|
86
|
+
starCount?: number
|
|
87
|
+
ratingAvg?: string
|
|
88
|
+
ratingCount?: number
|
|
89
|
+
hidden?: boolean
|
|
90
|
+
namespace?: string
|
|
91
|
+
headlineVersion?: SkillLifecycleVersion
|
|
92
|
+
publishedVersion?: SkillLifecycleVersion
|
|
93
|
+
updatedAt?: string
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type SkillVersionItem = {
|
|
97
|
+
id?: string
|
|
98
|
+
version?: string
|
|
99
|
+
status?: SkillVersionStatus
|
|
100
|
+
changelog?: string
|
|
101
|
+
fileCount?: number
|
|
102
|
+
totalSize?: string
|
|
103
|
+
publishedAt?: string
|
|
104
|
+
downloadAvailable?: boolean
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type SkillFile = {
|
|
108
|
+
id?: string
|
|
109
|
+
filePath?: string
|
|
110
|
+
fileSize?: string
|
|
111
|
+
contentType?: string
|
|
112
|
+
sha256?: string
|
|
113
|
+
isDir?: boolean
|
|
114
|
+
name?: string
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export type SkillSecurityFinding = {
|
|
118
|
+
ruleId?: string
|
|
119
|
+
severity?: SkillSecuritySeverity
|
|
120
|
+
category?: string
|
|
121
|
+
title?: string
|
|
122
|
+
message?: string
|
|
123
|
+
filePath?: string
|
|
124
|
+
lineNumber?: number
|
|
125
|
+
codeSnippet?: string
|
|
126
|
+
remediation?: string
|
|
127
|
+
analyzer?: string
|
|
128
|
+
metadata?: {[key: string]: string}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export type SkillSecurityAudit = {
|
|
132
|
+
id?: string
|
|
133
|
+
scanId?: string
|
|
134
|
+
scannerType?: string
|
|
135
|
+
verdict?: SkillSecurityVerdict
|
|
136
|
+
isSafe?: boolean
|
|
137
|
+
maxSeverity?: SkillSecuritySeverity
|
|
138
|
+
findingsCount?: number
|
|
139
|
+
findings?: SkillSecurityFinding[]
|
|
140
|
+
scanDurationSeconds?: number
|
|
141
|
+
scannedAt?: string
|
|
142
|
+
createdAt?: string
|
|
143
|
+
}
|
|
@@ -11,6 +11,7 @@ export enum WorkspacePermission {
|
|
|
11
11
|
AGENT_UPDATE = "AGENT_UPDATE",
|
|
12
12
|
AGENT_DELETE = "AGENT_DELETE",
|
|
13
13
|
AGENT_WS_LIST = "AGENT_WS_LIST",
|
|
14
|
+
AGENT_WS_MANAGE = "AGENT_WS_MANAGE",
|
|
14
15
|
SKILL_MARKET_GET = "SKILL_MARKET_GET",
|
|
15
16
|
OVERVIEW_GET = "OVERVIEW_GET",
|
|
16
17
|
}
|
|
@@ -22,6 +23,7 @@ export enum PlatformPermission {
|
|
|
22
23
|
PLATFORM_AGENT_UPDATE = "PLATFORM_AGENT_UPDATE",
|
|
23
24
|
PLATFORM_AGENT_DELETE = "PLATFORM_AGENT_DELETE",
|
|
24
25
|
PLATFORM_AGENT_WS_LIST = "PLATFORM_AGENT_WS_LIST",
|
|
26
|
+
PLATFORM_AGENT_WS_MANAGE = "PLATFORM_AGENT_WS_MANAGE",
|
|
25
27
|
PLATFORM_SKILL_MARKET_GET = "PLATFORM_SKILL_MARKET_GET",
|
|
26
28
|
PLATFORM_OVERVIEW_GET = "PLATFORM_OVERVIEW_GET",
|
|
27
29
|
ADMIN_OVERVIEW_GET = "ADMIN_OVERVIEW_GET",
|