@suwujs/king-ai 0.2.2 → 0.2.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/src/cli.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { cli, command } from "cleye";
3
- import { pathToFileURL } from "node:url";
3
+ import { realpathSync } from "node:fs";
4
+ import { fileURLToPath } from "node:url";
4
5
  import { CURRENT_VERSION, DEFAULT_SERVER, normalizeCommandName } from "./paths.js";
5
6
  import { doPair, doRun, runDoctor } from "./daemon.js";
6
7
  import { cleanupWorktrees, installService, isServiceInstalled, prepareWorktrees, printStatus, readRunningState, reloadService, restartService, stopService, tailLogs, uninstallService, watchStatus } from "./service.js";
@@ -1652,7 +1653,7 @@ const hostCommand = command({
1652
1653
  async function main() {
1653
1654
  await cli({
1654
1655
  name: commandNameFromArgv(process.argv[1]),
1655
- version: "0.1.0",
1656
+ version: CURRENT_VERSION,
1656
1657
  strictFlags: true,
1657
1658
  commands: [agentCommand, skillCheckCommand, projectProfileCommand, usageCommand, teamCommand, hostCommand],
1658
1659
  help: {
@@ -1689,7 +1690,12 @@ async function main() {
1689
1690
  console.log(`Run \`${commandName} --help\` for usage.`);
1690
1691
  });
1691
1692
  }
1692
- if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
1693
+ function isDirectCliInvocation(argv1, moduleUrl) {
1694
+ if (!argv1)
1695
+ return false;
1696
+ return realpathSync(argv1) === realpathSync(fileURLToPath(moduleUrl));
1697
+ }
1698
+ if (isDirectCliInvocation(process.argv[1], import.meta.url)) {
1693
1699
  void main().catch((err) => {
1694
1700
  process.stderr.write(`${commandNameFromArgv(process.argv[1])}: ${err instanceof Error ? err.message : String(err)}\n`);
1695
1701
  process.exit(70);
@@ -15,5 +15,5 @@ export declare const HEARTBEAT_PATH: string;
15
15
  export declare const HOST_EVENTS_PATH: string;
16
16
  export declare const HOST_RUNS_PATH: string;
17
17
  export declare const SERVICE_LABEL = "dev.king-ai";
18
- export declare const CURRENT_VERSION = "0.1.0";
18
+ export declare const CURRENT_VERSION = "0.2.4";
19
19
  export declare const DEFAULT_SERVER: string;
package/dist/src/paths.js CHANGED
@@ -22,5 +22,5 @@ export const HEARTBEAT_PATH = join(CONFIG_DIR, "heartbeat.json");
22
22
  export const HOST_EVENTS_PATH = join(CONFIG_DIR, "host-events.ndjson");
23
23
  export const HOST_RUNS_PATH = join(CONFIG_DIR, "host-runs.ndjson");
24
24
  export const SERVICE_LABEL = "dev.king-ai";
25
- export const CURRENT_VERSION = "0.1.0";
25
+ export const CURRENT_VERSION = "0.2.4";
26
26
  export const DEFAULT_SERVER = process.env.KING_AI_SERVER_URL || "https://api.king-ai.ai";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suwujs/king-ai",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "King AI, a local BYOA agent daemon that bridges remote runtime events to Claude or Codex CLI.",
5
5
  "type": "module",
6
6
  "bin": {