@kevisual/cnb 0.0.59 → 0.0.60

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.
@@ -32,7 +32,7 @@ app.route({
32
32
  let content = `
33
33
  cnb工作空间的访问uri为:${finalUri}
34
34
  `
35
- ctx.body = { content };
35
+ ctx.body = { content, data: { assistant: finalUri } };
36
36
  }).addTo(app);
37
37
 
38
38
  // 获取当前cnb工作空间的vscode代理uri,执行技能 get-cnb-vscode-uri
@@ -70,23 +70,30 @@ app.route({
70
70
 
71
71
  const webUri = CNB_ENV?.CNB_VSCODE_WEB_URL as string || '';
72
72
  const vscodeSchma = CNB_ENV?.CNB_VSCODE_REMOTE_SSH_SCHEMA as string || '';
73
+ let obj: any = {
74
+
75
+ }
73
76
  let content = `
74
77
  当前的cnb 仓库为:${CNB_ENV?.CNB_REPO_SLUG}
75
78
 
76
79
  `
77
80
  if (web) {
78
81
  content += `VS Code Web 访问 URI:${webUri}\n\n`;
82
+ obj.webUri = webUri;
79
83
  }
80
84
  if (vscode) {
81
85
  content += `VS Code 访问 URI:${vscodeSchma}\n\n`;
86
+ obj.vscodeUri = vscodeSchma;
82
87
  }
83
88
  if (codebuddy) {
84
89
  const codebuddyUri = vscodeSchma.replace('vscode://vscode-remote/ssh-remote+', 'codebuddycn://vscode-remote/codebuddy-remote');
85
90
  content += `CodeBuddy 访问 URI:${codebuddyUri}\n\n`;
91
+ obj.codebuddyUri = codebuddyUri;
86
92
  }
87
93
  if (cursor) {
88
94
  const cursorUri = vscodeSchma.replace('vscode://', 'cursor://');
89
95
  content += `Cursor 访问 URI:${cursorUri}\n\n`;
96
+ obj.cursorUri = cursorUri;
90
97
  }
91
98
  // if (trae) {
92
99
  // const traeUri = vscodeSchma.replace('vscode://vscode-remote/ssh-remote+', 'traecn://ssh-remote+');
@@ -94,6 +101,7 @@ app.route({
94
101
  // }
95
102
  if (ssh) {
96
103
  content += `VS Code Remote SSH 连接字符串:ssh ${CNB_ENV.CNB_PIPELINE_ID}.${CNB_ENV.CNB_VSCODE_SSH_TOKEN}@cnb.space`;
104
+ obj.sshUri = `ssh ${CNB_ENV.CNB_PIPELINE_ID}.${CNB_ENV.CNB_VSCODE_SSH_TOKEN}@cnb.space`;
97
105
  }
98
- ctx.body = { content };
106
+ ctx.body = { content, data: obj };
99
107
  }).addTo(app);
package/dist/cli.js CHANGED
@@ -4432,7 +4432,7 @@ var require_commander = __commonJS((exports) => {
4432
4432
  exports.InvalidOptionArgumentError = InvalidArgumentError3;
4433
4433
  });
4434
4434
 
4435
- // ../../node_modules/.pnpm/@kevisual+router@0.1.6/node_modules/@kevisual/router/dist/router.js
4435
+ // ../../node_modules/.pnpm/@kevisual+router@0.1.7/node_modules/@kevisual/router/dist/router.js
4436
4436
  import { createRequire as createRequire2 } from "node:module";
4437
4437
  import { webcrypto as crypto } from "node:crypto";
4438
4438
  import url2 from "node:url";
@@ -47931,7 +47931,7 @@ app.route({
47931
47931
  let content = `
47932
47932
  cnb工作空间的访问uri为:${finalUri}
47933
47933
  `;
47934
- ctx.body = { content };
47934
+ ctx.body = { content, data: { assistant: finalUri } };
47935
47935
  }).addTo(app);
47936
47936
  app.route({
47937
47937
  path: "cnb",
@@ -47963,6 +47963,7 @@ app.route({
47963
47963
  const ssh = ctx.query?.ssh ?? false;
47964
47964
  const webUri = CNB_ENV?.CNB_VSCODE_WEB_URL || "";
47965
47965
  const vscodeSchma = CNB_ENV?.CNB_VSCODE_REMOTE_SSH_SCHEMA || "";
47966
+ let obj = {};
47966
47967
  let content = `
47967
47968
  当前的cnb 仓库为:${CNB_ENV?.CNB_REPO_SLUG}
47968
47969
 
@@ -47971,28 +47972,33 @@ app.route({
47971
47972
  content += `VS Code Web 访问 URI:${webUri}
47972
47973
 
47973
47974
  `;
47975
+ obj.webUri = webUri;
47974
47976
  }
47975
47977
  if (vscode) {
47976
47978
  content += `VS Code 访问 URI:${vscodeSchma}
47977
47979
 
47978
47980
  `;
47981
+ obj.vscodeUri = vscodeSchma;
47979
47982
  }
47980
47983
  if (codebuddy) {
47981
47984
  const codebuddyUri = vscodeSchma.replace("vscode://vscode-remote/ssh-remote+", "codebuddycn://vscode-remote/codebuddy-remote");
47982
47985
  content += `CodeBuddy 访问 URI:${codebuddyUri}
47983
47986
 
47984
47987
  `;
47988
+ obj.codebuddyUri = codebuddyUri;
47985
47989
  }
47986
47990
  if (cursor) {
47987
47991
  const cursorUri = vscodeSchma.replace("vscode://", "cursor://");
47988
47992
  content += `Cursor 访问 URI:${cursorUri}
47989
47993
 
47990
47994
  `;
47995
+ obj.cursorUri = cursorUri;
47991
47996
  }
47992
47997
  if (ssh) {
47993
47998
  content += `VS Code Remote SSH 连接字符串:ssh ${CNB_ENV.CNB_PIPELINE_ID}.${CNB_ENV.CNB_VSCODE_SSH_TOKEN}@cnb.space`;
47999
+ obj.sshUri = `ssh ${CNB_ENV.CNB_PIPELINE_ID}.${CNB_ENV.CNB_VSCODE_SSH_TOKEN}@cnb.space`;
47994
48000
  }
47995
- ctx.body = { content };
48001
+ ctx.body = { content, data: obj };
47996
48002
  }).addTo(app);
47997
48003
 
47998
48004
  // agent/routes/cnb-env/env.ts
@@ -56759,7 +56765,7 @@ class RemoteApp {
56759
56765
  }
56760
56766
  }
56761
56767
 
56762
- // ../../node_modules/.pnpm/@kevisual+router@0.1.6/node_modules/@kevisual/router/src/commander.ts
56768
+ // ../../node_modules/.pnpm/@kevisual+router@0.1.7/node_modules/@kevisual/router/src/commander.ts
56763
56769
  var groupByPath = (routes) => {
56764
56770
  return routes.reduce((acc, route) => {
56765
56771
  const path3 = route.path || "default";
@@ -56884,6 +56890,7 @@ var parse8 = async (opts) => {
56884
56890
  if (opts.remote) {
56885
56891
  const { token: token2, username, id } = opts.remote;
56886
56892
  const remoteApp = new RemoteApp({
56893
+ app: app3,
56887
56894
  token: token2,
56888
56895
  username,
56889
56896
  id
package/dist/npc.js CHANGED
@@ -4432,7 +4432,7 @@ var require_commander = __commonJS((exports) => {
4432
4432
  exports.InvalidOptionArgumentError = InvalidArgumentError3;
4433
4433
  });
4434
4434
 
4435
- // ../../node_modules/.pnpm/@kevisual+router@0.1.6/node_modules/@kevisual/router/dist/router.js
4435
+ // ../../node_modules/.pnpm/@kevisual+router@0.1.7/node_modules/@kevisual/router/dist/router.js
4436
4436
  import { createRequire as createRequire2 } from "node:module";
4437
4437
  import { webcrypto as crypto } from "node:crypto";
4438
4438
  import url2 from "node:url";
@@ -47965,7 +47965,7 @@ app.route({
47965
47965
  let content = `
47966
47966
  cnb工作空间的访问uri为:${finalUri}
47967
47967
  `;
47968
- ctx.body = { content };
47968
+ ctx.body = { content, data: { assistant: finalUri } };
47969
47969
  }).addTo(app);
47970
47970
  app.route({
47971
47971
  path: "cnb",
@@ -47997,6 +47997,7 @@ app.route({
47997
47997
  const ssh = ctx.query?.ssh ?? false;
47998
47998
  const webUri = CNB_ENV?.CNB_VSCODE_WEB_URL || "";
47999
47999
  const vscodeSchma = CNB_ENV?.CNB_VSCODE_REMOTE_SSH_SCHEMA || "";
48000
+ let obj = {};
48000
48001
  let content = `
48001
48002
  当前的cnb 仓库为:${CNB_ENV?.CNB_REPO_SLUG}
48002
48003
 
@@ -48005,28 +48006,33 @@ app.route({
48005
48006
  content += `VS Code Web 访问 URI:${webUri}
48006
48007
 
48007
48008
  `;
48009
+ obj.webUri = webUri;
48008
48010
  }
48009
48011
  if (vscode) {
48010
48012
  content += `VS Code 访问 URI:${vscodeSchma}
48011
48013
 
48012
48014
  `;
48015
+ obj.vscodeUri = vscodeSchma;
48013
48016
  }
48014
48017
  if (codebuddy) {
48015
48018
  const codebuddyUri = vscodeSchma.replace("vscode://vscode-remote/ssh-remote+", "codebuddycn://vscode-remote/codebuddy-remote");
48016
48019
  content += `CodeBuddy 访问 URI:${codebuddyUri}
48017
48020
 
48018
48021
  `;
48022
+ obj.codebuddyUri = codebuddyUri;
48019
48023
  }
48020
48024
  if (cursor) {
48021
48025
  const cursorUri = vscodeSchma.replace("vscode://", "cursor://");
48022
48026
  content += `Cursor 访问 URI:${cursorUri}
48023
48027
 
48024
48028
  `;
48029
+ obj.cursorUri = cursorUri;
48025
48030
  }
48026
48031
  if (ssh) {
48027
48032
  content += `VS Code Remote SSH 连接字符串:ssh ${CNB_ENV.CNB_PIPELINE_ID}.${CNB_ENV.CNB_VSCODE_SSH_TOKEN}@cnb.space`;
48033
+ obj.sshUri = `ssh ${CNB_ENV.CNB_PIPELINE_ID}.${CNB_ENV.CNB_VSCODE_SSH_TOKEN}@cnb.space`;
48028
48034
  }
48029
- ctx.body = { content };
48035
+ ctx.body = { content, data: obj };
48030
48036
  }).addTo(app);
48031
48037
 
48032
48038
  // agent/routes/cnb-env/env.ts
@@ -56793,7 +56799,7 @@ class RemoteApp {
56793
56799
  }
56794
56800
  }
56795
56801
 
56796
- // ../../node_modules/.pnpm/@kevisual+router@0.1.6/node_modules/@kevisual/router/src/commander.ts
56802
+ // ../../node_modules/.pnpm/@kevisual+router@0.1.7/node_modules/@kevisual/router/src/commander.ts
56797
56803
  var groupByPath = (routes) => {
56798
56804
  return routes.reduce((acc, route) => {
56799
56805
  const path3 = route.path || "default";
@@ -56918,6 +56924,7 @@ var parse8 = async (opts) => {
56918
56924
  if (opts.remote) {
56919
56925
  const { token: token2, username, id } = opts.remote;
56920
56926
  const remoteApp = new RemoteApp({
56927
+ app: app3,
56921
56928
  token: token2,
56922
56929
  username,
56923
56930
  id
package/dist/opencode.js CHANGED
@@ -2339,7 +2339,7 @@ var require_src = __commonJS((exports) => {
2339
2339
  };
2340
2340
  });
2341
2341
 
2342
- // ../../node_modules/.pnpm/@kevisual+router@0.1.6/node_modules/@kevisual/router/dist/router.js
2342
+ // ../../node_modules/.pnpm/@kevisual+router@0.1.7/node_modules/@kevisual/router/dist/router.js
2343
2343
  import { createRequire as createRequire2 } from "node:module";
2344
2344
  import { webcrypto as crypto } from "node:crypto";
2345
2345
  import url2 from "node:url";
@@ -45838,7 +45838,7 @@ app.route({
45838
45838
  let content = `
45839
45839
  cnb工作空间的访问uri为:${finalUri}
45840
45840
  `;
45841
- ctx.body = { content };
45841
+ ctx.body = { content, data: { assistant: finalUri } };
45842
45842
  }).addTo(app);
45843
45843
  app.route({
45844
45844
  path: "cnb",
@@ -45870,6 +45870,7 @@ app.route({
45870
45870
  const ssh = ctx.query?.ssh ?? false;
45871
45871
  const webUri = CNB_ENV?.CNB_VSCODE_WEB_URL || "";
45872
45872
  const vscodeSchma = CNB_ENV?.CNB_VSCODE_REMOTE_SSH_SCHEMA || "";
45873
+ let obj = {};
45873
45874
  let content = `
45874
45875
  当前的cnb 仓库为:${CNB_ENV?.CNB_REPO_SLUG}
45875
45876
 
@@ -45878,28 +45879,33 @@ app.route({
45878
45879
  content += `VS Code Web 访问 URI:${webUri}
45879
45880
 
45880
45881
  `;
45882
+ obj.webUri = webUri;
45881
45883
  }
45882
45884
  if (vscode) {
45883
45885
  content += `VS Code 访问 URI:${vscodeSchma}
45884
45886
 
45885
45887
  `;
45888
+ obj.vscodeUri = vscodeSchma;
45886
45889
  }
45887
45890
  if (codebuddy) {
45888
45891
  const codebuddyUri = vscodeSchma.replace("vscode://vscode-remote/ssh-remote+", "codebuddycn://vscode-remote/codebuddy-remote");
45889
45892
  content += `CodeBuddy 访问 URI:${codebuddyUri}
45890
45893
 
45891
45894
  `;
45895
+ obj.codebuddyUri = codebuddyUri;
45892
45896
  }
45893
45897
  if (cursor) {
45894
45898
  const cursorUri = vscodeSchma.replace("vscode://", "cursor://");
45895
45899
  content += `Cursor 访问 URI:${cursorUri}
45896
45900
 
45897
45901
  `;
45902
+ obj.cursorUri = cursorUri;
45898
45903
  }
45899
45904
  if (ssh) {
45900
45905
  content += `VS Code Remote SSH 连接字符串:ssh ${CNB_ENV.CNB_PIPELINE_ID}.${CNB_ENV.CNB_VSCODE_SSH_TOKEN}@cnb.space`;
45906
+ obj.sshUri = `ssh ${CNB_ENV.CNB_PIPELINE_ID}.${CNB_ENV.CNB_VSCODE_SSH_TOKEN}@cnb.space`;
45901
45907
  }
45902
- ctx.body = { content };
45908
+ ctx.body = { content, data: obj };
45903
45909
  }).addTo(app);
45904
45910
 
45905
45911
  // agent/routes/cnb-env/env.ts
@@ -54166,7 +54172,7 @@ app.route({
54166
54172
  }
54167
54173
  }).addTo(app, { overwrite: false });
54168
54174
 
54169
- // ../../node_modules/.pnpm/@kevisual+router@0.1.6/node_modules/@kevisual/router/dist/opencode.js
54175
+ // ../../node_modules/.pnpm/@kevisual+router@0.1.7/node_modules/@kevisual/router/dist/opencode.js
54170
54176
  import { createRequire as createRequire4 } from "node:module";
54171
54177
  import { webcrypto as crypto2 } from "node:crypto";
54172
54178
  var __create4 = Object.create;
package/dist/routes.js CHANGED
@@ -2339,7 +2339,7 @@ var require_src = __commonJS((exports) => {
2339
2339
  };
2340
2340
  });
2341
2341
 
2342
- // ../../node_modules/.pnpm/@kevisual+router@0.1.6/node_modules/@kevisual/router/dist/router.js
2342
+ // ../../node_modules/.pnpm/@kevisual+router@0.1.7/node_modules/@kevisual/router/dist/router.js
2343
2343
  import { createRequire as createRequire2 } from "node:module";
2344
2344
  import { webcrypto as crypto } from "node:crypto";
2345
2345
  import url2 from "node:url";
@@ -45838,7 +45838,7 @@ app.route({
45838
45838
  let content = `
45839
45839
  cnb工作空间的访问uri为:${finalUri}
45840
45840
  `;
45841
- ctx.body = { content };
45841
+ ctx.body = { content, data: { assistant: finalUri } };
45842
45842
  }).addTo(app);
45843
45843
  app.route({
45844
45844
  path: "cnb",
@@ -45870,6 +45870,7 @@ app.route({
45870
45870
  const ssh = ctx.query?.ssh ?? false;
45871
45871
  const webUri = CNB_ENV?.CNB_VSCODE_WEB_URL || "";
45872
45872
  const vscodeSchma = CNB_ENV?.CNB_VSCODE_REMOTE_SSH_SCHEMA || "";
45873
+ let obj = {};
45873
45874
  let content = `
45874
45875
  当前的cnb 仓库为:${CNB_ENV?.CNB_REPO_SLUG}
45875
45876
 
@@ -45878,28 +45879,33 @@ app.route({
45878
45879
  content += `VS Code Web 访问 URI:${webUri}
45879
45880
 
45880
45881
  `;
45882
+ obj.webUri = webUri;
45881
45883
  }
45882
45884
  if (vscode) {
45883
45885
  content += `VS Code 访问 URI:${vscodeSchma}
45884
45886
 
45885
45887
  `;
45888
+ obj.vscodeUri = vscodeSchma;
45886
45889
  }
45887
45890
  if (codebuddy) {
45888
45891
  const codebuddyUri = vscodeSchma.replace("vscode://vscode-remote/ssh-remote+", "codebuddycn://vscode-remote/codebuddy-remote");
45889
45892
  content += `CodeBuddy 访问 URI:${codebuddyUri}
45890
45893
 
45891
45894
  `;
45895
+ obj.codebuddyUri = codebuddyUri;
45892
45896
  }
45893
45897
  if (cursor) {
45894
45898
  const cursorUri = vscodeSchma.replace("vscode://", "cursor://");
45895
45899
  content += `Cursor 访问 URI:${cursorUri}
45896
45900
 
45897
45901
  `;
45902
+ obj.cursorUri = cursorUri;
45898
45903
  }
45899
45904
  if (ssh) {
45900
45905
  content += `VS Code Remote SSH 连接字符串:ssh ${CNB_ENV.CNB_PIPELINE_ID}.${CNB_ENV.CNB_VSCODE_SSH_TOKEN}@cnb.space`;
45906
+ obj.sshUri = `ssh ${CNB_ENV.CNB_PIPELINE_ID}.${CNB_ENV.CNB_VSCODE_SSH_TOKEN}@cnb.space`;
45901
45907
  }
45902
- ctx.body = { content };
45908
+ ctx.body = { content, data: obj };
45903
45909
  }).addTo(app);
45904
45910
 
45905
45911
  // agent/routes/cnb-env/env.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kevisual/cnb",
3
- "version": "0.0.59",
3
+ "version": "0.0.60",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "basename": "/root/cnb",