@devness/useai 0.6.3 → 0.6.4
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/dist/index.js +28 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -684,7 +684,7 @@ var VERSION;
|
|
|
684
684
|
var init_version = __esm({
|
|
685
685
|
"../shared/dist/constants/version.js"() {
|
|
686
686
|
"use strict";
|
|
687
|
-
VERSION = "0.6.
|
|
687
|
+
VERSION = "0.6.4";
|
|
688
688
|
}
|
|
689
689
|
});
|
|
690
690
|
|
|
@@ -35246,9 +35246,10 @@ async function handleLocalSync(req, res) {
|
|
|
35246
35246
|
return;
|
|
35247
35247
|
}
|
|
35248
35248
|
}
|
|
35249
|
+
const MILESTONE_CHUNK = 50;
|
|
35249
35250
|
const milestones = readJson(MILESTONES_FILE, []);
|
|
35250
|
-
for (let i = 0; i < milestones.length; i +=
|
|
35251
|
-
const chunk = milestones.slice(i, i +
|
|
35251
|
+
for (let i = 0; i < milestones.length; i += MILESTONE_CHUNK) {
|
|
35252
|
+
const chunk = milestones.slice(i, i + MILESTONE_CHUNK);
|
|
35252
35253
|
const milestonesRes = await fetch(`${USEAI_API}/api/publish`, {
|
|
35253
35254
|
method: "POST",
|
|
35254
35255
|
headers,
|
|
@@ -36557,14 +36558,31 @@ var init_stdio2 = __esm({
|
|
|
36557
36558
|
});
|
|
36558
36559
|
|
|
36559
36560
|
// src/index.ts
|
|
36560
|
-
var
|
|
36561
|
-
if (
|
|
36562
|
-
const args =
|
|
36561
|
+
var command = process.argv[2];
|
|
36562
|
+
if (command === "mcp" || command?.startsWith("--")) {
|
|
36563
|
+
const args = command === "mcp" ? process.argv.slice(3) : process.argv.slice(2);
|
|
36563
36564
|
const { runSetup: runSetup2 } = await Promise.resolve().then(() => (init_setup(), setup_exports));
|
|
36564
36565
|
await runSetup2(args);
|
|
36565
36566
|
process.exit(0);
|
|
36566
36567
|
}
|
|
36567
|
-
if (
|
|
36568
|
+
if (!command && process.stdin.isTTY) {
|
|
36569
|
+
const { AI_TOOLS: AI_TOOLS2 } = await Promise.resolve().then(() => (init_tools2(), tools_exports));
|
|
36570
|
+
const isInstalled = AI_TOOLS2.some((t) => {
|
|
36571
|
+
try {
|
|
36572
|
+
return t.isConfigured();
|
|
36573
|
+
} catch {
|
|
36574
|
+
return false;
|
|
36575
|
+
}
|
|
36576
|
+
});
|
|
36577
|
+
if (isInstalled) {
|
|
36578
|
+
command = "update";
|
|
36579
|
+
} else {
|
|
36580
|
+
const { runSetup: runSetup2 } = await Promise.resolve().then(() => (init_setup(), setup_exports));
|
|
36581
|
+
await runSetup2([]);
|
|
36582
|
+
process.exit(0);
|
|
36583
|
+
}
|
|
36584
|
+
}
|
|
36585
|
+
if (command === "update") {
|
|
36568
36586
|
const { default: chalk2 } = await Promise.resolve().then(() => (init_source(), source_exports));
|
|
36569
36587
|
const { fetchLatestVersion: fetchLatestVersion2, fetchDaemonHealth: fetchDaemonHealth2, killDaemon: killDaemon2, ensureDaemon: ensureDaemon2, installClaudeCodeHooks: installClaudeCodeHooks2, VERSION: VERSION3 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
|
|
36570
36588
|
const { AI_TOOLS: AI_TOOLS2 } = await Promise.resolve().then(() => (init_tools2(), tools_exports));
|
|
@@ -36652,7 +36670,7 @@ if (subcommand === "update") {
|
|
|
36652
36670
|
`));
|
|
36653
36671
|
process.exit(0);
|
|
36654
36672
|
}
|
|
36655
|
-
if (
|
|
36673
|
+
if (command === "daemon") {
|
|
36656
36674
|
const { startDaemon: startDaemon2 } = await Promise.resolve().then(() => (init_daemon2(), daemon_exports));
|
|
36657
36675
|
const portArg = process.argv.indexOf("--port");
|
|
36658
36676
|
const port = portArg !== -1 ? parseInt(process.argv[portArg + 1], 10) : void 0;
|
|
@@ -36660,8 +36678,8 @@ if (subcommand === "daemon") {
|
|
|
36660
36678
|
await new Promise(() => {
|
|
36661
36679
|
});
|
|
36662
36680
|
}
|
|
36663
|
-
if (
|
|
36664
|
-
console.error(`Unknown
|
|
36681
|
+
if (command) {
|
|
36682
|
+
console.error(`Unknown command: "${command}"`);
|
|
36665
36683
|
console.error("Available commands: mcp, daemon, update");
|
|
36666
36684
|
process.exit(1);
|
|
36667
36685
|
}
|