@weadmin/overseas-tool 0.1.22 → 0.1.25

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.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /* overseas-tool | Type declarations | Generated 2026-08-13T08:45:15.871Z */
1
+ /* overseas-tool | Type declarations | Generated 2026-08-17T02:58:45.968Z */
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?: (toolName: string, input: Record<string, unknown>) => Promise<{
51
- behavior: "allow";
52
- updatedInput: Record<string, unknown>;
53
- } | {
54
- behavior: "deny";
55
- message: string;
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
  /**