@pptalker/agent 1.0.4 → 1.0.5
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/index.js +2 -2
- package/dist/utils/errors.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -50,11 +50,11 @@ const AccountInput = z.object({}).strict();
|
|
|
50
50
|
|
|
51
51
|
const TOOLS = [
|
|
52
52
|
{ name: 'pptalker_render', schema: RenderInput, handler: handleRender,
|
|
53
|
-
description: '
|
|
53
|
+
description: '新演示稿:上传并同步解析,通常直接返回 needs_notes 或 needs_confirmation,带 pages / canonicalfile / native_notes / preview_urls。逐页展示讲稿并取得用户明确确认后,用同一 request_id + notes + notes_confirmed=true 再提交渲染。大文件解析可能耗时 30–60 秒。恢复前先查状态;unknown / 执行中 / done 都不重复提交。不接受旧 .ppt。' },
|
|
54
54
|
{ name: 'pptalker_status', schema: StatusInput, handler: handleStatus,
|
|
55
55
|
description: '按 request_id 做纯短 GET,默认 wait=false。返回 uploaded(仅 slot assigned)/preparing/needs_notes/needs_confirmation/queued/rendering/done/failed/unknown。wait=true 仅客户端轮询 10–45 秒,支持取消。未知先查状态,失败只按明确 action 恢复;需要讲稿时允许确认后用同一 id 调 render,完成任务不重渲染。' },
|
|
56
56
|
{ name: 'pptalker_account', schema: AccountInput, handler: handleAccount,
|
|
57
|
-
description: '
|
|
57
|
+
description: '读取当前账号额度、可用音色与限制,同时返回 cloned_voices(克隆音色,需 Max 套餐)与 last_tasks 本地恢复日志(最多 50 条,含 id、文件名、阶段、是否已提交,不含密钥或 URL)。API 失败时仍返回可读取的本地记录;可用于找回被 SDK 取消丢弃的结果。日志不是服务端事实,恢复前必须查 status。' },
|
|
58
58
|
];
|
|
59
59
|
|
|
60
60
|
export function createAgentServer(cfg, client = new AgentClient(cfg)) {
|
package/dist/utils/errors.js
CHANGED
|
@@ -66,7 +66,7 @@ export function failure(err, context = {}) {
|
|
|
66
66
|
.filter(field => context[field] !== undefined).map(field => [field, context[field]]));
|
|
67
67
|
return {
|
|
68
68
|
...recovery, ...(context.request_id ? { file_name: context.file_name ?? null } : {}),
|
|
69
|
-
is_public:
|
|
69
|
+
is_public: context.is_public === true, private_only: context.is_public !== true,
|
|
70
70
|
stage, ok: false, status: uncertain ? 'unknown' : (context.status || 'unknown'),
|
|
71
71
|
error: kind, message: MESSAGES[kind] || MESSAGES.HTTP,
|
|
72
72
|
retryable: !uncertain && ['RATE_LIMIT', 'SERVER', 'NETWORK', 'TIMEOUT', 'UPLOAD', 'SUBMISSIONS_CLOSED'].includes(kind),
|