@ddlqhd/agent-sdk 0.1.0 → 0.2.0

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.
Files changed (49) hide show
  1. package/README.md +4 -2
  2. package/dist/{chunk-5QMA2YBY.cjs → chunk-6X7EYQLS.cjs} +782 -114
  3. package/dist/chunk-6X7EYQLS.cjs.map +1 -0
  4. package/dist/{chunk-NDSL7NPN.js → chunk-D3UZNLZO.js} +769 -71
  5. package/dist/chunk-D3UZNLZO.js.map +1 -0
  6. package/dist/{chunk-Q3SOMX26.js → chunk-EQ5CXH44.js} +772 -111
  7. package/dist/chunk-EQ5CXH44.js.map +1 -0
  8. package/dist/chunk-LOYIGOBZ.js +54 -0
  9. package/dist/chunk-LOYIGOBZ.js.map +1 -0
  10. package/dist/{chunk-OHXW2YM6.js → chunk-MEJHTQJM.js} +289 -166
  11. package/dist/chunk-MEJHTQJM.js.map +1 -0
  12. package/dist/chunk-NYZD3THB.cjs +1521 -0
  13. package/dist/chunk-NYZD3THB.cjs.map +1 -0
  14. package/dist/chunk-OZO7D77N.cjs +59 -0
  15. package/dist/chunk-OZO7D77N.cjs.map +1 -0
  16. package/dist/{chunk-JF5AJQMU.cjs → chunk-Z45DHTDX.cjs} +291 -170
  17. package/dist/chunk-Z45DHTDX.cjs.map +1 -0
  18. package/dist/cli/index.cjs +47 -39
  19. package/dist/cli/index.cjs.map +1 -1
  20. package/dist/cli/index.js +22 -14
  21. package/dist/cli/index.js.map +1 -1
  22. package/dist/{index-DPsZ1zat.d.ts → index-Cw3SfEAB.d.ts} +20 -34
  23. package/dist/{index-RTPmFjMp.d.cts → index-D2Qntkn_.d.cts} +20 -34
  24. package/dist/index.cjs +125 -89
  25. package/dist/index.d.cts +62 -22
  26. package/dist/index.d.ts +62 -22
  27. package/dist/index.js +4 -4
  28. package/dist/models/index.cjs +19 -15
  29. package/dist/models/index.d.cts +55 -6
  30. package/dist/models/index.d.ts +55 -6
  31. package/dist/models/index.js +2 -2
  32. package/dist/tools/index.cjs +53 -61
  33. package/dist/tools/index.d.cts +3 -3
  34. package/dist/tools/index.d.ts +3 -3
  35. package/dist/tools/index.js +2 -2
  36. package/dist/{types-C0aX_Qdp.d.cts → types-CWPAYWzr.d.cts} +307 -61
  37. package/dist/{types-C0aX_Qdp.d.ts → types-CWPAYWzr.d.ts} +307 -61
  38. package/package.json +25 -14
  39. package/dist/chunk-5QMA2YBY.cjs.map +0 -1
  40. package/dist/chunk-CNSGZVRN.cjs +0 -152
  41. package/dist/chunk-CNSGZVRN.cjs.map +0 -1
  42. package/dist/chunk-JF5AJQMU.cjs.map +0 -1
  43. package/dist/chunk-NDSL7NPN.js.map +0 -1
  44. package/dist/chunk-OHXW2YM6.js.map +0 -1
  45. package/dist/chunk-Q3SOMX26.js.map +0 -1
  46. package/dist/chunk-WH3APNQ5.js +0 -147
  47. package/dist/chunk-WH3APNQ5.js.map +0 -1
  48. package/dist/chunk-X35MHWXE.cjs +0 -817
  49. package/dist/chunk-X35MHWXE.cjs.map +0 -1
@@ -1,10 +1,17 @@
1
+ import { a4 as ModelCapabilities, h as ModelAdapter, a5 as ModelParams, l as StreamChunk, E as CompletionResult, k as TokenUsage, d as ToolDefinition, ax as ToolSchema, F as ContentPart } from '../types-CWPAYWzr.cjs';
1
2
  import { z } from 'zod';
2
- import { O as ModelAdapter, Q as ModelCapabilities, R as ModelParams, j as StreamChunk, t as CompletionResult, i as TokenUsage, c as ToolDefinition, ac as ToolSchema, u as ContentPart } from '../types-C0aX_Qdp.cjs';
3
3
 
4
4
  /**
5
- * Zod Schema 转换为 JSON Schema
5
+ * 各提供商适配器在省略 `config.capabilities` 时共用的默认能力(上下文 200K、最大输出 32K)。
6
6
  */
7
- declare function zodToJsonSchema(schema: z.ZodSchema): unknown;
7
+ declare const DEFAULT_ADAPTER_CAPABILITIES: ModelCapabilities;
8
+
9
+ /** Options passed through to Zod’s JSON Schema conversion (target, io, etc.). */
10
+ type ZodToJsonSchemaOptions = NonNullable<Parameters<typeof z.toJSONSchema>[1]>;
11
+ /**
12
+ * 将 Zod Schema 转换为 JSON Schema(使用 Zod 4 内置转换,避免跨副本 instanceof 失效)
13
+ */
14
+ declare function zodToJsonSchema(schema: z.ZodType, options?: ZodToJsonSchemaOptions): unknown;
8
15
  /**
9
16
  * 将工具定义转换为模型工具 Schema
10
17
  */
