@aswless_854771076/ai_short_studio_cli 0.1.142 → 0.1.144
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 +7 -17
- package/dist/commands/auth/login.js +7 -6
- package/dist/commands/auth/signup.d.ts +1 -0
- package/dist/commands/auth/signup.js +1 -0
- package/dist/commands/canvas/document/get.d.ts +16 -0
- package/dist/commands/canvas/document/get.js +26 -0
- package/dist/commands/canvas/document/save.d.ts +21 -0
- package/dist/commands/canvas/document/save.js +47 -0
- package/dist/commands/canvas/document/status.d.ts +16 -0
- package/dist/commands/canvas/document/status.js +13 -0
- package/dist/commands/canvas/documents.d.ts +13 -0
- package/dist/commands/canvas/documents.js +11 -0
- package/dist/commands/canvas/workflow/status.d.ts +13 -0
- package/dist/commands/canvas/workflow/status.js +15 -0
- package/dist/domain/vvicat-api.d.ts +16 -0
- package/dist/domain/vvicat-api.js +11 -0
- package/package.json +1 -1
- package/skills/using-vvicat-ai-short-studio-cli/SKILL.md +7 -7
- package/skills/using-vvicat-ai-short-studio-cli/references/commands/canvas.md +27 -0
- package/skills/using-vvicat-ai-short-studio-cli/references/commands/project.md +2 -4
- package/skills/using-vvicat-ai-short-studio-cli/references/short-drama/SKILL.md +5 -3
package/README.md
CHANGED
|
@@ -7,7 +7,6 @@ npm view @aswless_854771076/ai_short_studio_cli dist-tags.latest
|
|
|
7
7
|
npm install --global @aswless_854771076/ai_short_studio_cli@latest
|
|
8
8
|
ai-short-studio --version
|
|
9
9
|
ai-short-studio auth login
|
|
10
|
-
ai-short-studio auth login --provider supabase
|
|
11
10
|
ai-short-studio project list --json
|
|
12
11
|
ai-short-studio canvas node types --json
|
|
13
12
|
```
|
|
@@ -18,20 +17,9 @@ npm 包只内置一个 `using-vvicat-ai-short-studio-cli` Agent Skill。hypit、
|
|
|
18
17
|
|
|
19
18
|
`skill install/status/update` 管理这个唯一 Skill。短剧创作、humanizer 审计和 hypit 视频制作资料通过主 Skill 的 references 按需读取。
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
CLI 默认使用 MemHub 浏览器授权。已有 Supabase 登录档案仍可用于兼容旧环境,但公开帮助只展示 MemHub 登录方式。
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
ai-short-studio auth signup --provider supabase --email user@example.com --password-stdin
|
|
25
|
-
ai-short-studio auth login --provider supabase --email user@example.com --password-stdin
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Agent 代操作时,用户已在当前会话明确提供的密码只能直接写入正在等待的隐藏密码提示,不得复述、拼入 shell 命令、落盘或跨会话保存。
|
|
29
|
-
|
|
30
|
-
注册响应中的 `confirmationRequired` 表示是否需要先完成邮件验证。Supabase 直接返回会话时,CLI 会立即登录并把 refresh token 保存到系统钥匙串;需要邮件验证时不会写入空凭据,验证后再执行登录。MemHub 登录成功后使用短期 API Key 访问服务。
|
|
31
|
-
|
|
32
|
-
注册确认链接使用当前 profile 的 `baseUrl` 和 `--locale`,指向同域的 `/{locale}/auth/callback`。API 与网页需保持同域,并在 Supabase Redirect URLs 中允许各环境的 `/**`;Site URL 只作为未显式传入回调时的生产兜底。
|
|
33
|
-
|
|
34
|
-
CLI 只把 refresh token 保存到系统钥匙串。短期 access token 会写入权限为 `0600` 的本机 session 缓存;同一 profile 的并发进程通过跨进程锁共享刷新结果,只有缓存缺失或确实需要刷新时才访问钥匙串,从而避免 Agent 批量操作反复触发 macOS Keychain。退出登录会清除该缓存,CI 可用 `VVICAT_ACCESS_TOKEN` 直接注入临时令牌。未配置服务地址时默认连接 `https://ai-short-studio.vvicat.dev`,`--base-url`、`VVICAT_BASE_URL` 和当前 profile 可依次覆盖。首次登录会从服务端 bootstrap 取得 Supabase 公共配置,也可用 `VVICAT_SUPABASE_URL`、`VVICAT_SUPABASE_PUBLISHABLE_KEY` 显式覆盖。Google 登录在 Windows 上直接调用系统 URL Handler,确保带 `&` 的 PKCE 授权参数完整传给浏览器。服务地址和非敏感 profile 写入系统配置目录;切换环境时必须使用独立的 `--profile`,避免复用旧认证。
|
|
22
|
+
CLI 将长期凭据保存到系统钥匙串。短期 access token 会写入权限为 `0600` 的本机 session 缓存;同一 profile 的并发进程通过跨进程锁共享刷新结果。退出登录会清除该缓存,CI 可用 `VVICAT_ACCESS_TOKEN` 直接注入临时令牌。未配置服务地址时默认连接 `https://ai-short-studio.vvicat.dev`,`--base-url`、`VVICAT_BASE_URL` 和当前 profile 可依次覆盖。服务地址和非敏感 profile 写入系统配置目录;切换环境时必须使用独立的 `--profile`,避免复用旧认证。
|
|
35
23
|
|
|
36
24
|
创作前运行 `ai-short-studio preflight --json`。CLI 会通过公开的 `/api/v1/bootstrap` 检查服务连通性、取得 Supabase 公共配置、读取 npm `latest` 稳定版本并报告 `updateAvailable`,默认只检查、不修改全局包。需要更新时显式传 `--update`,更新成功后按输出重跑。随后预检检查登录态和文本、人物、场景、故事版、视频模型配置。npm registry 暂时不可用时服务端使用配置版本降级。
|
|
37
25
|
|
|
@@ -47,6 +35,8 @@ CLI 只把 refresh token 保存到系统钥匙串。短期 access token 会写
|
|
|
47
35
|
- `ai-short-studio canvas edge`:连线读写。
|
|
48
36
|
- `ai-short-studio canvas continuity analyze`:视频生成前分析镜头依赖,可修复已具备源视频的首尾帧连线。
|
|
49
37
|
- `ai-short-studio canvas asset`:资产列表、上传、版本选择和下载。
|
|
38
|
+
- `ai-short-studio canvas documents`:一次读取当前分集的 Hypit 文档、选版和阻塞原因;`canvas document get|save|status` 读取、保存或检查单个文档。
|
|
39
|
+
- `ai-short-studio canvas workflow status`:读取当前阶段、基础模块门禁和下一步缺失项。
|
|
50
40
|
- `ai-short-studio canvas asset review-context|review`:读取当前媒体摘要和必需维度,提交实际逐项审核并追加独立审核文档;不自动生成通过结论。
|
|
51
41
|
- `ai-short-studio canvas folder`:画布资产目录管理(5 预设 + 用户子目录 + 软删 + 跨项目复制)。
|
|
52
42
|
- `ai-short-studio canvas episode`:列出或创建无限画布分集。其他画布命令用 `--episode <ID|集数>` 选择分集。
|
|
@@ -225,10 +215,10 @@ npm run release:ci:test -- --version 0.1.1-beta.0
|
|
|
225
215
|
|
|
226
216
|
### Agent 恢复 / Agent recovery
|
|
227
217
|
|
|
228
|
-
`canvas
|
|
218
|
+
新项目先运行 `canvas documents` 和 `canvas workflow status`,由 Agent 在无限画布创建 Hypit JSON 文档;用 `canvas document save` 追加版本,用 `canvas document status` 检查上游选版。`canvas node diagnose <nodeId>` 仅用于历史媒体节点的恢复,不是新流程入口。完整操作见随包 Skill 的 Hypit 文档流程。
|
|
229
219
|
|
|
230
220
|
Use `canvas node diagnose` to inspect inputs, selected versions, task status and recovery actions without running a model. `canvas node storyboard-draft` reads an unapproved planning draft; `--file` submits explicit edit/promote requests and `--dry-run` previews them. Content errors do not prevent draft saves. Promotion validates the complete plan; draft saves neither change the formal selection nor generate media. See the bundled Skill's `references/agent-recovery.md`. Image quality is inspected by a person or Agent; the platform checks review records and provenance, rather than detecting visual defects automatically.
|
|
231
221
|
|
|
232
|
-
Agent
|
|
222
|
+
Agent 可直接在 `text-resource` 节点保存 `hypit.script.v1`、`hypit.director-book.v1` 和 `hypit.production-plan.v1` 等文档;每次保存都通过 `--input` 固化上游版本,审核使用独立 `hypit.review.v1` 文档。历史 `screenplay-resource` 和 `storyboard-draft` 只用于迁移旧项目,不得用于新项目。
|
|
233
223
|
|
|
234
|
-
Agents
|
|
224
|
+
Agents author Hypit JSON documents directly in `text-resource` nodes and preserve every source version through `--input`; legacy screenplay resources and storyboard drafts are migration-only compatibility paths.
|
|
@@ -4,19 +4,20 @@ import { createRuntime } from '../../runtime.js';
|
|
|
4
4
|
import { promptLine, promptPassword, readStdinText } from '../../terminal/prompt.js';
|
|
5
5
|
import { loginWithMemHubPkce } from '../../auth/memhub-oauth.js';
|
|
6
6
|
export default class AuthLogin extends BaseCommand {
|
|
7
|
-
static description = '通过 MemHub
|
|
7
|
+
static description = '通过 MemHub 浏览器授权登录,并将长期凭据保存到系统钥匙串';
|
|
8
8
|
static flags = {
|
|
9
9
|
...BaseCommand.baseFlags,
|
|
10
|
-
email: Flags.string({ description: '登录邮箱' }),
|
|
11
|
-
google: Flags.boolean({ description: '通过浏览器使用 Google 登录', default: false }),
|
|
10
|
+
email: Flags.string({ description: '登录邮箱', hidden: true }),
|
|
11
|
+
google: Flags.boolean({ description: '通过浏览器使用 Google 登录', default: false, hidden: true }),
|
|
12
12
|
provider: Flags.string({
|
|
13
13
|
description: '登录提供方',
|
|
14
14
|
options: ['supabase', 'memhub'],
|
|
15
15
|
default: 'memhub',
|
|
16
|
+
hidden: true,
|
|
16
17
|
}),
|
|
17
|
-
'password-stdin': Flags.boolean({ description: '从标准输入读取密码', default: false }),
|
|
18
|
-
'supabase-publishable-key': Flags.string({ description: 'Supabase publishable key', env: 'VVICAT_SUPABASE_PUBLISHABLE_KEY' }),
|
|
19
|
-
'supabase-url': Flags.string({ description: 'Supabase URL', env: 'VVICAT_SUPABASE_URL' }),
|
|
18
|
+
'password-stdin': Flags.boolean({ description: '从标准输入读取密码', default: false, hidden: true }),
|
|
19
|
+
'supabase-publishable-key': Flags.string({ description: 'Supabase publishable key', env: 'VVICAT_SUPABASE_PUBLISHABLE_KEY', hidden: true }),
|
|
20
|
+
'supabase-url': Flags.string({ description: 'Supabase URL', env: 'VVICAT_SUPABASE_URL', hidden: true }),
|
|
20
21
|
};
|
|
21
22
|
async run() {
|
|
22
23
|
const { flags } = await this.parse(AuthLogin);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseCommand } from '../../base-command.js';
|
|
2
2
|
export declare function buildSignupRedirectUrl(baseUrl: string, locale: string): string;
|
|
3
3
|
export default class AuthSignup extends BaseCommand {
|
|
4
|
+
static hidden: boolean;
|
|
4
5
|
static description: string;
|
|
5
6
|
static flags: {
|
|
6
7
|
email: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -6,6 +6,7 @@ export function buildSignupRedirectUrl(baseUrl, locale) {
|
|
|
6
6
|
return new URL(`/${locale}/auth/callback`, baseUrl).toString();
|
|
7
7
|
}
|
|
8
8
|
export default class AuthSignup extends BaseCommand {
|
|
9
|
+
static hidden = true;
|
|
9
10
|
static description = '使用邮箱和密码注册账号';
|
|
10
11
|
static flags = {
|
|
11
12
|
...BaseCommand.baseFlags,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
export default class CanvasDocumentGet extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
nodeId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
3
|
+
import { commandApi, projectFlag } from '../../../command-helpers.js';
|
|
4
|
+
export default class CanvasDocumentGet extends BaseCommand {
|
|
5
|
+
static description = '读取画布 Hypit 文档当前选定版本及原始 JSON';
|
|
6
|
+
static args = { nodeId: Args.string({ required: true }) };
|
|
7
|
+
static flags = { ...BaseCommand.baseFlags, project: projectFlag };
|
|
8
|
+
async run() {
|
|
9
|
+
const { args, flags } = await this.parse(CanvasDocumentGet);
|
|
10
|
+
const { api } = await commandApi(flags);
|
|
11
|
+
const node = await api.node(flags.project, args.nodeId);
|
|
12
|
+
if (node.kind !== 'text-resource' || typeof node.refId !== 'string')
|
|
13
|
+
throw new Error('节点不是已保存的 Hypit 文档');
|
|
14
|
+
const assetPayload = await api.asset(flags.project, node.refId);
|
|
15
|
+
const asset = assetPayload.asset && typeof assetPayload.asset === 'object' && !Array.isArray(assetPayload.asset)
|
|
16
|
+
? assetPayload.asset : null;
|
|
17
|
+
if (!asset)
|
|
18
|
+
throw new Error('Hypit 文档资产不存在');
|
|
19
|
+
const selectedVersion = asset.selectedVersion && typeof asset.selectedVersion === 'object' && !Array.isArray(asset.selectedVersion)
|
|
20
|
+
? asset.selectedVersion : null;
|
|
21
|
+
this.print({ nodeId: args.nodeId, assetId: node.refId, metadata: asset.metadata ?? null,
|
|
22
|
+
selectedVersionId: asset.selectedVersionId ?? selectedVersion?.id ?? null,
|
|
23
|
+
textContent: selectedVersion?.textContent ?? null,
|
|
24
|
+
generationParams: selectedVersion?.generationParams ?? null });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
export default class CanvasDocumentSave extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
nodeId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'schema-key': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'document-key': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
input: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
};
|
|
20
|
+
run(): Promise<void>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
3
|
+
import { commandApi, projectFlag, readJsonInput } from '../../../command-helpers.js';
|
|
4
|
+
export default class CanvasDocumentSave extends BaseCommand {
|
|
5
|
+
static description = '将 JSON 保存为画布文本资源的不可变文档版本';
|
|
6
|
+
static args = { nodeId: Args.string({ required: true }) };
|
|
7
|
+
static flags = {
|
|
8
|
+
...BaseCommand.baseFlags,
|
|
9
|
+
project: projectFlag,
|
|
10
|
+
file: Flags.string({ description: 'JSON 文档文件;省略时读取 stdin' }),
|
|
11
|
+
name: Flags.string({ required: true, description: '文档名称' }),
|
|
12
|
+
'schema-key': Flags.string({ required: true, description: 'Hypit 文档结构版本,例如 hypit.brief.v1' }),
|
|
13
|
+
'document-key': Flags.string({ required: true, description: '项目内稳定文档键,例如 brief 或 ep-001.script' }),
|
|
14
|
+
input: Flags.string({ multiple: true, description: '依据的上游节点 ID,可重复指定' }),
|
|
15
|
+
};
|
|
16
|
+
async run() {
|
|
17
|
+
const { args, flags } = await this.parse(CanvasDocumentSave);
|
|
18
|
+
const content = await readJsonInput(flags.file);
|
|
19
|
+
const { api } = await commandApi(flags);
|
|
20
|
+
const node = await api.node(flags.project, args.nodeId);
|
|
21
|
+
if (node.kind !== 'text-resource')
|
|
22
|
+
throw new Error('JSON 文档只能保存到 text-resource 节点');
|
|
23
|
+
const assetId = typeof node.refId === 'string' ? node.refId : null;
|
|
24
|
+
const response = assetId ? await api.asset(flags.project, assetId) : null;
|
|
25
|
+
const asset = response?.asset && typeof response.asset === 'object'
|
|
26
|
+
? response.asset : null;
|
|
27
|
+
const selectedVersionId = typeof asset?.selectedVersionId === 'string' ? asset.selectedVersionId : null;
|
|
28
|
+
const inputs = await Promise.all((flags.input ?? []).map(async (nodeId) => {
|
|
29
|
+
const source = await api.node(flags.project, nodeId);
|
|
30
|
+
const sourceAsset = typeof source.refId === 'string' ? await api.asset(flags.project, source.refId) : null;
|
|
31
|
+
const selectedAsset = sourceAsset?.asset && typeof sourceAsset.asset === 'object'
|
|
32
|
+
? sourceAsset.asset : null;
|
|
33
|
+
const versionId = selectedAsset?.selectedVersionId;
|
|
34
|
+
if (typeof versionId !== 'string' || !versionId)
|
|
35
|
+
throw new Error(`上游节点没有选版:${nodeId}`);
|
|
36
|
+
return { nodeId, versionId };
|
|
37
|
+
}));
|
|
38
|
+
this.print(await api.saveCanvasDocument(flags.project, args.nodeId, {
|
|
39
|
+
name: flags.name,
|
|
40
|
+
schemaKey: flags['schema-key'],
|
|
41
|
+
documentKey: flags['document-key'],
|
|
42
|
+
expectedVersionId: typeof selectedVersionId === 'string' ? selectedVersionId : null,
|
|
43
|
+
content,
|
|
44
|
+
inputs,
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
export default class CanvasDocumentStatus extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
nodeId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
3
|
+
import { commandApi, projectFlag } from '../../../command-helpers.js';
|
|
4
|
+
export default class CanvasDocumentStatus extends BaseCommand {
|
|
5
|
+
static description = '检查画布 JSON 文档及其上游选版是否仍有效';
|
|
6
|
+
static args = { nodeId: Args.string({ required: true }) };
|
|
7
|
+
static flags = { ...BaseCommand.baseFlags, project: projectFlag };
|
|
8
|
+
async run() {
|
|
9
|
+
const { args, flags } = await this.parse(CanvasDocumentStatus);
|
|
10
|
+
const { api } = await commandApi(flags);
|
|
11
|
+
this.print(await api.canvasDocumentStatus(flags.project, args.nodeId));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class CanvasDocuments extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
import { commandApi, projectFlag } from '../../command-helpers.js';
|
|
3
|
+
export default class CanvasDocuments extends BaseCommand {
|
|
4
|
+
static description = '聚合读取 Hypit 文档、版本依赖和当前阻塞原因';
|
|
5
|
+
static flags = { ...BaseCommand.baseFlags, project: projectFlag };
|
|
6
|
+
async run() {
|
|
7
|
+
const { flags } = await this.parse(CanvasDocuments);
|
|
8
|
+
const { api } = await commandApi(flags);
|
|
9
|
+
this.print(await api.canvasDocuments(flags.project));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
export default class CanvasWorkflowStatus extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
locale: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
episode: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
import { commandApi, projectFlag } from '../../../command-helpers.js';
|
|
3
|
+
export default class CanvasWorkflowStatus extends BaseCommand {
|
|
4
|
+
static description = '读取 Hypit 自由画布当前阶段、所需模块和阻塞原因';
|
|
5
|
+
static flags = { ...BaseCommand.baseFlags, project: projectFlag };
|
|
6
|
+
async run() {
|
|
7
|
+
const { flags } = await this.parse(CanvasWorkflowStatus);
|
|
8
|
+
const { api } = await commandApi(flags);
|
|
9
|
+
const response = await api.canvasDocuments(flags.project);
|
|
10
|
+
if (!response || typeof response !== 'object' || !('workflow' in response)) {
|
|
11
|
+
throw new Error('服务端未返回 Hypit 工作流状态');
|
|
12
|
+
}
|
|
13
|
+
this.print(response.workflow);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -103,6 +103,22 @@ export declare class VvicatApi {
|
|
|
103
103
|
}): Promise<JsonObject>;
|
|
104
104
|
listNodes(projectId: string): Promise<CanvasNode[]>;
|
|
105
105
|
node(projectId: string, nodeId: string): Promise<CanvasNode>;
|
|
106
|
+
saveCanvasDocument(projectId: string, nodeId: string, input: {
|
|
107
|
+
name: string;
|
|
108
|
+
schemaKey: string;
|
|
109
|
+
documentKey: string;
|
|
110
|
+
expectedVersionId: string | null;
|
|
111
|
+
content: JsonObject;
|
|
112
|
+
inputs?: Array<{
|
|
113
|
+
nodeId: string;
|
|
114
|
+
versionId: string;
|
|
115
|
+
}>;
|
|
116
|
+
}): Promise<{
|
|
117
|
+
assetId: string;
|
|
118
|
+
versionId: string;
|
|
119
|
+
}>;
|
|
120
|
+
canvasDocumentStatus(projectId: string, nodeId: string): Promise<JsonObject>;
|
|
121
|
+
canvasDocuments(projectId: string): Promise<JsonObject>;
|
|
106
122
|
listEdges(projectId: string): Promise<JsonObject[]>;
|
|
107
123
|
inspectCanvas(projectId: string, options: CanvasInspectOptions): Promise<JsonObject>;
|
|
108
124
|
continuityAnalysis(projectId: string): Promise<JsonObject>;
|
|
@@ -157,6 +157,17 @@ export class VvicatApi {
|
|
|
157
157
|
throw new Error(`节点不存在:${nodeId}`);
|
|
158
158
|
return node;
|
|
159
159
|
}
|
|
160
|
+
saveCanvasDocument(projectId, nodeId, input) {
|
|
161
|
+
return this.client.request(`/api/projects/${projectId}/canvas/nodes/${nodeId}/document`, {
|
|
162
|
+
method: 'POST', body: input,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
canvasDocumentStatus(projectId, nodeId) {
|
|
166
|
+
return this.client.request(`/api/projects/${projectId}/canvas/nodes/${nodeId}/document`);
|
|
167
|
+
}
|
|
168
|
+
canvasDocuments(projectId) {
|
|
169
|
+
return this.client.request(`/api/projects/${projectId}/canvas/documents`);
|
|
170
|
+
}
|
|
160
171
|
async listEdges(projectId) {
|
|
161
172
|
return (await this.canvas(projectId)).edges;
|
|
162
173
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: using-vvicat-ai-short-studio-cli
|
|
3
|
-
description: Use when an agent needs to inspect or operate VVICAT infinite-canvas projects through the ai-short-studio CLI
|
|
3
|
+
description: Use when an agent needs to inspect or operate VVICAT infinite-canvas projects through the ai-short-studio CLI. Hypit freeform JSON documents and workflow status are the canonical production interface; legacy fixed-node commands are read-only compatibility paths for existing projects.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# 使用 VVICAT AI Short Studio CLI
|
|
@@ -33,17 +33,17 @@ description: Use when an agent needs to inspect or operate VVICAT infinite-canva
|
|
|
33
33
|
| 人物、场景、道具和资产版本 | `references/short-drama/assets/` 下对应资产文档、`references/short-drama/assets/plan-drama-assets.md` | 运行资产分析后再生成;缺证据、错版、stale 或身份歧义时标记 blocked,不用相似资产替代 |
|
|
34
34
|
| 导演手册、摄影、表演、分镜和镜头变体 | `references/short-drama/creation/write-drama-director-book.md`、`references/short-drama/storyboard/build-drama-storyboard.md`、`references/short-drama/director-composition.md` | `drama-director-book → storyboard-breakdown → storyboard-image/storyboard-board-image`;读取构图受控词表,证据不足时降级构图,不补陈设或天气 |
|
|
35
35
|
| 逐镜制作、跨镜连续性、previous-tail | `references/short-drama/storyboard/plan-drama-production.md`、`references/short-drama/storyboard/plan-shot-continuity.md` | 先生成 `drama-production-plan`,再生成 `drama-continuity-plan`;只有前镜已审核且选版时允许 previous-tail |
|
|
36
|
-
| 视频提示词、H3、Seedance、原生音频 | `references/short-drama/generation/write-drama-video-prompts.md`、`references/short-drama/generation/seedance-community-skills.md`、`references/h3-video-delivery.md`、`references/short-drama/generation/design-drama-audio.md` | 默认由 Agent
|
|
36
|
+
| 视频提示词、H3、Seedance、原生音频 | `references/short-drama/generation/write-drama-video-prompts.md`、`references/short-drama/generation/seedance-community-skills.md`、`references/h3-video-delivery.md`、`references/short-drama/generation/design-drama-audio.md` | 默认由 Agent 生成并保存 Hypit 文档;按实时 Provider schema 选择协议并审计后提交视频 |
|
|
37
37
|
| 背景音乐、主题曲、纯音乐 | `references/short-drama/generation/design-drama-audio.md`、`references/short-drama/starrouter-provider.md` | 使用画布 `music-generate` 和实时音频模型目录;有自定义歌词时不得同时开启纯音乐;生成后试听并回读 AUDIO 资产版本 |
|
|
38
38
|
| 去字幕、参考视频复刻、深度视频 | `references/hypit/playbooks/formats/reference-recreation-canvas.md`、`references/short-drama/generation/transform-drama-media.md` | 使用 `recreation-subtitle-remove → recreation-depth-preprocess/depth-video → video-generate`;不得把参考板或字幕带入成片 |
|
|
39
39
|
| 参考对白转写、剪辑、字幕和多图模板 | `references/hypit/SKILL.md`、`references/hypit/environment/local-tools.md`、`references/short-drama/editing-workflow.md` | WAV 音频使用 `recreation-transcribe`(默认 StarRouter `whisper-1`);剪辑和字幕进入现有编辑器/Remotion 时间线;多图合板使用 `grid` 或分镜宫格节点 |
|
|
40
40
|
| 逐镜审计、剪辑、字幕、声音平衡、成片交付 | `references/short-drama/review/review-drama-shots.md`、`references/short-drama/editing/edit-drama-timeline.md`、`references/short-drama/editing/edit-deliver-drama.md` | `drama-shot-review → drama-edit-plan → drama-delivery-review`;未通过的镜头、无 provenance 或未完整观看不得交付 |
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
自由画布短剧制作不要求预先搭建固定功能节点:Agent 先用 `canvas documents` 恢复分集,再按 `module-map.json` 选择模块;结果保存为 `hypit.<module>.v1` 版本并以 `--input` 记录来源,文档选版和审核证据作为阶段依据。
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
新项目禁止搭建上述固定功能节点链。每个阶段都必须由 Agent 在无限画布创建或更新 `text-resource` Hypit 文档,并通过 `canvas document save` 追加不可变版本;媒体节点只消费已审核的 Hypit 文档和选定媒体版本。
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
旧版固定节点命令仍保留用于读取和恢复历史项目,但不得作为新项目入口,也不得与 Hypit 文档并行写入同一阶段。发现旧节点链时先用 `canvas documents` 和 `canvas workflow status` 建立 Hypit 文档快照,再迁移受影响阶段;迁移完成后停止继续创建旧节点。
|
|
47
47
|
## 核心原则
|
|
48
48
|
|
|
49
49
|
生产环境认证优先使用 MemHub;CLI 通过浏览器 PKCE 登录或个人 API Key 访问,只有本地明确关闭 MemHub 时才使用 Supabase 兼容登录。
|
|
@@ -54,10 +54,10 @@ description: Use when an agent needs to inspect or operate VVICAT infinite-canva
|
|
|
54
54
|
|
|
55
55
|
## 主流程
|
|
56
56
|
|
|
57
|
-
1.
|
|
57
|
+
1. **预检与恢复**:运行 `preflight --json`;更新后重跑。再读取 `config get`、目标项目、`canvas documents` 和 `canvas workflow status`。只有历史项目需要新增媒体节点时才读取实时 `canvas node types`。`skill status --target codex` 非 current 时先询问再更新,禁止强制覆盖用户修改。
|
|
58
58
|
2. **项目语言门禁**:新建项目前必须从用户确认交付语言,并用 `project create --language <BCP47>` 写入;界面 `--locale` 不能代替内容语言。创建后回读 `project get` 与 `canvas settings get`,确认两者语言一致且不可修改。项目语言约束剧本、分镜、台词、配音、画面文字和字幕;验收须区分剧情内容与制作信息:项目语言允许正常外语穿插和规范英文摄影术语,不按字符种类判死;道具文字和剧情内界面遵循来源原文。存在实际语言合同冲突时停止并说明。
|
|
59
59
|
3. **项目配置门禁**:读取 `canvas settings get`,展示 `currentValue`、`effectiveValue`、`source`、建议值和实时 options。确认 `aspectRatio`、`artStyle`、`visualBible`、`storyboardImageType`、`outputLanguage`、`analysisModel`、`imageModel`、`imageResolution`、`imageQuality` 和 `videoResolution`,以及 `editModel`、`videoModel`、`videoPromptType`、`audioModel`、`musicModel`;`$ART_STYLE_ID` 必须解析实时 `option.value`。标准创作门禁使用 `--file settings.json` 原子写入并携带 `expectedVersion`,回读一致前不得创建或运行付费节点。节点确需不同参数时才按实时能力覆盖。
|
|
60
|
-
4.
|
|
60
|
+
4. **Hypit 文档和目标集**:先读取 `canvas workflow status`,按当前阶段和条件模块生成 JSON;使用 `canvas document save` 写入 `hypit.<module>.v1`,用 `--input` 固化上游选版。审核必须另存为 `hypit.review.v1` 并绑定被审核版本。无需先调用固定节点或生成模型,不要创建没有版本的文档空壳。已有 Hypit 文档直接复用;历史 `screenplay-resource` 或结构化资源先迁移成 Hypit 文档,再继续流程。需要创作微短剧时,按需读取 `references/short-drama/`,再读取 `references/humanizer/` 去除 AI 味;不得改动已经确认的剧情事实,润色后回到短剧 reference 复核。确认目标集数后,只生产该集实际需要的资产。
|
|
61
61
|
5. **资产门禁**:先完成人物、场景、道具及其派生版本,展示真实预览并确认 selected version。执行资产—剧情匹配审计;缺失、多余、错版、stale、错边未清零时拆镜前门禁失败。
|
|
62
62
|
6. **拆镜和滚动生成**:先执行 [拆镜模式与交付范围](references/assets-and-storyboard.md#拆镜模式与交付范围) 和 [语言匹配门禁](references/assets-and-storyboard.md#拆镜语言匹配门禁)。短剧新建默认专业拆镜,显式设置 `sourceFormat` 与 `storyboardPipelineVersion: 2`,默认只复用每镜时间宫格和镜头故事版,不自动新增首帧节点;已有首帧可保留,额外单图参考仅在用户需要时添加;不得因片长短、失败、仅生成分镜图或 `count: 1` 改走普通模式或覆盖 `imageLayout: single`。逐镜核对来源、时长、语言、布局与真实双板;质量问题先修复,用户明确允许带风险测试时可依恢复链路记录风险继续生成,保留未通过结论。用户的停止阶段优先于 [滚动异步调度](references/async-pipeline.md):仅分镜图任务在双板验收后停止,不运行视频提示词和视频。允许视频时,已就绪镜头滚动提交,单镜失败不阻塞其他镜头。
|
|
63
63
|
7. **视频规划**:视频生成前依次完成素材连线、镜头逻辑和上下镜连续性审计。读取实时 `durationOptions`;只有选项恰为 5、10、15 秒时才按这三档向上取整。RunningHub MiniMax H3 支持纯文本和 0–9 张参考图、0–2 个参考视频、0–2 个参考音频,5–15 秒逐秒可选,1–4 秒归一为 5 秒;参考视频只传画面。画幅为 16:9 / 9:16,分辨率为 480p / 720p / 1K / 2K。
|
|
@@ -10,6 +10,21 @@ ai-short-studio canvas node types --json
|
|
|
10
10
|
|
|
11
11
|
常见审计优先通过 `inspect` 的 `--kind`、`--status`、`--search`、`--operation`、`--resource-type`、`--producer-node` 过滤。同阶段多个图变更用一次 `apply`;409 后重读并合并。
|
|
12
12
|
|
|
13
|
+
## Hypit 自由文档(新项目唯一入口)
|
|
14
|
+
|
|
15
|
+
新项目不得通过固定功能节点编排短剧。先运行:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
ai-short-studio canvas documents --project <projectId> --json
|
|
19
|
+
ai-short-studio canvas workflow status --project <projectId> --json
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
按返回的 `currentStage`、`checks` 和条件模块,在 `text-resource` 节点用 `canvas document save` 写入 `hypit.<module>.v1`。每个版本必须使用 `--input` 绑定上游选版;审核单独保存为 `hypit.review.v1`。保存后重新运行 `canvas documents`,直到阶段状态和审核证据一致。
|
|
23
|
+
|
|
24
|
+
## 历史节点兼容
|
|
25
|
+
|
|
26
|
+
下面的节点命令仅用于读取、审计和迁移历史项目,不得作为新项目的流程入口,也不得与 Hypit 文档并行写入同一阶段。
|
|
27
|
+
|
|
13
28
|
## 节点
|
|
14
29
|
|
|
15
30
|
```bash
|
|
@@ -28,6 +43,18 @@ ai-short-studio canvas node delete <nodeId> --project <projectId> --yes --json
|
|
|
28
43
|
|
|
29
44
|
`--asset-id` 仅用于 `image`、`video`、`audio` 媒体节点,把已有资产的 selected 版本绑定为节点输出;CLI 会先按实时节点目录拒绝非媒体节点,资产类型仍由服务端校验。上传资产后先用 `canvas asset list` 或上传响应取得资产 ID,再创建媒体节点并连线。
|
|
30
45
|
|
|
46
|
+
Hypit JSON 产物保存到 `text-resource` 节点;每次保存追加版本,`--input` 记录上游节点当前资产选版。续写前先读状态,`ready: false` 时根据 `staleInputs` 重做受影响产物,不能沿用旧审核。
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
ai-short-studio canvas document get <scriptNodeId> --project <projectId> --json
|
|
50
|
+
ai-short-studio canvas document save <scriptNodeId> --project <projectId> --name 剧本 --schema-key hypit.script.v1 --document-key ep-001.script --input <briefNodeId> --file script.json --json
|
|
51
|
+
ai-short-studio canvas document status <scriptNodeId> --project <projectId> --json
|
|
52
|
+
ai-short-studio canvas documents --project <projectId> --json
|
|
53
|
+
ai-short-studio canvas workflow status --project <projectId> --json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
审核报告也保存为独立 `text-resource` 文档:`--schema-key hypit.review.v1`、`--input <被审核节点ID>`,JSON 至少包含 `decision: "approved" | "rejected"` 与 `issues: [{"severity":"P0|P1|P2","description":"..."}]`。P0/P1 未清零不能标记通过;后续产物把审核节点也作为 `--input`,审核拒绝或被审核版本变化时,`document status` 会返回失效。审核应基于真实内容和证据,不能为了通过门禁填写空问题清单。
|
|
57
|
+
|
|
31
58
|
音乐节点使用 `music-generate`,输出 AUDIO。`prompt` 必填,可配置 `model`、`title`、`tags`、`lyrics` 和 `makeInstrumental`;`lyrics` 与 `makeInstrumental: true` 不能同时提交。`--config` 读取 JSON 文件,不接受内联 JSON 字符串。
|
|
32
59
|
|
|
33
60
|
```json
|
|
@@ -5,14 +5,12 @@
|
|
|
5
5
|
```bash
|
|
6
6
|
ai-short-studio preflight --json
|
|
7
7
|
ai-short-studio skill status --target codex --json
|
|
8
|
-
ai-short-studio auth
|
|
9
|
-
ai-short-studio auth login --google
|
|
10
|
-
ai-short-studio auth login --email user@example.com --password-stdin
|
|
8
|
+
ai-short-studio auth login
|
|
11
9
|
ai-short-studio auth status --json
|
|
12
10
|
ai-short-studio auth logout
|
|
13
11
|
```
|
|
14
12
|
|
|
15
|
-
更新 CLI 后重跑 preflight
|
|
13
|
+
更新 CLI 后重跑 preflight。CLI 默认通过 MemHub 浏览器授权登录。
|
|
16
14
|
|
|
17
15
|
## 项目与供应商
|
|
18
16
|
|
|
@@ -6,14 +6,14 @@ description: 短剧全流程唯一入口。用于原创短剧的创建、恢复
|
|
|
6
6
|
|
|
7
7
|
# 短剧制作主 Skill
|
|
8
8
|
|
|
9
|
-
本 Skill 是插件唯一入口。专业能力保存在 `references/` 模块中;不要凭模块名自行模仿,也不要一次性读取全部 reference
|
|
9
|
+
本 Skill 是插件唯一入口。专业能力保存在 `references/` 模块中;不要凭模块名自行模仿,也不要一次性读取全部 reference。始终由无限画布的 `canvas workflow status`、Hypit 文档版本和 `references/module-map.json` 决定当前需要加载的最小模块集合。新项目不得创建固定功能节点。
|
|
10
10
|
|
|
11
11
|
## 固定控制循环
|
|
12
12
|
|
|
13
13
|
进入控制循环前先确认项目类型:有参考片需要复刻、克隆或仿拍,或现有项目的 `workflow.type=viral-recreation` 时,立即转到原生 `hypit recreate`,不执行本插件的校验、模块路由或制作命令。以下步骤只适用于原创短剧的新建、恢复、继续和修改:
|
|
14
14
|
|
|
15
|
-
1.
|
|
16
|
-
2. 新项目读取 [项目管理模块](operations/manage-drama-projects.md)
|
|
15
|
+
1. 确认 AI Short Studio 项目和分集画布。除非用户明确要求本地 Hypit 文件项目,不在本地创建第二套项目状态。
|
|
16
|
+
2. 新项目读取 [项目管理模块](operations/manage-drama-projects.md) 后初始化;AI Short Studio 项目先运行 `canvas documents` 和 `canvas workflow status`。只有用户明确要求本地 Hypit 文件项目时,才读取 `.short-drama/` 状态文件。
|
|
17
17
|
3. 运行:
|
|
18
18
|
|
|
19
19
|
```bash
|
|
@@ -22,6 +22,8 @@ description: 短剧全流程唯一入口。用于原创短剧的创建、恢复
|
|
|
22
22
|
node "${CODEX_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-.}}/scripts/module-runs.mjs" required <项目目录> <当前阶段>
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
在 AI Short Studio 画布中,以上状态由 `ai-short-studio canvas workflow status --project <projectId> --json` 提供;不要用本地 `workflow.mjs` 状态覆盖远程画布状态。
|
|
26
|
+
|
|
25
27
|
4. 对返回的每个 `module_id`,从 `references/module-map.json` 读取唯一 `path`,完整读取该 reference 后执行其输入、输出、失败关闭和验收合同。
|
|
26
28
|
5. 文本由 Codex 生成;只有图片、视频、声音和媒体变换调用 Provider。所有提示词使用 `assets/modules/<module_id>/prompts/` 中登记的模板并通过 `render-prompt.mjs` 留痕。
|
|
27
29
|
6. 每个模块完成后登记实际输入与证据:
|