@tai42/api-client 0.1.0 → 0.1.1
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 +1 -1
- package/dist/agents.d.ts +14 -14
- package/dist/client.d.ts +202 -55
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +54 -4
- package/dist/client.js.map +1 -1
- package/dist/http.d.ts +2 -3
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +2 -3
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.ts +814 -222
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +145 -7
- package/dist/schemas.js.map +1 -1
- package/dist/tool-runs.d.ts +12 -12
- package/package.json +6 -6
- package/src/client.ts +107 -4
- package/src/http.ts +2 -3
- package/src/index.ts +17 -1
- package/src/schemas.ts +173 -7
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @tai42/api-client
|
|
2
2
|
|
|
3
|
-
The typed client for the `
|
|
3
|
+
The typed client for the `tai42-skeleton` HTTP API. It exposes one call per
|
|
4
4
|
consumed endpoint and validates every response against a zod schema, so a
|
|
5
5
|
response that drifts from the expected shape throws instead of flowing bad data
|
|
6
6
|
into the UI. It holds no server state of its own — caching lives in the feature
|
package/dist/agents.d.ts
CHANGED
|
@@ -25,8 +25,8 @@ export declare const agentSummary: z.ZodObject<{
|
|
|
25
25
|
input_schema: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
26
26
|
spec_runnable: z.ZodDefault<z.ZodBoolean>;
|
|
27
27
|
}, "strip", z.ZodTypeAny, {
|
|
28
|
-
description: string;
|
|
29
28
|
name: string;
|
|
29
|
+
description: string;
|
|
30
30
|
tool_name: string;
|
|
31
31
|
input_schema: Record<string, unknown>;
|
|
32
32
|
spec_runnable: boolean;
|
|
@@ -45,8 +45,8 @@ export declare const agentList: z.ZodObject<{
|
|
|
45
45
|
input_schema: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
46
46
|
spec_runnable: z.ZodDefault<z.ZodBoolean>;
|
|
47
47
|
}, "strip", z.ZodTypeAny, {
|
|
48
|
-
description: string;
|
|
49
48
|
name: string;
|
|
49
|
+
description: string;
|
|
50
50
|
tool_name: string;
|
|
51
51
|
input_schema: Record<string, unknown>;
|
|
52
52
|
spec_runnable: boolean;
|
|
@@ -60,8 +60,8 @@ export declare const agentList: z.ZodObject<{
|
|
|
60
60
|
total: z.ZodNumber;
|
|
61
61
|
}, "strip", z.ZodTypeAny, {
|
|
62
62
|
items: {
|
|
63
|
-
description: string;
|
|
64
63
|
name: string;
|
|
64
|
+
description: string;
|
|
65
65
|
tool_name: string;
|
|
66
66
|
input_schema: Record<string, unknown>;
|
|
67
67
|
spec_runnable: boolean;
|
|
@@ -85,8 +85,8 @@ export declare const agentEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
|
|
|
85
85
|
text: z.ZodString;
|
|
86
86
|
}, "strip", z.ZodTypeAny, {
|
|
87
87
|
type: "reasoning_step";
|
|
88
|
-
text: string;
|
|
89
88
|
final: boolean;
|
|
89
|
+
text: string;
|
|
90
90
|
}, {
|
|
91
91
|
type: "reasoning_step";
|
|
92
92
|
text: string;
|
|
@@ -99,16 +99,16 @@ export declare const agentEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
|
|
|
99
99
|
call_id: z.ZodString;
|
|
100
100
|
}, "strip", z.ZodTypeAny, {
|
|
101
101
|
type: "tool_call_step";
|
|
102
|
+
final: boolean;
|
|
102
103
|
tool: string;
|
|
103
104
|
args: Record<string, unknown>;
|
|
104
|
-
final: boolean;
|
|
105
105
|
call_id: string;
|
|
106
106
|
}, {
|
|
107
107
|
type: "tool_call_step";
|
|
108
108
|
tool: string;
|
|
109
109
|
call_id: string;
|
|
110
|
-
args?: Record<string, unknown> | undefined;
|
|
111
110
|
final?: boolean | undefined;
|
|
111
|
+
args?: Record<string, unknown> | undefined;
|
|
112
112
|
}>, z.ZodObject<{
|
|
113
113
|
type: z.ZodLiteral<"tool_result_step">;
|
|
114
114
|
final: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -118,8 +118,8 @@ export declare const agentEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
|
|
|
118
118
|
is_error: z.ZodDefault<z.ZodBoolean>;
|
|
119
119
|
}, "strip", z.ZodTypeAny, {
|
|
120
120
|
type: "tool_result_step";
|
|
121
|
-
tool: string;
|
|
122
121
|
final: boolean;
|
|
122
|
+
tool: string;
|
|
123
123
|
call_id: string;
|
|
124
124
|
is_error: boolean;
|
|
125
125
|
result?: unknown;
|
|
@@ -127,8 +127,8 @@ export declare const agentEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
|
|
|
127
127
|
type: "tool_result_step";
|
|
128
128
|
tool: string;
|
|
129
129
|
call_id: string;
|
|
130
|
-
result?: unknown;
|
|
131
130
|
final?: boolean | undefined;
|
|
131
|
+
result?: unknown;
|
|
132
132
|
is_error?: boolean | undefined;
|
|
133
133
|
}>, z.ZodObject<{
|
|
134
134
|
type: z.ZodLiteral<"message_delta">;
|
|
@@ -136,8 +136,8 @@ export declare const agentEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
|
|
|
136
136
|
text: z.ZodString;
|
|
137
137
|
}, "strip", z.ZodTypeAny, {
|
|
138
138
|
type: "message_delta";
|
|
139
|
-
text: string;
|
|
140
139
|
final: boolean;
|
|
140
|
+
text: string;
|
|
141
141
|
}, {
|
|
142
142
|
type: "message_delta";
|
|
143
143
|
text: string;
|
|
@@ -148,8 +148,8 @@ export declare const agentEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
|
|
|
148
148
|
text: z.ZodString;
|
|
149
149
|
}, "strip", z.ZodTypeAny, {
|
|
150
150
|
type: "message_final";
|
|
151
|
-
text: string;
|
|
152
151
|
final: boolean;
|
|
152
|
+
text: string;
|
|
153
153
|
}, {
|
|
154
154
|
type: "message_final";
|
|
155
155
|
text: string;
|
|
@@ -163,18 +163,18 @@ export declare const agentEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
|
|
|
163
163
|
model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
164
164
|
}, "strip", z.ZodTypeAny, {
|
|
165
165
|
type: "run_usage";
|
|
166
|
-
model: string | null;
|
|
167
166
|
final: boolean;
|
|
168
167
|
input_tokens: number | null;
|
|
169
168
|
output_tokens: number | null;
|
|
170
169
|
total_tokens: number | null;
|
|
170
|
+
model: string | null;
|
|
171
171
|
}, {
|
|
172
172
|
type: "run_usage";
|
|
173
|
-
model?: string | null | undefined;
|
|
174
173
|
final?: boolean | undefined;
|
|
175
174
|
input_tokens?: number | null | undefined;
|
|
176
175
|
output_tokens?: number | null | undefined;
|
|
177
176
|
total_tokens?: number | null | undefined;
|
|
177
|
+
model?: string | null | undefined;
|
|
178
178
|
}>, z.ZodObject<{
|
|
179
179
|
type: z.ZodLiteral<"structured_final">;
|
|
180
180
|
final: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -195,16 +195,16 @@ export declare const agentEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
|
|
|
195
195
|
reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
196
196
|
}, "strip", z.ZodTypeAny, {
|
|
197
197
|
type: "interrupt_final";
|
|
198
|
-
reason: string | null;
|
|
199
198
|
final: boolean;
|
|
200
199
|
interrupt_id: string;
|
|
200
|
+
reason: string | null;
|
|
201
201
|
payload?: unknown;
|
|
202
202
|
}, {
|
|
203
203
|
type: "interrupt_final";
|
|
204
204
|
interrupt_id: string;
|
|
205
|
+
final?: boolean | undefined;
|
|
205
206
|
payload?: unknown;
|
|
206
207
|
reason?: string | null | undefined;
|
|
207
|
-
final?: boolean | undefined;
|
|
208
208
|
}>, z.ZodObject<{
|
|
209
209
|
type: z.ZodLiteral<"stream.end">;
|
|
210
210
|
}, "strip", z.ZodTypeAny, {
|