@@ -60,6 +67,26 @@ declare class OpenAIAdapter extends BaseModelAdapter {
60
67
  */
61
68
  declare function createOpenAI(config?: OpenAIConfig): OpenAIAdapter;
62
69
 
70
+ /**
71
+ * Messages API 顶层 `metadata`:静态字典,或根据每次请求的 {@link ModelParams} 生成字典。
72
+ */
73
+ type AnthropicRequestMetadata = Record<string, unknown> | ((params: ModelParams) => Record<string, unknown>);
74
+ /**
75
+ * 初次 Messages API `POST` 的重试选项(不含 SSE 已建立后 `read` 中途断线)。
76
+ * 未传 `fetchRetry` 时默认共 **2** 次尝试(即 **1** 次自动重试),退避基数 200ms、单次等待上限 2000ms。
77
+ */
78
+ interface AnthropicFetchRetryOptions {
79
+ /**
80
+ * 总尝试次数(含第一次)。省略 `fetchRetry` 时默认为 **2**(失败可再试 1 次)。
81
+ * 设为 `1` 可关闭重试。
82
+ * @example `4` → 首次失败后最多再试 3 次。
83
+ */
84
+ maxAttempts?: number;
85
+ /** 指数退避的基准间隔(毫秒),默认 200。 */
86
+ baseDelayMs?: number;
87
+ /** 单次等待上限(毫秒),默认 2000;亦为 `Retry-After` 解析结果的上限。 */
88
+ maxDelayMs?: number;
89
+ }
63
90
  /**
64
91
  * Anthropic 配置
65
92
  */
@@ -70,6 +97,16 @@ interface AnthropicConfig {
70
97
  version?: string;
71
98
  /** 自定义模型能力 (覆盖默认值) */
72
99
  capabilities?: ModelCapabilities;
100
+ /**
101
+ * 与 {@link ModelParams.sessionId} 合并进 Messages API 顶层 `metadata`(`sessionId` → `user_id`)。
102
+ * 配置中的键可覆盖 `user_id`。
103
+ */
104
+ metadata?: AnthropicRequestMetadata;
105
+ /**
106
+ * 仅针对**建立连接前**的初次 `POST` 的重试策略,见 {@link AnthropicFetchRetryOptions}。
107
+ * 省略时默认共 2 次尝试(**1** 次自动重试);传入 `fetchRetry: { maxAttempts: 1 }` 可改为只请求 1 次、不重试。
108
+ */
109
+ fetchRetry?: AnthropicFetchRetryOptions;
73
110
  }
74
111
  /**
75
112
  * Anthropic 模型适配器
@@ -80,12 +117,23 @@ declare class AnthropicAdapter extends BaseModelAdapter {
80
117
  private baseUrl;
81
118
  private model;
82
119
  private version;
120
+ private requestMetadata?;
121
+ private fetchRetry;
83
122
  constructor(config?: AnthropicConfig);
84
123
  stream(params: ModelParams): AsyncIterable<StreamChunk>;
85
124
  complete(params: ModelParams): Promise<CompletionResult>;
86
125
  private buildRequestBody;
126
+ /**
127
+ * Build Messages API `metadata`: `sessionId` → `user_id`, merged with resolved adapter `metadata` (dict or fn).
128
+ * Config `metadata` keys override `user_id` when duplicated.
129
+ */
130
+ private mergeAnthropicMetadata;
131
+ private resolveMetadataExtra;
87
132
  private extractSystemMessage;
88
133
  private transformAnthropicMessages;
134
+ /**
135
+ * 发起 POST;按 `fetchRetry` 对网络错误与 429/502/503/504 重试(不含响应体已开始消费后的 SSE 读失败)。
136
+ */
89
137
  private fetch;
90
138
  private safeParseJSON;
91
139
  }
@@ -158,8 +206,9 @@ interface CreateModelConfig {
158
206
  think?: OllamaThinkOption;
159
207
  }
160
208
  /**
161
- * 创建模型适配器工厂函数
209
+ * 创建模型适配器。
210
+ * 若传入 `agentEnv`,先与当前进程环境合并(`mergeProcessEnv`),再解析各提供商的默认密钥/URL;省略时等价于仅使用 `process.env` 快照。
162
211
  */
163
- declare function createModel(config: CreateModelConfig): ModelAdapter;
212
+ declare function createModel(modelConfig: CreateModelConfig, agentEnv?: Record<string, string>): ModelAdapter;
164
213
 
165
- export { AnthropicAdapter, type AnthropicConfig, BaseModelAdapter, type CreateModelConfig, type ModelProvider, OllamaAdapter, type OllamaConfig, type OllamaThinkOption, OpenAIAdapter, type OpenAIConfig, createAnthropic, createModel, createOllama, createOpenAI, mergeTokenUsage, ollamaMessageContentToApiString, ollamaStreamChunksFromChatData, toolsToModelSchema, zodToJsonSchema };
214
+ export { AnthropicAdapter, type AnthropicConfig, type AnthropicFetchRetryOptions, type AnthropicRequestMetadata, BaseModelAdapter, type CreateModelConfig, DEFAULT_ADAPTER_CAPABILITIES, type ModelProvider, OllamaAdapter, type OllamaConfig, type OllamaThinkOption, OpenAIAdapter, type OpenAIConfig, type ZodToJsonSchemaOptions, createAnthropic, createModel, createOllama, createOpenAI, mergeTokenUsage, ollamaMessageContentToApiString, ollamaStreamChunksFromChatData, toolsToModelSchema, zodToJsonSchema };
@@ -1,10 +1,17 @@
1
+ import { a4 as ModelCapabilities, h as ModelAdapter, a5 as ModelParams, l as StreamChunk, E as CompletionResult, k as TokenUsage, d as ToolDefinition, ax as ToolSchema, F as ContentPart } from '../types-CWPAYWzr.js';
1
2
  import { z } from 'zod';
