jinzd-ai-cli 0.4.269 → 0.4.271
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/{batch-HUOYPVJQ.js → batch-FPDT2USZ.js} +2 -2
- package/dist/{chunk-AAERHPBN.js → chunk-2RN4T4XD.js} +1 -1
- package/dist/{chunk-QPPUYCRF.js → chunk-4UNRDXZV.js} +8 -8
- package/dist/{chunk-4HTJMLFY.js → chunk-5JFRM47R.js} +1 -1
- package/dist/{chunk-S3F5LOV3.js → chunk-BFPF3JF2.js} +7 -7
- package/dist/{chunk-3TOMHXDW.js → chunk-FT3WS5PG.js} +1 -1
- package/dist/{chunk-R7GERZDA.js → chunk-JT6UN5C6.js} +26 -5
- package/dist/{chunk-V6KQ67VF.js → chunk-OSYK6D4G.js} +1 -1
- package/dist/{chunk-5PRWBJCI.js → chunk-PDRAOFGI.js} +4 -4
- package/dist/{chunk-6PROC2JO.js → chunk-PG7O7N7D.js} +8 -8
- package/dist/{chunk-5IUFUCIT.js → chunk-PMRU2CAF.js} +12 -4
- package/dist/{chunk-NVN3FHXI.js → chunk-RLAUMACS.js} +1 -1
- package/dist/{chunk-XJAGGJVU.js → chunk-RNDHIERN.js} +3 -3
- package/dist/{chunk-DJNGUPM3.js → chunk-V26ZMB3D.js} +11 -11
- package/dist/{chunk-KIHNZBEA.js → chunk-VPXNLE7E.js} +1 -1
- package/dist/chunk-XNFIYS7G.js +82 -0
- package/dist/{ci-4QS2J7BG.js → ci-VPN5RWCO.js} +4 -4
- package/dist/{ci-format-6L6M67WC.js → ci-format-GKXVCVME.js} +2 -2
- package/dist/config-command-E5DHADEV.js +11 -0
- package/dist/{constants-IO5VJLEE.js → constants-Y43DJFGV.js} +1 -1
- package/dist/{doctor-cli-ZU4E2DDL.js → doctor-cli-RZGZB2TF.js} +4 -4
- package/dist/electron-server.js +146 -30
- package/dist/{hub-AMDWXSKZ.js → hub-FJWP6SDG.js} +1 -1
- package/dist/index.js +85 -99
- package/dist/{persistent-memory-H4DNDIOQ.js → persistent-memory-IR47JCTF.js} +3 -3
- package/dist/{persistent-memory-52SE5K44.js → persistent-memory-KX2R67AT.js} +2 -2
- package/dist/{pr-Z4O5H6I3.js → pr-NTQ3N4B4.js} +5 -5
- package/dist/{run-tests-PYKKYMPA.js → run-tests-25CNXJ4N.js} +2 -2
- package/dist/{run-tests-FZSYHWYX.js → run-tests-UTES6HCT.js} +2 -2
- package/dist/{server-ZSTVYSYC.js → server-IGCCSX4B.js} +10 -10
- package/dist/{server-WTJSM2MT.js → server-R56CVHCM.js} +82 -56
- package/dist/{task-orchestrator-PNLI3V36.js → task-orchestrator-MFYEKR2I.js} +12 -12
- package/dist/{usage-GVFUVYUG.js → usage-FHX7PQQH.js} +11 -4
- package/dist/web/client/actions.js.br +0 -0
- package/dist/web/client/actions.js.gz +0 -0
- package/dist/web/client/api.js.br +0 -0
- package/dist/web/client/api.js.gz +0 -0
- package/dist/web/client/app.js +3 -6
- package/dist/web/client/app.js.br +0 -0
- package/dist/web/client/app.js.gz +0 -0
- package/dist/web/client/dom.js.br +0 -0
- package/dist/web/client/dom.js.gz +0 -0
- package/dist/web/client/icon.svg.br +0 -0
- package/dist/web/client/icon.svg.gz +0 -0
- package/dist/web/client/index.html.br +0 -0
- package/dist/web/client/index.html.gz +0 -0
- package/dist/web/client/sidebar-tabs.js.br +0 -0
- package/dist/web/client/sidebar-tabs.js.gz +0 -0
- package/dist/web/client/state.js.br +0 -0
- package/dist/web/client/state.js.gz +0 -0
- package/dist/web/client/style.css.br +0 -0
- package/dist/web/client/style.css.gz +0 -0
- package/dist/web/client/sw.js.br +0 -0
- package/dist/web/client/sw.js.gz +0 -0
- package/dist/web/client/templates.js.br +0 -0
- package/dist/web/client/templates.js.gz +0 -0
- package/dist/web/client/util.js +22 -0
- package/dist/web/client/util.js.br +0 -0
- package/dist/web/client/util.js.gz +0 -0
- package/dist/web/client/vendor/daisyui-full.min.css.br +0 -0
- package/dist/web/client/vendor/daisyui-full.min.css.gz +0 -0
- package/dist/web/client/vendor/github-dark.min.css.br +0 -0
- package/dist/web/client/vendor/github-dark.min.css.gz +0 -0
- package/dist/web/client/vendor/github.min.css.br +0 -0
- package/dist/web/client/vendor/github.min.css.gz +0 -0
- package/dist/web/client/vendor/highlight.min.js.br +0 -0
- package/dist/web/client/vendor/highlight.min.js.gz +0 -0
- package/dist/web/client/vendor/marked.min.js.br +0 -0
- package/dist/web/client/vendor/marked.min.js.gz +0 -0
- package/dist/web/client/vendor/tailwind.js.br +0 -0
- package/dist/web/client/vendor/tailwind.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ConfigManager
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PMRU2CAF.js";
|
|
5
5
|
import "./chunk-TU3L3PW7.js";
|
|
6
|
-
import "./chunk-3TOMHXDW.js";
|
|
7
6
|
import {
|
|
8
7
|
atomicWriteFileSync
|
|
9
8
|
} from "./chunk-IW3Q7AE5.js";
|
|
9
|
+
import "./chunk-FT3WS5PG.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/batch.ts
|
|
12
12
|
import Anthropic from "@anthropic-ai/sdk";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
getGitRoot
|
|
4
|
-
} from "./chunk-HOSJZMQS.js";
|
|
5
|
-
import {
|
|
6
|
-
MEMORY_FILE_NAME,
|
|
7
|
-
MEMORY_MAX_CHARS,
|
|
8
|
-
MEMORY_STORE_FILE_NAME
|
|
9
|
-
} from "./chunk-3TOMHXDW.js";
|
|
10
2
|
import {
|
|
11
3
|
DEFAULT_PATTERNS,
|
|
12
4
|
redactString
|
|
13
5
|
} from "./chunk-B5TYJO7V.js";
|
|
6
|
+
import {
|
|
7
|
+
getGitRoot
|
|
8
|
+
} from "./chunk-HOSJZMQS.js";
|
|
14
9
|
import {
|
|
15
10
|
atomicWriteFileSync
|
|
16
11
|
} from "./chunk-IW3Q7AE5.js";
|
|
12
|
+
import {
|
|
13
|
+
MEMORY_FILE_NAME,
|
|
14
|
+
MEMORY_MAX_CHARS,
|
|
15
|
+
MEMORY_STORE_FILE_NAME
|
|
16
|
+
} from "./chunk-FT3WS5PG.js";
|
|
17
17
|
|
|
18
18
|
// src/memory/persistent-memory.ts
|
|
19
19
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "fs";
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
computeCost
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JT6UN5C6.js";
|
|
5
5
|
import {
|
|
6
6
|
estimateTokens,
|
|
7
7
|
truncateForPersist
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-V26ZMB3D.js";
|
|
9
9
|
import {
|
|
10
10
|
isMemoryExpired,
|
|
11
11
|
isMemoryStale
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4UNRDXZV.js";
|
|
13
|
+
import {
|
|
14
|
+
atomicWriteFileSync
|
|
15
|
+
} from "./chunk-IW3Q7AE5.js";
|
|
13
16
|
import {
|
|
14
17
|
APP_NAME,
|
|
15
18
|
CONFIG_DIR_NAME,
|
|
@@ -20,10 +23,7 @@ import {
|
|
|
20
23
|
MCP_PROTOCOL_VERSION,
|
|
21
24
|
MCP_TOOL_PREFIX,
|
|
22
25
|
VERSION
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import {
|
|
25
|
-
atomicWriteFileSync
|
|
26
|
-
} from "./chunk-IW3Q7AE5.js";
|
|
26
|
+
} from "./chunk-FT3WS5PG.js";
|
|
27
27
|
|
|
28
28
|
// src/mcp/client.ts
|
|
29
29
|
import { spawn } from "child_process";
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./chunk-IW3Q7AE5.js";
|
|
5
5
|
|
|
6
6
|
// src/core/pricing.ts
|
|
7
|
-
var
|
|
7
|
+
var CNY_PER_USD = 6.9;
|
|
8
8
|
var DEEPSEEK_TIME_PRICING_EFFECTIVE_AT = /* @__PURE__ */ new Date("2026-08-16T16:00:00.000Z");
|
|
9
9
|
function deepSeekCnyPricing(cacheRead, input, output) {
|
|
10
10
|
return {
|
|
11
|
-
cacheRead: cacheRead /
|
|
12
|
-
input: input /
|
|
13
|
-
output: output /
|
|
11
|
+
cacheRead: cacheRead / CNY_PER_USD,
|
|
12
|
+
input: input / CNY_PER_USD,
|
|
13
|
+
output: output / CNY_PER_USD
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
function getDeepSeekV4Pricing(model, at) {
|
|
@@ -138,12 +138,29 @@ function computeCost(provider, model, usage, at = /* @__PURE__ */ new Date()) {
|
|
|
138
138
|
const cacheRead = (usage.cacheReadTokens ?? 0) * (p.cacheRead ?? p.input);
|
|
139
139
|
return (input + output + cacheWrite + cacheRead) / 1e6;
|
|
140
140
|
}
|
|
141
|
-
|
|
141
|
+
var displayCurrency = "usd";
|
|
142
|
+
function setCostCurrency(currency) {
|
|
143
|
+
displayCurrency = currency === "cny" ? "cny" : "usd";
|
|
144
|
+
}
|
|
145
|
+
function getCostCurrency() {
|
|
146
|
+
return displayCurrency;
|
|
147
|
+
}
|
|
148
|
+
function formatCost(amount, currency = displayCurrency) {
|
|
149
|
+
if (currency === "cny") {
|
|
150
|
+
const cny = amount * CNY_PER_USD;
|
|
151
|
+
if (cny === 0) return "\xA50.0000";
|
|
152
|
+
if (cny < 0.01) return `\xA5${cny.toFixed(4)}`;
|
|
153
|
+
if (cny < 1) return `\xA5${cny.toFixed(3)}`;
|
|
154
|
+
return `\xA5${cny.toFixed(2)}`;
|
|
155
|
+
}
|
|
142
156
|
if (amount === 0) return "$0.0000";
|
|
143
157
|
if (amount < 0.01) return `$${amount.toFixed(4)}`;
|
|
144
158
|
if (amount < 1) return `$${amount.toFixed(3)}`;
|
|
145
159
|
return `$${amount.toFixed(2)}`;
|
|
146
160
|
}
|
|
161
|
+
function currencyNote(currency = displayCurrency) {
|
|
162
|
+
return currency === "cny" ? `converted at \xA5${CNY_PER_USD}/$1 (accounting rate, not live FX)` : null;
|
|
163
|
+
}
|
|
147
164
|
|
|
148
165
|
// src/core/cost-tracker.ts
|
|
149
166
|
import { existsSync, readFileSync } from "fs";
|
|
@@ -399,8 +416,12 @@ var CostTracker = class _CostTracker {
|
|
|
399
416
|
};
|
|
400
417
|
|
|
401
418
|
export {
|
|
419
|
+
CNY_PER_USD,
|
|
402
420
|
getPricing,
|
|
403
421
|
computeCost,
|
|
422
|
+
setCostCurrency,
|
|
423
|
+
getCostCurrency,
|
|
404
424
|
formatCost,
|
|
425
|
+
currencyNote,
|
|
405
426
|
CostTracker
|
|
406
427
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
CONFIG_DIR_NAME,
|
|
4
|
-
PLUGINS_DIR_NAME
|
|
5
|
-
} from "./chunk-3TOMHXDW.js";
|
|
6
2
|
import {
|
|
7
3
|
atomicWriteFileSync
|
|
8
4
|
} from "./chunk-IW3Q7AE5.js";
|
|
5
|
+
import {
|
|
6
|
+
CONFIG_DIR_NAME,
|
|
7
|
+
PLUGINS_DIR_NAME
|
|
8
|
+
} from "./chunk-FT3WS5PG.js";
|
|
9
9
|
|
|
10
10
|
// src/diagnostics/tool-stats.ts
|
|
11
11
|
import { existsSync, readFileSync, mkdirSync } from "fs";
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
ProviderRegistry
|
|
4
|
-
} from "./chunk-AUEX6RNY.js";
|
|
5
|
-
import {
|
|
6
|
-
ConfigManager
|
|
7
|
-
} from "./chunk-5IUFUCIT.js";
|
|
8
2
|
import {
|
|
9
3
|
getActivePluginAssets,
|
|
10
4
|
getPendingHookTrust,
|
|
@@ -14,7 +8,13 @@ import {
|
|
|
14
8
|
listHooks,
|
|
15
9
|
listInstalledPlugins,
|
|
16
10
|
resetStats
|
|
17
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-PDRAOFGI.js";
|
|
12
|
+
import {
|
|
13
|
+
ProviderRegistry
|
|
14
|
+
} from "./chunk-AUEX6RNY.js";
|
|
15
|
+
import {
|
|
16
|
+
ConfigManager
|
|
17
|
+
} from "./chunk-PMRU2CAF.js";
|
|
18
18
|
import {
|
|
19
19
|
getGitRoot
|
|
20
20
|
} from "./chunk-HOSJZMQS.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
MCP_PROJECT_CONFIG_NAME,
|
|
27
27
|
MEMORY_FILE_NAME,
|
|
28
28
|
VERSION
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-FT3WS5PG.js";
|
|
30
30
|
|
|
31
31
|
// src/diagnostics/doctor-report.ts
|
|
32
32
|
import { existsSync as existsSync3, statSync as statSync2 } from "fs";
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
ConfigError,
|
|
4
4
|
EnvLoader
|
|
5
5
|
} from "./chunk-TU3L3PW7.js";
|
|
6
|
+
import {
|
|
7
|
+
atomicWriteFileSync
|
|
8
|
+
} from "./chunk-IW3Q7AE5.js";
|
|
6
9
|
import {
|
|
7
10
|
CONFIG_DIR_NAME,
|
|
8
11
|
CONFIG_FILE_NAME,
|
|
9
12
|
HISTORY_DIR_NAME,
|
|
10
13
|
PLUGINS_DIR_NAME
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
atomicWriteFileSync
|
|
14
|
-
} from "./chunk-IW3Q7AE5.js";
|
|
14
|
+
} from "./chunk-FT3WS5PG.js";
|
|
15
15
|
|
|
16
16
|
// src/config/config-manager.ts
|
|
17
17
|
import { readFileSync, existsSync, mkdirSync } from "fs";
|
|
@@ -102,6 +102,14 @@ var ConfigSchema = z.object({
|
|
|
102
102
|
wordWrap: z.number().int().min(0).default(0),
|
|
103
103
|
/** Skill 文件过大警告阈值(字符数)。超过此值的 skill 在启动加载时打印警告。0 = 静默。默认 10000 */
|
|
104
104
|
skillSizeWarn: z.number().int().min(0).default(1e4),
|
|
105
|
+
/**
|
|
106
|
+
* 成本显示币种:usd(默认)| cny。
|
|
107
|
+
*
|
|
108
|
+
* 只影响**展示**——存储、monthlyBudget、cost-history.json 恒为美元。
|
|
109
|
+
* 人民币按 pricing.ts 的记账汇率换算并在输出里标注,避免造出一个
|
|
110
|
+
* 看起来像实时汇率的假数字(2026-08-14 审计 P3-02)。
|
|
111
|
+
*/
|
|
112
|
+
currency: z.enum(["usd", "cny"]).default("usd"),
|
|
105
113
|
/** 颜色主题:'dark'(默认)| 'light' | 'custom' */
|
|
106
114
|
theme: z.enum(["dark", "light", "custom"]).default("dark"),
|
|
107
115
|
/** 自定义颜色覆盖(仅在 theme='custom' 时生效)。值为 chalk 颜色名或 '#hex',支持 'bold.cyan' 组合 */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
evaluateCiGate,
|
|
4
4
|
normalizeCiThresholds
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2RN4T4XD.js";
|
|
6
6
|
import {
|
|
7
7
|
buildReviewPrompt,
|
|
8
8
|
buildSecurityReviewPrompt,
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
} from "./chunk-AUEX6RNY.js";
|
|
17
17
|
import {
|
|
18
18
|
ConfigManager
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-PMRU2CAF.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-FT3WS5PG.js";
|
|
23
23
|
|
|
24
24
|
// src/cli/ci.ts
|
|
25
25
|
import { execFileSync } from "child_process";
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
loadChatIndex,
|
|
4
|
+
searchChatMemory
|
|
5
|
+
} from "./chunk-6RPGQ5CG.js";
|
|
2
6
|
import {
|
|
3
7
|
addMemoryEntry,
|
|
4
8
|
findSimilarMemory,
|
|
@@ -7,7 +11,7 @@ import {
|
|
|
7
11
|
searchPersistentMemories,
|
|
8
12
|
touchMemoryReferences,
|
|
9
13
|
updateMemoryEntry
|
|
10
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4UNRDXZV.js";
|
|
11
15
|
import {
|
|
12
16
|
indexProject
|
|
13
17
|
} from "./chunk-GLSR2NR3.js";
|
|
@@ -26,7 +30,7 @@ import {
|
|
|
26
30
|
runHook,
|
|
27
31
|
runLifecycleHooks,
|
|
28
32
|
runTool
|
|
29
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-PDRAOFGI.js";
|
|
30
34
|
import {
|
|
31
35
|
buildTruncatedArgumentsError,
|
|
32
36
|
getDangerLevel,
|
|
@@ -38,26 +42,22 @@ import {
|
|
|
38
42
|
NetworkError,
|
|
39
43
|
ToolError
|
|
40
44
|
} from "./chunk-TU3L3PW7.js";
|
|
45
|
+
import {
|
|
46
|
+
atomicWriteFileSync
|
|
47
|
+
} from "./chunk-IW3Q7AE5.js";
|
|
41
48
|
import {
|
|
42
49
|
fileCheckpoints
|
|
43
50
|
} from "./chunk-4BKXL7SM.js";
|
|
44
51
|
import {
|
|
45
52
|
runTestsTool
|
|
46
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-OSYK6D4G.js";
|
|
47
54
|
import {
|
|
48
55
|
CONFIG_DIR_NAME,
|
|
49
56
|
DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
|
|
50
57
|
SUBAGENT_ALLOWED_TOOLS,
|
|
51
58
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
52
59
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
53
|
-
} from "./chunk-
|
|
54
|
-
import {
|
|
55
|
-
loadChatIndex,
|
|
56
|
-
searchChatMemory
|
|
57
|
-
} from "./chunk-6RPGQ5CG.js";
|
|
58
|
-
import {
|
|
59
|
-
atomicWriteFileSync
|
|
60
|
-
} from "./chunk-IW3Q7AE5.js";
|
|
60
|
+
} from "./chunk-FT3WS5PG.js";
|
|
61
61
|
|
|
62
62
|
// src/tools/shell-pool.ts
|
|
63
63
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/core/config-command.ts
|
|
4
|
+
var CONFIG_USAGE = "Usage: config [show | get <path> | set <path> <value>]";
|
|
5
|
+
var FORBIDDEN_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
6
|
+
function maskSecret(value) {
|
|
7
|
+
if (value.length <= 8) return "****";
|
|
8
|
+
return `${value.slice(0, 4)}****${value.slice(-4)}`;
|
|
9
|
+
}
|
|
10
|
+
function maskConfigSecrets(config) {
|
|
11
|
+
const apiKeys = config["apiKeys"];
|
|
12
|
+
if (apiKeys && typeof apiKeys === "object") {
|
|
13
|
+
const keys = apiKeys;
|
|
14
|
+
for (const k of Object.keys(keys)) {
|
|
15
|
+
if (typeof keys[k] === "string") keys[k] = maskSecret(keys[k]);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
const custom = config["customProviders"];
|
|
19
|
+
if (custom && typeof custom === "object") {
|
|
20
|
+
for (const entry of Object.values(custom)) {
|
|
21
|
+
if (entry && typeof entry === "object" && typeof entry["apiKey"] === "string") {
|
|
22
|
+
const e = entry;
|
|
23
|
+
e["apiKey"] = maskSecret(e["apiKey"]);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return config;
|
|
28
|
+
}
|
|
29
|
+
function applyConfigCommand(args, target) {
|
|
30
|
+
const sub = args[0]?.toLowerCase();
|
|
31
|
+
if (!sub) return { action: "wizard", changed: false, isError: false };
|
|
32
|
+
if (sub === "show") {
|
|
33
|
+
return {
|
|
34
|
+
action: "show",
|
|
35
|
+
json: JSON.stringify(maskConfigSecrets(target.toJSON()), null, 2),
|
|
36
|
+
changed: false,
|
|
37
|
+
isError: false
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
if (sub === "get") {
|
|
41
|
+
const path = args[1]?.trim();
|
|
42
|
+
if (!path) {
|
|
43
|
+
return { action: "usage", summary: "Usage: config get <path> (e.g. ui.theme)", changed: false, isError: true };
|
|
44
|
+
}
|
|
45
|
+
const value = target.getByPath(path);
|
|
46
|
+
const shown = value === void 0 ? "(undefined)" : typeof value === "object" ? JSON.stringify(value) : String(value);
|
|
47
|
+
return { action: "get", summary: `${path} = ${shown}`, changed: false, isError: false };
|
|
48
|
+
}
|
|
49
|
+
if (sub === "set") {
|
|
50
|
+
const path = args[1]?.trim();
|
|
51
|
+
const value = args.slice(2).join(" ").trim();
|
|
52
|
+
if (!path || value === "") {
|
|
53
|
+
return {
|
|
54
|
+
action: "usage",
|
|
55
|
+
summary: "Usage: config set <path> <value> (e.g. ui.theme light)",
|
|
56
|
+
changed: false,
|
|
57
|
+
isError: true
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
if (path.split(".").some((k) => FORBIDDEN_KEYS.has(k))) {
|
|
61
|
+
return { action: "set", summary: `Forbidden path segment in "${path}"`, changed: false, isError: true };
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
target.setByPath(path, value);
|
|
65
|
+
} catch (err) {
|
|
66
|
+
return {
|
|
67
|
+
action: "set",
|
|
68
|
+
summary: `Config error: ${err instanceof Error ? err.message : String(err)}`,
|
|
69
|
+
changed: false,
|
|
70
|
+
isError: true
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
return { action: "set", summary: `Set ${path} = ${value}`, changed: true, isError: false };
|
|
74
|
+
}
|
|
75
|
+
return { action: "usage", summary: CONFIG_USAGE, changed: false, isError: true };
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export {
|
|
79
|
+
CONFIG_USAGE,
|
|
80
|
+
maskConfigSecrets,
|
|
81
|
+
applyConfigCommand
|
|
82
|
+
};
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
CI_COMMENT_MARKER,
|
|
4
4
|
countSeverity,
|
|
5
5
|
runCi
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-RNDHIERN.js";
|
|
7
|
+
import "./chunk-2RN4T4XD.js";
|
|
8
8
|
import "./chunk-HLWUDRBO.js";
|
|
9
9
|
import "./chunk-6YZEZFX5.js";
|
|
10
10
|
import "./chunk-AUEX6RNY.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-PMRU2CAF.js";
|
|
12
12
|
import "./chunk-3OBY7WSS.js";
|
|
13
13
|
import "./chunk-TU3L3PW7.js";
|
|
14
|
-
import "./chunk-3TOMHXDW.js";
|
|
15
14
|
import "./chunk-IW3Q7AE5.js";
|
|
15
|
+
import "./chunk-FT3WS5PG.js";
|
|
16
16
|
export {
|
|
17
17
|
CI_COMMENT_MARKER,
|
|
18
18
|
countSeverity,
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
formatDoctorReport,
|
|
4
4
|
runDoctorCli
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PG7O7N7D.js";
|
|
6
|
+
import "./chunk-PDRAOFGI.js";
|
|
6
7
|
import "./chunk-AUEX6RNY.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-5PRWBJCI.js";
|
|
8
|
+
import "./chunk-PMRU2CAF.js";
|
|
9
9
|
import "./chunk-3OBY7WSS.js";
|
|
10
10
|
import "./chunk-TU3L3PW7.js";
|
|
11
11
|
import "./chunk-HOSJZMQS.js";
|
|
12
|
-
import "./chunk-3TOMHXDW.js";
|
|
13
12
|
import "./chunk-IW3Q7AE5.js";
|
|
13
|
+
import "./chunk-FT3WS5PG.js";
|
|
14
14
|
export {
|
|
15
15
|
formatDoctorReport,
|
|
16
16
|
runDoctorCli
|