skykoi 2026.3.269 → 2026.3.270

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 (30) hide show
  1. package/dist/{bonjour-discovery-DmkS5JkQ.js → bonjour-discovery-cnMfrXln.js} +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  4. package/dist/{channel-options-vC0scakt.js → channel-options-6wrOTIgK.js} +1 -1
  5. package/dist/{channels-cli-B9azrEo1.js → channels-cli-Cm7T8L84.js} +2 -2
  6. package/dist/{completion-cli-CLsNQlJq.js → completion-cli-DMjLvMfl.js} +1 -1
  7. package/dist/{config-guard-DFPXxhoK.js → config-guard-BYBOqcCc.js} +292 -12
  8. package/dist/{configure-DfMyIRIK.js → configure-Iti6aX3P.js} +2 -2
  9. package/dist/{cron-cli-DX-jyUlc.js → cron-cli-_UjEtRij.js} +1 -1
  10. package/dist/{dns-cli-BNKjP3mP.js → dns-cli-CVVLxo5W.js} +1 -1
  11. package/dist/{doctor-DAvgdUEr.js → doctor-DQ9DDwkd.js} +2 -2
  12. package/dist/entry.js +1 -1
  13. package/dist/{gateway-cli-CEs64KLs.js → gateway-cli-B706xn0p.js} +10 -10
  14. package/dist/index.js +15 -15
  15. package/dist/{login-Cm1KQyo6.js → login-CLGP4l3Z.js} +1 -1
  16. package/dist/{onboard-skills-fQFkrNCl.js → onboard-skills-fSAeRi9c.js} +2 -2
  17. package/dist/{onboarding-CgMOhQUQ.js → onboarding-BZGGmBqg.js} +4 -4
  18. package/dist/plugin-sdk/index.js +3 -3
  19. package/dist/{program-CbjeKFtp.js → program-CubbVQCa.js} +4 -4
  20. package/dist/{register.subclis-DbvVpZCt.js → register.subclis-7fV9vq1r.js} +7 -7
  21. package/dist/{run-main-C-n5fQS0.js → run-main-D0WxOfHO.js} +23 -16
  22. package/dist/{server-node-events-C9voh22o.js → server-node-events-g9FVlSFX.js} +1 -1
  23. package/dist/{update-cli-DZ_92pP0.js → update-cli-DLPdTVO-.js} +5 -5
  24. package/dist/{update-runner-BbwlulGR.js → update-runner-DS7BG316.js} +1 -1
  25. package/package.json +1 -1
  26. /package/dist/{helpers-BbqByYKs.js → helpers-btYENKQf.js} +0 -0
  27. /package/dist/{koi-ovyRvCBs.js → koi-CDDZy_tQ.js} +0 -0
  28. /package/dist/{plugin-registry-z55ZNwzE.js → plugin-registry-CYcbes_t.js} +0 -0
  29. /package/dist/{systemd-linger-BGJktKDW.js → systemd-linger-blVsJyEr.js} +0 -0
  30. /package/dist/{widearea-dns-CPh_9Wfa.js → widearea-dns-B62LOarH.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { r as __exportAll } from "./chunk-D_gEzPfs.js";
2
2
  import { t as runCommandWithTimeout } from "./exec-BE7MIgZB.js";
3
- import { n as resolveWideAreaDiscoveryDomain } from "./widearea-dns-CPh_9Wfa.js";
3
+ import { n as resolveWideAreaDiscoveryDomain } from "./widearea-dns-B62LOarH.js";
4
4
 
5
5
  //#region src/infra/bonjour-discovery.ts
6
6
  var bonjour_discovery_exports = /* @__PURE__ */ __exportAll({ discoverGatewayBeacons: () => discoverGatewayBeacons });
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2026.3.269",
3
- "commit": "05146f087e7851ab9be34ab8368dd70d23e70f9a",
4
- "builtAt": "2026-05-13T21:26:50.673Z"
2
+ "version": "2026.3.270",
3
+ "commit": "4ecb6c14e88f041a87fb7be2e0711035d43f02c0",
4
+ "builtAt": "2026-05-13T21:55:37.877Z"
5
5
  }
@@ -1 +1 @@
1
- fd46c589dad66d8a46645ba520b3367c005c7ac4d4f184856f14eafcdd722737
1
+ be0e9d4d75b66aa6f4bc492c766b6dcf2cd92fff463acdf63f09f69706354c1d
@@ -2,7 +2,7 @@ import { M as CHAT_CHANNEL_ORDER } from "./subsystem-RXphV8Xh.js";
2
2
  import { t as isTruthyEnvValue } from "./env-BA3nu3t6.js";
3
3
  import { n as listChannelPlugins } from "./plugins-D6P_BD0C.js";
4
4
  import { i as listChannelPluginCatalogEntries } from "./plugin-auto-enable-Bx_BHwcy.js";
5
- import { t as ensurePluginRegistryLoaded } from "./plugin-registry-z55ZNwzE.js";
5
+ import { t as ensurePluginRegistryLoaded } from "./plugin-registry-CYcbes_t.js";
6
6
 
7
7
  //#region src/cli/channel-options.ts
