@a5c-ai/agent-mux-harness-mock 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -0
  3. package/dist/bin/mock-harness.d.ts +33 -0
  4. package/dist/bin/mock-harness.d.ts.map +1 -0
  5. package/dist/bin/mock-harness.js +165 -0
  6. package/dist/bin/mock-harness.js.map +1 -0
  7. package/dist/index.d.ts +25 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +32 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/mock-process.d.ts +47 -0
  12. package/dist/mock-process.d.ts.map +1 -0
  13. package/dist/mock-process.js +207 -0
  14. package/dist/mock-process.js.map +1 -0
  15. package/dist/probe.d.ts +60 -0
  16. package/dist/probe.d.ts.map +1 -0
  17. package/dist/probe.js +168 -0
  18. package/dist/probe.js.map +1 -0
  19. package/dist/scenarios/errors.d.ts +22 -0
  20. package/dist/scenarios/errors.d.ts.map +1 -0
  21. package/dist/scenarios/errors.js +73 -0
  22. package/dist/scenarios/errors.js.map +1 -0
  23. package/dist/scenarios/hooks.d.ts +13 -0
  24. package/dist/scenarios/hooks.d.ts.map +1 -0
  25. package/dist/scenarios/hooks.js +61 -0
  26. package/dist/scenarios/hooks.js.map +1 -0
  27. package/dist/scenarios/index.d.ts +23 -0
  28. package/dist/scenarios/index.d.ts.map +1 -0
  29. package/dist/scenarios/index.js +47 -0
  30. package/dist/scenarios/index.js.map +1 -0
  31. package/dist/scenarios/interactive.d.ts +18 -0
  32. package/dist/scenarios/interactive.d.ts.map +1 -0
  33. package/dist/scenarios/interactive.js +46 -0
  34. package/dist/scenarios/interactive.js.map +1 -0
  35. package/dist/scenarios/per-agent.d.ts +46 -0
  36. package/dist/scenarios/per-agent.d.ts.map +1 -0
  37. package/dist/scenarios/per-agent.js +150 -0
  38. package/dist/scenarios/per-agent.js.map +1 -0
  39. package/dist/scenarios/wire-format.d.ts +36 -0
  40. package/dist/scenarios/wire-format.d.ts.map +1 -0
  41. package/dist/scenarios/wire-format.js +96 -0
  42. package/dist/scenarios/wire-format.js.map +1 -0
  43. package/dist/scenarios.d.ts +30 -0
  44. package/dist/scenarios.d.ts.map +1 -0
  45. package/dist/scenarios.js +141 -0
  46. package/dist/scenarios.js.map +1 -0
  47. package/dist/types.d.ts +144 -0
  48. package/dist/types.d.ts.map +1 -0
  49. package/dist/types.js +9 -0
  50. package/dist/types.js.map +1 -0
  51. package/dist/workspace.d.ts +53 -0
  52. package/dist/workspace.d.ts.map +1 -0
  53. package/dist/workspace.js +157 -0
  54. package/dist/workspace.js.map +1 -0
  55. package/package.json +58 -0
