@kevisual/cnb 0.0.22 → 0.0.25
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/agent/routes/call/index.ts +1 -2
- package/agent/routes/repo/list.ts +1 -2
- package/agent/routes/repo/repo.ts +1 -2
- package/dist/keep.js +4 -2850
- package/dist/opencode.js +20 -16
- package/dist/routes.d.ts +3 -2
- package/dist/routes.js +20 -16
- package/package.json +8 -7
- package/src/repo/index.ts +4 -0
- package/src/workspace/index.ts +1 -1
package/dist/opencode.js
CHANGED
|
@@ -21444,7 +21444,7 @@ class InitEnv {
|
|
|
21444
21444
|
}
|
|
21445
21445
|
InitEnv.init();
|
|
21446
21446
|
|
|
21447
|
-
// node_modules/.pnpm/@kevisual+use-config@1.0.30_dotenv@17.
|
|
21447
|
+
// node_modules/.pnpm/@kevisual+use-config@1.0.30_dotenv@17.3.1/node_modules/@kevisual/use-config/dist/app.js
|
|
21448
21448
|
import { createRequire as createRequire2 } from "node:module";
|
|
21449
21449
|
import fs from "node:fs";
|
|
21450
21450
|
import path from "node:path";
|
|
@@ -22805,6 +22805,10 @@ class Repo extends CNBCore {
|
|
|
22805
22805
|
const url2 = `/${repo}`;
|
|
22806
22806
|
return this.patch({ url: url2, data: params });
|
|
22807
22807
|
}
|
|
22808
|
+
getRepo(repo) {
|
|
22809
|
+
const url2 = `/${repo}`;
|
|
22810
|
+
return this.get({ url: url2 });
|
|
22811
|
+
}
|
|
22808
22812
|
}
|
|
22809
22813
|
|
|
22810
22814
|
// src/user/index.ts
|
|
@@ -36599,7 +36603,7 @@ config3(en_default());
|
|
|
36599
36603
|
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/index.js
|
|
36600
36604
|
var zod_default = exports_external;
|
|
36601
36605
|
|
|
36602
|
-
// node_modules/.pnpm/@opencode-ai+plugin@1.1
|
|
36606
|
+
// node_modules/.pnpm/@opencode-ai+plugin@1.2.1/node_modules/@opencode-ai/plugin/dist/tool.js
|
|
36603
36607
|
function tool2(input) {
|
|
36604
36608
|
return input;
|
|
36605
36609
|
}
|
|
@@ -36663,9 +36667,9 @@ app.route({
|
|
|
36663
36667
|
title: "列出cnb代码仓库",
|
|
36664
36668
|
summary: "列出cnb代码仓库, 可选flags参数,如 KnowledgeBase",
|
|
36665
36669
|
args: {
|
|
36666
|
-
search:
|
|
36667
|
-
pageSize:
|
|
36668
|
-
flags:
|
|
36670
|
+
search: tool.schema.string().optional().describe("搜索关键词"),
|
|
36671
|
+
pageSize: tool.schema.number().optional().describe("每页数量,默认999"),
|
|
36672
|
+
flags: tool.schema.string().optional().describe("仓库标记,如果是知识库则填写 KnowledgeBase")
|
|
36669
36673
|
}
|
|
36670
36674
|
})
|
|
36671
36675
|
}
|
|
@@ -36703,9 +36707,9 @@ app.route({
|
|
|
36703
36707
|
skill: "create-repo",
|
|
36704
36708
|
title: "创建代码仓库",
|
|
36705
36709
|
args: {
|
|
36706
|
-
name:
|
|
36707
|
-
visibility:
|
|
36708
|
-
description:
|
|
36710
|
+
name: tool.schema.string().describe("代码仓库名称, 如 my-user/my-repo"),
|
|
36711
|
+
visibility: tool.schema.string().describe("代码仓库可见性, public 或 private").default("public"),
|
|
36712
|
+
description: tool.schema.string().describe("代码仓库描述")
|
|
36709
36713
|
},
|
|
36710
36714
|
summary: "创建一个新的代码仓库"
|
|
36711
36715
|
})
|
|
@@ -36741,10 +36745,10 @@ app.route({
|
|
|
36741
36745
|
title: "在代码仓库中创建文件",
|
|
36742
36746
|
summary: `在代码仓库中创建文件, encoding 可选,默认 raw`,
|
|
36743
36747
|
args: {
|
|
36744
|
-
repoName:
|
|
36745
|
-
filePath:
|
|
36746
|
-
content:
|
|
36747
|
-
encoding:
|
|
36748
|
+
repoName: tool.schema.string().describe("代码仓库名称, 如 my-user/my-repo"),
|
|
36749
|
+
filePath: tool.schema.string().describe("文件路径, 如 src/index.ts"),
|
|
36750
|
+
content: tool.schema.string().describe("文本的字符串的内容"),
|
|
36751
|
+
encoding: tool.schema.string().describe("编码方式,如 raw").optional()
|
|
36748
36752
|
}
|
|
36749
36753
|
})
|
|
36750
36754
|
}
|
|
@@ -36775,7 +36779,7 @@ app.route({
|
|
|
36775
36779
|
skill: "delete-repo",
|
|
36776
36780
|
title: "删除代码仓库",
|
|
36777
36781
|
args: {
|
|
36778
|
-
name:
|
|
36782
|
+
name: tool.schema.string().describe("代码仓库名称")
|
|
36779
36783
|
},
|
|
36780
36784
|
summary: "删除一个代码仓库"
|
|
36781
36785
|
})
|
|
@@ -37356,9 +37360,9 @@ if (!app.hasRoute("call")) {
|
|
|
37356
37360
|
title: "调用app应用",
|
|
37357
37361
|
summary: "调用router的应用, 参数path, key, payload",
|
|
37358
37362
|
args: {
|
|
37359
|
-
path:
|
|
37360
|
-
key:
|
|
37361
|
-
payload:
|
|
37363
|
+
path: tool.schema.string().describe("应用路径,例如 cnb"),
|
|
37364
|
+
key: tool.schema.string().optional().describe("应用key,例如 list-repos"),
|
|
37365
|
+
payload: tool.schema.object({}).optional().describe("调用参数")
|
|
37362
37366
|
}
|
|
37363
37367
|
})
|
|
37364
37368
|
}
|
package/dist/routes.d.ts
CHANGED
|
@@ -106,11 +106,11 @@ declare class Workspace extends CNBCore {
|
|
|
106
106
|
stopWorkspace(params: {
|
|
107
107
|
pipelineId?: string;
|
|
108
108
|
sn?: string;
|
|
109
|
-
}): Promise<{
|
|
109
|
+
}): Promise<Result$1<{
|
|
110
110
|
buildLogUrl: string;
|
|
111
111
|
message: string;
|
|
112
112
|
sn: string;
|
|
113
|
-
}
|
|
113
|
+
}>>;
|
|
114
114
|
/**
|
|
115
115
|
* 根据流水线 SN 查询云原生开发访问地址
|
|
116
116
|
* @param repo 仓库路径,例如:groupname/reponame
|
|
@@ -300,6 +300,7 @@ declare class Repo extends CNBCore {
|
|
|
300
300
|
status?: 'active' | 'archived';
|
|
301
301
|
}): Promise<Result<RepoItem[]>>;
|
|
302
302
|
updateRepoInfo(repo: string, params: UpdateRepoInfo): Promise<any>;
|
|
303
|
+
getRepo(repo: string): Promise<Result<RepoItem>>;
|
|
303
304
|
}
|
|
304
305
|
type UpdateRepoInfo = {
|
|
305
306
|
description?: string;
|
package/dist/routes.js
CHANGED
|
@@ -21444,7 +21444,7 @@ class InitEnv {
|
|
|
21444
21444
|
}
|
|
21445
21445
|
InitEnv.init();
|
|
21446
21446
|
|
|
21447
|
-
// node_modules/.pnpm/@kevisual+use-config@1.0.30_dotenv@17.
|
|
21447
|
+
// node_modules/.pnpm/@kevisual+use-config@1.0.30_dotenv@17.3.1/node_modules/@kevisual/use-config/dist/app.js
|
|
21448
21448
|
import { createRequire as createRequire2 } from "node:module";
|
|
21449
21449
|
import fs from "node:fs";
|
|
21450
21450
|
import path from "node:path";
|
|
@@ -22805,6 +22805,10 @@ class Repo extends CNBCore {
|
|
|
22805
22805
|
const url2 = `/${repo}`;
|
|
22806
22806
|
return this.patch({ url: url2, data: params });
|
|
22807
22807
|
}
|
|
22808
|
+
getRepo(repo) {
|
|
22809
|
+
const url2 = `/${repo}`;
|
|
22810
|
+
return this.get({ url: url2 });
|
|
22811
|
+
}
|
|
22808
22812
|
}
|
|
22809
22813
|
|
|
22810
22814
|
// src/user/index.ts
|
|
@@ -36599,7 +36603,7 @@ config3(en_default());
|
|
|
36599
36603
|
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/index.js
|
|
36600
36604
|
var zod_default = exports_external;
|
|
36601
36605
|
|
|
36602
|
-
// node_modules/.pnpm/@opencode-ai+plugin@1.1
|
|
36606
|
+
// node_modules/.pnpm/@opencode-ai+plugin@1.2.1/node_modules/@opencode-ai/plugin/dist/tool.js
|
|
36603
36607
|
function tool2(input) {
|
|
36604
36608
|
return input;
|
|
36605
36609
|
}
|
|
@@ -36663,9 +36667,9 @@ app.route({
|
|
|
36663
36667
|
title: "列出cnb代码仓库",
|
|
36664
36668
|
summary: "列出cnb代码仓库, 可选flags参数,如 KnowledgeBase",
|
|
36665
36669
|
args: {
|
|
36666
|
-
search:
|
|
36667
|
-
pageSize:
|
|
36668
|
-
flags:
|
|
36670
|
+
search: tool.schema.string().optional().describe("搜索关键词"),
|
|
36671
|
+
pageSize: tool.schema.number().optional().describe("每页数量,默认999"),
|
|
36672
|
+
flags: tool.schema.string().optional().describe("仓库标记,如果是知识库则填写 KnowledgeBase")
|
|
36669
36673
|
}
|
|
36670
36674
|
})
|
|
36671
36675
|
}
|
|
@@ -36703,9 +36707,9 @@ app.route({
|
|
|
36703
36707
|
skill: "create-repo",
|
|
36704
36708
|
title: "创建代码仓库",
|
|
36705
36709
|
args: {
|
|
36706
|
-
name:
|
|
36707
|
-
visibility:
|
|
36708
|
-
description:
|
|
36710
|
+
name: tool.schema.string().describe("代码仓库名称, 如 my-user/my-repo"),
|
|
36711
|
+
visibility: tool.schema.string().describe("代码仓库可见性, public 或 private").default("public"),
|
|
36712
|
+
description: tool.schema.string().describe("代码仓库描述")
|
|
36709
36713
|
},
|
|
36710
36714
|
summary: "创建一个新的代码仓库"
|
|
36711
36715
|
})
|
|
@@ -36741,10 +36745,10 @@ app.route({
|
|
|
36741
36745
|
title: "在代码仓库中创建文件",
|
|
36742
36746
|
summary: `在代码仓库中创建文件, encoding 可选,默认 raw`,
|
|
36743
36747
|
args: {
|
|
36744
|
-
repoName:
|
|
36745
|
-
filePath:
|
|
36746
|
-
content:
|
|
36747
|
-
encoding:
|
|
36748
|
+
repoName: tool.schema.string().describe("代码仓库名称, 如 my-user/my-repo"),
|
|
36749
|
+
filePath: tool.schema.string().describe("文件路径, 如 src/index.ts"),
|
|
36750
|
+
content: tool.schema.string().describe("文本的字符串的内容"),
|
|
36751
|
+
encoding: tool.schema.string().describe("编码方式,如 raw").optional()
|
|
36748
36752
|
}
|
|
36749
36753
|
})
|
|
36750
36754
|
}
|
|
@@ -36775,7 +36779,7 @@ app.route({
|
|
|
36775
36779
|
skill: "delete-repo",
|
|
36776
36780
|
title: "删除代码仓库",
|
|
36777
36781
|
args: {
|
|
36778
|
-
name:
|
|
36782
|
+
name: tool.schema.string().describe("代码仓库名称")
|
|
36779
36783
|
},
|
|
36780
36784
|
summary: "删除一个代码仓库"
|
|
36781
36785
|
})
|
|
@@ -37356,9 +37360,9 @@ if (!app.hasRoute("call")) {
|
|
|
37356
37360
|
title: "调用app应用",
|
|
37357
37361
|
summary: "调用router的应用, 参数path, key, payload",
|
|
37358
37362
|
args: {
|
|
37359
|
-
path:
|
|
37360
|
-
key:
|
|
37361
|
-
payload:
|
|
37363
|
+
path: tool.schema.string().describe("应用路径,例如 cnb"),
|
|
37364
|
+
key: tool.schema.string().optional().describe("应用key,例如 list-repos"),
|
|
37365
|
+
payload: tool.schema.object({}).optional().describe("调用参数")
|
|
37362
37366
|
}
|
|
37363
37367
|
})
|
|
37364
37368
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kevisual/cnb",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "bun bun.config.ts",
|
|
8
|
-
"flow":"ev npm patch && pnpm build && ev npm publish npm -p"
|
|
8
|
+
"flow": "ev npm patch && pnpm build && ev npm publish npm -p"
|
|
9
9
|
},
|
|
10
10
|
"keywords": [],
|
|
11
11
|
"files": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
],
|
|
17
17
|
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",
|
|
18
18
|
"license": "MIT",
|
|
19
|
-
"packageManager": "pnpm@10.29.
|
|
19
|
+
"packageManager": "pnpm@10.29.3",
|
|
20
20
|
"type": "module",
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@kevisual/ai": "^0.0.24",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"@kevisual/dts": "^0.0.3",
|
|
25
25
|
"@kevisual/context": "^0.0.4",
|
|
26
26
|
"@kevisual/types": "^0.0.12",
|
|
27
|
-
"@opencode-ai/plugin": "^1.1
|
|
28
|
-
"@types/bun": "^1.3.
|
|
29
|
-
"@types/node": "^25.2.
|
|
27
|
+
"@opencode-ai/plugin": "^1.2.1",
|
|
28
|
+
"@types/bun": "^1.3.9",
|
|
29
|
+
"@types/node": "^25.2.3",
|
|
30
30
|
"@types/ws": "^8.18.1",
|
|
31
31
|
"dayjs": "^1.11.19",
|
|
32
|
-
"dotenv": "^17.
|
|
32
|
+
"dotenv": "^17.3.1"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
".": "./mod.ts",
|
|
52
52
|
"./opencode": "./dist/opencode.js",
|
|
53
53
|
"./keep": "./dist/keep.js",
|
|
54
|
+
"./keep.ts": "./src/keep.ts",
|
|
54
55
|
"./routes": "./dist/routes.js",
|
|
55
56
|
"./src/*": "./src/*",
|
|
56
57
|
"./agent/*": "./agent/*"
|
package/src/repo/index.ts
CHANGED
|
@@ -108,6 +108,10 @@ export class Repo extends CNBCore {
|
|
|
108
108
|
const url = `/${repo}`;
|
|
109
109
|
return this.patch({ url, data: params });
|
|
110
110
|
}
|
|
111
|
+
getRepo(repo: string): Promise<Result<RepoItem>> {
|
|
112
|
+
const url = `/${repo}`;
|
|
113
|
+
return this.get({ url });
|
|
114
|
+
}
|
|
111
115
|
}
|
|
112
116
|
type UpdateRepoInfo = {
|
|
113
117
|
description?: string;
|
package/src/workspace/index.ts
CHANGED
|
@@ -62,7 +62,7 @@ export class Workspace extends CNBCore {
|
|
|
62
62
|
* 停止我的云原生开发环境
|
|
63
63
|
* @param params 停止参数,pipelineId 和 sn 二选一,优先使用 pipelineId
|
|
64
64
|
*/
|
|
65
|
-
async stopWorkspace(params: { pipelineId?: string; sn?: string }): Promise<{ buildLogUrl: string; message: string; sn: string }
|
|
65
|
+
async stopWorkspace(params: { pipelineId?: string; sn?: string }): Promise<Result<{ buildLogUrl: string; message: string; sn: string }>> {
|
|
66
66
|
const data: { pipelineId?: string; sn?: string } = {};
|
|
67
67
|
|
|
68
68
|
if (params.pipelineId) {
|