8
8
  function dedupe(values) {
@@ -72,8 +72,8 @@ import "./archive-DWubuYhj.js";
72
72
  import "./skill-scanner-XSqJHIlH.js";
73
73
  import "./installs-DiD9Mnzj.js";
74
74
  import { t as collectChannelStatusIssues } from "./channels-status-issues-DpPqStch.js";
75
- import { n as hasExplicitOptions } from "./plugin-registry-z55ZNwzE.js";
76
- import { t as formatCliChannelOptions } from "./channel-options-vC0scakt.js";
75
+ import { n as hasExplicitOptions } from "./plugin-registry-CYcbes_t.js";
76
+ import { t as formatCliChannelOptions } from "./channel-options-6wrOTIgK.js";
77
77
  import { t as buildChannelAccountSnapshot } from "./status-B1DCoVQ3.js";
78
78
  import { t as parseLogLine } from "./parse-log-line-CVYzLRZv.js";
79
79
  import fs from "node:fs/promises";
@@ -1,6 +1,6 @@
1
1
  import { r as __exportAll } from "./chunk-D_gEzPfs.js";
2
2
  import { g as resolveStateDir } from "./paths-VdmjGGyc.js";
3
- import { n as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-DbvVpZCt.js";
3
+ import { n as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-7fV9vq1r.js";
4
4
  import path from "node:path";
5
5
  import os from "node:os";
6
6
  import fs from "node:fs/promises";
@@ -25,29 +25,30 @@ import { t as resolveChannelDefaultAccountId } from "./helpers-Bd67GvKn.js";
25
25
  import { n as logConfigUpdated, t as formatConfigPath } from "./logging-BWWKm3m3.js";
26
26
  import { t as WizardCancelledError } from "./prompts-0EnaVIOe.js";
27
27
  import { t as createClackPrompter } from "./clack-prompter-9RonoVi0.js";
28
- import { a as buildKoiSummaries, c as loadKoiIdentity, f as parseIdentityMarkdown, i as applyKoiConfig, l as pruneKoiConfig, n as statusCommand, o as findKoiEntryIndex, s as listKoiEntries, t as runOnboardingWizard, u as identityHasValues } from "./onboarding-CgMOhQUQ.js";
29
- import { d as applyAuthChoice, f as applyOpenAIConfig, h as promptAuthChoiceGrouped, m as applyGoogleGeminiModelDefault, p as upsertSharedEnvVar, u as warnIfModelConfigLooksOff } from "./onboard-skills-fQFkrNCl.js";
28
+ import { a as buildKoiSummaries, c as loadKoiIdentity, f as parseIdentityMarkdown, i as applyKoiConfig, l as pruneKoiConfig, n as statusCommand, o as findKoiEntryIndex, s as listKoiEntries, t as runOnboardingWizard, u as identityHasValues } from "./onboarding-BZGGmBqg.js";
29
+ import { d as applyAuthChoice, f as applyOpenAIConfig, h as promptAuthChoiceGrouped, m as applyGoogleGeminiModelDefault, p as upsertSharedEnvVar, u as warnIfModelConfigLooksOff } from "./onboard-skills-fSAeRi9c.js";
30
30
  import { $ as setOpenrouterApiKey, C as applyMoonshotConfig, D as applyOpenrouterConfig, F as applyVercelAiGatewayConfig, J as setGeminiApiKey, K as setAnthropicApiKey, L as applyXaiConfig, N as applyVeniceConfig, Q as setOpencodeZenApiKey, V as applyZaiConfig, X as setMinimaxApiKey, Y as setKimiCodingApiKey, Z as setMoonshotApiKey, at as setXiaomiApiKey, et as setQianfanApiKey, f as applyOpencodeZenConfig, ft as buildTokenProfileId, g as applyMinimaxConfig, it as setXaiApiKey, j as applySyntheticConfig, k as applyQianfanConfig, m as applyMinimaxApiConfig, nt as setVeniceApiKey, ot as setZaiApiKey, pt as validateAnthropicSetupToken, q as setCloudflareAiGatewayConfig, rt as setVercelAiGatewayApiKey, tt as setSyntheticApiKey, v as applyAuthProfileConfig, w as applyMoonshotConfigCn, x as applyKimiCodeConfig, y as applyCloudflareAiGatewayConfig, z as applyXiaomiConfig } from "./github-copilot-auth-AFd71js0.js";
31
31
  import { n as setupChannels } from "./onboard-channels-CxWdKszM.js";
32
32
  import { l as healthCommand } from "./health-format-vlLr0K9x.js";
33
33
  import { t as renderTable } from "./table-BcCXbKbR.js";
34
34
  import { t as resolveGatewayService } from "./service-CsKcTbqE.js";
35
35
  import { r as isSystemdUserServiceAvailable } from "./systemd-DvZErSyI.js";
36
- import { l as getVerboseFlag, o as getFlagValue, r as registerSubCliCommands, s as getPositiveIntFlagValue, u as hasFlag } from "./register.subclis-DbvVpZCt.js";
36
+ import { l as getVerboseFlag, o as getFlagValue, r as registerSubCliCommands, s as getPositiveIntFlagValue, u as hasFlag } from "./register.subclis-7fV9vq1r.js";
37
37
  import { n as callGatewayFromCli, t as addGatewayClientOptions } from "./gateway-rpc-CxxLj5l6.js";
38
38
  import { t as formatHelpExamples } from "./help-format-D_sjxIrE.js";
39
- import { a as createOutboundSendDeps, n as resolveSessionKeyForRequest, t as koiCommand } from "./koi-ovyRvCBs.js";
40
- import { n as hasExplicitOptions, t as ensurePluginRegistryLoaded } from "./plugin-registry-z55ZNwzE.js";
41
- import { n as parsePositiveIntOrUndefined, t as collectOption } from "./helpers-BbqByYKs.js";
42
- import { i as CONFIGURE_WIZARD_SECTIONS, n as configureCommand, r as configureCommandWithSections } from "./configure-DfMyIRIK.js";
43
- import { n as ensureSystemdUserLingerNonInteractive } from "./systemd-linger-BGJktKDW.js";
44
- import { t as loginCommand } from "./login-Cm1KQyo6.js";
45
- import { n as loadAndMaybeMigrateDoctorConfig, t as doctorCommand } from "./doctor-DAvgdUEr.js";
39
+ import { r as readAuthFile, t as loginCommand } from "./login-CLGP4l3Z.js";
40
+ import { a as createOutboundSendDeps, n as resolveSessionKeyForRequest, t as koiCommand } from "./koi-CDDZy_tQ.js";
41
+ import { n as hasExplicitOptions, t as ensurePluginRegistryLoaded } from "./plugin-registry-CYcbes_t.js";
42
+ import { n as parsePositiveIntOrUndefined, t as collectOption } from "./helpers-btYENKQf.js";
43
+ import { i as CONFIGURE_WIZARD_SECTIONS, n as configureCommand, r as configureCommandWithSections } from "./configure-Iti6aX3P.js";
44
+ import { n as ensureSystemdUserLingerNonInteractive } from "./systemd-linger-blVsJyEr.js";
45
+ import { n as loadAndMaybeMigrateDoctorConfig, t as doctorCommand } from "./doctor-DQ9DDwkd.js";
46
46
  import { fileURLToPath } from "node:url";
47
47
  import fs from "node:fs";
48
48
  import path from "node:path";
49
49
  import JSON5 from "json5";
50
50
  import fs$1 from "node:fs/promises";
51
+ import { createInterface } from "node:readline";
51
52
  import { cancel, confirm, isCancel, multiselect, select } from "@clack/prompts";
52
53
 
53
54
  //#region src/commands/kois.bindings.ts
@@ -2793,7 +2794,7 @@ async function loadValidConfig() {
2793
2794
  }
2794
2795
  function registerConfigCli(program) {
2795
2796
  const cmd = program.command("config").description("Config helpers (get/set/unset). Run without subcommand for the wizard.").addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/config", "docs.skykoi.com/cli/config")}\n`).option("--section <section>", "Configure wizard sections (repeatable). Use with no subcommand.", (value, previous) => [...previous, value], []).action(async (opts) => {
2796
- const { CONFIGURE_WIZARD_SECTIONS, configureCommand, configureCommandWithSections } = await import("./configure-DfMyIRIK.js").then((n) => n.t);
2797
+ const { CONFIGURE_WIZARD_SECTIONS, configureCommand, configureCommandWithSections } = await import("./configure-Iti6aX3P.js").then((n) => n.t);
2797
2798
  const sections = Array.isArray(opts.section) ? opts.section.map((value) => typeof value === "string" ? value.trim() : "").filter(Boolean) : [];
2798
2799
  if (sections.length === 0) {
2799
2800
  await configureCommand(defaultRuntime);
@@ -2864,6 +2865,281 @@ function registerConfigCli(program) {
2864
2865
  });
2865
2866
  }
2866
2867
 
2868
+ //#endregion
2869
+ //#region src/commands/platform-chat.ts
2870
+ /**
2871
+ * `skykoi chat` — message a PLATFORM koi from the terminal.
2872
+ *
2873
+ * Differs from `skykoi koi -m` (which talks to the local gateway):
2874
+ * this command uses the saved CLI token in ~/.skykoi/auth.json to
2875
+ * hit the platform's HTTP API directly. No local gateway needed.
2876
+ * The user logs in once with `skykoi login`, then `skykoi chat` Just
2877
+ * Works.
2878
+ *
2879
+ * Modes:
2880
+ *
2881
+ * skykoi chat # interactive REPL (default)
2882
+ * skykoi chat -m "hello" # one-shot, prints reply
2883
+ * skykoi chat --koi <id> -m "..." # target a specific koi
2884
+ * skykoi chat --list # just list kois and exit
2885
+ *
2886
+ * Koi selection precedence:
2887
+ * 1. --koi <id> flag
2888
+ * 2. SKYKOI_KOI_ID env var
2889
+ * 3. saved 'lastKoiId' in auth.json (set on first successful chat)
2890
+ * 4. interactive picker if stdin is a TTY
2891
+ * 5. error otherwise
2892
+ */
2893
+ async function fetchJson(url, init) {
2894
+ let res;
2895
+ try {
2896
+ res = await fetch(url, init);
2897
+ } catch (err) {
2898
+ return {
2899
+ ok: false,
2900
+ error: err?.message ?? "network error",
2901
+ status: 0
2902
+ };
2903
+ }
2904
+ if (!res.ok) return {
2905
+ ok: false,
2906
+ error: (await res.text().catch(() => "")).slice(0, 300) || res.statusText,
2907
+ status: res.status
2908
+ };
2909
+ const data = await res.json().catch(() => null);
2910
+ if (data === null) return {
2911
+ ok: false,
2912
+ error: "non-JSON response",
2913
+ status: res.status
2914
+ };
2915
+ return {
2916
+ ok: true,
2917
+ data
2918
+ };
2919
+ }
2920
+ async function pickKoiInteractive(kois) {
2921
+ if (kois.length === 0) return null;
2922
+ if (kois.length === 1) return kois[0];
2923
+ if (!process.stdin.isTTY) return kois[0];
2924
+ console.log("\n Available kois:");
2925
+ kois.forEach((k, i) => {
2926
+ const last = k.lastUserActivity ? `, last used ${new Date(k.lastUserActivity).toLocaleString()}` : "";
2927
+ console.log(` ${i + 1}. ${k.name} (${k.id}) — ${k.status}${last}`);
2928
+ });
2929
+ console.log("");
2930
+ const rl = createInterface({
2931
+ input: process.stdin,
2932
+ output: process.stdout
2933
+ });
2934
+ const answer = await new Promise((resolve) => {
2935
+ rl.question(` Pick [1-${kois.length}, default 1]: `, (a) => resolve(a));
2936
+ });
2937
+ rl.close();
2938
+ const trimmed = answer.trim();
2939
+ if (!trimmed) return kois[0];
2940
+ const n = parseInt(trimmed, 10);
2941
+ if (Number.isNaN(n) || n < 1 || n > kois.length) {
2942
+ console.log(" Invalid choice; defaulting to first koi.");
2943
+ return kois[0];
2944
+ }
2945
+ return kois[n - 1];
2946
+ }
2947
+ /**
2948
+ * Stream one chat turn from the platform's SSE endpoint and render
2949
+ * deltas to stdout as they arrive.
2950
+ */
2951
+ async function streamChatTurn(args) {
2952
+ const res = await fetch(`${args.platformUrl}/api/koi/${args.koiId}/chat`, {
2953
+ method: "POST",
2954
+ headers: {
2955
+ "Content-Type": "application/json",
2956
+ Accept: "text/event-stream",
2957
+ Authorization: `Bearer ${args.token}`
2958
+ },
2959
+ body: JSON.stringify({
2960
+ message: args.message,
2961
+ stream: true
2962
+ })
2963
+ }).catch((err) => ({
2964
+ ok: false,
2965
+ status: 0,
2966
+ body: null,
2967
+ statusText: err?.message ?? "network error"
2968
+ }));
2969
+ if (!("ok" in res) || !res.ok) return {
2970
+ ok: false,
2971
+ error: `chat request failed (${res?.status ?? "?"})`
2972
+ };
2973
+ const body = res.body;
2974
+ if (!body) return {
2975
+ ok: false,
2976
+ error: "no response body"
2977
+ };
2978
+ const reader = body.getReader();
2979
+ const decoder = new TextDecoder();
2980
+ let buffer = "";
2981
+ let currentEvent = null;
2982
+ let printedAny = false;
2983
+ while (true) {
2984
+ const { value, done } = await reader.read();
2985
+ if (done) break;
2986
+ buffer += decoder.decode(value, { stream: true });
2987
+ for (;;) {
2988
+ const lineEnd = buffer.indexOf("\n");
2989
+ if (lineEnd === -1) break;
2990
+ const line = buffer.slice(0, lineEnd).replace(/\r$/, "");
2991
+ buffer = buffer.slice(lineEnd + 1);
2992
+ if (!line) {
2993
+ currentEvent = null;
2994
+ continue;
2995
+ }
2996
+ if (line.startsWith("event:")) {
2997
+ currentEvent = line.slice(6).trim();
2998
+ continue;
2999
+ }
3000
+ if (line.startsWith("data:")) {
3001
+ const rawData = line.slice(5).trim();
3002
+ try {
3003
+ const payload = JSON.parse(rawData);
3004
+ const kind = currentEvent ?? "data";
3005
+ if (kind === "delta") {
3006
+ const text = payload.text ?? "";
3007
+ if (text) {
3008
+ process.stdout.write(text);
3009
+ printedAny = true;
3010
+ }
3011
+ } else if (kind === "tool") {
3012
+ const status = payload.status ?? "";
3013
+ const name = payload.name ?? "";
3014
+ const desc = payload.description ?? "";
3015
+ if (status === "running") {
3016
+ const label = desc || name;
3017
+ if (label) process.stderr.write(`\n · ${label}…\n`);
3018
+ }
3019
+ } else if (kind === "done") {
3020
+ const content = payload.content ?? "";
3021
+ if (!printedAny && content) process.stdout.write(content);
3022
+ process.stdout.write("\n");
3023
+ } else if (kind === "error") {
3024
+ const msg = payload.message ?? "unknown error";
3025
+ process.stderr.write(`\n ! ${msg}\n`);
3026
+ }
3027
+ } catch {}
3028
+ continue;
3029
+ }
3030
+ }
3031
+ }
3032
+ return { ok: true };
3033
+ }
3034
+ async function platformChatCommand(opts) {
3035
+ const auth = await readAuthFile();
3036
+ if (!auth) return {
3037
+ ok: false,
3038
+ error: "Not logged in. Run `skykoi login` first."
3039
+ };
3040
+ const platformUrl = auth.platformUrl.replace(/\/$/, "");
3041
+ const headers = { Authorization: `Bearer ${auth.token}` };
3042
+ const listRes = await fetchJson(`${platformUrl}/api/kois`, { headers });
3043
+ if (!listRes.ok) {
3044
+ if (listRes.status === 401 || listRes.status === 403) return {
3045
+ ok: false,
3046
+ error: "Token rejected. Run `skykoi login` to refresh."
3047
+ };
3048
+ return {
3049
+ ok: false,
3050
+ error: `Failed to list kois: ${listRes.error}`
3051
+ };
3052
+ }
3053
+ const kois = listRes.data.kois;
3054
+ if (opts.list) {
3055
+ if (opts.json) {
3056
+ process.stdout.write(JSON.stringify(kois, null, 2) + "\n");
3057
+ return { ok: true };
3058
+ }
3059
+ if (kois.length === 0) {
3060
+ console.log("(no kois — create one on the dashboard)");
3061
+ return { ok: true };
3062
+ }
3063
+ for (const k of kois) console.log(`${k.id}\t${k.status}\t${k.name}`);
3064
+ return { ok: true };
3065
+ }
3066
+ if (kois.length === 0) return {
3067
+ ok: false,
3068
+ error: "No kois yet. Create one on https://www.skykoi.com first."
3069
+ };
3070
+ let chosen = null;
3071
+ const wantId = opts.koi || process.env.SKYKOI_KOI_ID;
3072
+ if (wantId) {
3073
+ chosen = kois.find((k) => k.id === wantId) ?? null;
3074
+ if (!chosen) return {
3075
+ ok: false,
3076
+ error: `Koi ${wantId} not found in your account. Run \`skykoi chat --list\` to see options.`
3077
+ };
3078
+ } else chosen = await pickKoiInteractive(kois);
3079
+ if (!chosen) return {
3080
+ ok: false,
3081
+ error: "No koi selected."
3082
+ };
3083
+ if (opts.message && opts.message.trim()) {
3084
+ process.stdout.write(`> ${opts.message}\n\n`);
3085
+ const res = await streamChatTurn({
3086
+ platformUrl,
3087
+ token: auth.token,
3088
+ koiId: chosen.id,
3089
+ message: opts.message
3090
+ });
3091
+ return res.ok ? { ok: true } : {
3092
+ ok: false,
3093
+ error: res.error
3094
+ };
3095
+ }
3096
+ if (!process.stdin.isTTY) return {
3097
+ ok: false,
3098
+ error: "No --message provided and stdin isn't a TTY. Run `skykoi chat -m \"...\"` or open in a real terminal."
3099
+ };
3100
+ console.log(`\n Chatting with ${chosen.name} (${chosen.id})`);
3101
+ console.log(" Type your message. Empty line or Ctrl-C to exit.\n");
3102
+ const rl = createInterface({
3103
+ input: process.stdin,
3104
+ output: process.stdout,
3105
+ terminal: true
3106
+ });
3107
+ const ask = () => new Promise((resolve) => {
3108
+ rl.question("> ", (line) => resolve(line));
3109
+ });
3110
+ while (true) {
3111
+ const line = await ask().catch(() => "");
3112
+ if (!line.trim()) break;
3113
+ process.stdout.write("\n");
3114
+ await streamChatTurn({
3115
+ platformUrl,
3116
+ token: auth.token,
3117
+ koiId: chosen.id,
3118
+ message: line
3119
+ });
3120
+ process.stdout.write("\n");
3121
+ }
3122
+ rl.close();
3123
+ return { ok: true };
3124
+ }
3125
+
3126
+ //#endregion
3127
+ //#region src/cli/program/register.chat.ts
3128
+ function registerChatCommand(program) {
3129
+ program.command("chat").description("Message your platform koi from the terminal (uses the saved login token)").addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/chat", "docs.skykoi.com/cli/chat")}\n`).option("-m, --message <text>", "Send a single message and print the reply (one-shot mode)").option("--koi <id>", "Target a specific koi by id (default: last-used or interactive picker)").option("--list", "Just list your kois and exit").option("--json", "When listing, output JSON").action(async (opts) => {
3130
+ const result = await platformChatCommand({
3131
+ message: opts.message,
3132
+ koi: opts.koi,
3133
+ list: opts.list,
3134
+ json: opts.json
3135
+ });
3136
+ if (!result.ok) {
3137
+ console.error(theme.error(`✗ ${result.error || "chat failed"}`));
3138
+ process.exit(1);
3139
+ }
3140
+ });
3141
+ }
3142
+
2867
3143
  //#endregion
2868
3144
  //#region src/commands/koi-via-gateway.ts
2869
3145
  function parseTimeoutSeconds(opts) {
@@ -3107,7 +3383,7 @@ function registerLoginCommand(program) {
3107
3383
  }
3108
3384
  });
