(app: Hono, args: Record<string, string>)
| 150 | } |
| 151 | |
| 152 | const invoke = async (app: Hono, args: Record<string, string>) => { |
| 153 | const res = await app.request('/cli/ws1/workspace/invoke', { |
| 154 | method: 'POST', |
| 155 | headers: { 'Content-Type': 'application/json' }, |
| 156 | body: JSON.stringify({ tool: 'inbox_read', args }), |
| 157 | }) |
| 158 | const body = (await res.json()) as { content?: Array<{ text?: string }>; error?: string } |
| 159 | const payload = body.content ? JSON.parse(body.content.map((b) => b.text ?? '').join('')) : undefined |
| 160 | return { status: res.status, body, payload } |
| 161 | } |
| 162 | |
| 163 | it('`--self` (string "true") coerces and filters to this workspace', async () => { |
| 164 | const app = await makeWsApp() |
no test coverage detected