hocai-connect 0.10.0 → 0.10.2

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.
Files changed (2) hide show
  1. package/dist/cli.js +35 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -39734,7 +39734,7 @@ var TOOLS = {
39734
39734
  ],
39735
39735
  WORK: ["Read", "Write", "Edit", "Glob", "Grep"]
39736
39736
  };
39737
- var VERSION = "0.10.0";
39737
+ var VERSION = "0.10.2";
39738
39738
  function claudeArgs(job, o, port) {
39739
39739
  const mcp = {
39740
39740
  mcpServers: {
@@ -40370,6 +40370,9 @@ function doTroLy() {
40370
40370
  return r.chayDuocBai;
40371
40371
  }
40372
40372
  var plan = () => daemonPlan((0, import_node_os3.platform)(), { node: process.execPath, script: APP_CLI, home: (0, import_node_os3.homedir)() });
40373
+ function nghi(ms) {
40374
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
40375
+ }
40373
40376
  function chay(cmd, im = false) {
40374
40377
  try {
40375
40378
  (0, import_node_child_process3.execFileSync)(cmd[0], cmd.slice(1), { stdio: "ignore", shell: (0, import_node_os3.platform)() === "win32" });
@@ -40392,7 +40395,16 @@ function caiDichVu() {
40392
40395
  (0, import_node_fs3.mkdirSync)((0, import_node_path5.dirname)(p.file), { recursive: true });
40393
40396
  (0, import_node_fs3.writeFileSync)(p.file, p.content);
40394
40397
  }
40395
- p.install.forEach((c, i) => chay(c, i === 0));
40398
+ p.install.forEach((c, i) => {
40399
+ if (i === 0) {
40400
+ chay(c, true);
40401
+ return;
40402
+ }
40403
+ for (let lan = 0; lan < 5; lan++) {
40404
+ if (chay(c, true)) return;
40405
+ nghi(700);
40406
+ }
40407
+ });
40396
40408
  return true;
40397
40409
  }
40398
40410
  function goDichVu() {
@@ -40400,8 +40412,29 @@ function goDichVu() {
40400
40412
  for (const c of p.uninstall) chay(c, true);
40401
40413
  if (p.file) (0, import_node_fs3.rmSync)(p.file, { force: true });
40402
40414
  }
40415
+ var LENH = ["mcp", "run", "update", "status", "stop", "logs", "quen", "help", "--help", "-h"];
40416
+ var TRO_GIUP = `hocai-connect \u2014 n\u1ED1i Claude tr\xEAn m\xE1y b\u1EA1n v\xE0o hocAI
40417
+
40418
+ npx hocai-connect c\xE0i v\xE0 b\u1EADt. M\xE1y t\u1EF1 n\u1ED1i l\u1EA1i m\u1ED7i l\u1EA7n b\u1EADt m\xE1y.
40419
+ npx hocai-connect status \u0111ang ch\u1EA1y kh\xF4ng, d\u01B0\u1EDBi t\xE0i kho\u1EA3n n\xE0o, c\xF3 b\u1EA3n m\u1EDBi kh\xF4ng
40420
+ npx hocai-connect update c\u1EADp nh\u1EADt l\xEAn b\u1EA3n m\u1EDBi nh\u1EA5t
40421
+ npx hocai-connect stop t\u1EAFt v\xE0 g\u1EE1 d\u1ECBch v\u1EE5 n\u1EC1n (ch\xECa kho\xE1 v\u1EABn gi\u1EEF)
40422
+ npx hocai-connect logs 40 d\xF2ng nh\u1EADt k\xFD cu\u1ED1i
40423
+ npx hocai-connect quen qu\xEAn ch\xECa kho\xE1 v\xE0 g\u1EE1 h\u1EB3n kh\u1ECFi m\xE1y n\xE0y
40424
+
40425
+ B\u1EA3n c\u0169 ch\u01B0a c\xF3 l\u1EC7nh update th\xEC ch\u1EA1y: npx hocai-connect@latest`;
40403
40426
  async function main() {
40404
40427
  const cmd = process.argv[2];
40428
+ if (cmd === "help" || cmd === "--help" || cmd === "-h") {
40429
+ say(TRO_GIUP);
40430
+ return;
40431
+ }
40432
+ if (cmd && !LENH.includes(cmd)) {
40433
+ say(`Kh\xF4ng c\xF3 l\u1EC7nh "${cmd}".`);
40434
+ say("");
40435
+ say(TRO_GIUP);
40436
+ process.exit(1);
40437
+ }
40405
40438
  if (cmd === "mcp") {
40406
40439
  await buildServer(process.env.HOCAI_TOKEN ?? "").connect(new StdioServerTransport());
40407
40440
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hocai-connect",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "Nối Claude trên máy học viên vào hocAI, và chạy việc AI ngay tại đó",
5
5
  "bin": {
6
6
  "hocai-connect": "bin.js"