@weadmin/overseas-tool 0.1.22 → 0.1.27
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/cli/main.js +1 -1
- package/dist/index.d.ts +29 -8
- package/dist/index.js +1 -1
- package/dist/runtime-host/main.js +1 -1
- package/package.json +1 -1
- package/workers/applier/applier.js +1 -1
- package/workers/applier/meta.json +2 -2
- package/workers/glossary-translator/glossary-translator.js +1 -1
- package/workers/glossary-translator/meta.json +2 -2
- package/workers/image-scanner/image-scanner.js +1 -1
- package/workers/image-scanner/meta.json +2 -2
- package/workers/image-translator/image-translator.js +1 -1
- package/workers/image-translator/meta.json +2 -2
- package/workers/planner/meta.json +2 -2
- package/workers/planner/planner.js +1 -1
- package/workers/scan-aggregator/meta.json +2 -2
- package/workers/scan-aggregator/scan-aggregator.js +1 -1
- package/workers/text-scanner/meta.json +2 -2
- package/workers/text-scanner/text-scanner.js +1 -1
- package/workers/text-translator/meta.json +2 -2
- package/workers/text-translator/text-translator.js +1 -1
- package/workers/translation-aggregator/meta.json +2 -2
- package/workers/translation-aggregator/translation-aggregator.js +1 -1
- package/workers/verifier/meta.json +2 -2
- package/workers/verifier/verifier.js +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* overseas-tool | Type declarations | Generated 2026-08-
|
|
1
|
+
/* overseas-tool | Type declarations | Generated 2026-08-17T10:04:30.081Z */
|
|
2
2
|
import { AgentDefinition } from '@tencent-ai/agent-sdk';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
@@ -38,6 +38,14 @@ export interface McpServerSpec {
|
|
|
38
38
|
url: string;
|
|
39
39
|
headers?: Record<string, string>;
|
|
40
40
|
}
|
|
41
|
+
export type ToolPolicyDecision = {
|
|
42
|
+
behavior: "allow";
|
|
43
|
+
updatedInput: Record<string, unknown>;
|
|
44
|
+
} | {
|
|
45
|
+
behavior: "deny";
|
|
46
|
+
message: string;
|
|
47
|
+
};
|
|
48
|
+
export type ToolPolicy = (toolName: string, input: Record<string, unknown>) => Promise<ToolPolicyDecision>;
|
|
41
49
|
export interface CreateSessionOptions {
|
|
42
50
|
model: string;
|
|
43
51
|
cwd: string;
|
|
@@ -47,13 +55,13 @@ export interface CreateSessionOptions {
|
|
|
47
55
|
allowedTools: string[];
|
|
48
56
|
maxTurns: number;
|
|
49
57
|
/** 拦截 AskUserQuestion 等工具,默认全部 allow */
|
|
50
|
-
canUseTool?:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
canUseTool?: ToolPolicy;
|
|
59
|
+
/**
|
|
60
|
+
* Deterministic guard that runs before Task/Agent even in
|
|
61
|
+
* bypassPermissions mode. Unlike canUseTool, this is not a permission
|
|
62
|
+
* prompt and therefore cannot be skipped by the SDK permission mode.
|
|
63
|
+
*/
|
|
64
|
+
preToolUse?: ToolPolicy;
|
|
57
65
|
/**
|
|
58
66
|
* 会话无活动超时(毫秒)。SDK 消息或后台 worker 进度任一仍在更新都会续期;
|
|
59
67
|
* 只有超过该时长完全没有进展才中断,避免超大翻译被总墙钟时长误杀。
|
|
@@ -160,6 +168,15 @@ declare const i18nConfigSchema: z.ZodObject<{
|
|
|
160
168
|
z.ZodLiteral<3>,
|
|
161
169
|
z.ZodLiteral<4>
|
|
162
170
|
]>, "many">>;
|
|
171
|
+
/**
|
|
172
|
+
* 当前被人工确认锁住的阶段。用户提交调整意见后保持不变,
|
|
173
|
+
* 只有再次明确确认才由 CLI 清除,防止编排器和 Panel 抢跑到下一阶段。
|
|
174
|
+
*/
|
|
175
|
+
pendingApprovalStage: z.ZodOptional<z.ZodUnion<[
|
|
176
|
+
z.ZodLiteral<2>,
|
|
177
|
+
z.ZodLiteral<3>,
|
|
178
|
+
z.ZodLiteral<4>
|
|
179
|
+
]>>;
|
|
163
180
|
/** 会话 traceId,用于链路追踪。续跑模式下沿用上一轮的 traceId。 */
|
|
164
181
|
traceId: z.ZodOptional<z.ZodString>;
|
|
165
182
|
/** 翻译阶段同时处理的目标语言数;缺省时使用 worker 默认值。 */
|
|
@@ -187,6 +204,7 @@ declare const i18nConfigSchema: z.ZodObject<{
|
|
|
187
204
|
approvalMode: "auto" | "manual";
|
|
188
205
|
traceId?: string | undefined;
|
|
189
206
|
confirmedStages?: (2 | 3 | 4)[] | undefined;
|
|
207
|
+
pendingApprovalStage?: 2 | 3 | 4 | undefined;
|
|
190
208
|
translationLangConcurrency?: number | undefined;
|
|
191
209
|
translationConcurrency?: number | undefined;
|
|
192
210
|
enablePoisonDdmin?: boolean | undefined;
|
|
@@ -204,6 +222,7 @@ declare const i18nConfigSchema: z.ZodObject<{
|
|
|
204
222
|
runMode?: "full" | "incremental" | "resume" | undefined;
|
|
205
223
|
approvalMode?: "auto" | "manual" | undefined;
|
|
206
224
|
confirmedStages?: (2 | 3 | 4)[] | undefined;
|
|
225
|
+
pendingApprovalStage?: 2 | 3 | 4 | undefined;
|
|
207
226
|
translationLangConcurrency?: number | undefined;
|
|
208
227
|
translationConcurrency?: number | undefined;
|
|
209
228
|
enablePoisonDdmin?: boolean | undefined;
|
|
@@ -993,6 +1012,8 @@ export interface InspectOptions {
|
|
|
993
1012
|
runId?: string;
|
|
994
1013
|
status?: PipelineRunStatus;
|
|
995
1014
|
error?: string;
|
|
1015
|
+
/** Runtime host 内存中的确认锁,优先于编排器可能短暂误写的配置。 */
|
|
1016
|
+
approvalStage?: 2 | 3 | 4;
|
|
996
1017
|
}
|
|
997
1018
|
export declare function inspectPipelineSnapshot(projectPath: string, opts?: InspectOptions): Promise<PipelineSnapshot>;
|
|
998
1019
|
/**
|