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