3109
3385
  program.command("whoami").description("Show the currently-logged-in SkyKoi account").action(async () => {
3110
- const { readAuthFile } = await import("./login-Cm1KQyo6.js").then((n) => n.n);
3386
+ const { readAuthFile } = await import("./login-CLGP4l3Z.js").then((n) => n.n);
3111
3387
  const auth = await readAuthFile();
3112
3388
  if (!auth) {
3113
3389
  console.log(theme.muted("Not logged in. Run `skykoi login`."));
@@ -5410,6 +5686,10 @@ const commandRegistry = [
5410
5686
  id: "login",
5411
5687
  register: ({ program }) => registerLoginCommand(program)
5412
5688
  },
5689
+ {
5690
+ id: "chat",
5691
+ register: ({ program }) => registerChatCommand(program)
5692
+ },
5413
5693
  {
5414
5694
  id: "setup",
5415
5695
  register: ({ program }) => registerSetupCommand(program)
@@ -15,11 +15,11 @@ import { n as logConfigUpdated } from "./logging-BWWKm3m3.js";
15
15
  import { t as note$1 } from "./note-CSp5eHqT.js";
16
16
  import { t as WizardCancelledError } from "./prompts-0EnaVIOe.js";
17
17
  import { t as createClackPrompter } from "./clack-prompter-9RonoVi0.js";
18
- import { a as applyModelFallbacksFromSelection, c as promptModelAllowlist, d as applyAuthChoice, h as promptAuthChoiceGrouped, i as applyModelAllowlist, l as resolvePreferredProviderForAuthChoice, o as applyPrimaryModel, r as promptRemoteGatewayConfig, s as promptDefaultModel, t as setupSkills } from "./onboard-skills-fQFkrNCl.js";
18
+ import { a as applyModelFallbacksFromSelection, c as promptModelAllowlist, d as applyAuthChoice, h as promptAuthChoiceGrouped, i as applyModelAllowlist, l as resolvePreferredProviderForAuthChoice, o as applyPrimaryModel, r as promptRemoteGatewayConfig, s as promptDefaultModel, t as setupSkills } from "./onboard-skills-fSAeRi9c.js";
19
19
  import { n as setupChannels, t as noteChannelStatus } from "./onboard-channels-CxWdKszM.js";
20
20
  import { l as healthCommand, n as ensureControlUiAssetsBuilt, t as formatHealthCheckFailure } from "./health-format-vlLr0K9x.js";
21
21
  import { t as resolveGatewayService } from "./service-CsKcTbqE.js";
22
- import { t as ensureSystemdUserLingerInteractive } from "./systemd-linger-BGJktKDW.js";
22
+ import { t as ensureSystemdUserLingerInteractive } from "./systemd-linger-blVsJyEr.js";
23
23
  import { confirm, intro, outro, select, text } from "@clack/prompts";
24
24
 
25
25
  //#region src/commands/configure.shared.ts
@@ -23,7 +23,7 @@ import { t as formatDocsLink } from "./links-D-ozFGY4.js";
23
23
  import "./progress-aeJDq1bY.js";
24
24
  import { t as parseAbsoluteTimeMs } from "./parse-B5EluDjJ.js";
25
25
  import { n as callGatewayFromCli, t as addGatewayClientOptions } from "./gateway-rpc-CxxLj5l6.js";
26
- import { n as parsePositiveIntOrUndefined } from "./helpers-BbqByYKs.js";
26
+ import { n as parsePositiveIntOrUndefined } from "./helpers-btYENKQf.js";
27
27
 
28
28
  //#region src/cli/cron-cli/shared.ts
29
29
  const getCronChannelOptions = () => ["last", ...listChannelPlugins().map((plugin) => plugin.id)].join("|");
@@ -14,7 +14,7 @@ import "./manifest-registry-BfJkwq3e.js";
14
14
  import { n as pickPrimaryTailnetIPv6, t as pickPrimaryTailnetIPv4 } from "./tailnet-CUHhVH39.js";
15
15
  import { t as formatDocsLink } from "./links-D-ozFGY4.js";
16
16
  import { t as renderTable } from "./table-BcCXbKbR.js";
17
- import { n as resolveWideAreaDiscoveryDomain, t as getWideAreaZonePath } from "./widearea-dns-CPh_9Wfa.js";
17
+ import { n as resolveWideAreaDiscoveryDomain, t as getWideAreaZonePath } from "./widearea-dns-B62LOarH.js";
18
18
  import fs from "node:fs";
19
19
  import path from "node:path";
20
20
  import { spawnSync } from "node:child_process";
@@ -27,14 +27,14 @@ import { n as logConfigUpdated } from "./logging-BWWKm3m3.js";
27
27
  import { t as note$1 } from "./note-CSp5eHqT.js";
28
28
  import { t as applyPluginAutoEnable } from "./plugin-auto-enable-Bx_BHwcy.js";
29
29
  import { i as resolveControlUiDistIndexPathForRoot, l as healthCommand, r as resolveControlUiDistIndexHealth, t as formatHealthCheckFailure } from "./health-format-vlLr0K9x.js";
30
- import { c as doctorShellCompletion, t as runGatewayUpdate } from "./update-runner-BbwlulGR.js";
30
+ import { c as doctorShellCompletion, t as runGatewayUpdate } from "./update-runner-DS7BG316.js";
31
31
  import { i as resolveGatewayAuth } from "./auth-BzM5UpTJ.js";
32
32
  import { t as buildWorkspaceSkillStatus } from "./skills-status-Co9ln7Nd.js";
33
33
  import { a as repairLaunchAgentBootstrap, i as launchAgentPlistExists, n as isLaunchAgentListed, o as resolveGatewayLogPaths, r as isLaunchAgentLoaded, t as resolveGatewayService } from "./service-CsKcTbqE.js";
34
34
  import { r as isSystemdUserServiceAvailable } from "./systemd-DvZErSyI.js";
35
35
  import { a as renderGatewayServiceCleanupHints, i as findExtraGatewayServices, n as auditGatewayServiceConfig, o as readLastGatewayErrorLine, r as needsNodeRuntimeMigration, t as SERVICE_AUDIT_CODES } from "./service-audit-DMmKqL8q.js";
36
36
  import { t as collectChannelStatusIssues } from "./channels-status-issues-DpPqStch.js";
37
- import { t as ensureSystemdUserLingerInteractive } from "./systemd-linger-BGJktKDW.js";
37
+ import { t as ensureSystemdUserLingerInteractive } from "./systemd-linger-blVsJyEr.js";
38
38
  import { n as buildAuthHealthSummary, r as formatRemainingShort, t as DEFAULT_OAUTH_WARN_MS } from "./auth-health-BC19VMJe.js";
39
39
  import { n as renderSystemdUnavailableHints, t as isSystemdUnavailableDetail } from "./systemd-hints-DpSjggO1.js";
40
40
  import fs from "node:fs";
package/dist/entry.js CHANGED
@@ -244,7 +244,7 @@ if (!ensureExperimentalWarningSuppressed()) {
244
244
  applyCliProfileEnv({ profile: parsed.profile });
245
245
  process$1.argv = parsed.argv;
246
246
  }
247
- import("./run-main-C-n5fQS0.js").then(({ runCli }) => runCli(process$1.argv)).catch((error) => {
247
+ import("./run-main-D0WxOfHO.js").then(({ runCli }) => runCli(process$1.argv)).catch((error) => {
248
248
  console.error("[SKYKOI] Failed to start CLI:", error instanceof Error ? error.stack ?? error.message : error);
249
249
  process$1.exitCode = 1;
250
250
  });
@@ -80,8 +80,8 @@ import { t as resolveChannelDefaultAccountId } from "./helpers-Bd67GvKn.js";
80
80
  import "./logging-BWWKm3m3.js";
81
81
  import "./note-CSp5eHqT.js";
82
82
  import { t as WizardCancelledError } from "./prompts-0EnaVIOe.js";
83
- import { c as loadKoiIdentity, d as loadKoiIdentityFromWorkspace, i as applyKoiConfig, l as pruneKoiConfig, o as findKoiEntryIndex, r as getStatusSummary, s as listKoiEntries, t as runOnboardingWizard } from "./onboarding-CgMOhQUQ.js";
84
- import { n as installSkill } from "./onboard-skills-fQFkrNCl.js";
83
+ import { c as loadKoiIdentity, d as loadKoiIdentityFromWorkspace, i as applyKoiConfig, l as pruneKoiConfig, o as findKoiEntryIndex, r as getStatusSummary, s as listKoiEntries, t as runOnboardingWizard } from "./onboarding-BZGGmBqg.js";
84
+ import { n as installSkill } from "./onboard-skills-fSAeRi9c.js";
85
85
  import "./github-copilot-auth-AFd71js0.js";
86
86
  import "./onboard-channels-CxWdKszM.js";
87
87
  import { r as buildChannelUiCatalog, t as applyPluginAutoEnable } from "./plugin-auto-enable-Bx_BHwcy.js";
@@ -89,7 +89,7 @@ import "./archive-DWubuYhj.js";
89
89
  import "./skill-scanner-XSqJHIlH.js";
90
90
  import "./installs-DiD9Mnzj.js";
91
91
  import { a as resolveControlUiRootOverrideSync, c as getHealthSnapshot, d as runHeartbeatOnce, f as setHeartbeatsEnabled, n as ensureControlUiAssetsBuilt, o as resolveControlUiRootSync, p as startHeartbeatRunner, s as formatHealthChannelLines } from "./health-format-vlLr0K9x.js";
92
- import { S as normalizeUpdateChannel, _ as resolveNpmChannelTag, h as compareSemverStrings, m as checkUpdateStatus, t as runGatewayUpdate, y as DEFAULT_PACKAGE_CHANNEL } from "./update-runner-BbwlulGR.js";
92
+ import { S as normalizeUpdateChannel, _ as resolveNpmChannelTag, h as compareSemverStrings, m as checkUpdateStatus, t as runGatewayUpdate, y as DEFAULT_PACKAGE_CHANNEL } from "./update-runner-DS7BG316.js";
93
93
  import { i as resolveGatewayAuth, n as authorizeGatewayConnect, r as isLocalDirectRequest, t as assertGatewayAuthConfigured } from "./auth-BzM5UpTJ.js";
94
94
  import { i as probeGateway } from "./audit-DbStYIKe.js";
95
95
  import "./table-BcCXbKbR.js";
@@ -99,11 +99,11 @@ import { p as resolveGatewayStateDir } from "./systemd-DvZErSyI.js";
99
99
  import "./service-audit-DMmKqL8q.js";
100
100
  import "./node-service-BUUkrXHj.js";
101
101
  import "./channels-status-issues-DpPqStch.js";
102
- import "./register.subclis-DbvVpZCt.js";
103
- import { a as createOutboundSendDeps$1, i as resolveKoiOutboundTarget, r as resolveKoiDeliveryPlan, t as koiCommand } from "./koi-ovyRvCBs.js";
104
- import { n as resolveWideAreaDiscoveryDomain, r as writeWideAreaGatewayZone } from "./widearea-dns-CPh_9Wfa.js";
105
- import { n as discoverGatewayBeacons } from "./bonjour-discovery-DmkS5JkQ.js";
106
- import "./completion-cli-CLsNQlJq.js";
102
+ import "./register.subclis-7fV9vq1r.js";
103
+ import { a as createOutboundSendDeps$1, i as resolveKoiOutboundTarget, r as resolveKoiDeliveryPlan, t as koiCommand } from "./koi-CDDZy_tQ.js";
104
+ import { n as resolveWideAreaDiscoveryDomain, r as writeWideAreaGatewayZone } from "./widearea-dns-B62LOarH.js";
105
+ import { n as discoverGatewayBeacons } from "./bonjour-discovery-cnMfrXln.js";
106
+ import "./completion-cli-DMjLvMfl.js";
107
107
  import { i as shouldIncludeHook, n as loadWorkspaceHookEntries, r as resolveHookConfig } from "./hooks-status-CIvitlaI.js";
108
108
  import "./tui-CPpBmb8M.js";
109
109
  import { t as buildChannelAccountSnapshot } from "./status-B1DCoVQ3.js";
@@ -4803,7 +4803,7 @@ var MeshDiscovery = class {
4803
4803
  }
4804
4804
  async runMdnsProbe() {
4805
4805
  try {
4806
- const { discoverGatewayBeacons } = await import("./bonjour-discovery-DmkS5JkQ.js").then((n) => n.t);
4806
+ const { discoverGatewayBeacons } = await import("./bonjour-discovery-cnMfrXln.js").then((n) => n.t);
4807
4807
  const beacons = await discoverGatewayBeacons({ timeoutMs: 5e3 });
4808
4808
  for (const beacon of beacons) {
4809
4809
  if (!beacon.host) continue;
@@ -11133,7 +11133,7 @@ const nodeHandlers = {
11133
11133
  const p = params;
11134
11134
  const payloadJSON = typeof p.payloadJSON === "string" ? p.payloadJSON : p.payload !== void 0 ? JSON.stringify(p.payload) : null;
11135
11135
  await respondUnavailableOnThrow(respond, async () => {
11136
- const { handleNodeEvent } = await import("./server-node-events-C9voh22o.js");
11136
+ const { handleNodeEvent } = await import("./server-node-events-g9FVlSFX.js");
11137
11137
  const nodeId = client?.connect?.device?.id ?? client?.connect?.client?.id ?? "node";
11138
11138
  await handleNodeEvent({
11139
11139
  deps: context.deps,
package/dist/index.js CHANGED
@@ -68,12 +68,12 @@ import { t as isMainModule } from "./is-main-C-HPYgby.js";
68
68
  import { t as ensureSKYKOICliOnPath } from "./path-env-BvfjafwG.js";
69
69
  import { g as assertSupportedRuntime } from "./daemon-runtime-Ct4U4ixT.js";
70
70
  import "./ports-D-ffYdXl.js";
71
- import "./config-guard-DFPXxhoK.js";
71
+ import "./config-guard-BYBOqcCc.js";
72
72
  import "./logging-BWWKm3m3.js";
73
73
  import "./note-CSp5eHqT.js";
74
74
  import "./clack-prompter-9RonoVi0.js";
75
- import "./onboarding-CgMOhQUQ.js";
76
- import "./onboard-skills-fQFkrNCl.js";
75
+ import "./onboarding-BZGGmBqg.js";
76
+ import "./onboard-skills-fSAeRi9c.js";
77
77
  import "./github-copilot-auth-AFd71js0.js";
78
78
  import "./onboard-channels-CxWdKszM.js";
79
79
  import "./plugin-auto-enable-Bx_BHwcy.js";
@@ -81,7 +81,7 @@ import "./archive-DWubuYhj.js";
81
81
  import "./skill-scanner-XSqJHIlH.js";
82
82
  import "./installs-DiD9Mnzj.js";
83
83
  import "./health-format-vlLr0K9x.js";
84
- import "./update-runner-BbwlulGR.js";
84
+ import "./update-runner-DS7BG316.js";
85
85
  import "./auth-BzM5UpTJ.js";
86
86
  import "./audit-DbStYIKe.js";
87
87
  import "./table-BcCXbKbR.js";
@@ -91,22 +91,22 @@ import "./systemd-DvZErSyI.js";
91
91
  import "./service-audit-DMmKqL8q.js";
92
92
  import "./node-service-BUUkrXHj.js";
93
93
  import "./channels-status-issues-DpPqStch.js";
94
- import "./register.subclis-DbvVpZCt.js";
94
+ import "./register.subclis-7fV9vq1r.js";
95
95
  import "./gateway-rpc-CxxLj5l6.js";
96
96
  import "./help-format-D_sjxIrE.js";
97
- import "./koi-ovyRvCBs.js";
98
- import "./plugin-registry-z55ZNwzE.js";
99
- import "./configure-DfMyIRIK.js";
100
- import "./systemd-linger-BGJktKDW.js";
101
- import "./widearea-dns-CPh_9Wfa.js";
102
- import "./bonjour-discovery-DmkS5JkQ.js";
97
+ import "./koi-CDDZy_tQ.js";
98
+ import "./plugin-registry-CYcbes_t.js";
99
+ import "./configure-Iti6aX3P.js";
100
+ import "./systemd-linger-blVsJyEr.js";
101
+ import "./widearea-dns-B62LOarH.js";
102
+ import "./bonjour-discovery-cnMfrXln.js";
103
103
  import "./auth-health-BC19VMJe.js";
104
- import "./doctor-DAvgdUEr.js";
105
- import "./completion-cli-CLsNQlJq.js";
104
+ import "./doctor-DQ9DDwkd.js";
105
+ import "./completion-cli-DMjLvMfl.js";
106
106
  import "./hooks-status-CIvitlaI.js";
107
107
  import "./tui-CPpBmb8M.js";
108
- import "./channel-options-vC0scakt.js";
109
- import { n as buildProgram } from "./program-CbjeKFtp.js";
108
+ import "./channel-options-6wrOTIgK.js";
109
+ import { n as buildProgram } from "./program-CubbVQCa.js";
110
110
  import process from "node:process";
111
111
  import { fileURLToPath } from "node:url";
112
112
 
@@ -192,4 +192,4 @@ async function loginCommand(opts = {}) {
192
192
  }
193
193
 
194
194
  //#endregion
195
- export { login_exports as n, loginCommand as t };
195
+ export { login_exports as n, readAuthFile as r, loginCommand as t };
@@ -12,8 +12,8 @@ import { $ as setOpenrouterApiKey, A as applyQianfanProviderConfig, B as applyXi
12
12
  import { a as enablePluginInConfig } from "./onboard-channels-CxWdKszM.js";
13
13
  import { t as scanDirectoryWithSummary } from "./skill-scanner-XSqJHIlH.js";
14
14
  import { t as buildWorkspaceSkillStatus } from "./skills-status-Co9ln7Nd.js";
15
- import { n as resolveWideAreaDiscoveryDomain } from "./widearea-dns-CPh_9Wfa.js";
16
- import { n as discoverGatewayBeacons } from "./bonjour-discovery-DmkS5JkQ.js";
15
+ import { n as resolveWideAreaDiscoveryDomain } from "./widearea-dns-B62LOarH.js";
16
+ import { n as discoverGatewayBeacons } from "./bonjour-discovery-cnMfrXln.js";
17
17
  import fs from "node:fs";
18
18
  import path from "node:path";
19
19
  import { Readable } from "node:stream";
@@ -21,10 +21,10 @@ import { a as gatewayInstallErrorHint, i as buildGatewayInstallPlan, n as GATEWA
21
21
  import { t as resolveChannelDefaultAccountId } from "./helpers-Bd67GvKn.js";
22
22
  import { n as logConfigUpdated } from "./logging-BWWKm3m3.js";
23
23
  import { t as WizardCancelledError } from "./prompts-0EnaVIOe.js";
24
- import { d as applyAuthChoice, h as promptAuthChoiceGrouped, l as resolvePreferredProviderForAuthChoice, o as applyPrimaryModel, r as promptRemoteGatewayConfig, s as promptDefaultModel, t as setupSkills, u as warnIfModelConfigLooksOff } from "./onboard-skills-fQFkrNCl.js";
24
+ import { d as applyAuthChoice, h as promptAuthChoiceGrouped, l as resolvePreferredProviderForAuthChoice, o as applyPrimaryModel, r as promptRemoteGatewayConfig, s as promptDefaultModel, t as setupSkills, u as warnIfModelConfigLooksOff } from "./onboard-skills-fSAeRi9c.js";
25
25
  import { n as setupChannels } from "./onboard-channels-CxWdKszM.js";
26
26
  import { l as healthCommand, n as ensureControlUiAssetsBuilt, s as formatHealthChannelLines, t as formatHealthCheckFailure, u as resolveHeartbeatSummaryForKoi } from "./health-format-vlLr0K9x.js";
27
- import { C as resolveEffectiveUpdateChannel, S as normalizeUpdateChannel, d as formatUpdateOneLiner, f as getUpdateCheckResult, h as compareSemverStrings, l as ensureCompletionCacheExists, m as checkUpdateStatus, p as resolveUpdateAvailability, s as checkShellCompletionStatus, u as formatUpdateAvailableHint, x as formatUpdateChannelLabel } from "./update-runner-BbwlulGR.js";
27
+ import { C as resolveEffectiveUpdateChannel, S as normalizeUpdateChannel, d as formatUpdateOneLiner, f as getUpdateCheckResult, h as compareSemverStrings, l as ensureCompletionCacheExists, m as checkUpdateStatus, p as resolveUpdateAvailability, s as checkShellCompletionStatus, u as formatUpdateAvailableHint, x as formatUpdateChannelLabel } from "./update-runner-DS7BG316.js";
28
28
  import { i as probeGateway, t as runSecurityAudit } from "./audit-DbStYIKe.js";
29
29
  import { t as renderTable } from "./table-BcCXbKbR.js";
30
30
  import { t as buildWorkspaceSkillStatus } from "./skills-status-Co9ln7Nd.js";
@@ -34,7 +34,7 @@ import { o as readLastGatewayErrorLine } from "./service-audit-DMmKqL8q.js";
34
34
  import { t as resolveNodeService } from "./node-service-BUUkrXHj.js";
35
35
  import { t as collectChannelStatusIssues } from "./channels-status-issues-DpPqStch.js";
36
36
  import { i as redactSecrets, n as formatDuration$1, r as formatGatewayAuthUsed, t as formatAge$1 } from "./format-DfUL8x8A.js";
37
- import { r as installCompletion } from "./completion-cli-CLsNQlJq.js";
37
+ import { r as installCompletion } from "./completion-cli-DMjLvMfl.js";
38
38
  import { t as buildWorkspaceHookStatus } from "./hooks-status-CIvitlaI.js";
39
39
  import { t as runTui } from "./tui-CPpBmb8M.js";
40
40
  import fs from "node:fs";
@@ -2407,7 +2407,7 @@ async function finalizeOnboardingWizard(options) {
2407
2407
  const systemdAvailable = process.platform === "linux" ? await isSystemdUserServiceAvailable() : true;
2408
2408
  if (process.platform === "linux" && !systemdAvailable) await prompter.note("Systemd user services are unavailable. Skipping lingering checks and service install.", "Systemd");
2409
2409
  if (process.platform === "linux" && systemdAvailable) {
2410
- const { ensureSystemdUserLingerInteractive } = await import("./systemd-linger-BGJktKDW.js").then((n) => n.r);
2410
+ const { ensureSystemdUserLingerInteractive } = await import("./systemd-linger-blVsJyEr.js").then((n) => n.r);
2411
2411
  await ensureSystemdUserLingerInteractive({
2412
2412
  runtime,
2413
2413
  prompter: {
@@ -33,7 +33,7 @@ import { exec as exec$1 } from "child_process";
33
33
  import { createReadStream as createReadStream$1, createWriteStream as createWriteStream$1, promises as promises$1 } from "fs";
34
34
  import { Readable, Transform } from "stream";
35
35
  import { platform, release, tmpdir as tmpdir$1 } from "os";
36
- import EventEmitter, { EventEmitter as EventEmitter$1, once } from "events";
36
+ import EventEmitter$1, { EventEmitter, once } from "events";
37
37
  import { promisify as promisify$1 } from "util";
38
38
  import { join as join$1 } from "path";
39
39
  import * as Crypto from "crypto";
@@ -226638,7 +226638,7 @@ const BUFFERABLE_EVENT_SET = new Set([
226638
226638
  * making the data processing more efficient.
226639
226639
  */
226640
226640
  const makeEventBuffer = (logger) => {
226641
- const ev = new EventEmitter();
226641
+ const ev = new EventEmitter$1();
226642
226642
  const historyCache = /* @__PURE__ */ new Set();
226643
226643
  let data = makeBufferData();
226644
226644
  let isBuffering = false;
@@ -232208,7 +232208,7 @@ var BinaryInfo = class {
232208
232208
 
232209
232209
  //#endregion
232210
232210
  //#region node_modules/.pnpm/@whiskeysockets+baileys@7.0.0-rc.9_audio-decode@2.2.3_sharp@0.34.5/node_modules/@whiskeysockets/baileys/lib/Socket/Client/types.js
232211
- var AbstractSocketClient = class extends EventEmitter$1 {
232211
+ var AbstractSocketClient = class extends EventEmitter {
232212
232212
  constructor(url, config) {
232213
232213
  super();
232214
232214
  this.url = url;
@@ -4,11 +4,11 @@ import { n as replaceCliName, r as resolveCliName } from "./command-format-DQtyH
4
4
  import { t as isTruthyEnvValue } from "./env-BA3nu3t6.js";
5
5
  import { N as VERSION } from "./config-B1La6DxS.js";
6
6
  import { t as formatDocsLink } from "./links-D-ozFGY4.js";
7
- import { r as registerProgramCommands, t as ensureConfigReady } from "./config-guard-DFPXxhoK.js";
8
- import { a as getCommandPath, d as hasHelpOrVersion, l as getVerboseFlag } from "./register.subclis-DbvVpZCt.js";
9
- import { t as ensurePluginRegistryLoaded } from "./plugin-registry-z55ZNwzE.js";
7
+ import { r as registerProgramCommands, t as ensureConfigReady } from "./config-guard-BYBOqcCc.js";
8
+ import { a as getCommandPath, d as hasHelpOrVersion, l as getVerboseFlag } from "./register.subclis-7fV9vq1r.js";
9
+ import { t as ensurePluginRegistryLoaded } from "./plugin-registry-CYcbes_t.js";
10
10
  import { i as hasEmittedCliBanner, n as emitCliBanner, r as formatCliBannerLine } from "./tui-CPpBmb8M.js";
11
- import { n as resolveCliChannelOptions } from "./channel-options-vC0scakt.js";
11
+ import { n as resolveCliChannelOptions } from "./channel-options-6wrOTIgK.js";
12
12
  import { Command } from "commander";
13
13
 
14
14
  //#region src/cli/program/context.ts
@@ -1,6 +1,6 @@
1
1
  import { r as __exportAll } from "./chunk-D_gEzPfs.js";
2
2
  import { t as isTruthyEnvValue } from "./env-BA3nu3t6.js";
3
- import { r as resolveActionArgs } from "./helpers-BbqByYKs.js";
3
+ import { r as resolveActionArgs } from "./helpers-btYENKQf.js";
4
4
 
5
5
  //#region src/cli/argv.ts
6
6
  const HELP_FLAGS = new Set(["-h", "--help"]);
@@ -124,7 +124,7 @@ const entries = [
124
124
  name: "gateway",
125
125
  description: "Gateway control",
126
126
  register: async (program) => {
127
- (await import("./gateway-cli-CEs64KLs.js")).registerGatewayCli(program);
127
+ (await import("./gateway-cli-B706xn0p.js")).registerGatewayCli(program);
128
128
  }
129
129
  },
130
130
  {
@@ -201,14 +201,14 @@ const entries = [
201
201
  name: "cron",
202
202
  description: "Cron scheduler",
203
203
  register: async (program) => {
204
- (await import("./cron-cli-DX-jyUlc.js")).registerCronCli(program);
204
+ (await import("./cron-cli-_UjEtRij.js")).registerCronCli(program);
205
205
  }
206
206
  },
207
207
  {
208
208
  name: "dns",
209
209
  description: "DNS helpers",
210
210
  register: async (program) => {
211
- (await import("./dns-cli-BNKjP3mP.js")).registerDnsCli(program);
211
+ (await import("./dns-cli-CVVLxo5W.js")).registerDnsCli(program);
212
212
  }
213
213
  },
214
214
  {
@@ -254,7 +254,7 @@ const entries = [
254
254
  name: "channels",
255
255
  description: "Channel management",
256
256
  register: async (program) => {
257
- (await import("./channels-cli-B9azrEo1.js")).registerChannelsCli(program);
257
+ (await import("./channels-cli-Cm7T8L84.js")).registerChannelsCli(program);
258
258
  }
259
259
  },
260
260
  {
@@ -282,14 +282,14 @@ const entries = [
282
282
  name: "update",
283
283
  description: "CLI update helpers",
284
284
  register: async (program) => {
285
- (await import("./update-cli-DZ_92pP0.js")).registerUpdateCli(program);
285
+ (await import("./update-cli-DLPdTVO-.js")).registerUpdateCli(program);
286
286
  }
287
287
  },
288
288
  {
289
289
  name: "completion",
290
290
  description: "Generate shell completion script",
291
291
  register: async (program) => {
292
- (await import("./completion-cli-CLsNQlJq.js").then((n) => n.n)).registerCompletionCli(program);
292
+ (await import("./completion-cli-DMjLvMfl.js").then((n) => n.n)).registerCompletionCli(program);
293
293
  }
294
294
  }
295
295
  ];
@@ -65,12 +65,12 @@ import "./tailscale-CsF9n21t.js";
65
65
  import { t as loadDotEnv } from "./dotenv-CuARfiZR.js";
66
66
  import { t as ensureSKYKOICliOnPath } from "./path-env-BvfjafwG.js";
67
67
  import { g as assertSupportedRuntime } from "./daemon-runtime-Ct4U4ixT.js";
68
- import { n as findRoutedCommand, t as ensureConfigReady } from "./config-guard-DFPXxhoK.js";
68
+ import { n as findRoutedCommand, t as ensureConfigReady } from "./config-guard-BYBOqcCc.js";
69
69
  import "./logging-BWWKm3m3.js";
70
70
  import "./note-CSp5eHqT.js";
71
71
  import "./clack-prompter-9RonoVi0.js";
72
- import "./onboarding-CgMOhQUQ.js";
73
- import "./onboard-skills-fQFkrNCl.js";
72
+ import "./onboarding-BZGGmBqg.js";
73
+ import "./onboard-skills-fSAeRi9c.js";
74
74
  import "./github-copilot-auth-AFd71js0.js";
75
75
  import "./onboard-channels-CxWdKszM.js";
76
76
  import "./plugin-auto-enable-Bx_BHwcy.js";
@@ -78,7 +78,7 @@ import "./archive-DWubuYhj.js";
78
78
  import "./skill-scanner-XSqJHIlH.js";
79
79
  import "./installs-DiD9Mnzj.js";
80
80
  import "./health-format-vlLr0K9x.js";
81
- import "./update-runner-BbwlulGR.js";
81
+ import "./update-runner-DS7BG316.js";
82
82
  import "./auth-BzM5UpTJ.js";
83
83
  import "./audit-DbStYIKe.js";
84
84
  import "./table-BcCXbKbR.js";
@@ -88,18 +88,18 @@ import "./systemd-DvZErSyI.js";
88
88
  import "./service-audit-DMmKqL8q.js";
89
89
  import "./node-service-BUUkrXHj.js";
90
90
  import "./channels-status-issues-DpPqStch.js";
91
- import { a as getCommandPath, c as getPrimaryCommand, d as hasHelpOrVersion } from "./register.subclis-DbvVpZCt.js";
91
+ import { a as getCommandPath, c as getPrimaryCommand, d as hasHelpOrVersion } from "./register.subclis-7fV9vq1r.js";
92
92
  import "./gateway-rpc-CxxLj5l6.js";
93
93
  import "./help-format-D_sjxIrE.js";
94
- import "./koi-ovyRvCBs.js";
95
- import { t as ensurePluginRegistryLoaded } from "./plugin-registry-z55ZNwzE.js";
96
- import "./configure-DfMyIRIK.js";
97
- import "./systemd-linger-BGJktKDW.js";
98
- import "./widearea-dns-CPh_9Wfa.js";
99
- import "./bonjour-discovery-DmkS5JkQ.js";
94
+ import "./koi-CDDZy_tQ.js";
95
+ import { t as ensurePluginRegistryLoaded } from "./plugin-registry-CYcbes_t.js";
96
+ import "./configure-Iti6aX3P.js";
97
+ import "./systemd-linger-blVsJyEr.js";
98
+ import "./widearea-dns-B62LOarH.js";
99
+ import "./bonjour-discovery-cnMfrXln.js";
100
100
  import "./auth-health-BC19VMJe.js";
101
- import "./doctor-DAvgdUEr.js";
102
- import "./completion-cli-CLsNQlJq.js";
101
+ import "./doctor-DQ9DDwkd.js";
102
+ import "./completion-cli-DMjLvMfl.js";
103
103
  import "./hooks-status-CIvitlaI.js";
104
104
  import { n as emitCliBanner } from "./tui-CPpBmb8M.js";
105
105
  import process$1 from "node:process";
@@ -155,7 +155,7 @@ async function runCli(argv = process$1.argv) {
155
155
  assertSupportedRuntime();
156
156
  if (await tryRouteCli(normalizedArgv)) return;
157
157
  enableConsoleCapture();
158
- const { buildProgram } = await import("./program-CbjeKFtp.js").then((n) => n.t);
158
+ const { buildProgram } = await import("./program-CubbVQCa.js").then((n) => n.t);
159
159
  const program = buildProgram();
160
160
  installUnhandledRejectionHandler();
161
161
  process$1.on("uncaughtException", (error) => {
@@ -165,10 +165,17 @@ async function runCli(argv = process$1.argv) {
165
165
  let parseArgv = rewriteUpdateFlagArgv(normalizedArgv);
166
166
  const hasAnyArg = parseArgv.slice(2).some((a) => !!a && !a.startsWith("--"));
167
167
  const wantsHelpOrVersion = hasHelpOrVersion(parseArgv);
168
- if (!hasAnyArg && !wantsHelpOrVersion) parseArgv = [...parseArgv, "tui"];
168
+ if (!hasAnyArg && !wantsHelpOrVersion) {
169
+ let isLoggedIn = false;
170
+ try {
171
+ const { readAuthFile } = await import("./login-CLGP4l3Z.js").then((n) => n.n);
172
+ isLoggedIn = !!(await readAuthFile())?.token;
173
+ } catch {}
174
+ parseArgv = [...parseArgv, isLoggedIn ? "chat" : "tui"];
175
+ }
169
176
  const primary = getPrimaryCommand(parseArgv);
170
177
  if (primary) {
171
- const { registerSubCliByName } = await import("./register.subclis-DbvVpZCt.js").then((n) => n.i);
178
+ const { registerSubCliByName } = await import("./register.subclis-7fV9vq1r.js").then((n) => n.i);
172
179
  await registerSubCliByName(program, primary);
173
180
  }
174
181
  if (!(!primary && hasHelpOrVersion(parseArgv))) {
@@ -62,7 +62,7 @@ import "./control-service-D30sRnYY.js";
62
62
  import "./channel-selection-eBPq7mbP.js";
63
63
  import "./event-log-DjIKl_l7.js";
64
64
  import "./deps-paNJoEvZ.js";
65
- import { t as koiCommand } from "./koi-ovyRvCBs.js";
65
+ import { t as koiCommand } from "./koi-CDDZy_tQ.js";
66
66
  import { t as formatForLog } from "./ws-log-DMyJV-8f.js";
67
67
  import { randomUUID } from "node:crypto";
68
68
 
@@ -72,7 +72,7 @@ import "./archive-DWubuYhj.js";
72
72
  import "./skill-scanner-XSqJHIlH.js";
73
73
  import "./installs-DiD9Mnzj.js";
74
74
  import "./health-format-vlLr0K9x.js";
75
- import { C as resolveEffectiveUpdateChannel, S as normalizeUpdateChannel, _ as resolveNpmChannelTag, a as globalInstallArgs, b as channelToNpmTag, d as formatUpdateOneLiner, g as fetchNpmTagVersion, h as compareSemverStrings, i as detectGlobalInstallManagerForRoot, l as ensureCompletionCacheExists, m as checkUpdateStatus, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, p as resolveUpdateAvailability, r as detectGlobalInstallManagerByPresence, s as checkShellCompletionStatus, t as runGatewayUpdate, u as formatUpdateAvailableHint, v as DEFAULT_GIT_CHANNEL, x as formatUpdateChannelLabel, y as DEFAULT_PACKAGE_CHANNEL } from "./update-runner-BbwlulGR.js";
75
+ import { C as resolveEffectiveUpdateChannel, S as normalizeUpdateChannel, _ as resolveNpmChannelTag, a as globalInstallArgs, b as channelToNpmTag, d as formatUpdateOneLiner, g as fetchNpmTagVersion, h as compareSemverStrings, i as detectGlobalInstallManagerForRoot, l as ensureCompletionCacheExists, m as checkUpdateStatus, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, p as resolveUpdateAvailability, r as detectGlobalInstallManagerByPresence, s as checkShellCompletionStatus, t as runGatewayUpdate, u as formatUpdateAvailableHint, v as DEFAULT_GIT_CHANNEL, x as formatUpdateChannelLabel, y as DEFAULT_PACKAGE_CHANNEL } from "./update-runner-DS7BG316.js";
76
76
  import "./auth-BzM5UpTJ.js";
77
77
  import { t as renderTable } from "./table-BcCXbKbR.js";
78
78
  import "./skills-status-Co9ln7Nd.js";
@@ -80,12 +80,12 @@ import "./service-CsKcTbqE.js";
80
80
  import "./systemd-DvZErSyI.js";
81
81
  import "./service-audit-DMmKqL8q.js";
82
82
  import "./channels-status-issues-DpPqStch.js";
83
- import "./register.subclis-DbvVpZCt.js";
83
+ import "./register.subclis-7fV9vq1r.js";
84
84
  import { t as formatHelpExamples } from "./help-format-D_sjxIrE.js";
85
- import "./systemd-linger-BGJktKDW.js";
85
+ import "./systemd-linger-blVsJyEr.js";
86
86
  import "./auth-health-BC19VMJe.js";
87
- import { t as doctorCommand } from "./doctor-DAvgdUEr.js";
88
- import { r as installCompletion } from "./completion-cli-CLsNQlJq.js";
87
+ import { t as doctorCommand } from "./doctor-DQ9DDwkd.js";
88
+ import { r as installCompletion } from "./completion-cli-DMjLvMfl.js";
89
89
  import "./shared-ih2ZCRlQ.js";
90
90
  import { r as runDaemonRestart } from "./daemon-cli-DiPNXaXq.js";
91
91
  import { n as updateNpmInstalledPlugins, t as syncPluginsForUpdateChannel } from "./update-cY5pcwgC.js";
@@ -6,7 +6,7 @@ import { N as VERSION } from "./config-B1La6DxS.js";
6
6
  import { _ as parseSemver } from "./daemon-runtime-Ct4U4ixT.js";
7
7
  import { t as note } from "./note-CSp5eHqT.js";
8
8
  import { i as resolveControlUiDistIndexPathForRoot, r as resolveControlUiDistIndexHealth } from "./health-format-vlLr0K9x.js";
9
- import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-CLsNQlJq.js";
9
+ import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-DMjLvMfl.js";
10
10
  import path from "node:path";
11
11
  import os from "node:os";
12
12
  import fs from "node:fs/promises";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skykoi",
3
- "version": "2026.3.269",
3
+ "version": "2026.3.270",
4
4
  "description": "SkyKoi — Koi runtime. Multi-channel gateway CLI with RPC Koi.",
5
5
  "keywords": [
6
6
  "skykoi",
File without changes