@tai42/api-client 0.1.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.
- package/LICENSE +202 -0
- package/README.md +28 -0
- package/dist/agents.d.ts +265 -0
- package/dist/agents.d.ts.map +1 -0
- package/dist/agents.js +200 -0
- package/dist/agents.js.map +1 -0
- package/dist/client.d.ts +1316 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +468 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +43 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +63 -0
- package/dist/errors.js.map +1 -0
- package/dist/fleet-report.d.ts +61 -0
- package/dist/fleet-report.d.ts.map +1 -0
- package/dist/fleet-report.js +42 -0
- package/dist/fleet-report.js.map +1 -0
- package/dist/http.d.ts +69 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +152 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas.d.ts +5469 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +1103 -0
- package/dist/schemas.js.map +1 -0
- package/dist/sse.d.ts +27 -0
- package/dist/sse.d.ts.map +1 -0
- package/dist/sse.js +84 -0
- package/dist/sse.js.map +1 -0
- package/dist/tool-runs.d.ts +112 -0
- package/dist/tool-runs.d.ts.map +1 -0
- package/dist/tool-runs.js +70 -0
- package/dist/tool-runs.js.map +1 -0
- package/package.json +51 -0
- package/src/agents.ts +248 -0
- package/src/client.ts +837 -0
- package/src/errors.ts +67 -0
- package/src/fleet-report.ts +94 -0
- package/src/http.ts +198 -0
- package/src/index.ts +142 -0
- package/src/schemas.ts +1341 -0
- package/src/sse.ts +90 -0
- package/src/tool-runs.ts +103 -0
package/dist/agents.js
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agents transport: the `GET /api/agents` list schema and the
|
|
3
|
+
* `POST /api/agents/{name}/runs` streaming run, plus the zod discriminated union
|
|
4
|
+
* over the agent `StreamEvent` taxonomy.
|
|
5
|
+
*
|
|
6
|
+
* This is a SELF-CONTAINED api-client module (its own zod, not the shared
|
|
7
|
+
* `schemas.ts`), so the agents feature owns its wire types end to end. The
|
|
8
|
+
* `createApiClient` object wires two thin methods onto it (`listAgents`,
|
|
9
|
+
* `streamAgentRun`) since only it holds the `ApiConfig` (base URL + auth token).
|
|
10
|
+
*
|
|
11
|
+
* Frame discriminator: every event carries a stable `type`, which is also the
|
|
12
|
+
* client's switch. A frame whose `type` is unknown (a newer server event) is
|
|
13
|
+
* NEVER dropped — it is surfaced as an `unknown` parsed event so the UI can show
|
|
14
|
+
* it verbatim; a malformed frame is surfaced the same way rather than crashing
|
|
15
|
+
* the stream.
|
|
16
|
+
*/
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
import { ApiError, ApiUnauthorizedError } from './errors';
|
|
19
|
+
import { encodeSegment, extractError } from './http';
|
|
20
|
+
import { SseFrameParser, readSseFrames } from './sse';
|
|
21
|
+
// -- list schema -------------------------------------------------------------
|
|
22
|
+
/** One registered agent as `GET /api/agents` returns it. */
|
|
23
|
+
export const agentSummary = z.object({
|
|
24
|
+
name: z.string(),
|
|
25
|
+
description: z.string().default(''),
|
|
26
|
+
tool_name: z.string(),
|
|
27
|
+
// The agent's `ToolInput` JSON schema (the same schema its run tool exposes).
|
|
28
|
+
input_schema: z.record(z.unknown()).default({}),
|
|
29
|
+
// The agent's own authorability marker (read, never inferred): `true` means its
|
|
30
|
+
// `ToolInput` accepts the composable spec fields and it can be authored into a
|
|
31
|
+
// versioned agent. A code role-agent reports `false`. The same item shape is
|
|
32
|
+
// returned by `GET /api/agents/spec-runnable`, filtered to the `true` rows.
|
|
33
|
+
spec_runnable: z.boolean().default(false),
|
|
34
|
+
});
|
|
35
|
+
export const agentList = z.object({
|
|
36
|
+
items: z.array(agentSummary),
|
|
37
|
+
total: z.number(),
|
|
38
|
+
});
|
|
39
|
+
// -- event union (mirrors the contract StreamEvent taxonomy) -----------------
|
|
40
|
+
const reasoningStep = z.object({
|
|
41
|
+
type: z.literal('reasoning_step'),
|
|
42
|
+
final: z.boolean().default(false),
|
|
43
|
+
text: z.string(),
|
|
44
|
+
});
|
|
45
|
+
const toolCallStep = z.object({
|
|
46
|
+
type: z.literal('tool_call_step'),
|
|
47
|
+
final: z.boolean().default(false),
|
|
48
|
+
tool: z.string(),
|
|
49
|
+
args: z.record(z.unknown()).default({}),
|
|
50
|
+
call_id: z.string(),
|
|
51
|
+
});
|
|
52
|
+
const toolResultStep = z.object({
|
|
53
|
+
type: z.literal('tool_result_step'),
|
|
54
|
+
final: z.boolean().default(false),
|
|
55
|
+
tool: z.string(),
|
|
56
|
+
call_id: z.string(),
|
|
57
|
+
result: z.unknown(),
|
|
58
|
+
is_error: z.boolean().default(false),
|
|
59
|
+
});
|
|
60
|
+
const messageDelta = z.object({
|
|
61
|
+
type: z.literal('message_delta'),
|
|
62
|
+
final: z.boolean().default(false),
|
|
63
|
+
text: z.string(),
|
|
64
|
+
});
|
|
65
|
+
const messageFinal = z.object({
|
|
66
|
+
type: z.literal('message_final'),
|
|
67
|
+
final: z.boolean().default(true),
|
|
68
|
+
text: z.string(),
|
|
69
|
+
});
|
|
70
|
+
const runUsage = z.object({
|
|
71
|
+
type: z.literal('run_usage'),
|
|
72
|
+
final: z.boolean().default(false),
|
|
73
|
+
input_tokens: z.number().nullable().default(null),
|
|
74
|
+
output_tokens: z.number().nullable().default(null),
|
|
75
|
+
total_tokens: z.number().nullable().default(null),
|
|
76
|
+
model: z.string().nullable().default(null),
|
|
77
|
+
});
|
|
78
|
+
const structuredFinal = z.object({
|
|
79
|
+
type: z.literal('structured_final'),
|
|
80
|
+
final: z.boolean().default(true),
|
|
81
|
+
data: z.unknown(),
|
|
82
|
+
});
|
|
83
|
+
const interruptFinal = z.object({
|
|
84
|
+
type: z.literal('interrupt_final'),
|
|
85
|
+
final: z.boolean().default(true),
|
|
86
|
+
interrupt_id: z.string(),
|
|
87
|
+
payload: z.unknown(),
|
|
88
|
+
reason: z.string().nullable().default(null),
|
|
89
|
+
});
|
|
90
|
+
// The two SSE-layer terminal frames the run route emits (not contract events).
|
|
91
|
+
const streamEnd = z.object({ type: z.literal('stream.end') });
|
|
92
|
+
const streamError = z.object({ type: z.literal('stream.error'), message: z.string() });
|
|
93
|
+
/** The discriminated union of every KNOWN agent frame. */
|
|
94
|
+
export const agentEventSchema = z.discriminatedUnion('type', [
|
|
95
|
+
reasoningStep,
|
|
96
|
+
toolCallStep,
|
|
97
|
+
toolResultStep,
|
|
98
|
+
messageDelta,
|
|
99
|
+
messageFinal,
|
|
100
|
+
runUsage,
|
|
101
|
+
structuredFinal,
|
|
102
|
+
interruptFinal,
|
|
103
|
+
streamEnd,
|
|
104
|
+
streamError,
|
|
105
|
+
]);
|
|
106
|
+
/**
|
|
107
|
+
* Parse one SSE frame's `data` into a typed event. Unparseable JSON, a
|
|
108
|
+
* non-object payload, an unknown `type`, or a payload that fails its schema all
|
|
109
|
+
* resolve to an `unknown` fallback (visible, never silently skipped) rather than
|
|
110
|
+
* throwing and tearing down the stream.
|
|
111
|
+
*/
|
|
112
|
+
export function parseAgentFrame(frame) {
|
|
113
|
+
let payload;
|
|
114
|
+
try {
|
|
115
|
+
payload = JSON.parse(frame.data);
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
return { known: false, unknown: { type: '(unparseable)', raw: frame.data } };
|
|
119
|
+
}
|
|
120
|
+
const result = agentEventSchema.safeParse(payload);
|
|
121
|
+
if (result.success)
|
|
122
|
+
return { known: true, event: result.data };
|
|
123
|
+
const rawType = typeof payload === 'object' &&
|
|
124
|
+
payload !== null &&
|
|
125
|
+
typeof payload.type === 'string'
|
|
126
|
+
? payload.type
|
|
127
|
+
: '(unknown)';
|
|
128
|
+
return { known: false, unknown: { type: rawType, raw: payload } };
|
|
129
|
+
}
|
|
130
|
+
// -- streaming run -----------------------------------------------------------
|
|
131
|
+
async function* parseFrames(frames) {
|
|
132
|
+
for await (const frame of frames) {
|
|
133
|
+
yield parseAgentFrame(frame);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Open an authed agent-run SSE stream over `fetch` + `ReadableStream` (never
|
|
138
|
+
* `EventSource`, which cannot send the auth header). The POST body is the run
|
|
139
|
+
* input; a non-2xx open throws loudly (a body that parsed to zero frames would
|
|
140
|
+
* otherwise look like a silently-empty run). Aborting `signal` closes the stream,
|
|
141
|
+
* which the server treats as a disconnect and cancels the run. The path is the
|
|
142
|
+
* ONLY difference between a plain-agent run and an authored-agent run, so both
|
|
143
|
+
* faces share this opener.
|
|
144
|
+
*/
|
|
145
|
+
async function openAgentStream(config, path, input, signal) {
|
|
146
|
+
const doFetch = config.fetch ?? globalThis.fetch;
|
|
147
|
+
const token = config.getToken();
|
|
148
|
+
const headers = {
|
|
149
|
+
accept: 'text/event-stream',
|
|
150
|
+
'content-type': 'application/json',
|
|
151
|
+
};
|
|
152
|
+
if (token)
|
|
153
|
+
headers['x-api-key'] = token;
|
|
154
|
+
const response = await doFetch(`${config.baseUrl ?? ''}${path}`, {
|
|
155
|
+
method: 'POST',
|
|
156
|
+
headers,
|
|
157
|
+
body: JSON.stringify(input),
|
|
158
|
+
signal,
|
|
159
|
+
});
|
|
160
|
+
if (response.status === 401)
|
|
161
|
+
throw new ApiUnauthorizedError();
|
|
162
|
+
if (!response.ok) {
|
|
163
|
+
// Read the `{ "error" }` envelope so a load-bearing server message (e.g. an
|
|
164
|
+
// authored-run "cannot override the fixed field ..." 400) surfaces verbatim
|
|
165
|
+
// instead of collapsing to the bare status text. Both run doors share this
|
|
166
|
+
// opener, so both surface the server's message.
|
|
167
|
+
let payload;
|
|
168
|
+
try {
|
|
169
|
+
payload = await response.json();
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
throw new ApiError(response.statusText || 'agent run failed', response.status);
|
|
173
|
+
}
|
|
174
|
+
const { message, code } = extractError(payload);
|
|
175
|
+
throw new ApiError(message ?? (response.statusText || 'agent run failed'), response.status, code);
|
|
176
|
+
}
|
|
177
|
+
return parseFrames(readSseFrames(response, signal));
|
|
178
|
+
}
|
|
179
|
+
/** Stream a plain registered agent's run (`POST /api/agents/{name}/runs`). */
|
|
180
|
+
export async function streamAgentRun(config, name, input, signal) {
|
|
181
|
+
return openAgentStream(config, `/api/agents/${encodeSegment(name)}/runs`, input, signal);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Stream an AUTHORED agent's run (`POST /api/agents/authored/{name}/runs`). Same
|
|
185
|
+
* SSE framing as `streamAgentRun`; the baked spec is resolved server-side, so the
|
|
186
|
+
* POST body carries ONLY the non-baked `ToolInput` fields (the actual query/user
|
|
187
|
+
* input). Naming a baked field is a loud server 400, surfaced by the caller.
|
|
188
|
+
*/
|
|
189
|
+
export async function streamAuthoredAgentRun(config, name, input, signal) {
|
|
190
|
+
return openAgentStream(config, `/api/agents/authored/${encodeSegment(name)}/runs`, input, signal);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Parse a whole hand-authored SSE transcript into its ordered parsed events.
|
|
194
|
+
* Reuses the wire `SseFrameParser`, so a test fixture exercises the real
|
|
195
|
+
* frame-splitting + event-parsing path end to end.
|
|
196
|
+
*/
|
|
197
|
+
export function parseAgentTranscript(transcript) {
|
|
198
|
+
return new SseFrameParser().push(transcript).map(parseAgentFrame);
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=agents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE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