@@ -0,0 +1,150 @@
1
+ /**
2
+ * Per-agent scenario presets.
3
+ *
4
+ * Each of the 10 built-in agents has at least two presets emitting realistic
5
+ * wire output (text deltas, tool calls, completion). Output strings come from
6
+ * the deterministic wire-format helpers so the real adapter parseEvent logic
7
+ * will parse them faithfully.
8
+ */
9
+ import { claudeSystemInit, claudeAssistantText, claudeToolUse, claudeToolResult, claudeResult, codexMessage, codexFunctionCall, codexFunctionCallOutput, geminiText, genericText, genericToolCall, stdoutChunk, } from './wire-format.js';
10
+ // ---------------------------------------------------------------------------
11
+ // Claude Code
12
+ // ---------------------------------------------------------------------------
13
+ export const claudeBasicText = {
14
+ harness: 'claude-code',
15
+ name: 'claude:basic-text',
16
+ process: { exitCode: 0 },
17
+ output: [
18
+ stdoutChunk(claudeSystemInit('sess_claude_basic', []), 5),
19
+ stdoutChunk(claudeAssistantText('Hello! '), 20),
20
+ stdoutChunk(claudeAssistantText('How can I help?'), 20),
21
+ stdoutChunk(claudeResult('sess_claude_basic', 'done', { total_usd: 0.001, input_tokens: 10, output_tokens: 5 }), 10),
22
+ ],
23
+ };
24
+ export const claudeToolCall = {
25
+ harness: 'claude-code',
26
+ name: 'claude:tool-call',
27
+ process: { exitCode: 0 },
28
+ output: [
29
+ stdoutChunk(claudeSystemInit('sess_claude_tool', ['Read']), 5),
30
+ stdoutChunk(claudeAssistantText('Let me read that file.'), 20),
31
+ stdoutChunk(claudeToolUse({ id: 't1', name: 'Read', input: { file_path: '/tmp/x.txt' } }), 20),
32
+ stdoutChunk(claudeToolResult('t1', 'file contents'), 20),
33
+ stdoutChunk(claudeAssistantText('Got it.'), 10),
34
+ stdoutChunk(claudeResult('sess_claude_tool', 'done'), 10),
35
+ ],
36
+ };
37
+ export const claudeMultiTurn = {
38
+ harness: 'claude-code',
39
+ name: 'claude:multi-turn',
40
+ process: { exitCode: 0 },
41
+ output: [
42
+ stdoutChunk(claudeSystemInit('sess_claude_multi', []), 5),
43
+ stdoutChunk(claudeAssistantText('Turn 1.'), 10),
44
+ stdoutChunk(claudeAssistantText('Turn 2.'), 10),
45
+ stdoutChunk(claudeAssistantText('Turn 3.'), 10),
46
+ stdoutChunk(claudeResult('sess_claude_multi', 'done'), 10),
47
+ ],
48
+ };
49
+ // ---------------------------------------------------------------------------
50
+ // Codex
51
+ // ---------------------------------------------------------------------------
52
+ export const codexBasicText = {
53
+ harness: 'codex',
54
+ name: 'codex:basic-text',
55
+ process: { exitCode: 0 },
56
+ output: [
57
+ stdoutChunk(codexMessage('Here is the answer.'), 20),
58
+ stdoutChunk(JSON.stringify({ type: 'completed', status: 'completed' }) + '\n', 10),
59
+ ],
60
+ };
61
+ export const codexCodeGeneration = {
62
+ harness: 'codex',
63
+ name: 'codex:code-generation',
64
+ process: { exitCode: 0 },
65
+ output: [
66
+ stdoutChunk(codexMessage('Generating code.'), 15),
67
+ stdoutChunk(codexFunctionCall({ id: 'call_1', name: 'apply_patch', input: { patch: '+ const x = 1;' } }), 15),
68
+ stdoutChunk(codexFunctionCallOutput('call_1', 'patch applied'), 15),
69
+ stdoutChunk(codexMessage('Done.'), 10),
70
+ ],
71
+ };
72
+ // ---------------------------------------------------------------------------
73
+ // Gemini
74
+ // ---------------------------------------------------------------------------
75
+ export const geminiBasicText = {
76
+ harness: 'gemini',
77
+ name: 'gemini:basic-text',
78
+ process: { exitCode: 0 },
79
+ output: [
80
+ stdoutChunk(geminiText('Gemini says hi.'), 15),
81
+ ],
82
+ };
83
+ export const geminiStreaming = {
84
+ harness: 'gemini',
85
+ name: 'gemini:streaming',
86
+ process: { exitCode: 0 },
87
+ output: [
88
+ stdoutChunk(geminiText('Streaming '), 10),
89
+ stdoutChunk(geminiText('piece '), 10),
90
+ stdoutChunk(geminiText('by piece.'), 10),
91
+ stdoutChunk(JSON.stringify({ type: 'tool_call', id: 'g1', name: 'search', args: { q: 'x' } }) + '\n', 10),
92
+ ],
93
+ };
94
+ // ---------------------------------------------------------------------------
95
+ // Generic agent scenario factory
96
+ // ---------------------------------------------------------------------------
97
+ function genericPair(harness, label) {
98
+ const basic = {
99
+ harness,
100
+ name: `${label}:basic-text`,
101
+ process: { exitCode: 0 },
102
+ output: [
103
+ stdoutChunk(genericText(`Hello from ${label}.`), 15),
104
+ ],
105
+ };
106
+ const tool = {
107
+ harness,
108
+ name: `${label}:tool-call`,
109
+ process: { exitCode: 0 },
110
+ output: [
111
+ stdoutChunk(genericText(`${label} invoking tool.`), 10),
112
+ stdoutChunk(genericToolCall({ id: `${label}-t1`, name: 'run', input: { x: 1 } }), 10),
113
+ ],
114
+ };
115
+ return { basic, tool };
116
+ }
117
+ export const copilotScenarios = genericPair('copilot', 'copilot');
118
+ export const cursorScenarios = genericPair('cursor', 'cursor');
119
+ export const opencodeScenarios = genericPair('opencode', 'opencode');
120
+ export const piScenarios = genericPair('pi', 'pi');
121
+ export const ompScenarios = genericPair('omp', 'omp');
122
+ export const openclawScenarios = genericPair('openclaw', 'openclaw');
123
+ export const hermesScenarios = genericPair('hermes', 'hermes');
124
+ // ---------------------------------------------------------------------------
125
+ // Registry (name -> scenario)
126
+ // ---------------------------------------------------------------------------
127
+ export const AGENT_SCENARIOS = {
128
+ 'claude:basic-text': claudeBasicText,
129
+ 'claude:tool-call': claudeToolCall,
130
+ 'claude:multi-turn': claudeMultiTurn,
131
+ 'codex:basic-text': codexBasicText,
132
+ 'codex:code-generation': codexCodeGeneration,
133
+ 'gemini:basic-text': geminiBasicText,
134
+ 'gemini:streaming': geminiStreaming,
135
+ 'copilot:basic-text': copilotScenarios.basic,
136
+ 'copilot:tool-call': copilotScenarios.tool,
137
+ 'cursor:basic-text': cursorScenarios.basic,
138
+ 'cursor:tool-call': cursorScenarios.tool,
139
+ 'opencode:basic-text': opencodeScenarios.basic,
140
+ 'opencode:tool-call': opencodeScenarios.tool,
141
+ 'pi:basic-text': piScenarios.basic,
142
+ 'pi:tool-call': piScenarios.tool,
143
+ 'omp:basic-text': ompScenarios.basic,
144
+ 'omp:tool-call': ompScenarios.tool,
145
+ 'openclaw:basic-text': openclawScenarios.basic,
146
+ 'openclaw:tool-call': openclawScenarios.tool,
147
+ 'hermes:basic-text': hermesScenarios.basic,
148
+ 'hermes:tool-call': hermesScenarios.tool,
149
+ };
150
+ //# sourceMappingURL=per-agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"per-agent.js","sourceRoot":"","sources":["../../src/scenarios/per-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,EACvB,UAAU,EAEV,WAAW,EACX,eAAe,EACf,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAE1B,8EAA8E;AAC9E,cAAc;AACd,8EAA8E;AAE9E,MAAM,CAAC,MAAM,eAAe,GAAoB;IAC9C,OAAO,EAAE,aAAa;IACtB,IAAI,EAAE,mBAAmB;IACzB,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE;IACxB,MAAM,EAAE;QACN,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;QACzD,WAAW,CAAC,mBAAmB,CAAC,SAAS,CAAC,EAAE,EA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E,gBAAgB,CAAC,IAAI;IAC1C,mBAAmB,EAAE,eAAe,CAAC,KAAK;IAC1C,kBAAkB,EAAE,eAAe,CAAC,IAAI;IACxC,qBAAqB,EAAE,iBAAiB,CAAC,KAAK;IAC9C,oBAAoB,EAAE,iBAAiB,CAAC,IAAI;IAC5C,eAAe,EAAE,WAAW,CAAC,KAAK;IAClC,cAAc,EAAE,WAAW,CAAC,IAAI;IAChC,gBAAgB,EAAE,YAAY,CAAC,KAAK;IACpC,eAAe,EAAE,YAAY,CAAC,IAAI;IAClC,qBAAqB,EAAE,iBAAiB,CAAC,KAAK;IAC9C,oBAAoB,EAAE,iBAAiB,CAAC,IAAI;IAC5C,mBAAmB,EAAE,eAAe,CAAC,KAAK;IAC1C,kBAAkB,EAAE,eAAe,CAAC,IAAI;CACzC,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Deterministic wire-format helpers.
3
+ *
4
+ * Produce raw stdout/stderr strings matching the formats the real adapter
5
+ * parseEvent implementations consume. Each helper returns a string ending
6
+ * with a newline where appropriate so chunks can be concatenated cleanly.
7
+ */
8
+ import type { OutputChunk } from '../types.js';
9
+ export interface ToolCall {
10
+ id: string;
11
+ name: string;
12
+ input?: Record<string, unknown>;
13
+ }
14
+ export declare function claudeSystemInit(sessionId: string, tools?: string[]): string;
15
+ export declare function claudeAssistantText(text: string): string;
16
+ export declare function claudeToolUse(call: ToolCall): string;
17
+ export declare function claudeToolResult(toolUseId: string, output: string): string;
18
+ export declare function claudeThinking(text: string): string;
19
+ export declare function claudeResult(sessionId: string, text?: string, cost?: Record<string, unknown>): string;
20
+ export declare function claudeError(message: string): string;
21
+ export declare function codexMessage(text: string): string;
22
+ export declare function codexFunctionCall(call: ToolCall): string;
23
+ export declare function codexFunctionCallOutput(callId: string, output: string): string;
24
+ export declare function codexError(message: string): string;
25
+ export declare function geminiText(text: string): string;
26
+ export declare function geminiToolCall(call: ToolCall): string;
27
+ export declare function geminiToolResult(id: string, output: string): string;
28
+ export declare function geminiError(message: string): string;
29
+ export declare function genericText(text: string): string;
30
+ export declare function genericToolCall(call: ToolCall): string;
31
+ export declare function genericError(message: string): string;
32
+ /** Build a stdout chunk with optional delay. */
33
+ export declare function stdoutChunk(data: string, delayMs?: number): OutputChunk;
34
+ /** Build a stderr chunk with optional delay. */
35
+ export declare function stderrChunk(data: string, delayMs?: number): OutputChunk;
36
+ //# sourceMappingURL=wire-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wire-format.d.ts","sourceRoot":"","sources":["../../src/scenarios/wire-format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAMD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,GAAE,MAAM,EAAO,GAAG,MAAM,CAEhF;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAEpD;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAE1E;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAKrG;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEnD;AAMD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAQxD;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAE9E;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAElD;AAMD,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAErD;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEnD;AAMD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAEtD;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpD;AAMD,gDAAgD;AAChD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,SAAK,GAAG,WAAW,CAEnE;AAED,gDAAgD;AAChD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,SAAK,GAAG,WAAW,CAEnE"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Deterministic wire-format helpers.
3
+ *
4
+ * Produce raw stdout/stderr strings matching the formats the real adapter
5
+ * parseEvent implementations consume. Each helper returns a string ending
6
+ * with a newline where appropriate so chunks can be concatenated cleanly.
7
+ */
8
+ // ---------------------------------------------------------------------------
9
+ // Claude Code JSONL
10
+ // ---------------------------------------------------------------------------
11
+ export function claudeSystemInit(sessionId, tools = []) {
12
+ return JSON.stringify({ type: 'system', subtype: 'init', session_id: sessionId, tools }) + '\n';
13
+ }
14
+ export function claudeAssistantText(text) {
15
+ return JSON.stringify({ type: 'assistant', content: text }) + '\n';
16
+ }
17
+ export function claudeToolUse(call) {
18
+ return JSON.stringify({ type: 'tool_use', id: call.id, name: call.name, input: call.input ?? {} }) + '\n';
19
+ }
20
+ export function claudeToolResult(toolUseId, output) {
21
+ return JSON.stringify({ type: 'tool_result', tool_use_id: toolUseId, content: output }) + '\n';
22
+ }
23
+ export function claudeThinking(text) {
24
+ return JSON.stringify({ type: 'thinking', content: text }) + '\n';
25
+ }
26
+ export function claudeResult(sessionId, text, cost) {
27
+ const obj = { type: 'result', subtype: 'success', session_id: sessionId };
28
+ if (text !== undefined)
29
+ obj['result'] = text;
30
+ if (cost !== undefined)
31
+ obj['cost'] = cost;
32
+ return JSON.stringify(obj) + '\n';
33
+ }
34
+ export function claudeError(message) {
35
+ return JSON.stringify({ type: 'error', message }) + '\n';
36
+ }
37
+ // ---------------------------------------------------------------------------
38
+ // Codex JSONL
39
+ // ---------------------------------------------------------------------------
40
+ export function codexMessage(text) {
41
+ return JSON.stringify({ type: 'message', content: text }) + '\n';
42
+ }
43
+ export function codexFunctionCall(call) {
44
+ return JSON.stringify({
45
+ type: 'function_call',
46
+ id: call.id,
47
+ call_id: call.id,
48
+ name: call.name,
49
+ arguments: JSON.stringify(call.input ?? {}),
50
+ }) + '\n';
51
+ }
52
+ export function codexFunctionCallOutput(callId, output) {
53
+ return JSON.stringify({ type: 'function_call_output', call_id: callId, output }) + '\n';
54
+ }
55
+ export function codexError(message) {
56
+ return JSON.stringify({ type: 'error', message }) + '\n';
57
+ }
58
+ // ---------------------------------------------------------------------------
59
+ // Gemini / generic JSONL
60
+ // ---------------------------------------------------------------------------
61
+ export function geminiText(text) {
62
+ return JSON.stringify({ type: 'text', content: text }) + '\n';
63
+ }
64
+ export function geminiToolCall(call) {
65
+ return JSON.stringify({ type: 'tool_call', id: call.id, name: call.name, args: call.input ?? {} }) + '\n';
66
+ }
67
+ export function geminiToolResult(id, output) {
68
+ return JSON.stringify({ type: 'tool_result', id, output }) + '\n';
69
+ }
70
+ export function geminiError(message) {
71
+ return JSON.stringify({ type: 'error', message }) + '\n';
72
+ }
73
+ // ---------------------------------------------------------------------------
74
+ // Generic "type+content" (used by copilot/cursor/opencode/pi/omp/openclaw/hermes)
75
+ // ---------------------------------------------------------------------------
76
+ export function genericText(text) {
77
+ return JSON.stringify({ type: 'text', content: text }) + '\n';
78
+ }
79
+ export function genericToolCall(call) {
80
+ return JSON.stringify({ type: 'tool_call', id: call.id, name: call.name, input: call.input ?? {} }) + '\n';
81
+ }
82
+ export function genericError(message) {
83
+ return JSON.stringify({ type: 'error', message }) + '\n';
84
+ }
85
+ // ---------------------------------------------------------------------------
86
+ // OutputChunk helpers
87
+ // ---------------------------------------------------------------------------
88
+ /** Build a stdout chunk with optional delay. */
89
+ export function stdoutChunk(data, delayMs = 10) {
90
+ return { stream: 'stdout', data, delayMs };
91
+ }
92
+ /** Build a stderr chunk with optional delay. */
93
+ export function stderrChunk(data, delayMs = 10) {
94
+ return { stream: 'stderr', data, delayMs };
95
+ }
96
+ //# sourceMappingURL=wire-format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wire-format.js","sourceRoot":"","sources":["../../src/scenarios/wire-format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,MAAM,UAAU,gBAAgB,CAAC,SAAiB,EAAE,QAAkB,EAAE;IACtE,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;AAClG,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;AACrE,CAA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AM,UAAU,WAAW,CAAC,IAAY,EAAE,OAAO,GAAG,EAAE;IACpD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC7C,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Pre-built scenarios for common harness behaviors.
3
+ *
4
+ * These scenarios model real harness behavior observed via probing,
5
+ * providing ready-made test fixtures for adapter development.
6
+ */
7
+ import type { HarnessScenario } from './types.js';
8
+ /** Claude Code: successful run with streaming JSONL output. */
9
+ export declare const claudeCodeSuccess: HarnessScenario;
10
+ /** Claude Code: run that requires tool approval. */
11
+ export declare const claudeCodeToolApproval: HarnessScenario;
12
+ /** Claude Code: run that times out (hangs). */
13
+ export declare const claudeCodeTimeout: HarnessScenario;
14
+ /** Claude Code: run that crashes. */
15
+ export declare const claudeCodeCrash: HarnessScenario;
16
+ /** Claude Code: run with file modifications. */
17
+ export declare const claudeCodeFileOps: HarnessScenario;
18
+ /** Codex: successful run with JSONL output. */
19
+ export declare const codexSuccess: HarnessScenario;
20
+ /** Codex: run that produces file changes. */
21
+ export declare const codexFileOps: HarnessScenario;
22
+ /** Codex: run that fails with non-zero exit. */
23
+ export declare const codexFailure: HarnessScenario;
24
+ /** Generic: immediate success with no output. */
25
+ export declare const emptySuccess: HarnessScenario;
26
+ /** Generic: slow startup. */
27
+ export declare const slowStartup: HarnessScenario;
28
+ /** Generic: large output (for buffer/backpressure testing). */
29
+ export declare function largeOutput(lineCount: number): HarnessScenario;
30
+ //# sourceMappingURL=scenarios.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scenarios.d.ts","sourceRoot":"","sources":["../src/scenarios.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAMlD,+DAA+D;AAC/D,eAAO,MAAM,iBAAiB,EAAE,eAU/B,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,sBAAsB,EAAE,eAYpC,CAAC;AAEF,+CAA+C;AAC/C,eAAO,MAAM,iBAAiB,EAAE,eAO/B,CAAC;AAEF,qCAAqC;AACrC,eAAO,MAAM,eAAe,EAAE,eAQ7B,CAAC;AAEF,gDAAgD;AAChD,eAAO,MAAM,iBAAiB,EAAE,eAa/B,CAAC;AAMF,+CAA+C;AAC/C,eAAO,MAAM,YAAY,EAAE,eAQ1B,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,YAAY,EAAE,eAW1B,CAAC;AAEF,gDAAgD;AAChD,eAAO,MAAM,YAAY,EAAE,eAO1B,CAAC;AAMF,iDAAiD;AACjD,eAAO,MAAM,YAAY,EAAE,eAK1B,CAAC;AAEF,6BAA6B;AAC7B,eAAO,MAAM,WAAW,EAAE,eAOzB,CAAC;AAEF,+DAA+D;AAC/D,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,CAe9D"}
@@ -0,0 +1,141 @@
1
+ /**
2
+ * Pre-built scenarios for common harness behaviors.
3
+ *
4
+ * These scenarios model real harness behavior observed via probing,
5
+ * providing ready-made test fixtures for adapter development.
6
+ */
7
+ // ---------------------------------------------------------------------------
8
+ // Claude Code scenarios
9
+ // ---------------------------------------------------------------------------
10
+ /** Claude Code: successful run with streaming JSONL output. */
11
+ export const claudeCodeSuccess = {
12
+ harness: 'claude-code',
13
+ name: 'claude-code-success',
14
+ process: { exitCode: 0 },
15
+ output: [
16
+ { stream: 'stdout', data: '{"type":"system","subtype":"init","session_id":"sess_001","tools":[]}\n', delayMs: 50 },
17
+ { stream: 'stdout', data: '{"type":"assistant","subtype":"text","text":"Hello! "}\n', delayMs: 100 },
18
+ { stream: 'stdout', data: '{"type":"assistant","subtype":"text","text":"How can I help?"}\n', delayMs: 50 },
19
+ { stream: 'stdout', data: '{"type":"result","subtype":"success","session_id":"sess_001","cost_usd":0.003,"duration_ms":450,"num_turns":1}\n', delayMs: 20 },
20
+ ],
21
+ };
22
+ /** Claude Code: run that requires tool approval. */
23
+ export const claudeCodeToolApproval = {
24
+ harness: 'claude-code',
25
+ name: 'claude-code-tool-approval',
26
+ process: { exitCode: 0 },
27
+ output: [
28
+ { stream: 'stdout', data: '{"type":"system","subtype":"init","session_id":"sess_002","tools":["Read","Write","Bash"]}\n', delayMs: 50 },
29
+ { stream: 'stdout', data: '{"type":"assistant","subtype":"tool_use","id":"tool_1","name":"Read","input":{"file_path":"/tmp/test.txt"}}\n', delayMs: 100 },
30
+ { stream: 'stderr', data: 'Do you want to allow Read /tmp/test.txt? (y/n)\n', delayMs: 10 },
31
+ ],
32
+ interactions: [
33
+ { triggerPattern: 'Do you want to allow', response: 'y\n', delayMs: 50 },
34
+ ],
35
+ };
36
+ /** Claude Code: run that times out (hangs). */
37
+ export const claudeCodeTimeout = {
38
+ harness: 'claude-code',
39
+ name: 'claude-code-timeout',
40
+ process: { exitCode: 0, hang: true },
41
+ output: [
42
+ { stream: 'stdout', data: '{"type":"system","subtype":"init","session_id":"sess_003","tools":[]}\n', delayMs: 50 },
43
+ ],
44
+ };
45
+ /** Claude Code: run that crashes. */
46
+ export const claudeCodeCrash = {
47
+ harness: 'claude-code',
48
+ name: 'claude-code-crash',
49
+ process: { exitCode: 1, crashAfterMs: 200, crashSignal: 'SIGTERM' },
50
+ output: [
51
+ { stream: 'stdout', data: '{"type":"system","subtype":"init","session_id":"sess_004","tools":[]}\n', delayMs: 50 },
52
+ { stream: 'stderr', data: 'Error: Connection refused\n', delayMs: 100 },
53
+ ],
54
+ };
55
+ /** Claude Code: run with file modifications. */
56
+ export const claudeCodeFileOps = {
57
+ harness: 'claude-code',
58
+ name: 'claude-code-file-ops',
59
+ process: { exitCode: 0 },
60
+ output: [
61
+ { stream: 'stdout', data: '{"type":"system","subtype":"init","session_id":"sess_005","tools":["Write"]}\n', delayMs: 50 },
62
+ { stream: 'stdout', data: '{"type":"assistant","subtype":"tool_use","id":"tool_1","name":"Write","input":{"file_path":"/tmp/output.txt","content":"hello world"}}\n', delayMs: 100 },
63
+ { stream: 'stdout', data: '{"type":"assistant","subtype":"tool_result","id":"tool_1","output":"File written"}\n', delayMs: 20 },
64
+ { stream: 'stdout', data: '{"type":"result","subtype":"success","session_id":"sess_005","cost_usd":0.005}\n', delayMs: 20 },
65
+ ],
66
+ fileOperations: [
67
+ { type: 'create', path: '/tmp/output.txt', content: 'hello world' },
68
+ ],
69
+ };
70
+ // ---------------------------------------------------------------------------
71
+ // Codex scenarios
72
+ // ---------------------------------------------------------------------------
73
+ /** Codex: successful run with JSONL output. */
74
+ export const codexSuccess = {
75
+ harness: 'codex',
76
+ name: 'codex-success',
77
+ process: { exitCode: 0 },
78
+ output: [
79
+ { stream: 'stdout', data: '{"type":"message","role":"assistant","content":[{"type":"output_text","text":"Here is the solution."}]}\n', delayMs: 100 },
80
+ { stream: 'stdout', data: '{"type":"completed","status":"completed"}\n', delayMs: 50 },
81
+ ],
82
+ };
83
+ /** Codex: run that produces file changes. */
84
+ export const codexFileOps = {
85
+ harness: 'codex',
86
+ name: 'codex-file-ops',
87
+ process: { exitCode: 0 },
88
+ output: [
89
+ { stream: 'stdout', data: '{"type":"message","role":"assistant","content":[{"type":"output_text","text":"I will create a file."}]}\n', delayMs: 100 },
90
+ { stream: 'stdout', data: '{"type":"completed","status":"completed"}\n', delayMs: 50 },
91
+ ],
92
+ fileOperations: [
93
+ { type: 'create', path: '/tmp/codex-output.ts', content: 'export const x = 1;\n' },
94
+ ],
95
+ };
96
+ /** Codex: run that fails with non-zero exit. */
97
+ export const codexFailure = {
98
+ harness: 'codex',
99
+ name: 'codex-failure',
100
+ process: { exitCode: 1 },
101
+ output: [
102
+ { stream: 'stderr', data: 'Error: Invalid API key\n', delayMs: 50 },
103
+ ],
104
+ };
105
+ // ---------------------------------------------------------------------------
106
+ // Generic scenarios
107
+ // ---------------------------------------------------------------------------
108
+ /** Generic: immediate success with no output. */
109
+ export const emptySuccess = {
110
+ harness: 'custom',
111
+ name: 'empty-success',
112
+ process: { exitCode: 0 },
113
+ output: [],
114
+ };
115
+ /** Generic: slow startup. */
116
+ export const slowStartup = {
117
+ harness: 'custom',
118
+ name: 'slow-startup',
119
+ process: { exitCode: 0, startupDelayMs: 500 },
120
+ output: [
121
+ { stream: 'stdout', data: 'ready\n', delayMs: 0 },
122
+ ],
123
+ };
124
+ /** Generic: large output (for buffer/backpressure testing). */
125
+ export function largeOutput(lineCount) {
126
+ const output = [];
127
+ for (let i = 0; i < lineCount; i++) {
128
+ output.push({
129
+ stream: 'stdout',
130
+ data: `{"line":${i},"data":"${'x'.repeat(200)}"}\n`,
131
+ delayMs: 0,
132
+ });
133
+ }
134
+ return {
135
+ harness: 'custom',
136
+ name: `large-output-${lineCount}`,
137
+ process: { exitCode: 0 },
138
+ output,
139
+ };
140
+ }
141
+ //# sourceMappingURL=scenarios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scenarios.js","sourceRoot":"","sources":["../src/scenarios.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,8EAA8E;AAC9E,wBAAwB;AACxB,8EAA8E;AAE9E,+DAA+D;AAC/D,MAAM,CAAC,MAAM,iBAAiB,GAAoB;IAChD,OAAO,EAAE,aAAa;IACtB,IAAI,EAAE,qBAAqB;IAC3B,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE;IACxB,MAAM,EAAE;QACN,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,yEAAyE,EAAE,OAAO,EAAE,EAAE,EAAE;QAClH,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,0DAA0D,EAAE,OAAO,EAAE,GAAG,EAAE;QACpG,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,kEAAkE,EAAE,OAAO,EAAE,EAAE,EAAE;QAC3G,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,kHAAkH,EAAE,OAAO,EAAE,EAAE,EAAE;KAC5J;CACF,CAAC;AAEF,oDAAoD;AACpD,MAAM,CAAC,MAAM,s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,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC;QACnC,MAAM,CAAC,IAAI,CAAC;YACV,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,WAAW,CAAC,YAAY,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM;YACnD,OAAO,EAAE,CAAC;SACX,CAAC,CAAC;IACL,CAAC;IACD,OAAO;QACL,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,gBAAgB,SAAS,EAAE;QACjC,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE;QACxB,MAAM;KACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Types for the harness mock/simulator.
3
+ *
4
+ * A "harness" is a CLI tool (claude-code, codex, etc.) that agent-mux
5
+ * invokes as a subprocess. This package simulates harness behavior for
6
+ * testing without requiring the real CLI tools to be installed.
7
+ */
8
+ /** Supported harness types for mocking. */
9
+ export type HarnessType = 'claude-code' | 'codex' | 'gemini' | 'copilot' | 'cursor' | 'opencode' | 'pi' | 'omp' | 'openclaw' | 'hermes' | 'aider' | 'goose' | 'custom';
10
+ /** A simulated file operation that the harness would perform. */
11
+ export interface FileOperation {
12
+ /** Type of file operation. */
13
+ type: 'create' | 'modify' | 'delete' | 'rename';
14
+ /** Absolute path to the file. */
15
+ path: string;
16
+ /** New path (only for 'rename'). */
17
+ newPath?: string;
18
+ /** Content to write (for 'create' and 'modify'). */
19
+ content?: string;
20
+ /** Diff/patch content (for 'modify', alternative to full content). */
21
+ patch?: string;
22
+ }
23
+ /** Simulated process exit behavior. */
24
+ export interface ProcessBehavior {
25
+ /** Exit code. 0 = success. */
26
+ exitCode: number;
27
+ /** Delay in ms before the process "starts producing output". */
28
+ startupDelayMs?: number;
29
+ /** Delay in ms before the process exits after all output is sent. */
30
+ shutdownDelayMs?: number;
31
+ /** If set, the process will crash with this signal after the given delay. */
32
+ crashAfterMs?: number;
33
+ /** Signal to crash with (default: SIGTERM). */
34
+ crashSignal?: string;
35
+ /** Whether the process hangs indefinitely (for timeout testing). */
36
+ hang?: boolean;
37
+ }
38
+ /** A single output chunk from the simulated harness. */
39
+ export interface OutputChunk {
40
+ /** Which stream this goes to. */
41
+ stream: 'stdout' | 'stderr';
42
+ /** The data to emit. */
43
+ data: string;
44
+ /** Delay in ms before emitting this chunk (relative to previous chunk). */
45
+ delayMs?: number;
46
+ }
47
+ /** An expected stdin prompt and the mock's response behavior. */
48
+ export interface StdinInteraction {
49
+ /** Pattern to match on stdout before this interaction fires. */
50
+ triggerPattern: string | RegExp;
51
+ /** Response to write to stdin. */
52
+ response: string;
53
+ /** Delay before responding (ms). */
54
+ delayMs?: number;
55
+ }
56
+ /** A simulated agent event (matching the agent-mux event schema). */
57
+ export interface MockEvent {
58
+ /** Event type matching the agent-mux event taxonomy. */
59
+ type: string;
60
+ /** Delay before emitting this event (ms, relative to previous). */
61
+ delayMs?: number;
62
+ /** Event payload. */
63
+ data: Record<string, unknown>;
64
+ }
65
+ /**
66
+ * A complete scenario describing how a mock harness should behave.
67
+ * This is the primary configuration object for setting up mock tests.
68
+ */
69
+ export interface HarnessScenario {
70
+ /** Which harness to simulate. */
71
+ harness: HarnessType;
72
+ /** Human-readable scenario name (for test output). */
73
+ name?: string;
74
+ /** Process behavior (exit code, timing, crashes). */
75
+ process: ProcessBehavior;
76
+ /** Sequence of output chunks to emit. */
77
+ output: OutputChunk[];
78
+ /** Sequence of events the harness would produce. */
79
+ events?: MockEvent[];
80
+ /** File operations the harness would perform. */
81
+ fileOperations?: FileOperation[];
82
+ /** Interactive stdin/stdout exchanges. */
83
+ interactions?: StdinInteraction[];
84
+ /** Environment variables the harness expects. */
85
+ expectedEnv?: Record<string, string>;
86
+ /** Expected command-line arguments. */
87
+ expectedArgs?: string[];
88
+ /** Expected working directory. */
89
+ expectedCwd?: string;
90
+ }
91
+ /** Handle to a running mock harness process. */
92
+ export interface MockHarnessHandle {
93
+ /** The scenario being executed. */
94
+ readonly scenario: HarnessScenario;
95
+ /** PID-like identifier for this mock process. */
96
+ readonly pid: number;
97
+ /** Whether the process has exited. */
98
+ readonly exited: boolean;
99
+ /** The exit code (undefined until exited). */
100
+ readonly exitCode: number | undefined;
101
+ /** All stdout data collected so far. */
102
+ readonly stdout: string;
103
+ /** All stderr data collected so far. */
104
+ readonly stderr: string;
105
+ /** Files that were "modified" by this mock. */
106
+ readonly fileChanges: FileOperation[];
107
+ /** Write to the mock's stdin. */
108
+ write(data: string): void;
109
+ /** Send a signal to the mock process. */
110
+ kill(signal?: string): void;
111
+ /** Wait for the mock process to exit. */
112
+ waitForExit(): Promise<{
113
+ exitCode: number;
114
+ stdout: string;
115
+ stderr: string;
116
+ }>;
117
+ }
118
+ /**
119
+ * A captured behavior profile from probing a real harness.
120
+ * Used to compare mock fidelity against actual harness behavior.
121
+ */
122
+ export interface HarnessBehaviorProfile {
123
+ /** Harness type. */
124
+ harness: HarnessType;
125
+ /** Version of the harness that was probed. */
126
+ version: string;
127
+ /** Timestamp of when the profile was captured. */
128
+ capturedAt: string;
129
+ /** Startup time in ms. */
130
+ startupTimeMs: number;
131
+ /** How the harness formats its output (jsonl, streaming text, etc). */
132
+ outputFormat: string;
133
+ /** Whether the harness supports stdin interaction. */
134
+ supportsStdin: boolean;
135
+ /** File operation patterns observed. */
136
+ fileOperationPatterns: string[];
137
+ /** Exit code mapping: scenario → exit code. */
138
+ exitCodes: Record<string, number>;
139
+ /** Environment variables the harness reads. */
140
+ environmentVariables: string[];
141
+ /** CLI argument patterns. */
142
+ cliPatterns: Record<string, string>;
143
+ }
144
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,2CAA2C;AAC3C,MAAM,MAAM,WAAW,GACnB,aAAa,GACb,OAAO,GACP,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,UAAU,GACV,IA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