@aswless_854771076/ai_short_studio_cli 0.1.95 → 0.1.97
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/README.md +9 -8
- package/dist/auth/login-provider.d.ts +2 -0
- package/dist/auth/login-provider.js +3 -0
- package/dist/base-command.d.ts +6 -0
- package/dist/base-command.js +39 -1
- package/dist/commands/auth/login.d.ts +2 -1
- package/dist/commands/auth/login.js +5 -2
- package/dist/commands/auth/logout.d.ts +1 -0
- package/dist/commands/auth/signup.d.ts +1 -0
- package/dist/commands/auth/status.d.ts +1 -0
- package/dist/commands/canvas/apply.d.ts +1 -0
- package/dist/commands/canvas/asset/get.d.ts +1 -0
- package/dist/commands/canvas/asset/list.d.ts +1 -0
- package/dist/commands/canvas/asset/select.d.ts +1 -0
- package/dist/commands/canvas/asset/upload.d.ts +1 -0
- package/dist/commands/canvas/continuity/analyze.d.ts +1 -0
- package/dist/commands/canvas/edge/connect.d.ts +1 -0
- package/dist/commands/canvas/edge/disconnect.d.ts +1 -0
- package/dist/commands/canvas/edge/list.d.ts +1 -0
- package/dist/commands/canvas/episode/create.d.ts +1 -0
- package/dist/commands/canvas/episode/list.d.ts +1 -0
- package/dist/commands/canvas/folder/copy-cross-project.d.ts +1 -0
- package/dist/commands/canvas/folder/create.d.ts +1 -0
- package/dist/commands/canvas/folder/delete.d.ts +1 -0
- package/dist/commands/canvas/folder/list.d.ts +1 -0
- package/dist/commands/canvas/folder/move.d.ts +1 -0
- package/dist/commands/canvas/folder/rename.d.ts +1 -0
- package/dist/commands/canvas/folder/restore.d.ts +1 -0
- package/dist/commands/canvas/get.d.ts +1 -0
- package/dist/commands/canvas/inspect.d.ts +1 -0
- package/dist/commands/canvas/node/add.d.ts +1 -0
- package/dist/commands/canvas/node/delete.d.ts +1 -0
- package/dist/commands/canvas/node/edit-resource.d.ts +2 -0
- package/dist/commands/canvas/node/edit-resource.js +9 -1
- package/dist/commands/canvas/node/edit-shot.d.ts +1 -0
- package/dist/commands/canvas/node/get.d.ts +1 -0
- package/dist/commands/canvas/node/list.d.ts +1 -0
- package/dist/commands/canvas/node/quote.d.ts +17 -0
- package/dist/commands/canvas/node/quote.js +13 -0
- package/dist/commands/canvas/node/run.d.ts +12 -0
- package/dist/commands/canvas/node/run.js +41 -3
- package/dist/commands/canvas/node/types.d.ts +1 -0
- package/dist/commands/canvas/node/update-many.d.ts +1 -0
- package/dist/commands/canvas/node/update.d.ts +1 -0
- package/dist/commands/canvas/settings/get.d.ts +1 -0
- package/dist/commands/canvas/settings/set.d.ts +24 -0
- package/dist/commands/canvas/settings/set.js +60 -1
- package/dist/commands/config/ai-provider/capabilities.d.ts +34 -0
- package/dist/commands/config/ai-provider/capabilities.js +36 -2
- package/dist/commands/config/ai-provider/get.d.ts +1 -0
- package/dist/commands/config/ai-provider/list.d.ts +1 -0
- package/dist/commands/config/ai-provider/models.d.ts +1 -0
- package/dist/commands/config/ai-provider/set.d.ts +1 -0
- package/dist/commands/config/ai-provider/test.d.ts +1 -0
- package/dist/commands/config/get.d.ts +1 -0
- package/dist/commands/config/set.d.ts +1 -0
- package/dist/commands/preflight.d.ts +1 -0
- package/dist/commands/project/create.d.ts +1 -0
- package/dist/commands/project/delete.d.ts +1 -0
- package/dist/commands/project/get.d.ts +1 -0
- package/dist/commands/project/list.d.ts +1 -0
- package/dist/commands/project/provider/get.d.ts +1 -0
- package/dist/commands/project/provider/set.d.ts +1 -0
- package/dist/commands/project/provider/test.d.ts +1 -0
- package/dist/commands/project/update.d.ts +1 -0
- package/dist/commands/skill/install.d.ts +1 -0
- package/dist/commands/skill/install.js +1 -0
- package/dist/commands/skill/path.d.ts +1 -0
- package/dist/commands/skill/path.js +1 -0
- package/dist/commands/skill/status.d.ts +1 -0
- package/dist/commands/skill/status.js +1 -0
- package/dist/commands/task/cancel.d.ts +1 -0
- package/dist/commands/task/get.d.ts +1 -0
- package/dist/commands/task/wait.d.ts +1 -0
- package/dist/domain/vvicat-api.d.ts +3 -0
- package/dist/domain/vvicat-api.js +3 -0
- package/dist/output/formatter.d.ts +11 -0
- package/dist/output/formatter.js +20 -0
- package/dist/skill/command-flags.js +7 -4
- package/dist/skill/skill-manager.d.ts +88 -15
- package/dist/skill/skill-manager.js +61 -16
- package/package.json +1 -1
- package/scripts/postinstall.mjs +7 -12
- package/skills/using-vvicat-ai-short-studio-cli/SKILL.md +25 -54
- package/skills/using-vvicat-ai-short-studio-cli/references/b-roll-and-screen.md +9 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/caption-and-graphics-direction.md +11 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/commands/canvas.md +3 -1
- package/skills/using-vvicat-ai-short-studio-cli/references/commands.md +1 -1
- package/skills/using-vvicat-ai-short-studio-cli/references/composition-and-shot-review.md +17 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/craft-index.md +20 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/drama-canvas.md +19 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/editing-delivery.md +1 -1
- package/skills/using-vvicat-ai-short-studio-cli/references/format-relationships.md +15 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/h3-prompts.md +7 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/h3-video-delivery.md +1 -1
- package/skills/using-vvicat-ai-short-studio-cli/references/image-and-reference-direction.md +9 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/licensed-music.md +9 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/licenses/oh-my-short-drama-MIT.txt +21 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/media-provenance-and-review.md +22 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/paid-plan.md +7 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/production-specialties.md +25 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/recreation.md +21 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/reference-analysis-and-timing.md +19 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/remotion-editing.md +18 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/shot-production.md +9 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/sound-and-captions.md +7 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/sources.md +6 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/special-workflows.md +2 -2
- package/skills/using-vvicat-ai-short-studio-cli/references/story-craft/canvas-production.md +9 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/story-craft/guide.md +7 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/story-craft/index.md +13 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/video-and-performance-direction.md +9 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/voice-and-sound-direction.md +9 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/writing-polish.md +15 -0
- package/skills/humanizer/SKILL.md +0 -412
- package/skills/short-drama/README.md +0 -508
- package/skills/short-drama/SKILL.md +0 -525
- /package/skills/{humanizer/LICENSE → using-vvicat-ai-short-studio-cli/references/licenses/humanizer-MIT.txt} +0 -0
- /package/skills/{short-drama/LICENSE → using-vvicat-ai-short-studio-cli/references/licenses/short-drama-MIT.txt} +0 -0
- /package/skills/{short-drama/references → using-vvicat-ai-short-studio-cli/references/story-craft}/compliance-checklist.md +0 -0
- /package/skills/{short-drama/references → using-vvicat-ai-short-studio-cli/references/story-craft}/genre-guide.md +0 -0
- /package/skills/{short-drama/references → using-vvicat-ai-short-studio-cli/references/story-craft}/hook-design.md +0 -0
- /package/skills/{short-drama/references → using-vvicat-ai-short-studio-cli/references/story-craft}/opening-rules.md +0 -0
- /package/skills/{short-drama/references → using-vvicat-ai-short-studio-cli/references/story-craft}/paywall-design.md +0 -0
- /package/skills/{short-drama/references → using-vvicat-ai-short-studio-cli/references/story-craft}/rhythm-curve.md +0 -0
- /package/skills/{short-drama/references → using-vvicat-ai-short-studio-cli/references/story-craft}/satisfaction-matrix.md +0 -0
- /package/skills/{short-drama/references → using-vvicat-ai-short-studio-cli/references/story-craft}/villain-design.md +0 -0
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
2
|
import { BaseCommand } from '../../../base-command.js';
|
|
3
3
|
import { commandApi, mapConcurrent, projectFlag } from '../../../command-helpers.js';
|
|
4
|
+
/**
|
|
5
|
+
* P1-2 契约:调用方必须能从 stdout JSON 直接区分
|
|
6
|
+
* 「已等待到终态」与「仅提交、仍在服务端排队」。
|
|
7
|
+
* 因此每次输出都带 waited / pending / pendingNodeIds / reason,
|
|
8
|
+
* 不再允许出现「空 tasks + exit 0」这种伪装成同步完成的输出。
|
|
9
|
+
*/
|
|
10
|
+
export function withWaitState(payload, state) {
|
|
11
|
+
const base = payload && typeof payload === 'object' && !Array.isArray(payload)
|
|
12
|
+
? payload
|
|
13
|
+
: { result: payload };
|
|
14
|
+
const pending = state.pendingNodeIds.length > 0;
|
|
15
|
+
return {
|
|
16
|
+
...base,
|
|
17
|
+
waited: state.waited,
|
|
18
|
+
pending,
|
|
19
|
+
...(pending ? { pendingNodeIds: state.pendingNodeIds } : {}),
|
|
20
|
+
...(state.reason ? { reason: state.reason } : {}),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
4
23
|
export default class CanvasNodeRun extends BaseCommand {
|
|
5
24
|
static args = { nodeId: Args.string({ required: false }) };
|
|
6
25
|
static flags = {
|
|
@@ -39,11 +58,16 @@ export default class CanvasNodeRun extends BaseCommand {
|
|
|
39
58
|
result: await api.runNode(flags.project, nodeId),
|
|
40
59
|
}));
|
|
41
60
|
if (!flags.wait) {
|
|
42
|
-
|
|
61
|
+
const payload = nodeIds.length === 1 ? submissions[0].result : { submissions };
|
|
62
|
+
this.print(withWaitState(payload, { waited: false, pendingNodeIds: nodeIds, reason: '未传 --wait,任务仅已提交,仍在服务端排队' }));
|
|
43
63
|
return;
|
|
44
64
|
}
|
|
45
65
|
const maxWaitMs = flags['max-wait-ms'] > 0 ? flags['max-wait-ms'] : Number.POSITIVE_INFINITY;
|
|
66
|
+
// 病灶(P1-2):旧实现用 filter 静默丢掉没有 task.id 的提交项,
|
|
67
|
+
// tasks 变成空数组后命令打印 {"tasks": []} 并 exit 0,agent 误以为已同步完成。
|
|
68
|
+
// 现在缺 task.id 的节点必须进 pendingNodeIds 并让命令以非零码退出。
|
|
46
69
|
const tasks = submissions.filter((item) => item.result.task?.id);
|
|
70
|
+
const pendingNodeIds = submissions.filter((item) => !item.result.task?.id).map((item) => item.nodeId);
|
|
47
71
|
const completed = await mapConcurrent(tasks, flags.concurrency, async (item) => {
|
|
48
72
|
let currentSubmission = item.result;
|
|
49
73
|
let attempt = 0;
|
|
@@ -99,8 +123,22 @@ export default class CanvasNodeRun extends BaseCommand {
|
|
|
99
123
|
return { nodeId: item.nodeId, task, attempts: attempt };
|
|
100
124
|
}
|
|
101
125
|
});
|
|
102
|
-
|
|
103
|
-
|
|
126
|
+
// 有节点缺 task.id:这些任务确实已提交但 CLI 无从轮询,不能装作等到了。
|
|
127
|
+
const incomplete = completed.filter((item) => item.task.status !== 'completed');
|
|
128
|
+
const payload = nodeIds.length === 1 && !pendingNodeIds.length
|
|
129
|
+
? completed[0]
|
|
130
|
+
: { submissions, tasks: completed };
|
|
131
|
+
const pendingReason = pendingNodeIds.length
|
|
132
|
+
? `服务端提交响应缺少 task id,无法轮询:${pendingNodeIds.join(', ')}`
|
|
133
|
+
: '';
|
|
134
|
+
this.print(withWaitState(payload, {
|
|
135
|
+
waited: !pendingNodeIds.length,
|
|
136
|
+
pendingNodeIds,
|
|
137
|
+
reason: pendingReason,
|
|
138
|
+
}));
|
|
139
|
+
if (pendingNodeIds.length)
|
|
140
|
+
this.error(`部分节点未返回 task id,任务仍可能在服务端排队:${pendingReason}`, { exit: 8 });
|
|
141
|
+
if (incomplete.length)
|
|
104
142
|
this.error('部分任务未成功完成', { exit: 8 });
|
|
105
143
|
// --auto-select-version:节点成功跑完后,若 task.result 含 assetId + versionId,
|
|
106
144
|
// 自动调 canvas asset select-version,让下游 cvd 节点能读到 character profile。
|
|
@@ -10,6 +10,7 @@ export default class CanvasNodeTypes extends BaseCommand {
|
|
|
10
10
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
};
|
|
14
15
|
run(): Promise<void>;
|
|
15
16
|
}
|
|
@@ -9,6 +9,7 @@ export default class CanvasNodeUpdateMany extends BaseCommand {
|
|
|
9
9
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
};
|
|
13
14
|
run(): Promise<void>;
|
|
14
15
|
}
|
|
@@ -16,6 +16,7 @@ export default class CanvasNodeUpdate extends BaseCommand {
|
|
|
16
16
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
17
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
18
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
20
|
};
|
|
20
21
|
run(): Promise<void>;
|
|
21
22
|
}
|
|
@@ -7,6 +7,7 @@ export default class CanvasSettingsGet extends BaseCommand {
|
|
|
7
7
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
};
|
|
11
12
|
run(): Promise<void>;
|
|
12
13
|
}
|
|
@@ -7,17 +7,41 @@ type CanvasSettingsFlags = {
|
|
|
7
7
|
type ReadInput = (file?: string) => Promise<Record<string, unknown>>;
|
|
8
8
|
export declare function parseSettingFlagValue(value: string): unknown;
|
|
9
9
|
export declare function buildCanvasSettingsInput(flags: CanvasSettingsFlags, readInput?: ReadInput): Promise<Record<string, unknown>>;
|
|
10
|
+
/**
|
|
11
|
+
* 服务端把 productionCanvas.version 同时当作画布版本与 settings 乐观锁
|
|
12
|
+
* (src/lib/freeform-canvas/settings.ts),而任何画布节点写入都会 +1 这个 version。
|
|
13
|
+
* 因此 CLI 不能把「上一步读到的版本号」当成稳定基线:
|
|
14
|
+
* - 未显式给 expectedVersion:写前重读一次当前版本,冲突后最多自动重试 1 次;
|
|
15
|
+
* - 显式给 expectedVersion(含 --file/stdin 里自带该字段):保持严格乐观锁,
|
|
16
|
+
* 绝不静默重试,否则用户主动声明的并发保护会被悄悄绕过。
|
|
17
|
+
*/
|
|
18
|
+
export declare function isVersionConflict(error: unknown): boolean;
|
|
19
|
+
export interface CanvasSettingsWriteApi {
|
|
20
|
+
canvasSettings(projectId: string): Promise<Record<string, unknown>>;
|
|
21
|
+
updateCanvasSettings(projectId: string, input: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
22
|
+
}
|
|
23
|
+
export declare function writeCanvasSettingsWithVersionGuard(input: {
|
|
24
|
+
api: CanvasSettingsWriteApi;
|
|
25
|
+
projectId: string;
|
|
26
|
+
input: Record<string, unknown>;
|
|
27
|
+
explicitVersion?: number;
|
|
28
|
+
}): Promise<{
|
|
29
|
+
response: Record<string, unknown>;
|
|
30
|
+
retriedAfterConflict: boolean;
|
|
31
|
+
}>;
|
|
10
32
|
export default class CanvasSettingsSet extends BaseCommand {
|
|
11
33
|
static flags: {
|
|
12
34
|
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
35
|
field: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
36
|
value: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
37
|
file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
38
|
+
'expected-version': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
39
|
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
40
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
41
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
42
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
43
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
44
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
45
|
};
|
|
22
46
|
run(): Promise<void>;
|
|
23
47
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import { BaseCommand } from '../../../base-command.js';
|
|
3
|
+
import { CliApiError } from '../../../client/errors.js';
|
|
3
4
|
import { commandApi, projectFlag, readJsonInput } from '../../../command-helpers.js';
|
|
4
5
|
export function parseSettingFlagValue(value) {
|
|
5
6
|
const input = value.trim();
|
|
@@ -39,6 +40,49 @@ export async function buildCanvasSettingsInput(flags, readInput = readJsonInput)
|
|
|
39
40
|
return { values: { [flags.field]: parseSettingFlagValue(flags.value) } };
|
|
40
41
|
return readInput(flags.file);
|
|
41
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* 服务端把 productionCanvas.version 同时当作画布版本与 settings 乐观锁
|
|
45
|
+
* (src/lib/freeform-canvas/settings.ts),而任何画布节点写入都会 +1 这个 version。
|
|
46
|
+
* 因此 CLI 不能把「上一步读到的版本号」当成稳定基线:
|
|
47
|
+
* - 未显式给 expectedVersion:写前重读一次当前版本,冲突后最多自动重试 1 次;
|
|
48
|
+
* - 显式给 expectedVersion(含 --file/stdin 里自带该字段):保持严格乐观锁,
|
|
49
|
+
* 绝不静默重试,否则用户主动声明的并发保护会被悄悄绕过。
|
|
50
|
+
*/
|
|
51
|
+
export function isVersionConflict(error) {
|
|
52
|
+
return error instanceof CliApiError && error.status === 409;
|
|
53
|
+
}
|
|
54
|
+
function readSettingsVersion(response) {
|
|
55
|
+
const data = response?.data;
|
|
56
|
+
const version = data && typeof data === 'object' && !Array.isArray(data)
|
|
57
|
+
? data.version
|
|
58
|
+
: undefined;
|
|
59
|
+
return typeof version === 'number' ? version : undefined;
|
|
60
|
+
}
|
|
61
|
+
export async function writeCanvasSettingsWithVersionGuard(input) {
|
|
62
|
+
const { api, projectId } = input;
|
|
63
|
+
// 显式版本:严格模式,不预读也不重试。
|
|
64
|
+
if (input.explicitVersion !== undefined) {
|
|
65
|
+
return {
|
|
66
|
+
response: await api.updateCanvasSettings(projectId, { ...input.input, expectedVersion: input.explicitVersion }),
|
|
67
|
+
retriedAfterConflict: false,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
let expectedVersion = readSettingsVersion(await api.canvasSettings(projectId));
|
|
71
|
+
try {
|
|
72
|
+
return {
|
|
73
|
+
response: await api.updateCanvasSettings(projectId, { ...input.input, expectedVersion }),
|
|
74
|
+
retriedAfterConflict: false,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
if (!isVersionConflict(error))
|
|
79
|
+
throw error;
|
|
80
|
+
// 写入与预读之间又有别的画布写入推进了版本:重读一次再重试,仅此一次。
|
|
81
|
+
expectedVersion = readSettingsVersion(await api.canvasSettings(projectId));
|
|
82
|
+
const response = await api.updateCanvasSettings(projectId, { ...input.input, expectedVersion });
|
|
83
|
+
return { response, retriedAfterConflict: true };
|
|
84
|
+
}
|
|
85
|
+
}
|
|
42
86
|
export default class CanvasSettingsSet extends BaseCommand {
|
|
43
87
|
static flags = {
|
|
44
88
|
...BaseCommand.baseFlags,
|
|
@@ -46,10 +90,25 @@ export default class CanvasSettingsSet extends BaseCommand {
|
|
|
46
90
|
field: Flags.string({ description: '要更新的设置字段;outputLanguage 支持 pt-BR 等 BCP 47 标签', dependsOn: ['value'], exclusive: ['file'] }),
|
|
47
91
|
value: Flags.string({ description: '字段值', dependsOn: ['field'], exclusive: ['file'] }),
|
|
48
92
|
file: Flags.string({ description: '设置 JSON 文件;省略时读取 stdin', exclusive: ['field', 'value'] }),
|
|
93
|
+
'expected-version': Flags.integer({
|
|
94
|
+
description: 'settings 乐观锁版本号。省略时 CLI 先读取当前版本再写,遇版本冲突自动重读重试一次(输出中标注 retriedAfterConflict)。显式传入则保持严格乐观锁,不预读、不重试。',
|
|
95
|
+
min: 0,
|
|
96
|
+
}),
|
|
49
97
|
};
|
|
50
98
|
async run() {
|
|
51
99
|
const { flags } = await this.parse(CanvasSettingsSet);
|
|
52
100
|
const { api } = await commandApi(flags);
|
|
53
|
-
|
|
101
|
+
const settingsInput = await buildCanvasSettingsInput(flags);
|
|
102
|
+
const inputVersion = typeof settingsInput.expectedVersion === 'number'
|
|
103
|
+
? settingsInput.expectedVersion
|
|
104
|
+
: undefined;
|
|
105
|
+
const explicitVersion = flags['expected-version'] ?? inputVersion;
|
|
106
|
+
const { response, retriedAfterConflict } = await writeCanvasSettingsWithVersionGuard({
|
|
107
|
+
api,
|
|
108
|
+
projectId: flags.project,
|
|
109
|
+
input: settingsInput,
|
|
110
|
+
explicitVersion,
|
|
111
|
+
});
|
|
112
|
+
this.print(retriedAfterConflict ? { ...response, retriedAfterConflict: true } : response);
|
|
54
113
|
}
|
|
55
114
|
}
|
|
@@ -21,6 +21,40 @@ export default class ConfigAiProviderCapabilities extends BaseCommand {
|
|
|
21
21
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
22
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
23
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
25
|
};
|
|
25
26
|
run(): Promise<void>;
|
|
26
27
|
}
|
|
28
|
+
type ProbeOutcome = 'ok' | 'unknown' | 'failed';
|
|
29
|
+
/**
|
|
30
|
+
* 探测结果判定(2026-10-09 · ERR-20261009-004 · 报告 P0-6)。
|
|
31
|
+
*
|
|
32
|
+
* 服务端对 **RunningHub 协议**的 provider 返回 `{ success: false, reason:
|
|
33
|
+
* 'comfyui-runninghub-protocol', hint: 'RunningHub 协议无法做连通性测试…',
|
|
34
|
+
* steps: [{ status: 'skip', httpStatus: 200 }] }` —— 这是「**不可探测**」,不是
|
|
35
|
+
* 「探测失败」。旧实现只看 `success === true`,把它一律压成 `ok: false`,于是
|
|
36
|
+
* reachability 报 `failed` 而 detail 是 `skip/200`,读起来自相矛盾
|
|
37
|
+
* (端到端测试报告记录的就是这个现象)。
|
|
38
|
+
*
|
|
39
|
+
* 代价不是「不好看」而是**误导决策**:agent/运维看到 failed 就判定 provider 不可用,
|
|
40
|
+
* 于是去补环境变量配置、跳过该模型 —— 而真实故障在别处(凭据通道走错,见同 ERR 的
|
|
41
|
+
* video.ts / adapter.ts 修复)。
|
|
42
|
+
*
|
|
43
|
+
* 修法:`skip` 与该 reason **不算失败**,映射为 unknown(与 `--no-reachability` 时同义),
|
|
44
|
+
* 并把服务端给的 hint 带进 detail,让「为什么不可探测」在报告里直接可读。
|
|
45
|
+
*/
|
|
46
|
+
declare function classifyProbe(result: {
|
|
47
|
+
success?: boolean;
|
|
48
|
+
reason?: string;
|
|
49
|
+
hint?: string;
|
|
50
|
+
steps?: Array<{
|
|
51
|
+
status?: string;
|
|
52
|
+
httpStatus?: number;
|
|
53
|
+
}>;
|
|
54
|
+
}): {
|
|
55
|
+
outcome: ProbeOutcome;
|
|
56
|
+
detail: string;
|
|
57
|
+
};
|
|
58
|
+
/** 测试出口:与 classifyProbe 同函数,仅供单测直接断言三态映射。 */
|
|
59
|
+
export declare const classifyProbeForTest: typeof classifyProbe;
|
|
60
|
+
export {};
|
|
@@ -68,6 +68,34 @@ export default class ConfigAiProviderCapabilities extends BaseCommand {
|
|
|
68
68
|
this.print(report);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* 探测结果判定(2026-10-09 · ERR-20261009-004 · 报告 P0-6)。
|
|
73
|
+
*
|
|
74
|
+
* 服务端对 **RunningHub 协议**的 provider 返回 `{ success: false, reason:
|
|
75
|
+
* 'comfyui-runninghub-protocol', hint: 'RunningHub 协议无法做连通性测试…',
|
|
76
|
+
* steps: [{ status: 'skip', httpStatus: 200 }] }` —— 这是「**不可探测**」,不是
|
|
77
|
+
* 「探测失败」。旧实现只看 `success === true`,把它一律压成 `ok: false`,于是
|
|
78
|
+
* reachability 报 `failed` 而 detail 是 `skip/200`,读起来自相矛盾
|
|
79
|
+
* (端到端测试报告记录的就是这个现象)。
|
|
80
|
+
*
|
|
81
|
+
* 代价不是「不好看」而是**误导决策**:agent/运维看到 failed 就判定 provider 不可用,
|
|
82
|
+
* 于是去补环境变量配置、跳过该模型 —— 而真实故障在别处(凭据通道走错,见同 ERR 的
|
|
83
|
+
* video.ts / adapter.ts 修复)。
|
|
84
|
+
*
|
|
85
|
+
* 修法:`skip` 与该 reason **不算失败**,映射为 unknown(与 `--no-reachability` 时同义),
|
|
86
|
+
* 并把服务端给的 hint 带进 detail,让「为什么不可探测」在报告里直接可读。
|
|
87
|
+
*/
|
|
88
|
+
function classifyProbe(result) {
|
|
89
|
+
const steps = result.steps ?? [];
|
|
90
|
+
const skipped = steps.length > 0 && steps.every((step) => step.status === 'skip');
|
|
91
|
+
const stepDetail = steps.map((step) => `${step.status ?? 'unknown'}/${step.httpStatus ?? '?'}`).join(', ');
|
|
92
|
+
if (skipped || result.reason === 'comfyui-runninghub-protocol') {
|
|
93
|
+
return { outcome: 'unknown', detail: [stepDetail, result.hint].filter(Boolean).join(' · ') };
|
|
94
|
+
}
|
|
95
|
+
return { outcome: result.success === true ? 'ok' : 'failed', detail: stepDetail };
|
|
96
|
+
}
|
|
97
|
+
/** 测试出口:与 classifyProbe 同函数,仅供单测直接断言三态映射。 */
|
|
98
|
+
export const classifyProbeForTest = classifyProbe;
|
|
71
99
|
async function probeConcurrently(providers, concurrency, probe) {
|
|
72
100
|
const out = [];
|
|
73
101
|
let cursor = 0;
|
|
@@ -77,8 +105,14 @@ async function probeConcurrently(providers, concurrency, probe) {
|
|
|
77
105
|
const provider = providers[index];
|
|
78
106
|
try {
|
|
79
107
|
const result = await probe(provider.id);
|
|
80
|
-
const
|
|
81
|
-
|
|
108
|
+
const { outcome, detail } = classifyProbe(result);
|
|
109
|
+
// resolveReachability 只读 sample.ok,故 unknown 也用 ok:true 承载,
|
|
110
|
+
// 并在 detail 加 unknown 前缀让下游(CLI 输出/人读报告)能直接分辨三态。
|
|
111
|
+
out.push([provider.id, {
|
|
112
|
+
ok: outcome !== 'failed',
|
|
113
|
+
detail: outcome === 'unknown' ? `unknown · ${detail}` : detail,
|
|
114
|
+
durationMs: result.durationMs,
|
|
115
|
+
}]);
|
|
82
116
|
}
|
|
83
117
|
catch (error) {
|
|
84
118
|
out.push([provider.id, { ok: false, detail: error instanceof Error ? error.message : String(error) }]);
|
|
@@ -16,6 +16,7 @@ export default class ConfigAiProviderGet extends BaseCommand {
|
|
|
16
16
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
17
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
18
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
20
|
};
|
|
20
21
|
run(): Promise<void>;
|
|
21
22
|
}
|
|
@@ -15,6 +15,7 @@ export default class ConfigAiProviderList extends BaseCommand {
|
|
|
15
15
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
16
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
17
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
19
|
};
|
|
19
20
|
run(): Promise<void>;
|
|
20
21
|
}
|
|
@@ -16,6 +16,7 @@ export default class ConfigAiProviderModels extends BaseCommand {
|
|
|
16
16
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
17
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
18
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
20
|
};
|
|
20
21
|
run(): Promise<void>;
|
|
21
22
|
}
|
|
@@ -35,6 +35,7 @@ export default class ConfigAiProviderSet extends BaseCommand {
|
|
|
35
35
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
36
36
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
37
37
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
38
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
38
39
|
};
|
|
39
40
|
run(): Promise<void>;
|
|
40
41
|
}
|
|
@@ -19,6 +19,7 @@ export default class ConfigAiProviderTest extends BaseCommand {
|
|
|
19
19
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
20
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
21
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
23
|
};
|
|
23
24
|
run(): Promise<void>;
|
|
24
25
|
}
|
|
@@ -6,6 +6,7 @@ export default class ConfigGet extends BaseCommand {
|
|
|
6
6
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
7
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
};
|
|
10
11
|
run(): Promise<void>;
|
|
11
12
|
}
|
|
@@ -8,6 +8,7 @@ export default class ConfigSet extends BaseCommand {
|
|
|
8
8
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
};
|
|
12
13
|
run(): Promise<void>;
|
|
13
14
|
}
|
|
@@ -8,6 +8,7 @@ export default class Preflight extends BaseCommand {
|
|
|
8
8
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
};
|
|
12
13
|
run(): Promise<void>;
|
|
13
14
|
}
|
|
@@ -8,6 +8,7 @@ export default class ProjectCreate extends BaseCommand {
|
|
|
8
8
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
};
|
|
12
13
|
run(): Promise<void>;
|
|
13
14
|
}
|
|
@@ -10,6 +10,7 @@ export default class ProjectDelete extends BaseCommand {
|
|
|
10
10
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
};
|
|
14
15
|
run(): Promise<void>;
|
|
15
16
|
}
|
|
@@ -9,6 +9,7 @@ export default class ProjectGet extends BaseCommand {
|
|
|
9
9
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
};
|
|
13
14
|
run(): Promise<void>;
|
|
14
15
|
}
|
|
@@ -10,6 +10,7 @@ export default class ProjectList extends BaseCommand {
|
|
|
10
10
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
};
|
|
14
15
|
run(): Promise<void>;
|
|
15
16
|
}
|
|
@@ -9,6 +9,7 @@ export default class ProjectProviderGet extends BaseCommand {
|
|
|
9
9
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
};
|
|
13
14
|
run(): Promise<void>;
|
|
14
15
|
}
|
|
@@ -10,6 +10,7 @@ export default class ProjectProviderSet extends BaseCommand {
|
|
|
10
10
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
};
|
|
14
15
|
run(): Promise<void>;
|
|
15
16
|
}
|
|
@@ -9,6 +9,7 @@ export default class ProjectProviderTest extends BaseCommand {
|
|
|
9
9
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
};
|
|
13
14
|
run(): Promise<void>;
|
|
14
15
|
}
|
|
@@ -11,6 +11,7 @@ export default class ProjectUpdate extends BaseCommand {
|
|
|
11
11
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
13
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
15
|
};
|
|
15
16
|
run(): Promise<void>;
|
|
16
17
|
}
|
|
@@ -11,6 +11,7 @@ export default class SkillInstall extends BaseCommand {
|
|
|
11
11
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
13
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
15
|
};
|
|
15
16
|
run(): Promise<void>;
|
|
16
17
|
}
|
|
@@ -7,6 +7,7 @@ export default class SkillInstall extends BaseCommand {
|
|
|
7
7
|
async run() {
|
|
8
8
|
const { flags } = await this.parse(SkillInstall);
|
|
9
9
|
if (flags.directory) {
|
|
10
|
+
selectedSkillNames(flags.skill);
|
|
10
11
|
this.print(await installSkill({ target: flags.directory, force: flags.force }));
|
|
11
12
|
return;
|
|
12
13
|
}
|
|
@@ -10,6 +10,7 @@ export default class SkillPath extends BaseCommand {
|
|
|
10
10
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
};
|
|
14
15
|
run(): Promise<void>;
|
|
15
16
|
}
|
|
@@ -10,6 +10,7 @@ export default class SkillStatus extends BaseCommand {
|
|
|
10
10
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
};
|
|
14
15
|
run(): Promise<void>;
|
|
15
16
|
}
|
|
@@ -10,6 +10,7 @@ export default class TaskCancel extends BaseCommand {
|
|
|
10
10
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
};
|
|
14
15
|
run(): Promise<void>;
|
|
15
16
|
}
|
|
@@ -9,6 +9,7 @@ export default class TaskGet extends BaseCommand {
|
|
|
9
9
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
};
|
|
13
14
|
run(): Promise<void>;
|
|
14
15
|
}
|
|
@@ -13,6 +13,7 @@ export default class TaskWait extends BaseCommand {
|
|
|
13
13
|
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
14
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
15
|
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
17
|
};
|
|
17
18
|
run(): Promise<void>;
|
|
18
19
|
}
|
|
@@ -132,6 +132,9 @@ export declare class VvicatApi {
|
|
|
132
132
|
}): Promise<JsonObject>;
|
|
133
133
|
disconnect(projectId: string, edgeId: string): Promise<JsonObject>;
|
|
134
134
|
runNode(projectId: string, nodeId: string): Promise<CanvasNodeRunResponse>;
|
|
135
|
+
quoteNode(projectId: string, nodeId: string): Promise<{
|
|
136
|
+
quote: JsonObject;
|
|
137
|
+
}>;
|
|
135
138
|
listAssets(projectId: string, query?: string): Promise<JsonObject>;
|
|
136
139
|
asset(projectId: string, assetId: string): Promise<JsonObject>;
|
|
137
140
|
selectAssetVersion(projectId: string, assetId: string, versionId: string): Promise<JsonObject>;
|
|
@@ -305,6 +305,9 @@ export class VvicatApi {
|
|
|
305
305
|
runNode(projectId, nodeId) {
|
|
306
306
|
return this.client.request(`/api/projects/${projectId}/canvas/nodes/${nodeId}/execute`, { method: 'POST' });
|
|
307
307
|
}
|
|
308
|
+
quoteNode(projectId, nodeId) {
|
|
309
|
+
return this.client.request(`/api/projects/${projectId}/canvas/nodes/${nodeId}/quote`);
|
|
310
|
+
}
|
|
308
311
|
listAssets(projectId, query = '') {
|
|
309
312
|
return this.client.request(`/api/projects/${projectId}/canvas/assets${query ? `?${query}` : ''}`);
|
|
310
313
|
}
|
|
@@ -1 +1,12 @@
|
|
|
1
1
|
export declare function formatJson(value: unknown): string;
|
|
2
|
+
/**
|
|
3
|
+
* P0-4(应用层旁路):Windows 控制台 chcp=437 时,进程启动那一刻 stdout 句柄
|
|
4
|
+
* 已按旧代码页打开,进程内改 Console.OutputEncoding 无效——UTF-8 字节被按
|
|
5
|
+
* CP437 解码,中文变希腊字母。环境层只能靠 chcp 65001(须在启动 Node 前设置),
|
|
6
|
+
* 应用层可靠的做法是绕开终端句柄:由 Node 直接以 utf-8 写文件。
|
|
7
|
+
*
|
|
8
|
+
* 优先级:--output flag > CLI_OUTPUT_FILE 环境变量 > 不启用(保持原有 stdout 行为)。
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveOutputFile(flagValue: string | undefined, env?: NodeJS.ProcessEnv): string | undefined;
|
|
11
|
+
/** 以 utf-8 无 BOM 落盘,保证字节级可核对(中文不被转义、不受终端代码页影响)。 */
|
|
12
|
+
export declare function writeCliOutput(file: string, value: unknown): Promise<void>;
|