@gensor/gensor-drama 0.1.0 → 0.1.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # AI炸城 Codex 插件(正式版)
2
2
 
3
- 在 Codex 对话中生成图片、视频和语音,并将结果下载到用户项目。用户在对话中提供 **API Key**,由小炸保存到本机。提交、查询、素材上传共用同一枚 Key;提交使用平台 URL,查询和素材上传按媒体类型固定分流。
3
+ 在 Codex 对话中生成图片、视频和语音,并将结果下载到用户项目。用户在对话中提供 **API Key**,由小炸保存到本机。提交、查询、素材上传共用同一枚 Key;提交使用平台 URL,素材上传统一使用图片上传域名,查询按任务类型分流。
4
4
 
5
5
  ## 接口约定与边界
6
6
 
@@ -10,7 +10,7 @@
10
10
  |---|---|---|
11
11
  | 提交 | `/api/webtask` | `TASK_API` + `taskParams: { model, basePayload }` |
12
12
 
13
- 提交、查询和素材上传使用同一枚 Key;查询和素材上传按媒体类型分流,失败不轮流尝试域名。
13
+ 提交、查询和素材上传使用同一枚 Key;素材上传使用统一域名,查询按任务类型分流,失败不轮流尝试域名。
14
14
 
15
15
  生成任务请求示例:
16
16
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gensor-agent",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "AI炸城:由小炸完成导演编排及图片、视频和语音生成。",
5
5
  "skills": "./skills/",
6
6
  "mcpServers": "./.mcp.json",
@@ -72,7 +72,7 @@ export class PlatformApi {
72
72
  if (!info.isFile() || info.size < 1 || info.size > 30 * 1024 * 1024) throw new Error('参考素材必须是非空文件且不超过 30 MiB;voice_clone 参考音频另限每段 10MB。');
73
73
  const form = new FormData();
74
74
  form.append('file', new Blob([await readFile(filePath)], { type }), path.basename(filePath));
75
- const baseUrl = QUERY_BASE_URLS[mediaType === 'image' ? 'image' : 'other'];
75
+ const baseUrl = QUERY_BASE_URLS['image'];
76
76
  const data = await this.request('/openapi/v2/media/upload/binary', { form, timeoutMs: 60000, signal, baseUrl });
77
77
  const url = data.data?.download_url;
78
78
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gensor/gensor-drama",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "AI炸城:小炸短剧短片导演与图片、视频、语音生成插件,一键安装到 Codex",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,8 +15,12 @@
15
15
  "gensor-agent/skills/",
16
16
  "gensor-agent/server/src/"
17
17
  ],
18
- "engines": { "node": ">=22" },
19
- "publishConfig": { "access": "public" },
18
+ "engines": {
19
+ "node": ">=22"
20
+ },
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
20
24
  "scripts": {
21
25
  "test": "node --test test/*.test.mjs && npm test --prefix gensor-agent/server",
22
26
  "test:installer": "node --test test/*.test.mjs",