2
- import { O as ModelAdapter, Q as ModelCapabilities, R as ModelParams, j as StreamChunk, t as CompletionResult, i as TokenUsage, c as ToolDefinition, ac as ToolSchema, u as ContentPart } from '../types-C0aX_Qdp.js';
3
3
 
4
4
  /**
5
- * Zod Schema 转换为 JSON Schema
5
+ * 各提供商适配器在省略 `config.capabilities` 时共用的默认能力(上下文 200K、最大输出 32K)。
6
6
  */
7
- declare function zodToJsonSchema(schema: z.ZodSchema): unknown;
7
+ declare const DEFAULT_ADAPTER_CAPABILITIES: ModelCapabilities;
8
+
9
+ /** Options passed through to Zod’s JSON Schema conversion (target, io, etc.). */
10
+ type ZodToJsonSchemaOptions = NonNullable<Parameters<typeof z.toJSONSchema>[1]>;
11
+ /**
12
+ * 将 Zod Schema 转换为 JSON Schema(使用 Zod 4 内置转换,避免跨副本 instanceof 失效)
13
+ */
14
+ declare function zodToJsonSchema(schema: z.ZodType, options?: ZodToJsonSchemaOptions): unknown;
8
15
  /**
9
16
  * 将工具定义转换为模型工具 Schema
10
17
  */
@@ -60,6 +67,26 @@ declare class OpenAIAdapter extends BaseModelAdapter {
60
67
  */
61
68
  declare function createOpenAI(config?: OpenAIConfig): OpenAIAdapter;
62
69
 
70
+ /**
71
+ * Messages API 顶层 `metadata`:静态字典,或根据每次请求的 {@link ModelParams} 生成字典。
72
+ */
73
+ type AnthropicRequestMetadata = Record<string, unknown> | ((params: ModelParams) => Record<string, unknown>);
74
+ /**
75
+ * 初次 Messages API `POST` 的重试选项(不含 SSE 已建立后 `read` 中途断线)。
76
+ * 未传 `fetchRetry` 时默认共 **2** 次尝试(即 **1** 次自动重试),退避基数 200ms、单次等待上限 2000ms。
77
+ */
78
+ interface AnthropicFetchRetryOptions {
79
+ /**
80
+ * 总尝试次数(含第一次)。省略 `fetchRetry` 时默认为 **2**(失败可再试 1 次)。
81
+ * 设为 `1` 可关闭重试。
82
+ * @example `4` → 首次失败后最多再试 3 次。
83
+ */
84
+ maxAttempts?: number;
85
+ /** 指数退避的基准间隔(毫秒),默认 200。 */
86
+ baseDelayMs?: number;
87
+ /** 单次等待上限(毫秒),默认 2000;亦为 `Retry-After` 解析结果的上限。 */
88
+ maxDelayMs?: number;
89
+ }
63
90
  /**
64
91
  * Anthropic 配置
65
92
  */
@@ -70,6 +97,16 @@ interface AnthropicConfig {
70
97
  version?: string;
71
98
  /** 自定义模型能力 (覆盖默认值) */
72
99
  capabilities?: ModelCapabilities;
100
+ /**
101
+ * 与 {@link ModelParams.sessionId} 合并进 Messages API 顶层 `metadata`(`sessionId` → `user_id`)。
102
+ * 配置中的键可覆盖 `user_id`。
103
+ */
104
+ metadata?: AnthropicRequestMetadata;
105
+ /**
106
+ * 仅针对**建立连接前**的初次 `POST` 的重试策略,见 {@link AnthropicFetchRetryOptions}。
107
+ * 省略时默认共 2 次尝试(**1** 次自动重试);传入 `fetchRetry: { maxAttempts: 1 }` 可改为只请求 1 次、不重试。
108
+ */
109
+ fetchRetry?: AnthropicFetchRetryOptions;
73
110
  }
74
111
  /**
75
112
  * Anthropic 模型适配器
@@ -80,12 +117,23 @@ declare class AnthropicAdapter extends BaseModelAdapter {
80
117
  private baseUrl;
81
118
  private model;
82
119
  private version;
120
+ private requestMetadata?;
121
+ private fetchRetry;
83
122
  constructor(config?: AnthropicConfig);
84
123
  stream(params: ModelParams): AsyncIterable<StreamChunk>;
85
124
  complete(params: ModelParams): Promise<CompletionResult>;
86
125
  private buildRequestBody;
126
+ /**
127
+ * Build Messages API `metadata`: `sessionId` → `user_id`, merged with resolved adapter `metadata` (dict or fn).
128
+ * Config `metadata` keys override `user_id` when duplicated.
129
+ */
130
+ private mergeAnthropicMetadata;
131
+ private resolveMetadataExtra;
87
132
  private extractSystemMessage;
88
133
  private transformAnthropicMessages;
134
+ /**
135
+ * 发起 POST;按 `fetchRetry` 对网络错误与 429/502/503/504 重试(不含响应体已开始消费后的 SSE 读失败)。
136
+ */
89
137
  private fetch;
90
138
  private safeParseJSON;
91
139
  }
@@ -158,8 +206,9 @@ interface CreateModelConfig {
158
206
  think?: OllamaThinkOption;
159
207
  }
160
208
  /**
161
- * 创建模型适配器工厂函数
209
+ * 创建模型适配器。
210
+ * 若传入 `agentEnv`,先与当前进程环境合并(`mergeProcessEnv`),再解析各提供商的默认密钥/URL;省略时等价于仅使用 `process.env` 快照。
162
211
  */
