@autotest/agent 0.0.6 → 0.0.8
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 +7 -0
- package/dist/.buildstamp +1 -0
- package/dist/api/agent_api.d.ts +2 -2
- package/dist/autotest-cli.js +1 -397
- package/dist/common/config/config.yaml +4 -0
- package/dist/common/config/manager.d.ts +4 -4
- package/dist/common/config/types.d.ts +5 -0
- package/dist/common/dfx/index.d.ts +1 -1
- package/dist/core/agent/single_agent/agent.d.ts +1 -0
- package/dist/core/device/device_protocol.d.ts +1 -1
- package/dist/core/device/hdc/device.d.ts +5 -2
- package/dist/core/knowledge/knowledge_manager.d.ts +3 -3
- package/dist/core/knowledge/vectordb.d.ts +5 -5
- package/dist/core/mcp/harmony_hdc_adapter.d.ts +2 -0
- package/dist/core/mcp/mcp_tools.d.ts +1 -0
- package/dist/core/mcp/verify_tool.d.ts +12 -0
- package/dist/core/prompt/templates/single/single_v2.0.md +15 -0
- package/dist/data_types/device.d.ts +1 -1
- package/dist/data_types/index.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -163
- package/dist/tools/batch_runner.js +1 -745
- package/dist/tools/case_runner/runner.js +1 -410
- package/dist/tools/config/config_tool.js +1 -339
- package/dist/tools/prompt_compare/compare_runner.js +1 -360
- package/package.json +2 -2
- package/dist/api/agent_api.js +0 -550
- package/dist/api/autotest_agent.js +0 -205
- package/dist/api/types.js +0 -11
- package/dist/common/case_manager.js +0 -91
- package/dist/common/collect_case.js +0 -128
- package/dist/common/common_errors.js +0 -66
- package/dist/common/config/config_validator.js +0 -28
- package/dist/common/config/manager.js +0 -257
- package/dist/common/config/output.js +0 -59
- package/dist/common/config/types.js +0 -185
- package/dist/common/dfx/client_factory.js +0 -62
- package/dist/common/dfx/context.js +0 -23
- package/dist/common/dfx/index.js +0 -15
- package/dist/common/dfx/recorder.js +0 -191
- package/dist/common/dfx/recording_fetch.js +0 -228
- package/dist/common/dfx/source.js +0 -13
- package/dist/common/image_cacher.js +0 -36
- package/dist/common/image_helper.js +0 -128
- package/dist/common/image_similarity.js +0 -171
- package/dist/common/llm_cache/cache_transport.js +0 -102
- package/dist/common/llm_cache/prompt_cache.js +0 -113
- package/dist/common/logger.js +0 -158
- package/dist/common/model/custom_model.js +0 -487
- package/dist/common/model/index.js +0 -5
- package/dist/common/path_utils.js +0 -88
- package/dist/common/result_parser.js +0 -49
- package/dist/common/usage/token_usage.js +0 -117
- package/dist/common/utils.js +0 -125
- package/dist/core/agent/layered_agent/ability_helper.js +0 -125
- package/dist/core/agent/layered_agent/agent.js +0 -37
- package/dist/core/agent/layered_agent/agent_registry.js +0 -82
- package/dist/core/agent/layered_agent/decision.js +0 -518
- package/dist/core/agent/layered_agent/execute_agent/action_handler.js +0 -155
- package/dist/core/agent/layered_agent/execute_agent/agent_factory.js +0 -41
- package/dist/core/agent/layered_agent/execute_agent/base_agent.js +0 -112
- package/dist/core/agent/layered_agent/execute_agent/general_agent.js +0 -207
- package/dist/core/agent/layered_agent/execute_agent/glm_agent.js +0 -241
- package/dist/core/agent/layered_agent/execute_agent/i18n.js +0 -34
- package/dist/core/agent/layered_agent/execute_agent/index.js +0 -67
- package/dist/core/agent/layered_agent/execute_agent/mai_ui_agent.js +0 -316
- package/dist/core/agent/layered_agent/execute_agent/mcp_prompts.js +0 -154
- package/dist/core/agent/layered_agent/execute_agent/parser/general_parser.js +0 -243
- package/dist/core/agent/layered_agent/execute_agent/parser/glm_parser.js +0 -139
- package/dist/core/agent/layered_agent/execute_agent/parser/index.js +0 -9
- package/dist/core/agent/layered_agent/execute_agent/parser/mai_ui_parser.js +0 -94
- package/dist/core/agent/layered_agent/execute_agent/prompts.js +0 -109
- package/dist/core/agent/layered_agent/execute_agent/simple_reporter.js +0 -33
- package/dist/core/agent/layered_agent/execute_agent/utils.js +0 -52
- package/dist/core/agent/report_analyzer_agent/agent.js +0 -565
- package/dist/core/agent/report_analyzer_agent/config.js +0 -22
- package/dist/core/agent/report_analyzer_agent/data_loader.js +0 -255
- package/dist/core/agent/report_analyzer_agent/guardrails.js +0 -99
- package/dist/core/agent/report_analyzer_agent/hooks.js +0 -31
- package/dist/core/agent/report_analyzer_agent/index.js +0 -52
- package/dist/core/agent/report_analyzer_agent/key_steps_builder.js +0 -42
- package/dist/core/agent/report_analyzer_agent/mapping.js +0 -133
- package/dist/core/agent/report_analyzer_agent/parse.js +0 -375
- package/dist/core/agent/report_analyzer_agent/prompt.js +0 -300
- package/dist/core/agent/report_analyzer_agent/report_writer.js +0 -558
- package/dist/core/agent/report_analyzer_agent/tools.js +0 -150
- package/dist/core/agent/report_analyzer_agent/types.js +0 -274
- package/dist/core/agent/rewrite_agent/agent.js +0 -209
- package/dist/core/agent/rewrite_agent/guardrails.js +0 -95
- package/dist/core/agent/rewrite_agent/mapping.js +0 -56
- package/dist/core/agent/rewrite_agent/parse.js +0 -121
- package/dist/core/agent/rewrite_agent/types.js +0 -37
- package/dist/core/agent/single_agent/agent.js +0 -801
- package/dist/core/agent/single_agent/hook_manager.js +0 -59
- package/dist/core/agent/single_agent/hooks.js +0 -288
- package/dist/core/agent/single_agent/image_utils.js +0 -158
- package/dist/core/agent/single_agent/scroll_search_agent.js +0 -405
- package/dist/core/agent/single_agent/subagent_manager.js +0 -72
- package/dist/core/agent/single_agent/tool_recorder_hook.js +0 -42
- package/dist/core/agent/types.js +0 -2
- package/dist/core/agent/utils/message_builder.js +0 -138
- package/dist/core/device/device_protocol.js +0 -2
- package/dist/core/device/hdc/apps.js +0 -437
- package/dist/core/device/hdc/device.js +0 -219
- package/dist/core/device/hdc/index.js +0 -31
- package/dist/core/device/hdc/input.js +0 -74
- package/dist/core/device/hdc/screenshot.js +0 -171
- package/dist/core/device/index.js +0 -70
- package/dist/core/device/types.js +0 -2
- package/dist/core/knowledge/knowledge_manager.js +0 -70
- package/dist/core/knowledge/vectordb.js +0 -283
- package/dist/core/mcp/adapter_factory.js +0 -99
- package/dist/core/mcp/android_adapter.js +0 -286
- package/dist/core/mcp/base_adapter.js +0 -86
- package/dist/core/mcp/harmony_hdc_adapter.js +0 -798
- package/dist/core/mcp/ios_adapter.js +0 -286
- package/dist/core/mcp/local_tools.js +0 -41
- package/dist/core/mcp/mcp_tools.js +0 -473
- package/dist/core/mcp/types.js +0 -6
- package/dist/core/memory/_utils.js +0 -140
- package/dist/core/memory/compressed_session.js +0 -182
- package/dist/core/memory/context_compressor.js +0 -176
- package/dist/core/memory/index.js +0 -22
- package/dist/core/memory/memory_manager.js +0 -28
- package/dist/core/memory/reflector.js +0 -95
- package/dist/core/memory/replan_manager.js +0 -12
- package/dist/core/memory/session_factory.js +0 -29
- package/dist/core/memory/tool_player.js +0 -225
- package/dist/core/memory/tool_player_popup.js +0 -276
- package/dist/core/memory/tool_player_replan.js +0 -226
- package/dist/core/memory/tool_player_xpath.js +0 -139
- package/dist/core/memory/tool_recorder.js +0 -126
- package/dist/core/preprocessor/task_splitter.js +0 -112
- package/dist/core/prompt/prompt_loader.js +0 -315
- package/dist/core/skill/skill_manager.js +0 -302
- package/dist/data_types/action.js +0 -2
- package/dist/data_types/agent.js +0 -2
- package/dist/data_types/case.js +0 -57
- package/dist/data_types/device.js +0 -2
- package/dist/data_types/index.js +0 -11
- package/dist/data_types/report.js +0 -6
- package/dist/data_types/screen.js +0 -23
- package/dist/data_types/task.js +0 -2
- package/dist/loop/cli.js +0 -127
- package/dist/loop/orchestrator.js +0 -314
- package/dist/loop/result_writer.js +0 -260
- package/dist/loop/types.js +0 -82
- package/dist/mcp-server/server.js +0 -341
- package/dist/mcp-server/types.js +0 -224
- package/dist/reporter/batch_summary.js +0 -197
- package/dist/reporter/generator.js +0 -286
- package/dist/reporter/html_template/index.js +0 -529
- package/dist/reporter/json_report.js +0 -6
- package/dist/reporter/types.js +0 -45
- package/dist/tools/case_runner/report.js +0 -264
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.ConfigManager = void 0;
|
|
37
|
-
exports.getModel = getModel;
|
|
38
|
-
exports.resolveModelConfig = resolveModelConfig;
|
|
39
|
-
exports.resolveAgentConfig = resolveAgentConfig;
|
|
40
|
-
const fs_1 = require("fs");
|
|
41
|
-
const path = __importStar(require("path"));
|
|
42
|
-
const yaml = __importStar(require("js-yaml"));
|
|
43
|
-
const types_1 = require("./types");
|
|
44
|
-
const common_errors_1 = require("../../common/common_errors");
|
|
45
|
-
class ConfigManager {
|
|
46
|
-
config;
|
|
47
|
-
loadedConfigFile = null;
|
|
48
|
-
constructor(initial) {
|
|
49
|
-
if (initial) {
|
|
50
|
-
this.config = this.validateWithZod(this.deepMerge(types_1.AppConfigSchema.parse({}), initial));
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
this.config = types_1.AppConfigSchema.parse({});
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
loadYamlFile(filePath) {
|
|
57
|
-
const raw = (0, fs_1.readFileSync)(filePath, 'utf-8');
|
|
58
|
-
const parsed = yaml.load(raw);
|
|
59
|
-
const converted = this.convertKeysToCamel(parsed);
|
|
60
|
-
this.config = this.validateWithZod(this.deepMerge(this.config, converted));
|
|
61
|
-
}
|
|
62
|
-
loadDefaultConfig() {
|
|
63
|
-
const baseDir = path.dirname(__filename);
|
|
64
|
-
const layers = [];
|
|
65
|
-
const defaultConfig = path.join(baseDir, 'config.yaml');
|
|
66
|
-
if ((0, fs_1.existsSync)(defaultConfig)) {
|
|
67
|
-
layers.push(defaultConfig);
|
|
68
|
-
this.loadedConfigFile = defaultConfig;
|
|
69
|
-
}
|
|
70
|
-
const pkgLocalConfig = path.join(baseDir, 'config.local.yaml');
|
|
71
|
-
if ((0, fs_1.existsSync)(pkgLocalConfig)) {
|
|
72
|
-
layers.push(pkgLocalConfig);
|
|
73
|
-
}
|
|
74
|
-
const cwdConfig = path.join(process.cwd(), 'config.yaml');
|
|
75
|
-
if (cwdConfig !== defaultConfig && (0, fs_1.existsSync)(cwdConfig)) {
|
|
76
|
-
layers.push(cwdConfig);
|
|
77
|
-
this.loadedConfigFile = cwdConfig;
|
|
78
|
-
}
|
|
79
|
-
const cwdLocalConfig = path.join(process.cwd(), 'config.local.yaml');
|
|
80
|
-
if ((0, fs_1.existsSync)(cwdLocalConfig)) {
|
|
81
|
-
layers.push(cwdLocalConfig);
|
|
82
|
-
}
|
|
83
|
-
for (const f of layers) {
|
|
84
|
-
try {
|
|
85
|
-
const raw = (0, fs_1.readFileSync)(f, 'utf-8');
|
|
86
|
-
const parsed = yaml.load(raw);
|
|
87
|
-
const converted = this.convertKeysToCamel(parsed);
|
|
88
|
-
this.config = this.validateWithZod(this.deepMerge(this.config, converted));
|
|
89
|
-
}
|
|
90
|
-
catch (e) {
|
|
91
|
-
console.error(`Error loading config file: ${f}: ${e}`);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
if (layers.length > 0) {
|
|
95
|
-
console.log(`Loaded config files: ${layers.join(', ')}`);
|
|
96
|
-
}
|
|
97
|
-
// Run validation
|
|
98
|
-
const { validateConfig } = require('./config_validator');
|
|
99
|
-
const issues = validateConfig(this.config);
|
|
100
|
-
if (issues.length > 0) {
|
|
101
|
-
console.warn(`Config validation found ${issues.length} issue(s)`);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Layer 4: Load a --config override file (highest priority,
|
|
106
|
-
* ConfigManager Layer 4). Merges after loadDefaultConfig, prints loaded file,
|
|
107
|
-
* and validates.
|
|
108
|
-
*/
|
|
109
|
-
loadFileConfig(configFile) {
|
|
110
|
-
if (!(0, fs_1.existsSync)(configFile)) {
|
|
111
|
-
console.warn(`Config file not found: ${configFile}`);
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
try {
|
|
115
|
-
const raw = (0, fs_1.readFileSync)(configFile, 'utf-8');
|
|
116
|
-
const parsed = yaml.load(raw);
|
|
117
|
-
const converted = this.convertKeysToCamel(parsed);
|
|
118
|
-
this.config = this.validateWithZod(this.deepMerge(this.config, converted));
|
|
119
|
-
this.loadedConfigFile = configFile;
|
|
120
|
-
console.log(`Loaded config (Layer 4 --config): ${configFile}`);
|
|
121
|
-
}
|
|
122
|
-
catch (e) {
|
|
123
|
-
console.error(`Error loading --config file: ${configFile}: ${e}`);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
convertKeysToCamel(obj) {
|
|
127
|
-
if (obj === null || typeof obj !== 'object')
|
|
128
|
-
return obj;
|
|
129
|
-
if (Array.isArray(obj))
|
|
130
|
-
return obj.map((item) => this.convertKeysToCamel(item));
|
|
131
|
-
const result = {};
|
|
132
|
-
for (const key of Object.keys(obj)) {
|
|
133
|
-
const camelKey = key.replace(/_([a-z])/g, (_, c) => c.toUpperCase());
|
|
134
|
-
result[camelKey] = this.convertKeysToCamel(obj[key]);
|
|
135
|
-
}
|
|
136
|
-
return result;
|
|
137
|
-
}
|
|
138
|
-
deepMerge(target, source) {
|
|
139
|
-
const result = { ...target };
|
|
140
|
-
for (const key of Object.keys(source)) {
|
|
141
|
-
if (source[key] !== null &&
|
|
142
|
-
source[key] !== undefined &&
|
|
143
|
-
typeof source[key] === 'object' &&
|
|
144
|
-
!Array.isArray(source[key]) &&
|
|
145
|
-
typeof result[key] === 'object' &&
|
|
146
|
-
result[key] !== null &&
|
|
147
|
-
!Array.isArray(result[key])) {
|
|
148
|
-
result[key] = this.deepMerge(result[key], source[key]);
|
|
149
|
-
}
|
|
150
|
-
else if (source[key] !== undefined || source[key] === null) {
|
|
151
|
-
result[key] = source[key];
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
return result;
|
|
155
|
-
}
|
|
156
|
-
validateWithZod(data) {
|
|
157
|
-
// Backward compat: migrate old flat `agent: { mode: ... }` → `agent: { unified: { mode: ... } }`
|
|
158
|
-
// Also handles merged state (deepMerge of old flat + new nested): move stray flat fields into unified.
|
|
159
|
-
const agent = data['agent'];
|
|
160
|
-
if (agent && typeof agent === 'object' && !Array.isArray(agent)) {
|
|
161
|
-
const agentObj = agent;
|
|
162
|
-
const knownFields = [
|
|
163
|
-
'mode', 'maxSteps', 'lang', 'enablePreprocess', 'streamLog', 'debugMode', 'adapterType',
|
|
164
|
-
'actionInterval', 'maxHistoryImage', 'stepEndWaitTime', 'cleanRecentTask', 'systemPrompt',
|
|
165
|
-
'verbose', 'jsonOutput', 'apirec', 'defaultTask', 'promptVersion', 'maxResultRetries',
|
|
166
|
-
'screenshotMaxPixels', 'includePreviousScreenshot', 'previousScreenshotCompressRatio',
|
|
167
|
-
'enableCache', 'parseMode', 'toolProvider', 'promptName', 'role', 'sessionType',
|
|
168
|
-
'maxLoops', 'maxHistoryActions', 'screenshotOnToolEnd', 'minimalInject', 'enableAttributionAnalysis',
|
|
169
|
-
];
|
|
170
|
-
if (!('unified' in agentObj) && !('extraAgents' in agentObj)) {
|
|
171
|
-
// Old flat format — wrap in unified
|
|
172
|
-
data['agent'] = { unified: agentObj, extraAgents: {} };
|
|
173
|
-
}
|
|
174
|
-
else if ('unified' in agentObj) {
|
|
175
|
-
// Merged: stray flat fields from YAML/update mixed alongside unified from default.
|
|
176
|
-
// Move them into unified (overwrite defaults with explicit values).
|
|
177
|
-
const unified = (agentObj['unified'] ?? {});
|
|
178
|
-
for (const field of knownFields) {
|
|
179
|
-
if (field in agentObj) {
|
|
180
|
-
unified[field] = agentObj[field];
|
|
181
|
-
delete agentObj[field];
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
agentObj['unified'] = unified;
|
|
185
|
-
if (!('extraAgents' in agentObj))
|
|
186
|
-
agentObj['extraAgents'] = {};
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
const result = types_1.AppConfigSchema.safeParse(data);
|
|
190
|
-
if (!result.success) {
|
|
191
|
-
throw new common_errors_1.AgentError('CONFIG_VALIDATION_FAILED', result.error.message, {
|
|
192
|
-
recoverable: true,
|
|
193
|
-
suggestedActions: ['updateConfig'],
|
|
194
|
-
context: { validationErrors: result.error.issues },
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
return result.data;
|
|
198
|
-
}
|
|
199
|
-
getEffectiveConfig() {
|
|
200
|
-
return { ...this.config };
|
|
201
|
-
}
|
|
202
|
-
updateConfig(partial) {
|
|
203
|
-
this.config = this.validateWithZod(this.deepMerge(this.config, partial));
|
|
204
|
-
return this.getEffectiveConfig();
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
exports.ConfigManager = ConfigManager;
|
|
208
|
-
// ---- Per-agent config resolvers ----
|
|
209
|
-
const MODEL_SLOTS = ['unified', 'execute', 'decision', 'verify', 'reflection', 'analyze'];
|
|
210
|
-
/** A ModelConfig is "configured" if it carries a name/baseUrl/apiKey (not pure defaults). */
|
|
211
|
-
function isModelConfigured(m) {
|
|
212
|
-
return !!m && (!!(m.name) || !!(m.baseUrl) || !!(m.apiKey));
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Resolve a model config by agent name with unified fallback.
|
|
216
|
-
* Mirrors ModelGroupConfig.get_model:
|
|
217
|
-
* 1. direct slot match (unified/execute/decision/verify/reflection/analyze)
|
|
218
|
-
* 2. `_agent` suffix aliasing (e.g. `execute_agent` → `execute` slot)
|
|
219
|
-
* 3. extra_models[name]
|
|
220
|
-
* 4. fallback to `unified`
|
|
221
|
-
*/
|
|
222
|
-
function getModel(group, name) {
|
|
223
|
-
const trySlot = (slot) => {
|
|
224
|
-
if (slot === 'unified')
|
|
225
|
-
return isModelConfigured(group.unified) ? group.unified : undefined;
|
|
226
|
-
const v = group[slot];
|
|
227
|
-
return isModelConfigured(v) ? v : undefined;
|
|
228
|
-
};
|
|
229
|
-
const direct = trySlot(name);
|
|
230
|
-
if (direct)
|
|
231
|
-
return direct;
|
|
232
|
-
if (name.endsWith('_agent')) {
|
|
233
|
-
const base = name.slice(0, -'_agent'.length);
|
|
234
|
-
if (MODEL_SLOTS.includes(base)) {
|
|
235
|
-
const aliased = trySlot(base);
|
|
236
|
-
if (aliased)
|
|
237
|
-
return aliased;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
const extra = group.extraModels?.[name];
|
|
241
|
-
if (isModelConfigured(extra))
|
|
242
|
-
return extra;
|
|
243
|
-
return group.unified;
|
|
244
|
-
}
|
|
245
|
-
/** Resolve a model config for an agent name from the app config. */
|
|
246
|
-
function resolveModelConfig(config, agentName) {
|
|
247
|
-
return getModel(config.model, agentName);
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* Resolve an agent config by name. Node's config.agent is currently a flat
|
|
251
|
-
* AgentConfig (AgentGroupConfig restructure deferred), so this returns the
|
|
252
|
-
* flat config for any name — kept for API parity with
|
|
253
|
-
* resolve_agent_config until extra_agents support lands.
|
|
254
|
-
*/
|
|
255
|
-
function resolveAgentConfig(config, _agentName) {
|
|
256
|
-
return config.agent.unified;
|
|
257
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.initOutputDir = initOutputDir;
|
|
37
|
-
const fs = __importStar(require("fs"));
|
|
38
|
-
const path = __importStar(require("path"));
|
|
39
|
-
const logger_1 = require("../logger");
|
|
40
|
-
const path_utils_1 = require("../path_utils");
|
|
41
|
-
function initOutputDir(taskName, config) {
|
|
42
|
-
const rootDir = config?.rootDir || path.join((0, path_utils_1.findProjectRoot)(), 'reports');
|
|
43
|
-
const now = new Date();
|
|
44
|
-
const dateStr = `${now.getFullYear()}${String(now.getMonth() + 1).padStart(2, '0')}${String(now.getDate()).padStart(2, '0')}`;
|
|
45
|
-
const timeStr = `${String(now.getHours()).padStart(2, '0')}${String(now.getMinutes()).padStart(2, '0')}${String(now.getSeconds()).padStart(2, '0')}`;
|
|
46
|
-
//
|
|
47
|
-
const sanitizedTask = taskName.replace(/[^a-zA-Z0-9_]/g, '_').slice(0, 50);
|
|
48
|
-
const reportDir = path.join(rootDir, 'web_tasks', dateStr, `${timeStr}_${sanitizedTask}`);
|
|
49
|
-
const screenPath = path.join(reportDir, 'screenPath');
|
|
50
|
-
const layoutDir = path.join(reportDir, 'layout');
|
|
51
|
-
const logDir = path.join(reportDir, 'log');
|
|
52
|
-
for (const dir of [reportDir, screenPath, layoutDir, logDir]) {
|
|
53
|
-
if (!fs.existsSync(dir)) {
|
|
54
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
logger_1.logger.info(`Output directory initialized: ${reportDir}`);
|
|
58
|
-
return { rootDir, reportDir, screenPath, layoutDir, logDir };
|
|
59
|
-
}
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppConfigSchema = exports.AgentConfigSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const ModelConfigSchema = zod_1.z.object({
|
|
6
|
-
name: zod_1.z.string().default(''),
|
|
7
|
-
baseUrl: zod_1.z.string().default(''),
|
|
8
|
-
apiKey: zod_1.z.string().default(''),
|
|
9
|
-
provider: zod_1.z.string().default('openai'),
|
|
10
|
-
apiVersion: zod_1.z.string().default(''),
|
|
11
|
-
//
|
|
12
|
-
temperature: zod_1.z.number().min(0).max(2).default(0.4),
|
|
13
|
-
topP: zod_1.z.number().default(0.85),
|
|
14
|
-
frequencyPenalty: zod_1.z.number().default(0.0),
|
|
15
|
-
repetitionPenalty: zod_1.z.number().default(1.0),
|
|
16
|
-
presencePenalty: zod_1.z.number().default(0.0),
|
|
17
|
-
// Tri-state: null = skip (use model default), true/false = explicit (vLLM chat_template_kwargs)
|
|
18
|
-
enableThinking: zod_1.z.boolean().nullable().default(null),
|
|
19
|
-
maxTokens: zod_1.z.number().int().default(1024),
|
|
20
|
-
timeout: zod_1.z.number().int().default(600),
|
|
21
|
-
maxRetries: zod_1.z.number().int().default(3),
|
|
22
|
-
extraBody: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).nullable().optional(),
|
|
23
|
-
extraHeaders: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).nullable().optional(),
|
|
24
|
-
promptType: zod_1.z.string().default(''),
|
|
25
|
-
});
|
|
26
|
-
const ModelGroupConfigSchema = zod_1.z.object({
|
|
27
|
-
unified: ModelConfigSchema.default({}),
|
|
28
|
-
execute: ModelConfigSchema.default({}),
|
|
29
|
-
decision: ModelConfigSchema.default({}),
|
|
30
|
-
verify: ModelConfigSchema.default({}),
|
|
31
|
-
//
|
|
32
|
-
reflection: ModelConfigSchema.optional(),
|
|
33
|
-
analyze: ModelConfigSchema.optional(),
|
|
34
|
-
extraModels: zod_1.z.record(zod_1.z.string(), ModelConfigSchema).default({}),
|
|
35
|
-
});
|
|
36
|
-
exports.AgentConfigSchema = zod_1.z.object({
|
|
37
|
-
mode: zod_1.z.enum(['single', 'hypium', 'layered']).default('single'),
|
|
38
|
-
//
|
|
39
|
-
maxSteps: zod_1.z.number().int().positive().default(50),
|
|
40
|
-
lang: zod_1.z.enum(['zh', 'en']).default('zh'),
|
|
41
|
-
enablePreprocess: zod_1.z.boolean().default(false),
|
|
42
|
-
streamLog: zod_1.z.boolean().default(false),
|
|
43
|
-
debugMode: zod_1.z.enum(['file', 'memory']).nullable().optional(),
|
|
44
|
-
actionInterval: zod_1.z.number().default(1.5),
|
|
45
|
-
maxHistoryImage: zod_1.z.number().int().default(3),
|
|
46
|
-
// Deprecated: kept until agent-core migration to parseMode/toolProvider
|
|
47
|
-
adapterType: zod_1.z.string().default('text_tag'),
|
|
48
|
-
stepEndWaitTime: zod_1.z.number().default(0.0),
|
|
49
|
-
cleanRecentTask: zod_1.z.boolean().default(false),
|
|
50
|
-
systemPrompt: zod_1.z.string().nullable().optional(),
|
|
51
|
-
verbose: zod_1.z.boolean().default(false),
|
|
52
|
-
jsonOutput: zod_1.z.boolean().default(false),
|
|
53
|
-
apirec: zod_1.z.boolean().default(false),
|
|
54
|
-
defaultTask: zod_1.z.string().default(''),
|
|
55
|
-
promptVersion: zod_1.z.string().default(''),
|
|
56
|
-
maxResultRetries: zod_1.z.number().int().default(2),
|
|
57
|
-
//
|
|
58
|
-
// with action marker so LLM can see where its last click landed and self-correct.
|
|
59
|
-
includePreviousScreenshot: zod_1.z.boolean().default(true),
|
|
60
|
-
previousScreenshotCompressRatio: zod_1.z.number().default(0.7),
|
|
61
|
-
actionMarkers: zod_1.z.boolean().default(false),
|
|
62
|
-
enableCache: zod_1.z.boolean().default(true),
|
|
63
|
-
// --- New fields
|
|
64
|
-
parseMode: zod_1.z.string().default('native'),
|
|
65
|
-
toolProvider: zod_1.z.string().default('device'),
|
|
66
|
-
promptName: zod_1.z.string().default('single_v2.0'),
|
|
67
|
-
role: zod_1.z.string().nullable().default(null),
|
|
68
|
-
sessionType: zod_1.z.string().default('compressed'),
|
|
69
|
-
maxLoops: zod_1.z.number().int().default(0),
|
|
70
|
-
maxHistoryActions: zod_1.z.number().int().default(10),
|
|
71
|
-
screenshotMaxPixels: zod_1.z.number().int().default(1500),
|
|
72
|
-
screenshotOnToolEnd: zod_1.z.boolean().default(true),
|
|
73
|
-
minimalInject: zod_1.z.boolean().default(false),
|
|
74
|
-
enableAttributionAnalysis: zod_1.z.boolean().default(false),
|
|
75
|
-
});
|
|
76
|
-
/**
|
|
77
|
-
* Agent group config.
|
|
78
|
-
* `unified` is the default agent config; `extraAgents` are per-role overrides.
|
|
79
|
-
* Backward compat: old flat `agent: { mode: ... }` config is auto-migrated
|
|
80
|
-
* to `{ unified: { mode: ... } }` by ConfigManager.
|
|
81
|
-
*/
|
|
82
|
-
const AgentGroupConfigSchema = zod_1.z.object({
|
|
83
|
-
unified: exports.AgentConfigSchema.default({}),
|
|
84
|
-
extraAgents: zod_1.z.record(zod_1.z.string(), exports.AgentConfigSchema).default({}),
|
|
85
|
-
});
|
|
86
|
-
const LogConfigSchema = zod_1.z.object({
|
|
87
|
-
//
|
|
88
|
-
level: zod_1.z.string().default('DEBUG'),
|
|
89
|
-
deviceLogLevel: zod_1.z.string().default('info'),
|
|
90
|
-
verbose: zod_1.z.boolean().default(false),
|
|
91
|
-
maxLogSize: zod_1.z.number().int().default(10),
|
|
92
|
-
maxLogFileNum: zod_1.z.number().int().default(5),
|
|
93
|
-
enableConsoleLog: zod_1.z.boolean().default(true),
|
|
94
|
-
enableFileLog: zod_1.z.boolean().default(true),
|
|
95
|
-
});
|
|
96
|
-
const OutputConfigSchema = zod_1.z.object({
|
|
97
|
-
jsonOutput: zod_1.z.boolean().default(false),
|
|
98
|
-
//
|
|
99
|
-
// Preprocess null→undefined so .default() kicks in (config.yaml may have report_dir: null)
|
|
100
|
-
reportDir: zod_1.z.preprocess((v) => (v === null ? undefined : v), zod_1.z.string().default(() => {
|
|
101
|
-
const n = new Date();
|
|
102
|
-
const d = `${n.getFullYear()}${String(n.getMonth() + 1).padStart(2, '0')}${String(n.getDate()).padStart(2, '0')}`;
|
|
103
|
-
const t = `${String(n.getHours()).padStart(2, '0')}${String(n.getMinutes()).padStart(2, '0')}${String(n.getSeconds()).padStart(2, '0')}`;
|
|
104
|
-
return `${d}/${t}`;
|
|
105
|
-
})),
|
|
106
|
-
rootDir: zod_1.z.string().default('reports'),
|
|
107
|
-
reportName: zod_1.z.string().default('autotest_report'),
|
|
108
|
-
embedImages: zod_1.z.boolean().default(false),
|
|
109
|
-
embedMaxPixels: zod_1.z.number().int().default(800),
|
|
110
|
-
});
|
|
111
|
-
const DeviceConfigSchema = zod_1.z.object({
|
|
112
|
-
deviceSn: zod_1.z.string().nullable().default(null),
|
|
113
|
-
ip: zod_1.z.string().default('127.0.0.1'),
|
|
114
|
-
port: zod_1.z.number().int().min(1).max(65535).default(8710),
|
|
115
|
-
hdcPath: zod_1.z.string().default('hdc'),
|
|
116
|
-
//
|
|
117
|
-
// true: go home + clear all recent tasks; false: skip; list: force-stop specific packages
|
|
118
|
-
resetDevice: zod_1.z.union([zod_1.z.boolean(), zod_1.z.array(zod_1.z.string())]).default(true),
|
|
119
|
-
screenAlwaysOn: zod_1.z.boolean().default(true),
|
|
120
|
-
deviceImpl: zod_1.z.string().default('HDCDevice'),
|
|
121
|
-
appConfig: zod_1.z.string().default(''),
|
|
122
|
-
operationMode: zod_1.z.enum(['phone', 'pc']).default('phone'),
|
|
123
|
-
});
|
|
124
|
-
const NetworkConfigSchema = zod_1.z.object({
|
|
125
|
-
timeout: zod_1.z.number().int().default(600),
|
|
126
|
-
maxRetries: zod_1.z.number().int().default(3),
|
|
127
|
-
noProxy: zod_1.z.string().default(''),
|
|
128
|
-
});
|
|
129
|
-
const AnalyzerConfigSchema = zod_1.z.object({
|
|
130
|
-
modelName: zod_1.z.string().default(''),
|
|
131
|
-
baseUrl: zod_1.z.string().default(''),
|
|
132
|
-
apiKey: zod_1.z.string().default(''),
|
|
133
|
-
temperature: zod_1.z.number().default(0.0),
|
|
134
|
-
maxTokens: zod_1.z.number().int().default(4096),
|
|
135
|
-
timeout: zod_1.z.number().int().default(90),
|
|
136
|
-
maxRetries: zod_1.z.number().int().default(3),
|
|
137
|
-
enableMultimodal: zod_1.z.boolean().default(true),
|
|
138
|
-
maxKeySteps: zod_1.z.number().int().default(5),
|
|
139
|
-
onlyFail: zod_1.z.boolean().default(true),
|
|
140
|
-
maxTurns: zod_1.z.number().int().default(8),
|
|
141
|
-
outputFormat: zod_1.z.string().default('all'),
|
|
142
|
-
});
|
|
143
|
-
const AppKnowledgeConfigSchema = zod_1.z.object({
|
|
144
|
-
keywords: zod_1.z.array(zod_1.z.string()).default([]),
|
|
145
|
-
mdFile: zod_1.z.string().default(''),
|
|
146
|
-
label: zod_1.z.string().default(''),
|
|
147
|
-
});
|
|
148
|
-
const KnowledgeConfigSchema = zod_1.z.object({
|
|
149
|
-
apps: zod_1.z.record(zod_1.z.string(), AppKnowledgeConfigSchema).default({}),
|
|
150
|
-
});
|
|
151
|
-
// --- New optional config schemas
|
|
152
|
-
const CompressionConfigSchema = zod_1.z.object({
|
|
153
|
-
enabled: zod_1.z.boolean().default(true),
|
|
154
|
-
maxTokens: zod_1.z.number().int().default(7000),
|
|
155
|
-
maxRecentMessages: zod_1.z.number().int().default(6),
|
|
156
|
-
});
|
|
157
|
-
const ReflectionConfigSchema = zod_1.z.object({
|
|
158
|
-
enabled: zod_1.z.boolean().default(true),
|
|
159
|
-
initialStep: zod_1.z.number().int().default(25),
|
|
160
|
-
interval: zod_1.z.number().int().default(15),
|
|
161
|
-
recentMessages: zod_1.z.number().int().default(10),
|
|
162
|
-
});
|
|
163
|
-
const DetectionConfigSchema = zod_1.z.object({
|
|
164
|
-
enabled: zod_1.z.boolean().default(false),
|
|
165
|
-
});
|
|
166
|
-
const DebugConfigSchema = zod_1.z.object({
|
|
167
|
-
promptScanPaths: zod_1.z.array(zod_1.z.string()).default([]),
|
|
168
|
-
});
|
|
169
|
-
exports.AppConfigSchema = zod_1.z.object({
|
|
170
|
-
model: ModelGroupConfigSchema.default({}),
|
|
171
|
-
agent: AgentGroupConfigSchema.default({}),
|
|
172
|
-
log: LogConfigSchema.default({}),
|
|
173
|
-
output: OutputConfigSchema.default({}),
|
|
174
|
-
device: DeviceConfigSchema.default({}),
|
|
175
|
-
network: NetworkConfigSchema.default({}),
|
|
176
|
-
analyze: AnalyzerConfigSchema.default({}),
|
|
177
|
-
knowledge: KnowledgeConfigSchema.default({}),
|
|
178
|
-
// --- New optional top-level configs
|
|
179
|
-
contextCompression: CompressionConfigSchema.optional(),
|
|
180
|
-
reflection: ReflectionConfigSchema.optional(),
|
|
181
|
-
detection: DetectionConfigSchema.optional(),
|
|
182
|
-
debug: DebugConfigSchema.optional(),
|
|
183
|
-
agentRoles: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
184
|
-
extensions: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
185
|
-
});
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.createLLMClient = createLLMClient;
|
|
37
|
-
const path = __importStar(require("path"));
|
|
38
|
-
const openai_1 = require("@ai-sdk/openai");
|
|
39
|
-
const recorder_1 = require("./recorder");
|
|
40
|
-
const recording_fetch_1 = require("./recording_fetch");
|
|
41
|
-
function createLLMClient(config, source, options = {}) {
|
|
42
|
-
const { runId = null, reportDir, maxRecords } = options;
|
|
43
|
-
const modelConfig = config.model.unified;
|
|
44
|
-
const dbPath = reportDir
|
|
45
|
-
? path.join(reportDir, 'api_records.json')
|
|
46
|
-
: path.join(process.cwd(), 'logs', 'api_records.json');
|
|
47
|
-
const recorder = new recorder_1.LLMTrafficRecorder(dbPath, maxRecords);
|
|
48
|
-
recorder.initStore();
|
|
49
|
-
const recordingFetch = (0, recording_fetch_1.createRecordingFetch)(globalThis.fetch, recorder, source, runId);
|
|
50
|
-
const provider = (0, openai_1.createOpenAI)({
|
|
51
|
-
baseURL: modelConfig.baseUrl,
|
|
52
|
-
apiKey: modelConfig.apiKey,
|
|
53
|
-
fetch: recordingFetch,
|
|
54
|
-
});
|
|
55
|
-
const modelSettings = {
|
|
56
|
-
temperature: modelConfig.temperature,
|
|
57
|
-
topP: modelConfig.topP,
|
|
58
|
-
frequencyPenalty: modelConfig.frequencyPenalty,
|
|
59
|
-
maxTokens: modelConfig.maxTokens,
|
|
60
|
-
};
|
|
61
|
-
return { provider, modelSettings, recorder, recordingFetch };
|
|
62
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setStepNumber = setStepNumber;
|
|
4
|
-
exports.getStepNumber = getStepNumber;
|
|
5
|
-
exports.clearStepNumber = clearStepNumber;
|
|
6
|
-
const node_async_hooks_1 = require("node:async_hooks");
|
|
7
|
-
const stepNumberStorage = new node_async_hooks_1.AsyncLocalStorage();
|
|
8
|
-
let globalStepNumber = null;
|
|
9
|
-
function setStepNumber(step) {
|
|
10
|
-
globalStepNumber = step;
|
|
11
|
-
stepNumberStorage.enterWith(step);
|
|
12
|
-
}
|
|
13
|
-
function getStepNumber() {
|
|
14
|
-
const store = stepNumberStorage.getStore();
|
|
15
|
-
if (store !== undefined) {
|
|
16
|
-
return store;
|
|
17
|
-
}
|
|
18
|
-
return globalStepNumber;
|
|
19
|
-
}
|
|
20
|
-
function clearStepNumber() {
|
|
21
|
-
globalStepNumber = null;
|
|
22
|
-
stepNumberStorage.enterWith(null);
|
|
23
|
-
}
|
package/dist/common/dfx/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createLLMClient = exports.RecordingSource = exports.clearStepNumber = exports.getStepNumber = exports.setStepNumber = exports.createRecordingFetch = exports.LLMTrafficRecorder = void 0;
|
|
4
|
-
var recorder_1 = require("./recorder");
|
|
5
|
-
Object.defineProperty(exports, "LLMTrafficRecorder", { enumerable: true, get: function () { return recorder_1.LLMTrafficRecorder; } });
|
|
6
|
-
var recording_fetch_1 = require("./recording_fetch");
|
|
7
|
-
Object.defineProperty(exports, "createRecordingFetch", { enumerable: true, get: function () { return recording_fetch_1.createRecordingFetch; } });
|
|
8
|
-
var context_1 = require("./context");
|
|
9
|
-
Object.defineProperty(exports, "setStepNumber", { enumerable: true, get: function () { return context_1.setStepNumber; } });
|
|
10
|
-
Object.defineProperty(exports, "getStepNumber", { enumerable: true, get: function () { return context_1.getStepNumber; } });
|
|
11
|
-
Object.defineProperty(exports, "clearStepNumber", { enumerable: true, get: function () { return context_1.clearStepNumber; } });
|
|
12
|
-
var source_1 = require("./source");
|
|
13
|
-
Object.defineProperty(exports, "RecordingSource", { enumerable: true, get: function () { return source_1.RecordingSource; } });
|
|
14
|
-
var client_factory_1 = require("./client_factory");
|
|
15
|
-
Object.defineProperty(exports, "createLLMClient", { enumerable: true, get: function () { return client_factory_1.createLLMClient; } });
|