@heretek-ai/openclaw 2026.3.27 → 2026.3.29
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/.buildstamp +1 -1
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/chunks/command-registry-B9Orjysx.mjs +214 -0
- package/dist/chunks/command-registry-BtWKyYyZ.mjs +14 -0
- package/dist/chunks/completion-cli-B8M--XTS.mjs +448 -0
- package/dist/chunks/completion-cli-o3_a4BuE.mjs +17 -0
- package/dist/chunks/doctor-completion-CyOOf-GM.mjs +92 -0
- package/dist/chunks/gateway-cli-ZLRmdr6x.mjs +43508 -0
- package/dist/chunks/onboard-DqlCib9K.mjs +601 -0
- package/dist/chunks/program-Bg5zshJo.mjs +163 -0
- package/dist/chunks/prompt-select-styled-CxHtgKpu.mjs +5035 -0
- package/dist/chunks/register.maintenance-BdaRRBo0.mjs +685 -0
- package/dist/chunks/register.onboard-D128_sx4.mjs +168 -0
- package/dist/chunks/register.setup-BqV-_yA8.mjs +188 -0
- package/dist/chunks/register.subclis-BTo9umpR.mjs +13 -0
- package/dist/chunks/register.subclis-CVkk-8A3.mjs +319 -0
- package/dist/chunks/run-main-Rx8sfWSp.mjs +437 -0
- package/dist/chunks/setup-BY2mioiw.mjs +399 -0
- package/dist/chunks/setup.finalize-DvAFcLhU.mjs +544 -0
- package/dist/chunks/update-cli-B1-vpFz1.mjs +1632 -0
- package/dist/entry.mjs +1 -1
- package/dist/extensions/memory-core/index.mjs +40 -0
- package/dist/index.mjs +1 -1
- package/docs/DEPLOYMENT-BUGS.md +152 -0
- package/package.json +5 -5
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./logger-vRSRu9wD.mjs";
|
|
2
|
+
import "./paths-CNST7z3O.mjs";
|
|
3
|
+
import "./tmp-openclaw-dir-BeWwpCKM.mjs";
|
|
4
|
+
import "./theme-w86ra_7m.mjs";
|
|
5
|
+
import "./globals-DZFR3wyP.mjs";
|
|
6
|
+
import "./subsystem-yLe4Gjha.mjs";
|
|
7
|
+
import "./ansi-BJ9IOlIp.mjs";
|
|
8
|
+
import "./boolean-Bwxxidw8.mjs";
|
|
9
|
+
import "./env-9fhyzTaG.mjs";
|
|
10
|
+
import "./utils-Dc9DiBqf.mjs";
|
|
11
|
+
import "./links-BNNF54ea.mjs";
|
|
12
|
+
import { a as registerCompletionCli, c as usesSlowDynamicCompletion, i as isCompletionInstalled, n as getCompletionScript, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as completionCacheExists } from "./completion-cli-B8M--XTS.mjs";
|
|
13
|
+
import "./register.subclis-CVkk-8A3.mjs";
|
|
14
|
+
import "./command-registry-B9Orjysx.mjs";
|
|
15
|
+
import "./program-context-9v4H9od4.mjs";
|
|
16
|
+
|
|
17
|
+
export { registerCompletionCli };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { t as resolveOpenClawPackageRoot } from "./openclaw-root-CSfnLaqO.mjs";
|
|
2
|
+
import { n as resolveCliName } from "./cli-name-lEyorNIN.mjs";
|
|
3
|
+
import { t as note } from "./note-CaQ2HD-A.mjs";
|
|
4
|
+
import { c as usesSlowDynamicCompletion, i as isCompletionInstalled, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as completionCacheExists } from "./completion-cli-B8M--XTS.mjs";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { spawnSync } from "node:child_process";
|
|
7
|
+
|
|
8
|
+
//#region src/commands/doctor-completion.ts
|
|
9
|
+
/** Generate the completion cache by spawning the CLI. */
|
|
10
|
+
async function generateCompletionCache() {
|
|
11
|
+
const root = await resolveOpenClawPackageRoot({
|
|
12
|
+
moduleUrl: import.meta.url,
|
|
13
|
+
argv1: process.argv[1],
|
|
14
|
+
cwd: process.cwd()
|
|
15
|
+
});
|
|
16
|
+
if (!root) return false;
|
|
17
|
+
const binPath = path.join(root, "openclaw.mjs");
|
|
18
|
+
return spawnSync(process.execPath, [
|
|
19
|
+
binPath,
|
|
20
|
+
"completion",
|
|
21
|
+
"--write-state"
|
|
22
|
+
], {
|
|
23
|
+
cwd: root,
|
|
24
|
+
env: process.env,
|
|
25
|
+
encoding: "utf-8"
|
|
26
|
+
}).status === 0;
|
|
27
|
+
}
|
|
28
|
+
/** Check the status of shell completion for the current shell. */
|
|
29
|
+
async function checkShellCompletionStatus(binName = "openclaw") {
|
|
30
|
+
const shell = resolveShellFromEnv();
|
|
31
|
+
return {
|
|
32
|
+
shell,
|
|
33
|
+
profileInstalled: await isCompletionInstalled(shell, binName),
|
|
34
|
+
cacheExists: await completionCacheExists(shell, binName),
|
|
35
|
+
cachePath: resolveCompletionCachePath(shell, binName),
|
|
36
|
+
usesSlowPattern: await usesSlowDynamicCompletion(shell, binName)
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Doctor check for shell completion.
|
|
41
|
+
* - If profile uses slow dynamic pattern: upgrade to cached version
|
|
42
|
+
* - If profile has completion but no cache: auto-generate cache and upgrade profile
|
|
43
|
+
* - If no completion at all: prompt to install (with user confirmation)
|
|
44
|
+
*/
|
|
45
|
+
async function doctorShellCompletion(runtime, prompter, options = {}) {
|
|
46
|
+
const cliName = resolveCliName();
|
|
47
|
+
const status = await checkShellCompletionStatus(cliName);
|
|
48
|
+
if (status.usesSlowPattern) {
|
|
49
|
+
note(`Your ${status.shell} profile uses slow dynamic completion (source <(...)).\nUpgrading to cached completion for faster shell startup...`, "Shell completion");
|
|
50
|
+
if (!status.cacheExists) {
|
|
51
|
+
if (!await generateCompletionCache()) {
|
|
52
|
+
note(`Failed to generate completion cache. Run \`${cliName} completion --write-state\` manually.`, "Shell completion");
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
await installCompletion(status.shell, true, cliName);
|
|
57
|
+
note(`Shell completion upgraded. Restart your shell or run: source ~/.${status.shell === "zsh" ? "zshrc" : status.shell === "bash" ? "bashrc" : "config/fish/config.fish"}`, "Shell completion");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (status.profileInstalled && !status.cacheExists) {
|
|
61
|
+
note(`Shell completion is configured in your ${status.shell} profile but the cache is missing.\nRegenerating cache...`, "Shell completion");
|
|
62
|
+
if (await generateCompletionCache()) note(`Completion cache regenerated at ${status.cachePath}`, "Shell completion");
|
|
63
|
+
else note(`Failed to regenerate completion cache. Run \`${cliName} completion --write-state\` manually.`, "Shell completion");
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (!status.profileInstalled) {
|
|
67
|
+
if (options.nonInteractive) return;
|
|
68
|
+
if (await prompter.confirm({
|
|
69
|
+
message: `Enable ${status.shell} shell completion for ${cliName}?`,
|
|
70
|
+
initialValue: true
|
|
71
|
+
})) {
|
|
72
|
+
if (!await generateCompletionCache()) {
|
|
73
|
+
note(`Failed to generate completion cache. Run \`${cliName} completion --write-state\` manually.`, "Shell completion");
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
await installCompletion(status.shell, true, cliName);
|
|
77
|
+
note(`Shell completion installed. Restart your shell or run: source ~/.${status.shell === "zsh" ? "zshrc" : status.shell === "bash" ? "bashrc" : "config/fish/config.fish"}`, "Shell completion");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Ensure completion cache exists. Used during setup/update to fix
|
|
83
|
+
* cases where profile has completion but no cache.
|
|
84
|
+
* This is a silent fix - no prompts.
|
|
85
|
+
*/
|
|
86
|
+
async function ensureCompletionCacheExists(binName = "openclaw") {
|
|
87
|
+
if (await completionCacheExists(resolveShellFromEnv(), binName)) return true;
|
|
88
|
+
return generateCompletionCache();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
//#endregion
|
|
92
|
+
export { doctorShellCompletion as n, ensureCompletionCacheExists as r, checkShellCompletionStatus as t };
|