163
- declare function createModel(config: CreateModelConfig): ModelAdapter;
212
+ declare function createModel(modelConfig: CreateModelConfig, agentEnv?: Record<string, string>): ModelAdapter;
164
213
 
165
- export { AnthropicAdapter, type AnthropicConfig, BaseModelAdapter, type CreateModelConfig, type ModelProvider, OllamaAdapter, type OllamaConfig, type OllamaThinkOption, OpenAIAdapter, type OpenAIConfig, createAnthropic, createModel, createOllama, createOpenAI, mergeTokenUsage, ollamaMessageContentToApiString, ollamaStreamChunksFromChatData, toolsToModelSchema, zodToJsonSchema };
214
+ export { AnthropicAdapter, type AnthropicConfig, type AnthropicFetchRetryOptions, type AnthropicRequestMetadata, BaseModelAdapter, type CreateModelConfig, DEFAULT_ADAPTER_CAPABILITIES, type ModelProvider, OllamaAdapter, type OllamaConfig, type OllamaThinkOption, OpenAIAdapter, type OpenAIConfig, type ZodToJsonSchemaOptions, createAnthropic, createModel, createOllama, createOpenAI, mergeTokenUsage, ollamaMessageContentToApiString, ollamaStreamChunksFromChatData, toolsToModelSchema, zodToJsonSchema };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- export { AnthropicAdapter, OllamaAdapter, OpenAIAdapter, createAnthropic, createModel, createOllama, createOpenAI, ollamaMessageContentToApiString, ollamaStreamChunksFromChatData } from '../chunk-NDSL7NPN.js';
3
- export { BaseModelAdapter, mergeTokenUsage, toolsToModelSchema, zodToJsonSchema } from '../chunk-WH3APNQ5.js';
2
+ export { AnthropicAdapter, DEFAULT_ADAPTER_CAPABILITIES, OllamaAdapter, OpenAIAdapter, createAnthropic, createModel, createOllama, createOpenAI, ollamaMessageContentToApiString, ollamaStreamChunksFromChatData } from '../chunk-D3UZNLZO.js';
3
+ export { BaseModelAdapter, mergeTokenUsage, toolsToModelSchema, zodToJsonSchema } from '../chunk-LOYIGOBZ.js';
4
4
  //# sourceMappingURL=index.js.map
5
5
  //# sourceMappingURL=index.js.map
@@ -2,206 +2,198 @@
2
2
  'use strict';
3
3
 
4
4
  require('../chunk-5Y56A64C.cjs');
5
- var chunkJF5AJQMU_cjs = require('../chunk-JF5AJQMU.cjs');
6
- require('../chunk-CNSGZVRN.cjs');
5
+ var chunkZ45DHTDX_cjs = require('../chunk-Z45DHTDX.cjs');
6
+ require('../chunk-OZO7D77N.cjs');
7
7
 
8
8
 
9
9
 
10
10
  Object.defineProperty(exports, "DEFAULT_GREP_HEAD_LIMIT", {
11
11
  enumerable: true,
12
- get: function () { return chunkJF5AJQMU_cjs.DEFAULT_GREP_HEAD_LIMIT; }
12
+ get: function () { return chunkZ45DHTDX_cjs.DEFAULT_GREP_HEAD_LIMIT; }
13
13
  });
14
14
  Object.defineProperty(exports, "FileStorageStrategy", {
15
15
  enumerable: true,
16
- get: function () { return chunkJF5AJQMU_cjs.FileStorageStrategy; }
16
+ get: function () { return chunkZ45DHTDX_cjs.FileStorageStrategy; }
17
17
  });
18
18
  Object.defineProperty(exports, "HookManager", {
19
19
  enumerable: true,
20
- get: function () { return chunkJF5AJQMU_cjs.HookManager; }
20
+ get: function () { return chunkZ45DHTDX_cjs.HookManager; }
21
21
  });
22
22
  Object.defineProperty(exports, "MAX_LINE_LENGTH", {
23
23
  enumerable: true,
24
- get: function () { return chunkJF5AJQMU_cjs.MAX_LINE_LENGTH; }
24
+ get: function () { return chunkZ45DHTDX_cjs.MAX_LINE_LENGTH; }
25
25
  });
26
26
  Object.defineProperty(exports, "OUTPUT_CONFIG", {
27
27
  enumerable: true,
28
- get: function () { return chunkJF5AJQMU_cjs.OUTPUT_CONFIG; }
28
+ get: function () { return chunkZ45DHTDX_cjs.OUTPUT_CONFIG; }
29
29
  });
30
30
  Object.defineProperty(exports, "OutputHandler", {
31
31
  enumerable: true,
32
- get: function () { return chunkJF5AJQMU_cjs.OutputHandler; }
32
+ get: function () { return chunkZ45DHTDX_cjs.OutputHandler; }
33
33
  });
34
34
  Object.defineProperty(exports, "PaginationHintStrategy", {
35
35
  enumerable: true,
36
- get: function () { return chunkJF5AJQMU_cjs.PaginationHintStrategy; }
36
+ get: function () { return chunkZ45DHTDX_cjs.PaginationHintStrategy; }
37
37
  });
38
38
  Object.defineProperty(exports, "SmartTruncateStrategy", {
39
39
  enumerable: true,
40
- get: function () { return chunkJF5AJQMU_cjs.SmartTruncateStrategy; }
40
+ get: function () { return chunkZ45DHTDX_cjs.SmartTruncateStrategy; }
41
41
  });
42
42
  Object.defineProperty(exports, "ToolRegistry", {
43
43
  enumerable: true,
44
- get: function () { return chunkJF5AJQMU_cjs.ToolRegistry; }
44
+ get: function () { return chunkZ45DHTDX_cjs.ToolRegistry; }
45
45
  });
