@nimble-way/nimble-js 1.0.0 → 1.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.
- package/CHANGELOG.md +18 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/core/streaming.d.mts +33 -0
- package/core/streaming.d.mts.map +1 -0
- package/core/streaming.d.ts +33 -0
- package/core/streaming.d.ts.map +1 -0
- package/core/streaming.js +263 -0
- package/core/streaming.js.map +1 -0
- package/core/streaming.mjs +258 -0
- package/core/streaming.mjs.map +1 -0
- package/internal/decoders/line.d.mts +17 -0
- package/internal/decoders/line.d.mts.map +1 -0
- package/internal/decoders/line.d.ts +17 -0
- package/internal/decoders/line.d.ts.map +1 -0
- package/internal/decoders/line.js +113 -0
- package/internal/decoders/line.js.map +1 -0
- package/internal/decoders/line.mjs +108 -0
- package/internal/decoders/line.mjs.map +1 -0
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +10 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +10 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts +2 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +2 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/tslib.js +18 -18
- package/package.json +11 -1
- package/resources/agents/agents.d.mts +200 -23
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +200 -23
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +7 -0
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +7 -0
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/index.d.mts +2 -2
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +2 -2
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs.map +1 -1
- package/resources/agents/runs.d.mts +25 -2
- package/resources/agents/runs.d.mts.map +1 -1
- package/resources/agents/runs.d.ts +25 -2
- package/resources/agents/runs.d.ts.map +1 -1
- package/resources/agents/runs.js +2 -1
- package/resources/agents/runs.js.map +1 -1
- package/resources/agents/runs.mjs +2 -1
- package/resources/agents/runs.mjs.map +1 -1
- package/resources/agents/templates.d.mts +8 -8
- package/resources/agents/templates.d.mts.map +1 -1
- package/resources/agents/templates.d.ts +8 -8
- package/resources/agents/templates.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/src/client.ts +4 -0
- package/src/core/streaming.ts +315 -0
- package/src/internal/decoders/line.ts +135 -0
- package/src/internal/parse.ts +14 -0
- package/src/internal/request-options.ts +2 -0
- package/src/resources/agents/agents.ts +237 -25
- package/src/resources/agents/index.ts +3 -0
- package/src/resources/agents/runs.ts +37 -3
- package/src/resources/agents/templates.ts +10 -10
- package/src/resources/index.ts +2 -0
- package/src/streaming.ts +2 -0
- package/src/version.ts +1 -1
- package/streaming.d.mts +3 -0
- package/streaming.d.mts.map +1 -0
- package/streaming.d.ts +3 -0
- package/streaming.d.ts.map +1 -0
- package/streaming.js +6 -0
- package/streaming.js.map +1 -0
- package/streaming.mjs +3 -0
- package/streaming.mjs.map +1 -0
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
RunResultParams,
|
|
13
13
|
RunResultResponse,
|
|
14
14
|
RunStreamEventsParams,
|
|
15
|
+
RunStreamEventsResponse,
|
|
15
16
|
Runs,
|
|
16
17
|
} from './runs';
|
|
17
18
|
import * as TemplatesAPI from './templates';
|
|
@@ -80,6 +81,14 @@ export class Agents extends APIResource {
|
|
|
80
81
|
get(agentID: string, options?: RequestOptions): APIPromise<AgentGetResponse> {
|
|
81
82
|
return this._client.get(path`/v2/agents/${agentID}`, options);
|
|
82
83
|
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Creates a minimal persistent Web Search Agent and starts a run for it. The
|
|
87
|
+
* response includes `web_search_agent_id` for later agent and run queries.
|
|
88
|
+
*/
|
|
89
|
+
run(body: AgentRunParams, options?: RequestOptions): APIPromise<AgentRunResponse> {
|
|
90
|
+
return this._client.post('/v2/agents/runs', { body, ...options });
|
|
91
|
+
}
|
|
83
92
|
}
|
|
84
93
|
|
|
85
94
|
export interface AgentCreateResponse {
|
|
@@ -103,11 +112,6 @@ export interface AgentCreateResponse {
|
|
|
103
112
|
*/
|
|
104
113
|
display_name: string;
|
|
105
114
|
|
|
106
|
-
/**
|
|
107
|
-
* Domain expertise or operating context for the agent.
|
|
108
|
-
*/
|
|
109
|
-
domain_expertise: string;
|
|
110
|
-
|
|
111
115
|
/**
|
|
112
116
|
* Default effort level for this agent's runs.
|
|
113
117
|
*/
|
|
@@ -133,6 +137,11 @@ export interface AgentCreateResponse {
|
|
|
133
137
|
*/
|
|
134
138
|
output_schema: { [key: string]: unknown } | null;
|
|
135
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Skill or operating context for the agent.
|
|
142
|
+
*/
|
|
143
|
+
skill: string;
|
|
144
|
+
|
|
136
145
|
/**
|
|
137
146
|
* Source guidance for the agent.
|
|
138
147
|
*/
|
|
@@ -287,11 +296,6 @@ export interface AgentUpdateResponse {
|
|
|
287
296
|
*/
|
|
288
297
|
display_name: string;
|
|
289
298
|
|
|
290
|
-
/**
|
|
291
|
-
* Domain expertise or operating context for the agent.
|
|
292
|
-
*/
|
|
293
|
-
domain_expertise: string;
|
|
294
|
-
|
|
295
299
|
/**
|
|
296
300
|
* Default effort level for this agent's runs.
|
|
297
301
|
*/
|
|
@@ -317,6 +321,11 @@ export interface AgentUpdateResponse {
|
|
|
317
321
|
*/
|
|
318
322
|
output_schema: { [key: string]: unknown } | null;
|
|
319
323
|
|
|
324
|
+
/**
|
|
325
|
+
* Skill or operating context for the agent.
|
|
326
|
+
*/
|
|
327
|
+
skill: string;
|
|
328
|
+
|
|
320
329
|
/**
|
|
321
330
|
* Source guidance for the agent.
|
|
322
331
|
*/
|
|
@@ -494,11 +503,6 @@ export namespace AgentListResponse {
|
|
|
494
503
|
*/
|
|
495
504
|
display_name: string;
|
|
496
505
|
|
|
497
|
-
/**
|
|
498
|
-
* Domain expertise or operating context for the agent.
|
|
499
|
-
*/
|
|
500
|
-
domain_expertise: string;
|
|
501
|
-
|
|
502
506
|
/**
|
|
503
507
|
* Default effort level for this agent's runs.
|
|
504
508
|
*/
|
|
@@ -524,6 +528,11 @@ export namespace AgentListResponse {
|
|
|
524
528
|
*/
|
|
525
529
|
output_schema: { [key: string]: unknown } | null;
|
|
526
530
|
|
|
531
|
+
/**
|
|
532
|
+
* Skill or operating context for the agent.
|
|
533
|
+
*/
|
|
534
|
+
skill: string;
|
|
535
|
+
|
|
527
536
|
/**
|
|
528
537
|
* Source guidance for the agent.
|
|
529
538
|
*/
|
|
@@ -679,11 +688,6 @@ export interface AgentGetResponse {
|
|
|
679
688
|
*/
|
|
680
689
|
display_name: string;
|
|
681
690
|
|
|
682
|
-
/**
|
|
683
|
-
* Domain expertise or operating context for the agent.
|
|
684
|
-
*/
|
|
685
|
-
domain_expertise: string;
|
|
686
|
-
|
|
687
691
|
/**
|
|
688
692
|
* Default effort level for this agent's runs.
|
|
689
693
|
*/
|
|
@@ -709,6 +713,11 @@ export interface AgentGetResponse {
|
|
|
709
713
|
*/
|
|
710
714
|
output_schema: { [key: string]: unknown } | null;
|
|
711
715
|
|
|
716
|
+
/**
|
|
717
|
+
* Skill or operating context for the agent.
|
|
718
|
+
*/
|
|
719
|
+
skill: string;
|
|
720
|
+
|
|
712
721
|
/**
|
|
713
722
|
* Source guidance for the agent.
|
|
714
723
|
*/
|
|
@@ -842,6 +851,80 @@ export namespace AgentGetResponse {
|
|
|
842
851
|
}
|
|
843
852
|
}
|
|
844
853
|
|
|
854
|
+
export interface AgentRunResponse {
|
|
855
|
+
/**
|
|
856
|
+
* Run identifier, format "task*run*{uuid}".
|
|
857
|
+
*/
|
|
858
|
+
id: string;
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* When the run was created.
|
|
862
|
+
*/
|
|
863
|
+
created_at: string;
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* Effort level used for the run.
|
|
867
|
+
*/
|
|
868
|
+
effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* Interaction ID.
|
|
872
|
+
*/
|
|
873
|
+
interaction_id: string;
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* True while status is 'queued' or 'running'.
|
|
877
|
+
*/
|
|
878
|
+
is_active: boolean;
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* Current run status.
|
|
882
|
+
*/
|
|
883
|
+
status: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* Web Search Agent instance this run belongs to.
|
|
887
|
+
*/
|
|
888
|
+
web_search_agent_id: string;
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* When the run completed.
|
|
892
|
+
*/
|
|
893
|
+
completed_at?: string | null;
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* Error details when the run failed.
|
|
897
|
+
*/
|
|
898
|
+
error?: AgentRunResponse.Error | null;
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* Prompt submitted for the run.
|
|
902
|
+
*/
|
|
903
|
+
prompt?: string | null;
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* When the run started executing.
|
|
907
|
+
*/
|
|
908
|
+
started_at?: string | null;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
export namespace AgentRunResponse {
|
|
912
|
+
/**
|
|
913
|
+
* Error details when the run failed.
|
|
914
|
+
*/
|
|
915
|
+
export interface Error {
|
|
916
|
+
/**
|
|
917
|
+
* Human-readable error description.
|
|
918
|
+
*/
|
|
919
|
+
message: string;
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* Reference ID (equals the run id).
|
|
923
|
+
*/
|
|
924
|
+
ref_id: string;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
|
|
845
928
|
export interface AgentCreateParams {
|
|
846
929
|
/**
|
|
847
930
|
* Stable agent name.
|
|
@@ -858,11 +941,6 @@ export interface AgentCreateParams {
|
|
|
858
941
|
*/
|
|
859
942
|
display_name?: string | null;
|
|
860
943
|
|
|
861
|
-
/**
|
|
862
|
-
* Domain expertise or operating context for the agent.
|
|
863
|
-
*/
|
|
864
|
-
domain_expertise?: string | null;
|
|
865
|
-
|
|
866
944
|
/**
|
|
867
945
|
* Default effort level for this agent's runs.
|
|
868
946
|
*/
|
|
@@ -888,6 +966,11 @@ export interface AgentCreateParams {
|
|
|
888
966
|
*/
|
|
889
967
|
output_schema?: { [key: string]: unknown } | null;
|
|
890
968
|
|
|
969
|
+
/**
|
|
970
|
+
* Skill or operating context for the agent.
|
|
971
|
+
*/
|
|
972
|
+
skill?: string | null;
|
|
973
|
+
|
|
891
974
|
/**
|
|
892
975
|
* Source guidance for the agent.
|
|
893
976
|
*/
|
|
@@ -1003,6 +1086,132 @@ export interface AgentListParams {
|
|
|
1003
1086
|
workspace_id?: string | null;
|
|
1004
1087
|
}
|
|
1005
1088
|
|
|
1089
|
+
export interface AgentRunParams {
|
|
1090
|
+
/**
|
|
1091
|
+
* User prompt or task instructions for the run.
|
|
1092
|
+
*/
|
|
1093
|
+
input: string;
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* Stable agent name. On this no-agent-id route, an unseen name creates a new
|
|
1097
|
+
* agent; an existing name reuses it. Ignored on the /{agent_id}/runs route.
|
|
1098
|
+
*/
|
|
1099
|
+
agent_name?: string | null;
|
|
1100
|
+
|
|
1101
|
+
/**
|
|
1102
|
+
* Canonical effort tier names for the research graph.
|
|
1103
|
+
*/
|
|
1104
|
+
effort?: 'low' | 'medium' | 'high' | 'x-high' | 'max' | null;
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* Whether to stream run events when supported.
|
|
1108
|
+
*/
|
|
1109
|
+
enable_events?: boolean;
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* Existing records to ENRICH: a list of partial rows, or a single object,
|
|
1113
|
+
* mirroring output_schema's shape.
|
|
1114
|
+
*/
|
|
1115
|
+
input_data?: Array<{ [key: string]: unknown }> | { [key: string]: unknown } | null;
|
|
1116
|
+
|
|
1117
|
+
/**
|
|
1118
|
+
* Origin of public API runs. Public requests are always API-originated.
|
|
1119
|
+
*/
|
|
1120
|
+
origin?: 'api';
|
|
1121
|
+
|
|
1122
|
+
/**
|
|
1123
|
+
* JSON schema overriding the agent's default structured output for this run.
|
|
1124
|
+
*/
|
|
1125
|
+
output_schema?: { [key: string]: unknown } | null;
|
|
1126
|
+
|
|
1127
|
+
/**
|
|
1128
|
+
* Previous interaction identifier used to continue a conversation.
|
|
1129
|
+
*/
|
|
1130
|
+
previous_interaction_id?: string | null;
|
|
1131
|
+
|
|
1132
|
+
/**
|
|
1133
|
+
* Skill override for this run. One-time only, except when this run creates a new
|
|
1134
|
+
* agent via agent_name, in which case it becomes the new agent's stored skill.
|
|
1135
|
+
*/
|
|
1136
|
+
skill?: string | null;
|
|
1137
|
+
|
|
1138
|
+
/**
|
|
1139
|
+
* Source guidance overriding the agent default.
|
|
1140
|
+
*/
|
|
1141
|
+
sources?: AgentRunParams.Sources | null;
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* Only settable when this run creates a new agent (via agent_name, or when no
|
|
1145
|
+
* agent is resolved), in which case it becomes the new agent's stored use_case.
|
|
1146
|
+
* For a run against an existing agent, this must match the agent's own use_case —
|
|
1147
|
+
* passing the same value is accepted as a no-op, a different value is rejected.
|
|
1148
|
+
*/
|
|
1149
|
+
use_case?: 'research' | 'enrichment' | 'dataset_building' | null;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
export namespace AgentRunParams {
|
|
1153
|
+
/**
|
|
1154
|
+
* Source guidance overriding the agent default.
|
|
1155
|
+
*/
|
|
1156
|
+
export interface Sources {
|
|
1157
|
+
/**
|
|
1158
|
+
* Source groups the agent is allowed to use.
|
|
1159
|
+
*/
|
|
1160
|
+
allow?: Array<Sources.Allow>;
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* Free-text guidance describing sources or domains to avoid.
|
|
1164
|
+
*/
|
|
1165
|
+
avoid?: string | null;
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* Source groups the agent should not use.
|
|
1169
|
+
*/
|
|
1170
|
+
block?: Array<Sources.Block>;
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* Free-text guidance describing sources or domains to prioritize.
|
|
1174
|
+
*/
|
|
1175
|
+
prioritize?: string | null;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
export namespace Sources {
|
|
1179
|
+
export interface Allow {
|
|
1180
|
+
/**
|
|
1181
|
+
* Domains included in this source group.
|
|
1182
|
+
*/
|
|
1183
|
+
domains: Array<string>;
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* Source group title.
|
|
1187
|
+
*/
|
|
1188
|
+
title: string;
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* Zero-based source group position.
|
|
1192
|
+
*/
|
|
1193
|
+
order?: number;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
export interface Block {
|
|
1197
|
+
/**
|
|
1198
|
+
* Domains included in this source group.
|
|
1199
|
+
*/
|
|
1200
|
+
domains: Array<string>;
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* Source group title.
|
|
1204
|
+
*/
|
|
1205
|
+
title: string;
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* Zero-based source group position.
|
|
1209
|
+
*/
|
|
1210
|
+
order?: number;
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1006
1215
|
Agents.Templates = Templates;
|
|
1007
1216
|
Agents.Runs = Runs;
|
|
1008
1217
|
|
|
@@ -1012,9 +1221,11 @@ export declare namespace Agents {
|
|
|
1012
1221
|
type AgentUpdateResponse as AgentUpdateResponse,
|
|
1013
1222
|
type AgentListResponse as AgentListResponse,
|
|
1014
1223
|
type AgentGetResponse as AgentGetResponse,
|
|
1224
|
+
type AgentRunResponse as AgentRunResponse,
|
|
1015
1225
|
type AgentCreateParams as AgentCreateParams,
|
|
1016
1226
|
type AgentUpdateParams as AgentUpdateParams,
|
|
1017
1227
|
type AgentListParams as AgentListParams,
|
|
1228
|
+
type AgentRunParams as AgentRunParams,
|
|
1018
1229
|
};
|
|
1019
1230
|
|
|
1020
1231
|
export {
|
|
@@ -1030,6 +1241,7 @@ export declare namespace Agents {
|
|
|
1030
1241
|
type RunListResponse as RunListResponse,
|
|
1031
1242
|
type RunGetResponse as RunGetResponse,
|
|
1032
1243
|
type RunResultResponse as RunResultResponse,
|
|
1244
|
+
type RunStreamEventsResponse as RunStreamEventsResponse,
|
|
1033
1245
|
type RunCreateParams as RunCreateParams,
|
|
1034
1246
|
type RunListParams as RunListParams,
|
|
1035
1247
|
type RunGetParams as RunGetParams,
|
|
@@ -6,9 +6,11 @@ export {
|
|
|
6
6
|
type AgentUpdateResponse,
|
|
7
7
|
type AgentListResponse,
|
|
8
8
|
type AgentGetResponse,
|
|
9
|
+
type AgentRunResponse,
|
|
9
10
|
type AgentCreateParams,
|
|
10
11
|
type AgentUpdateParams,
|
|
11
12
|
type AgentListParams,
|
|
13
|
+
type AgentRunParams,
|
|
12
14
|
} from './agents';
|
|
13
15
|
export {
|
|
14
16
|
Runs,
|
|
@@ -16,6 +18,7 @@ export {
|
|
|
16
18
|
type RunListResponse,
|
|
17
19
|
type RunGetResponse,
|
|
18
20
|
type RunResultResponse,
|
|
21
|
+
type RunStreamEventsResponse,
|
|
19
22
|
type RunCreateParams,
|
|
20
23
|
type RunListParams,
|
|
21
24
|
type RunGetParams,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { Stream } from '../../core/streaming';
|
|
5
6
|
import { buildHeaders } from '../../internal/headers';
|
|
6
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
7
8
|
import { path } from '../../internal/utils/path';
|
|
@@ -60,12 +61,17 @@ export class Runs extends APIResource {
|
|
|
60
61
|
* (`text/event-stream`). Create the run with `enable_events: true` to have events
|
|
61
62
|
* published. A keep-alive comment is sent every 15 seconds.
|
|
62
63
|
*/
|
|
63
|
-
streamEvents(
|
|
64
|
+
streamEvents(
|
|
65
|
+
runID: string,
|
|
66
|
+
params: RunStreamEventsParams,
|
|
67
|
+
options?: RequestOptions,
|
|
68
|
+
): APIPromise<Stream<RunStreamEventsResponse>> {
|
|
64
69
|
const { agent_id } = params;
|
|
65
70
|
return this._client.get(path`/v2/agents/${agent_id}/runs/${runID}/events`, {
|
|
66
71
|
...options,
|
|
67
|
-
headers: buildHeaders([{ Accept: '
|
|
68
|
-
|
|
72
|
+
headers: buildHeaders([{ Accept: 'text/event-stream' }, options?.headers]),
|
|
73
|
+
stream: true,
|
|
74
|
+
}) as APIPromise<Stream<RunStreamEventsResponse>>;
|
|
69
75
|
}
|
|
70
76
|
}
|
|
71
77
|
|
|
@@ -870,12 +876,20 @@ export namespace RunResultResponse {
|
|
|
870
876
|
}
|
|
871
877
|
}
|
|
872
878
|
|
|
879
|
+
export type RunStreamEventsResponse = unknown;
|
|
880
|
+
|
|
873
881
|
export interface RunCreateParams {
|
|
874
882
|
/**
|
|
875
883
|
* User prompt or task instructions for the run.
|
|
876
884
|
*/
|
|
877
885
|
input: string;
|
|
878
886
|
|
|
887
|
+
/**
|
|
888
|
+
* Stable agent name. On this no-agent-id route, an unseen name creates a new
|
|
889
|
+
* agent; an existing name reuses it. Ignored on the /{agent_id}/runs route.
|
|
890
|
+
*/
|
|
891
|
+
agent_name?: string | null;
|
|
892
|
+
|
|
879
893
|
/**
|
|
880
894
|
* Canonical effort tier names for the research graph.
|
|
881
895
|
*/
|
|
@@ -892,6 +906,11 @@ export interface RunCreateParams {
|
|
|
892
906
|
*/
|
|
893
907
|
input_data?: Array<{ [key: string]: unknown }> | { [key: string]: unknown } | null;
|
|
894
908
|
|
|
909
|
+
/**
|
|
910
|
+
* Origin of public API runs. Public requests are always API-originated.
|
|
911
|
+
*/
|
|
912
|
+
origin?: 'api';
|
|
913
|
+
|
|
895
914
|
/**
|
|
896
915
|
* JSON schema overriding the agent's default structured output for this run.
|
|
897
916
|
*/
|
|
@@ -902,10 +921,24 @@ export interface RunCreateParams {
|
|
|
902
921
|
*/
|
|
903
922
|
previous_interaction_id?: string | null;
|
|
904
923
|
|
|
924
|
+
/**
|
|
925
|
+
* Skill override for this run. One-time only, except when this run creates a new
|
|
926
|
+
* agent via agent_name, in which case it becomes the new agent's stored skill.
|
|
927
|
+
*/
|
|
928
|
+
skill?: string | null;
|
|
929
|
+
|
|
905
930
|
/**
|
|
906
931
|
* Source guidance overriding the agent default.
|
|
907
932
|
*/
|
|
908
933
|
sources?: RunCreateParams.Sources | null;
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* Only settable when this run creates a new agent (via agent_name, or when no
|
|
937
|
+
* agent is resolved), in which case it becomes the new agent's stored use_case.
|
|
938
|
+
* For a run against an existing agent, this must match the agent's own use_case —
|
|
939
|
+
* passing the same value is accepted as a no-op, a different value is rejected.
|
|
940
|
+
*/
|
|
941
|
+
use_case?: 'research' | 'enrichment' | 'dataset_building' | null;
|
|
909
942
|
}
|
|
910
943
|
|
|
911
944
|
export namespace RunCreateParams {
|
|
@@ -995,6 +1028,7 @@ export declare namespace Runs {
|
|
|
995
1028
|
type RunListResponse as RunListResponse,
|
|
996
1029
|
type RunGetResponse as RunGetResponse,
|
|
997
1030
|
type RunResultResponse as RunResultResponse,
|
|
1031
|
+
type RunStreamEventsResponse as RunStreamEventsResponse,
|
|
998
1032
|
type RunCreateParams as RunCreateParams,
|
|
999
1033
|
type RunListParams as RunListParams,
|
|
1000
1034
|
type RunGetParams as RunGetParams,
|
|
@@ -69,11 +69,6 @@ export namespace TemplateListResponse {
|
|
|
69
69
|
*/
|
|
70
70
|
display_name: string;
|
|
71
71
|
|
|
72
|
-
/**
|
|
73
|
-
* Domain expertise or operating context for the template.
|
|
74
|
-
*/
|
|
75
|
-
domain_expertise: string;
|
|
76
|
-
|
|
77
72
|
/**
|
|
78
73
|
* Default effort level for runs created from this template.
|
|
79
74
|
*/
|
|
@@ -94,6 +89,11 @@ export namespace TemplateListResponse {
|
|
|
94
89
|
*/
|
|
95
90
|
output_schema: { [key: string]: unknown } | null;
|
|
96
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Skill or operating context for the template.
|
|
94
|
+
*/
|
|
95
|
+
skill: string;
|
|
96
|
+
|
|
97
97
|
/**
|
|
98
98
|
* Ordered source groups for the template.
|
|
99
99
|
*/
|
|
@@ -200,11 +200,6 @@ export interface TemplateGetResponse {
|
|
|
200
200
|
*/
|
|
201
201
|
display_name: string;
|
|
202
202
|
|
|
203
|
-
/**
|
|
204
|
-
* Domain expertise or operating context for the template.
|
|
205
|
-
*/
|
|
206
|
-
domain_expertise: string;
|
|
207
|
-
|
|
208
203
|
/**
|
|
209
204
|
* Default effort level for runs created from this template.
|
|
210
205
|
*/
|
|
@@ -225,6 +220,11 @@ export interface TemplateGetResponse {
|
|
|
225
220
|
*/
|
|
226
221
|
output_schema: { [key: string]: unknown } | null;
|
|
227
222
|
|
|
223
|
+
/**
|
|
224
|
+
* Skill or operating context for the template.
|
|
225
|
+
*/
|
|
226
|
+
skill: string;
|
|
227
|
+
|
|
228
228
|
/**
|
|
229
229
|
* Ordered source groups for the template.
|
|
230
230
|
*/
|
package/src/resources/index.ts
CHANGED
|
@@ -7,9 +7,11 @@ export {
|
|
|
7
7
|
type AgentUpdateResponse,
|
|
8
8
|
type AgentListResponse,
|
|
9
9
|
type AgentGetResponse,
|
|
10
|
+
type AgentRunResponse,
|
|
10
11
|
type AgentCreateParams,
|
|
11
12
|
type AgentUpdateParams,
|
|
12
13
|
type AgentListParams,
|
|
14
|
+
type AgentRunParams,
|
|
13
15
|
} from './agents/agents';
|
|
14
16
|
export { Batches, type BatchGetResponse, type BatchProgressResponse } from './batches';
|
|
15
17
|
export {
|
package/src/streaming.ts
ADDED
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.2.0'; // x-release-please-version
|
package/streaming.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming.d.mts","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,qCAAiC"}
|
package/streaming.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,oCAAiC"}
|
package/streaming.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("./internal/tslib.js");
|
|
4
|
+
/** @deprecated Import from ./core/streaming instead */
|
|
5
|
+
tslib_1.__exportStar(require("./core/streaming.js"), exports);
|
|
6
|
+
//# sourceMappingURL=streaming.js.map
|
package/streaming.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming.js","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":";;;AAAA,uDAAuD;AACvD,8DAAiC"}
|
package/streaming.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming.mjs","sourceRoot":"","sources":["src/streaming.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,qCAAiC"}
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.2.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.2.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.2.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|