@nowcrew/daemon 0.6.72 → 0.6.73
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/list-models.js +19 -0
- package/dist/storage-manifest.js +9 -0
- package/package.json +1 -1
package/dist/list-models.js
CHANGED
|
@@ -14,6 +14,8 @@ const execFileP = (bin, args) => execFileRaw(bin, args, {
|
|
|
14
14
|
});
|
|
15
15
|
export async function listRuntimeModels(runtime, options = {}) {
|
|
16
16
|
switch (runtime) {
|
|
17
|
+
case "claude":
|
|
18
|
+
return listClaudeModels();
|
|
17
19
|
case "codex":
|
|
18
20
|
return parseCodexModels((await execFileP("codex", ["debug", "models"])).stdout);
|
|
19
21
|
case "cursor":
|
|
@@ -28,6 +30,23 @@ export async function listRuntimeModels(runtime, options = {}) {
|
|
|
28
30
|
return null;
|
|
29
31
|
}
|
|
30
32
|
}
|
|
33
|
+
/** claude CLI 没有模型枚举命令,但 `--model` 的族别名(fable/opus/sonnet/haiku)恒指
|
|
34
|
+
* 本机已装 CLI 版本的最新对应模型(2.1.252 帮助与二进制文案实证)——上报别名即
|
|
35
|
+
* 「上报本机 claude 实际可用的模型」,CLI 升级零维护、永不过期。
|
|
36
|
+
* `--version` 只作安装探测(未安装/不可执行时抛错,由上层回落到 server 静态兜底),
|
|
37
|
+
* 版本号拼进展示名让用户看得到清单来自哪台机器的哪个 CLI。
|
|
38
|
+
* 思考强度不在此上报:claude 的 --effort 档位由 web 端 REASONING_CATALOG 静态维护。 */
|
|
39
|
+
async function listClaudeModels() {
|
|
40
|
+
const rawVersion = (await execFileP("claude", ["--version"])).stdout.trim();
|
|
41
|
+
const version = rawVersion.replace(/\s*\(Claude Code\)\s*$/, "").trim();
|
|
42
|
+
const suffix = version ? ` · Claude Code ${version}` : "";
|
|
43
|
+
return [
|
|
44
|
+
{ id: "fable", label: `Fable (latest)${suffix}` },
|
|
45
|
+
{ id: "sonnet", label: `Sonnet (latest)${suffix}`, default: true },
|
|
46
|
+
{ id: "opus", label: `Opus (latest)${suffix}` },
|
|
47
|
+
{ id: "haiku", label: `Haiku (latest)${suffix}` },
|
|
48
|
+
];
|
|
49
|
+
}
|
|
31
50
|
function parseCodexModels(stdout) {
|
|
32
51
|
try {
|
|
33
52
|
const parsed = JSON.parse(stdout);
|
package/dist/storage-manifest.js
CHANGED
|
@@ -324,6 +324,15 @@ async function* scanSourceEntries(input) {
|
|
|
324
324
|
type = "file";
|
|
325
325
|
else if (stat.isSymbolicLink())
|
|
326
326
|
type = "symlink";
|
|
327
|
+
// Host-local runtime and credential trees are intentionally excluded from
|
|
328
|
+
// the migration. Do not descend into them: their contents are volatile,
|
|
329
|
+
// never copied, and would otherwise make the source digest drift between
|
|
330
|
+
// preflight and apply.
|
|
331
|
+
if (stat.isDirectory()
|
|
332
|
+
&& transformation === undefined
|
|
333
|
+
&& (classifiedReason === "local_runtime" || classifiedReason === "credential_material")) {
|
|
334
|
+
continue;
|
|
335
|
+
}
|
|
327
336
|
if (stat.isDirectory())
|
|
328
337
|
pending.push(path);
|
|
329
338
|
if (exclusion !== undefined) {
|