46
46
  Object.defineProperty(exports, "agentTool", {
47
47
  enumerable: true,
48
- get: function () { return chunkJF5AJQMU_cjs.agentTool; }
48
+ get: function () { return chunkZ45DHTDX_cjs.agentTool; }
49
49
  });
50
50
  Object.defineProperty(exports, "bashTool", {
51
51
  enumerable: true,
52
- get: function () { return chunkJF5AJQMU_cjs.bashTool; }
52
+ get: function () { return chunkZ45DHTDX_cjs.bashTool; }
53
53
  });
54
54
  Object.defineProperty(exports, "buildHookEnv", {
55
55
  enumerable: true,
56
- get: function () { return chunkJF5AJQMU_cjs.buildHookEnv; }
56
+ get: function () { return chunkZ45DHTDX_cjs.buildHookEnv; }
57
57
  });
58
58
  Object.defineProperty(exports, "createAgentTool", {
59
59
  enumerable: true,
60
- get: function () { return chunkJF5AJQMU_cjs.createAgentTool; }
60
+ get: function () { return chunkZ45DHTDX_cjs.createAgentTool; }
61
61
  });
62
62
  Object.defineProperty(exports, "createAskUserQuestionTool", {
63
63
  enumerable: true,
64
- get: function () { return chunkJF5AJQMU_cjs.createAskUserQuestionTool; }
64
+ get: function () { return chunkZ45DHTDX_cjs.createAskUserQuestionTool; }
65
65
  });
66
66
  Object.defineProperty(exports, "createFunctionHook", {
67
67
  enumerable: true,
68
- get: function () { return chunkJF5AJQMU_cjs.createFunctionHook; }
68
+ get: function () { return chunkZ45DHTDX_cjs.createFunctionHook; }
69
69
  });
70
70
  Object.defineProperty(exports, "createOutputHandler", {
71
71
  enumerable: true,
72
- get: function () { return chunkJF5AJQMU_cjs.createOutputHandler; }
72
+ get: function () { return chunkZ45DHTDX_cjs.createOutputHandler; }
73
73
  });
74
74
  Object.defineProperty(exports, "createSkillTool", {
75
75
  enumerable: true,
76
- get: function () { return chunkJF5AJQMU_cjs.createSkillTool; }
76
+ get: function () { return chunkZ45DHTDX_cjs.createSkillTool; }
77
77
  });
78
78
  Object.defineProperty(exports, "createTool", {
79
79
  enumerable: true,
80
- get: function () { return chunkJF5AJQMU_cjs.createTool; }
80
+ get: function () { return chunkZ45DHTDX_cjs.createTool; }
81
81
  });
82
82
  Object.defineProperty(exports, "editTool", {
83
83
  enumerable: true,
84
- get: function () { return chunkJF5AJQMU_cjs.editTool; }
84
+ get: function () { return chunkZ45DHTDX_cjs.editTool; }
85
85
  });
86
86
  Object.defineProperty(exports, "formatAnswerSummary", {
87
87
  enumerable: true,
88
- get: function () { return chunkJF5AJQMU_cjs.formatAnswerSummary; }
88
+ get: function () { return chunkZ45DHTDX_cjs.formatAnswerSummary; }
89
89
  });
90
90
  Object.defineProperty(exports, "formatAskUserQuestionPrompt", {
91
91
  enumerable: true,
92
- get: function () { return chunkJF5AJQMU_cjs.formatAskUserQuestionPrompt; }
92
+ get: function () { return chunkZ45DHTDX_cjs.formatAskUserQuestionPrompt; }
93
93
  });
94
94
  Object.defineProperty(exports, "getAllBuiltinTools", {
95
95
  enumerable: true,
96
- get: function () { return chunkJF5AJQMU_cjs.getAllBuiltinTools; }
96
+ get: function () { return chunkZ45DHTDX_cjs.getAllBuiltinTools; }
97
97
  });
98
98
  Object.defineProperty(exports, "getFileSystemTools", {
99
99
  enumerable: true,
100
- get: function () { return chunkJF5AJQMU_cjs.getFileSystemTools; }
100
+ get: function () { return chunkZ45DHTDX_cjs.getFileSystemTools; }
101
101
  });
102
102
  Object.defineProperty(exports, "getGlobalRegistry", {
103
103
  enumerable: true,
104
- get: function () { return chunkJF5AJQMU_cjs.getGlobalRegistry; }
104
+ get: function () { return chunkZ45DHTDX_cjs.getGlobalRegistry; }
105
105
  });
106
106
  Object.defineProperty(exports, "getGrepTools", {
107
107
  enumerable: true,
108
- get: function () { return chunkJF5AJQMU_cjs.getGrepTools; }
108
+ get: function () { return chunkZ45DHTDX_cjs.getGrepTools; }
109
109
  });
110
110
  Object.defineProperty(exports, "getInteractionTools", {
111
111
  enumerable: true,
112
- get: function () { return chunkJF5AJQMU_cjs.getInteractionTools; }
112
+ get: function () { return chunkZ45DHTDX_cjs.getInteractionTools; }
113
+ });
114
+ Object.defineProperty(exports, "getPlanningTools", {
115
+ enumerable: true,
116
+ get: function () { return chunkZ45DHTDX_cjs.getPlanningTools; }
113
117
  });
114
118
  Object.defineProperty(exports, "getSafeBuiltinTools", {
115
119
  enumerable: true,
116
- get: function () { return chunkJF5AJQMU_cjs.getSafeBuiltinTools; }
120
+ get: function () { return chunkZ45DHTDX_cjs.getSafeBuiltinTools; }
117
121
  });
