@gnsx/genesys.agent.eval 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/cli.js +1149 -0
- package/dist/bundle/cli.js.map +1 -0
- package/dist/src/args.d.ts +2 -16
- package/dist/src/args.d.ts.map +1 -1
- package/dist/src/args.js +57 -207
- package/dist/src/args.js.map +1 -1
- package/dist/src/{launcher.d.ts → cli.d.ts} +1 -1
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/{launcher.js → cli.js} +5 -11
- package/dist/src/cli.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/tsup.config.d.ts +3 -0
- package/dist/tsup.config.d.ts.map +1 -0
- package/dist/tsup.config.js +13 -0
- package/dist/tsup.config.js.map +1 -0
- package/package.json +20 -16
- package/dist/src/adapters/anthropic-adapter.d.ts +0 -24
- package/dist/src/adapters/anthropic-adapter.d.ts.map +0 -1
- package/dist/src/adapters/anthropic-adapter.js +0 -80
- package/dist/src/adapters/anthropic-adapter.js.map +0 -1
- package/dist/src/adapters/gemini-adapter.d.ts +0 -23
- package/dist/src/adapters/gemini-adapter.d.ts.map +0 -1
- package/dist/src/adapters/gemini-adapter.js +0 -79
- package/dist/src/adapters/gemini-adapter.js.map +0 -1
- package/dist/src/adapters/ollama-adapter.d.ts +0 -28
- package/dist/src/adapters/ollama-adapter.d.ts.map +0 -1
- package/dist/src/adapters/ollama-adapter.js +0 -54
- package/dist/src/adapters/ollama-adapter.js.map +0 -1
- package/dist/src/adapters/openai-adapter.d.ts +0 -24
- package/dist/src/adapters/openai-adapter.d.ts.map +0 -1
- package/dist/src/adapters/openai-adapter.js +0 -80
- package/dist/src/adapters/openai-adapter.js.map +0 -1
- package/dist/src/adapters/pi-adapter.d.ts +0 -27
- package/dist/src/adapters/pi-adapter.d.ts.map +0 -1
- package/dist/src/adapters/pi-adapter.js +0 -136
- package/dist/src/adapters/pi-adapter.js.map +0 -1
- package/dist/src/agent-adapter.d.ts +0 -130
- package/dist/src/agent-adapter.d.ts.map +0 -1
- package/dist/src/agent-adapter.js +0 -134
- package/dist/src/agent-adapter.js.map +0 -1
- package/dist/src/launcher.d.ts.map +0 -1
- package/dist/src/launcher.js.map +0 -1
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pi framework agent adapter.
|
|
3
|
-
*
|
|
4
|
-
* Uses the @mariozechner/pi-coding-agent package for running tests.
|
|
5
|
-
*
|
|
6
|
-
* @module adapters/pi-adapter
|
|
7
|
-
*/
|
|
8
|
-
import { getModel, setBedrockProviderModule } from '@mariozechner/pi-ai';
|
|
9
|
-
import { bedrockProviderModule } from '@mariozechner/pi-ai/bedrock-provider';
|
|
10
|
-
import { createAgentSession, DefaultResourceLoader, getAgentDir, SessionManager, SettingsManager, } from '@mariozechner/pi-coding-agent';
|
|
11
|
-
import { AdapterError, BaseAgentAdapter, registerAdapter, } from '../agent-adapter.js';
|
|
12
|
-
/**
|
|
13
|
-
* Agent adapter that uses the pi framework.
|
|
14
|
-
*
|
|
15
|
-
* This adapter creates a headless agent session and runs tests by sending
|
|
16
|
-
* prompts and collecting responses through the event stream.
|
|
17
|
-
*/
|
|
18
|
-
export class PiAgentAdapter extends BaseAgentAdapter {
|
|
19
|
-
name = 'pi';
|
|
20
|
-
_model;
|
|
21
|
-
_session;
|
|
22
|
-
_resourceLoader;
|
|
23
|
-
constructor() {
|
|
24
|
-
super();
|
|
25
|
-
this._model = 'default';
|
|
26
|
-
// Register Bedrock provider so AWS users can use it without extra setup
|
|
27
|
-
setBedrockProviderModule(bedrockProviderModule);
|
|
28
|
-
}
|
|
29
|
-
get model() {
|
|
30
|
-
return this._model;
|
|
31
|
-
}
|
|
32
|
-
async initialize(config) {
|
|
33
|
-
await super.initialize(config);
|
|
34
|
-
try {
|
|
35
|
-
const agentDir = getAgentDir();
|
|
36
|
-
const settingsManager = SettingsManager.create(config.cwd, agentDir);
|
|
37
|
-
// Create resource loader with minimal configuration
|
|
38
|
-
this._resourceLoader = new DefaultResourceLoader({
|
|
39
|
-
cwd: config.cwd,
|
|
40
|
-
agentDir,
|
|
41
|
-
settingsManager,
|
|
42
|
-
});
|
|
43
|
-
await this._resourceLoader.reload();
|
|
44
|
-
// Resolve model if specified
|
|
45
|
-
let model;
|
|
46
|
-
if (config.model) {
|
|
47
|
-
const provider = (config.provider ?? 'anthropic');
|
|
48
|
-
try {
|
|
49
|
-
model = getModel(provider, config.model);
|
|
50
|
-
this._model = `${provider}/${config.model}`;
|
|
51
|
-
}
|
|
52
|
-
catch {
|
|
53
|
-
console.warn(`Warning: unknown model "${provider}/${config.model}", falling back to default.`);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
// Create in-memory session for evaluation (no persistence)
|
|
57
|
-
const sessionManager = SessionManager.inMemory();
|
|
58
|
-
const { session, modelFallbackMessage } = await createAgentSession({
|
|
59
|
-
cwd: config.cwd,
|
|
60
|
-
...(model ? { model } : {}),
|
|
61
|
-
sessionManager,
|
|
62
|
-
settingsManager,
|
|
63
|
-
resourceLoader: this._resourceLoader,
|
|
64
|
-
});
|
|
65
|
-
if (modelFallbackMessage) {
|
|
66
|
-
console.warn(`Warning: ${modelFallbackMessage}`);
|
|
67
|
-
}
|
|
68
|
-
this._session = session;
|
|
69
|
-
}
|
|
70
|
-
catch (error) {
|
|
71
|
-
throw new AdapterError(`Failed to initialize pi agent: ${error instanceof Error ? error.message : String(error)}`, this.name, error);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
async run(test, suiteContext) {
|
|
75
|
-
this.assertInitialized();
|
|
76
|
-
if (!this._session) {
|
|
77
|
-
throw new AdapterError('Session not initialized', this.name);
|
|
78
|
-
}
|
|
79
|
-
const prompt = this.buildPrompt(test, suiteContext);
|
|
80
|
-
const startTime = Date.now();
|
|
81
|
-
// Collect response text from events
|
|
82
|
-
let responseText = '';
|
|
83
|
-
let isComplete = false;
|
|
84
|
-
// Subscribe to events before sending the prompt
|
|
85
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
86
|
-
const unsubscribe = this._session.subscribe((event) => {
|
|
87
|
-
// Handle different event types - collect text content
|
|
88
|
-
if (event.type === 'message_update' && event.message?.content) {
|
|
89
|
-
const content = event.message.content;
|
|
90
|
-
if (typeof content === 'string') {
|
|
91
|
-
responseText = content;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
// Check for completion
|
|
95
|
-
if (event.type === 'turn_end' || event.type === 'message_end') {
|
|
96
|
-
isComplete = true;
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
try {
|
|
100
|
-
// Send the prompt
|
|
101
|
-
await this._session.prompt(prompt, { source: 'rpc' });
|
|
102
|
-
// Wait for completion with timeout
|
|
103
|
-
const timeout = 120000; // 2 minutes
|
|
104
|
-
const pollInterval = 100; // 100ms
|
|
105
|
-
const startWait = Date.now();
|
|
106
|
-
while (!isComplete && Date.now() - startWait < timeout) {
|
|
107
|
-
await new Promise(resolve => setTimeout(resolve, pollInterval));
|
|
108
|
-
}
|
|
109
|
-
const durationMs = Date.now() - startTime;
|
|
110
|
-
return {
|
|
111
|
-
output: responseText,
|
|
112
|
-
metadata: {
|
|
113
|
-
model: this._model,
|
|
114
|
-
durationMs,
|
|
115
|
-
},
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
catch (error) {
|
|
119
|
-
throw new AdapterError(`Test execution failed: ${error instanceof Error ? error.message : String(error)}`, this.name, error);
|
|
120
|
-
}
|
|
121
|
-
finally {
|
|
122
|
-
unsubscribe();
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
async dispose() {
|
|
126
|
-
if (this._session) {
|
|
127
|
-
// Clean up session if needed
|
|
128
|
-
this._session = undefined;
|
|
129
|
-
}
|
|
130
|
-
this._resourceLoader = undefined;
|
|
131
|
-
await super.dispose();
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
// Register the adapter
|
|
135
|
-
registerAdapter('pi', () => new PiAgentAdapter());
|
|
136
|
-
//# sourceMappingURL=pi-adapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pi-adapter.js","sourceRoot":"","sources":["../../../src/adapters/pi-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,cAAc,EACd,eAAe,GAEhB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAG7B;;;;;GAKG;AACH,MAAM,OAAO,cAAe,SAAQ,gBAAgB;IACzC,IAAI,GAAG,IAAI,CAAC;IAEb,MAAM,CAAS;IACf,QAAQ,CAAgB;IACxB,eAAe,CAAyB;IAEhD;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QAExB,wEAAwE;QACxE,wBAAwB,CAAC,qBAAqB,CAAC,CAAC;IAClD,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,MAAmB;QAClC,MAAM,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAE/B,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;YAC/B,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YAErE,oDAAoD;YACpD,IAAI,CAAC,eAAe,GAAG,IAAI,qBAAqB,CAAC;gBAC/C,GAAG,EAAE,MAAM,CAAC,GAAG;gBACf,QAAQ;gBACR,eAAe;aAChB,CAAC,CAAC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creating adapters.
|
|
3
|
-
*
|
|
4
|
-
* The adapter pattern allows the eval harness to work with different
|
|
5
|
-
* agent backends (pi framework, direct Anthropic, OpenAI, etc.) through
|
|
6
|
-
* a common interface.
|
|
7
|
-
*
|
|
8
|
-
* @module agent-adapter
|
|
9
|
-
*/
|
|
10
|
-
import type { AgentConfig, AgentResponse, TestCase } from './types.js';
|
|
11
|
-
/**
|
|
12
|
-
* Interface that all agent adapters must implement.
|
|
13
|
-
*
|
|
14
|
-
* Adapters are responsible for:
|
|
15
|
-
* - Initializing the agent with configuration
|
|
16
|
-
* - Running test cases and returning responses
|
|
17
|
-
* - Cleaning up resources when done
|
|
18
|
-
*/
|
|
19
|
-
export interface AgentAdapter {
|
|
20
|
-
/** Human-readable name of this adapter */
|
|
21
|
-
readonly name: string;
|
|
22
|
-
/** Model identifier being used */
|
|
23
|
-
readonly model: string;
|
|
24
|
-
/**
|
|
25
|
-
* Initialize the adapter with the given configuration.
|
|
26
|
-
*
|
|
27
|
-
* @param config - Agent configuration
|
|
28
|
-
* @throws Error if initialization fails
|
|
29
|
-
*/
|
|
30
|
-
initialize(config: AgentConfig): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Run a test case through the agent.
|
|
33
|
-
*
|
|
34
|
-
* @param test - The test case to run
|
|
35
|
-
* @param suiteContext - Optional global context from the test suite
|
|
36
|
-
* @returns The agent's response
|
|
37
|
-
* @throws Error if execution fails
|
|
38
|
-
*/
|
|
39
|
-
run(test: TestCase, suiteContext?: string): Promise<AgentResponse>;
|
|
40
|
-
/**
|
|
41
|
-
* Clean up any resources used by the adapter.
|
|
42
|
-
*/
|
|
43
|
-
dispose(): Promise<void>;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Factory function type for creating agent adapters.
|
|
47
|
-
*/
|
|
48
|
-
export type AdapterFactory = () => AgentAdapter;
|
|
49
|
-
/**
|
|
50
|
-
* Register an adapter factory for a given agent name.
|
|
51
|
-
*
|
|
52
|
-
* @param name - The agent name/identifier
|
|
53
|
-
* @param factory - Factory function that creates the adapter
|
|
54
|
-
*
|
|
55
|
-
* @example
|
|
56
|
-
* ```typescript
|
|
57
|
-
* registerAdapter('anthropic', () => new AnthropicAdapter());
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
export declare function registerAdapter(name: string, factory: AdapterFactory): void;
|
|
61
|
-
/**
|
|
62
|
-
* Create an agent adapter by name.
|
|
63
|
-
*
|
|
64
|
-
* @param name - The agent name (e.g., 'pi', 'anthropic', 'openai')
|
|
65
|
-
* @returns A new adapter instance
|
|
66
|
-
* @throws Error if the adapter name is not registered
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```typescript
|
|
70
|
-
* const adapter = createAdapter('anthropic');
|
|
71
|
-
* await adapter.initialize({ cwd: process.cwd(), model: 'claude-3-5-sonnet' });
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
|
-
export declare function createAdapter(name: string): AgentAdapter;
|
|
75
|
-
/**
|
|
76
|
-
* Get a list of available adapter names.
|
|
77
|
-
*
|
|
78
|
-
* @returns Array of registered adapter names
|
|
79
|
-
*/
|
|
80
|
-
export declare function getAvailableAdapters(): string[];
|
|
81
|
-
/**
|
|
82
|
-
* Check if an adapter is registered for the given name.
|
|
83
|
-
*
|
|
84
|
-
* @param name - The adapter name to check
|
|
85
|
-
* @returns True if the adapter is available
|
|
86
|
-
*/
|
|
87
|
-
export declare function isAdapterAvailable(name: string): boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Error thrown when an adapter operation fails.
|
|
90
|
-
*/
|
|
91
|
-
export declare class AdapterError extends Error {
|
|
92
|
-
readonly adapterName: string;
|
|
93
|
-
readonly cause?: unknown | undefined;
|
|
94
|
-
constructor(message: string, adapterName: string, cause?: unknown | undefined);
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Error thrown when an adapter is not properly initialized.
|
|
98
|
-
*/
|
|
99
|
-
export declare class AdapterNotInitializedError extends AdapterError {
|
|
100
|
-
constructor(adapterName: string);
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Base class for agent adapters with common functionality.
|
|
104
|
-
*
|
|
105
|
-
* Extend this class when implementing new adapters.
|
|
106
|
-
*/
|
|
107
|
-
export declare abstract class BaseAgentAdapter implements AgentAdapter {
|
|
108
|
-
protected _config?: AgentConfig;
|
|
109
|
-
protected _initialized: boolean;
|
|
110
|
-
abstract readonly name: string;
|
|
111
|
-
abstract readonly model: string;
|
|
112
|
-
/**
|
|
113
|
-
* Build the full prompt from test case and suite context.
|
|
114
|
-
*
|
|
115
|
-
* @param test - The test case
|
|
116
|
-
* @param suiteContext - Optional global context
|
|
117
|
-
* @returns The combined prompt string
|
|
118
|
-
*/
|
|
119
|
-
protected buildPrompt(test: TestCase, suiteContext?: string): string;
|
|
120
|
-
initialize(config: AgentConfig): Promise<void>;
|
|
121
|
-
abstract run(test: TestCase, suiteContext?: string): Promise<AgentResponse>;
|
|
122
|
-
dispose(): Promise<void>;
|
|
123
|
-
/**
|
|
124
|
-
* Assert that the adapter is initialized.
|
|
125
|
-
*
|
|
126
|
-
* @throws AdapterNotInitializedError if not initialized
|
|
127
|
-
*/
|
|
128
|
-
protected assertInitialized(): void;
|
|
129
|
-
}
|
|
130
|
-
//# sourceMappingURL=agent-adapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-adapter.d.ts","sourceRoot":"","sources":["../../src/agent-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEvE;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,0CAA0C;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,kCAAkC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;IACH,UAAU,CAAC,MAA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CAAC,EAAE,MAAM,GAAG,MAAM;IAgB9D,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAKpD,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAErE,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAK9B;;;;OAIG;IACH,SAAS,CAAC,iBAAiB,IAAI,IAAI;CAKpC"}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Agent adapter interface and factory for creating adapters.
|
|
3
|
-
*
|
|
4
|
-
* The adapter pattern allows the eval harness to work with different
|
|
5
|
-
* agent backends (pi framework, direct Anthropic, OpenAI, etc.) through
|
|
6
|
-
* a common interface.
|
|
7
|
-
*
|
|
8
|
-
* @module agent-adapter
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Registry of available agent adapters.
|
|
12
|
-
*/
|
|
13
|
-
const adapterRegistry = new Map();
|
|
14
|
-
/**
|
|
15
|
-
* Register an adapter factory for a given agent name.
|
|
16
|
-
*
|
|
17
|
-
* @param name - The agent name/identifier
|
|
18
|
-
* @param factory - Factory function that creates the adapter
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```typescript
|
|
22
|
-
* registerAdapter('anthropic', () => new AnthropicAdapter());
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export function registerAdapter(name, factory) {
|
|
26
|
-
adapterRegistry.set(name, factory);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Create an agent adapter by name.
|
|
30
|
-
*
|
|
31
|
-
* @param name - The agent name (e.g., 'pi', 'anthropic', 'openai')
|
|
32
|
-
* @returns A new adapter instance
|
|
33
|
-
* @throws Error if the adapter name is not registered
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```typescript
|
|
37
|
-
* const adapter = createAdapter('anthropic');
|
|
38
|
-
* await adapter.initialize({ cwd: process.cwd(), model: 'claude-3-5-sonnet' });
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
export function createAdapter(name) {
|
|
42
|
-
const factory = adapterRegistry.get(name);
|
|
43
|
-
if (!factory) {
|
|
44
|
-
const available = Array.from(adapterRegistry.keys()).join(', ');
|
|
45
|
-
throw new Error(`Unknown agent adapter: "${name}". ` +
|
|
46
|
-
`Available adapters: ${available || 'none registered'}`);
|
|
47
|
-
}
|
|
48
|
-
return factory();
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Get a list of available adapter names.
|
|
52
|
-
*
|
|
53
|
-
* @returns Array of registered adapter names
|
|
54
|
-
*/
|
|
55
|
-
export function getAvailableAdapters() {
|
|
56
|
-
return Array.from(adapterRegistry.keys());
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Check if an adapter is registered for the given name.
|
|
60
|
-
*
|
|
61
|
-
* @param name - The adapter name to check
|
|
62
|
-
* @returns True if the adapter is available
|
|
63
|
-
*/
|
|
64
|
-
export function isAdapterAvailable(name) {
|
|
65
|
-
return adapterRegistry.has(name);
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Error thrown when an adapter operation fails.
|
|
69
|
-
*/
|
|
70
|
-
export class AdapterError extends Error {
|
|
71
|
-
adapterName;
|
|
72
|
-
cause;
|
|
73
|
-
constructor(message, adapterName, cause) {
|
|
74
|
-
super(message);
|
|
75
|
-
this.adapterName = adapterName;
|
|
76
|
-
this.cause = cause;
|
|
77
|
-
this.name = 'AdapterError';
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Error thrown when an adapter is not properly initialized.
|
|
82
|
-
*/
|
|
83
|
-
export class AdapterNotInitializedError extends AdapterError {
|
|
84
|
-
constructor(adapterName) {
|
|
85
|
-
super(`Adapter "${adapterName}" is not initialized. Call initialize() before using.`, adapterName);
|
|
86
|
-
this.name = 'AdapterNotInitializedError';
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Base class for agent adapters with common functionality.
|
|
91
|
-
*
|
|
92
|
-
* Extend this class when implementing new adapters.
|
|
93
|
-
*/
|
|
94
|
-
export class BaseAgentAdapter {
|
|
95
|
-
_config;
|
|
96
|
-
_initialized = false;
|
|
97
|
-
/**
|
|
98
|
-
* Build the full prompt from test case and suite context.
|
|
99
|
-
*
|
|
100
|
-
* @param test - The test case
|
|
101
|
-
* @param suiteContext - Optional global context
|
|
102
|
-
* @returns The combined prompt string
|
|
103
|
-
*/
|
|
104
|
-
buildPrompt(test, suiteContext) {
|
|
105
|
-
const parts = [];
|
|
106
|
-
if (suiteContext) {
|
|
107
|
-
parts.push('Context:', suiteContext, '');
|
|
108
|
-
}
|
|
109
|
-
if (test.context) {
|
|
110
|
-
parts.push('Specific Context:', test.context, '');
|
|
111
|
-
}
|
|
112
|
-
parts.push('Task:', test.input);
|
|
113
|
-
return parts.join('\n');
|
|
114
|
-
}
|
|
115
|
-
async initialize(config) {
|
|
116
|
-
this._config = config;
|
|
117
|
-
this._initialized = true;
|
|
118
|
-
}
|
|
119
|
-
async dispose() {
|
|
120
|
-
this._initialized = false;
|
|
121
|
-
this._config = undefined;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Assert that the adapter is initialized.
|
|
125
|
-
*
|
|
126
|
-
* @throws AdapterNotInitializedError if not initialized
|
|
127
|
-
*/
|
|
128
|
-
assertInitialized() {
|
|
129
|
-
if (!this._initialized) {
|
|
130
|
-
throw new AdapterNotInitializedError(this.name);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
//# sourceMappingURL=agent-adapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-adapter.js","sourceRoot":"","sources":["../../src/agent-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgDH;;GAEG;AACH,MAA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