@mandible-ai/mandible 0.4.0 → 0.5.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.
|
@@ -3,19 +3,9 @@ import type { ActionHandler, OutputMapping } from './types.js';
|
|
|
3
3
|
export interface OpenHandsConfig<T = Record<string, unknown>> {
|
|
4
4
|
/**
|
|
5
5
|
* OpenHands agent server URL.
|
|
6
|
-
* Default: 'http://localhost:
|
|
6
|
+
* Default: 'http://localhost:3001'.
|
|
7
7
|
*/
|
|
8
8
|
serverUrl?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Bearer token for V1 API authentication.
|
|
11
|
-
* Sent as `Authorization: Bearer {apiKey}` when provided.
|
|
12
|
-
*/
|
|
13
|
-
apiKey?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Model in "provider/model" format for the OpenHands agent.
|
|
16
|
-
* e.g. 'openai/qwen3-coder', 'anthropic/claude-sonnet-4-5-20250929'
|
|
17
|
-
*/
|
|
18
|
-
model?: string;
|
|
19
9
|
/**
|
|
20
10
|
* Git repository URL for the sandbox.
|
|
21
11
|
* Can be a static string or derived from the signal.
|
|
@@ -37,6 +27,20 @@ export interface OpenHandsConfig<T = Record<string, unknown>> {
|
|
|
37
27
|
* Can be static or derived from the signal.
|
|
38
28
|
*/
|
|
39
29
|
workingDirectory?: string | ((signal: Signal<T>) => string);
|
|
30
|
+
/**
|
|
31
|
+
* Git branch to check out in the sandbox.
|
|
32
|
+
* Can be static or derived from the signal.
|
|
33
|
+
*/
|
|
34
|
+
selectedBranch?: string | ((signal: Signal<T>) => string);
|
|
35
|
+
/**
|
|
36
|
+
* System-level instructions for the OpenHands agent.
|
|
37
|
+
* Sent as `conversation_instructions` in the create body.
|
|
38
|
+
*/
|
|
39
|
+
conversationInstructions?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Maximum iterations the agent can take. Default: 50.
|
|
42
|
+
*/
|
|
43
|
+
maxIterations?: number;
|
|
40
44
|
/**
|
|
41
45
|
* Timeout in ms for the entire conversation. Default: 900_000 (15 min).
|
|
42
46
|
* CI investigation can take a while — reproducing failures, installing deps, running tests.
|
|
@@ -44,7 +48,7 @@ export interface OpenHandsConfig<T = Record<string, unknown>> {
|
|
|
44
48
|
timeout?: number;
|
|
45
49
|
/**
|
|
46
50
|
* Event callback for observability.
|
|
47
|
-
* Called with
|
|
51
|
+
* Called with events fetched from the conversation events endpoint.
|
|
48
52
|
* Errors in this callback are caught and do not crash the agent.
|
|
49
53
|
*/
|
|
50
54
|
onEvent?: (event: OpenHandsEvent) => void;
|
|
@@ -53,7 +57,7 @@ export interface OpenHandsConfig<T = Record<string, unknown>> {
|
|
|
53
57
|
/** Auto-withdraw the triggering signal. Default: true. */
|
|
54
58
|
autoWithdraw?: boolean;
|
|
55
59
|
}
|
|
56
|
-
/**
|
|
60
|
+
/** Event from the OpenHands conversation events endpoint. */
|
|
57
61
|
export interface OpenHandsEvent {
|
|
58
62
|
id: number;
|
|
59
63
|
source: 'agent' | 'user' | 'environment';
|
|
@@ -68,7 +72,7 @@ export interface OpenHandsEvent {
|
|
|
68
72
|
/** Result of an OpenHands agent conversation. */
|
|
69
73
|
export interface OpenHandsResult {
|
|
70
74
|
/** Final status of the conversation. */
|
|
71
|
-
status: 'finished' | 'error' | 'timeout' | 'stopped'
|
|
75
|
+
status: 'finished' | 'error' | 'timeout' | 'stopped';
|
|
72
76
|
/** Summary text from the agent's final message. */
|
|
73
77
|
text: string;
|
|
74
78
|
/** Conversation ID for debugging/tracing. */
|
|
@@ -79,7 +83,7 @@ export interface OpenHandsResult {
|
|
|
79
83
|
events: OpenHandsEvent[];
|
|
80
84
|
}
|
|
81
85
|
/**
|
|
82
|
-
* Creates an action handler powered by the OpenHands
|
|
86
|
+
* Creates an action handler powered by the OpenHands local self-hosted API.
|
|
83
87
|
*
|
|
84
88
|
* OpenHands provides sandboxed terminal access inside Docker containers,
|
|
85
89
|
* which is ideal for CI investigation tasks that need to:
|
|
@@ -88,13 +92,15 @@ export interface OpenHandsResult {
|
|
|
88
92
|
* - Install dependencies and run tests
|
|
89
93
|
* - Propose fixes without affecting the host
|
|
90
94
|
*
|
|
91
|
-
*
|
|
92
|
-
* 1. POST /api/
|
|
93
|
-
* 2.
|
|
94
|
-
* 3. GET /api/
|
|
95
|
+
* Local API Lifecycle:
|
|
96
|
+
* 1. POST /api/conversations — create conversation
|
|
97
|
+
* 2. POST /api/conversations/{id}/message — send user prompt
|
|
98
|
+
* 3. GET /api/conversations/{id} — poll until STOPPED
|
|
99
|
+
* 4. GET /api/conversations/{id}/events — fetch agent events
|
|
100
|
+
* 5. DELETE /api/conversations/{id} — cleanup
|
|
95
101
|
*/
|
|
96
102
|
export declare function withOpenHands<T = Record<string, unknown>>(config: OpenHandsConfig<T>): ActionHandler<T>;
|
|
97
|
-
export type OpenHandsErrorCode = 'CONVERSATION_CREATE_FAILED' | '
|
|
103
|
+
export type OpenHandsErrorCode = 'CONVERSATION_CREATE_FAILED' | 'MESSAGE_SEND_FAILED' | 'CONNECTION_FAILED' | 'TIMEOUT';
|
|
98
104
|
export declare class OpenHandsError extends Error {
|
|
99
105
|
readonly code: OpenHandsErrorCode;
|
|
100
106
|
constructor(code: OpenHandsErrorCode, message: string);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openhands.d.ts","sourceRoot":"","sources":["../../../src/providers/openhands.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAiB,MAAM,YAAY,CAAC;AAM9E,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC1D;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC
|
|
1
|
+
{"version":3,"file":"openhands.d.ts","sourceRoot":"","sources":["../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POSE: withOpenHands — Sandboxed agentic coding via OpenHands local self-hosted API.
|
|
2
|
+
// PURPOSE: REST client targeting /api/conversations for CI investigation and DevOps tasks.
|
|
3
3
|
// ----------------------------------------------------------
|
|
4
4
|
// Provider factory
|
|
5
5
|
// ----------------------------------------------------------
|
|
6
6
|
/**
|
|
7
|
-
* Creates an action handler powered by the OpenHands
|
|
7
|
+
* Creates an action handler powered by the OpenHands local self-hosted API.
|
|
8
8
|
*
|
|
9
9
|
* OpenHands provides sandboxed terminal access inside Docker containers,
|
|
10
10
|
* which is ideal for CI investigation tasks that need to:
|
|
@@ -13,184 +13,216 @@
|
|
|
13
13
|
* - Install dependencies and run tests
|
|
14
14
|
* - Propose fixes without affecting the host
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
|
-
* 1. POST /api/
|
|
18
|
-
* 2.
|
|
19
|
-
* 3. GET /api/
|
|
16
|
+
* Local API Lifecycle:
|
|
17
|
+
* 1. POST /api/conversations — create conversation
|
|
18
|
+
* 2. POST /api/conversations/{id}/message — send user prompt
|
|
19
|
+
* 3. GET /api/conversations/{id} — poll until STOPPED
|
|
20
|
+
* 4. GET /api/conversations/{id}/events — fetch agent events
|
|
21
|
+
* 5. DELETE /api/conversations/{id} — cleanup
|
|
20
22
|
*/
|
|
21
23
|
export function withOpenHands(config) {
|
|
22
|
-
const { serverUrl = 'http://localhost:
|
|
24
|
+
const { serverUrl = 'http://localhost:3001', repository, prompt, workingDirectory, selectedBranch, conversationInstructions, maxIterations = 50, timeout = 900_000, onEvent, output, autoWithdraw = true, } = config;
|
|
23
25
|
return async (signal, ctx) => {
|
|
24
26
|
const startTime = Date.now();
|
|
25
27
|
const baseUrl = serverUrl.replace(/\/$/, '');
|
|
26
|
-
// Build shared headers
|
|
27
28
|
const headers = {
|
|
28
29
|
'Content-Type': 'application/json',
|
|
29
30
|
};
|
|
30
|
-
|
|
31
|
-
headers['Authorization'] = `Bearer ${apiKey}`;
|
|
32
|
-
}
|
|
33
|
-
// 1. Resolve prompt
|
|
31
|
+
// Resolve dynamic config fields
|
|
34
32
|
const resolvedPrompt = typeof prompt === 'function'
|
|
35
33
|
? await prompt(signal)
|
|
36
34
|
: prompt;
|
|
37
|
-
// 2. Resolve working directory
|
|
38
35
|
const cwd = typeof workingDirectory === 'function'
|
|
39
36
|
? workingDirectory(signal)
|
|
40
37
|
: workingDirectory;
|
|
41
|
-
// 3. Resolve repository
|
|
42
38
|
const repo = typeof repository === 'function'
|
|
43
39
|
? repository(signal)
|
|
44
40
|
: repository;
|
|
45
|
-
|
|
41
|
+
const branch = typeof selectedBranch === 'function'
|
|
42
|
+
? selectedBranch(signal)
|
|
43
|
+
: selectedBranch;
|
|
46
44
|
const events = [];
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
45
|
+
let conversationId;
|
|
46
|
+
try {
|
|
47
|
+
// 1. Create conversation
|
|
48
|
+
const createBody = {
|
|
49
|
+
max_iterations: maxIterations,
|
|
50
|
+
};
|
|
51
|
+
if (repo !== undefined)
|
|
52
|
+
createBody.repository = repo;
|
|
53
|
+
if (resolvedPrompt)
|
|
54
|
+
createBody.initial_user_msg = resolvedPrompt;
|
|
55
|
+
if (branch !== undefined)
|
|
56
|
+
createBody.selected_branch = branch;
|
|
57
|
+
if (conversationInstructions !== undefined)
|
|
58
|
+
createBody.conversation_instructions = conversationInstructions;
|
|
59
|
+
const createRes = await fetchWithTimeout(`${baseUrl}/api/conversations`, { method: 'POST', headers, body: JSON.stringify(createBody) }, 30_000);
|
|
60
|
+
if (!createRes.ok) {
|
|
61
|
+
const errorText = await createRes.text().catch(() => 'unknown error');
|
|
62
|
+
throw new OpenHandsError('CONVERSATION_CREATE_FAILED', `Failed to create OpenHands conversation: ${createRes.status} ${truncate(errorText, 500)}`);
|
|
63
|
+
}
|
|
64
|
+
const createData = await createRes.json();
|
|
65
|
+
conversationId = createData.conversation_id;
|
|
66
|
+
if (!conversationId) {
|
|
67
|
+
throw new OpenHandsError('CONVERSATION_CREATE_FAILED', 'OpenHands returned no conversation ID');
|
|
68
|
+
}
|
|
69
|
+
ctx.log(`OpenHands conversation ${conversationId} created`);
|
|
70
|
+
// 2. Send user prompt as message
|
|
71
|
+
const messageRes = await fetchWithTimeout(`${baseUrl}/api/conversations/${conversationId}/message`, {
|
|
72
|
+
method: 'POST',
|
|
73
|
+
headers,
|
|
74
|
+
body: JSON.stringify({ message: resolvedPrompt }),
|
|
75
|
+
}, 30_000);
|
|
76
|
+
if (!messageRes.ok) {
|
|
77
|
+
const errorText = await messageRes.text().catch(() => 'unknown error');
|
|
78
|
+
throw new OpenHandsError('MESSAGE_SEND_FAILED', `Failed to send message to conversation ${conversationId}: ${messageRes.status} ${truncate(errorText, 500)}`);
|
|
79
|
+
}
|
|
80
|
+
ctx.log(`Message sent to conversation ${conversationId}`);
|
|
81
|
+
// 3. Poll for completion
|
|
82
|
+
const finalStatus = await pollForCompletion(baseUrl, conversationId, headers, timeout, onEvent, events, ctx);
|
|
83
|
+
// 4. Fetch events
|
|
84
|
+
await fetchEvents(baseUrl, conversationId, headers, events, onEvent, ctx);
|
|
85
|
+
const durationMs = Date.now() - startTime;
|
|
86
|
+
// Extract result text from events or conversation data
|
|
87
|
+
const resultText = extractResultText(events, finalStatus);
|
|
88
|
+
const openHandsResult = {
|
|
89
|
+
status: finalStatus,
|
|
90
|
+
text: resultText,
|
|
91
|
+
conversationId,
|
|
92
|
+
durationMs,
|
|
93
|
+
events,
|
|
94
|
+
};
|
|
95
|
+
ctx.log(`OpenHands ${finalStatus} in ${durationMs}ms ` +
|
|
96
|
+
`(conversation=${conversationId}, events=${events.length})`);
|
|
97
|
+
// 5. Deposit output signals
|
|
98
|
+
const deposits = resolveOutput(output, openHandsResult, signal);
|
|
99
|
+
for (const deposit of deposits) {
|
|
100
|
+
await ctx.deposit(deposit.type, deposit.payload ?? { ...openHandsResult }, {
|
|
101
|
+
causedBy: [signal.id],
|
|
102
|
+
tags: deposit.tags,
|
|
103
|
+
ttl: deposit.ttl,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
// 6. Auto-withdraw
|
|
107
|
+
if (autoWithdraw) {
|
|
108
|
+
await ctx.withdraw(signal.id);
|
|
109
|
+
}
|
|
93
110
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
111
|
+
finally {
|
|
112
|
+
// Always cleanup the conversation
|
|
113
|
+
if (conversationId) {
|
|
114
|
+
await fetchWithTimeout(`${baseUrl}/api/conversations/${conversationId}`, { method: 'DELETE', headers }, 10_000).catch(() => { });
|
|
115
|
+
}
|
|
97
116
|
}
|
|
98
117
|
};
|
|
99
118
|
}
|
|
100
119
|
// ----------------------------------------------------------
|
|
101
|
-
//
|
|
120
|
+
// Completion polling
|
|
102
121
|
// ----------------------------------------------------------
|
|
103
122
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
123
|
+
* Poll the conversation status until it reaches a terminal state.
|
|
124
|
+
* The local API uses `status` (RUNNING/STOPPED) and `runtime_status`.
|
|
106
125
|
*/
|
|
107
|
-
async function
|
|
108
|
-
const deadline = Date.now() +
|
|
109
|
-
const pollInterval =
|
|
126
|
+
async function pollForCompletion(baseUrl, conversationId, headers, timeout, onEvent, events, ctx) {
|
|
127
|
+
const deadline = Date.now() + timeout;
|
|
128
|
+
const pollInterval = 3_000;
|
|
129
|
+
let lastStatus = '';
|
|
110
130
|
while (Date.now() < deadline) {
|
|
111
|
-
const res = await fetchWithTimeout(`${baseUrl}/api/
|
|
131
|
+
const res = await fetchWithTimeout(`${baseUrl}/api/conversations/${conversationId}`, { method: 'GET', headers }, 10_000).catch(() => null);
|
|
112
132
|
if (res?.ok) {
|
|
113
|
-
const data = await res.json().catch(() =>
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
133
|
+
const data = await res.json().catch((err) => {
|
|
134
|
+
ctx.log(`Warning: failed to parse poll response: ${err.message}`, 'warn');
|
|
135
|
+
return {};
|
|
136
|
+
});
|
|
137
|
+
const status = data.status;
|
|
138
|
+
const runtimeStatus = data.runtime_status;
|
|
139
|
+
// Emit synthetic event on status change
|
|
140
|
+
const currentStatus = `${status}:${runtimeStatus}`;
|
|
141
|
+
if (currentStatus !== lastStatus) {
|
|
142
|
+
lastStatus = currentStatus;
|
|
143
|
+
const event = {
|
|
144
|
+
id: events.length + 1,
|
|
145
|
+
source: 'environment',
|
|
146
|
+
observation: 'status_change',
|
|
147
|
+
message: `status=${status} runtime_status=${runtimeStatus}`,
|
|
148
|
+
timestamp: new Date().toISOString(),
|
|
149
|
+
};
|
|
150
|
+
events.push(event);
|
|
151
|
+
if (onEvent) {
|
|
152
|
+
try {
|
|
153
|
+
onEvent(event);
|
|
154
|
+
}
|
|
155
|
+
catch { /* swallow callback errors */ }
|
|
123
156
|
}
|
|
124
157
|
}
|
|
158
|
+
// STOPPED is the terminal state for the local API
|
|
159
|
+
if (status === 'STOPPED') {
|
|
160
|
+
return 'finished';
|
|
161
|
+
}
|
|
125
162
|
}
|
|
126
163
|
await sleep(pollInterval);
|
|
127
164
|
}
|
|
128
|
-
|
|
165
|
+
return 'timeout';
|
|
129
166
|
}
|
|
130
167
|
// ----------------------------------------------------------
|
|
131
|
-
//
|
|
168
|
+
// Events fetching
|
|
132
169
|
// ----------------------------------------------------------
|
|
133
170
|
/**
|
|
134
|
-
*
|
|
135
|
-
* Polls the conversations endpoint and emits synthetic events on status changes.
|
|
171
|
+
* Fetch all events from the conversation events endpoint.
|
|
136
172
|
*/
|
|
137
|
-
async function
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
observation: 'status_change',
|
|
162
|
-
message: `execution=${executionStatus} sandbox=${sandboxStatus}`,
|
|
163
|
-
timestamp: new Date().toISOString(),
|
|
164
|
-
};
|
|
165
|
-
events.push(event);
|
|
166
|
-
if (onEvent) {
|
|
167
|
-
try {
|
|
168
|
-
onEvent(event);
|
|
169
|
-
}
|
|
170
|
-
catch { /* swallow callback errors */ }
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
// Check terminal states
|
|
174
|
-
if (executionStatus === 'FINISHED') {
|
|
175
|
-
return { status: 'finished', text: lastMessage ?? '' };
|
|
176
|
-
}
|
|
177
|
-
if (executionStatus === 'ERROR') {
|
|
178
|
-
return { status: 'error', text: lastMessage ?? 'Agent encountered an error' };
|
|
179
|
-
}
|
|
180
|
-
if (executionStatus === 'STUCK') {
|
|
181
|
-
return { status: 'stuck', text: lastMessage ?? 'Agent is stuck' };
|
|
182
|
-
}
|
|
183
|
-
if (sandboxStatus === 'ERROR') {
|
|
184
|
-
return { status: 'error', text: lastMessage ?? 'Sandbox error' };
|
|
185
|
-
}
|
|
186
|
-
if (executionStatus === 'PAUSED' && sandboxStatus === 'STOPPED') {
|
|
187
|
-
return { status: 'stopped', text: lastMessage ?? 'Agent was stopped' };
|
|
188
|
-
}
|
|
173
|
+
async function fetchEvents(baseUrl, conversationId, headers, events, onEvent, ctx) {
|
|
174
|
+
const res = await fetchWithTimeout(`${baseUrl}/api/conversations/${conversationId}/events`, { method: 'GET', headers }, 30_000).catch(() => null);
|
|
175
|
+
if (!res?.ok) {
|
|
176
|
+
ctx.log(`Warning: failed to fetch events for conversation ${conversationId}`, 'warn');
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
const data = await res.json().catch(() => []);
|
|
180
|
+
for (let i = 0; i < data.length; i++) {
|
|
181
|
+
const raw = data[i];
|
|
182
|
+
const event = {
|
|
183
|
+
id: events.length + 1,
|
|
184
|
+
source: raw.source ?? 'agent',
|
|
185
|
+
action: raw.action,
|
|
186
|
+
observation: raw.observation,
|
|
187
|
+
message: raw.message,
|
|
188
|
+
args: raw.args,
|
|
189
|
+
content: raw.content,
|
|
190
|
+
extras: raw.extras,
|
|
191
|
+
timestamp: raw.timestamp,
|
|
192
|
+
};
|
|
193
|
+
events.push(event);
|
|
194
|
+
if (onEvent) {
|
|
195
|
+
try {
|
|
196
|
+
onEvent(event);
|
|
189
197
|
}
|
|
198
|
+
catch { /* swallow callback errors */ }
|
|
190
199
|
}
|
|
191
|
-
await sleep(pollInterval);
|
|
192
200
|
}
|
|
193
|
-
|
|
201
|
+
}
|
|
202
|
+
// ----------------------------------------------------------
|
|
203
|
+
// Result text extraction
|
|
204
|
+
// ----------------------------------------------------------
|
|
205
|
+
/**
|
|
206
|
+
* Extract the best result text from the collected events.
|
|
207
|
+
* Falls back to a status-based message.
|
|
208
|
+
*/
|
|
209
|
+
function extractResultText(events, status) {
|
|
210
|
+
// Walk events in reverse looking for the last agent message
|
|
211
|
+
for (let i = events.length - 1; i >= 0; i--) {
|
|
212
|
+
const event = events[i];
|
|
213
|
+
if (event.source === 'agent' && event.message) {
|
|
214
|
+
return event.message;
|
|
215
|
+
}
|
|
216
|
+
if (event.source === 'agent' && event.content) {
|
|
217
|
+
return event.content;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
// Fallback
|
|
221
|
+
if (status === 'timeout')
|
|
222
|
+
return 'Agent timed out';
|
|
223
|
+
if (status === 'error')
|
|
224
|
+
return 'Agent encountered an error';
|
|
225
|
+
return '';
|
|
194
226
|
}
|
|
195
227
|
// ----------------------------------------------------------
|
|
196
228
|
// Helpers
|
|
@@ -205,8 +237,14 @@ async function fetchWithTimeout(url, init, timeoutMs) {
|
|
|
205
237
|
function sleep(ms) {
|
|
206
238
|
return new Promise(resolve => setTimeout(resolve, ms));
|
|
207
239
|
}
|
|
240
|
+
/** Truncate a string to a max length. */
|
|
241
|
+
function truncate(str, maxLen) {
|
|
242
|
+
if (str.length <= maxLen)
|
|
243
|
+
return str;
|
|
244
|
+
return str.slice(0, maxLen) + '...';
|
|
245
|
+
}
|
|
208
246
|
// ----------------------------------------------------------
|
|
209
|
-
// Output mapping (same 3-pattern as
|
|
247
|
+
// Output mapping (same 3-pattern as withClaudeCode/withBash)
|
|
210
248
|
// ----------------------------------------------------------
|
|
211
249
|
function resolveOutput(output, result, signal) {
|
|
212
250
|
if (!output) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openhands.js","sourceRoot":"","sources":["../../../src/providers/openhands.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,
|
|
1
|
+
{"version":3,"file":"openhands.js","sourceRoot":"","sources":["../../../src/providers/openhands.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,2FAA2F;AA4G3F,6DAA6D;AAC7D,mBAAmB;AACnB,6DAA6D;AAE7D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,aAAa,CAC3B,MAA0B;IAE1B,MAAM,EACJ,SAAS,GAAG,uBAAuB,EACnC,UAAU,EACV,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,wBAAw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