@agentplat/runtime-mock 0.2.0-beta.1 → 0.2.0-beta.11
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 +10 -1
- package/dist/index.d.ts +12 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +45 -10
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -8,8 +8,17 @@ For UI and transport tests it also supports ordered `responses`, exact
|
|
|
8
8
|
`failAtCall`. The final scripted response is reused after the sequence is
|
|
9
9
|
exhausted, keeping repeated tests deterministic.
|
|
10
10
|
|
|
11
|
+
Multi-agent simulations can use `responsesByAgent` or
|
|
12
|
+
`streamEventsByAgent`. Each agent has an independent invocation counter, so
|
|
13
|
+
reordering speakers does not consume the wrong response tape.
|
|
14
|
+
|
|
11
15
|
```ts
|
|
12
16
|
import { createMockRuntime } from '@agentplat/runtime-mock';
|
|
13
17
|
|
|
14
|
-
const runtime = createMockRuntime(
|
|
18
|
+
const runtime = createMockRuntime({
|
|
19
|
+
responsesByAgent: {
|
|
20
|
+
buyer: ['Offer 1', 'Offer 2'],
|
|
21
|
+
seller: ['Counter 1', 'Counter 2'],
|
|
22
|
+
},
|
|
23
|
+
});
|
|
15
24
|
```
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { JsonObject, JsonValue } from '@agentplat/core';
|
|
2
|
-
import { DefaultAgentRuntime, type AgentDefinition, type AgentProvider, type AgentRunInput, type AgentRunResult, type AgentStreamEvent, type RuntimeExecutionContext } from '@agentplat/runtime';
|
|
1
|
+
import type { AgentPlatID, JsonObject, JsonValue } from '@agentplat/core';
|
|
2
|
+
import { DefaultAgentRuntime, type AgentCompletionPayload, type AgentDefinition, type AgentProvider, type AgentRunInput, type AgentRunResult, type AgentStreamEvent, type RuntimeExecutionContext } from '@agentplat/runtime';
|
|
3
3
|
/** A scripted response consumed by one mock invocation. */
|
|
4
4
|
export interface MockAgentResponse {
|
|
5
5
|
output: string;
|
|
@@ -7,14 +7,20 @@ export interface MockAgentResponse {
|
|
|
7
7
|
result?: JsonObject;
|
|
8
8
|
errorMessage?: string;
|
|
9
9
|
metadata?: JsonObject;
|
|
10
|
+
/** Optional normalized details emitted on the completed stream event. */
|
|
11
|
+
completion?: AgentCompletionPayload;
|
|
10
12
|
}
|
|
11
13
|
/** Deterministic behavior configured for a `MockAgentProvider` instance. */
|
|
12
14
|
export interface MockAgentProviderOptions {
|
|
13
15
|
outputPrefix?: string;
|
|
14
16
|
/** Responses are consumed in order; the final response is reused afterwards. */
|
|
15
17
|
responses?: Array<string | MockAgentResponse>;
|
|
18
|
+
/** Per-agent response tapes with independent invocation counters. */
|
|
19
|
+
responsesByAgent?: Record<AgentPlatID, Array<string | MockAgentResponse>>;
|
|
16
20
|
/** Exact stream events, useful for deterministic UI and transport tests. */
|
|
17
21
|
streamEvents?: AgentStreamEvent[];
|
|
22
|
+
/** Per-agent stream event tapes, indexed first by agent and then invocation. */
|
|
23
|
+
streamEventsByAgent?: Record<AgentPlatID, AgentStreamEvent[][]>;
|
|
18
24
|
/** Token chunks used when streamEvents is not provided. */
|
|
19
25
|
streamTokens?: string[];
|
|
20
26
|
tokenDelayMs?: number;
|
|
@@ -38,11 +44,14 @@ export interface MockAgentProviderOptions {
|
|
|
38
44
|
export declare class MockAgentProvider implements AgentProvider {
|
|
39
45
|
private readonly options;
|
|
40
46
|
private invocation;
|
|
47
|
+
private readonly invocationsByAgent;
|
|
41
48
|
constructor(options?: MockAgentProviderOptions);
|
|
42
|
-
run(
|
|
49
|
+
run(agent: Parameters<AgentProvider['run']>[0], input: AgentRunInput, executionContext: Parameters<AgentProvider['run']>[2]): Promise<AgentRunResult>;
|
|
43
50
|
stream(_agent: AgentDefinition, input: AgentRunInput, executionContext: RuntimeExecutionContext): AsyncIterable<AgentStreamEvent>;
|
|
44
51
|
private readInstruction;
|
|
45
52
|
private scriptedResponse;
|
|
53
|
+
private scriptedStreamEvents;
|
|
54
|
+
private nextAgentCall;
|
|
46
55
|
private assertActive;
|
|
47
56
|
private delay;
|
|
48
57
|
}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC7B,MAAM,oBAAoB,CAAC;AAE5B,2DAA2D;AAC3D,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;IAChC,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,yEAAyE;IACzE,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACrC;AAED,4EAA4E;AAC5E,MAAM,WAAW,wBAAwB;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,iBAAiB,CAAC,CAAC;IAC9C,qEAAqE;IACrE,gBAAgB,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,MAAM,GAAG,iBAAiB,CAAC,CAAC,CAAC;IAC1E,4EAA4E;IAC5E,YAAY,CAAC,EAAE,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N,KAAK;CAgBpB;AAcD,6EAA6E;AAC7E,wBAAgB,iBAAiB,CAC/B,OAAO,GAAE,wBAA6B,GACrC,mBAAmB,CAIrB"}
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { DefaultAgentRuntime, } from '@agentplat/runtime';
|
|
|
8
8
|
export class MockAgentProvider {
|
|
9
9
|
options;
|
|
10
10
|
invocation = 0;
|
|
11
|
+
invocationsByAgent = new Map();
|
|
11
12
|
constructor(options = {}) {
|
|
12
13
|
this.options = options;
|
|
13
14
|
if (options.tokenDelayMs !== undefined &&
|
|
@@ -19,19 +20,25 @@ export class MockAgentProvider {
|
|
|
19
20
|
throw new TypeError('failAtCall must be a positive integer');
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
|
-
async run(
|
|
23
|
+
async run(agent, input, executionContext) {
|
|
23
24
|
this.assertActive(executionContext.signal);
|
|
24
25
|
const call = ++this.invocation;
|
|
26
|
+
const agentCall = this.nextAgentCall(agent.id);
|
|
25
27
|
await this.delay(executionContext.signal);
|
|
26
28
|
if (this.options.failAtCall === call) {
|
|
27
29
|
return {
|
|
28
30
|
runId: executionContext.runId,
|
|
29
31
|
status: 'failed',
|
|
30
32
|
errorMessage: `Mock failure at call ${call}`,
|
|
31
|
-
metadata: {
|
|
33
|
+
metadata: {
|
|
34
|
+
provider: 'mock',
|
|
35
|
+
deterministic: true,
|
|
36
|
+
call,
|
|
37
|
+
agentCall,
|
|
38
|
+
},
|
|
32
39
|
};
|
|
33
40
|
}
|
|
34
|
-
const scripted = this.scriptedResponse(call);
|
|
41
|
+
const scripted = this.scriptedResponse(agent.id, agentCall, call);
|
|
35
42
|
if (scripted) {
|
|
36
43
|
return {
|
|
37
44
|
runId: executionContext.runId,
|
|
@@ -44,6 +51,7 @@ export class MockAgentProvider {
|
|
|
44
51
|
provider: 'mock',
|
|
45
52
|
deterministic: true,
|
|
46
53
|
call,
|
|
54
|
+
agentCall,
|
|
47
55
|
},
|
|
48
56
|
};
|
|
49
57
|
}
|
|
@@ -75,14 +83,22 @@ export class MockAgentProvider {
|
|
|
75
83
|
? produced.content
|
|
76
84
|
: JSON.stringify(produced.content),
|
|
77
85
|
result: { artifact },
|
|
78
|
-
metadata: {
|
|
86
|
+
metadata: {
|
|
87
|
+
provider: 'mock',
|
|
88
|
+
deterministic: true,
|
|
89
|
+
call,
|
|
90
|
+
agentCall,
|
|
91
|
+
},
|
|
79
92
|
};
|
|
80
93
|
}
|
|
81
94
|
async *stream(_agent, input, executionContext) {
|
|
82
95
|
this.assertActive(executionContext.signal);
|
|
83
96
|
const call = ++this.invocation;
|
|
84
|
-
|
|
85
|
-
|
|
97
|
+
const agentCall = this.nextAgentCall(_agent.id);
|
|
98
|
+
const exactEvents = this.scriptedStreamEvents(_agent.id, agentCall) ??
|
|
99
|
+
this.options.streamEvents;
|
|
100
|
+
if (exactEvents) {
|
|
101
|
+
for (const event of exactEvents) {
|
|
86
102
|
await this.delay(executionContext.signal);
|
|
87
103
|
yield {
|
|
88
104
|
...event,
|
|
@@ -100,7 +116,7 @@ export class MockAgentProvider {
|
|
|
100
116
|
};
|
|
101
117
|
return;
|
|
102
118
|
}
|
|
103
|
-
const scripted = this.scriptedResponse(call);
|
|
119
|
+
const scripted = this.scriptedResponse(_agent.id, agentCall, call);
|
|
104
120
|
const output = scripted?.output ??
|
|
105
121
|
`${this.options.outputPrefix ?? 'Mock output'}: ${this.readInstruction(Array.isArray(input.input) ? input.input[0] : undefined) ?? String(input.input)}`;
|
|
106
122
|
const tokens = this.options.streamTokens ?? tokenize(output);
|
|
@@ -124,6 +140,7 @@ export class MockAgentProvider {
|
|
|
124
140
|
type: 'completed',
|
|
125
141
|
runId: executionContext.runId,
|
|
126
142
|
content: output,
|
|
143
|
+
payload: scripted?.completion,
|
|
127
144
|
};
|
|
128
145
|
}
|
|
129
146
|
readInstruction(context) {
|
|
@@ -132,12 +149,26 @@ export class MockAgentProvider {
|
|
|
132
149
|
return undefined;
|
|
133
150
|
return typeof task.instruction === 'string' ? task.instruction : undefined;
|
|
134
151
|
}
|
|
135
|
-
scriptedResponse(
|
|
152
|
+
scriptedResponse(agentId, agentCall, globalCall) {
|
|
153
|
+
const agentResponses = this.options.responsesByAgent?.[agentId];
|
|
154
|
+
if (agentResponses?.length) {
|
|
155
|
+
return selectedResponse(agentResponses, agentCall);
|
|
156
|
+
}
|
|
136
157
|
const responses = this.options.responses;
|
|
137
158
|
if (!responses?.length)
|
|
138
159
|
return undefined;
|
|
139
|
-
|
|
140
|
-
|
|
160
|
+
return selectedResponse(responses, globalCall);
|
|
161
|
+
}
|
|
162
|
+
scriptedStreamEvents(agentId, agentCall) {
|
|
163
|
+
const invocations = this.options.streamEventsByAgent?.[agentId];
|
|
164
|
+
if (!invocations?.length)
|
|
165
|
+
return undefined;
|
|
166
|
+
return invocations[Math.min(agentCall - 1, invocations.length - 1)];
|
|
167
|
+
}
|
|
168
|
+
nextAgentCall(agentId) {
|
|
169
|
+
const call = (this.invocationsByAgent.get(agentId) ?? 0) + 1;
|
|
170
|
+
this.invocationsByAgent.set(agentId, call);
|
|
171
|
+
return call;
|
|
141
172
|
}
|
|
142
173
|
assertActive(signal) {
|
|
143
174
|
if (signal?.aborted) {
|
|
@@ -162,6 +193,10 @@ export class MockAgentProvider {
|
|
|
162
193
|
});
|
|
163
194
|
}
|
|
164
195
|
}
|
|
196
|
+
function selectedResponse(responses, call) {
|
|
197
|
+
const selected = responses[Math.min(call - 1, responses.length - 1)];
|
|
198
|
+
return typeof selected === 'string' ? { output: selected } : selected;
|
|
199
|
+
}
|
|
165
200
|
function tokenize(output) {
|
|
166
201
|
return output.match(/\S+\s*/g) ?? (output ? [output] : []);
|
|
167
202
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/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|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.11",
|
|
4
4
|
"description": "Deterministic mock agent runtime for AgentPlat development and tests.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"README.md"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@agentplat/core": "^0.2.0-beta.
|
|
22
|
-
"@agentplat/runtime": "^0.2.0-beta.
|
|
21
|
+
"@agentplat/core": "^0.2.0-beta.11",
|
|
22
|
+
"@agentplat/runtime": "^0.2.0-beta.11"
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|