118
122
  Object.defineProperty(exports, "getShellTools", {
119
123
  enumerable: true,
120
- get: function () { return chunkJF5AJQMU_cjs.getShellTools; }
124
+ get: function () { return chunkZ45DHTDX_cjs.getShellTools; }
121
125
  });
122
126
  Object.defineProperty(exports, "getSkillTools", {
123
127
  enumerable: true,
124
- get: function () { return chunkJF5AJQMU_cjs.getSkillTools; }
128
+ get: function () { return chunkZ45DHTDX_cjs.getSkillTools; }
125
129
  });
126
130
  Object.defineProperty(exports, "getSubagentTools", {
127
131
  enumerable: true,
128
- get: function () { return chunkJF5AJQMU_cjs.getSubagentTools; }
129
- });
130
- Object.defineProperty(exports, "getTaskTools", {
131
- enumerable: true,
132
- get: function () { return chunkJF5AJQMU_cjs.getTaskTools; }
132
+ get: function () { return chunkZ45DHTDX_cjs.getSubagentTools; }
133
133
  });
134
134
  Object.defineProperty(exports, "getWebTools", {
135
135
  enumerable: true,
136
- get: function () { return chunkJF5AJQMU_cjs.getWebTools; }
136
+ get: function () { return chunkZ45DHTDX_cjs.getWebTools; }
137
137
  });
138
138
  Object.defineProperty(exports, "globTool", {
139
139
  enumerable: true,
140
- get: function () { return chunkJF5AJQMU_cjs.globTool; }
140
+ get: function () { return chunkZ45DHTDX_cjs.globTool; }
141
141
  });
142
142
  Object.defineProperty(exports, "grepTool", {
143
143
  enumerable: true,
144
- get: function () { return chunkJF5AJQMU_cjs.grepTool; }
144
+ get: function () { return chunkZ45DHTDX_cjs.grepTool; }
145
145
  });
146
146
  Object.defineProperty(exports, "loadHooksSettingsFromProject", {
147
147
  enumerable: true,
148
- get: function () { return chunkJF5AJQMU_cjs.loadHooksSettingsFromProject; }
148
+ get: function () { return chunkZ45DHTDX_cjs.loadHooksSettingsFromProject; }
149
149
  });
150
150
  Object.defineProperty(exports, "loadHooksSettingsFromUser", {
151
151
  enumerable: true,
152
- get: function () { return chunkJF5AJQMU_cjs.loadHooksSettingsFromUser; }
152
+ get: function () { return chunkZ45DHTDX_cjs.loadHooksSettingsFromUser; }
153
153
  });
154
154
  Object.defineProperty(exports, "matchTool", {
155
155
  enumerable: true,
156
- get: function () { return chunkJF5AJQMU_cjs.matchTool; }
156
+ get: function () { return chunkZ45DHTDX_cjs.matchTool; }
157
157
  });
158
158
  Object.defineProperty(exports, "mergeCommandHookLayers", {
159
159
  enumerable: true,
160
- get: function () { return chunkJF5AJQMU_cjs.mergeCommandHookLayers; }
160
+ get: function () { return chunkZ45DHTDX_cjs.mergeCommandHookLayers; }
161
161
  });
162
162
  Object.defineProperty(exports, "parseHooksSettingsFile", {
163
163
  enumerable: true,
164
- get: function () { return chunkJF5AJQMU_cjs.parseHooksSettingsFile; }
164
+ get: function () { return chunkZ45DHTDX_cjs.parseHooksSettingsFile; }
165
165
  });
166
166
  Object.defineProperty(exports, "questionTool", {
167
167
  enumerable: true,
168
- get: function () { return chunkJF5AJQMU_cjs.questionTool; }
168
+ get: function () { return chunkZ45DHTDX_cjs.questionTool; }
169
169
  });
170
170
  Object.defineProperty(exports, "readFileTool", {
171
171
  enumerable: true,
172
- get: function () { return chunkJF5AJQMU_cjs.readFileTool; }
172
+ get: function () { return chunkZ45DHTDX_cjs.readFileTool; }
173
173
  });
174
174
  Object.defineProperty(exports, "subagentRequestSchema", {
175
175
  enumerable: true,
176
- get: function () { return chunkJF5AJQMU_cjs.subagentRequestSchema; }
177
- });
178
- Object.defineProperty(exports, "taskCreateTool", {
179
- enumerable: true,
180
- get: function () { return chunkJF5AJQMU_cjs.taskCreateTool; }
181
- });
182
- Object.defineProperty(exports, "taskListTool", {
183
- enumerable: true,
184
- get: function () { return chunkJF5AJQMU_cjs.taskListTool; }
176
+ get: function () { return chunkZ45DHTDX_cjs.subagentRequestSchema; }
185
177
  });
