@kevisual/cnb 0.0.35 → 0.0.36
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/command.ts +4 -0
- package/agent/routes/cnb-board/index.ts +2 -2
- package/agent/routes/index.ts +1 -1
- package/agent/routes/share/index.ts +48 -0
- package/bin/index.js +2 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +57853 -0
- package/dist/opencode.js +54 -5
- package/dist/routes.js +53 -4
- package/package.json +10 -6
package/dist/opencode.js
CHANGED
|
@@ -316,7 +316,7 @@ var require_dayjs_min = __commonJS((exports, module) => {
|
|
|
316
316
|
});
|
|
317
317
|
});
|
|
318
318
|
|
|
319
|
-
// node_modules/.pnpm/@kevisual+router@0.0.
|
|
319
|
+
// node_modules/.pnpm/@kevisual+router@0.0.88/node_modules/@kevisual/router/dist/router.js
|
|
320
320
|
import { createRequire } from "node:module";
|
|
321
321
|
import { webcrypto as crypto2 } from "node:crypto";
|
|
322
322
|
import url2 from "node:url";
|
|
@@ -17597,6 +17597,10 @@ class QueryRouterServer extends QueryRouter {
|
|
|
17597
17597
|
}
|
|
17598
17598
|
return super.run(msg, ctx);
|
|
17599
17599
|
}
|
|
17600
|
+
async runAction(api2, payload, ctx) {
|
|
17601
|
+
const { path, key, id } = api2;
|
|
17602
|
+
return this.run({ path, key, id, payload }, ctx);
|
|
17603
|
+
}
|
|
17600
17604
|
}
|
|
17601
17605
|
var isNode = typeof process !== "undefined" && process.versions != null && process.versions.node != null;
|
|
17602
17606
|
var isBrowser = typeof window !== "undefined" && typeof document !== "undefined" && typeof document.createElement === "function";
|
|
@@ -33935,7 +33939,7 @@ config3(en_default2());
|
|
|
33935
33939
|
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/index.js
|
|
33936
33940
|
var zod_default = exports_external2;
|
|
33937
33941
|
|
|
33938
|
-
// node_modules/.pnpm/@opencode-ai+plugin@1.2.
|
|
33942
|
+
// node_modules/.pnpm/@opencode-ai+plugin@1.2.20/node_modules/@opencode-ai/plugin/dist/tool.js
|
|
33939
33943
|
function tool2(input) {
|
|
33940
33944
|
return input;
|
|
33941
33945
|
}
|
|
@@ -55533,7 +55537,7 @@ var execCommand = (command, options = {}) => {
|
|
|
55533
55537
|
});
|
|
55534
55538
|
};
|
|
55535
55539
|
app.route({
|
|
55536
|
-
path: "
|
|
55540
|
+
path: "cnb_board",
|
|
55537
55541
|
key: "is-cnb-board",
|
|
55538
55542
|
description: "检查是否是 cnb-board 环境",
|
|
55539
55543
|
middleware: ["auth-admin"]
|
|
@@ -55544,7 +55548,7 @@ app.route({
|
|
|
55544
55548
|
};
|
|
55545
55549
|
}).addTo(app);
|
|
55546
55550
|
app.route({
|
|
55547
|
-
path: "
|
|
55551
|
+
path: "cnb_board",
|
|
55548
55552
|
key: "exit",
|
|
55549
55553
|
description: "cnb的工作环境退出程序",
|
|
55550
55554
|
middleware: ["auth-admin"]
|
|
@@ -55553,6 +55557,51 @@ app.route({
|
|
|
55553
55557
|
execCommand(cmd);
|
|
55554
55558
|
}).addTo(app);
|
|
55555
55559
|
|
|
55560
|
+
// agent/routes/share/index.ts
|
|
55561
|
+
app.route({
|
|
55562
|
+
path: "cnb",
|
|
55563
|
+
key: "get-assistant-url",
|
|
55564
|
+
description: "获取cnb工作空间中部署的各个助手的访问地址",
|
|
55565
|
+
middleware: ["auth"],
|
|
55566
|
+
metadata: {
|
|
55567
|
+
args: {
|
|
55568
|
+
more: zod_default.boolean().describe("需要更多信息")
|
|
55569
|
+
}
|
|
55570
|
+
}
|
|
55571
|
+
}).define(async (ctx) => {
|
|
55572
|
+
const uri = useKey("CNB_VSCODE_PROXY_URI") || "";
|
|
55573
|
+
const base = {
|
|
55574
|
+
base: uri,
|
|
55575
|
+
link: uri.replace("{{port}}", "51515"),
|
|
55576
|
+
kevisual: uri.replace("{{port}}", "51515"),
|
|
55577
|
+
openclaw: uri.replace("{{port}}", "80"),
|
|
55578
|
+
opencode: uri.replace("{{port}}", "100"),
|
|
55579
|
+
openwebui: uri.replace("{{port}}", "200"),
|
|
55580
|
+
note: uri.replace("{{port}}", "3000"),
|
|
55581
|
+
uptime: uri.replace("{{port}}", "3001"),
|
|
55582
|
+
immich: uri.replace("{{port}}", "2283"),
|
|
55583
|
+
nocodb: uri.replace("{{port}}", "4000"),
|
|
55584
|
+
openlist: uri.replace("{{port}}", "5244"),
|
|
55585
|
+
xiaoyao: uri.replace("{{port}}", "5678"),
|
|
55586
|
+
meilisearch: uri.replace("{{port}}", "7700"),
|
|
55587
|
+
bark: uri.replace("{{port}}", "9111"),
|
|
55588
|
+
vaultwarden: uri.replace("{{port}}", "8180"),
|
|
55589
|
+
music: uri.replace("{{port}}", "8096"),
|
|
55590
|
+
jellyfin: uri.replace("{{port}}", "8096"),
|
|
55591
|
+
homeassistant: uri.replace("{{port}}", "8123"),
|
|
55592
|
+
cloudreve: uri.replace("{{port}}", "5212"),
|
|
55593
|
+
filebrowser: uri.replace("{{port}}", "8081"),
|
|
55594
|
+
vscode: useKey("CNB_VSCODE_PROXY_URI") || "",
|
|
55595
|
+
codeServer: uri.replace("{{port}}", "10000"),
|
|
55596
|
+
gitea: uri.replace("{{port}}", "3000"),
|
|
55597
|
+
calibre: uri.replace("{{port}}", "8083"),
|
|
55598
|
+
searXNG: uri.replace("{{port}}", "8888")
|
|
55599
|
+
};
|
|
55600
|
+
ctx.body = {
|
|
55601
|
+
...base
|
|
55602
|
+
};
|
|
55603
|
+
}).addTo(app);
|
|
55604
|
+
|
|
55556
55605
|
// agent/routes/index.ts
|
|
55557
55606
|
var checkAppId = (ctx, appId) => {
|
|
55558
55607
|
const _appId = ctx?.app?.appId;
|
|
@@ -55582,7 +55631,7 @@ app.route({
|
|
|
55582
55631
|
}
|
|
55583
55632
|
}).addTo(app, { overwrite: false });
|
|
55584
55633
|
|
|
55585
|
-
// node_modules/.pnpm/@kevisual+router@0.0.
|
|
55634
|
+
// node_modules/.pnpm/@kevisual+router@0.0.88/node_modules/@kevisual/router/dist/opencode.js
|
|
55586
55635
|
import { webcrypto as crypto3 } from "node:crypto";
|
|
55587
55636
|
var __create5 = Object.create;
|
|
55588
55637
|
var __getProtoOf5 = Object.getPrototypeOf;
|
package/dist/routes.js
CHANGED
|
@@ -316,7 +316,7 @@ var require_dayjs_min = __commonJS((exports, module) => {
|
|
|
316
316
|
});
|
|
317
317
|
});
|
|
318
318
|
|
|
319
|
-
// node_modules/.pnpm/@kevisual+router@0.0.
|
|
319
|
+
// node_modules/.pnpm/@kevisual+router@0.0.88/node_modules/@kevisual/router/dist/router.js
|
|
320
320
|
import { createRequire } from "node:module";
|
|
321
321
|
import { webcrypto as crypto2 } from "node:crypto";
|
|
322
322
|
import url2 from "node:url";
|
|
@@ -17597,6 +17597,10 @@ class QueryRouterServer extends QueryRouter {
|
|
|
17597
17597
|
}
|
|
17598
17598
|
return super.run(msg, ctx);
|
|
17599
17599
|
}
|
|
17600
|
+
async runAction(api2, payload, ctx) {
|
|
17601
|
+
const { path, key, id } = api2;
|
|
17602
|
+
return this.run({ path, key, id, payload }, ctx);
|
|
17603
|
+
}
|
|
17600
17604
|
}
|
|
17601
17605
|
var isNode = typeof process !== "undefined" && process.versions != null && process.versions.node != null;
|
|
17602
17606
|
var isBrowser = typeof window !== "undefined" && typeof document !== "undefined" && typeof document.createElement === "function";
|
|
@@ -33935,7 +33939,7 @@ config3(en_default2());
|
|
|
33935
33939
|
// node_modules/.pnpm/zod@4.3.6/node_modules/zod/index.js
|
|
33936
33940
|
var zod_default = exports_external2;
|
|
33937
33941
|
|
|
33938
|
-
// node_modules/.pnpm/@opencode-ai+plugin@1.2.
|
|
33942
|
+
// node_modules/.pnpm/@opencode-ai+plugin@1.2.20/node_modules/@opencode-ai/plugin/dist/tool.js
|
|
33939
33943
|
function tool2(input) {
|
|
33940
33944
|
return input;
|
|
33941
33945
|
}
|
|
@@ -55533,7 +55537,7 @@ var execCommand = (command, options = {}) => {
|
|
|
55533
55537
|
});
|
|
55534
55538
|
};
|
|
55535
55539
|
app.route({
|
|
55536
|
-
path: "
|
|
55540
|
+
path: "cnb_board",
|
|
55537
55541
|
key: "is-cnb-board",
|
|
55538
55542
|
description: "检查是否是 cnb-board 环境",
|
|
55539
55543
|
middleware: ["auth-admin"]
|
|
@@ -55544,7 +55548,7 @@ app.route({
|
|
|
55544
55548
|
};
|
|
55545
55549
|
}).addTo(app);
|
|
55546
55550
|
app.route({
|
|
55547
|
-
path: "
|
|
55551
|
+
path: "cnb_board",
|
|
55548
55552
|
key: "exit",
|
|
55549
55553
|
description: "cnb的工作环境退出程序",
|
|
55550
55554
|
middleware: ["auth-admin"]
|
|
@@ -55553,6 +55557,51 @@ app.route({
|
|
|
55553
55557
|
execCommand(cmd);
|
|
55554
55558
|
}).addTo(app);
|
|
55555
55559
|
|
|
55560
|
+
// agent/routes/share/index.ts
|
|
55561
|
+
app.route({
|
|
55562
|
+
path: "cnb",
|
|
55563
|
+
key: "get-assistant-url",
|
|
55564
|
+
description: "获取cnb工作空间中部署的各个助手的访问地址",
|
|
55565
|
+
middleware: ["auth"],
|
|
55566
|
+
metadata: {
|
|
55567
|
+
args: {
|
|
55568
|
+
more: zod_default.boolean().describe("需要更多信息")
|
|
55569
|
+
}
|
|
55570
|
+
}
|
|
55571
|
+
}).define(async (ctx) => {
|
|
55572
|
+
const uri = useKey("CNB_VSCODE_PROXY_URI") || "";
|
|
55573
|
+
const base = {
|
|
55574
|
+
base: uri,
|
|
55575
|
+
link: uri.replace("{{port}}", "51515"),
|
|
55576
|
+
kevisual: uri.replace("{{port}}", "51515"),
|
|
55577
|
+
openclaw: uri.replace("{{port}}", "80"),
|
|
55578
|
+
opencode: uri.replace("{{port}}", "100"),
|
|
55579
|
+
openwebui: uri.replace("{{port}}", "200"),
|
|
55580
|
+
note: uri.replace("{{port}}", "3000"),
|
|
55581
|
+
uptime: uri.replace("{{port}}", "3001"),
|
|
55582
|
+
immich: uri.replace("{{port}}", "2283"),
|
|
55583
|
+
nocodb: uri.replace("{{port}}", "4000"),
|
|
55584
|
+
openlist: uri.replace("{{port}}", "5244"),
|
|
55585
|
+
xiaoyao: uri.replace("{{port}}", "5678"),
|
|
55586
|
+
meilisearch: uri.replace("{{port}}", "7700"),
|
|
55587
|
+
bark: uri.replace("{{port}}", "9111"),
|
|
55588
|
+
vaultwarden: uri.replace("{{port}}", "8180"),
|
|
55589
|
+
music: uri.replace("{{port}}", "8096"),
|
|
55590
|
+
jellyfin: uri.replace("{{port}}", "8096"),
|
|
55591
|
+
homeassistant: uri.replace("{{port}}", "8123"),
|
|
55592
|
+
cloudreve: uri.replace("{{port}}", "5212"),
|
|
55593
|
+
filebrowser: uri.replace("{{port}}", "8081"),
|
|
55594
|
+
vscode: useKey("CNB_VSCODE_PROXY_URI") || "",
|
|
55595
|
+
codeServer: uri.replace("{{port}}", "10000"),
|
|
55596
|
+
gitea: uri.replace("{{port}}", "3000"),
|
|
55597
|
+
calibre: uri.replace("{{port}}", "8083"),
|
|
55598
|
+
searXNG: uri.replace("{{port}}", "8888")
|
|
55599
|
+
};
|
|
55600
|
+
ctx.body = {
|
|
55601
|
+
...base
|
|
55602
|
+
};
|
|
55603
|
+
}).addTo(app);
|
|
55604
|
+
|
|
55556
55605
|
// agent/routes/index.ts
|
|
55557
55606
|
var checkAppId = (ctx, appId) => {
|
|
55558
55607
|
const _appId = ctx?.app?.appId;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kevisual/cnb",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
"flow": "ev npm patch && pnpm build && ev npm publish npm -p"
|
|
9
9
|
},
|
|
10
10
|
"keywords": [],
|
|
11
|
+
"bin": {
|
|
12
|
+
"cnb": "./bin/index.js"
|
|
13
|
+
},
|
|
11
14
|
"files": [
|
|
12
15
|
"dist",
|
|
13
16
|
"src",
|
|
@@ -21,13 +24,14 @@
|
|
|
21
24
|
"devDependencies": {
|
|
22
25
|
"@kevisual/ai": "^0.0.26",
|
|
23
26
|
"@kevisual/code-builder": "^0.0.6",
|
|
24
|
-
"@kevisual/dts": "^0.0.4",
|
|
25
27
|
"@kevisual/context": "^0.0.8",
|
|
28
|
+
"@kevisual/dts": "^0.0.4",
|
|
26
29
|
"@kevisual/types": "^0.0.12",
|
|
27
|
-
"@opencode-ai/plugin": "^1.2.
|
|
30
|
+
"@opencode-ai/plugin": "^1.2.20",
|
|
28
31
|
"@types/bun": "^1.3.10",
|
|
29
|
-
"@types/node": "^25.3.
|
|
32
|
+
"@types/node": "^25.3.5",
|
|
30
33
|
"@types/ws": "^8.18.1",
|
|
34
|
+
"commander": "^14.0.3",
|
|
31
35
|
"dayjs": "^1.11.19",
|
|
32
36
|
"dotenv": "^17.3.1"
|
|
33
37
|
},
|
|
@@ -38,8 +42,8 @@
|
|
|
38
42
|
"zod": "^4.3.6"
|
|
39
43
|
},
|
|
40
44
|
"dependencies": {
|
|
41
|
-
"@kevisual/query": "^0.0.
|
|
42
|
-
"@kevisual/router": "^0.0.
|
|
45
|
+
"@kevisual/query": "^0.0.53",
|
|
46
|
+
"@kevisual/router": "^0.0.88",
|
|
43
47
|
"@kevisual/use-config": "^1.0.30",
|
|
44
48
|
"es-toolkit": "^1.45.1",
|
|
45
49
|
"nanoid": "^5.1.6",
|