skykoi 2026.3.404 → 2026.3.405
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/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{completion-cli-6IP3iQRm.js → completion-cli-BsGr8aGm.js} +1 -1
- package/dist/{config-guard-BmZx8qFm.js → config-guard-C53xJqkX.js} +4 -4
- package/dist/{doctor-DSAnlKDe.js → doctor-BgN9XEBn.js} +1 -1
- package/dist/{doctor-completion-DfkRoOBP.js → doctor-completion-KPbcZuPj.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/{gateway-cli-DdGYxDZB.js → gateway-cli-CyhM5xDI.js} +4 -4
- package/dist/index.js +7 -7
- package/dist/{onboarding-DRfEuvTh.js → onboarding-Bpx4dZL2.js} +2 -2
- package/dist/plugin-sdk/index.js +8 -8
- package/dist/plugin-sdk/{pi-model-discovery-lynj0LAO.js → pi-model-discovery-ClImJtLC.js} +3 -3
- package/dist/{program-1ikIBcaZ.js → program-C9_uUyMc.js} +2 -2
- package/dist/{register.subclis-B0kBN0Z5.js → register.subclis-C3LmMTFy.js} +4 -4
- package/dist/{run-main-BVhYNSwq.js → run-main-CElhLhnt.js} +8 -8
- package/dist/{tui-cli-BHHhB0SD.js → tui-cli-Cwyd8Mvj.js} +1 -1
- package/dist/{tui-shell-BZxJytTa.js → tui-shell-Cnkwf3Qi.js} +319 -12
- package/dist/{update-cli-Ot-5OLBB.js → update-cli-XSwJqNGS.js} +4 -4
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/google-antigravity-auth/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +5 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +5 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +5 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +5 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +5 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +5 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +5 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ebefacca6da91d92ea5887e6f506eb6e7a68b3c581c845c2490d5607320bb264
|
|
@@ -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-
|
|
3
|
+
import { n as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-C3LmMTFy.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import os from "node:os";
|
|
6
6
|
import fs from "node:fs/promises";
|
|
@@ -29,7 +29,7 @@ import { t as resolveChannelDefaultAccountId } from "./helpers-4BXRutqw.js";
|
|
|
29
29
|
import { n as logConfigUpdated, t as formatConfigPath } from "./logging-C3sRv-iX.js";
|
|
30
30
|
import { t as WizardCancelledError } from "./prompts-BC5TXS0_.js";
|
|
31
31
|
import { t as createClackPrompter } from "./clack-prompter-clPzQ9p-.js";
|
|
32
|
-
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-
|
|
32
|
+
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-Bpx4dZL2.js";
|
|
33
33
|
import { d as applyAuthChoice, f as applyOpenAIConfig, h as promptAuthChoiceGrouped, m as applyGoogleGeminiModelDefault, p as upsertSharedEnvVar, u as warnIfModelConfigLooksOff } from "./onboard-skills-D1-xQ5oZ.js";
|
|
34
34
|
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-Qm1psuh_.js";
|
|
35
35
|
import { n as setupChannels } from "./onboard-channels-Cp3mqLlq.js";
|
|
@@ -37,7 +37,7 @@ import { i as healthCommand } from "./health-format-BhgAKyrJ.js";
|
|
|
37
37
|
import { t as renderTable } from "./table-DIfWcies.js";
|
|
38
38
|
import { t as resolveGatewayService } from "./service-D1-PnhZe.js";
|
|
39
39
|
import { r as isSystemdUserServiceAvailable } from "./systemd-DZP4s4qd.js";
|
|
40
|
-
import { l as getVerboseFlag, o as getFlagValue, r as registerSubCliCommands, s as getPositiveIntFlagValue, u as hasFlag } from "./register.subclis-
|
|
40
|
+
import { l as getVerboseFlag, o as getFlagValue, r as registerSubCliCommands, s as getPositiveIntFlagValue, u as hasFlag } from "./register.subclis-C3LmMTFy.js";
|
|
41
41
|
import { n as callGatewayFromCli, t as addGatewayClientOptions } from "./gateway-rpc-DwTpsQgX.js";
|
|
42
42
|
import { t as formatHelpExamples } from "./help-format-Bz-E4Xsi.js";
|
|
43
43
|
import { t as adminUnlockCommand } from "./admin-unlock-CjZRxHxf.js";
|
|
@@ -48,7 +48,7 @@ import { i as CONFIGURE_WIZARD_SECTIONS, n as configureCommand, r as configureCo
|
|
|
48
48
|
import { a as gatewayInstallErrorHint, i as buildGatewayInstallPlan, r as isGatewayDaemonRuntime, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-DIgqhoVa.js";
|
|
49
49
|
import { n as ensureSystemdUserLingerNonInteractive } from "./systemd-linger-DHSd9ikR.js";
|
|
50
50
|
import { t as loginCommand } from "./login-JCFx5Pzl.js";
|
|
51
|
-
import { n as loadAndMaybeMigrateDoctorConfig, t as doctorCommand } from "./doctor-
|
|
51
|
+
import { n as loadAndMaybeMigrateDoctorConfig, t as doctorCommand } from "./doctor-BgN9XEBn.js";
|
|
52
52
|
import { fileURLToPath } from "node:url";
|
|
53
53
|
import fs from "node:fs";
|
|
54
54
|
import path from "node:path";
|
|
@@ -3107,7 +3107,7 @@ function registerLoginCommand(program) {
|
|
|
3107
3107
|
console.log(theme.muted(` user=${result.userId} org=${result.orgId}`));
|
|
3108
3108
|
}
|
|
3109
3109
|
if (opts.chat !== false && result.gatewayUrl && process.stdin.isTTY && process.stdout.isTTY) {
|
|
3110
|
-
const { runShell } = await import("./tui-shell-
|
|
3110
|
+
const { runShell } = await import("./tui-shell-Cnkwf3Qi.js").then((n) => n.n);
|
|
3111
3111
|
console.log(theme.muted("\n Opening your koi chat…\n"));
|
|
3112
3112
|
await runShell({
|
|
3113
3113
|
url: result.gatewayUrl,
|
|
@@ -35,7 +35,7 @@ import { a as repairLaunchAgentBootstrap, i as launchAgentPlistExists, n as isLa
|
|
|
35
35
|
import { r as isSystemdUserServiceAvailable } from "./systemd-DZP4s4qd.js";
|
|
36
36
|
import { t as readLastGatewayErrorLine } from "./diagnostics-6vXdnH8k.js";
|
|
37
37
|
import { t as collectChannelStatusIssues } from "./channels-status-issues-CGTJwSbx.js";
|
|
38
|
-
import { n as doctorShellCompletion } from "./doctor-completion-
|
|
38
|
+
import { n as doctorShellCompletion } from "./doctor-completion-KPbcZuPj.js";
|
|
39
39
|
import { n as resolveControlUiDistIndexHealth, r as resolveControlUiDistIndexPathForRoot } from "./control-ui-assets-D4o4damy.js";
|
|
40
40
|
import { a as gatewayInstallErrorHint, d as renderSystemNodeWarning, i as buildGatewayInstallPlan, n as GATEWAY_DAEMON_RUNTIME_OPTIONS, p as resolveSystemNodeInfo, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-DIgqhoVa.js";
|
|
41
41
|
import { t as ensureSystemdUserLingerInteractive } from "./systemd-linger-DHSd9ikR.js";
|
|
@@ -3,7 +3,7 @@ import { r as resolveCliName, t as formatCliCommand } from "./command-format-DOY
|
|
|
3
3
|
import { t as VERSION } from "./version-B_FpLmDY.js";
|
|
4
4
|
import { t as note } from "./note-PNq_JEQe.js";
|
|
5
5
|
import { c as compareSemverStrings, s as checkUpdateStatus } from "./update-runner-DHNkj8-z.js";
|
|
6
|
-
import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-
|
|
6
|
+
import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-BsGr8aGm.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { spawnSync } from "node:child_process";
|
|
9
9
|
|
package/dist/entry.js
CHANGED
|
@@ -247,7 +247,7 @@ if (!ensureExperimentalWarningSuppressed()) {
|
|
|
247
247
|
applyCliProfileEnv({ profile: parsed.profile });
|
|
248
248
|
process$1.argv = parsed.argv;
|
|
249
249
|
}
|
|
250
|
-
import("./run-main-
|
|
250
|
+
import("./run-main-CElhLhnt.js").then(({ runCli }) => runCli(process$1.argv)).catch((error) => {
|
|
251
251
|
console.error("[SKYKOI] Failed to start CLI:", error instanceof Error ? error.stack ?? error.message : error);
|
|
252
252
|
process$1.exitCode = 1;
|
|
253
253
|
});
|
|
@@ -105,7 +105,7 @@ import { t as resolveChannelDefaultAccountId } from "./helpers-4BXRutqw.js";
|
|
|
105
105
|
import "./logging-C3sRv-iX.js";
|
|
106
106
|
import "./note-PNq_JEQe.js";
|
|
107
107
|
import { t as WizardCancelledError } from "./prompts-BC5TXS0_.js";
|
|
108
|
-
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-
|
|
108
|
+
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-Bpx4dZL2.js";
|
|
109
109
|
import { n as installSkill } from "./onboard-skills-D1-xQ5oZ.js";
|
|
110
110
|
import "./github-copilot-auth-Qm1psuh_.js";
|
|
111
111
|
import "./onboard-channels-Cp3mqLlq.js";
|
|
@@ -124,15 +124,15 @@ import { p as resolveGatewayStateDir } from "./systemd-DZP4s4qd.js";
|
|
|
124
124
|
import "./diagnostics-6vXdnH8k.js";
|
|
125
125
|
import "./node-service-Bb6tgGQx.js";
|
|
126
126
|
import "./channels-status-issues-CGTJwSbx.js";
|
|
127
|
-
import "./doctor-completion-
|
|
128
|
-
import "./register.subclis-
|
|
127
|
+
import "./doctor-completion-KPbcZuPj.js";
|
|
128
|
+
import "./register.subclis-C3LmMTFy.js";
|
|
129
129
|
import { a as createOutboundSendDeps$1, i as resolveKoiOutboundTarget, r as resolveKoiDeliveryPlan, t as koiCommand } from "./koi-DQ_ksiaq.js";
|
|
130
130
|
import { a as resolveControlUiRootSync, i as resolveControlUiRootOverrideSync, t as ensureControlUiAssetsBuilt } from "./control-ui-assets-D4o4damy.js";
|
|
131
131
|
import "./daemon-runtime-DIgqhoVa.js";
|
|
132
132
|
import { n as resolveWideAreaDiscoveryDomain, r as writeWideAreaGatewayZone } from "./widearea-dns-BjWuJvtM.js";
|
|
133
133
|
import { n as discoverGatewayBeacons } from "./bonjour-discovery-3LKAHtHL.js";
|
|
134
134
|
import "./ensure-local-gateway-Xk7ir7zS.js";
|
|
135
|
-
import "./completion-cli-
|
|
135
|
+
import "./completion-cli-BsGr8aGm.js";
|
|
136
136
|
import "./service-audit-BVZGmzLW.js";
|
|
137
137
|
import { i as shouldIncludeHook, n as loadWorkspaceHookEntries, r as resolveHookConfig } from "./hooks-status-Cr0qf9U9.js";
|
|
138
138
|
import "./tui-B_qSaNu2.js";
|
package/dist/index.js
CHANGED
|
@@ -91,11 +91,11 @@ import { t as isMainModule } from "./is-main-CQX7mFIJ.js";
|
|
|
91
91
|
import { t as ensureSKYKOICliOnPath } from "./path-env-CnhsG0TT.js";
|
|
92
92
|
import { t as assertSupportedRuntime } from "./runtime-guard-qFkyrhAB.js";
|
|
93
93
|
import "./ports-B03Y1yyv.js";
|
|
94
|
-
import "./config-guard-
|
|
94
|
+
import "./config-guard-C53xJqkX.js";
|
|
95
95
|
import "./logging-C3sRv-iX.js";
|
|
96
96
|
import "./note-PNq_JEQe.js";
|
|
97
97
|
import "./clack-prompter-clPzQ9p-.js";
|
|
98
|
-
import "./onboarding-
|
|
98
|
+
import "./onboarding-Bpx4dZL2.js";
|
|
99
99
|
import "./onboard-skills-D1-xQ5oZ.js";
|
|
100
100
|
import "./github-copilot-auth-Qm1psuh_.js";
|
|
101
101
|
import "./onboard-channels-Cp3mqLlq.js";
|
|
@@ -114,8 +114,8 @@ import "./systemd-DZP4s4qd.js";
|
|
|
114
114
|
import "./diagnostics-6vXdnH8k.js";
|
|
115
115
|
import "./node-service-Bb6tgGQx.js";
|
|
116
116
|
import "./channels-status-issues-CGTJwSbx.js";
|
|
117
|
-
import "./doctor-completion-
|
|
118
|
-
import "./register.subclis-
|
|
117
|
+
import "./doctor-completion-KPbcZuPj.js";
|
|
118
|
+
import "./register.subclis-C3LmMTFy.js";
|
|
119
119
|
import "./gateway-rpc-DwTpsQgX.js";
|
|
120
120
|
import "./help-format-Bz-E4Xsi.js";
|
|
121
121
|
import "./admin-unlock-CjZRxHxf.js";
|
|
@@ -131,14 +131,14 @@ import "./ensure-local-gateway-Xk7ir7zS.js";
|
|
|
131
131
|
import "./channel-auth-DCGvsTTl.js";
|
|
132
132
|
import "./login-JCFx5Pzl.js";
|
|
133
133
|
import "./auth-health-FPMBFAsj.js";
|
|
134
|
-
import "./doctor-
|
|
135
|
-
import "./completion-cli-
|
|
134
|
+
import "./doctor-BgN9XEBn.js";
|
|
135
|
+
import "./completion-cli-BsGr8aGm.js";
|
|
136
136
|
import "./service-audit-BVZGmzLW.js";
|
|
137
137
|
import "./hooks-status-Cr0qf9U9.js";
|
|
138
138
|
import "./tui-B_qSaNu2.js";
|
|
139
139
|
import "./canvas-state-C3YRnkNr.js";
|
|
140
140
|
import "./channel-options-czSeefCv.js";
|
|
141
|
-
import { n as buildProgram } from "./program-
|
|
141
|
+
import { n as buildProgram } from "./program-C9_uUyMc.js";
|
|
142
142
|
import process from "node:process";
|
|
143
143
|
import { fileURLToPath } from "node:url";
|
|
144
144
|
|
|
@@ -38,10 +38,10 @@ import { t as readLastGatewayErrorLine } from "./diagnostics-6vXdnH8k.js";
|
|
|
38
38
|
import { t as resolveNodeService } from "./node-service-Bb6tgGQx.js";
|
|
39
39
|
import { t as collectChannelStatusIssues } from "./channels-status-issues-CGTJwSbx.js";
|
|
40
40
|
import { i as redactSecrets, n as formatDuration$1, r as formatGatewayAuthUsed, t as formatAge$1 } from "./format-DtciOWIX.js";
|
|
41
|
-
import { a as formatUpdateOneLiner, i as formatUpdateAvailableHint, o as getUpdateCheckResult, r as ensureCompletionCacheExists, s as resolveUpdateAvailability, t as checkShellCompletionStatus } from "./doctor-completion-
|
|
41
|
+
import { a as formatUpdateOneLiner, i as formatUpdateAvailableHint, o as getUpdateCheckResult, r as ensureCompletionCacheExists, s as resolveUpdateAvailability, t as checkShellCompletionStatus } from "./doctor-completion-KPbcZuPj.js";
|
|
42
42
|
import { t as ensureControlUiAssetsBuilt } from "./control-ui-assets-D4o4damy.js";
|
|
43
43
|
import { a as gatewayInstallErrorHint, i as buildGatewayInstallPlan, n as GATEWAY_DAEMON_RUNTIME_OPTIONS, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-DIgqhoVa.js";
|
|
44
|
-
import { r as installCompletion } from "./completion-cli-
|
|
44
|
+
import { r as installCompletion } from "./completion-cli-BsGr8aGm.js";
|
|
45
45
|
import { t as buildWorkspaceHookStatus } from "./hooks-status-Cr0qf9U9.js";
|
|
46
46
|
import { t as runTui } from "./tui-B_qSaNu2.js";
|
|
47
47
|
import fs from "node:fs";
|
package/dist/plugin-sdk/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, o as __toESM, r as __exportAll, t as __commonJSMin } from "./chunk-D_gEzPfs.js";
|
|
2
|
-
import { a as require_jws, i as require_dist_cjs$1, n as LRUCache$1, o as require_safe_buffer, r as getOAuthProviders, s as getEnvApiKey } from "./pi-model-discovery-
|
|
2
|
+
import { a as require_jws, i as require_dist_cjs$1, n as LRUCache$1, o as require_safe_buffer, r as getOAuthProviders, s as getEnvApiKey } from "./pi-model-discovery-ClImJtLC.js";
|
|
3
3
|
import { t as require_dist_cjs$2 } from "./dist-cjs-B9iGzXDA.js";
|
|
4
4
|
import { C as require_dist_cjs$3, E as init_dist_es$1, M as require_dist_cjs$13, N as require_dist_cjs$12, T as dist_es_exports$1, a as require_dist_cjs$5, c as require_dist_cjs$17, d as require_dist_cjs$15, f as dist_es_exports, h as protocols_exports, i as require_dist_cjs$7, j as require_dist_cjs$14, l as require_dist_cjs$16, m as init_protocols, n as require_dist_cjs$10, o as require_dist_cjs$8, p as init_dist_es, r as require_dist_cjs$9, s as require_dist_cjs$11, t as require_dist_cjs$18, u as require_dist_cjs$6, w as require_dist_cjs$4 } from "./dist-cjs-Cpdu8jQP.js";
|
|
5
5
|
import { C as schema_exports, N as require_dist_cjs$21, P as require_dist_cjs$19, S as init_schema, t as require_dist_cjs$20 } from "./dist-cjs-BVSr8ctW.js";
|
|
@@ -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
|
|
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";
|
|
@@ -42,7 +42,7 @@ import { mkdir, readFile, stat as stat$1, unlink, writeFile } from "fs/promises"
|
|
|
42
42
|
import { Readable as Readable$1 } from "node:stream";
|
|
43
43
|
import { pipeline as pipeline$1 } from "node:stream/promises";
|
|
44
44
|
import WebSocket, { WebSocket as WebSocket$1 } from "ws";
|
|
45
|
-
import
|
|
45
|
+
import AjvPkg from "ajv";
|
|
46
46
|
import lockfile from "proper-lockfile";
|
|
47
47
|
import { URL as URL$1 } from "url";
|
|
48
48
|
import "yaml";
|
|
@@ -20609,7 +20609,7 @@ function loadPluginManifestRegistry(params) {
|
|
|
20609
20609
|
|
|
20610
20610
|
//#endregion
|
|
20611
20611
|
//#region src/plugins/schema-validator.ts
|
|
20612
|
-
const ajv$1 = new
|
|
20612
|
+
const ajv$1 = new AjvPkg({
|
|
20613
20613
|
allErrors: true,
|
|
20614
20614
|
strict: false,
|
|
20615
20615
|
removeAdditional: false
|
|
@@ -48256,7 +48256,7 @@ const PROTOCOL_VERSION = 3;
|
|
|
48256
48256
|
|
|
48257
48257
|
//#endregion
|
|
48258
48258
|
//#region src/gateway/protocol/index.ts
|
|
48259
|
-
const ajv = new
|
|
48259
|
+
const ajv = new AjvPkg({
|
|
48260
48260
|
allErrors: true,
|
|
48261
48261
|
strict: false,
|
|
48262
48262
|
removeAdditional: false
|
|
@@ -68159,7 +68159,7 @@ function enqueueSystemEvent(text, options) {
|
|
|
68159
68159
|
const MODEL_CACHE = /* @__PURE__ */ new Map();
|
|
68160
68160
|
(async () => {
|
|
68161
68161
|
try {
|
|
68162
|
-
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-
|
|
68162
|
+
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-ClImJtLC.js").then((n) => n.t);
|
|
68163
68163
|
await ensureSKYKOIModelsJson(loadConfig());
|
|
68164
68164
|
const koiDir = resolveSKYKOIKoiDir();
|
|
68165
68165
|
const models = discoverModels(discoverAuthStorage(koiDir), koiDir).getAll();
|
|
@@ -228407,7 +228407,7 @@ const BUFFERABLE_EVENT_SET = new Set([
|
|
|
228407
228407
|
* making the data processing more efficient.
|
|
228408
228408
|
*/
|
|
228409
228409
|
const makeEventBuffer = (logger) => {
|
|
228410
|
-
const ev = new EventEmitter();
|
|
228410
|
+
const ev = new EventEmitter$1();
|
|
228411
228411
|
const historyCache = /* @__PURE__ */ new Set();
|
|
228412
228412
|
let data = makeBufferData();
|
|
228413
228413
|
let isBuffering = false;
|
|
@@ -233977,7 +233977,7 @@ var BinaryInfo = class {
|
|
|
233977
233977
|
|
|
233978
233978
|
//#endregion
|
|
233979
233979
|
//#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
|
|
233980
|
-
var AbstractSocketClient = class extends EventEmitter
|
|
233980
|
+
var AbstractSocketClient = class extends EventEmitter {
|
|
233981
233981
|
constructor(url, config) {
|
|
233982
233982
|
super();
|
|
233983
233983
|
this.url = url;
|
|
@@ -34,7 +34,7 @@ import { access, mkdir, readFile, stat as stat$1, writeFile } from "fs/promises"
|
|
|
34
34
|
import Stream, { Readable as Readable$1 } from "node:stream";
|
|
35
35
|
import { finished } from "node:stream/promises";
|
|
36
36
|
import * as NodeWs from "ws";
|
|
37
|
-
import
|
|
37
|
+
import AjvPkg from "ajv";
|
|
38
38
|
import lockfile from "proper-lockfile";
|
|
39
39
|
import { fileURLToPath as fileURLToPath$1 } from "url";
|
|
40
40
|
import { TypeCompiler } from "@sinclair/typebox/compiler";
|
|
@@ -59699,7 +59699,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
59699
59699
|
//#endregion
|
|
59700
59700
|
//#region node_modules/.pnpm/@mariozechner+pi-ai@0.52.8_patch_hash=f41b8429247a07c256a366fc8eddb44710b4e74212f25ffaf_aba27699dbfe3dddaa7a3984ad46615e/node_modules/@mariozechner/pi-ai/dist/utils/validation.js
|
|
59701
59701
|
var import_dist$1 = /* @__PURE__ */ __toESM(require_dist$1(), 1);
|
|
59702
|
-
const Ajv$1 =
|
|
59702
|
+
const Ajv$1 = AjvPkg.default || AjvPkg;
|
|
59703
59703
|
const addFormats = import_dist$1.default.default || import_dist$1.default;
|
|
59704
59704
|
const isBrowserExtension = typeof globalThis !== "undefined" && globalThis.chrome?.runtime?.id !== void 0;
|
|
59705
59705
|
let ajv = null;
|
|
@@ -174026,7 +174026,7 @@ var AuthStorage = class {
|
|
|
174026
174026
|
/**
|
|
174027
174027
|
* Model registry - manages built-in and custom models, provides API key resolution.
|
|
174028
174028
|
*/
|
|
174029
|
-
const Ajv =
|
|
174029
|
+
const Ajv = AjvPkg.default || AjvPkg;
|
|
174030
174030
|
const OpenRouterRoutingSchema = Type.Object({
|
|
174031
174031
|
only: Type.Optional(Type.Array(Type.String())),
|
|
174032
174032
|
order: Type.Optional(Type.Array(Type.String()))
|
|
@@ -5,8 +5,8 @@ import { n as replaceCliName, r as resolveCliName } from "./command-format-DOYW_
|
|
|
5
5
|
import { t as isTruthyEnvValue } from "./env-C2ovlUPG.js";
|
|
6
6
|
import { t as VERSION } from "./version-B_FpLmDY.js";
|
|
7
7
|
import { t as formatDocsLink } from "./links-BY_N2dMU.js";
|
|
8
|
-
import { i as registerProgramCommands, n as PLUGIN_CLI_COMMANDS, t as ensureConfigReady } from "./config-guard-
|
|
9
|
-
import { a as getCommandPath, d as hasHelpOrVersion, l as getVerboseFlag } from "./register.subclis-
|
|
8
|
+
import { i as registerProgramCommands, n as PLUGIN_CLI_COMMANDS, t as ensureConfigReady } from "./config-guard-C53xJqkX.js";
|
|
9
|
+
import { a as getCommandPath, d as hasHelpOrVersion, l as getVerboseFlag } from "./register.subclis-C3LmMTFy.js";
|
|
10
10
|
import { t as ensurePluginRegistryLoaded } from "./plugin-registry-Crf69mp9.js";
|
|
11
11
|
import { i as hasEmittedCliBanner, n as emitCliBanner, r as formatCliBannerLine } from "./tui-B_qSaNu2.js";
|
|
12
12
|
import { n as resolveCliChannelOptions } from "./channel-options-czSeefCv.js";
|
|
@@ -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-
|
|
127
|
+
(await import("./gateway-cli-CyhM5xDI.js")).registerGatewayCli(program);
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
130
|
{
|
|
@@ -201,7 +201,7 @@ const entries = [
|
|
|
201
201
|
name: "tui",
|
|
202
202
|
description: "Terminal UI",
|
|
203
203
|
register: async (program) => {
|
|
204
|
-
(await import("./tui-cli-
|
|
204
|
+
(await import("./tui-cli-Cwyd8Mvj.js")).registerTuiCli(program);
|
|
205
205
|
}
|
|
206
206
|
},
|
|
207
207
|
{
|
|
@@ -317,14 +317,14 @@ const entries = [
|
|
|
317
317
|
name: "update",
|
|
318
318
|
description: "CLI update helpers",
|
|
319
319
|
register: async (program) => {
|
|
320
|
-
(await import("./update-cli-
|
|
320
|
+
(await import("./update-cli-XSwJqNGS.js")).registerUpdateCli(program);
|
|
321
321
|
}
|
|
322
322
|
},
|
|
323
323
|
{
|
|
324
324
|
name: "completion",
|
|
325
325
|
description: "Generate shell completion script",
|
|
326
326
|
register: async (program) => {
|
|
327
|
-
(await import("./completion-cli-
|
|
327
|
+
(await import("./completion-cli-BsGr8aGm.js").then((n) => n.n)).registerCompletionCli(program);
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
];
|
|
@@ -88,11 +88,11 @@ import "./deps-I2to_7yo.js";
|
|
|
88
88
|
import "./tailscale-BOh3Z_vn.js";
|
|
89
89
|
import { t as ensureSKYKOICliOnPath } from "./path-env-CnhsG0TT.js";
|
|
90
90
|
import { t as assertSupportedRuntime } from "./runtime-guard-qFkyrhAB.js";
|
|
91
|
-
import { n as PLUGIN_CLI_COMMANDS, r as findRoutedCommand, t as ensureConfigReady } from "./config-guard-
|
|
91
|
+
import { n as PLUGIN_CLI_COMMANDS, r as findRoutedCommand, t as ensureConfigReady } from "./config-guard-C53xJqkX.js";
|
|
92
92
|
import "./logging-C3sRv-iX.js";
|
|
93
93
|
import "./note-PNq_JEQe.js";
|
|
94
94
|
import "./clack-prompter-clPzQ9p-.js";
|
|
95
|
-
import "./onboarding-
|
|
95
|
+
import "./onboarding-Bpx4dZL2.js";
|
|
96
96
|
import "./onboard-skills-D1-xQ5oZ.js";
|
|
97
97
|
import "./github-copilot-auth-Qm1psuh_.js";
|
|
98
98
|
import "./onboard-channels-Cp3mqLlq.js";
|
|
@@ -111,8 +111,8 @@ import "./systemd-DZP4s4qd.js";
|
|
|
111
111
|
import "./diagnostics-6vXdnH8k.js";
|
|
112
112
|
import "./node-service-Bb6tgGQx.js";
|
|
113
113
|
import "./channels-status-issues-CGTJwSbx.js";
|
|
114
|
-
import "./doctor-completion-
|
|
115
|
-
import { a as getCommandPath, c as getPrimaryCommand, d as hasHelpOrVersion } from "./register.subclis-
|
|
114
|
+
import "./doctor-completion-KPbcZuPj.js";
|
|
115
|
+
import { a as getCommandPath, c as getPrimaryCommand, d as hasHelpOrVersion } from "./register.subclis-C3LmMTFy.js";
|
|
116
116
|
import "./gateway-rpc-DwTpsQgX.js";
|
|
117
117
|
import "./help-format-Bz-E4Xsi.js";
|
|
118
118
|
import "./admin-unlock-CjZRxHxf.js";
|
|
@@ -128,8 +128,8 @@ import "./ensure-local-gateway-Xk7ir7zS.js";
|
|
|
128
128
|
import "./channel-auth-DCGvsTTl.js";
|
|
129
129
|
import "./login-JCFx5Pzl.js";
|
|
130
130
|
import "./auth-health-FPMBFAsj.js";
|
|
131
|
-
import "./doctor-
|
|
132
|
-
import "./completion-cli-
|
|
131
|
+
import "./doctor-BgN9XEBn.js";
|
|
132
|
+
import "./completion-cli-BsGr8aGm.js";
|
|
133
133
|
import "./service-audit-BVZGmzLW.js";
|
|
134
134
|
import "./hooks-status-Cr0qf9U9.js";
|
|
135
135
|
import { n as emitCliBanner } from "./tui-B_qSaNu2.js";
|
|
@@ -187,7 +187,7 @@ async function runCli(argv = process$1.argv) {
|
|
|
187
187
|
assertSupportedRuntime();
|
|
188
188
|
if (await tryRouteCli(normalizedArgv)) return;
|
|
189
189
|
enableConsoleCapture();
|
|
190
|
-
const { buildProgram } = await import("./program-
|
|
190
|
+
const { buildProgram } = await import("./program-C9_uUyMc.js").then((n) => n.t);
|
|
191
191
|
const program = buildProgram();
|
|
192
192
|
installUnhandledRejectionHandler();
|
|
193
193
|
process$1.on("uncaughtException", (error) => {
|
|
@@ -224,7 +224,7 @@ async function runCli(argv = process$1.argv) {
|
|
|
224
224
|
}
|
|
225
225
|
const primary = getPrimaryCommand(parseArgv);
|
|
226
226
|
if (primary) {
|
|
227
|
-
const { registerSubCliByName } = await import("./register.subclis-
|
|
227
|
+
const { registerSubCliByName } = await import("./register.subclis-C3LmMTFy.js").then((n) => n.i);
|
|
228
228
|
await registerSubCliByName(program, primary);
|
|
229
229
|
}
|
|
230
230
|
if (!!primary && PLUGIN_CLI_COMMANDS.has(primary)) {
|
|
@@ -62,7 +62,7 @@ import "./daemon-runtime-DIgqhoVa.js";
|
|
|
62
62
|
import "./ensure-local-gateway-Xk7ir7zS.js";
|
|
63
63
|
import "./tui-B_qSaNu2.js";
|
|
64
64
|
import "./canvas-state-C3YRnkNr.js";
|
|
65
|
-
import { t as runShell } from "./tui-shell-
|
|
65
|
+
import { t as runShell } from "./tui-shell-Cnkwf3Qi.js";
|
|
66
66
|
|
|
67
67
|
//#region src/cli/tui-cli.ts
|
|
68
68
|
function registerTuiCli(program) {
|
|
@@ -3,7 +3,7 @@ import { a as buildKoiMainSessionKey } from "./session-key-B2OXLVi_.js";
|
|
|
3
3
|
import { r as resolveDefaultKoiId } from "./koi-scope-C15QLwY-.js";
|
|
4
4
|
import { i as loadConfig } from "./io-BiSyGUoT.js";
|
|
5
5
|
import { O as visibleWidth } from "./dist-B01d37B6.js";
|
|
6
|
-
import { D as getSlashCommands, M as readDurableDigest, T as aliasCommandsFor, c as routeFastLane, i as buildDigest, j as readConversationTurns, l as saveFastModeEnabled, o as filterAllowedCommands, s as loadFastModeEnabled, u as splitSentences } from "./ca-director-D8uV81P4.js";
|
|
6
|
+
import { D as getSlashCommands, M as readDurableDigest, T as aliasCommandsFor, c as routeFastLane, i as buildDigest, j as readConversationTurns, l as saveFastModeEnabled, o as filterAllowedCommands, s as loadFastModeEnabled, u as splitSentences, v as friendlyToolLabel } from "./ca-director-D8uV81P4.js";
|
|
7
7
|
import { c as soundConfig, i as playReplyPing, o as playSystemSound, s as setSoundConfig, u as releaseVoice } from "./channel-summary-DNu96QpK.js";
|
|
8
8
|
import { s as repairSurface, t as drawZenSurface } from "./zen-surface-D4VY3jY0.js";
|
|
9
9
|
import { S as setViewPreset, _ as ChatLog, a as SurfacePanel, b as currentView, c as onboardingCurrent, d as GatewayChatClient, f as KOI_SLOT_H, g as koiFrameCount, h as koiFps, l as speakChunks, m as koiCellFrame, o as createSurfaceSyncWatcher, p as KOI_SLOT_W, s as createEventHandlers, t as runTui, u as stopSpeaking, v as VIEW_PRESETS, x as currentViewPreset, y as VIEW_PRESET_BLURBS } from "./tui-B_qSaNu2.js";
|
|
@@ -78,6 +78,302 @@ function pondColor(k) {
|
|
|
78
78
|
];
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/tui/zen/zen-work-card.ts
|
|
83
|
+
const MAX_STEPS = 40;
|
|
84
|
+
const SHOWN_STEPS = 12;
|
|
85
|
+
const LINGER_MS = 4e3;
|
|
86
|
+
const DIFF_MAX_LINES = 14;
|
|
87
|
+
const OUT_TAIL_LINES = 8;
|
|
88
|
+
const shortPath = (p) => {
|
|
89
|
+
const parts = p.replace(/\/+$/, "").split("/");
|
|
90
|
+
return parts.length <= 3 ? p : `…/${parts.slice(-3).join("/")}`;
|
|
91
|
+
};
|
|
92
|
+
/** File names out of a unified-ish patch ("*** Update File: x" / "+++ b/x"). */
|
|
93
|
+
function patchFiles(patch) {
|
|
94
|
+
const files = [];
|
|
95
|
+
for (const m of patch.matchAll(/^(?:\*\*\*\s+(?:Update|Add|Delete) File:|\+\+\+ (?:b\/)?)(.+)$/gm)) {
|
|
96
|
+
const f = m[1].trim();
|
|
97
|
+
if (f && !files.includes(f)) files.push(f);
|
|
98
|
+
}
|
|
99
|
+
return files;
|
|
100
|
+
}
|
|
101
|
+
/** tools.X( calls inside a run_code program — the plan at a glance. */
|
|
102
|
+
function innerOps(js) {
|
|
103
|
+
const ops = [];
|
|
104
|
+
for (const m of js.matchAll(/tools\.(\w+)\s*\(/g)) {
|
|
105
|
+
if (!ops.includes(m[1])) ops.push(m[1]);
|
|
106
|
+
if (ops.length >= 4) break;
|
|
107
|
+
}
|
|
108
|
+
return ops;
|
|
109
|
+
}
|
|
110
|
+
function innerPaths(js) {
|
|
111
|
+
const paths = [];
|
|
112
|
+
for (const m of js.matchAll(/path\s*:\s*['"`]([^'"`\n]{3,200})['"`]/g)) {
|
|
113
|
+
if (!paths.includes(m[1])) paths.push(m[1]);
|
|
114
|
+
if (paths.length >= 8) break;
|
|
115
|
+
}
|
|
116
|
+
return paths;
|
|
117
|
+
}
|
|
118
|
+
/** Best-effort plain text out of a (sanitized) tool result payload. */
|
|
119
|
+
function resultText(result) {
|
|
120
|
+
if (!result || typeof result !== "object") return typeof result === "string" ? result : "";
|
|
121
|
+
const r = result;
|
|
122
|
+
if (Array.isArray(r.content)) return r.content.map((b) => {
|
|
123
|
+
const block = b;
|
|
124
|
+
return block && block.type === "text" && typeof block.text === "string" ? block.text : "";
|
|
125
|
+
}).filter(Boolean).join("\n");
|
|
126
|
+
if (typeof r.text === "string") return r.text;
|
|
127
|
+
return "";
|
|
128
|
+
}
|
|
129
|
+
/** Inner tool calls reported by a finished run_code program. */
|
|
130
|
+
function runCodeInnerCalls(result) {
|
|
131
|
+
try {
|
|
132
|
+
let details = result?.details;
|
|
133
|
+
if (!details) {
|
|
134
|
+
const text = resultText(result);
|
|
135
|
+
if (text.startsWith("{")) details = JSON.parse(text).details;
|
|
136
|
+
}
|
|
137
|
+
const calls = details?.toolCalls;
|
|
138
|
+
if (!Array.isArray(calls)) return [];
|
|
139
|
+
return calls.slice(0, 12).map((c) => {
|
|
140
|
+
const call = c;
|
|
141
|
+
const args = call.args ?? {};
|
|
142
|
+
return {
|
|
143
|
+
name: String(call.name ?? "tool"),
|
|
144
|
+
...typeof args.path === "string" ? { path: args.path } : {},
|
|
145
|
+
...call.isError === true ? { isError: true } : {}
|
|
146
|
+
};
|
|
147
|
+
});
|
|
148
|
+
} catch {
|
|
149
|
+
return [];
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
const str = (v) => typeof v === "string" && v.trim() ? v : void 0;
|
|
153
|
+
function createWorkTracker(opts) {
|
|
154
|
+
const sessionKeyLc = opts.sessionKey.toLowerCase();
|
|
155
|
+
const state = {
|
|
156
|
+
runId: null,
|
|
157
|
+
active: false,
|
|
158
|
+
startedAt: 0,
|
|
159
|
+
endedAt: 0,
|
|
160
|
+
task: "",
|
|
161
|
+
steps: [],
|
|
162
|
+
files: [],
|
|
163
|
+
diff: null,
|
|
164
|
+
out: null,
|
|
165
|
+
version: 0
|
|
166
|
+
};
|
|
167
|
+
let built = null;
|
|
168
|
+
const bump = () => {
|
|
169
|
+
state.version += 1;
|
|
170
|
+
};
|
|
171
|
+
const touchFile = (p) => {
|
|
172
|
+
const f = str(p);
|
|
173
|
+
if (!f) return;
|
|
174
|
+
const i = state.files.indexOf(f);
|
|
175
|
+
if (i >= 0) state.files.splice(i, 1);
|
|
176
|
+
state.files.push(f);
|
|
177
|
+
if (state.files.length > 10) state.files.shift();
|
|
178
|
+
};
|
|
179
|
+
const setDiff = (file, text) => {
|
|
180
|
+
state.diff = {
|
|
181
|
+
file,
|
|
182
|
+
text: text.split("\n").slice(0, DIFF_MAX_LINES).join("\n")
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
const labelFor = (name, args, description) => {
|
|
186
|
+
if (description) return description;
|
|
187
|
+
const path = str(args.path);
|
|
188
|
+
if (name === "exec" && str(args.command)) return `$ ${String(args.command).slice(0, 68)}`;
|
|
189
|
+
if (path && [
|
|
190
|
+
"read",
|
|
191
|
+
"write",
|
|
192
|
+
"edit"
|
|
193
|
+
].includes(name)) return `${name === "read" ? "reading" : name === "write" ? "writing" : "editing"} ${shortPath(path)}`;
|
|
194
|
+
if (name === "apply_patch") return `patching ${patchFiles(str(args.patch) ?? "").map(shortPath).join(", ") || "files"}`;
|
|
195
|
+
if (name === "run_code") {
|
|
196
|
+
const ops = innerOps(str(args.js) ?? "");
|
|
197
|
+
return ops.length > 0 ? `program: ${ops.join(" · ")}` : "running a program";
|
|
198
|
+
}
|
|
199
|
+
return friendlyToolLabel(name);
|
|
200
|
+
};
|
|
201
|
+
const onToolStart = (data) => {
|
|
202
|
+
const name = String(data.name ?? "tool");
|
|
203
|
+
const args = data.args ?? {};
|
|
204
|
+
const description = str(data.description);
|
|
205
|
+
if (name === "progress") {
|
|
206
|
+
const text = str(args.text);
|
|
207
|
+
if (text) state.steps.push({
|
|
208
|
+
toolCallId: String(data.toolCallId ?? ""),
|
|
209
|
+
name,
|
|
210
|
+
label: `» ${text}`,
|
|
211
|
+
state: "ok",
|
|
212
|
+
startedAt: Date.now(),
|
|
213
|
+
endedAt: Date.now()
|
|
214
|
+
});
|
|
215
|
+
bump();
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
state.steps.push({
|
|
219
|
+
toolCallId: String(data.toolCallId ?? ""),
|
|
220
|
+
name,
|
|
221
|
+
label: labelFor(name, args, description),
|
|
222
|
+
state: "run",
|
|
223
|
+
startedAt: Date.now()
|
|
224
|
+
});
|
|
225
|
+
if (state.steps.length > MAX_STEPS) state.steps.shift();
|
|
226
|
+
const path = str(args.path);
|
|
227
|
+
if (path) touchFile(path);
|
|
228
|
+
if (name === "write" && path) setDiff(path, `+++ ${path}\n${(str(args.content) ?? "").split("\n").slice(0, DIFF_MAX_LINES - 1).map((l) => `+${l}`).join("\n")}`);
|
|
229
|
+
else if (name === "edit" && path) {
|
|
230
|
+
const oldText = str(args.oldText) ?? str(args.old_string) ?? str(args.oldStr) ?? "";
|
|
231
|
+
const newText = str(args.newText) ?? str(args.new_string) ?? str(args.newStr) ?? "";
|
|
232
|
+
if (oldText || newText) setDiff(path, [
|
|
233
|
+
`--- ${path}`,
|
|
234
|
+
...oldText.split("\n").slice(0, 6).map((l) => `-${l}`),
|
|
235
|
+
...newText.split("\n").slice(0, 7).map((l) => `+${l}`)
|
|
236
|
+
].join("\n"));
|
|
237
|
+
} else if (name === "apply_patch") {
|
|
238
|
+
const patch = str(args.patch) ?? "";
|
|
239
|
+
const files = patchFiles(patch);
|
|
240
|
+
for (const f of files) touchFile(f);
|
|
241
|
+
if (patch) setDiff(files[0] ?? "patch", patch);
|
|
242
|
+
} else if (name === "run_code") for (const p of innerPaths(str(args.js) ?? "")) touchFile(p);
|
|
243
|
+
bump();
|
|
244
|
+
};
|
|
245
|
+
const onToolUpdate = (data) => {
|
|
246
|
+
const text = resultText(data.partialResult).trim();
|
|
247
|
+
if (!text) return;
|
|
248
|
+
const step = state.steps.findLast((s) => s.toolCallId === String(data.toolCallId ?? ""));
|
|
249
|
+
state.out = {
|
|
250
|
+
label: step ? step.label.slice(0, 40) : "output",
|
|
251
|
+
text: text.split("\n").slice(-OUT_TAIL_LINES).join("\n")
|
|
252
|
+
};
|
|
253
|
+
bump();
|
|
254
|
+
};
|
|
255
|
+
const onToolResult = (data) => {
|
|
256
|
+
const id = String(data.toolCallId ?? "");
|
|
257
|
+
const step = state.steps.findLast((s) => s.toolCallId === id);
|
|
258
|
+
if (step && step.state === "run") {
|
|
259
|
+
step.state = data.isError === true ? "err" : "ok";
|
|
260
|
+
step.endedAt = Date.now();
|
|
261
|
+
}
|
|
262
|
+
const name = String(data.name ?? "");
|
|
263
|
+
if (name === "exec") {
|
|
264
|
+
const text = resultText(data.result).trim();
|
|
265
|
+
if (text) state.out = {
|
|
266
|
+
label: step?.label.slice(0, 40) ?? "output",
|
|
267
|
+
text: text.split("\n").slice(-OUT_TAIL_LINES).join("\n")
|
|
268
|
+
};
|
|
269
|
+
} else if (name === "run_code") {
|
|
270
|
+
for (const call of runCodeInnerCalls(data.result)) if (call.path) touchFile(call.path);
|
|
271
|
+
}
|
|
272
|
+
bump();
|
|
273
|
+
};
|
|
274
|
+
return {
|
|
275
|
+
startedAt: () => state.startedAt,
|
|
276
|
+
isActive: () => state.active,
|
|
277
|
+
noteTask: (text) => {
|
|
278
|
+
const clean = text.replace(/\s+/g, " ").trim();
|
|
279
|
+
if (!clean || clean.startsWith("/")) return;
|
|
280
|
+
state.task = clean.slice(0, 56);
|
|
281
|
+
},
|
|
282
|
+
onKoiEvent: (payload) => {
|
|
283
|
+
const evt = payload;
|
|
284
|
+
if (!evt || typeof evt !== "object" || !evt.stream) return;
|
|
285
|
+
if (evt.sessionKey && evt.sessionKey.toLowerCase() !== sessionKeyLc) return;
|
|
286
|
+
const data = evt.data ?? {};
|
|
287
|
+
if (evt.stream === "lifecycle") {
|
|
288
|
+
const phase = String(data.phase ?? "");
|
|
289
|
+
if (phase === "start") {
|
|
290
|
+
state.runId = String(evt.runId ?? "");
|
|
291
|
+
state.active = true;
|
|
292
|
+
state.startedAt = Date.now();
|
|
293
|
+
state.endedAt = 0;
|
|
294
|
+
state.steps = [];
|
|
295
|
+
state.files = [];
|
|
296
|
+
state.diff = null;
|
|
297
|
+
state.out = null;
|
|
298
|
+
bump();
|
|
299
|
+
} else if (phase === "end" || phase === "error" || phase === "aborted") {
|
|
300
|
+
if (evt.runId && state.runId && evt.runId !== state.runId) return;
|
|
301
|
+
state.active = false;
|
|
302
|
+
state.endedAt = Date.now();
|
|
303
|
+
for (const s of state.steps) if (s.state === "run") {
|
|
304
|
+
s.state = phase === "end" ? "ok" : "err";
|
|
305
|
+
s.endedAt = Date.now();
|
|
306
|
+
}
|
|
307
|
+
bump();
|
|
308
|
+
}
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
if (!state.active) return;
|
|
312
|
+
if (evt.runId && state.runId && evt.runId !== state.runId) return;
|
|
313
|
+
if (evt.stream === "tool") {
|
|
314
|
+
const phase = String(data.phase ?? "");
|
|
315
|
+
if (phase === "start") onToolStart(data);
|
|
316
|
+
else if (phase === "update") onToolUpdate(data);
|
|
317
|
+
else if (phase === "result") onToolResult(data);
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
surfaceFor: (now) => {
|
|
321
|
+
if (!state.active && (state.endedAt === 0 || now - state.endedAt > LINGER_MS)) return null;
|
|
322
|
+
if (state.steps.length === 0 && state.active && now - state.startedAt < 400) return null;
|
|
323
|
+
const second = Math.floor(now / 500);
|
|
324
|
+
if (built && built.version === state.version && built.second === second) return built.surface;
|
|
325
|
+
const rows = state.steps.slice(-SHOWN_STEPS).map((s) => {
|
|
326
|
+
const durMs = (s.endedAt ?? now) - s.startedAt;
|
|
327
|
+
const dur = durMs >= 100 ? durMs < 1e4 ? `${(durMs / 1e3).toFixed(1)}s` : `${Math.round(durMs / 1e3)}s` : "";
|
|
328
|
+
return `${s.state === "run" ? "▸" : s.state === "ok" ? "✓" : "✗"} ${s.label}${dur ? ` ${dur}` : ""}${s.state === "run" ? " …" : ""}`;
|
|
329
|
+
});
|
|
330
|
+
const elapsed = Math.max(0, Math.round(((state.active ? now : state.endedAt) - state.startedAt) / 1e3));
|
|
331
|
+
const panes = [{
|
|
332
|
+
id: "steps",
|
|
333
|
+
type: "log_stream",
|
|
334
|
+
title: state.active ? "live" : "done",
|
|
335
|
+
text: rows.join("\n") || "starting…",
|
|
336
|
+
region: "main",
|
|
337
|
+
icon: "⚙",
|
|
338
|
+
...state.active ? { refreshMs: 500 } : {}
|
|
339
|
+
}];
|
|
340
|
+
if (state.diff) panes.push({
|
|
341
|
+
id: "diff",
|
|
342
|
+
type: "diff",
|
|
343
|
+
title: shortPath(state.diff.file),
|
|
344
|
+
text: state.diff.text,
|
|
345
|
+
region: "main",
|
|
346
|
+
icon: "±"
|
|
347
|
+
});
|
|
348
|
+
else if (state.out) panes.push({
|
|
349
|
+
id: "out",
|
|
350
|
+
type: "log_stream",
|
|
351
|
+
title: state.out.label,
|
|
352
|
+
text: state.out.text,
|
|
353
|
+
region: "main"
|
|
354
|
+
});
|
|
355
|
+
const surface = {
|
|
356
|
+
version: 1,
|
|
357
|
+
surfaceId: "koi-live-work",
|
|
358
|
+
title: `${state.task || "working"} · ${state.active ? `${elapsed}s` : `done in ${elapsed}s`}`.slice(0, 110),
|
|
359
|
+
root: "/",
|
|
360
|
+
panes,
|
|
361
|
+
actions: [],
|
|
362
|
+
accent: state.steps.some((s) => s.state === "err") ? "rose" : "violet",
|
|
363
|
+
icon: state.active ? "⚙" : "✓",
|
|
364
|
+
size: "normal"
|
|
365
|
+
};
|
|
366
|
+
built = {
|
|
367
|
+
surface,
|
|
368
|
+
at: now,
|
|
369
|
+
version: state.version,
|
|
370
|
+
second
|
|
371
|
+
};
|
|
372
|
+
return surface;
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
|
|
81
377
|
//#endregion
|
|
82
378
|
//#region src/tui/zen/zen-app.ts
|
|
83
379
|
/**
|
|
@@ -283,6 +579,9 @@ async function runZen(opts) {
|
|
|
283
579
|
let mountedSurface = null;
|
|
284
580
|
/** When the current surface mounted — drives the card's entrance fade. */
|
|
285
581
|
let surfaceMountT0 = 0;
|
|
582
|
+
/** Last time the koi published ANY surface — the live work card yields to it. */
|
|
583
|
+
let surfaceLastPublishedAt = 0;
|
|
584
|
+
const workTracker = createWorkTracker({ sessionKey });
|
|
286
585
|
let btnPressed = null;
|
|
287
586
|
/** Local drill-down: opened INSTANTLY from surface.details on row click. */
|
|
288
587
|
let detail = null;
|
|
@@ -392,6 +691,7 @@ async function runZen(opts) {
|
|
|
392
691
|
const prevId = mountedSurface?.surfaceId ?? null;
|
|
393
692
|
surfacePanel.setSurface(mountable);
|
|
394
693
|
mountedSurface = mountable;
|
|
694
|
+
if (mountable) surfaceLastPublishedAt = Date.now();
|
|
395
695
|
if (mountable && mountable.surfaceId !== prevId) {
|
|
396
696
|
surfaceMountT0 = Date.now();
|
|
397
697
|
logSurfaceEvent("mount");
|
|
@@ -416,8 +716,10 @@ async function runZen(opts) {
|
|
|
416
716
|
client.onEvent = (evt) => {
|
|
417
717
|
debug?.(`event ${evt.event} ${JSON.stringify(evt.payload).slice(0, 160)}`);
|
|
418
718
|
if (evt.event === "chat") handleChatEvent(evt.payload);
|
|
419
|
-
else if (evt.event === "koi")
|
|
420
|
-
|
|
719
|
+
else if (evt.event === "koi") {
|
|
720
|
+
handleKoiEvent(evt.payload);
|
|
721
|
+
workTracker.onKoiEvent(evt.payload);
|
|
722
|
+
} else if (evt.event === "canvas:updated") surfaceSync.onEvent(evt.event, evt.payload);
|
|
421
723
|
else if (evt.event === "tui.control") {
|
|
422
724
|
const c = evt.payload ?? {};
|
|
423
725
|
if (c.sessionKey && c.sessionKey !== sessionKey) return;
|
|
@@ -464,6 +766,7 @@ async function runZen(opts) {
|
|
|
464
766
|
/** THE submit path: fast lane first (when on), smart model as fallback/delegate. */
|
|
465
767
|
const submitText = async (text2) => {
|
|
466
768
|
pushTail("user", text2);
|
|
769
|
+
if (!text2.startsWith("/") && !text2.startsWith("[")) workTracker.noteTask(text2);
|
|
467
770
|
if (!fastMode) {
|
|
468
771
|
await send(text2);
|
|
469
772
|
return;
|
|
@@ -509,6 +812,7 @@ async function runZen(opts) {
|
|
|
509
812
|
surfacePanel.setSurface(fastSurf);
|
|
510
813
|
mountedSurface = fastSurf;
|
|
511
814
|
surfaceMountT0 = Date.now();
|
|
815
|
+
surfaceLastPublishedAt = Date.now();
|
|
512
816
|
logSurfaceEvent("mount", { lane: "fast" });
|
|
513
817
|
handled = true;
|
|
514
818
|
}
|
|
@@ -1000,11 +1304,14 @@ async function runZen(opts) {
|
|
|
1000
1304
|
}
|
|
1001
1305
|
const composerY = H - 2;
|
|
1002
1306
|
const stageH = H - 4;
|
|
1003
|
-
const
|
|
1004
|
-
const
|
|
1307
|
+
const workSurface = workTracker.surfaceFor(now);
|
|
1308
|
+
const workUp = workSurface !== null && surfaceLastPublishedAt < workTracker.startedAt();
|
|
1309
|
+
const activeCard = workUp ? workSurface : surfacePanel.isVisible() && mountedSurface !== null ? mountedSurface : null;
|
|
1310
|
+
const surfaceUp = activeCard !== null;
|
|
1311
|
+
const fillUp = surfaceUp && activeCard?.size === "fill";
|
|
1005
1312
|
const textW = Math.min(64, W - 8);
|
|
1006
1313
|
const lines = !fillUp && zen.kind === "reply" && zen.text.trim() ? wrap(stripMd(zen.text), textW) : [];
|
|
1007
|
-
const anchorY = Math.max(2, Math.floor(stageH * (surfaceUp &&
|
|
1314
|
+
const anchorY = Math.max(2, Math.floor(stageH * (surfaceUp && activeCard?.size === "full" ? .16 : .34)));
|
|
1008
1315
|
const idleStage = lines.length === 0 && !surfaceUp;
|
|
1009
1316
|
if (pondAvailable()) {
|
|
1010
1317
|
const meta = pondMeta();
|
|
@@ -1126,11 +1433,11 @@ async function runZen(opts) {
|
|
|
1126
1433
|
putText(left + (lines[lastRow] ?? "").length + 1, anchorY + lastRow, "▌", DIMGREY);
|
|
1127
1434
|
}
|
|
1128
1435
|
}
|
|
1129
|
-
if (surfaceUp &&
|
|
1436
|
+
if (surfaceUp && activeCard) {
|
|
1130
1437
|
const gap = lines.length > 0 ? 3 : 0;
|
|
1131
1438
|
const top = fillUp ? 1 : lines.length > 0 ? anchorY + lines.length + gap : Math.max(2, anchorY - 1);
|
|
1132
1439
|
const maxH = Math.max(6, composerY - 2 - top);
|
|
1133
|
-
const card = drawZenSurface(painter,
|
|
1440
|
+
const card = drawZenSurface(painter, activeCard, {
|
|
1134
1441
|
y: top,
|
|
1135
1442
|
maxW: fillUp ? W - 2 : W - 4,
|
|
1136
1443
|
maxH,
|
|
@@ -1138,7 +1445,7 @@ async function runZen(opts) {
|
|
|
1138
1445
|
pointer,
|
|
1139
1446
|
pressedIndex: btnPressed && now < btnPressed.until ? btnPressed.i : null,
|
|
1140
1447
|
now,
|
|
1141
|
-
mountT0: surfaceMountT0
|
|
1448
|
+
mountT0: workUp ? workTracker.startedAt() : surfaceMountT0
|
|
1142
1449
|
});
|
|
1143
1450
|
if (rowFlash && now < rowFlash.until && rowFlash.y < composerY - 1) for (let i = card.x + 1; i < card.x + card.width - 1; i += 1) sb.put({
|
|
1144
1451
|
x: i,
|
|
@@ -1159,7 +1466,7 @@ async function runZen(opts) {
|
|
|
1159
1466
|
dy: 0,
|
|
1160
1467
|
wrap: false
|
|
1161
1468
|
}, textGrid[rowFlash.y]?.[i] || " ");
|
|
1162
|
-
const actionsRef =
|
|
1469
|
+
const actionsRef = activeCard.actions;
|
|
1163
1470
|
for (const r of card.regions) {
|
|
1164
1471
|
if (overlayOpen || r.y >= composerY - 1) continue;
|
|
1165
1472
|
regions.push({
|
|
@@ -1189,10 +1496,10 @@ async function runZen(opts) {
|
|
|
1189
1496
|
logSurfaceEvent("expand", { title: r.expand.title });
|
|
1190
1497
|
return;
|
|
1191
1498
|
}
|
|
1192
|
-
if (r.detailKey &&
|
|
1499
|
+
if (r.detailKey && activeCard?.details?.[r.detailKey]) {
|
|
1193
1500
|
detail = {
|
|
1194
1501
|
title: r.detailKey,
|
|
1195
|
-
body:
|
|
1502
|
+
body: activeCard.details[r.detailKey],
|
|
1196
1503
|
scroll: 0
|
|
1197
1504
|
};
|
|
1198
1505
|
logSurfaceEvent("detail", { key: r.detailKey });
|
|
@@ -104,15 +104,15 @@ import "./service-D1-PnhZe.js";
|
|
|
104
104
|
import "./systemd-DZP4s4qd.js";
|
|
105
105
|
import "./diagnostics-6vXdnH8k.js";
|
|
106
106
|
import "./channels-status-issues-CGTJwSbx.js";
|
|
107
|
-
import { a as formatUpdateOneLiner, i as formatUpdateAvailableHint, r as ensureCompletionCacheExists, s as resolveUpdateAvailability, t as checkShellCompletionStatus } from "./doctor-completion-
|
|
108
|
-
import "./register.subclis-
|
|
107
|
+
import { a as formatUpdateOneLiner, i as formatUpdateAvailableHint, r as ensureCompletionCacheExists, s as resolveUpdateAvailability, t as checkShellCompletionStatus } from "./doctor-completion-KPbcZuPj.js";
|
|
108
|
+
import "./register.subclis-C3LmMTFy.js";
|
|
109
109
|
import { t as formatHelpExamples } from "./help-format-Bz-E4Xsi.js";
|
|
110
110
|
import "./control-ui-assets-D4o4damy.js";
|
|
111
111
|
import "./daemon-runtime-DIgqhoVa.js";
|
|
112
112
|
import "./systemd-linger-DHSd9ikR.js";
|
|
113
113
|
import "./auth-health-FPMBFAsj.js";
|
|
114
|
-
import { t as doctorCommand } from "./doctor-
|
|
115
|
-
import { r as installCompletion } from "./completion-cli-
|
|
114
|
+
import { t as doctorCommand } from "./doctor-BgN9XEBn.js";
|
|
115
|
+
import { r as installCompletion } from "./completion-cli-BsGr8aGm.js";
|
|
116
116
|
import "./service-audit-BVZGmzLW.js";
|
|
117
117
|
import "./shared-tNGHWtW-.js";
|
|
118
118
|
import { r as runDaemonRestart } from "./daemon-cli-B6TentOe.js";
|