186
- Object.defineProperty(exports, "taskUpdateTool", {
178
+ Object.defineProperty(exports, "todoWriteTool", {
187
179
  enumerable: true,
188
- get: function () { return chunkJF5AJQMU_cjs.taskUpdateTool; }
180
+ get: function () { return chunkZ45DHTDX_cjs.todoWriteTool; }
189
181
  });
190
182
  Object.defineProperty(exports, "truncateMatchLineForDisplay", {
191
183
  enumerable: true,
192
- get: function () { return chunkJF5AJQMU_cjs.truncateMatchLineForDisplay; }
184
+ get: function () { return chunkZ45DHTDX_cjs.truncateMatchLineForDisplay; }
193
185
  });
194
186
  Object.defineProperty(exports, "webFetchTool", {
195
187
  enumerable: true,
196
- get: function () { return chunkJF5AJQMU_cjs.webFetchTool; }
188
+ get: function () { return chunkZ45DHTDX_cjs.webFetchTool; }
197
189
  });
198
190
  Object.defineProperty(exports, "webSearchTool", {
199
191
  enumerable: true,
200
- get: function () { return chunkJF5AJQMU_cjs.webSearchTool; }
192
+ get: function () { return chunkZ45DHTDX_cjs.webSearchTool; }
201
193
  });
202
194
  Object.defineProperty(exports, "writeFileTool", {
203
195
  enumerable: true,
204
- get: function () { return chunkJF5AJQMU_cjs.writeFileTool; }
196
+ get: function () { return chunkZ45DHTDX_cjs.writeFileTool; }
205
197
  });
206
198
  //# sourceMappingURL=index.cjs.map
207
199
  //# sourceMappingURL=index.cjs.map
@@ -1,6 +1,6 @@
1
- export { C as CreateAgentToolOptions, D as DEFAULT_GREP_HEAD_LIMIT, M as MAX_LINE_LENGTH, c as SubagentRequest, d as SubagentRunner, e as ToolExecuteOptions, T as ToolRegistry, f as ToolRegistryConfig, g as agentTool, h as bashTool, i as createAgentTool, l as createSkillTool, m as createTool, n as editTool, o as getAllBuiltinTools, p as getFileSystemTools, q as getGlobalRegistry, r as getGrepTools, s as getSafeBuiltinTools, t as getShellTools, u as getSkillTools, v as getSubagentTools, w as getTaskTools, x as getWebTools, y as globTool, z as grepTool, A as loadHooksSettingsFromProject, B as loadHooksSettingsFromUser, E as parseHooksSettingsFile, F as readFileTool, G as subagentRequestSchema, H as taskCreateTool, I as taskListTool, J as taskUpdateTool, K as truncateMatchLineForDisplay, L as webFetchTool, N as webSearchTool, O as writeFileTool } from '../index-RTPmFjMp.cjs';
2
- import { T as ToolResult } from '../types-C0aX_Qdp.cjs';
3
- export { m as AskUserQuestionAnswer, n as AskUserQuestionItem, o as AskUserQuestionResolver, s as CommandHookConfig, w as CreateAskUserQuestionToolOptions, F as FlatCommandHookEntry, x as FunctionHook, H as HookContext, y as HookEventType, z as HookGroupConfig, B as HookManager, D as HookResult, E as HooksSettings, G as HooksSettingsFile, c as ToolDefinition, ab as ToolResultMetadata, ac as ToolSchema, ae as buildHookEnv, af as createAskUserQuestionTool, ag as createFunctionHook, ah as formatAnswerSummary, ai as formatAskUserQuestionPrompt, aj as getInteractionTools, ak as matchTool, al as mergeCommandHookLayers, am as questionTool } from '../types-C0aX_Qdp.cjs';
1
+ export { C as CreateAgentToolOptions, D as DEFAULT_GREP_HEAD_LIMIT, M as MAX_LINE_LENGTH, c as SubagentRequest, d as SubagentRunner, e as ToolExecuteOptions, T as ToolRegistry, f as ToolRegistryConfig, g as agentTool, h as bashTool, i as createAgentTool, l as createSkillTool, m as createTool, n as editTool, o as getAllBuiltinTools, p as getFileSystemTools, q as getGlobalRegistry, r as getGrepTools, s as getPlanningTools, t as getSafeBuiltinTools, u as getShellTools, v as getSkillTools, w as getSubagentTools, x as getWebTools, y as globTool, z as grepTool, A as loadHooksSettingsFromProject, B as loadHooksSettingsFromUser, E as parseHooksSettingsFile, F as readFileTool, G as subagentRequestSchema, H as todoWriteTool, I as truncateMatchLineForDisplay, J as webFetchTool, K as webSearchTool, L as writeFileTool } from '../index-D2Qntkn_.cjs';
2
+ import { T as ToolResult } from '../types-CWPAYWzr.cjs';
3
+ export { v as AskUserQuestionAnswer, w as AskUserQuestionItem, x as AskUserQuestionResolver, D as CommandHookConfig, H as CreateAskUserQuestionToolOptions, I as FlatCommandHookEntry, J as FunctionHook, K as HookContext, O as HookEventType, Q as HookGroupConfig, R as HookManager, V as HookResult, W as HooksSettings, X as HooksSettingsFile, d as ToolDefinition, av as ToolResultMetadata, ax as ToolSchema, aA as buildHookEnv, aB as createAskUserQuestionTool, aC as createFunctionHook, aD as formatAnswerSummary, aE as formatAskUserQuestionPrompt, aF as getInteractionTools, aH as matchTool, aI as mergeCommandHookLayers, aJ as questionTool } from '../types-CWPAYWzr.cjs';
4
4
  import 'zod';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
- export { C as CreateAgentToolOptions, D as DEFAULT_GREP_HEAD_LIMIT, M as MAX_LINE_LENGTH, c as SubagentRequest, d as SubagentRunner, e as ToolExecuteOptions, T as ToolRegistry, f as ToolRegistryConfig, g as agentTool, h as bashTool, i as createAgentTool, l as createSkillTool, m as createTool, n as editTool, o as getAllBuiltinTools, p as getFileSystemTools, q as getGlobalRegistry, r as getGrepTools, s as getSafeBuiltinTools, t as getShellTools, u as getSkillTools, v as getSubagentTools, w as getTaskTools, x as getWebTools, y as globTool, z as grepTool, A as loadHooksSettingsFromProject, B as loadHooksSettingsFromUser, E as parseHooksSettingsFile, F as readFileTool, G as subagentRequestSchema, H as taskCreateTool, I as taskListTool, J as taskUpdateTool, K as truncateMatchLineForDisplay, L as webFetchTool, N as webSearchTool, O as writeFileTool } from '../index-DPsZ1zat.js';
2
- import { T as ToolResult } from '../types-C0aX_Qdp.js';
3
- export { m as AskUserQuestionAnswer, n as AskUserQuestionItem, o as AskUserQuestionResolver, s as CommandHookConfig, w as CreateAskUserQuestionToolOptions, F as FlatCommandHookEntry, x as FunctionHook, H as HookContext, y as HookEventType, z as HookGroupConfig, B as HookManager, D as HookResult, E as HooksSettings, G as HooksSettingsFile, c as ToolDefinition, ab as ToolResultMetadata, ac as ToolSchema, ae as buildHookEnv, af as createAskUserQuestionTool, ag as createFunctionHook, ah as formatAnswerSummary, ai as formatAskUserQuestionPrompt, aj as getInteractionTools, ak as matchTool, al as mergeCommandHookLayers, am as questionTool } from '../types-C0aX_Qdp.js';
1
+ export { C as CreateAgentToolOptions, D as DEFAULT_GREP_HEAD_LIMIT, M as MAX_LINE_LENGTH, c as SubagentRequest, d as SubagentRunner, e as ToolExecuteOptions, T as ToolRegistry, f as ToolRegistryConfig, g as agentTool, h as bashTool, i as createAgentTool, l as createSkillTool, m as createTool, n as editTool, o as getAllBuiltinTools, p as getFileSystemTools, q as getGlobalRegistry, r as getGrepTools, s as getPlanningTools, t as getSafeBuiltinTools, u as getShellTools, v as getSkillTools, w as getSubagentTools, x as getWebTools, y as globTool, z as grepTool, A as loadHooksSettingsFromProject, B as loadHooksSettingsFromUser, E as parseHooksSettingsFile, F as readFileTool, G as subagentRequestSchema, H as todoWriteTool, I as truncateMatchLineForDisplay, J as webFetchTool, K as webSearchTool, L as writeFileTool } from '../index-Cw3SfEAB.js';
2
+ import { T as ToolResult } from '../types-CWPAYWzr.js';
3
+ export { v as AskUserQuestionAnswer, w as AskUserQuestionItem, x as AskUserQuestionResolver, D as CommandHookConfig, H as CreateAskUserQuestionToolOptions, I as FlatCommandHookEntry, J as FunctionHook, K as HookContext, O as HookEventType, Q as HookGroupConfig, R as HookManager, V as HookResult, W as HooksSettings, X as HooksSettingsFile, d as ToolDefinition, av as ToolResultMetadata, ax as ToolSchema, aA as buildHookEnv, aB as createAskUserQuestionTool, aC as createFunctionHook, aD as formatAnswerSummary, aE as formatAskUserQuestionPrompt, aF as getInteractionTools, aH as matchTool, aI as mergeCommandHookLayers, aJ as questionTool } from '../types-CWPAYWzr.js';
4
4
  import 'zod';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import '../chunk-A3S3AGE3.js';
3
- export { DEFAULT_GREP_HEAD_LIMIT, FileStorageStrategy, HookManager, MAX_LINE_LENGTH, OUTPUT_CONFIG, OutputHandler, PaginationHintStrategy, SmartTruncateStrategy, ToolRegistry, agentTool, bashTool, buildHookEnv, createAgentTool, createAskUserQuestionTool, createFunctionHook, createOutputHandler, createSkillTool, createTool, editTool, formatAnswerSummary, formatAskUserQuestionPrompt, getAllBuiltinTools, getFileSystemTools, getGlobalRegistry, getGrepTools, getInteractionTools, getSafeBuiltinTools, getShellTools, getSkillTools, getSubagentTools, getTaskTools, getWebTools, globTool, grepTool, loadHooksSettingsFromProject, loadHooksSettingsFromUser, matchTool, mergeCommandHookLayers, parseHooksSettingsFile, questionTool, readFileTool, subagentRequestSchema, taskCreateTool, taskListTool, taskUpdateTool, truncateMatchLineForDisplay, webFetchTool, webSearchTool, writeFileTool } from '../chunk-OHXW2YM6.js';
4
- import '../chunk-WH3APNQ5.js';
3
+ export { DEFAULT_GREP_HEAD_LIMIT, FileStorageStrategy, HookManager, MAX_LINE_LENGTH, OUTPUT_CONFIG, OutputHandler, PaginationHintStrategy, SmartTruncateStrategy, ToolRegistry, agentTool, bashTool, buildHookEnv, createAgentTool, createAskUserQuestionTool, createFunctionHook, createOutputHandler, createSkillTool, createTool, editTool, formatAnswerSummary, formatAskUserQuestionPrompt, getAllBuiltinTools, getFileSystemTools, getGlobalRegistry, getGrepTools, getInteractionTools, getPlanningTools, getSafeBuiltinTools, getShellTools, getSkillTools, getSubagentTools, getWebTools, globTool, grepTool, loadHooksSettingsFromProject, loadHooksSettingsFromUser, matchTool, mergeCommandHookLayers, parseHooksSettingsFile, questionTool, readFileTool, subagentRequestSchema, todoWriteTool, truncateMatchLineForDisplay, webFetchTool, webSearchTool, writeFileTool } from '../chunk-MEJHTQJM.js';
4
+ import '../chunk-LOYIGOBZ.js';
5
5
  //# sourceMappingURL=index.js.map
6
6
  //# sourceMappingURL=index.js.map